var CLOSURE_NO_DEPS = true;
window.polymerSkipLoadingFontRoboto = true;
// Copyright 2014 Google Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//     You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//     See the License for the specific language governing permissions and
// limitations under the License.

!function(){var a={},b={},c={};!function(a,b){function c(a){if("number"==typeof a)return a;var b={};for(var c in a)b[c]=a[c];return b}function d(){this._delay=0,this._endDelay=0,this._fill="none",this._iterationStart=0,this._iterations=1,this._duration=0,this._playbackRate=1,this._direction="normal",this._easing="linear",this._easingFunction=x}function e(){return a.isDeprecated("Invalid timing inputs","2016-03-02","TypeError exceptions will be thrown instead.",!0)}function f(b,c,e){var f=new d;return c&&(f.fill="both",f.duration="auto"),"number"!=typeof b||isNaN(b)?void 0!==b&&Object.getOwnPropertyNames(b).forEach(function(c){if("auto"!=b[c]){if(("number"==typeof f[c]||"duration"==c)&&("number"!=typeof b[c]||isNaN(b[c])))return;if("fill"==c&&-1==v.indexOf(b[c]))return;if("direction"==c&&-1==w.indexOf(b[c]))return;if("playbackRate"==c&&1!==b[c]&&a.isDeprecated("AnimationEffectTiming.playbackRate","2014-11-28","Use Animation.playbackRate instead."))return;f[c]=b[c]}}):f.duration=b,f}function g(a){return"number"==typeof a&&(a=isNaN(a)?{duration:0}:{duration:a}),a}function h(b,c){return b=a.numericTimingToObject(b),f(b,c)}function i(a,b,c,d){return a<0||a>1||c<0||c>1?x:function(e){function f(a,b,c){return 3*a*(1-c)*(1-c)*c+3*b*(1-c)*c*c+c*c*c}if(e<=0){var g=0;return a>0?g=b/a:!b&&c>0&&(g=d/c),g*e}if(e>=1){var h=0;return c<1?h=(d-1)/(c-1):1==c&&a<1&&(h=(b-1)/(a-1)),1+h*(e-1)}for(var i=0,j=1;i<j;){var k=(i+j)/2,l=f(a,c,k);if(Math.abs(e-l)<1e-5)return f(b,d,k);l<e?i=k:j=k}return f(b,d,k)}}function j(a,b){return function(c){if(c>=1)return 1;var d=1/a;return(c+=b*d)-c%d}}function k(a){C||(C=document.createElement("div").style),C.animationTimingFunction="",C.animationTimingFunction=a;var b=C.animationTimingFunction;if(""==b&&e())throw new TypeError(a+" is not a valid value for easing");return b}function l(a){if("linear"==a)return x;var b=E.exec(a);if(b)return i.apply(this,b.slice(1).map(Number));var c=F.exec(a);if(c)return j(Number(c[1]),A);var d=G.exec(a);return d?j(Number(d[1]),{start:y,middle:z,end:A}[d[2]]):B[a]||x}function m(a){return Math.abs(n(a)/a.playbackRate)}function n(a){return 0===a.duration||0===a.iterations?0:a.duration*a.iterations}function o(a,b,c){if(null==b)return H;var d=c.delay+a+c.endDelay;return b<Math.min(c.delay,d)?I:b>=Math.min(c.delay+a,d)?J:K}function p(a,b,c,d,e){switch(d){case I:return"backwards"==b||"both"==b?0:null;case K:return c-e;case J:return"forwards"==b||"both"==b?a:null;case H:return null}}function q(a,b,c,d,e){var f=e;return 0===a?b!==I&&(f+=c):f+=d/a,f}function r(a,b,c,d,e,f){var g=a===1/0?b%1:a%1;return 0!==g||c!==J||0===d||0===e&&0!==f||(g=1),g}function s(a,b,c,d){return a===J&&b===1/0?1/0:1===c?Math.floor(d)-1:Math.floor(d)}function t(a,b,c){var d=a;if("normal"!==a&&"reverse"!==a){var e=b;"alternate-reverse"===a&&(e+=1),d="normal",e!==1/0&&e%2!=0&&(d="reverse")}return"normal"===d?c:1-c}function u(a,b,c){var d=o(a,b,c),e=p(a,c.fill,b,d,c.delay);if(null===e)return null;var f=q(c.duration,d,c.iterations,e,c.iterationStart),g=r(f,c.iterationStart,d,c.iterations,e,c.duration),h=s(d,c.iterations,g,f),i=t(c.direction,h,g);return c._easingFunction(i)}var v="backwards|forwards|both|none".split("|"),w="reverse|alternate|alternate-reverse".split("|"),x=function(a){return a};d.prototype={_setMember:function(b,c){this["_"+b]=c,this._effect&&(this._effect._timingInput[b]=c,this._effect._timing=a.normalizeTimingInput(this._effect._timingInput),this._effect.activeDuration=a.calculateActiveDuration(this._effect._timing),this._effect._animation&&this._effect._animation._rebuildUnderlyingAnimation())},get playbackRate(){return this._playbackRate},set delay(a){this._setMember("delay",a)},get delay(){return this._delay},set endDelay(a){this._setMember("endDelay",a)},get endDelay(){return this._endDelay},set fill(a){this._setMember("fill",a)},get fill(){return this._fill},set iterationStart(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterationStart must be a non-negative number, received: "+a);this._setMember("iterationStart",a)},get iterationStart(){return this._iterationStart},set duration(a){if("auto"!=a&&(isNaN(a)||a<0)&&e())throw new TypeError("duration must be non-negative or auto, received: "+a);this._setMember("duration",a)},get duration(){return this._duration},set direction(a){this._setMember("direction",a)},get direction(){return this._direction},set easing(a){this._easingFunction=l(k(a)),this._setMember("easing",a)},get easing(){return this._easing},set iterations(a){if((isNaN(a)||a<0)&&e())throw new TypeError("iterations must be non-negative, received: "+a);this._setMember("iterations",a)},get iterations(){return this._iterations}};var y=1,z=.5,A=0,B={ease:i(.25,.1,.25,1),"ease-in":i(.42,0,1,1),"ease-out":i(0,0,.58,1),"ease-in-out":i(.42,0,.58,1),"step-start":j(1,y),"step-middle":j(1,z),"step-end":j(1,A)},C=null,D="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",E=new RegExp("cubic-bezier\\("+D+","+D+","+D+","+D+"\\)"),F=/steps\(\s*(\d+)\s*\)/,G=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/,H=0,I=1,J=2,K=3;a.cloneTimingInput=c,a.makeTiming=f,a.numericTimingToObject=g,a.normalizeTimingInput=h,a.calculateActiveDuration=m,a.calculateIterationProgress=u,a.calculatePhase=o,a.normalizeEasing=k,a.parseEasingFunction=l}(a),function(a,b){function c(a,b){return a in k?k[a][b]||b:b}function d(a){return"display"===a||0===a.lastIndexOf("animation",0)||0===a.lastIndexOf("transition",0)}function e(a,b,e){if(!d(a)){var f=h[a];if(f){i.style[a]=b;for(var g in f){var j=f[g],k=i.style[j];e[j]=c(j,k)}}else e[a]=c(a,b)}}function f(a){var b=[];for(var c in a)if(!(c in["easing","offset","composite"])){var d=a[c];Array.isArray(d)||(d=[d]);for(var e,f=d.length,g=0;g<f;g++)e={},e.offset="offset"in a?a.offset:1==f?1:g/(f-1),"easing"in a&&(e.easing=a.easing),"composite"in a&&(e.composite=a.composite),e[c]=d[g],b.push(e)}return b.sort(function(a,b){return a.offset-b.offset}),b}function g(b){function c(){var a=d.length;null==d[a-1].offset&&(d[a-1].offset=1),a>1&&null==d[0].offset&&(d[0].offset=0);for(var b=0,c=d[0].offset,e=1;e<a;e++){var f=d[e].offset;if(null!=f){for(var g=1;g<e-b;g++)d[b+g].offset=c+(f-c)*g/(e-b);b=e,c=f}}}if(null==b)return[];window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||(b=f(b));for(var d=b.map(function(b){var c={};for(var d in b){var f=b[d];if("offset"==d){if(null!=f){if(f=Number(f),!isFinite(f))throw new TypeError("Keyframe offsets must be numbers.");if(f<0||f>1)throw new TypeError("Keyframe offsets must be between 0 and 1.")}}else if("composite"==d){if("add"==f||"accumulate"==f)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"add compositing is not supported"};if("replace"!=f)throw new TypeError("Invalid composite mode "+f+".")}else f="easing"==d?a.normalizeEasing(f):""+f;e(d,f,c)}return void 0==c.offset&&(c.offset=null),void 0==c.easing&&(c.easing="linear"),c}),g=!0,h=-1/0,i=0;i<d.length;i++){var j=d[i].offset;if(null!=j){if(j<h)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");h=j}else g=!1}return d=d.filter(function(a){return a.offset>=0&&a.offset<=1}),g||c(),d}var h={background:["backgroundImage","backgroundPosition","backgroundSize","backgroundRepeat","backgroundAttachment","backgroundOrigin","backgroundClip","backgroundColor"],border:["borderTopColor","borderTopStyle","borderTopWidth","borderRightColor","borderRightStyle","borderRightWidth","borderBottomColor","borderBottomStyle","borderBottomWidth","borderLeftColor","borderLeftStyle","borderLeftWidth"],borderBottom:["borderBottomWidth","borderBottomStyle","borderBottomColor"],borderColor:["borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"],borderLeft:["borderLeftWidth","borderLeftStyle","borderLeftColor"],borderRadius:["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],borderRight:["borderRightWidth","borderRightStyle","borderRightColor"],borderTop:["borderTopWidth","borderTopStyle","borderTopColor"],borderWidth:["borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"],flex:["flexGrow","flexShrink","flexBasis"],font:["fontFamily","fontSize","fontStyle","fontVariant","fontWeight","lineHeight"],margin:["marginTop","marginRight","marginBottom","marginLeft"],outline:["outlineColor","outlineStyle","outlineWidth"],padding:["paddingTop","paddingRight","paddingBottom","paddingLeft"]},i=document.createElementNS("http://www.w3.org/1999/xhtml","div"),j={thin:"1px",medium:"3px",thick:"5px"},k={borderBottomWidth:j,borderLeftWidth:j,borderRightWidth:j,borderTopWidth:j,fontSize:{"xx-small":"60%","x-small":"75%",small:"89%",medium:"100%",large:"120%","x-large":"150%","xx-large":"200%"},fontWeight:{normal:"400",bold:"700"},outlineWidth:j,textShadow:{none:"0px 0px 0px transparent"},boxShadow:{none:"0px 0px 0px 0px transparent"}};a.convertToArrayForm=f,a.normalizeKeyframes=g}(a),function(a){var b={};a.isDeprecated=function(a,c,d,e){var f=e?"are":"is",g=new Date,h=new Date(c);return h.setMonth(h.getMonth()+3),!(g<h&&(a in b||console.warn("Web Animations: "+a+" "+f+" deprecated and will stop working on "+h.toDateString()+". "+d),b[a]=!0,1))},a.deprecated=function(b,c,d,e){var f=e?"are":"is";if(a.isDeprecated(b,c,d,e))throw new Error(b+" "+f+" no longer supported. "+d)}}(a),function(){if(document.documentElement.animate){var c=document.documentElement.animate([],0),d=!0;if(c&&(d=!1,"play|currentTime|pause|reverse|playbackRate|cancel|finish|startTime|playState".split("|").forEach(function(a){void 0===c[a]&&(d=!0)})),!d)return}!function(a,b,c){function d(a){for(var b={},c=0;c<a.length;c++)for(var d in a[c])if("offset"!=d&&"easing"!=d&&"composite"!=d){var e={offset:a[c].offset,easing:a[c].easing,value:a[c][d]};b[d]=b[d]||[],b[d].push(e)}for(var f in b){var g=b[f];if(0!=g[0].offset||1!=g[g.length-1].offset)throw{type:DOMException.NOT_SUPPORTED_ERR,name:"NotSupportedError",message:"Partial keyframes are not supported"}}return b}function e(c){var d=[];for(var e in c)for(var f=c[e],g=0;g<f.length-1;g++){var h=g,i=g+1,j=f[h].offset,k=f[i].offset,l=j,m=k;0==g&&(l=-1/0,0==k&&(i=h)),g==f.length-2&&(m=1/0,1==j&&(h=i)),d.push({applyFrom:l,applyTo:m,startOffset:f[h].offset,endOffset:f[i].offset,easingFunction:a.parseEasingFunction(f[h].easing),property:e,interpolation:b.propertyInterpolation(e,f[h].value,f[i].value)})}return d.sort(function(a,b){return a.startOffset-b.startOffset}),d}b.convertEffectInput=function(c){var f=a.normalizeKeyframes(c),g=d(f),h=e(g);return function(a,c){if(null!=c)h.filter(function(a){return c>=a.applyFrom&&c<a.applyTo}).forEach(function(d){var e=c-d.startOffset,f=d.endOffset-d.startOffset,g=0==f?0:d.easingFunction(e/f);b.apply(a,d.property,d.interpolation(g))});else for(var d in g)"offset"!=d&&"easing"!=d&&"composite"!=d&&b.clear(a,d)}}}(a,b),function(a,b,c){function d(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}function e(a,b,c){h[c]=h[c]||[],h[c].push([a,b])}function f(a,b,c){for(var f=0;f<c.length;f++){e(a,b,d(c[f]))}}function g(c,e,f){var g=c;/-/.test(c)&&!a.isDeprecated("Hyphenated property names","2016-03-22","Use camelCase instead.",!0)&&(g=d(c)),"initial"!=e&&"initial"!=f||("initial"==e&&(e=i[g]),"initial"==f&&(f=i[g]));for(var j=e==f?[]:h[g],k=0;j&&k<j.length;k++){var l=j[k][0](e),m=j[k][0](f);if(void 0!==l&&void 0!==m){var n=j[k][1](l,m);if(n){var o=b.Interpolation.apply(null,n);return function(a){return 0==a?e:1==a?f:o(a)}}}}return b.Interpolation(!1,!0,function(a){return a?f:e})}var h={};b.addPropertiesHandler=f;var i={backgroundColor:"transparent",backgroundPosition:"0% 0%",borderBottomColor:"currentColor",borderBottomLeftRadius:"0px",borderBottomRightRadius:"0px",borderBottomWidth:"3px",borderLeftColor:"currentColor",borderLeftWidth:"3px",borderRightColor:"currentColor",borderRightWidth:"3px",borderSpacing:"2px",borderTopColor:"currentColor",borderTopLeftRadius:"0px",borderTopRightRadius:"0px",borderTopWidth:"3px",bottom:"auto",clip:"rect(0px, 0px, 0px, 0px)",color:"black",fontSize:"100%",fontWeight:"400",height:"auto",left:"auto",letterSpacing:"normal",lineHeight:"120%",marginBottom:"0px",marginLeft:"0px",marginRight:"0px",marginTop:"0px",maxHeight:"none",maxWidth:"none",minHeight:"0px",minWidth:"0px",opacity:"1.0",outlineColor:"invert",outlineOffset:"0px",outlineWidth:"3px",paddingBottom:"0px",paddingLeft:"0px",paddingRight:"0px",paddingTop:"0px",right:"auto",strokeDasharray:"none",strokeDashoffset:"0px",textIndent:"0px",textShadow:"0px 0px 0px transparent",top:"auto",transform:"",verticalAlign:"0px",visibility:"visible",width:"auto",wordSpacing:"normal",zIndex:"auto"};b.propertyInterpolation=g}(a,b),function(a,b,c){function d(b){var c=a.calculateActiveDuration(b),d=function(d){return a.calculateIterationProgress(c,d,b)};return d._totalDuration=b.delay+c+b.endDelay,d}b.KeyframeEffect=function(c,e,f,g){var h,i=d(a.normalizeTimingInput(f)),j=b.convertEffectInput(e),k=function(){j(c,h)};return k._update=function(a){return null!==(h=i(a))},k._clear=function(){j(c,null)},k._hasSameTarget=function(a){return c===a},k._target=c,k._totalDuration=i._totalDuration,k._id=g,k}}(a,b),function(a,b){a.apply=function(b,c,d){b.style[a.propertyName(c)]=d},a.clear=function(b,c){b.style[a.propertyName(c)]=""}}(b),function(a){window.Element.prototype.animate=function(b,c){var d="";return c&&c.id&&(d=c.id),a.timeline._play(a.KeyframeEffect(this,b,c,d))}}(b),function(a,b){function c(a,b,d){if("number"==typeof a&&"number"==typeof b)return a*(1-d)+b*d;if("boolean"==typeof a&&"boolean"==typeof b)return d<.5?a:b;if(a.length==b.length){for(var e=[],f=0;f<a.length;f++)e.push(c(a[f],b[f],d));return e}throw"Mismatched interpolation arguments "+a+":"+b}a.Interpolation=function(a,b,d){return function(e){return d(c(a,b,e))}}}(b),function(a,b,c){a.sequenceNumber=0;var d=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="finish",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()};b.Animation=function(b){this.id="",b&&b._id&&(this.id=b._id),this._sequenceNumber=a.sequenceNumber++,this._currentTime=0,this._startTime=null,this._paused=!1,this._playbackRate=1,this._inTimeline=!0,this._finishedFlag=!0,this.onfinish=null,this._finishHandlers=[],this._effect=b,this._inEffect=this._effect._update(0),this._idle=!0,this._currentTimePending=!1},b.Animation.prototype={_ensureAlive:function(){this.playbackRate<0&&0===this.currentTime?this._inEffect=this._effect._update(-1):this._inEffect=this._effect._update(this.currentTime),this._inTimeline||!this._inEffect&&this._finishedFlag||(this._inTimeline=!0,b.timeline._animations.push(this))},_tickCurrentTime:function(a,b){a!=this._currentTime&&(this._currentTime=a,this._isFinished&&!b&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this._ensureAlive())},get currentTime(){return this._idle||this._currentTimePending?null:this._currentTime},set currentTime(a){a=+a,isNaN(a)||(b.restart(),this._paused||null==this._startTime||(this._startTime=this._timeline.currentTime-a/this._playbackRate),this._currentTimePending=!1,this._currentTime!=a&&(this._idle&&(this._idle=!1,this._paused=!0),this._tickCurrentTime(a,!0),b.applyDirtiedAnimation(this)))},get startTime(){return this._startTime},set startTime(a){a=+a,isNaN(a)||this._paused||this._idle||(this._startTime=a,this._tickCurrentTime((this._timeline.currentTime-this._startTime)*this.playbackRate),b.applyDirtiedAnimation(this))},get playbackRate(){return this._playbackRate},set playbackRate(a){if(a!=this._playbackRate){var c=this.currentTime;this._playbackRate=a,this._startTime=null,"paused"!=this.playState&&"idle"!=this.playState&&(this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)),null!=c&&(this.currentTime=c)}},get _isFinished(){return!this._idle&&(this._playbackRate>0&&this._currentTime>=this._totalDuration||this._playbackRate<0&&this._currentTime<=0)},get _totalDuration(){return this._effect._totalDuration},get playState(){return this._idle?"idle":null==this._startTime&&!this._paused&&0!=this.playbackRate||this._currentTimePending?"pending":this._paused?"paused":this._isFinished?"finished":"running"},_rewind:function(){if(this._playbackRate>=0)this._currentTime=0;else{if(!(this._totalDuration<1/0))throw new DOMException("Unable to rewind negative playback rate animation with infinite duration","InvalidStateError");this._currentTime=this._totalDuration}},play:function(){this._paused=!1,(this._isFinished||this._idle)&&(this._rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this._ensureAlive(),b.applyDirtiedAnimation(this)},pause:function(){this._isFinished||this._paused||this._idle?this._idle&&(this._rewind(),this._idle=!1):this._currentTimePending=!0,this._startTime=null,this._paused=!0},finish:function(){this._idle||(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this._currentTimePending=!1,b.applyDirtiedAnimation(this))},cancel:function(){this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this._effect._update(null),b.applyDirtiedAnimation(this))},reverse:function(){this.playbackRate*=-1,this.play()},addEventListener:function(a,b){"function"==typeof b&&"finish"==a&&this._finishHandlers.push(b)},removeEventListener:function(a,b){if("finish"==a){var c=this._finishHandlers.indexOf(b);c>=0&&this._finishHandlers.splice(c,1)}},_fireEvents:function(a){if(this._isFinished){if(!this._finishedFlag){var b=new d(this,this._currentTime,a),c=this._finishHandlers.concat(this.onfinish?[this.onfinish]:[]);setTimeout(function(){c.forEach(function(a){a.call(b.target,b)})},0),this._finishedFlag=!0}}else this._finishedFlag=!1},_tick:function(a,b){this._idle||this._paused||(null==this._startTime?b&&(this.startTime=a-this._currentTime/this.playbackRate):this._isFinished||this._tickCurrentTime((a-this._startTime)*this.playbackRate)),b&&(this._currentTimePending=!1,this._fireEvents(a))},get _needsTick(){return this.playState in{pending:1,running:1}||!this._finishedFlag},_targetAnimations:function(){var a=this._effect._target;return a._activeAnimations||(a._activeAnimations=[]),a._activeAnimations},_markTarget:function(){var a=this._targetAnimations();-1===a.indexOf(this)&&a.push(this)},_unmarkTarget:function(){var a=this._targetAnimations(),b=a.indexOf(this);-1!==b&&a.splice(b,1)}}}(a,b),function(a,b,c){function d(a){var b=j;j=[],a<q.currentTime&&(a=q.currentTime),q._animations.sort(e),q._animations=h(a,!0,q._animations)[0],b.forEach(function(b){b[1](a)}),g(),l=void 0}function e(a,b){return a._sequenceNumber-b._sequenceNumber}function f(){this._animations=[],this.currentTime=window.performance&&performance.now?performance.now():0}function g(){o.forEach(function(a){a()}),o.length=0}function h(a,c,d){p=!0,n=!1,b.timeline.currentTime=a,m=!1;var e=[],f=[],g=[],h=[];return d.forEach(function(b){b._tick(a,c),b._inEffect?(f.push(b._effect),b._markTarget()):(e.push(b._effect),b._unmarkTarget()),b._needsTick&&(m=!0);var d=b._inEffect||b._needsTick;b._inTimeline=d,d?g.push(b):h.push(b)}),o.push.apply(o,e),o.push.apply(o,f),m&&requestAnimationFrame(function(){}),p=!1,[g,h]}var i=window.requestAnimationFrame,j=[],k=0;window.requestAnimationFrame=function(a){var b=k++;return 0==j.length&&i(d),j.push([b,a]),b},window.cancelAnimationFrame=function(a){j.forEach(function(b){b[0]==a&&(b[1]=function(){})})},f.prototype={_play:function(c){c._timing=a.normalizeTimingInput(c.timing);var d=new b.Animation(c);return d._idle=!1,d._timeline=this,this._animations.push(d),b.restart(),b.applyDirtiedAnimation(d),d}};var l=void 0,m=!1,n=!1;b.restart=function(){return m||(m=!0,requestAnimationFrame(function(){}),n=!0),n},b.applyDirtiedAnimation=function(a){if(!p){a._markTarget();var c=a._targetAnimations();c.sort(e),h(b.timeline.currentTime,!1,c.slice())[1].forEach(function(a){var b=q._animations.indexOf(a);-1!==b&&q._animations.splice(b,1)}),g()}};var o=[],p=!1,q=new f;b.timeline=q}(a,b),function(a){function b(a,b){var c=a.exec(b);if(c)return c=a.ignoreCase?c[0].toLowerCase():c[0],[c,b.substr(c.length)]}function c(a,b){b=b.replace(/^\s*/,"");var c=a(b);if(c)return[c[0],c[1].replace(/^\s*/,"")]}function d(a,d,e){a=c.bind(null,a);for(var f=[];;){var g=a(e);if(!g)return[f,e];if(f.push(g[0]),e=g[1],!(g=b(d,e))||""==g[1])return[f,e];e=g[1]}}function e(a,b){for(var c=0,d=0;d<b.length&&(!/\s|,/.test(b[d])||0!=c);d++)if("("==b[d])c++;else if(")"==b[d]&&(c--,0==c&&d++,c<=0))break;var e=a(b.substr(0,d));return void 0==e?void 0:[e,b.substr(d)]}function f(a,b){for(var c=a,d=b;c&&d;)c>d?c%=d:d%=c;return c=a*b/(c+d)}function g(a){return function(b){var c=a(b);return c&&(c[0]=void 0),c}}function h(a,b){return function(c){return a(c)||[b,c]}}function i(b,c){for(var d=[],e=0;e<b.length;e++){var f=a.consumeTrimmed(b[e],c);if(!f||""==f[0])return;void 0!==f[0]&&d.push(f[0]),c=f[1]}if(""==c)return d}function j(a,b,c,d,e){for(var g=[],h=[],i=[],j=f(d.length,e.length),k=0;k<j;k++){var l=b(d[k%d.length],e[k%e.length]);if(!l)return;g.push(l[0]),h.push(l[1]),i.push(l[2])}return[g,h,function(b){var d=b.map(function(a,b){return i[b](a)}).join(c);return a?a(d):d}]}function k(a,b,c){for(var d=[],e=[],f=[],g=0,h=0;h<c.length;h++)if("function"==typeof c[h]){var i=c[h](a[g],b[g++]);d.push(i[0]),e.push(i[1]),f.push(i[2])}else!function(a){d.push(!1),e.push(!1),f.push(function(){return c[a]})}(h);return[d,e,function(a){for(var b="",c=0;c<a.length;c++)b+=f[c](a[c]);return b}]}a.consumeToken=b,a.consumeTrimmed=c,a.consumeRepeated=d,a.consumeParenthesised=e,a.ignore=g,a.optional=h,a.consumeList=i,a.mergeNestedRepeated=j.bind(null,null),a.mergeWrappedNestedRepeated=j,a.mergeList=k}(b),function(a){function b(b){function c(b){var c=a.consumeToken(/^inset/i,b);return c?(d.inset=!0,c):(c=a.consumeLengthOrPercent(b))?(d.lengths.push(c[0]),c):(c=a.consumeColor(b),c?(d.color=c[0],c):void 0)}var d={inset:!1,lengths:[],color:null},e=a.consumeRepeated(c,/^/,b);if(e&&e[0].length)return[d,e[1]]}function c(c){var d=a.consumeRepeated(b,/^,/,c);if(d&&""==d[1])return d[0]}function d(b,c){for(;b.lengths.length<Math.max(b.lengths.length,c.lengths.length);)b.lengths.push({px:0});for(;c.lengths.length<Math.max(b.lengths.length,c.lengths.length);)c.lengths.push({px:0});if(b.inset==c.inset&&!!b.color==!!c.color){for(var d,e=[],f=[[],0],g=[[],0],h=0;h<b.lengths.length;h++){var i=a.mergeDimensions(b.lengths[h],c.lengths[h],2==h);f[0].push(i[0]),g[0].push(i[1]),e.push(i[2])}if(b.color&&c.color){var j=a.mergeColors(b.color,c.color);f[1]=j[0],g[1]=j[1],d=j[2]}return[f,g,function(a){for(var c=b.inset?"inset ":" ",f=0;f<e.length;f++)c+=e[f](a[0][f])+" ";return d&&(c+=d(a[1])),c}]}}function e(b,c,d,e){function f(a){return{inset:a,color:[0,0,0,0],lengths:[{px:0},{px:0},{px:0},{px:0}]}}for(var g=[],h=[],i=0;i<d.length||i<e.length;i++){var j=d[i]||f(e[i].inset),k=e[i]||f(d[i].inset);g.push(j),h.push(k)}return a.mergeNestedRepeated(b,c,g,h)}var f=e.bind(null,d,", ");a.addPropertiesHandler(c,f,["box-shadow","text-shadow"])}(b),function(a,b){function c(a){return a.toFixed(3).replace(/0+$/,"").replace(/\.$/,"")}function d(a,b,c){return Math.min(b,Math.max(a,c))}function e(a){if(/^\s*[-+]?(\d*\.)?\d+\s*$/.test(a))return Number(a)}function f(a,b){return[a,b,c]}function g(a,b){if(0!=a)return i(0,1/0)(a,b)}function h(a,b){return[a,b,function(a){return Math.round(d(1,1/0,a))}]}function i(a,b){return function(e,f){return[e,f,function(e){return c(d(a,b,e))}]}}function j(a){var b=a.trim().split(/\s*[\s,]\s*/);if(0!==b.length){for(var c=[],d=0;d<b.length;d++){var f=e(b[d]);if(void 0===f)return;c.push(f)}return c}}function k(a,b){if(a.length==b.length)return[a,b,function(a){return a.map(c).join(" ")}]}function l(a,b){return[a,b,Math.round]}a.clamp=d,a.addPropertiesHandler(j,k,["stroke-dasharray"]),a.addPropertiesHandler(e,i(0,1/0),["border-image-width","line-height"]),a.addPropertiesHandler(e,i(0,1),["opacity","shape-image-threshold"]),a.addPropertiesHandler(e,g,["flex-grow","flex-shrink"]),a.addPropertiesHandler(e,h,["orphans","widows"]),a.addPropertiesHandler(e,l,["z-index"]),a.parseNumber=e,a.parseNumberList=j,a.mergeNumbers=f,a.numberToString=c}(b),function(a,b){function c(a,b){if("visible"==a||"visible"==b)return[0,1,function(c){return c<=0?a:c>=1?b:"visible"}]}a.addPropertiesHandler(String,c,["visibility"])}(b),function(a,b){function c(a){a=a.trim(),f.fillStyle="#000",f.fillStyle=a;var b=f.fillStyle;if(f.fillStyle="#fff",f.fillStyle=a,b==f.fillStyle){f.fillRect(0,0,1,1);var c=f.getImageData(0,0,1,1).data;f.clearRect(0,0,1,1);var d=c[3]/255;return[c[0]*d,c[1]*d,c[2]*d,d]}}function d(b,c){return[b,c,function(b){function c(a){return Math.max(0,Math.min(255,a))}if(b[3])for(var d=0;d<3;d++)b[d]=Math.round(c(b[d]/b[3]));return b[3]=a.numberToString(a.clamp(0,1,b[3])),"rgba("+b.join(",")+")"}]}var e=document.createElementNS("http://www.w3.org/1999/xhtml","canvas");e.width=e.height=1;var f=e.getContext("2d");a.addPropertiesHandler(c,d,["background-color","border-bottom-color","border-left-color","border-right-color","border-top-color","color","fill","flood-color","lighting-color","outline-color","stop-color","stroke","text-decoration-color"]),a.consumeColor=a.consumeParenthesised.bind(null,c),a.mergeColors=d}(b),function(a,b){function c(a){function b(){var b=h.exec(a);g=b?b[0]:void 0}function c(){var a=Number(g);return b(),a}function d(){if("("!==g)return c();b();var a=f();return")"!==g?NaN:(b(),a)}function e(){for(var a=d();"*"===g||"/"===g;){var c=g;b();var e=d();"*"===c?a*=e:a/=e}return a}function f(){for(var a=e();"+"===g||"-"===g;){var c=g;b();var d=e();"+"===c?a+=d:a-=d}return a}var g,h=/([\+\-\w\.]+|[\(\)\*\/])/g;return b(),f()}function d(a,b){if("0"==(b=b.trim().toLowerCase())&&"px".search(a)>=0)return{px:0};if(/^[^(]*$|^calc/.test(b)){b=b.replace(/calc\(/g,"(");var d={};b=b.replace(a,function(a){return d[a]=null,"U"+a});for(var e="U("+a.source+")",f=b.replace(/[-+]?(\d*\.)?\d+([Ee][-+]?\d+)?/g,"N").replace(new RegExp("N"+e,"g"),"D").replace(/\s[+-]\s/g,"O").replace(/\s/g,""),g=[/N\*(D)/g,/(N|D)[*\/]N/g,/(N|D)O\1/g,/\((N|D)\)/g],h=0;h<g.length;)g[h].test(f)?(f=f.replace(g[h],"$1"),h=0):h++;if("D"==f){for(var i in d){var j=c(b.replace(new RegExp("U"+i,"g"),"").replace(new RegExp(e,"g"),"*0"));if(!isFinite(j))return;d[i]=j}return d}}}function e(a,b){return f(a,b,!0)}function f(b,c,d){var e,f=[];for(e in b)f.push(e);for(e in c)f.indexOf(e)<0&&f.push(e);return b=f.map(function(a){return b[a]||0}),c=f.map(function(a){return c[a]||0}),[b,c,function(b){var c=b.map(function(c,e){return 1==b.length&&d&&(c=Math.max(c,0)),a.numberToString(c)+f[e]}).join(" + ");return b.length>1?"calc("+c+")":c}]}var g="px|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc",h=d.bind(null,new RegExp(g,"g")),i=d.bind(null,new RegExp(g+"|%","g")),j=d.bind(null,/deg|rad|grad|turn/g);a.parseLength=h,a.parseLengthOrPercent=i,a.consumeLengthOrPercent=a.consumeParenthesised.bind(null,i),a.parseAngle=j,a.mergeDimensions=f;var k=a.consumeParenthesised.bind(null,h),l=a.consumeRepeated.bind(void 0,k,/^/),m=a.consumeRepeated.bind(void 0,l,/^,/);a.consumeSizePairList=m;var n=function(a){var b=m(a);if(b&&""==b[1])return b[0]},o=a.mergeNestedRepeated.bind(void 0,e," "),p=a.mergeNestedRepeated.bind(void 0,o,",");a.mergeNonNegativeSizePair=o,a.addPropertiesHandler(n,p,["background-size"]),a.addPropertiesHandler(i,e,["border-bottom-width","border-image-width","border-left-width","border-right-width","border-top-width","flex-basis","font-size","height","line-height","max-height","max-width","outline-width","width"]),a.addPropertiesHandler(i,f,["border-bottom-left-radius","border-bottom-right-radius","border-top-left-radius","border-top-right-radius","bottom","left","letter-spacing","margin-bottom","margin-left","margin-right","margin-top","min-height","min-width","outline-offset","padding-bottom","padding-left","padding-right","padding-top","perspective","right","shape-margin","stroke-dashoffset","text-indent","top","vertical-align","word-spacing"])}(b),function(a,b){function c(b){return a.consumeLengthOrPercent(b)||a.consumeToken(/^auto/,b)}function d(b){var d=a.consumeList([a.ignore(a.consumeToken.bind(null,/^rect/)),a.ignore(a.consumeToken.bind(null,/^\(/)),a.consumeRepeated.bind(null,c,/^,/),a.ignore(a.consumeToken.bind(null,/^\)/))],b);if(d&&4==d[0].length)return d[0]}function e(b,c){return"auto"==b||"auto"==c?[!0,!1,function(d){var e=d?b:c;if("auto"==e)return"auto";var f=a.mergeDimensions(e,e);return f[2](f[0])}]:a.mergeDimensions(b,c)}function f(a){return"rect("+a+")"}var g=a.mergeWrappedNestedRepeated.bind(null,f,e,", ");a.parseBox=d,a.mergeBoxes=g,a.addPropertiesHandler(d,g,["clip"])}(b),function(a,b){function c(a){return function(b){var c=0;return a.map(function(a){return a===k?b[c++]:a})}}function d(a){return a}function e(b){if("none"==(b=b.toLowerCase().trim()))return[];for(var c,d=/\s*(\w+)\(([^)]*)\)/g,e=[],f=0;c=d.exec(b);){if(c.index!=f)return;f=c.index+c[0].length;var g=c[1],h=n[g];if(!h)return;var i=c[2].split(","),j=h[0];if(j.length<i.length)return;for(var k=[],o=0;o<j.length;o++){var p,q=i[o],r=j[o];if(void 0===(p=q?{A:function(b){return"0"==b.trim()?m:a.parseAngle(b)},N:a.parseNumber,T:a.parseLengthOrPercent,L:a.parseLength}[r.toUpperCase()](q):{a:m,n:k[0],t:l}[r]))return;k.push(p)}if(e.push({t:g,d:k}),d.lastIndex==b.length)return e}}function f(a){return a.toFixed(6).replace(".000000","")}function g(b,c){if(b.decompositionPair!==c){b.decompositionPair=c;var d=a.makeMatrixDecomposition(b)}if(c.decompositionPair!==b){c.decompositionPair=b;var e=a.makeMatrixDecomposition(c)}return null==d[0]||null==e[0]?[[!1],[!0],function(a){return a?c[0].d:b[0].d}]:(d[0].push(0),e[0].push(1),[d,e,function(b){var c=a.quat(d[0][3],e[0][3],b[5]);return a.composeMatrix(b[0],b[1],b[2],c,b[4]).map(f).join(",")}])}function h(a){return a.replace(/[xy]/,"")}function i(a){return a.replace(/(x|y|z|3d)?$/,"3d")}function j(b,c){var d=a.makeMatrixDecomposition&&!0,e=!1;if(!b.length||!c.length){b.length||(e=!0,b=c,c=[]);for(var f=0;f<b.length;f++){var j=b[f].t,k=b[f].d,l="scale"==j.substr(0,5)?1:0;c.push({t:j,d:k.map(function(a){if("number"==typeof a)return l;var b={};for(var c in a)b[c]=l;return b})})}}var m=function(a,b){return"perspective"==a&&"perspective"==b||("matrix"==a||"matrix3d"==a)&&("matrix"==b||"matrix3d"==b)},o=[],p=[],q=[];if(b.length!=c.length){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]]}else for(var f=0;f<b.length;f++){var j,s=b[f].t,t=c[f].t,u=b[f].d,v=c[f].d,w=n[s],x=n[t];if(m(s,t)){if(!d)return;var r=g([b[f]],[c[f]]);o.push(r[0]),p.push(r[1]),q.push(["matrix",[r[2]]])}else{if(s==t)j=s;else if(w[2]&&x[2]&&h(s)==h(t))j=h(s),u=w[2](u),v=x[2](v);else{if(!w[1]||!x[1]||i(s)!=i(t)){if(!d)return;var r=g(b,c);o=[r[0]],p=[r[1]],q=[["matrix",[r[2]]]];break}j=i(s),u=w[1](u),v=x[1](v)}for(var y=[],z=[],A=[],B=0;B<u.length;B++){var C="number"==typeof u[B]?a.mergeNumbers:a.mergeDimensions,r=C(u[B],v[B]);y[B]=r[0],z[B]=r[1],A.push(r[2])}o.push(y),p.push(z),q.push([j,A])}}if(e){var D=o;o=p,p=D}return[o,p,function(a){return a.map(function(a,b){var c=a.map(function(a,c){return q[b][1][c](a)}).join(",");return"matrix"==q[b][0]&&16==c.split(",").length&&(q[b][0]="matrix3d"),q[b][0]+"("+c+")"}).join(" ")}]}var k=null,l={px:0},m={deg:0},n={matrix:["NNNNNN",[k,k,0,0,k,k,0,0,0,0,1,0,k,k,0,1],d],matrix3d:["NNNNNNNNNNNNNNNN",d],rotate:["A"],rotatex:["A"],rotatey:["A"],rotatez:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",c([k,k,1]),d],scalex:["N",c([k,1,1]),c([k,1])],scaley:["N",c([1,k,1]),c([1,k])],scalez:["N",c([1,1,k])],scale3d:["NNN",d],skew:["Aa",null,d],skewx:["A",null,c([k,m])],skewy:["A",null,c([m,k])],translate:["Tt",c([k,k,l]),d],translatex:["T",c([k,l,l]),c([k,l])],translatey:["T",c([l,k,l]),c([l,k])],translatez:["L",c([l,l,k])],translate3d:["TTL",d]};a.addPropertiesHandler(e,j,["transform"]),a.transformToSvgMatrix=function(b){var c=a.transformListToMatrix(e(b));return"matrix("+f(c[0])+" "+f(c[1])+" "+f(c[4])+" "+f(c[5])+" "+f(c[12])+" "+f(c[13])+")"}}(b),function(a,b){function c(a,b){b.concat([a]).forEach(function(b){b in document.documentElement.style&&(d[a]=b),e[b]=a})}var d={},e={};c("transform",["webkitTransform","msTransform"]),c("transformOrigin",["webkitTransformOrigin"]),c("perspective",["webkitPerspective"]),c("perspectiveOrigin",["webkitPerspectiveOrigin"]),a.propertyName=function(a){return d[a]||a},a.unprefixedPropertyName=function(a){return e[a]||a}}(b)}(),function(){if(void 0===document.createElement("div").animate([]).oncancel){var a;if(window.performance&&performance.now)var a=function(){return performance.now()};else var a=function(){return Date.now()};var b=function(a,b,c){this.target=a,this.currentTime=b,this.timelineTime=c,this.type="cancel",this.bubbles=!1,this.cancelable=!1,this.currentTarget=a,this.defaultPrevented=!1,this.eventPhase=Event.AT_TARGET,this.timeStamp=Date.now()},c=window.Element.prototype.animate;window.Element.prototype.animate=function(d,e){var f=c.call(this,d,e);f._cancelHandlers=[],f.oncancel=null;var g=f.cancel;f.cancel=function(){g.call(this);var c=new b(this,null,a()),d=this._cancelHandlers.concat(this.oncancel?[this.oncancel]:[]);setTimeout(function(){d.forEach(function(a){a.call(c.target,c)})},0)};var h=f.addEventListener;f.addEventListener=function(a,b){"function"==typeof b&&"cancel"==a?this._cancelHandlers.push(b):h.call(this,a,b)};var i=f.removeEventListener;return f.removeEventListener=function(a,b){if("cancel"==a){var c=this._cancelHandlers.indexOf(b);c>=0&&this._cancelHandlers.splice(c,1)}else i.call(this,a,b)},f}}}(),function(a){var b=document.documentElement,c=null,d=!1;try{var e=getComputedStyle(b).getPropertyValue("opacity"),f="0"==e?"1":"0";c=b.animate({opacity:[f,f]},{duration:1}),c.currentTime=0,d=getComputedStyle(b).getPropertyValue("opacity")==f}catch(a){}finally{c&&c.cancel()}if(!d){var g=window.Element.prototype.animate;window.Element.prototype.animate=function(b,c){return window.Symbol&&Symbol.iterator&&Array.prototype.from&&b[Symbol.iterator]&&(b=Array.from(b)),Array.isArray(b)||null===b||(b=a.convertToArrayForm(b)),g.call(this,b,c)}}}(a),function(a,b,c){function d(a){var c=b.timeline;c.currentTime=a,c._discardAnimations(),0==c._animations.length?f=!1:requestAnimationFrame(d)}var e=window.requestAnimationFrame;window.requestAnimationFrame=function(a){return e(function(c){b.timeline._updateAnimationsPromises(),a(c),b.timeline._updateAnimationsPromises()})},b.AnimationTimeline=function(){this._animations=[],this.currentTime=void 0},b.AnimationTimeline.prototype={getAnimations:function(){return this._discardAnimations(),this._animations.slice()},_updateAnimationsPromises:function(){b.animationsWithPromises=b.animationsWithPromises.filter(function(a){return a._updatePromises()})},_discardAnimations:function(){this._updateAnimationsPromises(),this._animations=this._animations.filter(function(a){return"finished"!=a.playState&&"idle"!=a.playState})},_play:function(a){var c=new b.Animation(a,this);return this._animations.push(c),b.restartWebAnimationsNextTick(),c._updatePromises(),c._animation.play(),c._updatePromises(),c},play:function(a){return a&&a.remove(),this._play(a)}};var f=!1;b.restartWebAnimationsNextTick=function(){f||(f=!0,requestAnimationFrame(d))};var g=new b.AnimationTimeline;b.timeline=g;try{Object.defineProperty(window.document,"timeline",{configurable:!0,get:function(){return g}})}catch(a){}try{window.document.timeline=g}catch(a){}}(0,c),function(a,b,c){b.animationsWithPromises=[],b.Animation=function(b,c){if(this.id="",b&&b._id&&(this.id=b._id),this.effect=b,b&&(b._animation=this),!c)throw new Error("Animation with null timeline is not supported");this._timeline=c,this._sequenceNumber=a.sequenceNumber++,this._holdTime=0,this._paused=!1,this._isGroup=!1,this._animation=null,this._childAnimations=[],this._callback=null,this._oldPlayState="idle",this._rebuildUnderlyingAnimation(),this._animation.cancel(),this._updatePromises()},b.Animation.prototype={_updatePromises:function(){var a=this._oldPlayState,b=this.playState;return this._readyPromise&&b!==a&&("idle"==b?(this._rejectReadyPromise(),this._readyPromise=void 0):"pending"==a?this._resolveReadyPromise():"pending"==b&&(this._readyPromise=void 0)),this._finishedPromise&&b!==a&&("idle"==b?(this._rejectFinishedPromise(),this._finishedPromise=void 0):"finished"==b?this._resolveFinishedPromise():"finished"==a&&(this._finishedPromise=void 0)),this._oldPlayState=this.playState,this._readyPromise||this._finishedPromise},_rebuildUnderlyingAnimation:function(){this._updatePromises();var a,c,d,e,f=!!this._animation;f&&(a=this.playbackRate,c=this._paused,d=this.startTime,e=this.currentTime,this._animation.cancel(),this._animation._wrapper=null,this._animation=null),(!this.effect||this.effect instanceof window.KeyframeEffect)&&(this._animation=b.newUnderlyingAnimationForKeyframeEffect(this.effect),b.bindAnimationForKeyframeEffect(this)),(this.effect instanceof window.SequenceEffect||this.effect instanceof window.GroupEffect)&&(this._animation=b.newUnderlyingAnimationForGroup(this.effect),b.bindAnimationForGroup(this)),this.effect&&this.effect._onsample&&b.bindAnimationForCustomEffect(this),f&&(1!=a&&(this.playbackRate=a),null!==d?this.startTime=d:null!==e?this.currentTime=e:null!==this._holdTime&&(this.currentTime=this._holdTime),c&&this.pause()),this._updatePromises()},_updateChildren:function(){if(this.effect&&"idle"!=this.playState){var a=this.effect._timing.delay;this._childAnimations.forEach(function(c){this._arrangeChildren(c,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c.effect))}.bind(this))}},_setExternalAnimation:function(a){if(this.effect&&this._isGroup)for(var b=0;b<this.effect.children.length;b++)this.effect.children[b]._animation=a,this._childAnimations[b]._setExternalAnimation(a)},_constructChildAnimations:function(){if(this.effect&&this._isGroup){var a=this.effect._timing.delay;this._removeChildAnimations(),this.effect.children.forEach(function(c){var d=b.timeline._play(c);this._childAnimations.push(d),d.playbackRate=this.playbackRate,this._paused&&d.pause(),c._animation=this.effect._animation,this._arrangeChildren(d,a),this.effect instanceof window.SequenceEffect&&(a+=b.groupChildDuration(c))}.bind(this))}},_arrangeChildren:function(a,b){null===this.startTime?a.currentTime=this.currentTime-b/this.playbackRate:a.startTime!==this.startTime+b/this.playbackRate&&(a.startTime=this.startTime+b/this.playbackRate)},get timeline(){return this._timeline},get playState(){return this._animation?this._animation.playState:"idle"},get finished(){return window.Promise?(this._finishedPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._finishedPromise=new Promise(function(a,b){this._resolveFinishedPromise=function(){a(this)},this._rejectFinishedPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"finished"==this.playState&&this._resolveFinishedPromise()),this._finishedPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get ready(){return window.Promise?(this._readyPromise||(-1==b.animationsWithPromises.indexOf(this)&&b.animationsWithPromises.push(this),this._readyPromise=new Promise(function(a,b){this._resolveReadyPromise=function(){a(this)},this._rejectReadyPromise=function(){b({type:DOMException.ABORT_ERR,name:"AbortError"})}}.bind(this)),"pending"!==this.playState&&this._resolveReadyPromise()),this._readyPromise):(console.warn("Animation Promises require JavaScript Promise constructor"),null)},get onfinish(){return this._animation.onfinish},set onfinish(a){this._animation.onfinish="function"==typeof a?function(b){b.target=this,a.call(this,b)}.bind(this):a},get oncancel(){return this._animation.oncancel},set oncancel(a){this._animation.oncancel="function"==typeof a?function(b){b.target=this,a.call(this,b)}.bind(this):a},get currentTime(){this._updatePromises();var a=this._animation.currentTime;return this._updatePromises(),a},set currentTime(a){this._updatePromises(),this._animation.currentTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.currentTime=a-c}),this._updatePromises()},get startTime(){return this._animation.startTime},set startTime(a){this._updatePromises(),this._animation.startTime=isFinite(a)?a:Math.sign(a)*Number.MAX_VALUE,this._register(),this._forEachChild(function(b,c){b.startTime=a+c}),this._updatePromises()},get playbackRate(){return this._animation.playbackRate},set playbackRate(a){this._updatePromises();var b=this.currentTime;this._animation.playbackRate=a,this._forEachChild(function(b){b.playbackRate=a}),null!==b&&(this.currentTime=b),this._updatePromises()},play:function(){this._updatePromises(),this._paused=!1,this._animation.play(),-1==this._timeline._animations.indexOf(this)&&this._timeline._animations.push(this),this._register(),b.awaitStartTime(this),this._forEachChild(function(a){var b=a.currentTime;a.play(),a.currentTime=b}),this._updatePromises()},pause:function(){this._updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),this._animation.pause(),this._register(),this._forEachChild(function(a){a.pause()}),this._paused=!0,this._updatePromises()},finish:function(){this._updatePromises(),this._animation.finish(),this._register(),this._updatePromises()},cancel:function(){this._updatePromises(),this._animation.cancel(),this._register(),this._removeChildAnimations(),this._updatePromises()},reverse:function(){this._updatePromises();var a=this.currentTime;this._animation.reverse(),this._forEachChild(function(a){a.reverse()}),null!==a&&(this.currentTime=a),this._updatePromises()},addEventListener:function(a,b){var c=b;"function"==typeof b&&(c=function(a){a.target=this,b.call(this,a)}.bind(this),b._wrapper=c),this._animation.addEventListener(a,c)},removeEventListener:function(a,b){this._animation.removeEventListener(a,b&&b._wrapper||b)},_removeChildAnimations:function(){for(;this._childAnimations.length;)this._childAnimations.pop().cancel()},_forEachChild:function(b){var c=0;if(this.effect.children&&this._childAnimations.length<this.effect.children.length&&this._constructChildAnimations(),this._childAnimations.forEach(function(a){b.call(this,a,c),this.effect instanceof window.SequenceEffect&&(c+=a.effect.activeDuration)}.bind(this)),"pending"!=this.playState){var d=this.effect._timing,e=this.currentTime;null!==e&&(e=a.calculateIterationProgress(a.calculateActiveDuration(d),e,d)),(null==e||isNaN(e))&&this._removeChildAnimations()}}},window.Animation=b.Animation}(a,c),function(a,b,c){function d(b){this._frames=a.normalizeKeyframes(b)}function e(){for(var a=!1;i.length;)i.shift()._updateChildren(),a=!0;return a}var f=function(a){if(a._animation=void 0,a instanceof window.SequenceEffect||a instanceof window.GroupEffect)for(var b=0;b<a.children.length;b++)f(a.children[b])};b.removeMulti=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];d._parent?(-1==b.indexOf(d._parent)&&b.push(d._parent),d._parent.children.splice(d._parent.children.indexOf(d),1),d._parent=null,f(d)):d._animation&&d._animation.effect==d&&(d._animation.cancel(),d._animation.effect=new KeyframeEffect(null,[]),d._animation._callback&&(d._animation._callback._animation=null),d._animation._rebuildUnderlyingAnimation(),f(d))}for(c=0;c<b.length;c++)b[c]._rebuild()},b.KeyframeEffect=function(b,c,e,f){return this.target=b,this._parent=null,e=a.numericTimingToObject(e),this._timingInput=a.cloneTimingInput(e),this._timing=a.normalizeTimingInput(e),this.timing=a.makeTiming(e,!1,this),this.timing._effect=this,"function"==typeof c?(a.deprecated("Custom KeyframeEffect","2015-06-22","Use KeyframeEffect.onsample instead."),this._normalizedKeyframes=c):this._normalizedKeyframes=new d(c),this._keyframes=c,this.activeDuration=a.calculateActiveDuration(this._timing),this._id=f,this},b.KeyframeEffect.prototype={getFrames:function(){return"function"==typeof this._normalizedKeyframes?this._normalizedKeyframes:this._normalizedKeyframes._frames},set onsample(a){if("function"==typeof this.getFrames())throw new Error("Setting onsample on custom effect KeyframeEffect is not supported.");this._onsample=a,this._animation&&this._animation._rebuildUnderlyingAnimation()},get parent(){return this._parent},clone:function(){if("function"==typeof this.getFrames())throw new Error("Cloning custom effects is not supported.");var b=new KeyframeEffect(this.target,[],a.cloneTimingInput(this._timingInput),this._id);return b._normalizedKeyframes=this._normalizedKeyframes,b._keyframes=this._keyframes,b},remove:function(){b.removeMulti([this])}};var g=Element.prototype.animate;Element.prototype.animate=function(a,c){var d="";return c&&c.id&&(d=c.id),b.timeline._play(new b.KeyframeEffect(this,a,c,d))};var h=document.createElementNS("http://www.w3.org/1999/xhtml","div");b.newUnderlyingAnimationForKeyframeEffect=function(a){if(a){var b=a.target||h,c=a._keyframes;"function"==typeof c&&(c=[]);var d=a._timingInput;d.id=a._id}else var b=h,c=[],d=0;return g.apply(b,[c,d])},b.bindAnimationForKeyframeEffect=function(a){a.effect&&"function"==typeof a.effect._normalizedKeyframes&&b.bindAnimationForCustomEffect(a)};var i=[];b.awaitStartTime=function(a){null===a.startTime&&a._isGroup&&(0==i.length&&requestAnimationFrame(e),i.push(a))};var j=window.getComputedStyle;Object.defineProperty(window,"getComputedStyle",{configurable:!0,enumerable:!0,value:function(){b.timeline._updateAnimationsPromises();var a=j.apply(this,arguments);return e()&&(a=j.apply(this,arguments)),b.timeline._updateAnimationsPromises(),a}}),window.KeyframeEffect=b.KeyframeEffect,window.Element.prototype.getAnimations=function(){return document.timeline.getAnimations().filter(function(a){return null!==a.effect&&a.effect.target==this}.bind(this))}}(a,c),function(a,b,c){function d(a){a._registered||(a._registered=!0,g.push(a),h||(h=!0,requestAnimationFrame(e)))}function e(a){var b=g;g=[],b.sort(function(a,b){return a._sequenceNumber-b._sequenceNumber}),b=b.filter(function(a){a();var b=a._animation?a._animation.playState:"idle";return"running"!=b&&"pending"!=b&&(a._registered=!1),a._registered}),g.push.apply(g,b),g.length?(h=!0,requestAnimationFrame(e)):h=!1}var f=(document.createElementNS("http://www.w3.org/1999/xhtml","div"),0);b.bindAnimationForCustomEffect=function(b){var c,e=b.effect.target,g="function"==typeof b.effect.getFrames();c=g?b.effect.getFrames():b.effect._onsample;var h=b.effect.timing,i=null;h=a.normalizeTimingInput(h);var j=function(){var d=j._animation?j._animation.currentTime:null;null!==d&&(d=a.calculateIterationProgress(a.calculateActiveDuration(h),d,h),isNaN(d)&&(d=null)),d!==i&&(g?c(d,e,b.effect):c(d,b.effect,b.effect._animation)),i=d};j._animation=b,j._registered=!1,j._sequenceNumber=f++,b._callback=j,d(j)};var g=[],h=!1;b.Animation.prototype._register=function(){this._callback&&d(this._callback)}}(a,c),function(a,b,c){function d(a){return a._timing.delay+a.activeDuration+a._timing.endDelay}function e(b,c,d){this._id=d,this._parent=null,this.children=b||[],this._reparent(this.children),c=a.numericTimingToObject(c),this._timingInput=a.cloneTimingInput(c),this._timing=a.normalizeTimingInput(c,!0),this.timing=a.makeTiming(c,!0,this),this.timing._effect=this,"auto"===this._timing.duration&&(this._timing.duration=this.activeDuration)}window.SequenceEffect=function(){e.apply(this,arguments)},window.GroupEffect=function(){e.apply(this,arguments)},e.prototype={_isAncestor:function(a){for(var b=this;null!==b;){if(b==a)return!0;b=b._parent}return!1},_rebuild:function(){for(var a=this;a;)"auto"===a.timing.duration&&(a._timing.duration=a.activeDuration),a=a._parent;this._animation&&this._animation._rebuildUnderlyingAnimation()},_reparent:function(a){b.removeMulti(a);for(var c=0;c<a.length;c++)a[c]._parent=this},_putChild:function(a,b){for(var c=b?"Cannot append an ancestor or self":"Cannot prepend an ancestor or self",d=0;d<a.length;d++)if(this._isAncestor(a[d]))throw{type:DOMException.HIERARCHY_REQUEST_ERR,name:"HierarchyRequestError",message:c};for(var d=0;d<a.length;d++)b?this.children.push(a[d]):this.children.unshift(a[d]);this._reparent(a),this._rebuild()},append:function(){this._putChild(arguments,!0)},prepend:function(){this._putChild(arguments,!1)},get parent(){return this._parent},get firstChild(){return this.children.length?this.children[0]:null},get lastChild(){return this.children.length?this.children[this.children.length-1]:null},clone:function(){for(var b=a.cloneTimingInput(this._timingInput),c=[],d=0;d<this.children.length;d++)c.push(this.children[d].clone());return this instanceof GroupEffect?new GroupEffect(c,b):new SequenceEffect(c,b)},remove:function(){b.removeMulti([this])}},window.SequenceEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.SequenceEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a+=d(b)}),Math.max(a,0)}}),window.GroupEffect.prototype=Object.create(e.prototype),Object.defineProperty(window.GroupEffect.prototype,"activeDuration",{get:function(){var a=0;return this.children.forEach(function(b){a=Math.max(a,d(b))}),a}}),b.newUnderlyingAnimationForGroup=function(c){var d,e=null,f=function(b){var c=d._wrapper;if(c&&"pending"!=c.playState&&c.effect)return null==b?void c._removeChildAnimations():0==b&&c.playbackRate<0&&(e||(e=a.normalizeTimingInput(c.effect.timing)),b=a.calculateIterationProgress(a.calculateActiveDuration(e),-1,e),isNaN(b)||null==b)?(c._forEachChild(function(a){a.currentTime=-1}),void c._removeChildAnimations()):void 0},g=new KeyframeEffect(null,[],c._timing,c._id);return g.onsample=f,d=b.timeline._play(g)},b.bindAnimationForGroup=function(a){a._animation._wrapper=a,a._isGroup=!0,b.awaitStartTime(a),a._constructChildAnimations(),a._setExternalAnimation(a)},b.groupChildDuration=d}(a,c)}();(()=>{var vve=Object.create;var BM=Object.defineProperty,xve=Object.defineProperties,bve=Object.getOwnPropertyDescriptor,wve=Object.getOwnPropertyDescriptors,Sve=Object.getOwnPropertyNames,hdt=Object.getOwnPropertySymbols,Mve=Object.getPrototypeOf,pdt=Object.prototype.hasOwnProperty,Eve=Object.prototype.propertyIsEnumerable;var TI=Math.pow,fdt=(e,t,r)=>t in e?BM(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Kl=(e,t)=>{for(var r in t||(t={}))pdt.call(t,r)&&fdt(e,r,t[r]);if(hdt)for(var r of hdt(t))Eve.call(t,r)&&fdt(e,r,t[r]);return e},Mx=(e,t)=>xve(e,wve(t));var Ex=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,r)=>(typeof require!="undefined"?require:t)[r]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')});var M=(e,t)=>()=>(e&&(t=e(e=0)),t);var H=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ks=(e,t)=>{for(var r in t)BM(e,r,{get:t[r],enumerable:!0})},ddt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Sve(t))!pdt.call(e,i)&&i!==r&&BM(e,i,{get:()=>t[i],enumerable:!(n=bve(t,i))||n.enumerable});return e};var Ee=(e,t,r)=>(r=e!=null?vve(Mve(e)):{},ddt(t||!e||!e.__esModule?BM(r,"default",{value:e,enumerable:!0}):r,e)),Ut=e=>ddt(BM({},"__esModule",{value:!0}),e);var Ri=(e,t,r)=>new Promise((n,i)=>{var o=l=>{try{s(r.next(l))}catch(c){i(c)}},a=l=>{try{s(r.throw(l))}catch(c){i(c)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,a);s((r=r.apply(e,t)).next())});var Hdt=H((p_r,PI)=>{var mdt,gdt,_dt,ydt,vdt,xdt,bdt,wdt,Sdt,Mdt,Edt,Tdt,Cdt,CI,hG,Adt,Pdt,Idt,Tx,Ldt,kdt,Rdt,Ndt,Ddt,Odt,zdt,Fdt,Bdt,AI;(function(e){var t=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){e(r(t,r(n)))}):typeof PI=="object"&&typeof PI.exports=="object"?e(r(t,r(PI.exports))):e(r(t));function r(n,i){return n!==t&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(o,a){return n[o]=i?i(o,a):a}}})(function(e){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(n[o]=i[o])};mdt=function(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");t(n,i);function o(){this.constructor=n}n.prototype=i===null?Object.create(i):(o.prototype=i.prototype,new o)},gdt=Object.assign||function(n){for(var i,o=1,a=arguments.length;o<a;o++){i=arguments[o];for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])}return n},_dt=function(n,i){var o={};for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&i.indexOf(a)<0&&(o[a]=n[a]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,a=Object.getOwnPropertySymbols(n);s<a.length;s++)i.indexOf(a[s])<0&&Object.prototype.propertyIsEnumerable.call(n,a[s])&&(o[a[s]]=n[a[s]]);return o},ydt=function(n,i,o,a){var s=arguments.length,l=s<3?i:a===null?a=Object.getOwnPropertyDescriptor(i,o):a,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,i,o,a);else for(var u=n.length-1;u>=0;u--)(c=n[u])&&(l=(s<3?c(l):s>3?c(i,o,l):c(i,o))||l);return s>3&&l&&Object.defineProperty(i,o,l),l},vdt=function(n,i){return function(o,a){i(o,a,n)}},xdt=function(n,i,o,a,s,l){function c(S){if(S!==void 0&&typeof S!="function")throw new TypeError("Function expected");return S}for(var u=a.kind,h=u==="getter"?"get":u==="setter"?"set":"value",f=!i&&n?a.static?n:n.prototype:null,p=i||(f?Object.getOwnPropertyDescriptor(f,a.name):{}),d,g=!1,_=o.length-1;_>=0;_--){var y={};for(var x in a)y[x]=x==="access"?{}:a[x];for(var x in a.access)y.access[x]=a.access[x];y.addInitializer=function(S){if(g)throw new TypeError("Cannot add initializers after decoration has completed");l.push(c(S||null))};var b=(0,o[_])(u==="accessor"?{get:p.get,set:p.set}:p[h],y);if(u==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=c(b.get))&&(p.get=d),(d=c(b.set))&&(p.set=d),(d=c(b.init))&&s.push(d)}else(d=c(b))&&(u==="field"?s.push(d):p[h]=d)}f&&Object.defineProperty(f,a.name,p),g=!0},bdt=function(n,i,o){for(var a=arguments.length>2,s=0;s<i.length;s++)o=a?i[s].call(n,o):i[s].call(n);return a?o:void 0},wdt=function(n){return typeof n=="symbol"?n:"".concat(n)},Sdt=function(n,i,o){return typeof i=="symbol"&&(i=i.description?"[".concat(i.description,"]"):""),Object.defineProperty(n,"name",{configurable:!0,value:o?"".concat(o," ",i):i})},Mdt=function(n,i){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(n,i)},Edt=function(n,i,o,a){function s(l){return l instanceof o?l:new o(function(c){c(l)})}return new(o||(o=Promise))(function(l,c){function u(p){try{f(a.next(p))}catch(d){c(d)}}function h(p){try{f(a.throw(p))}catch(d){c(d)}}function f(p){p.done?l(p.value):s(p.value).then(u,h)}f((a=a.apply(n,i||[])).next())})},Tdt=function(n,i){var o={label:0,sent:function(){if(l[0]&1)throw l[1];return l[1]},trys:[],ops:[]},a,s,l,c;return c={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(c[Symbol.iterator]=function(){return this}),c;function u(f){return function(p){return h([f,p])}}function h(f){if(a)throw new TypeError("Generator is already executing.");for(;c&&(c=0,f[0]&&(o=0)),o;)try{if(a=1,s&&(l=f[0]&2?s.return:f[0]?s.throw||((l=s.return)&&l.call(s),0):s.next)&&!(l=l.call(s,f[1])).done)return l;switch(s=0,l&&(f=[f[0]&2,l.value]),f[0]){case 0:case 1:l=f;break;case 4:return o.label++,{value:f[1],done:!1};case 5:o.label++,s=f[1],f=[0];continue;case 7:f=o.ops.pop(),o.trys.pop();continue;default:if(l=o.trys,!(l=l.length>0&&l[l.length-1])&&(f[0]===6||f[0]===2)){o=0;continue}if(f[0]===3&&(!l||f[1]>l[0]&&f[1]<l[3])){o.label=f[1];break}if(f[0]===6&&o.label<l[1]){o.label=l[1],l=f;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(f);break}l[2]&&o.ops.pop(),o.trys.pop();continue}f=i.call(n,o)}catch(p){f=[6,p],s=0}finally{a=l=0}if(f[0]&5)throw f[1];return{value:f[0]?f[1]:void 0,done:!0}}},Cdt=function(n,i){for(var o in n)o!=="default"&&!Object.prototype.hasOwnProperty.call(i,o)&&AI(i,n,o)},AI=Object.create?function(n,i,o,a){a===void 0&&(a=o);var s=Object.getOwnPropertyDescriptor(i,o);(!s||("get"in s?!i.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:function(){return i[o]}}),Object.defineProperty(n,a,s)}:function(n,i,o,a){a===void 0&&(a=o),n[a]=i[o]},CI=function(n){var i=typeof Symbol=="function"&&Symbol.iterator,o=i&&n[i],a=0;if(o)return o.call(n);if(n&&typeof n.length=="number")return{next:function(){return n&&a>=n.length&&(n=void 0),{value:n&&n[a++],done:!n}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},hG=function(n,i){var o=typeof Symbol=="function"&&n[Symbol.iterator];if(!o)return n;var a=o.call(n),s,l=[],c;try{for(;(i===void 0||i-- >0)&&!(s=a.next()).done;)l.push(s.value)}catch(u){c={error:u}}finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(c)throw c.error}}return l},Adt=function(){for(var n=[],i=0;i<arguments.length;i++)n=n.concat(hG(arguments[i]));return n},Pdt=function(){for(var n=0,i=0,o=arguments.length;i<o;i++)n+=arguments[i].length;for(var a=Array(n),s=0,i=0;i<o;i++)for(var l=arguments[i],c=0,u=l.length;c<u;c++,s++)a[s]=l[c];return a},Idt=function(n,i,o){if(o||arguments.length===2)for(var a=0,s=i.length,l;a<s;a++)(l||!(a in i))&&(l||(l=Array.prototype.slice.call(i,0,a)),l[a]=i[a]);return n.concat(l||Array.prototype.slice.call(i))},Tx=function(n){return this instanceof Tx?(this.v=n,this):new Tx(n)},Ldt=function(n,i,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a=o.apply(n,i||[]),s,l=[];return s={},c("next"),c("throw"),c("return"),s[Symbol.asyncIterator]=function(){return this},s;function c(g){a[g]&&(s[g]=function(_){return new Promise(function(y,x){l.push([g,_,y,x])>1||u(g,_)})})}function u(g,_){try{h(a[g](_))}catch(y){d(l[0][3],y)}}function h(g){g.value instanceof Tx?Promise.resolve(g.value.v).then(f,p):d(l[0][2],g)}function f(g){u("next",g)}function p(g){u("throw",g)}function d(g,_){g(_),l.shift(),l.length&&u(l[0][0],l[0][1])}},kdt=function(n){var i,o;return i={},a("next"),a("throw",function(s){throw s}),a("return"),i[Symbol.iterator]=function(){return this},i;function a(s,l){i[s]=n[s]?function(c){return(o=!o)?{value:Tx(n[s](c)),done:!1}:l?l(c):c}:l}},Rdt=function(n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i=n[Symbol.asyncIterator],o;return i?i.call(n):(n=typeof CI=="function"?CI(n):n[Symbol.iterator](),o={},a("next"),a("throw"),a("return"),o[Symbol.asyncIterator]=function(){return this},o);function a(l){o[l]=n[l]&&function(c){return new Promise(function(u,h){c=n[l](c),s(u,h,c.done,c.value)})}}function s(l,c,u,h){Promise.resolve(h).then(function(f){l({value:f,done:u})},c)}},Ndt=function(n,i){return Object.defineProperty?Object.defineProperty(n,"raw",{value:i}):n.raw=i,n};var r=Object.create?function(n,i){Object.defineProperty(n,"default",{enumerable:!0,value:i})}:function(n,i){n.default=i};Ddt=function(n){if(n&&n.__esModule)return n;var i={};if(n!=null)for(var o in n)o!=="default"&&Object.prototype.hasOwnProperty.call(n,o)&&AI(i,n,o);return r(i,n),i},Odt=function(n){return n&&n.__esModule?n:{default:n}},zdt=function(n,i,o,a){if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a getter");if(typeof i=="function"?n!==i||!a:!i.has(n))throw new TypeError("Cannot read private member from an object whose class did not declare it");return o==="m"?a:o==="a"?a.call(n):a?a.value:i.get(n)},Fdt=function(n,i,o,a,s){if(a==="m")throw new TypeError("Private method is not writable");if(a==="a"&&!s)throw new TypeError("Private accessor was defined without a setter");if(typeof i=="function"?n!==i||!s:!i.has(n))throw new TypeError("Cannot write private member to an object whose class did not declare it");return a==="a"?s.call(n,o):s?s.value=o:i.set(n,o),o},Bdt=function(n,i){if(i===null||typeof i!="object"&&typeof i!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof n=="function"?i===n:n.has(i)},e("__extends",mdt),e("__assign",gdt),e("__rest",_dt),e("__decorate",ydt),e("__param",vdt),e("__esDecorate",xdt),e("__runInitializers",bdt),e("__propKey",wdt),e("__setFunctionName",Sdt),e("__metadata",Mdt),e("__awaiter",Edt),e("__generator",Tdt),e("__exportStar",Cdt),e("__createBinding",AI),e("__values",CI),e("__read",hG),e("__spread",Adt),e("__spreadArrays",Pdt),e("__spreadArray",Idt),e("__await",Tx),e("__asyncGenerator",Ldt),e("__asyncDelegator",kdt),e("__asyncValues",Rdt),e("__makeTemplateObject",Ndt),e("__importStar",Ddt),e("__importDefault",Odt),e("__classPrivateFieldGet",zdt),e("__classPrivateFieldSet",Fdt),e("__classPrivateFieldIn",Bdt)})});var Oe=H((Rx,$M)=>{(function(){var e,t="4.17.21",r=200,n="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",i="Expected a function",o="Invalid `variable` option passed into `_.template`",a="__lodash_hash_undefined__",s=500,l="__lodash_placeholder__",c=1,u=2,h=4,f=1,p=2,d=1,g=2,_=4,y=8,x=16,b=32,S=64,C=128,P=256,k=512,O=30,D="...",B=800,I=16,L=1,R=2,F=3,z=1/0,U=9007199254740991,W=17976931348623157e292,Z=0/0,rt=4294967295,ot=rt-1,st=rt>>>1,St=[["ary",C],["bind",d],["bindKey",g],["curry",y],["curryRight",x],["flip",k],["partial",b],["partialRight",S],["rearg",P]],bt="[object Arguments]",Mt="[object Array]",lt="[object AsyncFunction]",Kt="[object Boolean]",_t="[object Date]",ct="[object DOMException]",X="[object Error]",et="[object Function]",dt="[object GeneratorFunction]",q="[object Map]",pt="[object Number]",ht="[object Null]",wt="[object Object]",kt="[object Promise]",ie="[object Proxy]",ee="[object RegExp]",Le="[object Set]",ar="[object String]",fr="[object Symbol]",tt="[object Undefined]",$="[object WeakMap]",It="[object WeakSet]",$t="[object ArrayBuffer]",he="[object DataView]",Tt="[object Float32Array]",be="[object Float64Array]",nt="[object Int8Array]",Ct="[object Int16Array]",Wt="[object Int32Array]",fe="[object Uint8Array]",at="[object Uint8ClampedArray]",se="[object Uint16Array]",Qt="[object Uint32Array]",Ce=/\b__p \+= '';/g,Pt=/\b(__p \+=) '' \+/g,Nt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ze=/&(?:amp|lt|gt|quot|#39);/g,yn=/[&<>"']/g,Wi=RegExp(ze.source),Ar=RegExp(yn.source),Pa=/<%-([\s\S]+?)%>/g,ho=/<%([\s\S]+?)%>/g,Ia=/<%=([\s\S]+?)%>/g,lx=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cm=/^\w*$/,J0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/[\\^$.*+?()[\]{}|]/g,cx=RegExp(cn.source),rp=/^\s+/,K=/\s/,gt=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Et=/\{\n\/\* \[wrapped with (.+)\] \*/,xt=/,? & /,Ft=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ve=/[()=,{}\[\]\/\s]/,Ue=/\\(\\)?/g,tr=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ke=/\w*$/,Xr=/^[-+]0x[0-9a-f]+$/i,_r=/^0b[01]+$/i,Pr=/^\[object .+?Constructor\]$/,jn=/^0o[0-7]+$/i,np=/^(?:0|[1-9]\d*)$/,um=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,mr=/($^)/,Fl=/['\n\r\u2028\u2029\\]/g,Xn="\\ud800-\\udfff",Bl="\\u0300-\\u036f",ux="\\ufe20-\\ufe2f",Hl="\\u20d0-\\u20ff",Vl=Bl+ux+Hl,Yi="\\u2700-\\u27bf",hm="a-z\\xdf-\\xf6\\xf8-\\xff",qs="\\xac\\xb1\\xd7\\xf7",gpe="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",_pe="\\u2000-\\u206f",ype=" \\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",qht="A-Z\\xc0-\\xd6\\xd8-\\xde",Ght="\\ufe0e\\ufe0f",Wht=qs+gpe+_pe+ype,eq="['\u2019]",vpe="["+Xn+"]",Yht="["+Wht+"]",H6="["+Vl+"]",jht="\\d+",xpe="["+Yi+"]",Xht="["+hm+"]",$ht="[^"+Xn+Wht+jht+Yi+hm+qht+"]",rq="\\ud83c[\\udffb-\\udfff]",bpe="(?:"+H6+"|"+rq+")",Kht="[^"+Xn+"]",nq="(?:\\ud83c[\\udde6-\\uddff]){2}",iq="[\\ud800-\\udbff][\\udc00-\\udfff]",hx="["+qht+"]",Zht="\\u200d",Jht="(?:"+Xht+"|"+$ht+")",wpe="(?:"+hx+"|"+$ht+")",Qht="(?:"+eq+"(?:d|ll|m|re|s|t|ve))?",tft="(?:"+eq+"(?:D|LL|M|RE|S|T|VE))?",eft=bpe+"?",rft="["+Ght+"]?",Spe="(?:"+Zht+"(?:"+[Kht,nq,iq].join("|")+")"+rft+eft+")*",Mpe="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Epe="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nft=rft+eft+Spe,Tpe="(?:"+[xpe,nq,iq].join("|")+")"+nft,Cpe="(?:"+[Kht+H6+"?",H6,nq,iq,vpe].join("|")+")",Ape=RegExp(eq,"g"),Ppe=RegExp(H6,"g"),oq=RegExp(rq+"(?="+rq+")|"+Cpe+nft,"g"),Ipe=RegExp([hx+"?"+Xht+"+"+Qht+"(?="+[Yht,hx,"$"].join("|")+")",wpe+"+"+tft+"(?="+[Yht,hx+Jht,"$"].join("|")+")",hx+"?"+Jht+"+"+Qht,hx+"+"+tft,Epe,Mpe,jht,Tpe].join("|"),"g"),Lpe=RegExp("["+Zht+Xn+Vl+Ght+"]"),kpe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Rpe=["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"],Npe=-1,kn={};kn[Tt]=kn[be]=kn[nt]=kn[Ct]=kn[Wt]=kn[fe]=kn[at]=kn[se]=kn[Qt]=!0,kn[bt]=kn[Mt]=kn[$t]=kn[Kt]=kn[he]=kn[_t]=kn[X]=kn[et]=kn[q]=kn[pt]=kn[wt]=kn[ee]=kn[Le]=kn[ar]=kn[$]=!1;var Tn={};Tn[bt]=Tn[Mt]=Tn[$t]=Tn[he]=Tn[Kt]=Tn[_t]=Tn[Tt]=Tn[be]=Tn[nt]=Tn[Ct]=Tn[Wt]=Tn[q]=Tn[pt]=Tn[wt]=Tn[ee]=Tn[Le]=Tn[ar]=Tn[fr]=Tn[fe]=Tn[at]=Tn[se]=Tn[Qt]=!0,Tn[X]=Tn[et]=Tn[$]=!1;var Dpe={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ope={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},zpe={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},Fpe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Bpe=parseFloat,Hpe=parseInt,ift=typeof global=="object"&&global&&global.Object===Object&&global,Vpe=typeof self=="object"&&self&&self.Object===Object&&self,fo=ift||Vpe||Function("return this")(),aq=typeof Rx=="object"&&Rx&&!Rx.nodeType&&Rx,Q0=aq&&typeof $M=="object"&&$M&&!$M.nodeType&&$M,oft=Q0&&Q0.exports===aq,sq=oft&&ift.process,Ul=function(){try{var ut=Q0&&Q0.require&&Q0.require("util").types;return ut||sq&&sq.binding&&sq.binding("util")}catch(At){}}(),aft=Ul&&Ul.isArrayBuffer,sft=Ul&&Ul.isDate,lft=Ul&&Ul.isMap,cft=Ul&&Ul.isRegExp,uft=Ul&&Ul.isSet,hft=Ul&&Ul.isTypedArray;function Gs(ut,At,vt){switch(vt.length){case 0:return ut.call(At);case 1:return ut.call(At,vt[0]);case 2:return ut.call(At,vt[0],vt[1]);case 3:return ut.call(At,vt[0],vt[1],vt[2])}return ut.apply(At,vt)}function Upe(ut,At,vt,ge){for(var We=-1,$r=ut==null?0:ut.length;++We<$r;){var ji=ut[We];At(ge,ji,vt(ji),ut)}return ge}function ql(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge&&At(ut[vt],vt,ut)!==!1;);return ut}function qpe(ut,At){for(var vt=ut==null?0:ut.length;vt--&&At(ut[vt],vt,ut)!==!1;);return ut}function fft(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge;)if(!At(ut[vt],vt,ut))return!1;return!0}function fm(ut,At){for(var vt=-1,ge=ut==null?0:ut.length,We=0,$r=[];++vt<ge;){var ji=ut[vt];At(ji,vt,ut)&&($r[We++]=ji)}return $r}function V6(ut,At){var vt=ut==null?0:ut.length;return!!vt&&fx(ut,At,0)>-1}function lq(ut,At,vt){for(var ge=-1,We=ut==null?0:ut.length;++ge<We;)if(vt(At,ut[ge]))return!0;return!1}function $n(ut,At){for(var vt=-1,ge=ut==null?0:ut.length,We=Array(ge);++vt<ge;)We[vt]=At(ut[vt],vt,ut);return We}function pm(ut,At){for(var vt=-1,ge=At.length,We=ut.length;++vt<ge;)ut[We+vt]=At[vt];return ut}function cq(ut,At,vt,ge){var We=-1,$r=ut==null?0:ut.length;for(ge&&$r&&(vt=ut[++We]);++We<$r;)vt=At(vt,ut[We],We,ut);return vt}function Gpe(ut,At,vt,ge){var We=ut==null?0:ut.length;for(ge&&We&&(vt=ut[--We]);We--;)vt=At(vt,ut[We],We,ut);return vt}function uq(ut,At){for(var vt=-1,ge=ut==null?0:ut.length;++vt<ge;)if(At(ut[vt],vt,ut))return!0;return!1}var Wpe=hq("length");function Ype(ut){return ut.split("")}function jpe(ut){return ut.match(Ft)||[]}function pft(ut,At,vt){var ge;return vt(ut,function(We,$r,ji){if(At(We,$r,ji))return ge=$r,!1}),ge}function U6(ut,At,vt,ge){for(var We=ut.length,$r=vt+(ge?1:-1);ge?$r--:++$r<We;)if(At(ut[$r],$r,ut))return $r;return-1}function fx(ut,At,vt){return At===At?ode(ut,At,vt):U6(ut,dft,vt)}function Xpe(ut,At,vt,ge){for(var We=vt-1,$r=ut.length;++We<$r;)if(ge(ut[We],At))return We;return-1}function dft(ut){return ut!==ut}function mft(ut,At){var vt=ut==null?0:ut.length;return vt?pq(ut,At)/vt:Z}function hq(ut){return function(At){return At==null?e:At[ut]}}function fq(ut){return function(At){return ut==null?e:ut[At]}}function gft(ut,At,vt,ge,We){return We(ut,function($r,ji,vn){vt=ge?(ge=!1,$r):At(vt,$r,ji,vn)}),vt}function $pe(ut,At){var vt=ut.length;for(ut.sort(At);vt--;)ut[vt]=ut[vt].value;return ut}function pq(ut,At){for(var vt,ge=-1,We=ut.length;++ge<We;){var $r=At(ut[ge]);$r!==e&&(vt=vt===e?$r:vt+$r)}return vt}function dq(ut,At){for(var vt=-1,ge=Array(ut);++vt<ut;)ge[vt]=At(vt);return ge}function Kpe(ut,At){return $n(At,function(vt){return[vt,ut[vt]]})}function _ft(ut){return ut&&ut.slice(0,bft(ut)+1).replace(rp,"")}function Ws(ut){return function(At){return ut(At)}}function mq(ut,At){return $n(At,function(vt){return ut[vt]})}function MM(ut,At){return ut.has(At)}function yft(ut,At){for(var vt=-1,ge=ut.length;++vt<ge&&fx(At,ut[vt],0)>-1;);return vt}function vft(ut,At){for(var vt=ut.length;vt--&&fx(At,ut[vt],0)>-1;);return vt}function Zpe(ut,At){for(var vt=ut.length,ge=0;vt--;)ut[vt]===At&&++ge;return ge}var Jpe=fq(Dpe),Qpe=fq(Ope);function tde(ut){return"\\"+Fpe[ut]}function ede(ut,At){return ut==null?e:ut[At]}function px(ut){return Lpe.test(ut)}function rde(ut){return kpe.test(ut)}function nde(ut){for(var At,vt=[];!(At=ut.next()).done;)vt.push(At.value);return vt}function gq(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge,We){vt[++At]=[We,ge]}),vt}function xft(ut,At){return function(vt){return ut(At(vt))}}function dm(ut,At){for(var vt=-1,ge=ut.length,We=0,$r=[];++vt<ge;){var ji=ut[vt];(ji===At||ji===l)&&(ut[vt]=l,$r[We++]=vt)}return $r}function q6(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=ge}),vt}function ide(ut){var At=-1,vt=Array(ut.size);return ut.forEach(function(ge){vt[++At]=[ge,ge]}),vt}function ode(ut,At,vt){for(var ge=vt-1,We=ut.length;++ge<We;)if(ut[ge]===At)return ge;return-1}function ade(ut,At,vt){for(var ge=vt+1;ge--;)if(ut[ge]===At)return ge;return ge}function dx(ut){return px(ut)?lde(ut):Wpe(ut)}function tu(ut){return px(ut)?cde(ut):Ype(ut)}function bft(ut){for(var At=ut.length;At--&&K.test(ut.charAt(At)););return At}var sde=fq(zpe);function lde(ut){for(var At=oq.lastIndex=0;oq.test(ut);)++At;return At}function cde(ut){return ut.match(oq)||[]}function ude(ut){return ut.match(Ipe)||[]}var hde=function ut(At){At=At==null?fo:mm.defaults(fo.Object(),At,mm.pick(fo,Rpe));var vt=At.Array,ge=At.Date,We=At.Error,$r=At.Function,ji=At.Math,vn=At.Object,_q=At.RegExp,fde=At.String,Gl=At.TypeError,G6=vt.prototype,pde=$r.prototype,mx=vn.prototype,W6=At["__core-js_shared__"],Y6=pde.toString,un=mx.hasOwnProperty,dde=0,wft=function(){var m=/[^.]+$/.exec(W6&&W6.keys&&W6.keys.IE_PROTO||"");return m?"Symbol(src)_1."+m:""}(),j6=mx.toString,mde=Y6.call(vn),gde=fo._,_de=_q("^"+Y6.call(un).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),X6=oft?At.Buffer:e,gm=At.Symbol,$6=At.Uint8Array,Sft=X6?X6.allocUnsafe:e,K6=xft(vn.getPrototypeOf,vn),Mft=vn.create,Eft=mx.propertyIsEnumerable,Z6=G6.splice,Tft=gm?gm.isConcatSpreadable:e,EM=gm?gm.iterator:e,t_=gm?gm.toStringTag:e,J6=function(){try{var m=o_(vn,"defineProperty");return m({},"",{}),m}catch(v){}}(),yde=At.clearTimeout!==fo.clearTimeout&&At.clearTimeout,vde=ge&&ge.now!==fo.Date.now&&ge.now,xde=At.setTimeout!==fo.setTimeout&&At.setTimeout,Q6=ji.ceil,tI=ji.floor,yq=vn.getOwnPropertySymbols,bde=X6?X6.isBuffer:e,Cft=At.isFinite,wde=G6.join,Sde=xft(vn.keys,vn),Xi=ji.max,ra=ji.min,Mde=ge.now,Ede=At.parseInt,Aft=ji.random,Tde=G6.reverse,vq=o_(At,"DataView"),TM=o_(At,"Map"),xq=o_(At,"Promise"),gx=o_(At,"Set"),CM=o_(At,"WeakMap"),AM=o_(vn,"create"),eI=CM&&new CM,_x={},Cde=a_(vq),Ade=a_(TM),Pde=a_(xq),Ide=a_(gx),Lde=a_(CM),rI=gm?gm.prototype:e,PM=rI?rI.valueOf:e,Pft=rI?rI.toString:e;function G(m){if(si(m)&&!$e(m)&&!(m instanceof gr)){if(m instanceof Wl)return m;if(un.call(m,"__wrapped__"))return Ipt(m)}return new Wl(m)}var yx=function(){function m(){}return function(v){if(!ei(v))return{};if(Mft)return Mft(v);m.prototype=v;var T=new m;return m.prototype=e,T}}();function nI(){}function Wl(m,v){this.__wrapped__=m,this.__actions__=[],this.__chain__=!!v,this.__index__=0,this.__values__=e}G.templateSettings={escape:Pa,evaluate:ho,interpolate:Ia,variable:"",imports:{_:G}},G.prototype=nI.prototype,G.prototype.constructor=G,Wl.prototype=yx(nI.prototype),Wl.prototype.constructor=Wl;function gr(m){this.__wrapped__=m,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=rt,this.__views__=[]}function kde(){var m=new gr(this.__wrapped__);return m.__actions__=ps(this.__actions__),m.__dir__=this.__dir__,m.__filtered__=this.__filtered__,m.__iteratees__=ps(this.__iteratees__),m.__takeCount__=this.__takeCount__,m.__views__=ps(this.__views__),m}function Rde(){if(this.__filtered__){var m=new gr(this);m.__dir__=-1,m.__filtered__=!0}else m=this.clone(),m.__dir__*=-1;return m}function Nde(){var m=this.__wrapped__.value(),v=this.__dir__,T=$e(m),N=v<0,V=T?m.length:0,Y=Yme(0,V,this.__views__),J=Y.start,it=Y.end,ft=it-J,Dt=N?it:J-1,Ot=this.__iteratees__,Vt=Ot.length,oe=0,Te=ra(ft,this.__takeCount__);if(!T||!N&&V==ft&&Te==ft)return Qft(m,this.__actions__);var Ne=[];t:for(;ft--&&oe<Te;){Dt+=v;for(var er=-1,De=m[Dt];++er<Vt;){var pr=Ot[er],yr=pr.iteratee,Xs=pr.type,Ra=yr(De);if(Xs==R)De=Ra;else if(!Ra){if(Xs==L)continue t;break t}}Ne[oe++]=De}return Ne}gr.prototype=yx(nI.prototype),gr.prototype.constructor=gr;function e_(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Dde(){this.__data__=AM?AM(null):{},this.size=0}function Ode(m){var v=this.has(m)&&delete this.__data__[m];return this.size-=v?1:0,v}function zde(m){var v=this.__data__;if(AM){var T=v[m];return T===a?e:T}return un.call(v,m)?v[m]:e}function Fde(m){var v=this.__data__;return AM?v[m]!==e:un.call(v,m)}function Bde(m,v){var T=this.__data__;return this.size+=this.has(m)?0:1,T[m]=AM&&v===e?a:v,this}e_.prototype.clear=Dde,e_.prototype.delete=Ode,e_.prototype.get=zde,e_.prototype.has=Fde,e_.prototype.set=Bde;function ip(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Hde(){this.__data__=[],this.size=0}function Vde(m){var v=this.__data__,T=iI(v,m);if(T<0)return!1;var N=v.length-1;return T==N?v.pop():Z6.call(v,T,1),--this.size,!0}function Ude(m){var v=this.__data__,T=iI(v,m);return T<0?e:v[T][1]}function qde(m){return iI(this.__data__,m)>-1}function Gde(m,v){var T=this.__data__,N=iI(T,m);return N<0?(++this.size,T.push([m,v])):T[N][1]=v,this}ip.prototype.clear=Hde,ip.prototype.delete=Vde,ip.prototype.get=Ude,ip.prototype.has=qde,ip.prototype.set=Gde;function op(m){var v=-1,T=m==null?0:m.length;for(this.clear();++v<T;){var N=m[v];this.set(N[0],N[1])}}function Wde(){this.size=0,this.__data__={hash:new e_,map:new(TM||ip),string:new e_}}function Yde(m){var v=gI(this,m).delete(m);return this.size-=v?1:0,v}function jde(m){return gI(this,m).get(m)}function Xde(m){return gI(this,m).has(m)}function $de(m,v){var T=gI(this,m),N=T.size;return T.set(m,v),this.size+=T.size==N?0:1,this}op.prototype.clear=Wde,op.prototype.delete=Yde,op.prototype.get=jde,op.prototype.has=Xde,op.prototype.set=$de;function r_(m){var v=-1,T=m==null?0:m.length;for(this.__data__=new op;++v<T;)this.add(m[v])}function Kde(m){return this.__data__.set(m,a),this}function Zde(m){return this.__data__.has(m)}r_.prototype.add=r_.prototype.push=Kde,r_.prototype.has=Zde;function eu(m){var v=this.__data__=new ip(m);this.size=v.size}function Jde(){this.__data__=new ip,this.size=0}function Qde(m){var v=this.__data__,T=v.delete(m);return this.size=v.size,T}function tme(m){return this.__data__.get(m)}function eme(m){return this.__data__.has(m)}function rme(m,v){var T=this.__data__;if(T instanceof ip){var N=T.__data__;if(!TM||N.length<r-1)return N.push([m,v]),this.size=++T.size,this;T=this.__data__=new op(N)}return T.set(m,v),this.size=T.size,this}eu.prototype.clear=Jde,eu.prototype.delete=Qde,eu.prototype.get=tme,eu.prototype.has=eme,eu.prototype.set=rme;function Ift(m,v){var T=$e(m),N=!T&&s_(m),V=!T&&!N&&bm(m),Y=!T&&!N&&!V&&wx(m),J=T||N||V||Y,it=J?dq(m.length,fde):[],ft=it.length;for(var Dt in m)(v||un.call(m,Dt))&&!(J&&(Dt=="length"||V&&(Dt=="offset"||Dt=="parent")||Y&&(Dt=="buffer"||Dt=="byteLength"||Dt=="byteOffset")||cp(Dt,ft)))&&it.push(Dt);return it}function Lft(m){var v=m.length;return v?m[Lq(0,v-1)]:e}function nme(m,v){return _I(ps(m),n_(v,0,m.length))}function ime(m){return _I(ps(m))}function bq(m,v,T){(T!==e&&!ru(m[v],T)||T===e&&!(v in m))&&ap(m,v,T)}function IM(m,v,T){var N=m[v];(!(un.call(m,v)&&ru(N,T))||T===e&&!(v in m))&&ap(m,v,T)}function iI(m,v){for(var T=m.length;T--;)if(ru(m[T][0],v))return T;return-1}function ome(m,v,T,N){return _m(m,function(V,Y,J){v(N,V,T(V),J)}),N}function kft(m,v){return m&&gh(v,po(v),m)}function ame(m,v){return m&&gh(v,ms(v),m)}function ap(m,v,T){v=="__proto__"&&J6?J6(m,v,{configurable:!0,enumerable:!0,value:T,writable:!0}):m[v]=T}function wq(m,v){for(var T=-1,N=v.length,V=vt(N),Y=m==null;++T<N;)V[T]=Y?e:rG(m,v[T]);return V}function n_(m,v,T){return m===m&&(T!==e&&(m=m<=T?m:T),v!==e&&(m=m>=v?m:v)),m}function Yl(m,v,T,N,V,Y){var J,it=v&c,ft=v&u,Dt=v&h;if(T&&(J=V?T(m,N,V,Y):T(m)),J!==e)return J;if(!ei(m))return m;var Ot=$e(m);if(Ot){if(J=Xme(m),!it)return ps(m,J)}else{var Vt=na(m),oe=Vt==et||Vt==dt;if(bm(m))return rpt(m,it);if(Vt==wt||Vt==bt||oe&&!V){if(J=ft||oe?{}:bpt(m),!it)return ft?zme(m,ame(J,m)):Ome(m,kft(J,m))}else{if(!Tn[Vt])return V?m:{};J=$me(m,Vt,it)}}Y||(Y=new eu);var Te=Y.get(m);if(Te)return Te;Y.set(m,J),Kpt(m)?m.forEach(function(De){J.add(Yl(De,v,T,De,m,Y))}):Xpt(m)&&m.forEach(function(De,pr){J.set(pr,Yl(De,v,T,pr,m,Y))});var Ne=Dt?ft?Uq:Vq:ft?ms:po,er=Ot?e:Ne(m);return ql(er||m,function(De,pr){er&&(pr=De,De=m[pr]),IM(J,pr,Yl(De,v,T,pr,m,Y))}),J}function sme(m){var v=po(m);return function(T){return Rft(T,m,v)}}function Rft(m,v,T){var N=T.length;if(m==null)return!N;for(m=vn(m);N--;){var V=T[N],Y=v[V],J=m[V];if(J===e&&!(V in m)||!Y(J))return!1}return!0}function Nft(m,v,T){if(typeof m!="function")throw new Gl(i);return zM(function(){m.apply(e,T)},v)}function LM(m,v,T,N){var V=-1,Y=V6,J=!0,it=m.length,ft=[],Dt=v.length;if(!it)return ft;T&&(v=$n(v,Ws(T))),N?(Y=lq,J=!1):v.length>=r&&(Y=MM,J=!1,v=new r_(v));t:for(;++V<it;){var Ot=m[V],Vt=T==null?Ot:T(Ot);if(Ot=N||Ot!==0?Ot:0,J&&Vt===Vt){for(var oe=Dt;oe--;)if(v[oe]===Vt)continue t;ft.push(Ot)}else Y(v,Vt,N)||ft.push(Ot)}return ft}var _m=spt(mh),Dft=spt(Mq,!0);function lme(m,v){var T=!0;return _m(m,function(N,V,Y){return T=!!v(N,V,Y),T}),T}function oI(m,v,T){for(var N=-1,V=m.length;++N<V;){var Y=m[N],J=v(Y);if(J!=null&&(it===e?J===J&&!js(J):T(J,it)))var it=J,ft=Y}return ft}function cme(m,v,T,N){var V=m.length;for(T=Qe(T),T<0&&(T=-T>V?0:V+T),N=N===e||N>V?V:Qe(N),N<0&&(N+=V),N=T>N?0:Jpt(N);T<N;)m[T++]=v;return m}function Oft(m,v){var T=[];return _m(m,function(N,V,Y){v(N,V,Y)&&T.push(N)}),T}function Ro(m,v,T,N,V){var Y=-1,J=m.length;for(T||(T=Zme),V||(V=[]);++Y<J;){var it=m[Y];v>0&&T(it)?v>1?Ro(it,v-1,T,N,V):pm(V,it):N||(V[V.length]=it)}return V}var Sq=lpt(),zft=lpt(!0);function mh(m,v){return m&&Sq(m,v,po)}function Mq(m,v){return m&&zft(m,v,po)}function aI(m,v){return fm(v,function(T){return up(m[T])})}function i_(m,v){v=vm(v,m);for(var T=0,N=v.length;m!=null&&T<N;)m=m[_h(v[T++])];return T&&T==N?m:e}function Fft(m,v,T){var N=v(m);return $e(m)?N:pm(N,T(m))}function La(m){return m==null?m===e?tt:ht:t_&&t_ in vn(m)?Wme(m):ige(m)}function Eq(m,v){return m>v}function ume(m,v){return m!=null&&un.call(m,v)}function hme(m,v){return m!=null&&v in vn(m)}function fme(m,v,T){return m>=ra(v,T)&&m<Xi(v,T)}function Tq(m,v,T){for(var N=T?lq:V6,V=m[0].length,Y=m.length,J=Y,it=vt(Y),ft=1/0,Dt=[];J--;){var Ot=m[J];J&&v&&(Ot=$n(Ot,Ws(v))),ft=ra(Ot.length,ft),it[J]=!T&&(v||V>=120&&Ot.length>=120)?new r_(J&&Ot):e}Ot=m[0];var Vt=-1,oe=it[0];t:for(;++Vt<V&&Dt.length<ft;){var Te=Ot[Vt],Ne=v?v(Te):Te;if(Te=T||Te!==0?Te:0,!(oe?MM(oe,Ne):N(Dt,Ne,T))){for(J=Y;--J;){var er=it[J];if(!(er?MM(er,Ne):N(m[J],Ne,T)))continue t}oe&&oe.push(Ne),Dt.push(Te)}}return Dt}function pme(m,v,T,N){return mh(m,function(V,Y,J){v(N,T(V),Y,J)}),N}function kM(m,v,T){v=vm(v,m),m=Ept(m,v);var N=m==null?m:m[_h(Xl(v))];return N==null?e:Gs(N,m,T)}function Bft(m){return si(m)&&La(m)==bt}function dme(m){return si(m)&&La(m)==$t}function mme(m){return si(m)&&La(m)==_t}function RM(m,v,T,N,V){return m===v?!0:m==null||v==null||!si(m)&&!si(v)?m!==m&&v!==v:gme(m,v,T,N,RM,V)}function gme(m,v,T,N,V,Y){var J=$e(m),it=$e(v),ft=J?Mt:na(m),Dt=it?Mt:na(v);ft=ft==bt?wt:ft,Dt=Dt==bt?wt:Dt;var Ot=ft==wt,Vt=Dt==wt,oe=ft==Dt;if(oe&&bm(m)){if(!bm(v))return!1;J=!0,Ot=!1}if(oe&&!Ot)return Y||(Y=new eu),J||wx(m)?ypt(m,v,T,N,V,Y):qme(m,v,ft,T,N,V,Y);if(!(T&f)){var Te=Ot&&un.call(m,"__wrapped__"),Ne=Vt&&un.call(v,"__wrapped__");if(Te||Ne){var er=Te?m.value():m,De=Ne?v.value():v;return Y||(Y=new eu),V(er,De,T,N,Y)}}return oe?(Y||(Y=new eu),Gme(m,v,T,N,V,Y)):!1}function _me(m){return si(m)&&na(m)==q}function Cq(m,v,T,N){var V=T.length,Y=V,J=!N;if(m==null)return!Y;for(m=vn(m);V--;){var it=T[V];if(J&&it[2]?it[1]!==m[it[0]]:!(it[0]in m))return!1}for(;++V<Y;){it=T[V];var ft=it[0],Dt=m[ft],Ot=it[1];if(J&&it[2]){if(Dt===e&&!(ft in m))return!1}else{var Vt=new eu;if(N)var oe=N(Dt,Ot,ft,m,v,Vt);if(!(oe===e?RM(Ot,Dt,f|p,N,Vt):oe))return!1}}return!0}function Hft(m){if(!ei(m)||Qme(m))return!1;var v=up(m)?_de:Pr;return v.test(a_(m))}function yme(m){return si(m)&&La(m)==ee}function vme(m){return si(m)&&na(m)==Le}function xme(m){return si(m)&&SI(m.length)&&!!kn[La(m)]}function Vft(m){return typeof m=="function"?m:m==null?gs:typeof m=="object"?$e(m)?Gft(m[0],m[1]):qft(m):cdt(m)}function Aq(m){if(!OM(m))return Sde(m);var v=[];for(var T in vn(m))un.call(m,T)&&T!="constructor"&&v.push(T);return v}function bme(m){if(!ei(m))return nge(m);var v=OM(m),T=[];for(var N in m)N=="constructor"&&(v||!un.call(m,N))||T.push(N);return T}function Pq(m,v){return m<v}function Uft(m,v){var T=-1,N=ds(m)?vt(m.length):[];return _m(m,function(V,Y,J){N[++T]=v(V,Y,J)}),N}function qft(m){var v=Gq(m);return v.length==1&&v[0][2]?Spt(v[0][0],v[0][1]):function(T){return T===m||Cq(T,m,v)}}function Gft(m,v){return Yq(m)&&wpt(v)?Spt(_h(m),v):function(T){var N=rG(T,m);return N===e&&N===v?nG(T,m):RM(v,N,f|p)}}function sI(m,v,T,N,V){m!==v&&Sq(v,function(Y,J){if(V||(V=new eu),ei(Y))wme(m,v,J,T,sI,N,V);else{var it=N?N(Xq(m,J),Y,J+"",m,v,V):e;it===e&&(it=Y),bq(m,J,it)}},ms)}function wme(m,v,T,N,V,Y,J){var it=Xq(m,T),ft=Xq(v,T),Dt=J.get(ft);if(Dt){bq(m,T,Dt);return}var Ot=Y?Y(it,ft,T+"",m,v,J):e,Vt=Ot===e;if(Vt){var oe=$e(ft),Te=!oe&&bm(ft),Ne=!oe&&!Te&&wx(ft);Ot=ft,oe||Te||Ne?$e(it)?Ot=it:xi(it)?Ot=ps(it):Te?(Vt=!1,Ot=rpt(ft,!0)):Ne?(Vt=!1,Ot=npt(ft,!0)):Ot=[]:FM(ft)||s_(ft)?(Ot=it,s_(it)?Ot=Qpt(it):(!ei(it)||up(it))&&(Ot=bpt(ft))):Vt=!1}Vt&&(J.set(ft,Ot),V(Ot,ft,N,Y,J),J.delete(ft)),bq(m,T,Ot)}function Wft(m,v){var T=m.length;if(!!T)return v+=v<0?T:0,cp(v,T)?m[v]:e}function Yft(m,v,T){v.length?v=$n(v,function(Y){return $e(Y)?function(J){return i_(J,Y.length===1?Y[0]:Y)}:Y}):v=[gs];var N=-1;v=$n(v,Ws(ke()));var V=Uft(m,function(Y,J,it){var ft=$n(v,function(Dt){return Dt(Y)});return{criteria:ft,index:++N,value:Y}});return $pe(V,function(Y,J){return Dme(Y,J,T)})}function Sme(m,v){return jft(m,v,function(T,N){return nG(m,N)})}function jft(m,v,T){for(var N=-1,V=v.length,Y={};++N<V;){var J=v[N],it=i_(m,J);T(it,J)&&NM(Y,vm(J,m),it)}return Y}function Mme(m){return function(v){return i_(v,m)}}function Iq(m,v,T,N){var V=N?Xpe:fx,Y=-1,J=v.length,it=m;for(m===v&&(v=ps(v)),T&&(it=$n(m,Ws(T)));++Y<J;)for(var ft=0,Dt=v[Y],Ot=T?T(Dt):Dt;(ft=V(it,Ot,ft,N))>-1;)it!==m&&Z6.call(it,ft,1),Z6.call(m,ft,1);return m}function Xft(m,v){for(var T=m?v.length:0,N=T-1;T--;){var V=v[T];if(T==N||V!==Y){var Y=V;cp(V)?Z6.call(m,V,1):Nq(m,V)}}return m}function Lq(m,v){return m+tI(Aft()*(v-m+1))}function Eme(m,v,T,N){for(var V=-1,Y=Xi(Q6((v-m)/(T||1)),0),J=vt(Y);Y--;)J[N?Y:++V]=m,m+=T;return J}function kq(m,v){var T="";if(!m||v<1||v>U)return T;do v%2&&(T+=m),v=tI(v/2),v&&(m+=m);while(v);return T}function nr(m,v){return $q(Mpt(m,v,gs),m+"")}function Tme(m){return Lft(Sx(m))}function Cme(m,v){var T=Sx(m);return _I(T,n_(v,0,T.length))}function NM(m,v,T,N){if(!ei(m))return m;v=vm(v,m);for(var V=-1,Y=v.length,J=Y-1,it=m;it!=null&&++V<Y;){var ft=_h(v[V]),Dt=T;if(ft==="__proto__"||ft==="constructor"||ft==="prototype")return m;if(V!=J){var Ot=it[ft];Dt=N?N(Ot,ft,it):e,Dt===e&&(Dt=ei(Ot)?Ot:cp(v[V+1])?[]:{})}IM(it,ft,Dt),it=it[ft]}return m}var $ft=eI?function(m,v){return eI.set(m,v),m}:gs,Ame=J6?function(m,v){return J6(m,"toString",{configurable:!0,enumerable:!1,value:oG(v),writable:!0})}:gs;function Pme(m){return _I(Sx(m))}function jl(m,v,T){var N=-1,V=m.length;v<0&&(v=-v>V?0:V+v),T=T>V?V:T,T<0&&(T+=V),V=v>T?0:T-v>>>0,v>>>=0;for(var Y=vt(V);++N<V;)Y[N]=m[N+v];return Y}function Ime(m,v){var T;return _m(m,function(N,V,Y){return T=v(N,V,Y),!T}),!!T}function lI(m,v,T){var N=0,V=m==null?N:m.length;if(typeof v=="number"&&v===v&&V<=st){for(;N<V;){var Y=N+V>>>1,J=m[Y];J!==null&&!js(J)&&(T?J<=v:J<v)?N=Y+1:V=Y}return V}return Rq(m,v,gs,T)}function Rq(m,v,T,N){var V=0,Y=m==null?0:m.length;if(Y===0)return 0;v=T(v);for(var J=v!==v,it=v===null,ft=js(v),Dt=v===e;V<Y;){var Ot=tI((V+Y)/2),Vt=T(m[Ot]),oe=Vt!==e,Te=Vt===null,Ne=Vt===Vt,er=js(Vt);if(J)var De=N||Ne;else Dt?De=Ne&&(N||oe):it?De=Ne&&oe&&(N||!Te):ft?De=Ne&&oe&&!Te&&(N||!er):Te||er?De=!1:De=N?Vt<=v:Vt<v;De?V=Ot+1:Y=Ot}return ra(Y,ot)}function Kft(m,v){for(var T=-1,N=m.length,V=0,Y=[];++T<N;){var J=m[T],it=v?v(J):J;if(!T||!ru(it,ft)){var ft=it;Y[V++]=J===0?0:J}}return Y}function Zft(m){return typeof m=="number"?m:js(m)?Z:+m}function Ys(m){if(typeof m=="string")return m;if($e(m))return $n(m,Ys)+"";if(js(m))return Pft?Pft.call(m):"";var v=m+"";return v=="0"&&1/m==-z?"-0":v}function ym(m,v,T){var N=-1,V=V6,Y=m.length,J=!0,it=[],ft=it;if(T)J=!1,V=lq;else if(Y>=r){var Dt=v?null:Vme(m);if(Dt)return q6(Dt);J=!1,V=MM,ft=new r_}else ft=v?[]:it;t:for(;++N<Y;){var Ot=m[N],Vt=v?v(Ot):Ot;if(Ot=T||Ot!==0?Ot:0,J&&Vt===Vt){for(var oe=ft.length;oe--;)if(ft[oe]===Vt)continue t;v&&ft.push(Vt),it.push(Ot)}else V(ft,Vt,T)||(ft!==it&&ft.push(Vt),it.push(Ot))}return it}function Nq(m,v){return v=vm(v,m),m=Ept(m,v),m==null||delete m[_h(Xl(v))]}function Jft(m,v,T,N){return NM(m,v,T(i_(m,v)),N)}function cI(m,v,T,N){for(var V=m.length,Y=N?V:-1;(N?Y--:++Y<V)&&v(m[Y],Y,m););return T?jl(m,N?0:Y,N?Y+1:V):jl(m,N?Y+1:0,N?V:Y)}function Qft(m,v){var T=m;return T instanceof gr&&(T=T.value()),cq(v,function(N,V){return V.func.apply(V.thisArg,pm([N],V.args))},T)}function Dq(m,v,T){var N=m.length;if(N<2)return N?ym(m[0]):[];for(var V=-1,Y=vt(N);++V<N;)for(var J=m[V],it=-1;++it<N;)it!=V&&(Y[V]=LM(Y[V]||J,m[it],v,T));return ym(Ro(Y,1),v,T)}function tpt(m,v,T){for(var N=-1,V=m.length,Y=v.length,J={};++N<V;){var it=N<Y?v[N]:e;T(J,m[N],it)}return J}function Oq(m){return xi(m)?m:[]}function zq(m){return typeof m=="function"?m:gs}function vm(m,v){return $e(m)?m:Yq(m,v)?[m]:Ppt(on(m))}var Lme=nr;function xm(m,v,T){var N=m.length;return T=T===e?N:T,!v&&T>=N?m:jl(m,v,T)}var ept=yde||function(m){return fo.clearTimeout(m)};function rpt(m,v){if(v)return m.slice();var T=m.length,N=Sft?Sft(T):new m.constructor(T);return m.copy(N),N}function Fq(m){var v=new m.constructor(m.byteLength);return new $6(v).set(new $6(m)),v}function kme(m,v){var T=v?Fq(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.byteLength)}function Rme(m){var v=new m.constructor(m.source,Ke.exec(m));return v.lastIndex=m.lastIndex,v}function Nme(m){return PM?vn(PM.call(m)):{}}function npt(m,v){var T=v?Fq(m.buffer):m.buffer;return new m.constructor(T,m.byteOffset,m.length)}function ipt(m,v){if(m!==v){var T=m!==e,N=m===null,V=m===m,Y=js(m),J=v!==e,it=v===null,ft=v===v,Dt=js(v);if(!it&&!Dt&&!Y&&m>v||Y&&J&&ft&&!it&&!Dt||N&&J&&ft||!T&&ft||!V)return 1;if(!N&&!Y&&!Dt&&m<v||Dt&&T&&V&&!N&&!Y||it&&T&&V||!J&&V||!ft)return-1}return 0}function Dme(m,v,T){for(var N=-1,V=m.criteria,Y=v.criteria,J=V.length,it=T.length;++N<J;){var ft=ipt(V[N],Y[N]);if(ft){if(N>=it)return ft;var Dt=T[N];return ft*(Dt=="desc"?-1:1)}}return m.index-v.index}function opt(m,v,T,N){for(var V=-1,Y=m.length,J=T.length,it=-1,ft=v.length,Dt=Xi(Y-J,0),Ot=vt(ft+Dt),Vt=!N;++it<ft;)Ot[it]=v[it];for(;++V<J;)(Vt||V<Y)&&(Ot[T[V]]=m[V]);for(;Dt--;)Ot[it++]=m[V++];return Ot}function apt(m,v,T,N){for(var V=-1,Y=m.length,J=-1,it=T.length,ft=-1,Dt=v.length,Ot=Xi(Y-it,0),Vt=vt(Ot+Dt),oe=!N;++V<Ot;)Vt[V]=m[V];for(var Te=V;++ft<Dt;)Vt[Te+ft]=v[ft];for(;++J<it;)(oe||V<Y)&&(Vt[Te+T[J]]=m[V++]);return Vt}function ps(m,v){var T=-1,N=m.length;for(v||(v=vt(N));++T<N;)v[T]=m[T];return v}function gh(m,v,T,N){var V=!T;T||(T={});for(var Y=-1,J=v.length;++Y<J;){var it=v[Y],ft=N?N(T[it],m[it],it,T,m):e;ft===e&&(ft=m[it]),V?ap(T,it,ft):IM(T,it,ft)}return T}function Ome(m,v){return gh(m,Wq(m),v)}function zme(m,v){return gh(m,vpt(m),v)}function uI(m,v){return function(T,N){var V=$e(T)?Upe:ome,Y=v?v():{};return V(T,m,ke(N,2),Y)}}function vx(m){return nr(function(v,T){var N=-1,V=T.length,Y=V>1?T[V-1]:e,J=V>2?T[2]:e;for(Y=m.length>3&&typeof Y=="function"?(V--,Y):e,J&&ka(T[0],T[1],J)&&(Y=V<3?e:Y,V=1),v=vn(v);++N<V;){var it=T[N];it&&m(v,it,N,Y)}return v})}function spt(m,v){return function(T,N){if(T==null)return T;if(!ds(T))return m(T,N);for(var V=T.length,Y=v?V:-1,J=vn(T);(v?Y--:++Y<V)&&N(J[Y],Y,J)!==!1;);return T}}function lpt(m){return function(v,T,N){for(var V=-1,Y=vn(v),J=N(v),it=J.length;it--;){var ft=J[m?it:++V];if(T(Y[ft],ft,Y)===!1)break}return v}}function Fme(m,v,T){var N=v&d,V=DM(m);function Y(){var J=this&&this!==fo&&this instanceof Y?V:m;return J.apply(N?T:this,arguments)}return Y}function cpt(m){return function(v){v=on(v);var T=px(v)?tu(v):e,N=T?T[0]:v.charAt(0),V=T?xm(T,1).join(""):v.slice(1);return N[m]()+V}}function xx(m){return function(v){return cq(sdt(adt(v).replace(Ape,"")),m,"")}}function DM(m){return function(){var v=arguments;switch(v.length){case 0:return new m;case 1:return new m(v[0]);case 2:return new m(v[0],v[1]);case 3:return new m(v[0],v[1],v[2]);case 4:return new m(v[0],v[1],v[2],v[3]);case 5:return new m(v[0],v[1],v[2],v[3],v[4]);case 6:return new m(v[0],v[1],v[2],v[3],v[4],v[5]);case 7:return new m(v[0],v[1],v[2],v[3],v[4],v[5],v[6])}var T=yx(m.prototype),N=m.apply(T,v);return ei(N)?N:T}}function Bme(m,v,T){var N=DM(m);function V(){for(var Y=arguments.length,J=vt(Y),it=Y,ft=bx(V);it--;)J[it]=arguments[it];var Dt=Y<3&&J[0]!==ft&&J[Y-1]!==ft?[]:dm(J,ft);if(Y-=Dt.length,Y<T)return dpt(m,v,hI,V.placeholder,e,J,Dt,e,e,T-Y);var Ot=this&&this!==fo&&this instanceof V?N:m;return Gs(Ot,this,J)}return V}function upt(m){return function(v,T,N){var V=vn(v);if(!ds(v)){var Y=ke(T,3);v=po(v),T=function(it){return Y(V[it],it,V)}}var J=m(v,T,N);return J>-1?V[Y?v[J]:J]:e}}function hpt(m){return lp(function(v){var T=v.length,N=T,V=Wl.prototype.thru;for(m&&v.reverse();N--;){var Y=v[N];if(typeof Y!="function")throw new Gl(i);if(V&&!J&&mI(Y)=="wrapper")var J=new Wl([],!0)}for(N=J?N:T;++N<T;){Y=v[N];var it=mI(Y),ft=it=="wrapper"?qq(Y):e;ft&&jq(ft[0])&&ft[1]==(C|y|b|P)&&!ft[4].length&&ft[9]==1?J=J[mI(ft[0])].apply(J,ft[3]):J=Y.length==1&&jq(Y)?J[it]():J.thru(Y)}return function(){var Dt=arguments,Ot=Dt[0];if(J&&Dt.length==1&&$e(Ot))return J.plant(Ot).value();for(var Vt=0,oe=T?v[Vt].apply(this,Dt):Ot;++Vt<T;)oe=v[Vt].call(this,oe);return oe}})}function hI(m,v,T,N,V,Y,J,it,ft,Dt){var Ot=v&C,Vt=v&d,oe=v&g,Te=v&(y|x),Ne=v&k,er=oe?e:DM(m);function De(){for(var pr=arguments.length,yr=vt(pr),Xs=pr;Xs--;)yr[Xs]=arguments[Xs];if(Te)var Ra=bx(De),$s=Zpe(yr,Ra);if(N&&(yr=opt(yr,N,V,Te)),Y&&(yr=apt(yr,Y,J,Te)),pr-=$s,Te&&pr<Dt){var bi=dm(yr,Ra);return dpt(m,v,hI,De.placeholder,T,yr,bi,it,ft,Dt-pr)}var nu=Vt?T:this,fp=oe?nu[m]:m;return pr=yr.length,it?yr=oge(yr,it):Ne&&pr>1&&yr.reverse(),Ot&&ft<pr&&(yr.length=ft),this&&this!==fo&&this instanceof De&&(fp=er||DM(fp)),fp.apply(nu,yr)}return De}function fpt(m,v){return function(T,N){return pme(T,m,v(N),{})}}function fI(m,v){return function(T,N){var V;if(T===e&&N===e)return v;if(T!==e&&(V=T),N!==e){if(V===e)return N;typeof T=="string"||typeof N=="string"?(T=Ys(T),N=Ys(N)):(T=Zft(T),N=Zft(N)),V=m(T,N)}return V}}function Bq(m){return lp(function(v){return v=$n(v,Ws(ke())),nr(function(T){var N=this;return m(v,function(V){return Gs(V,N,T)})})})}function pI(m,v){v=v===e?" ":Ys(v);var T=v.length;if(T<2)return T?kq(v,m):v;var N=kq(v,Q6(m/dx(v)));return px(v)?xm(tu(N),0,m).join(""):N.slice(0,m)}function Hme(m,v,T,N){var V=v&d,Y=DM(m);function J(){for(var it=-1,ft=arguments.length,Dt=-1,Ot=N.length,Vt=vt(Ot+ft),oe=this&&this!==fo&&this instanceof J?Y:m;++Dt<Ot;)Vt[Dt]=N[Dt];for(;ft--;)Vt[Dt++]=arguments[++it];return Gs(oe,V?T:this,Vt)}return J}function ppt(m){return function(v,T,N){return N&&typeof N!="number"&&ka(v,T,N)&&(T=N=e),v=hp(v),T===e?(T=v,v=0):T=hp(T),N=N===e?v<T?1:-1:hp(N),Eme(v,T,N,m)}}function dI(m){return function(v,T){return typeof v=="string"&&typeof T=="string"||(v=$l(v),T=$l(T)),m(v,T)}}function dpt(m,v,T,N,V,Y,J,it,ft,Dt){var Ot=v&y,Vt=Ot?J:e,oe=Ot?e:J,Te=Ot?Y:e,Ne=Ot?e:Y;v|=Ot?b:S,v&=~(Ot?S:b),v&_||(v&=~(d|g));var er=[m,v,V,Te,Vt,Ne,oe,it,ft,Dt],De=T.apply(e,er);return jq(m)&&Tpt(De,er),De.placeholder=N,Cpt(De,m,v)}function Hq(m){var v=ji[m];return function(T,N){if(T=$l(T),N=N==null?0:ra(Qe(N),292),N&&Cft(T)){var V=(on(T)+"e").split("e"),Y=v(V[0]+"e"+(+V[1]+N));return V=(on(Y)+"e").split("e"),+(V[0]+"e"+(+V[1]-N))}return v(T)}}var Vme=gx&&1/q6(new gx([,-0]))[1]==z?function(m){return new gx(m)}:lG;function mpt(m){return function(v){var T=na(v);return T==q?gq(v):T==Le?ide(v):Kpe(v,m(v))}}function sp(m,v,T,N,V,Y,J,it){var ft=v&g;if(!ft&&typeof m!="function")throw new Gl(i);var Dt=N?N.length:0;if(Dt||(v&=~(b|S),N=V=e),J=J===e?J:Xi(Qe(J),0),it=it===e?it:Qe(it),Dt-=V?V.length:0,v&S){var Ot=N,Vt=V;N=V=e}var oe=ft?e:qq(m),Te=[m,v,T,N,V,Ot,Vt,Y,J,it];if(oe&&rge(Te,oe),m=Te[0],v=Te[1],T=Te[2],N=Te[3],V=Te[4],it=Te[9]=Te[9]===e?ft?0:m.length:Xi(Te[9]-Dt,0),!it&&v&(y|x)&&(v&=~(y|x)),!v||v==d)var Ne=Fme(m,v,T);else v==y||v==x?Ne=Bme(m,v,it):(v==b||v==(d|b))&&!V.length?Ne=Hme(m,v,T,N):Ne=hI.apply(e,Te);var er=oe?$ft:Tpt;return Cpt(er(Ne,Te),m,v)}function gpt(m,v,T,N){return m===e||ru(m,mx[T])&&!un.call(N,T)?v:m}function _pt(m,v,T,N,V,Y){return ei(m)&&ei(v)&&(Y.set(v,m),sI(m,v,e,_pt,Y),Y.delete(v)),m}function Ume(m){return FM(m)?e:m}function ypt(m,v,T,N,V,Y){var J=T&f,it=m.length,ft=v.length;if(it!=ft&&!(J&&ft>it))return!1;var Dt=Y.get(m),Ot=Y.get(v);if(Dt&&Ot)return Dt==v&&Ot==m;var Vt=-1,oe=!0,Te=T&p?new r_:e;for(Y.set(m,v),Y.set(v,m);++Vt<it;){var Ne=m[Vt],er=v[Vt];if(N)var De=J?N(er,Ne,Vt,v,m,Y):N(Ne,er,Vt,m,v,Y);if(De!==e){if(De)continue;oe=!1;break}if(Te){if(!uq(v,function(pr,yr){if(!MM(Te,yr)&&(Ne===pr||V(Ne,pr,T,N,Y)))return Te.push(yr)})){oe=!1;break}}else if(!(Ne===er||V(Ne,er,T,N,Y))){oe=!1;break}}return Y.delete(m),Y.delete(v),oe}function qme(m,v,T,N,V,Y,J){switch(T){case he:if(m.byteLength!=v.byteLength||m.byteOffset!=v.byteOffset)return!1;m=m.buffer,v=v.buffer;case $t:return!(m.byteLength!=v.byteLength||!Y(new $6(m),new $6(v)));case Kt:case _t:case pt:return ru(+m,+v);case X:return m.name==v.name&&m.message==v.message;case ee:case ar:return m==v+"";case q:var it=gq;case Le:var ft=N&f;if(it||(it=q6),m.size!=v.size&&!ft)return!1;var Dt=J.get(m);if(Dt)return Dt==v;N|=p,J.set(m,v);var Ot=ypt(it(m),it(v),N,V,Y,J);return J.delete(m),Ot;case fr:if(PM)return PM.call(m)==PM.call(v)}return!1}function Gme(m,v,T,N,V,Y){var J=T&f,it=Vq(m),ft=it.length,Dt=Vq(v),Ot=Dt.length;if(ft!=Ot&&!J)return!1;for(var Vt=ft;Vt--;){var oe=it[Vt];if(!(J?oe in v:un.call(v,oe)))return!1}var Te=Y.get(m),Ne=Y.get(v);if(Te&&Ne)return Te==v&&Ne==m;var er=!0;Y.set(m,v),Y.set(v,m);for(var De=J;++Vt<ft;){oe=it[Vt];var pr=m[oe],yr=v[oe];if(N)var Xs=J?N(yr,pr,oe,v,m,Y):N(pr,yr,oe,m,v,Y);if(!(Xs===e?pr===yr||V(pr,yr,T,N,Y):Xs)){er=!1;break}De||(De=oe=="constructor")}if(er&&!De){var Ra=m.constructor,$s=v.constructor;Ra!=$s&&"constructor"in m&&"constructor"in v&&!(typeof Ra=="function"&&Ra instanceof Ra&&typeof $s=="function"&&$s instanceof $s)&&(er=!1)}return Y.delete(m),Y.delete(v),er}function lp(m){return $q(Mpt(m,e,Rpt),m+"")}function Vq(m){return Fft(m,po,Wq)}function Uq(m){return Fft(m,ms,vpt)}var qq=eI?function(m){return eI.get(m)}:lG;function mI(m){for(var v=m.name+"",T=_x[v],N=un.call(_x,v)?T.length:0;N--;){var V=T[N],Y=V.func;if(Y==null||Y==m)return V.name}return v}function bx(m){var v=un.call(G,"placeholder")?G:m;return v.placeholder}function ke(){var m=G.iteratee||aG;return m=m===aG?Vft:m,arguments.length?m(arguments[0],arguments[1]):m}function gI(m,v){var T=m.__data__;return Jme(v)?T[typeof v=="string"?"string":"hash"]:T.map}function Gq(m){for(var v=po(m),T=v.length;T--;){var N=v[T],V=m[N];v[T]=[N,V,wpt(V)]}return v}function o_(m,v){var T=ede(m,v);return Hft(T)?T:e}function Wme(m){var v=un.call(m,t_),T=m[t_];try{m[t_]=e;var N=!0}catch(Y){}var V=j6.call(m);return N&&(v?m[t_]=T:delete m[t_]),V}var Wq=yq?function(m){return m==null?[]:(m=vn(m),fm(yq(m),function(v){return Eft.call(m,v)}))}:cG,vpt=yq?function(m){for(var v=[];m;)pm(v,Wq(m)),m=K6(m);return v}:cG,na=La;(vq&&na(new vq(new ArrayBuffer(1)))!=he||TM&&na(new TM)!=q||xq&&na(xq.resolve())!=kt||gx&&na(new gx)!=Le||CM&&na(new CM)!=$)&&(na=function(m){var v=La(m),T=v==wt?m.constructor:e,N=T?a_(T):"";if(N)switch(N){case Cde:return he;case Ade:return q;case Pde:return kt;case Ide:return Le;case Lde:return $}return v});function Yme(m,v,T){for(var N=-1,V=T.length;++N<V;){var Y=T[N],J=Y.size;switch(Y.type){case"drop":m+=J;break;case"dropRight":v-=J;break;case"take":v=ra(v,m+J);break;case"takeRight":m=Xi(m,v-J);break}}return{start:m,end:v}}function jme(m){var v=m.match(Et);return v?v[1].split(xt):[]}function xpt(m,v,T){v=vm(v,m);for(var N=-1,V=v.length,Y=!1;++N<V;){var J=_h(v[N]);if(!(Y=m!=null&&T(m,J)))break;m=m[J]}return Y||++N!=V?Y:(V=m==null?0:m.length,!!V&&SI(V)&&cp(J,V)&&($e(m)||s_(m)))}function Xme(m){var v=m.length,T=new m.constructor(v);return v&&typeof m[0]=="string"&&un.call(m,"index")&&(T.index=m.index,T.input=m.input),T}function bpt(m){return typeof m.constructor=="function"&&!OM(m)?yx(K6(m)):{}}function $me(m,v,T){var N=m.constructor;switch(v){case $t:return Fq(m);case Kt:case _t:return new N(+m);case he:return kme(m,T);case Tt:case be:case nt:case Ct:case Wt:case fe:case at:case se:case Qt:return npt(m,T);case q:return new N;case pt:case ar:return new N(m);case ee:return Rme(m);case Le:return new N;case fr:return Nme(m)}}function Kme(m,v){var T=v.length;if(!T)return m;var N=T-1;return v[N]=(T>1?"& ":"")+v[N],v=v.join(T>2?", ":" "),m.replace(gt,`{
/* [wrapped with `+v+`] */
`)}function Zme(m){return $e(m)||s_(m)||!!(Tft&&m&&m[Tft])}function cp(m,v){var T=typeof m;return v=v==null?U:v,!!v&&(T=="number"||T!="symbol"&&np.test(m))&&m>-1&&m%1==0&&m<v}function ka(m,v,T){if(!ei(T))return!1;var N=typeof v;return(N=="number"?ds(T)&&cp(v,T.length):N=="string"&&v in T)?ru(T[v],m):!1}function Yq(m,v){if($e(m))return!1;var T=typeof m;return T=="number"||T=="symbol"||T=="boolean"||m==null||js(m)?!0:cm.test(m)||!lx.test(m)||v!=null&&m in vn(v)}function Jme(m){var v=typeof m;return v=="string"||v=="number"||v=="symbol"||v=="boolean"?m!=="__proto__":m===null}function jq(m){var v=mI(m),T=G[v];if(typeof T!="function"||!(v in gr.prototype))return!1;if(m===T)return!0;var N=qq(T);return!!N&&m===N[0]}function Qme(m){return!!wft&&wft in m}var tge=W6?up:uG;function OM(m){var v=m&&m.constructor,T=typeof v=="function"&&v.prototype||mx;return m===T}function wpt(m){return m===m&&!ei(m)}function Spt(m,v){return function(T){return T==null?!1:T[m]===v&&(v!==e||m in vn(T))}}function ege(m){var v=bI(m,function(N){return T.size===s&&T.clear(),N}),T=v.cache;return v}function rge(m,v){var T=m[1],N=v[1],V=T|N,Y=V<(d|g|C),J=N==C&&T==y||N==C&&T==P&&m[7].length<=v[8]||N==(C|P)&&v[7].length<=v[8]&&T==y;if(!(Y||J))return m;N&d&&(m[2]=v[2],V|=T&d?0:_);var it=v[3];if(it){var ft=m[3];m[3]=ft?opt(ft,it,v[4]):it,m[4]=ft?dm(m[3],l):v[4]}return it=v[5],it&&(ft=m[5],m[5]=ft?apt(ft,it,v[6]):it,m[6]=ft?dm(m[5],l):v[6]),it=v[7],it&&(m[7]=it),N&C&&(m[8]=m[8]==null?v[8]:ra(m[8],v[8])),m[9]==null&&(m[9]=v[9]),m[0]=v[0],m[1]=V,m}function nge(m){var v=[];if(m!=null)for(var T in vn(m))v.push(T);return v}function ige(m){return j6.call(m)}function Mpt(m,v,T){return v=Xi(v===e?m.length-1:v,0),function(){for(var N=arguments,V=-1,Y=Xi(N.length-v,0),J=vt(Y);++V<Y;)J[V]=N[v+V];V=-1;for(var it=vt(v+1);++V<v;)it[V]=N[V];return it[v]=T(J),Gs(m,this,it)}}function Ept(m,v){return v.length<2?m:i_(m,jl(v,0,-1))}function oge(m,v){for(var T=m.length,N=ra(v.length,T),V=ps(m);N--;){var Y=v[N];m[N]=cp(Y,T)?V[Y]:e}return m}function Xq(m,v){if(!(v==="constructor"&&typeof m[v]=="function")&&v!="__proto__")return m[v]}var Tpt=Apt($ft),zM=xde||function(m,v){return fo.setTimeout(m,v)},$q=Apt(Ame);function Cpt(m,v,T){var N=v+"";return $q(m,Kme(N,age(jme(N),T)))}function Apt(m){var v=0,T=0;return function(){var N=Mde(),V=I-(N-T);if(T=N,V>0){if(++v>=B)return arguments[0]}else v=0;return m.apply(e,arguments)}}function _I(m,v){var T=-1,N=m.length,V=N-1;for(v=v===e?N:v;++T<v;){var Y=Lq(T,V),J=m[Y];m[Y]=m[T],m[T]=J}return m.length=v,m}var Ppt=ege(function(m){var v=[];return m.charCodeAt(0)===46&&v.push(""),m.replace(J0,function(T,N,V,Y){v.push(V?Y.replace(Ue,"$1"):N||T)}),v});function _h(m){if(typeof m=="string"||js(m))return m;var v=m+"";return v=="0"&&1/m==-z?"-0":v}function a_(m){if(m!=null){try{return Y6.call(m)}catch(v){}try{return m+""}catch(v){}}return""}function age(m,v){return ql(St,function(T){var N="_."+T[0];v&T[1]&&!V6(m,N)&&m.push(N)}),m.sort()}function Ipt(m){if(m instanceof gr)return m.clone();var v=new Wl(m.__wrapped__,m.__chain__);return v.__actions__=ps(m.__actions__),v.__index__=m.__index__,v.__values__=m.__values__,v}function sge(m,v,T){(T?ka(m,v,T):v===e)?v=1:v=Xi(Qe(v),0);var N=m==null?0:m.length;if(!N||v<1)return[];for(var V=0,Y=0,J=vt(Q6(N/v));V<N;)J[Y++]=jl(m,V,V+=v);return J}function lge(m){for(var v=-1,T=m==null?0:m.length,N=0,V=[];++v<T;){var Y=m[v];Y&&(V[N++]=Y)}return V}function cge(){var m=arguments.length;if(!m)return[];for(var v=vt(m-1),T=arguments[0],N=m;N--;)v[N-1]=arguments[N];return pm($e(T)?ps(T):[T],Ro(v,1))}var uge=nr(function(m,v){return xi(m)?LM(m,Ro(v,1,xi,!0)):[]}),hge=nr(function(m,v){var T=Xl(v);return xi(T)&&(T=e),xi(m)?LM(m,Ro(v,1,xi,!0),ke(T,2)):[]}),fge=nr(function(m,v){var T=Xl(v);return xi(T)&&(T=e),xi(m)?LM(m,Ro(v,1,xi,!0),e,T):[]});function pge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),jl(m,v<0?0:v,N)):[]}function dge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,jl(m,0,v<0?0:v)):[]}function mge(m,v){return m&&m.length?cI(m,ke(v,3),!0,!0):[]}function gge(m,v){return m&&m.length?cI(m,ke(v,3),!0):[]}function _ge(m,v,T,N){var V=m==null?0:m.length;return V?(T&&typeof T!="number"&&ka(m,v,T)&&(T=0,N=V),cme(m,v,T,N)):[]}function Lpt(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=T==null?0:Qe(T);return V<0&&(V=Xi(N+V,0)),U6(m,ke(v,3),V)}function kpt(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=N-1;return T!==e&&(V=Qe(T),V=T<0?Xi(N+V,0):ra(V,N-1)),U6(m,ke(v,3),V,!0)}function Rpt(m){var v=m==null?0:m.length;return v?Ro(m,1):[]}function yge(m){var v=m==null?0:m.length;return v?Ro(m,z):[]}function vge(m,v){var T=m==null?0:m.length;return T?(v=v===e?1:Qe(v),Ro(m,v)):[]}function xge(m){for(var v=-1,T=m==null?0:m.length,N={};++v<T;){var V=m[v];N[V[0]]=V[1]}return N}function Npt(m){return m&&m.length?m[0]:e}function bge(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=T==null?0:Qe(T);return V<0&&(V=Xi(N+V,0)),fx(m,v,V)}function wge(m){var v=m==null?0:m.length;return v?jl(m,0,-1):[]}var Sge=nr(function(m){var v=$n(m,Oq);return v.length&&v[0]===m[0]?Tq(v):[]}),Mge=nr(function(m){var v=Xl(m),T=$n(m,Oq);return v===Xl(T)?v=e:T.pop(),T.length&&T[0]===m[0]?Tq(T,ke(v,2)):[]}),Ege=nr(function(m){var v=Xl(m),T=$n(m,Oq);return v=typeof v=="function"?v:e,v&&T.pop(),T.length&&T[0]===m[0]?Tq(T,e,v):[]});function Tge(m,v){return m==null?"":wde.call(m,v)}function Xl(m){var v=m==null?0:m.length;return v?m[v-1]:e}function Cge(m,v,T){var N=m==null?0:m.length;if(!N)return-1;var V=N;return T!==e&&(V=Qe(T),V=V<0?Xi(N+V,0):ra(V,N-1)),v===v?ade(m,v,V):U6(m,dft,V,!0)}function Age(m,v){return m&&m.length?Wft(m,Qe(v)):e}var Pge=nr(Dpt);function Dpt(m,v){return m&&m.length&&v&&v.length?Iq(m,v):m}function Ige(m,v,T){return m&&m.length&&v&&v.length?Iq(m,v,ke(T,2)):m}function Lge(m,v,T){return m&&m.length&&v&&v.length?Iq(m,v,e,T):m}var kge=lp(function(m,v){var T=m==null?0:m.length,N=wq(m,v);return Xft(m,$n(v,function(V){return cp(V,T)?+V:V}).sort(ipt)),N});function Rge(m,v){var T=[];if(!(m&&m.length))return T;var N=-1,V=[],Y=m.length;for(v=ke(v,3);++N<Y;){var J=m[N];v(J,N,m)&&(T.push(J),V.push(N))}return Xft(m,V),T}function Kq(m){return m==null?m:Tde.call(m)}function Nge(m,v,T){var N=m==null?0:m.length;return N?(T&&typeof T!="number"&&ka(m,v,T)?(v=0,T=N):(v=v==null?0:Qe(v),T=T===e?N:Qe(T)),jl(m,v,T)):[]}function Dge(m,v){return lI(m,v)}function Oge(m,v,T){return Rq(m,v,ke(T,2))}function zge(m,v){var T=m==null?0:m.length;if(T){var N=lI(m,v);if(N<T&&ru(m[N],v))return N}return-1}function Fge(m,v){return lI(m,v,!0)}function Bge(m,v,T){return Rq(m,v,ke(T,2),!0)}function Hge(m,v){var T=m==null?0:m.length;if(T){var N=lI(m,v,!0)-1;if(ru(m[N],v))return N}return-1}function Vge(m){return m&&m.length?Kft(m):[]}function Uge(m,v){return m&&m.length?Kft(m,ke(v,2)):[]}function qge(m){var v=m==null?0:m.length;return v?jl(m,1,v):[]}function Gge(m,v,T){return m&&m.length?(v=T||v===e?1:Qe(v),jl(m,0,v<0?0:v)):[]}function Wge(m,v,T){var N=m==null?0:m.length;return N?(v=T||v===e?1:Qe(v),v=N-v,jl(m,v<0?0:v,N)):[]}function Yge(m,v){return m&&m.length?cI(m,ke(v,3),!1,!0):[]}function jge(m,v){return m&&m.length?cI(m,ke(v,3)):[]}var Xge=nr(function(m){return ym(Ro(m,1,xi,!0))}),$ge=nr(function(m){var v=Xl(m);return xi(v)&&(v=e),ym(Ro(m,1,xi,!0),ke(v,2))}),Kge=nr(function(m){var v=Xl(m);return v=typeof v=="function"?v:e,ym(Ro(m,1,xi,!0),e,v)});function Zge(m){return m&&m.length?ym(m):[]}function Jge(m,v){return m&&m.length?ym(m,ke(v,2)):[]}function Qge(m,v){return v=typeof v=="function"?v:e,m&&m.length?ym(m,e,v):[]}function Zq(m){if(!(m&&m.length))return[];var v=0;return m=fm(m,function(T){if(xi(T))return v=Xi(T.length,v),!0}),dq(v,function(T){return $n(m,hq(T))})}function Opt(m,v){if(!(m&&m.length))return[];var T=Zq(m);return v==null?T:$n(T,function(N){return Gs(v,e,N)})}var t0e=nr(function(m,v){return xi(m)?LM(m,v):[]}),e0e=nr(function(m){return Dq(fm(m,xi))}),r0e=nr(function(m){var v=Xl(m);return xi(v)&&(v=e),Dq(fm(m,xi),ke(v,2))}),n0e=nr(function(m){var v=Xl(m);return v=typeof v=="function"?v:e,Dq(fm(m,xi),e,v)}),i0e=nr(Zq);function o0e(m,v){return tpt(m||[],v||[],IM)}function a0e(m,v){return tpt(m||[],v||[],NM)}var s0e=nr(function(m){var v=m.length,T=v>1?m[v-1]:e;return T=typeof T=="function"?(m.pop(),T):e,Opt(m,T)});function zpt(m){var v=G(m);return v.__chain__=!0,v}function l0e(m,v){return v(m),m}function yI(m,v){return v(m)}var c0e=lp(function(m){var v=m.length,T=v?m[0]:0,N=this.__wrapped__,V=function(Y){return wq(Y,m)};return v>1||this.__actions__.length||!(N instanceof gr)||!cp(T)?this.thru(V):(N=N.slice(T,+T+(v?1:0)),N.__actions__.push({func:yI,args:[V],thisArg:e}),new Wl(N,this.__chain__).thru(function(Y){return v&&!Y.length&&Y.push(e),Y}))});function u0e(){return zpt(this)}function h0e(){return new Wl(this.value(),this.__chain__)}function f0e(){this.__values__===e&&(this.__values__=Zpt(this.value()));var m=this.__index__>=this.__values__.length,v=m?e:this.__values__[this.__index__++];return{done:m,value:v}}function p0e(){return this}function d0e(m){for(var v,T=this;T instanceof nI;){var N=Ipt(T);N.__index__=0,N.__values__=e,v?V.__wrapped__=N:v=N;var V=N;T=T.__wrapped__}return V.__wrapped__=m,v}function m0e(){var m=this.__wrapped__;if(m instanceof gr){var v=m;return this.__actions__.length&&(v=new gr(this)),v=v.reverse(),v.__actions__.push({func:yI,args:[Kq],thisArg:e}),new Wl(v,this.__chain__)}return this.thru(Kq)}function g0e(){return Qft(this.__wrapped__,this.__actions__)}var _0e=uI(function(m,v,T){un.call(m,T)?++m[T]:ap(m,T,1)});function y0e(m,v,T){var N=$e(m)?fft:lme;return T&&ka(m,v,T)&&(v=e),N(m,ke(v,3))}function v0e(m,v){var T=$e(m)?fm:Oft;return T(m,ke(v,3))}var x0e=upt(Lpt),b0e=upt(kpt);function w0e(m,v){return Ro(vI(m,v),1)}function S0e(m,v){return Ro(vI(m,v),z)}function M0e(m,v,T){return T=T===e?1:Qe(T),Ro(vI(m,v),T)}function Fpt(m,v){var T=$e(m)?ql:_m;return T(m,ke(v,3))}function Bpt(m,v){var T=$e(m)?qpe:Dft;return T(m,ke(v,3))}var E0e=uI(function(m,v,T){un.call(m,T)?m[T].push(v):ap(m,T,[v])});function T0e(m,v,T,N){m=ds(m)?m:Sx(m),T=T&&!N?Qe(T):0;var V=m.length;return T<0&&(T=Xi(V+T,0)),MI(m)?T<=V&&m.indexOf(v,T)>-1:!!V&&fx(m,v,T)>-1}var C0e=nr(function(m,v,T){var N=-1,V=typeof v=="function",Y=ds(m)?vt(m.length):[];return _m(m,function(J){Y[++N]=V?Gs(v,J,T):kM(J,v,T)}),Y}),A0e=uI(function(m,v,T){ap(m,T,v)});function vI(m,v){var T=$e(m)?$n:Uft;return T(m,ke(v,3))}function P0e(m,v,T,N){return m==null?[]:($e(v)||(v=v==null?[]:[v]),T=N?e:T,$e(T)||(T=T==null?[]:[T]),Yft(m,v,T))}var I0e=uI(function(m,v,T){m[T?0:1].push(v)},function(){return[[],[]]});function L0e(m,v,T){var N=$e(m)?cq:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,_m)}function k0e(m,v,T){var N=$e(m)?Gpe:gft,V=arguments.length<3;return N(m,ke(v,4),T,V,Dft)}function R0e(m,v){var T=$e(m)?fm:Oft;return T(m,wI(ke(v,3)))}function N0e(m){var v=$e(m)?Lft:Tme;return v(m)}function D0e(m,v,T){(T?ka(m,v,T):v===e)?v=1:v=Qe(v);var N=$e(m)?nme:Cme;return N(m,v)}function O0e(m){var v=$e(m)?ime:Pme;return v(m)}function z0e(m){if(m==null)return 0;if(ds(m))return MI(m)?dx(m):m.length;var v=na(m);return v==q||v==Le?m.size:Aq(m).length}function F0e(m,v,T){var N=$e(m)?uq:Ime;return T&&ka(m,v,T)&&(v=e),N(m,ke(v,3))}var B0e=nr(function(m,v){if(m==null)return[];var T=v.length;return T>1&&ka(m,v[0],v[1])?v=[]:T>2&&ka(v[0],v[1],v[2])&&(v=[v[0]]),Yft(m,Ro(v,1),[])}),xI=vde||function(){return fo.Date.now()};function H0e(m,v){if(typeof v!="function")throw new Gl(i);return m=Qe(m),function(){if(--m<1)return v.apply(this,arguments)}}function Hpt(m,v,T){return v=T?e:v,v=m&&v==null?m.length:v,sp(m,C,e,e,e,e,v)}function Vpt(m,v){var T;if(typeof v!="function")throw new Gl(i);return m=Qe(m),function(){return--m>0&&(T=v.apply(this,arguments)),m<=1&&(v=e),T}}var Jq=nr(function(m,v,T){var N=d;if(T.length){var V=dm(T,bx(Jq));N|=b}return sp(m,N,v,T,V)}),Upt=nr(function(m,v,T){var N=d|g;if(T.length){var V=dm(T,bx(Upt));N|=b}return sp(v,N,m,T,V)});function qpt(m,v,T){v=T?e:v;var N=sp(m,y,e,e,e,e,e,v);return N.placeholder=qpt.placeholder,N}function Gpt(m,v,T){v=T?e:v;var N=sp(m,x,e,e,e,e,e,v);return N.placeholder=Gpt.placeholder,N}function Wpt(m,v,T){var N,V,Y,J,it,ft,Dt=0,Ot=!1,Vt=!1,oe=!0;if(typeof m!="function")throw new Gl(i);v=$l(v)||0,ei(T)&&(Ot=!!T.leading,Vt="maxWait"in T,Y=Vt?Xi($l(T.maxWait)||0,v):Y,oe="trailing"in T?!!T.trailing:oe);function Te(bi){var nu=N,fp=V;return N=V=e,Dt=bi,J=m.apply(fp,nu),J}function Ne(bi){return Dt=bi,it=zM(pr,v),Ot?Te(bi):J}function er(bi){var nu=bi-ft,fp=bi-Dt,udt=v-nu;return Vt?ra(udt,Y-fp):udt}function De(bi){var nu=bi-ft,fp=bi-Dt;return ft===e||nu>=v||nu<0||Vt&&fp>=Y}function pr(){var bi=xI();if(De(bi))return yr(bi);it=zM(pr,er(bi))}function yr(bi){return it=e,oe&&N?Te(bi):(N=V=e,J)}function Xs(){it!==e&&ept(it),Dt=0,N=ft=V=it=e}function Ra(){return it===e?J:yr(xI())}function $s(){var bi=xI(),nu=De(bi);if(N=arguments,V=this,ft=bi,nu){if(it===e)return Ne(ft);if(Vt)return ept(it),it=zM(pr,v),Te(ft)}return it===e&&(it=zM(pr,v)),J}return $s.cancel=Xs,$s.flush=Ra,$s}var V0e=nr(function(m,v){return Nft(m,1,v)}),U0e=nr(function(m,v,T){return Nft(m,$l(v)||0,T)});function q0e(m){return sp(m,k)}function bI(m,v){if(typeof m!="function"||v!=null&&typeof v!="function")throw new Gl(i);var T=function(){var N=arguments,V=v?v.apply(this,N):N[0],Y=T.cache;if(Y.has(V))return Y.get(V);var J=m.apply(this,N);return T.cache=Y.set(V,J)||Y,J};return T.cache=new(bI.Cache||op),T}bI.Cache=op;function wI(m){if(typeof m!="function")throw new Gl(i);return function(){var v=arguments;switch(v.length){case 0:return!m.call(this);case 1:return!m.call(this,v[0]);case 2:return!m.call(this,v[0],v[1]);case 3:return!m.call(this,v[0],v[1],v[2])}return!m.apply(this,v)}}function G0e(m){return Vpt(2,m)}var W0e=Lme(function(m,v){v=v.length==1&&$e(v[0])?$n(v[0],Ws(ke())):$n(Ro(v,1),Ws(ke()));var T=v.length;return nr(function(N){for(var V=-1,Y=ra(N.length,T);++V<Y;)N[V]=v[V].call(this,N[V]);return Gs(m,this,N)})}),Qq=nr(function(m,v){var T=dm(v,bx(Qq));return sp(m,b,e,v,T)}),Ypt=nr(function(m,v){var T=dm(v,bx(Ypt));return sp(m,S,e,v,T)}),Y0e=lp(function(m,v){return sp(m,P,e,e,e,v)});function j0e(m,v){if(typeof m!="function")throw new Gl(i);return v=v===e?v:Qe(v),nr(m,v)}function X0e(m,v){if(typeof m!="function")throw new Gl(i);return v=v==null?0:Xi(Qe(v),0),nr(function(T){var N=T[v],V=xm(T,0,v);return N&&pm(V,N),Gs(m,this,V)})}function $0e(m,v,T){var N=!0,V=!0;if(typeof m!="function")throw new Gl(i);return ei(T)&&(N="leading"in T?!!T.leading:N,V="trailing"in T?!!T.trailing:V),Wpt(m,v,{leading:N,maxWait:v,trailing:V})}function K0e(m){return Hpt(m,1)}function Z0e(m,v){return Qq(zq(v),m)}function J0e(){if(!arguments.length)return[];var m=arguments[0];return $e(m)?m:[m]}function Q0e(m){return Yl(m,h)}function t_e(m,v){return v=typeof v=="function"?v:e,Yl(m,h,v)}function e_e(m){return Yl(m,c|h)}function r_e(m,v){return v=typeof v=="function"?v:e,Yl(m,c|h,v)}function n_e(m,v){return v==null||Rft(m,v,po(v))}function ru(m,v){return m===v||m!==m&&v!==v}var i_e=dI(Eq),o_e=dI(function(m,v){return m>=v}),s_=Bft(function(){return arguments}())?Bft:function(m){return si(m)&&un.call(m,"callee")&&!Eft.call(m,"callee")},$e=vt.isArray,a_e=aft?Ws(aft):dme;function ds(m){return m!=null&&SI(m.length)&&!up(m)}function xi(m){return si(m)&&ds(m)}function s_e(m){return m===!0||m===!1||si(m)&&La(m)==Kt}var bm=bde||uG,l_e=sft?Ws(sft):mme;function c_e(m){return si(m)&&m.nodeType===1&&!FM(m)}function u_e(m){if(m==null)return!0;if(ds(m)&&($e(m)||typeof m=="string"||typeof m.splice=="function"||bm(m)||wx(m)||s_(m)))return!m.length;var v=na(m);if(v==q||v==Le)return!m.size;if(OM(m))return!Aq(m).length;for(var T in m)if(un.call(m,T))return!1;return!0}function h_e(m,v){return RM(m,v)}function f_e(m,v,T){T=typeof T=="function"?T:e;var N=T?T(m,v):e;return N===e?RM(m,v,e,T):!!N}function tG(m){if(!si(m))return!1;var v=La(m);return v==X||v==ct||typeof m.message=="string"&&typeof m.name=="string"&&!FM(m)}function p_e(m){return typeof m=="number"&&Cft(m)}function up(m){if(!ei(m))return!1;var v=La(m);return v==et||v==dt||v==lt||v==ie}function jpt(m){return typeof m=="number"&&m==Qe(m)}function SI(m){return typeof m=="number"&&m>-1&&m%1==0&&m<=U}function ei(m){var v=typeof m;return m!=null&&(v=="object"||v=="function")}function si(m){return m!=null&&typeof m=="object"}var Xpt=lft?Ws(lft):_me;function d_e(m,v){return m===v||Cq(m,v,Gq(v))}function m_e(m,v,T){return T=typeof T=="function"?T:e,Cq(m,v,Gq(v),T)}function g_e(m){return $pt(m)&&m!=+m}function __e(m){if(tge(m))throw new We(n);return Hft(m)}function y_e(m){return m===null}function v_e(m){return m==null}function $pt(m){return typeof m=="number"||si(m)&&La(m)==pt}function FM(m){if(!si(m)||La(m)!=wt)return!1;var v=K6(m);if(v===null)return!0;var T=un.call(v,"constructor")&&v.constructor;return typeof T=="function"&&T instanceof T&&Y6.call(T)==mde}var eG=cft?Ws(cft):yme;function x_e(m){return jpt(m)&&m>=-U&&m<=U}var Kpt=uft?Ws(uft):vme;function MI(m){return typeof m=="string"||!$e(m)&&si(m)&&La(m)==ar}function js(m){return typeof m=="symbol"||si(m)&&La(m)==fr}var wx=hft?Ws(hft):xme;function b_e(m){return m===e}function w_e(m){return si(m)&&na(m)==$}function S_e(m){return si(m)&&La(m)==It}var M_e=dI(Pq),E_e=dI(function(m,v){return m<=v});function Zpt(m){if(!m)return[];if(ds(m))return MI(m)?tu(m):ps(m);if(EM&&m[EM])return nde(m[EM]());var v=na(m),T=v==q?gq:v==Le?q6:Sx;return T(m)}function hp(m){if(!m)return m===0?m:0;if(m=$l(m),m===z||m===-z){var v=m<0?-1:1;return v*W}return m===m?m:0}function Qe(m){var v=hp(m),T=v%1;return v===v?T?v-T:v:0}function Jpt(m){return m?n_(Qe(m),0,rt):0}function $l(m){if(typeof m=="number")return m;if(js(m))return Z;if(ei(m)){var v=typeof m.valueOf=="function"?m.valueOf():m;m=ei(v)?v+"":v}if(typeof m!="string")return m===0?m:+m;m=_ft(m);var T=_r.test(m);return T||jn.test(m)?Hpe(m.slice(2),T?2:8):Xr.test(m)?Z:+m}function Qpt(m){return gh(m,ms(m))}function T_e(m){return m?n_(Qe(m),-U,U):m===0?m:0}function on(m){return m==null?"":Ys(m)}var C_e=vx(function(m,v){if(OM(v)||ds(v)){gh(v,po(v),m);return}for(var T in v)un.call(v,T)&&IM(m,T,v[T])}),tdt=vx(function(m,v){gh(v,ms(v),m)}),EI=vx(function(m,v,T,N){gh(v,ms(v),m,N)}),A_e=vx(function(m,v,T,N){gh(v,po(v),m,N)}),P_e=lp(wq);function I_e(m,v){var T=yx(m);return v==null?T:kft(T,v)}var L_e=nr(function(m,v){m=vn(m);var T=-1,N=v.length,V=N>2?v[2]:e;for(V&&ka(v[0],v[1],V)&&(N=1);++T<N;)for(var Y=v[T],J=ms(Y),it=-1,ft=J.length;++it<ft;){var Dt=J[it],Ot=m[Dt];(Ot===e||ru(Ot,mx[Dt])&&!un.call(m,Dt))&&(m[Dt]=Y[Dt])}return m}),k_e=nr(function(m){return m.push(e,_pt),Gs(edt,e,m)});function R_e(m,v){return pft(m,ke(v,3),mh)}function N_e(m,v){return pft(m,ke(v,3),Mq)}function D_e(m,v){return m==null?m:Sq(m,ke(v,3),ms)}function O_e(m,v){return m==null?m:zft(m,ke(v,3),ms)}function z_e(m,v){return m&&mh(m,ke(v,3))}function F_e(m,v){return m&&Mq(m,ke(v,3))}function B_e(m){return m==null?[]:aI(m,po(m))}function H_e(m){return m==null?[]:aI(m,ms(m))}function rG(m,v,T){var N=m==null?e:i_(m,v);return N===e?T:N}function V_e(m,v){return m!=null&&xpt(m,v,ume)}function nG(m,v){return m!=null&&xpt(m,v,hme)}var U_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=j6.call(v)),m[v]=T},oG(gs)),q_e=fpt(function(m,v,T){v!=null&&typeof v.toString!="function"&&(v=j6.call(v)),un.call(m,v)?m[v].push(T):m[v]=[T]},ke),G_e=nr(kM);function po(m){return ds(m)?Ift(m):Aq(m)}function ms(m){return ds(m)?Ift(m,!0):bme(m)}function W_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){ap(T,v(N,V,Y),N)}),T}function Y_e(m,v){var T={};return v=ke(v,3),mh(m,function(N,V,Y){ap(T,V,v(N,V,Y))}),T}var j_e=vx(function(m,v,T){sI(m,v,T)}),edt=vx(function(m,v,T,N){sI(m,v,T,N)}),X_e=lp(function(m,v){var T={};if(m==null)return T;var N=!1;v=$n(v,function(Y){return Y=vm(Y,m),N||(N=Y.length>1),Y}),gh(m,Uq(m),T),N&&(T=Yl(T,c|u|h,Ume));for(var V=v.length;V--;)Nq(T,v[V]);return T});function $_e(m,v){return rdt(m,wI(ke(v)))}var K_e=lp(function(m,v){return m==null?{}:Sme(m,v)});function rdt(m,v){if(m==null)return{};var T=$n(Uq(m),function(N){return[N]});return v=ke(v),jft(m,T,function(N,V){return v(N,V[0])})}function Z_e(m,v,T){v=vm(v,m);var N=-1,V=v.length;for(V||(V=1,m=e);++N<V;){var Y=m==null?e:m[_h(v[N])];Y===e&&(N=V,Y=T),m=up(Y)?Y.call(m):Y}return m}function J_e(m,v,T){return m==null?m:NM(m,v,T)}function Q_e(m,v,T,N){return N=typeof N=="function"?N:e,m==null?m:NM(m,v,T,N)}var ndt=mpt(po),idt=mpt(ms);function tye(m,v,T){var N=$e(m),V=N||bm(m)||wx(m);if(v=ke(v,4),T==null){var Y=m&&m.constructor;V?T=N?new Y:[]:ei(m)?T=up(Y)?yx(K6(m)):{}:T={}}return(V?ql:mh)(m,function(J,it,ft){return v(T,J,it,ft)}),T}function eye(m,v){return m==null?!0:Nq(m,v)}function rye(m,v,T){return m==null?m:Jft(m,v,zq(T))}function nye(m,v,T,N){return N=typeof N=="function"?N:e,m==null?m:Jft(m,v,zq(T),N)}function Sx(m){return m==null?[]:mq(m,po(m))}function iye(m){return m==null?[]:mq(m,ms(m))}function oye(m,v,T){return T===e&&(T=v,v=e),T!==e&&(T=$l(T),T=T===T?T:0),v!==e&&(v=$l(v),v=v===v?v:0),n_($l(m),v,T)}function aye(m,v,T){return v=hp(v),T===e?(T=v,v=0):T=hp(T),m=$l(m),fme(m,v,T)}function sye(m,v,T){if(T&&typeof T!="boolean"&&ka(m,v,T)&&(v=T=e),T===e&&(typeof v=="boolean"?(T=v,v=e):typeof m=="boolean"&&(T=m,m=e)),m===e&&v===e?(m=0,v=1):(m=hp(m),v===e?(v=m,m=0):v=hp(v)),m>v){var N=m;m=v,v=N}if(T||m%1||v%1){var V=Aft();return ra(m+V*(v-m+Bpe("1e-"+((V+"").length-1))),v)}return Lq(m,v)}var lye=xx(function(m,v,T){return v=v.toLowerCase(),m+(T?odt(v):v)});function odt(m){return iG(on(m).toLowerCase())}function adt(m){return m=on(m),m&&m.replace(um,Jpe).replace(Ppe,"")}function cye(m,v,T){m=on(m),v=Ys(v);var N=m.length;T=T===e?N:n_(Qe(T),0,N);var V=T;return T-=v.length,T>=0&&m.slice(T,V)==v}function uye(m){return m=on(m),m&&Ar.test(m)?m.replace(yn,Qpe):m}function hye(m){return m=on(m),m&&cx.test(m)?m.replace(cn,"\\$&"):m}var fye=xx(function(m,v,T){return m+(T?"-":"")+v.toLowerCase()}),pye=xx(function(m,v,T){return m+(T?" ":"")+v.toLowerCase()}),dye=cpt("toLowerCase");function mye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;if(!v||N>=v)return m;var V=(v-N)/2;return pI(tI(V),T)+m+pI(Q6(V),T)}function gye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;return v&&N<v?m+pI(v-N,T):m}function _ye(m,v,T){m=on(m),v=Qe(v);var N=v?dx(m):0;return v&&N<v?pI(v-N,T)+m:m}function yye(m,v,T){return T||v==null?v=0:v&&(v=+v),Ede(on(m).replace(rp,""),v||0)}function vye(m,v,T){return(T?ka(m,v,T):v===e)?v=1:v=Qe(v),kq(on(m),v)}function xye(){var m=arguments,v=on(m[0]);return m.length<3?v:v.replace(m[1],m[2])}var bye=xx(function(m,v,T){return m+(T?"_":"")+v.toLowerCase()});function wye(m,v,T){return T&&typeof T!="number"&&ka(m,v,T)&&(v=T=e),T=T===e?rt:T>>>0,T?(m=on(m),m&&(typeof v=="string"||v!=null&&!eG(v))&&(v=Ys(v),!v&&px(m))?xm(tu(m),0,T):m.split(v,T)):[]}var Sye=xx(function(m,v,T){return m+(T?" ":"")+iG(v)});function Mye(m,v,T){return m=on(m),T=T==null?0:n_(Qe(T),0,m.length),v=Ys(v),m.slice(T,T+v.length)==v}function Eye(m,v,T){var N=G.templateSettings;T&&ka(m,v,T)&&(v=e),m=on(m),v=EI({},v,N,gpt);var V=EI({},v.imports,N.imports,gpt),Y=po(V),J=mq(V,Y),it,ft,Dt=0,Ot=v.interpolate||mr,Vt="__p += '",oe=_q((v.escape||mr).source+"|"+Ot.source+"|"+(Ot===Ia?tr:mr).source+"|"+(v.evaluate||mr).source+"|$","g"),Te="//# sourceURL="+(un.call(v,"sourceURL")?(v.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Npe+"]")+`
`;m.replace(oe,function(De,pr,yr,Xs,Ra,$s){return yr||(yr=Xs),Vt+=m.slice(Dt,$s).replace(Fl,tde),pr&&(it=!0,Vt+=`' +
__e(`+pr+`) +
'`),Ra&&(ft=!0,Vt+=`';
`+Ra+`;
__p += '`),yr&&(Vt+=`' +
((__t = (`+yr+`)) == null ? '' : __t) +
'`),Dt=$s+De.length,De}),Vt+=`';
`;var Ne=un.call(v,"variable")&&v.variable;if(!Ne)Vt=`with (obj) {
`+Vt+`
}
`;else if(Ve.test(Ne))throw new We(o);Vt=(ft?Vt.replace(Ce,""):Vt).replace(Pt,"$1").replace(Nt,"$1;"),Vt="function("+(Ne||"obj")+`) {
`+(Ne?"":`obj || (obj = {});
`)+"var __t, __p = ''"+(it?", __e = _.escape":"")+(ft?`, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
`:`;
`)+Vt+`return __p
}`;var er=ldt(function(){return $r(Y,Te+"return "+Vt).apply(e,J)});if(er.source=Vt,tG(er))throw er;return er}function Tye(m){return on(m).toLowerCase()}function Cye(m){return on(m).toUpperCase()}function Aye(m,v,T){if(m=on(m),m&&(T||v===e))return _ft(m);if(!m||!(v=Ys(v)))return m;var N=tu(m),V=tu(v),Y=yft(N,V),J=vft(N,V)+1;return xm(N,Y,J).join("")}function Pye(m,v,T){if(m=on(m),m&&(T||v===e))return m.slice(0,bft(m)+1);if(!m||!(v=Ys(v)))return m;var N=tu(m),V=vft(N,tu(v))+1;return xm(N,0,V).join("")}function Iye(m,v,T){if(m=on(m),m&&(T||v===e))return m.replace(rp,"");if(!m||!(v=Ys(v)))return m;var N=tu(m),V=yft(N,tu(v));return xm(N,V).join("")}function Lye(m,v){var T=O,N=D;if(ei(v)){var V="separator"in v?v.separator:V;T="length"in v?Qe(v.length):T,N="omission"in v?Ys(v.omission):N}m=on(m);var Y=m.length;if(px(m)){var J=tu(m);Y=J.length}if(T>=Y)return m;var it=T-dx(N);if(it<1)return N;var ft=J?xm(J,0,it).join(""):m.slice(0,it);if(V===e)return ft+N;if(J&&(it+=ft.length-it),eG(V)){if(m.slice(it).search(V)){var Dt,Ot=ft;for(V.global||(V=_q(V.source,on(Ke.exec(V))+"g")),V.lastIndex=0;Dt=V.exec(Ot);)var Vt=Dt.index;ft=ft.slice(0,Vt===e?it:Vt)}}else if(m.indexOf(Ys(V),it)!=it){var oe=ft.lastIndexOf(V);oe>-1&&(ft=ft.slice(0,oe))}return ft+N}function kye(m){return m=on(m),m&&Wi.test(m)?m.replace(ze,sde):m}var Rye=xx(function(m,v,T){return m+(T?" ":"")+v.toUpperCase()}),iG=cpt("toUpperCase");function sdt(m,v,T){return m=on(m),v=T?e:v,v===e?rde(m)?ude(m):jpe(m):m.match(v)||[]}var ldt=nr(function(m,v){try{return Gs(m,e,v)}catch(T){return tG(T)?T:new We(T)}}),Nye=lp(function(m,v){return ql(v,function(T){T=_h(T),ap(m,T,Jq(m[T],m))}),m});function Dye(m){var v=m==null?0:m.length,T=ke();return m=v?$n(m,function(N){if(typeof N[1]!="function")throw new Gl(i);return[T(N[0]),N[1]]}):[],nr(function(N){for(var V=-1;++V<v;){var Y=m[V];if(Gs(Y[0],this,N))return Gs(Y[1],this,N)}})}function Oye(m){return sme(Yl(m,c))}function oG(m){return function(){return m}}function zye(m,v){return m==null||m!==m?v:m}var Fye=hpt(),Bye=hpt(!0);function gs(m){return m}function aG(m){return Vft(typeof m=="function"?m:Yl(m,c))}function Hye(m){return qft(Yl(m,c))}function Vye(m,v){return Gft(m,Yl(v,c))}var Uye=nr(function(m,v){return function(T){return kM(T,m,v)}}),qye=nr(function(m,v){return function(T){return kM(m,T,v)}});function sG(m,v,T){var N=po(v),V=aI(v,N);T==null&&!(ei(v)&&(V.length||!N.length))&&(T=v,v=m,m=this,V=aI(v,po(v)));var Y=!(ei(T)&&"chain"in T)||!!T.chain,J=up(m);return ql(V,function(it){var ft=v[it];m[it]=ft,J&&(m.prototype[it]=function(){var Dt=this.__chain__;if(Y||Dt){var Ot=m(this.__wrapped__),Vt=Ot.__actions__=ps(this.__actions__);return Vt.push({func:ft,args:arguments,thisArg:m}),Ot.__chain__=Dt,Ot}return ft.apply(m,pm([this.value()],arguments))})}),m}function Gye(){return fo._===this&&(fo._=gde),this}function lG(){}function Wye(m){return m=Qe(m),nr(function(v){return Wft(v,m)})}var Yye=Bq($n),jye=Bq(fft),Xye=Bq(uq);function cdt(m){return Yq(m)?hq(_h(m)):Mme(m)}function $ye(m){return function(v){return m==null?e:i_(m,v)}}var Kye=ppt(),Zye=ppt(!0);function cG(){return[]}function uG(){return!1}function Jye(){return{}}function Qye(){return""}function tve(){return!0}function eve(m,v){if(m=Qe(m),m<1||m>U)return[];var T=rt,N=ra(m,rt);v=ke(v),m-=rt;for(var V=dq(N,v);++T<m;)v(T);return V}function rve(m){return $e(m)?$n(m,_h):js(m)?[m]:ps(Ppt(on(m)))}function nve(m){var v=++dde;return on(m)+v}var ive=fI(function(m,v){return m+v},0),ove=Hq("ceil"),ave=fI(function(m,v){return m/v},1),sve=Hq("floor");function lve(m){return m&&m.length?oI(m,gs,Eq):e}function cve(m,v){return m&&m.length?oI(m,ke(v,2),Eq):e}function uve(m){return mft(m,gs)}function hve(m,v){return mft(m,ke(v,2))}function fve(m){return m&&m.length?oI(m,gs,Pq):e}function pve(m,v){return m&&m.length?oI(m,ke(v,2),Pq):e}var dve=fI(function(m,v){return m*v},1),mve=Hq("round"),gve=fI(function(m,v){return m-v},0);function _ve(m){return m&&m.length?pq(m,gs):0}function yve(m,v){return m&&m.length?pq(m,ke(v,2)):0}return G.after=H0e,G.ary=Hpt,G.assign=C_e,G.assignIn=tdt,G.assignInWith=EI,G.assignWith=A_e,G.at=P_e,G.before=Vpt,G.bind=Jq,G.bindAll=Nye,G.bindKey=Upt,G.castArray=J0e,G.chain=zpt,G.chunk=sge,G.compact=lge,G.concat=cge,G.cond=Dye,G.conforms=Oye,G.constant=oG,G.countBy=_0e,G.create=I_e,G.curry=qpt,G.curryRight=Gpt,G.debounce=Wpt,G.defaults=L_e,G.defaultsDeep=k_e,G.defer=V0e,G.delay=U0e,G.difference=uge,G.differenceBy=hge,G.differenceWith=fge,G.drop=pge,G.dropRight=dge,G.dropRightWhile=mge,G.dropWhile=gge,G.fill=_ge,G.filter=v0e,G.flatMap=w0e,G.flatMapDeep=S0e,G.flatMapDepth=M0e,G.flatten=Rpt,G.flattenDeep=yge,G.flattenDepth=vge,G.flip=q0e,G.flow=Fye,G.flowRight=Bye,G.fromPairs=xge,G.functions=B_e,G.functionsIn=H_e,G.groupBy=E0e,G.initial=wge,G.intersection=Sge,G.intersectionBy=Mge,G.intersectionWith=Ege,G.invert=U_e,G.invertBy=q_e,G.invokeMap=C0e,G.iteratee=aG,G.keyBy=A0e,G.keys=po,G.keysIn=ms,G.map=vI,G.mapKeys=W_e,G.mapValues=Y_e,G.matches=Hye,G.matchesProperty=Vye,G.memoize=bI,G.merge=j_e,G.mergeWith=edt,G.method=Uye,G.methodOf=qye,G.mixin=sG,G.negate=wI,G.nthArg=Wye,G.omit=X_e,G.omitBy=$_e,G.once=G0e,G.orderBy=P0e,G.over=Yye,G.overArgs=W0e,G.overEvery=jye,G.overSome=Xye,G.partial=Qq,G.partialRight=Ypt,G.partition=I0e,G.pick=K_e,G.pickBy=rdt,G.property=cdt,G.propertyOf=$ye,G.pull=Pge,G.pullAll=Dpt,G.pullAllBy=Ige,G.pullAllWith=Lge,G.pullAt=kge,G.range=Kye,G.rangeRight=Zye,G.rearg=Y0e,G.reject=R0e,G.remove=Rge,G.rest=j0e,G.reverse=Kq,G.sampleSize=D0e,G.set=J_e,G.setWith=Q_e,G.shuffle=O0e,G.slice=Nge,G.sortBy=B0e,G.sortedUniq=Vge,G.sortedUniqBy=Uge,G.split=wye,G.spread=X0e,G.tail=qge,G.take=Gge,G.takeRight=Wge,G.takeRightWhile=Yge,G.takeWhile=jge,G.tap=l0e,G.throttle=$0e,G.thru=yI,G.toArray=Zpt,G.toPairs=ndt,G.toPairsIn=idt,G.toPath=rve,G.toPlainObject=Qpt,G.transform=tye,G.unary=K0e,G.union=Xge,G.unionBy=$ge,G.unionWith=Kge,G.uniq=Zge,G.uniqBy=Jge,G.uniqWith=Qge,G.unset=eye,G.unzip=Zq,G.unzipWith=Opt,G.update=rye,G.updateWith=nye,G.values=Sx,G.valuesIn=iye,G.without=t0e,G.words=sdt,G.wrap=Z0e,G.xor=e0e,G.xorBy=r0e,G.xorWith=n0e,G.zip=i0e,G.zipObject=o0e,G.zipObjectDeep=a0e,G.zipWith=s0e,G.entries=ndt,G.entriesIn=idt,G.extend=tdt,G.extendWith=EI,sG(G,G),G.add=ive,G.attempt=ldt,G.camelCase=lye,G.capitalize=odt,G.ceil=ove,G.clamp=oye,G.clone=Q0e,G.cloneDeep=e_e,G.cloneDeepWith=r_e,G.cloneWith=t_e,G.conformsTo=n_e,G.deburr=adt,G.defaultTo=zye,G.divide=ave,G.endsWith=cye,G.eq=ru,G.escape=uye,G.escapeRegExp=hye,G.every=y0e,G.find=x0e,G.findIndex=Lpt,G.findKey=R_e,G.findLast=b0e,G.findLastIndex=kpt,G.findLastKey=N_e,G.floor=sve,G.forEach=Fpt,G.forEachRight=Bpt,G.forIn=D_e,G.forInRight=O_e,G.forOwn=z_e,G.forOwnRight=F_e,G.get=rG,G.gt=i_e,G.gte=o_e,G.has=V_e,G.hasIn=nG,G.head=Npt,G.identity=gs,G.includes=T0e,G.indexOf=bge,G.inRange=aye,G.invoke=G_e,G.isArguments=s_,G.isArray=$e,G.isArrayBuffer=a_e,G.isArrayLike=ds,G.isArrayLikeObject=xi,G.isBoolean=s_e,G.isBuffer=bm,G.isDate=l_e,G.isElement=c_e,G.isEmpty=u_e,G.isEqual=h_e,G.isEqualWith=f_e,G.isError=tG,G.isFinite=p_e,G.isFunction=up,G.isInteger=jpt,G.isLength=SI,G.isMap=Xpt,G.isMatch=d_e,G.isMatchWith=m_e,G.isNaN=g_e,G.isNative=__e,G.isNil=v_e,G.isNull=y_e,G.isNumber=$pt,G.isObject=ei,G.isObjectLike=si,G.isPlainObject=FM,G.isRegExp=eG,G.isSafeInteger=x_e,G.isSet=Kpt,G.isString=MI,G.isSymbol=js,G.isTypedArray=wx,G.isUndefined=b_e,G.isWeakMap=w_e,G.isWeakSet=S_e,G.join=Tge,G.kebabCase=fye,G.last=Xl,G.lastIndexOf=Cge,G.lowerCase=pye,G.lowerFirst=dye,G.lt=M_e,G.lte=E_e,G.max=lve,G.maxBy=cve,G.mean=uve,G.meanBy=hve,G.min=fve,G.minBy=pve,G.stubArray=cG,G.stubFalse=uG,G.stubObject=Jye,G.stubString=Qye,G.stubTrue=tve,G.multiply=dve,G.nth=Age,G.noConflict=Gye,G.noop=lG,G.now=xI,G.pad=mye,G.padEnd=gye,G.padStart=_ye,G.parseInt=yye,G.random=sye,G.reduce=L0e,G.reduceRight=k0e,G.repeat=vye,G.replace=xye,G.result=Z_e,G.round=mve,G.runInContext=ut,G.sample=N0e,G.size=z0e,G.snakeCase=bye,G.some=F0e,G.sortedIndex=Dge,G.sortedIndexBy=Oge,G.sortedIndexOf=zge,G.sortedLastIndex=Fge,G.sortedLastIndexBy=Bge,G.sortedLastIndexOf=Hge,G.startCase=Sye,G.startsWith=Mye,G.subtract=gve,G.sum=_ve,G.sumBy=yve,G.template=Eye,G.times=eve,G.toFinite=hp,G.toInteger=Qe,G.toLength=Jpt,G.toLower=Tye,G.toNumber=$l,G.toSafeInteger=T_e,G.toString=on,G.toUpper=Cye,G.trim=Aye,G.trimEnd=Pye,G.trimStart=Iye,G.truncate=Lye,G.unescape=kye,G.uniqueId=nve,G.upperCase=Rye,G.upperFirst=iG,G.each=Fpt,G.eachRight=Bpt,G.first=Npt,sG(G,function(){var m={};return mh(G,function(v,T){un.call(G.prototype,T)||(m[T]=v)}),m}(),{chain:!1}),G.VERSION=t,ql(["bind","bindKey","curry","curryRight","partial","partialRight"],function(m){G[m].placeholder=G}),ql(["drop","take"],function(m,v){gr.prototype[m]=function(T){T=T===e?1:Xi(Qe(T),0);var N=this.__filtered__&&!v?new gr(this):this.clone();return N.__filtered__?N.__takeCount__=ra(T,N.__takeCount__):N.__views__.push({size:ra(T,rt),type:m+(N.__dir__<0?"Right":"")}),N},gr.prototype[m+"Right"]=function(T){return this.reverse()[m](T).reverse()}}),ql(["filter","map","takeWhile"],function(m,v){var T=v+1,N=T==L||T==F;gr.prototype[m]=function(V){var Y=this.clone();return Y.__iteratees__.push({iteratee:ke(V,3),type:T}),Y.__filtered__=Y.__filtered__||N,Y}}),ql(["head","last"],function(m,v){var T="take"+(v?"Right":"");gr.prototype[m]=function(){return this[T](1).value()[0]}}),ql(["initial","tail"],function(m,v){var T="drop"+(v?"":"Right");gr.prototype[m]=function(){return this.__filtered__?new gr(this):this[T](1)}}),gr.prototype.compact=function(){return this.filter(gs)},gr.prototype.find=function(m){return this.filter(m).head()},gr.prototype.findLast=function(m){return this.reverse().find(m)},gr.prototype.invokeMap=nr(function(m,v){return typeof m=="function"?new gr(this):this.map(function(T){return kM(T,m,v)})}),gr.prototype.reject=function(m){return this.filter(wI(ke(m)))},gr.prototype.slice=function(m,v){m=Qe(m);var T=this;return T.__filtered__&&(m>0||v<0)?new gr(T):(m<0?T=T.takeRight(-m):m&&(T=T.drop(m)),v!==e&&(v=Qe(v),T=v<0?T.dropRight(-v):T.take(v-m)),T)},gr.prototype.takeRightWhile=function(m){return this.reverse().takeWhile(m).reverse()},gr.prototype.toArray=function(){return this.take(rt)},mh(gr.prototype,function(m,v){var T=/^(?:filter|find|map|reject)|While$/.test(v),N=/^(?:head|last)$/.test(v),V=G[N?"take"+(v=="last"?"Right":""):v],Y=N||/^find/.test(v);!V||(G.prototype[v]=function(){var J=this.__wrapped__,it=N?[1]:arguments,ft=J instanceof gr,Dt=it[0],Ot=ft||$e(J),Vt=function(pr){var yr=V.apply(G,pm([pr],it));return N&&oe?yr[0]:yr};Ot&&T&&typeof Dt=="function"&&Dt.length!=1&&(ft=Ot=!1);var oe=this.__chain__,Te=!!this.__actions__.length,Ne=Y&&!oe,er=ft&&!Te;if(!Y&&Ot){J=er?J:new gr(this);var De=m.apply(J,it);return De.__actions__.push({func:yI,args:[Vt],thisArg:e}),new Wl(De,oe)}return Ne&&er?m.apply(this,it):(De=this.thru(Vt),Ne?N?De.value()[0]:De.value():De)})}),ql(["pop","push","shift","sort","splice","unshift"],function(m){var v=G6[m],T=/^(?:push|sort|unshift)$/.test(m)?"tap":"thru",N=/^(?:pop|shift)$/.test(m);G.prototype[m]=function(){var V=arguments;if(N&&!this.__chain__){var Y=this.value();return v.apply($e(Y)?Y:[],V)}return this[T](function(J){return v.apply($e(J)?J:[],V)})}}),mh(gr.prototype,function(m,v){var T=G[v];if(T){var N=T.name+"";un.call(_x,N)||(_x[N]=[]),_x[N].push({name:v,func:T})}}),_x[hI(e,g).name]=[{name:"wrapper",func:e}],gr.prototype.clone=kde,gr.prototype.reverse=Rde,gr.prototype.value=Nde,G.prototype.at=c0e,G.prototype.chain=u0e,G.prototype.commit=h0e,G.prototype.next=f0e,G.prototype.plant=d0e,G.prototype.reverse=m0e,G.prototype.toJSON=G.prototype.valueOf=G.prototype.value=g0e,G.prototype.first=G.prototype.head,EM&&(G.prototype[EM]=p0e),G},mm=hde();typeof define=="function"&&typeof define.amd=="object"&&define.amd?(fo._=mm,define(function(){return mm})):Q0?((Q0.exports=mm)._=mm,aq._=mm):fo._=mm}).call(Rx)});function __t(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new J9(r)}function J9(e){this._=e}function g2e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function _2e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function g_t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=m2e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var m2e,vs,y_t=M(()=>{m2e={value:function(){}};J9.prototype=__t.prototype={constructor:J9,on:function(e,t){var r=this._,n=g2e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=_2e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=g_t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=g_t(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new J9(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};vs=__t});var km=M(()=>{y_t()});function _Y(e){return+e}var Cvt=M(()=>{});function yY(e){return e*e}function vY(e){return e*(2-e)}function IL(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var Avt=M(()=>{});function xY(e){return e*e*e}function bY(e){return--e*e*e+1}function xs(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Pvt=M(()=>{});var wY,SY,MY,LL,Ivt=M(()=>{wY=3,SY=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(wY),MY=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(wY),LL=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(wY)});function EY(e){return+e==1?1:1-Math.cos(e*kvt)}function TY(e){return Math.sin(e*kvt)}function kL(e){return(1-Math.cos(Lvt*e))/2}var Lvt,kvt,Rvt=M(()=>{Lvt=Math.PI,kvt=Lvt/2});function Dh(e){return(Math.pow(2,-10*e)-.0009765625)*1.0009775171065494}var CY=M(()=>{});function AY(e){return Dh(1-+e)}function PY(e){return 1-Dh(e)}function RL(e){return((e*=2)<=1?Dh(1-e):2-Dh(e-1))/2}var Nvt=M(()=>{CY()});function IY(e){return 1-Math.sqrt(1-e*e)}function LY(e){return Math.sqrt(1- --e*e)}function NL(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var Dvt=M(()=>{});function RY(e){return 1-P_(1-e)}function P_(e){return(e=+e)<kY?DL*e*e:e<uSe?DL*(e-=cSe)*e+hSe:e<pSe?DL*(e-=fSe)*e+dSe:DL*(e-=mSe)*e+gSe}function NY(e){return((e*=2)<=1?1-P_(1-e):P_(e-1)+1)/2}var kY,cSe,uSe,hSe,fSe,pSe,dSe,mSe,gSe,DL,Ovt=M(()=>{kY=.36363636363636365,cSe=6/11,uSe=8/11,hSe=3/4,fSe=9/11,pSe=10/11,dSe=15/16,mSe=21/22,gSe=63/64,DL=1/kY/kY});var DY,OY,zY,OL,zvt=M(()=>{DY=1.70158,OY=function e(t){t=+t;function r(n){return(n=+n)*n*(t*(n-1)+n)}return r.overshoot=e,r}(DY),zY=function e(t){t=+t;function r(n){return--n*n*((n+1)*t+n)+1}return r.overshoot=e,r}(DY),OL=function e(t){t=+t;function r(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return r.overshoot=e,r}(DY)});var Sb,FY,BY,HY,zL,VY,Fvt=M(()=>{CY();Sb=2*Math.PI,FY=1,BY=.3,HY=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return t*Dh(- --o)*Math.sin((n-o)/r)}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY),zL=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return 1-t*Dh(o=+o)*Math.sin((o+n)/r)}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY),VY=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=Sb);function i(o){return((o=o*2-1)<0?t*Dh(-o)*Math.sin((n-o)/r):2-t*Dh(o)*Math.sin((n+o)/r))/2}return i.amplitude=function(o){return e(o,r*Sb)},i.period=function(o){return e(t,o)},i}(FY,BY)});var Bvt={};Ks(Bvt,{easeBack:()=>OL,easeBackIn:()=>OY,easeBackInOut:()=>OL,easeBackOut:()=>zY,easeBounce:()=>P_,easeBounceIn:()=>RY,easeBounceInOut:()=>NY,easeBounceOut:()=>P_,easeCircle:()=>NL,easeCircleIn:()=>IY,easeCircleInOut:()=>NL,easeCircleOut:()=>LY,easeCubic:()=>xs,easeCubicIn:()=>xY,easeCubicInOut:()=>xs,easeCubicOut:()=>bY,easeElastic:()=>zL,easeElasticIn:()=>HY,easeElasticInOut:()=>VY,easeElasticOut:()=>zL,easeExp:()=>RL,easeExpIn:()=>AY,easeExpInOut:()=>RL,easeExpOut:()=>PY,easeLinear:()=>_Y,easePoly:()=>LL,easePolyIn:()=>SY,easePolyInOut:()=>LL,easePolyOut:()=>MY,easeQuad:()=>IL,easeQuadIn:()=>yY,easeQuadInOut:()=>IL,easeQuadOut:()=>vY,easeSin:()=>kL,easeSinIn:()=>EY,easeSinInOut:()=>kL,easeSinOut:()=>TY});var I_=M(()=>{Cvt();Avt();Pvt();Ivt();Rvt();Nvt();Dvt();Ovt();zvt();Fvt()});function YL(){}function Qvt(e,t){var r=new YL;if(e instanceof YL)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var el,Ji,jL=M(()=>{el="$";YL.prototype=Qvt.prototype={constructor:YL,has:function(e){return el+e in this},get:function(e){return this[el+e]},set:function(e,t){return this[el+e]=t,this},remove:function(e){var t=el+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===el&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===el&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===el&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===el&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===el&&++e;return e},empty:function(){for(var e in this)if(e[0]===el)return!1;return!0},each:function(e){for(var t in this)t[0]===el&&e(this[t],t.slice(1),this)}};Ji=Qvt});function r1t(){var e=[],t=[],r,n,i;function o(s,l,c,u){if(l>=e.length)return r!=null&&s.sort(r),n!=null?n(s):s;for(var h=-1,f=s.length,p=e[l++],d,g,_=Ji(),y,x=c();++h<f;)(y=_.get(d=p(g=s[h])+""))?y.push(g):_.set(d,[g]);return _.each(function(b,S){u(x,S,o(b,l,c,u))}),x}function a(s,l){if(++l>e.length)return s;var c,u=t[l-1];return n!=null&&l>=e.length?c=s.entries():(c=[],s.each(function(h,f){c.push({key:f,values:a(h,l)})})),u!=null?c.sort(function(h,f){return u(h.key,f.key)}):c}return i={object:function(s){return o(s,0,NSe,DSe)},map:function(s){return o(s,0,t1t,e1t)},entries:function(s){return a(o(s,0,t1t,e1t),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return r=s,i},rollup:function(s){return n=s,i}}}function NSe(){return{}}function DSe(e,t,r){e[t]=r}function t1t(){return Ji()}function e1t(e,t,r){e.set(t,r)}var n1t=M(()=>{jL()});function XL(){}function i1t(e,t){var r=new XL;if(e instanceof XL)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var k_,o1t,a1t=M(()=>{jL();k_=Ji.prototype;XL.prototype=i1t.prototype={constructor:XL,has:k_.has,add:function(e){return e+="",this[el+e]=e,this},remove:k_.remove,clear:k_.clear,values:k_.keys,size:k_.size,empty:k_.empty,each:k_.each};o1t=i1t});function $L(e){var t=[];for(var r in e)t.push(r);return t}var s1t=M(()=>{});function l1t(e){var t=[];for(var r in e)t.push(e[r]);return t}var c1t=M(()=>{});function u1t(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var h1t=M(()=>{});var Tb=M(()=>{n1t();a1t();jL();s1t();c1t();h1t()});function v1t(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function GSe(e,t){var r=v1t(e);return function(n,i){return t(r(n),i,e)}}function y1t(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function ws(e,t){var r=e+"",n=r.length;return n<t?new Array(t-n+1).join(0)+r:r}function WSe(e){return e<0?"-"+ws(-e,6):e>9999?"+"+ws(e,6):ws(e,4)}function YSe(e){var t=e.getUTCHours(),r=e.getUTCMinutes(),n=e.getUTCSeconds(),i=e.getUTCMilliseconds();return isNaN(e)?"Invalid Date":WSe(e.getUTCFullYear(),4)+"-"+ws(e.getUTCMonth()+1,2)+"-"+ws(e.getUTCDate(),2)+(i?"T"+ws(t,2)+":"+ws(r,2)+":"+ws(n,2)+"."+ws(i,3)+"Z":n?"T"+ws(t,2)+":"+ws(r,2)+":"+ws(n,2)+"Z":r||t?"T"+ws(t,2)+":"+ws(r,2)+"Z":"")}function Wm(e){var t=new RegExp('["'+e+`
\r]`),r=e.charCodeAt(0);function n(h,f){var p,d,g=i(h,function(_,y){if(p)return p(_,y-1);d=_,p=f?GSe(_,f):v1t(_)});return g.columns=d||[],g}function i(h,f){var p=[],d=h.length,g=0,_=0,y,x=d<=0,b=!1;h.charCodeAt(d-1)===UE&&--d,h.charCodeAt(d-1)===nj&&--d;function S(){if(x)return ej;if(b)return b=!1,_1t;var P,k=g,O;if(h.charCodeAt(k)===rj){for(;g++<d&&h.charCodeAt(g)!==rj||h.charCodeAt(++g)===rj;);return(P=g)>=d?x=!0:(O=h.charCodeAt(g++))===UE?b=!0:O===nj&&(b=!0,h.charCodeAt(g)===UE&&++g),h.slice(k+1,P-1).replace(/""/g,'"')}for(;g<d;){if((O=h.charCodeAt(P=g++))===UE)b=!0;else if(O===nj)b=!0,h.charCodeAt(g)===UE&&++g;else if(O!==r)continue;return h.slice(k,P)}return x=!0,h.slice(k,d)}for(;(y=S())!==ej;){for(var C=[];y!==_1t&&y!==ej;)C.push(y),y=S();f&&(C=f(C,_++))==null||p.push(C)}return p}function o(h,f){return h.map(function(p){return f.map(function(d){return u(p[d])}).join(e)})}function a(h,f){return f==null&&(f=y1t(h)),[f.map(u).join(e)].concat(o(h,f)).join(`
`)}function s(h,f){return f==null&&(f=y1t(h)),o(h,f).join(`
`)}function l(h){return h.map(c).join(`
`)}function c(h){return h.map(u).join(e)}function u(h){return h==null?"":h instanceof Date?YSe(h):t.test(h+="")?'"'+h.replace(/"/g,'""')+'"':h}return{parse:n,parseRows:i,format:a,formatBody:s,formatRows:l,formatRow:c,formatValue:u}}var _1t,ej,rj,UE,nj,tk=M(()=>{_1t={},ej={},rj=34,UE=10,nj=13});var R_,Cb,x1t,b1t,w1t,S1t,M1t,E1t,T1t=M(()=>{tk();R_=Wm(","),Cb=R_.parse,x1t=R_.parseRows,b1t=R_.format,w1t=R_.formatBody,S1t=R_.formatRows,M1t=R_.formatRow,E1t=R_.formatValue});var N_,Ab,C1t,A1t,P1t,I1t,L1t,k1t,R1t=M(()=>{tk();N_=Wm("	"),Ab=N_.parse,C1t=N_.parseRows,A1t=N_.format,P1t=N_.formatBody,I1t=N_.formatRows,L1t=N_.formatRow,k1t=N_.formatValue});function ij(e){for(var t in e){var r=e[t].trim(),n,i;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(n=+r))r=n;else if(i=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))jSe&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;e[t]=r}return e}var jSe,N1t=M(()=>{jSe=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours()});var qE=M(()=>{tk();T1t();R1t();N1t()});var pe={};Ks(pe,{__assign:()=>y5e,__asyncDelegator:()=>A5e,__asyncGenerator:()=>C5e,__asyncValues:()=>P5e,__await:()=>U5,__awaiter:()=>S5e,__decorate:()=>x5e,__exportStar:()=>E5e,__extends:()=>_5e,__generator:()=>M5e,__makeTemplateObject:()=>I5e,__metadata:()=>w5e,__param:()=>b5e,__read:()=>nMt,__rest:()=>v5e,__spread:()=>T5e,__values:()=>y$});function _5e(e,t){g5e(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function v5e(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&(r[n[i]]=e[n[i]]);return r}function x5e(e,t,r,n){var i=arguments.length,o=i<3?t:n===null?n=Object.getOwnPropertyDescriptor(t,r):n,a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(o=(i<3?a(o):i>3?a(t,r,o):a(t,r))||o);return i>3&&o&&Object.defineProperty(t,r,o),o}function b5e(e,t){return function(r,n){t(r,n,e)}}function w5e(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function S5e(e,t,r,n){return new(r||(r=Promise))(function(i,o){function a(c){try{l(n.next(c))}catch(u){o(u)}}function s(c){try{l(n.throw(c))}catch(u){o(u)}}function l(c){c.done?i(c.value):new r(function(u){u(c.value)}).then(a,s)}l((n=n.apply(e,t||[])).next())})}function M5e(e,t){var r={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},n,i,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(c){return function(u){return l([c,u])}}function l(c){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(o=i[c[0]&2?"return":c[0]?"throw":"next"])&&!(o=o.call(i,c[1])).done)return o;switch(i=0,o&&(c=[0,o.value]),c[0]){case 0:case 1:o=c;break;case 4:return r.label++,{value:c[1],done:!1};case 5:r.label++,i=c[1],c=[0];continue;case 7:c=r.ops.pop(),r.trys.pop();continue;default:if(o=r.trys,!(o=o.length>0&&o[o.length-1])&&(c[0]===6||c[0]===2)){r=0;continue}if(c[0]===3&&(!o||c[1]>o[0]&&c[1]<o[3])){r.label=c[1];break}if(c[0]===6&&r.label<o[1]){r.label=o[1],o=c;break}if(o&&r.label<o[2]){r.label=o[2],r.ops.push(c);break}o[2]&&r.ops.pop(),r.trys.pop();continue}c=t.call(e,r)}catch(u){c=[6,u],i=0}finally{n=o=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}function E5e(e,t){for(var r in e)t.hasOwnProperty(r)||(t[r]=e[r])}function y$(e){var t=typeof Symbol=="function"&&e[Symbol.iterator],r=0;return t?t.call(e):{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}function nMt(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var n=r.call(e),i,o=[],a;try{for(;(t===void 0||t-- >0)&&!(i=n.next()).done;)o.push(i.value)}catch(s){a={error:s}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(a)throw a.error}}return o}function T5e(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(nMt(arguments[t]));return e}function U5(e){return this instanceof U5?(this.v=e,this):new U5(e)}function C5e(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r.apply(e,t||[]),i,o=[];return i={},a("next"),a("throw"),a("return"),i[Symbol.asyncIterator]=function(){return this},i;function a(f){n[f]&&(i[f]=function(p){return new Promise(function(d,g){o.push([f,p,d,g])>1||s(f,p)})})}function s(f,p){try{l(n[f](p))}catch(d){h(o[0][3],d)}}function l(f){f.value instanceof U5?Promise.resolve(f.value.v).then(c,u):h(o[0][2],f)}function c(f){s("next",f)}function u(f){s("throw",f)}function h(f,p){f(p),o.shift(),o.length&&s(o[0][0],o[0][1])}}function A5e(e){var t,r;return t={},n("next"),n("throw",function(i){throw i}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(i,o){e[i]&&(t[i]=function(a){return(r=!r)?{value:U5(e[i](a)),done:i==="return"}:o?o(a):a})}}function P5e(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator];return t?t.call(e):typeof y$=="function"?y$(e):e[Symbol.iterator]()}function I5e(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var g5e,y5e,de=M(()=>{g5e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};y5e=Object.assign||function(t){for(var r,n=1,i=arguments.length;n<i;n++){r=arguments[n];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o])}return t}});var iMt,oMt=M(()=>{iMt="4.13.0"});function _c(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var py=M(()=>{});function aR(e){return e.length===1&&(e=L5e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function L5e(e){return function(t,r){return _c(e(t),r)}}var v$=M(()=>{py()});var aMt,x$,sMt,sR,b$=M(()=>{py();v$();aMt=aR(_c),x$=aMt.right,sMt=aMt.left,sR=x$});function lMt(e,t){t==null&&(t=w$);for(var r=0,n=e.length-1,i=e[0],o=new Array(n<0?0:n);r<n;)o[r]=t(i,i=e[++r]);return o}function w$(e,t){return[e,t]}var S$=M(()=>{});function cMt(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=w$),a=l=0;a<n;++a)for(c=e[a],s=0;s<i;++s,++l)o[l]=r(c,t[s]);return o}var uMt=M(()=>{S$()});function hMt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var fMt=M(()=>{});function al(e){return e===null?NaN:+e}var l2=M(()=>{});function lR(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=al(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=al(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}var M$=M(()=>{l2()});function cR(e,t){var r=lR(e,t);return r&&Math.sqrt(r)}var E$=M(()=>{M$()});function uR(e,t){var r=e.length,n=-1,i,o,a;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=a=i;++n<r;)(i=e[n])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=a=i;++n<r;)(i=t(e[n],n,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var T$=M(()=>{});var pMt,dMt,mMt,C$=M(()=>{pMt=Array.prototype,dMt=pMt.slice,mMt=pMt.map});function q5(e){return function(){return e}}var gMt=M(()=>{});function _Mt(e){return e}var yMt=M(()=>{});function hR(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var A$=M(()=>{});function vMt(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=k$(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function k$(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=P$?10:o>=I$?5:o>=L$?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=P$?10:o>=I$?5:o>=L$?2:1)}function fR(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=P$?i*=10:o>=I$?i*=5:o>=L$&&(i*=2),t<e?-i:i}var P$,I$,L$,R$=M(()=>{P$=Math.sqrt(50),I$=Math.sqrt(10),L$=Math.sqrt(2)});function pR(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}var N$=M(()=>{});function xMt(){var e=_Mt,t=uR,r=pR;function n(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var c=t(l),u=c[0],h=c[1],f=r(l,u,h);Array.isArray(f)||(f=fR(u,h,f),f=hR(Math.ceil(u/f)*f,Math.floor(h/f)*f,f));for(var p=f.length;f[0]<=u;)f.shift(),--p;for(;f[p-1]>h;)f.pop(),--p;var d=new Array(p+1),g;for(o=0;o<=p;++o)g=d[o]=[],g.x0=o>0?f[o-1]:u,g.x1=o<p?f[o]:h;for(o=0;o<a;++o)s=l[o],u<=s&&s<=h&&d[sR(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:q5(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:q5([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?q5(dMt.call(i)):q5(i),n):r},n}var bMt=M(()=>{C$();b$();gMt();T$();yMt();A$();R$();N$()});function dy(e,t,r){if(r==null&&(r=al),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}var dR=M(()=>{l2()});function wMt(e,t,r){return e=mMt.call(e,al).sort(_c),Math.ceil((r-t)/(2*(dy(e,.75)-dy(e,.25))*Math.pow(e.length,-1/3)))}var SMt=M(()=>{C$();py();l2();dR()});function MMt(e,t,r){return Math.ceil((r-t)/(3.5*cR(e)*Math.pow(e.length,-1/3)))}var EMt=M(()=>{E$()});function TMt(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&i>o&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&i>o&&(o=i);return o}var CMt=M(()=>{});function AMt(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=al(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=al(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}var PMt=M(()=>{l2()});function IMt(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=al(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=al(t(e[n],n,e)))||o.push(i);return dy(o.sort(_c),.5)}var LMt=M(()=>{py();l2();dR()});function kMt(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}var RMt=M(()=>{});function mR(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&o>i&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&o>i&&(o=i);return o}var D$=M(()=>{});function NMt(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}var DMt=M(()=>{});function OMt(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,a=e[i];for(t==null&&(t=_c);++n<r;)(t(o=e[n],a)<0||t(a,a)!==0)&&(a=o,i=n);if(t(a,a)===0)return i}}var zMt=M(()=>{py()});function FMt(e,t,r){for(var n=(r==null?e.length:r)-(t=t==null?0:+t),i,o;n;)o=Math.random()*n--|0,i=e[n+t],e[n+t]=e[o+t],e[o+t]=i;return e}var BMt=M(()=>{});function HMt(e,t){var r=e.length,n=-1,i,o=0;if(t==null)for(;++n<r;)(i=+e[n])&&(o+=i);else for(;++n<r;)(i=+t(e[n],n,e))&&(o+=i);return o}var VMt=M(()=>{});function gR(e){if(!(o=e.length))return[];for(var t=-1,r=mR(e,k5e),n=new Array(r);++t<r;)for(var i=-1,o,a=n[t]=new Array(o);++i<o;)a[i]=e[i][t];return n}function k5e(e){return e.length}var O$=M(()=>{D$()});function UMt(){return gR(arguments)}var qMt=M(()=>{O$()});var GMt=M(()=>{b$();py();v$();uMt();fMt();E$();T$();bMt();SMt();EMt();N$();CMt();PMt();LMt();RMt();D$();S$();DMt();dR();A$();zMt();BMt();VMt();R$();O$();M$();qMt()});var _R,WMt=M(()=>{_R=Array.prototype.slice});function YMt(e){return e}var jMt=M(()=>{});function R5e(e){return"translate("+(e+.5)+",0)"}function N5e(e){return"translate(0,"+(e+.5)+")"}function D5e(e){return function(t){return+e(t)}}function O5e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function z5e(){return!this.__axis}function xR(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===yR||e===G5?-1:1,c=e===G5||e===vR?"x":"y",u=e===yR||e===z$?R5e:N5e;function h(f){var p=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,d=i==null?t.tickFormat?t.tickFormat.apply(t,r):YMt:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?O5e:D5e)(t.copy()),S=f.selection?f.selection():f,C=S.selectAll(".domain").data([null]),P=S.selectAll(".tick").data(p,t).order(),k=P.exit(),O=P.enter().append("g").attr("class","tick"),D=P.select("line"),B=P.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),P=P.merge(O),D=D.merge(O.append("line").attr("stroke","#000").attr(c+"2",l*o)),B=B.merge(O.append("text").attr("fill","#000").attr(c,l*g).attr("dy",e===yR?"0em":e===z$?"0.71em":"0.32em")),f!==S&&(C=C.transition(f),P=P.transition(f),D=D.transition(f),B=B.transition(f),k=k.transition(f).attr("opacity",XMt).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",XMt).attr("transform",function(I){var L=this.parentNode.__axis;return u(L&&isFinite(L=L(I))?L:b(I))})),k.remove(),C.attr("d",e===G5||e==vR?"M"+l*a+","+y+"H0.5V"+x+"H"+l*a:"M"+y+","+l*a+"V0.5H"+x+"V"+l*a),P.attr("opacity",1).attr("transform",function(I){return u(b(I))}),D.attr(c+"2",l*o),B.attr(c,l*g).text(d),S.filter(z5e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===vR?"start":e===G5?"end":"middle"),S.each(function(){this.__axis=b})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return r=_R.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:_R.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:_R.call(f),h):n&&n.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(o=a=+f,h):o},h.tickSizeInner=function(f){return arguments.length?(o=+f,h):o},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(s=+f,h):s},h}function $Mt(e){return xR(yR,e)}function KMt(e){return xR(vR,e)}function ZMt(e){return xR(z$,e)}function JMt(e){return xR(G5,e)}var yR,vR,z$,G5,XMt,QMt=M(()=>{WMt();jMt();yR=1,vR=2,z$=3,G5=4,XMt=1e-6});var tEt=M(()=>{QMt()});function rEt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new bR(r)}function bR(e){this._=e}function B5e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function H5e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function eEt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=F5e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var F5e,W5,nEt=M(()=>{F5e={value:function(){}};bR.prototype=rEt.prototype={constructor:bR,on:function(e,t){var r=this._,n=B5e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=H5e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=eEt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=eEt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new bR(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};W5=rEt});var F$=M(()=>{nEt()});var wR,B$,H$=M(()=>{wR="http://www.w3.org/1999/xhtml",B$={svg:"http://www.w3.org/2000/svg",xhtml:wR,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Vp(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),B$.hasOwnProperty(t)?{space:B$[t],local:e}:e}var SR=M(()=>{H$()});function V5e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===wR&&t.documentElement.namespaceURI===wR?t.createElement(e):t.createElementNS(r,e)}}function U5e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function MR(e){var t=Vp(e);return(t.local?U5e:V5e)(t)}var V$=M(()=>{SR();H$()});function q5e(){}function my(e){return e==null?q5e:function(){return this.querySelector(e)}}var ER=M(()=>{});function iEt(e){typeof e!="function"&&(e=my(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new fi(n,this._parents)}var oEt=M(()=>{wu();ER()});function G5e(){return[]}function Y5(e){return e==null?G5e:function(){return this.querySelectorAll(e)}}var U$=M(()=>{});function aEt(e){typeof e!="function"&&(e=Y5(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new fi(n,i)}var sEt=M(()=>{wu();U$()});function j5(e){return function(){return this.matches(e)}}var q$=M(()=>{});function lEt(e){typeof e!="function"&&(e=j5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new fi(n,this._parents)}var cEt=M(()=>{wu();q$()});function TR(e){return new Array(e.length)}var G$=M(()=>{});function uEt(){return new fi(this._enter||this._groups.map(TR),this._parents)}function X5(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var W$=M(()=>{G$();wu();X5.prototype={constructor:X5,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function hEt(e){return function(){return e}}var fEt=M(()=>{});function W5e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new X5(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function Y5e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=pEt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=pEt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new X5(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function dEt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?Y5e:W5e,n=this._parents,i=this._groups;typeof e!="function"&&(e=hEt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new fi(a,n),a._enter=s,a._exit=l,a}var pEt,mEt=M(()=>{wu();W$();fEt();pEt="$"});function gEt(){return new fi(this._exit||this._groups.map(TR),this._parents)}var _Et=M(()=>{G$();wu()});function yEt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var vEt=M(()=>{});function xEt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new fi(a,this._parents)}var bEt=M(()=>{wu()});function wEt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var SEt=M(()=>{});function MEt(e){e||(e=j5e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new fi(i,this._parents).order()}function j5e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var EEt=M(()=>{wu()});function TEt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var CEt=M(()=>{});function AEt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var PEt=M(()=>{});function IEt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var LEt=M(()=>{});function kEt(){var e=0;return this.each(function(){++e}),e}var REt=M(()=>{});function NEt(){return!this.node()}var DEt=M(()=>{});function OEt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var zEt=M(()=>{});function X5e(e){return function(){this.removeAttribute(e)}}function $5e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function K5e(e,t){return function(){this.setAttribute(e,t)}}function Z5e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function J5e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function Q5e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function FEt(e,t){var r=Vp(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?$5e:X5e:typeof t=="function"?r.local?Q5e:J5e:r.local?Z5e:K5e)(r,t))}var BEt=M(()=>{SR()});function CR(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Y$=M(()=>{});function tTe(e){return function(){this.style.removeProperty(e)}}function eTe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function rTe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function HEt(e,t,r){return arguments.length>1?this.each((t==null?tTe:typeof t=="function"?rTe:eTe)(e,t,r==null?"":r)):ag(this.node(),e)}function ag(e,t){return e.style.getPropertyValue(t)||CR(e).getComputedStyle(e,null).getPropertyValue(t)}var j$=M(()=>{Y$()});function nTe(e){return function(){delete this[e]}}function iTe(e,t){return function(){this[e]=t}}function oTe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function VEt(e,t){return arguments.length>1?this.each((t==null?nTe:typeof t=="function"?oTe:iTe)(e,t)):this.node()[e]}var UEt=M(()=>{});function qEt(e){return e.trim().split(/^|\s+/)}function X$(e){return e.classList||new GEt(e)}function GEt(e){this._node=e,this._names=qEt(e.getAttribute("class")||"")}function WEt(e,t){for(var r=X$(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function YEt(e,t){for(var r=X$(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function aTe(e){return function(){WEt(this,e)}}function sTe(e){return function(){YEt(this,e)}}function lTe(e,t){return function(){(t.apply(this,arguments)?WEt:YEt)(this,e)}}function jEt(e,t){var r=qEt(e+"");if(arguments.length<2){for(var n=X$(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?lTe:t?aTe:sTe)(r,t))}var XEt=M(()=>{GEt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function cTe(){this.textContent=""}function uTe(e){return function(){this.textContent=e}}function hTe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function $Et(e){return arguments.length?this.each(e==null?cTe:(typeof e=="function"?hTe:uTe)(e)):this.node().textContent}var KEt=M(()=>{});function fTe(){this.innerHTML=""}function pTe(e){return function(){this.innerHTML=e}}function dTe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function ZEt(e){return arguments.length?this.each(e==null?fTe:(typeof e=="function"?dTe:pTe)(e)):this.node().innerHTML}var JEt=M(()=>{});function mTe(){this.nextSibling&&this.parentNode.appendChild(this)}function QEt(){return this.each(mTe)}var t5t=M(()=>{});function gTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e5t(){return this.each(gTe)}var r5t=M(()=>{});function n5t(e){var t=typeof e=="function"?e:MR(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var i5t=M(()=>{V$()});function _Te(){return null}function o5t(e,t){var r=typeof e=="function"?e:MR(e),n=t==null?_Te:typeof t=="function"?t:my(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var a5t=M(()=>{V$();ER()});function yTe(){var e=this.parentNode;e&&e.removeChild(this)}function s5t(){return this.each(yTe)}var l5t=M(()=>{});function vTe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function xTe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c5t(e){return this.select(e?xTe:vTe)}var u5t=M(()=>{});function h5t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var f5t=M(()=>{});function bTe(e,t,r){return e=m5t(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function m5t(e,t,r){return function(n){var i=wr;wr=n;try{e.call(this,this.__data__,t,r)}finally{wr=i}}}function wTe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function STe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function MTe(e,t,r){var n=d5t.hasOwnProperty(e.type)?bTe:m5t;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function g5t(e,t,r){var n=wTe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?MTe:STe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function $$(e,t,r,n){var i=wr;e.sourceEvent=wr,wr=e;try{return t.apply(r,n)}finally{wr=i}}var d5t,wr,p5t,AR=M(()=>{d5t={},wr=null;typeof document!="undefined"&&(p5t=document.documentElement,"onmouseenter"in p5t||(d5t={mouseenter:"mouseover",mouseleave:"mouseout"}))});function _5t(e,t,r){var n=CR(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function ETe(e,t){return function(){return _5t(this,e,t)}}function TTe(e,t){return function(){return _5t(this,e,t.apply(this,arguments))}}function y5t(e,t){return this.each((typeof t=="function"?TTe:ETe)(e,t))}var v5t=M(()=>{Y$()});function fi(e,t){this._groups=e,this._parents=t}function x5t(){return new fi([[document.documentElement]],K$)}var K$,Up,wu=M(()=>{oEt();sEt();cEt();mEt();W$();_Et();vEt();bEt();SEt();EEt();CEt();PEt();LEt();REt();DEt();zEt();BEt();j$();UEt();XEt();KEt();JEt();t5t();r5t();i5t();a5t();l5t();u5t();f5t();AR();v5t();K$=[null];fi.prototype=x5t.prototype={constructor:fi,select:iEt,selectAll:aEt,filter:lEt,data:dEt,enter:uEt,exit:gEt,join:yEt,merge:xEt,order:wEt,sort:MEt,call:TEt,nodes:AEt,node:IEt,size:kEt,empty:NEt,each:OEt,attr:FEt,style:HEt,property:VEt,classed:jEt,text:$Et,html:ZEt,raise:QEt,lower:e5t,append:n5t,insert:o5t,remove:s5t,clone:c5t,datum:h5t,on:g5t,dispatch:y5t};Up=x5t});function qp(e){return typeof e=="string"?new fi([[document.querySelector(e)]],[document.documentElement]):new fi([[e]],K$)}var b5t=M(()=>{wu()});function w5t(){for(var e=wr,t;t=e.sourceEvent;)e=t;return e}var S5t=M(()=>{AR()});function M5t(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var E5t=M(()=>{});function PR(e){var t=w5t();return t.changedTouches&&(t=t.changedTouches[0]),M5t(e,t)}var T5t=M(()=>{S5t();E5t()});var Es=M(()=>{q$();T5t();SR();b5t();wu();ER();U$();j$();AR()});function IR(){wr.preventDefault(),wr.stopImmediatePropagation()}var C5t=M(()=>{Es()});function Z$(e){var t=e.document.documentElement,r=qp(e).on("dragstart.drag",IR,!0);"onselectstart"in t?r.on("selectstart.drag",IR,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function J$(e,t){var r=e.document.documentElement,n=qp(e).on("dragstart.drag",null);t&&(n.on("click.drag",IR,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var A5t=M(()=>{Es();C5t()});var P5t=M(()=>{A5t()});function LR(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Q$(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var I5t=M(()=>{});function Z5(){}function k5t(){return this.rgb().formatHex()}function NTe(){return F5t(this).formatHsl()}function R5t(){return this.rgb().formatRgb()}function Su(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=CTe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?N5t(t):r===3?new sl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?kR(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?kR(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ATe.exec(e))?new sl(t[1],t[2],t[3],1):(t=PTe.exec(e))?new sl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ITe.exec(e))?kR(t[1],t[2],t[3],t[4]):(t=LTe.exec(e))?kR(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=kTe.exec(e))?z5t(t[1],t[2]/100,t[3]/100,1):(t=RTe.exec(e))?z5t(t[1],t[2]/100,t[3]/100,t[4]):L5t.hasOwnProperty(e)?N5t(L5t[e]):e==="transparent"?new sl(NaN,NaN,NaN,0):null}function N5t(e){return new sl(e>>16&255,e>>8&255,e&255,1)}function kR(e,t,r,n){return n<=0&&(e=t=r=NaN),new sl(e,t,r,n)}function DTe(e){return e instanceof Z5||(e=Su(e)),e?(e=e.rgb(),new sl(e.r,e.g,e.b,e.opacity)):new sl}function u2(e,t,r,n){return arguments.length===1?DTe(e):new sl(e,t,r,n==null?1:n)}function sl(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function D5t(){return"#"+tK(this.r)+tK(this.g)+tK(this.b)}function O5t(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function tK(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function z5t(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Kh(e,t,r,n)}function F5t(e){if(e instanceof Kh)return new Kh(e.h,e.s,e.l,e.opacity);if(e instanceof Z5||(e=Su(e)),!e)return new Kh;if(e instanceof Kh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Kh(a,s,l,e.opacity)}function B5t(e,t,r,n){return arguments.length===1?F5t(e):new Kh(e,t,r,n==null?1:n)}function Kh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function eK(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var $5,RR,c2,K5,Zh,CTe,ATe,PTe,ITe,LTe,kTe,RTe,L5t,H5t=M(()=>{I5t();$5=.7,RR=1/$5,c2="\\s*([+-]?\\d+)\\s*",K5="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",CTe=/^#([0-9a-f]{3,8})$/,ATe=new RegExp("^rgb\\("+[c2,c2,c2]+"\\)$"),PTe=new RegExp("^rgb\\("+[Zh,Zh,Zh]+"\\)$"),ITe=new RegExp("^rgba\\("+[c2,c2,c2,K5]+"\\)$"),LTe=new RegExp("^rgba\\("+[Zh,Zh,Zh,K5]+"\\)$"),kTe=new RegExp("^hsl\\("+[K5,Zh,Zh]+"\\)$"),RTe=new RegExp("^hsla\\("+[K5,Zh,Zh,K5]+"\\)$"),L5t={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};LR(Z5,Su,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:k5t,formatHex:k5t,formatHsl:NTe,formatRgb:R5t,toString:R5t});LR(sl,u2,Q$(Z5,{brighter:function(e){return e=e==null?RR:Math.pow(RR,e),new sl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?$5:Math.pow($5,e),new sl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:D5t,formatHex:D5t,formatRgb:O5t,toString:O5t}));LR(Kh,B5t,Q$(Z5,{brighter:function(e){return e=e==null?RR:Math.pow(RR,e),new Kh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?$5:Math.pow($5,e),new Kh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new sl(eK(e>=240?e-240:e+120,i,n),eK(e,i,n),eK(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var NR=M(()=>{H5t()});function rK(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function V5t(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return rK((r-n/t)*t,a,i,o,s)}}var nK=M(()=>{});function U5t(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return rK((r-n/t)*t,i,o,a,s)}}var q5t=M(()=>{nK()});function J5(e){return function(){return e}}var iK=M(()=>{});function OTe(e,t){return function(r){return e+r*t}}function zTe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function G5t(e){return(e=+e)==1?DR:function(t,r){return r-t?zTe(t,r,e):J5(isNaN(t)?r:t)}}function DR(e,t){var r=t-e;return r?OTe(e,r):J5(isNaN(e)?t:e)}var W5t=M(()=>{iK()});function Y5t(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=u2(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var gy,FTe,BTe,oK=M(()=>{NR();nK();q5t();W5t();gy=function e(t){var r=G5t(t);function n(i,o){var a=r((i=u2(i)).r,(o=u2(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=DR(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);FTe=Y5t(V5t),BTe=Y5t(U5t)});function j5t(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function X5t(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var $5t=M(()=>{});function K5t(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=_y(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var Z5t=M(()=>{OR()});function J5t(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var Q5t=M(()=>{});function Ua(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Q5=M(()=>{});function tTt(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=_y(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var eTt=M(()=>{OR()});function HTe(e){return function(){return e}}function VTe(e){return function(t){return e(t)+""}}function tT(e,t){var r=sK.lastIndex=aK.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=sK.exec(e))&&(i=aK.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ua(n,i)})),r=aK.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?VTe(l[0].x):HTe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var sK,aK,lK=M(()=>{Q5();sK=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,aK=new RegExp(sK.source,"g")});function _y(e,t){var r=typeof t,n;return t==null||r==="boolean"?J5(t):(r==="number"?Ua:r==="string"?(n=Su(t))?(t=n,gy):tT:t instanceof Su?gy:t instanceof Date?J5t:X5t(t)?j5t:Array.isArray(t)?K5t:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tTt:Ua)(e,t)}var OR=M(()=>{NR();oK();Z5t();Q5t();Q5();eTt();lK();iK();$5t()});function cK(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*rTt,skewX:Math.atan(l)*rTt,scaleX:a,scaleY:s}}var rTt,zR,nTt=M(()=>{rTt=180/Math.PI,zR={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function oTt(e){return e==="none"?zR:(eT||(eT=document.createElement("DIV"),uK=document.documentElement,iTt=document.defaultView),eT.style.transform=e,e=iTt.getComputedStyle(uK.appendChild(eT),null).getPropertyValue("transform"),uK.removeChild(eT),e=e.slice(7,-1).split(","),cK(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function aTt(e){return e==null?zR:(FR||(FR=document.createElementNS("http://www.w3.org/2000/svg","g")),FR.setAttribute("transform",e),(e=FR.transform.baseVal.consolidate())?(e=e.matrix,cK(e.a,e.b,e.c,e.d,e.e,e.f)):zR)}var eT,uK,iTt,FR,sTt=M(()=>{nTt()});function lTt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Ua(c,h)},{i:g-2,x:Ua(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ua(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ua(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Ua(c,h)},{i:g-2,x:Ua(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var hK,fK,cTt=M(()=>{Q5();sTt();hK=lTt(oTt,"px, ","px)","deg)"),fK=lTt(aTt,", ",")",")")});var rT=M(()=>{OR();Q5();lK();cTt();oK()});function f2(){return yy||(fTt(UTe),yy=aT.now()+VR)}function UTe(){yy=0}function sT(){this._call=this._time=this._next=null}function UR(e,t,r){var n=new sT;return n.restart(e,t,r),n}function pTt(){f2(),++h2;for(var e=BR,t;e;)(t=yy-e._time)>=0&&e._call.call(null,t),e=e._next;--h2}function uTt(){yy=(HR=aT.now())+VR,h2=iT=0;try{pTt()}finally{h2=0,GTe(),yy=0}}function qTe(){var e=aT.now(),t=e-HR;t>hTt&&(VR-=t,HR=e)}function GTe(){for(var e,t=BR,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:BR=r);oT=e,pK(n)}function pK(e){if(!h2){iT&&(iT=clearTimeout(iT));var t=e-yy;t>24?(e<1/0&&(iT=setTimeout(uTt,e-aT.now()-VR)),nT&&(nT=clearInterval(nT))):(nT||(HR=aT.now(),nT=setInterval(qTe,hTt)),h2=1,fTt(uTt))}}var h2,iT,nT,hTt,BR,oT,HR,yy,VR,aT,fTt,dK=M(()=>{h2=0,iT=0,nT=0,hTt=1e3,HR=0,yy=0,VR=0,aT=typeof performance=="object"&&performance.now?performance:Date,fTt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};sT.prototype=UR.prototype={constructor:sT,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?f2():+r)+(t==null?0:+t),!this._next&&oT!==this&&(oT?oT._next=this:BR=this,oT=this),this._call=e,this._time=r,pK()},stop:function(){this._call&&(this._call=null,this._time=1/0,pK())}}});function qR(e,t,r){var n=new sT;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var dTt=M(()=>{dK()});var mK=M(()=>{dK();dTt()});function sg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;jTe(e,r,{name:t,index:n,group:i,on:WTe,tween:YTe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:gTt})}function cT(e,t){var r=Qi(e,t);if(r.state>gTt)throw new Error("too late; already scheduled");return r}function qa(e,t){var r=Qi(e,t);if(r.state>GR)throw new Error("too late; already running");return r}function Qi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function jTe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=UR(o,0,r.time);function o(c){r.state=gK,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==gK)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===GR)return qR(a);p.state===mTt?(p.state=lT,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=lT,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(qR(function(){r.state===GR&&(r.state=mTt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=WR,r.on.call("start",e,e.__data__,r.index,r.group),r.state===WR){for(r.state=GR,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=YR,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===YR&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=lT,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var WTe,YTe,gTt,gK,WR,GR,mTt,YR,lT,Ts=M(()=>{F$();mK();WTe=W5("start","end","cancel","interrupt"),YTe=[],gTt=0,gK=1,WR=2,GR=3,mTt=4,YR=5,lT=6});function p2(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>WR&&n.state<YR,n.state=lT,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var _K=M(()=>{Ts()});function _Tt(e){return this.each(function(){p2(this,e)})}var yTt=M(()=>{_K()});function XTe(e,t){var r,n;return function(){var i=qa(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function $Te(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=qa(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function vTt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Qi(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?XTe:$Te)(r,e,t))}function d2(e,t,r){var n=e._id;return e.each(function(){var i=qa(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Qi(i,n).value[t]}}var uT=M(()=>{Ts()});function jR(e,t){var r;return(typeof t=="number"?Ua:t instanceof Su?gy:(r=Su(t))?(t=r,gy):tT)(e,t)}var yK=M(()=>{NR();rT()});function KTe(e){return function(){this.removeAttribute(e)}}function ZTe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function JTe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function QTe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function tCe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function eCe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function xTt(e,t){var r=Vp(e),n=r==="transform"?fK:jR;return this.attrTween(e,typeof t=="function"?(r.local?eCe:tCe)(r,n,d2(this,"attr."+e,t)):t==null?(r.local?ZTe:KTe)(r):(r.local?QTe:JTe)(r,n,t))}var bTt=M(()=>{rT();Es();uT();yK()});function rCe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function nCe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function iCe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&nCe(e,o)),r}return i._value=t,i}function oCe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&rCe(e,o)),r}return i._value=t,i}function wTt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Vp(e);return this.tween(r,(n.local?iCe:oCe)(n,t))}var STt=M(()=>{Es()});function aCe(e,t){return function(){cT(this,e).delay=+t.apply(this,arguments)}}function sCe(e,t){return t=+t,function(){cT(this,e).delay=t}}function MTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?aCe:sCe)(t,e)):Qi(this.node(),t).delay}var ETt=M(()=>{Ts()});function lCe(e,t){return function(){qa(this,e).duration=+t.apply(this,arguments)}}function cCe(e,t){return t=+t,function(){qa(this,e).duration=t}}function TTt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?lCe:cCe)(t,e)):Qi(this.node(),t).duration}var CTt=M(()=>{Ts()});function uCe(e,t){if(typeof t!="function")throw new Error;return function(){qa(this,e).ease=t}}function ATt(e){var t=this._id;return arguments.length?this.each(uCe(t,e)):Qi(this.node(),t).ease}var PTt=M(()=>{Ts()});function ITt(e){typeof e!="function"&&(e=j5(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new ua(n,this._parents,this._name,this._id)}var LTt=M(()=>{Es();Gp()});function kTt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new ua(a,this._parents,this._name,this._id)}var RTt=M(()=>{Gp()});function hCe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function fCe(e,t,r){var n,i,o=hCe(t)?cT:qa;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function NTt(e,t){var r=this._id;return arguments.length<2?Qi(this.node(),r).on.on(e):this.each(fCe(r,e,t))}var DTt=M(()=>{Ts()});function pCe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function OTt(){return this.on("end.remove",pCe(this._id))}var zTt=M(()=>{});function FTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=my(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,sg(c[f],t,r,f,c,Qi(u,r)));return new ua(o,this._parents,t,r)}var BTt=M(()=>{Es();Gp();Ts()});function HTt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Y5(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=Qi(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&sg(p,t,r,g,f,d);o.push(f),a.push(u)}return new ua(o,a,t,r)}var VTt=M(()=>{Es();Gp();Ts()});function UTt(){return new dCe(this._groups,this._parents)}var dCe,qTt=M(()=>{Es();dCe=Up.prototype.constructor});function mCe(e,t){var r,n,i;return function(){var o=ag(this,e),a=(this.style.removeProperty(e),ag(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function GTt(e){return function(){this.style.removeProperty(e)}}function gCe(e,t,r){var n,i=r+"",o;return function(){var a=ag(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function _Ce(e,t,r){var n,i,o;return function(){var a=ag(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),ag(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function yCe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=qa(this,e),c=l.on,u=l.value[o]==null?s||(s=GTt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function WTt(e,t,r){var n=(e+="")=="transform"?hK:jR;return t==null?this.styleTween(e,mCe(e,n)).on("end.style."+e,GTt(e)):typeof t=="function"?this.styleTween(e,_Ce(e,n,d2(this,"style."+e,t))).each(yCe(this._id,e)):this.styleTween(e,gCe(e,n,t),r).on("end.style."+e,null)}var YTt=M(()=>{rT();Es();Ts();uT();yK()});function vCe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function xCe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&vCe(e,a,r)),n}return o._value=t,o}function jTt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,xCe(e,t,r==null?"":r))}var XTt=M(()=>{});function bCe(e){return function(){this.textContent=e}}function wCe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function $Tt(e){return this.tween("text",typeof e=="function"?wCe(d2(this,"text",e)):bCe(e==null?"":e+""))}var KTt=M(()=>{uT()});function SCe(e){return function(t){this.textContent=e.call(this,t)}}function MCe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&SCe(i)),t}return n._value=e,n}function ZTt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,MCe(e))}var JTt=M(()=>{});function QTt(){for(var e=this._name,t=this._id,r=XR(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=Qi(l,t);sg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new ua(n,this._parents,e,r)}var tCt=M(()=>{Gp();Ts()});function eCt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=qa(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var rCt=M(()=>{Ts()});function ua(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function vK(e){return Up().transition(e)}function XR(){return++ECe}var ECe,m2,Gp=M(()=>{Es();bTt();STt();ETt();CTt();PTt();LTt();RTt();DTt();zTt();BTt();VTt();qTt();YTt();XTt();KTt();JTt();tCt();uT();rCt();ECe=0;m2=Up.prototype;ua.prototype=vK.prototype={constructor:ua,select:FTt,selectAll:HTt,filter:ITt,merge:kTt,selection:UTt,transition:QTt,call:m2.call,nodes:m2.nodes,node:m2.node,size:m2.size,empty:m2.empty,each:m2.each,on:NTt,attr:xTt,attrTween:wTt,style:WTt,styleTween:jTt,text:$Tt,textTween:ZTt,remove:OTt,tween:vTt,delay:MTt,duration:TTt,ease:ATt,end:eCt}});function TCe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return xK.time=f2(),xK;return r}function nCt(e){var t,r;e instanceof ua?(t=e._id,e=e._name):(t=XR(),(r=xK).time=f2(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&sg(l,e,t,c,a,r||TCe(l,t));return new ua(n,this._parents,e,t)}var xK,iCt=M(()=>{Gp();Ts();I_();mK();xK={time:null,delay:0,duration:250,ease:xs}});var oCt=M(()=>{Es();yTt();iCt();Up.prototype.interrupt=_Tt;Up.prototype.transition=nCt});var aCt=M(()=>{Gp();Ts()});var sCt=M(()=>{oCt();Gp();aCt();_K()});function bK(e){return function(){return e}}var lCt=M(()=>{});function cCt(e,t,r){this.target=e,this.type=t,this.selection=r}var uCt=M(()=>{});function wK(){wr.stopImmediatePropagation()}function hT(){wr.preventDefault(),wr.stopImmediatePropagation()}var hCt=M(()=>{Es()});function fT(e){return{type:e}}function ICe(){return!wr.button}function LCe(){var e=this.ownerSVGElement||this;return[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function MK(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function EK(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function mCt(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function gCt(){return TK($R)}function _Ct(){return TK(KR)}function yCt(){return TK(CCe)}function TK(e){var t=LCe,r=ICe,n=W5(a,"start","brush","end"),i=6,o;function a(f){var p=f.property("__brush",h).selectAll(".overlay").data([fT("overlay")]);p.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Wp.overlay).merge(p).each(function(){var g=MK(this).extent;qp(this).attr("x",g[0][0]).attr("y",g[0][1]).attr("width",g[1][0]-g[0][0]).attr("height",g[1][1]-g[0][1])}),f.selectAll(".selection").data([fT("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Wp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var d=f.selectAll(".handle").data(e.handles,function(g){return g.type});d.exit().remove(),d.enter().append("rect").attr("class",function(g){return"handle handle--"+g.type}).attr("cursor",function(g){return Wp[g.type]}),f.each(s).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",u)}a.move=function(f,p){f.selection?f.on("start.brush",function(){l(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){l(this,arguments).end()}).tween("brush",function(){var d=this,g=d.__brush,_=l(d,arguments),y=g.selection,x=e.input(typeof p=="function"?p.apply(this,arguments):p,g.extent),b=_y(y,x);function S(C){g.selection=C===1&&EK(x)?null:b(C),s.call(d),_.brush()}return y&&x?S:S(1)}):f.each(function(){var d=this,g=arguments,_=d.__brush,y=e.input(typeof p=="function"?p.apply(d,g):p,_.extent),x=l(d,g).beforestart();p2(d),_.selection=y==null||EK(y)?null:y,s.call(d),x.start().brush().end()})};function s(){var f=qp(this),p=MK(this).selection;p?(f.selectAll(".selection").style("display",null).attr("x",p[0][0]).attr("y",p[0][1]).attr("width",p[1][0]-p[0][0]).attr("height",p[1][1]-p[0][1]),f.selectAll(".handle").style("display",null).attr("x",function(d){return d.type[d.type.length-1]==="e"?p[1][0]-i/2:p[0][0]-i/2}).attr("y",function(d){return d.type[0]==="s"?p[1][1]-i/2:p[0][1]-i/2}).attr("width",function(d){return d.type==="n"||d.type==="s"?p[1][0]-p[0][0]+i:i}).attr("height",function(d){return d.type==="e"||d.type==="w"?p[1][1]-p[0][1]+i:i})):f.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function l(f,p){return f.__brush.emitter||new c(f,p)}function c(f,p){this.that=f,this.args=p,this.state=f.__brush,this.active=0}c.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(f){$$(new cCt(a,f,e.output(this.state.selection)),n.apply,n,[f,this.that,this.args])}};function u(){if(wr.touches){if(wr.changedTouches.length<wr.touches.length)return hT()}else if(o)return;if(!r.apply(this,arguments))return;var f=this,p=wr.target.__data__.type,d=(wr.metaKey?p="overlay":p)==="selection"?fCt:wr.altKey?_2:g2,g=e===KR?null:ACe[p],_=e===$R?null:PCe[p],y=MK(f),x=y.extent,b=y.selection,S=x[0][0],C,P,k=x[0][1],O,D,B=x[1][0],I,L,R=x[1][1],F,z,U,W,Z,rt=g&&_&&wr.shiftKey,ot,st,St=PR(f),bt=St,Mt=l(f,arguments).beforestart();p==="overlay"?y.selection=b=[[C=e===KR?S:St[0],O=e===$R?k:St[1]],[I=e===KR?B:C,F=e===$R?R:O]]:(C=b[0][0],O=b[0][1],I=b[1][0],F=b[1][1]),P=C,D=O,L=I,z=F;var lt=qp(f).attr("pointer-events","none"),Kt=lt.selectAll(".overlay").attr("cursor",Wp[p]);if(wr.touches)lt.on("touchmove.brush",ct,!0).on("touchend.brush touchcancel.brush",et,!0);else{var _t=qp(wr.view).on("keydown.brush",dt,!0).on("keyup.brush",q,!0).on("mousemove.brush",ct,!0).on("mouseup.brush",et,!0);Z$(wr.view)}wK(),p2(f),s.call(f),Mt.start();function ct(){var pt=PR(f);rt&&!ot&&!st&&(Math.abs(pt[0]-bt[0])>Math.abs(pt[1]-bt[1])?st=!0:ot=!0),bt=pt,Z=!0,hT(),X()}function X(){var pt;switch(U=bt[0]-St[0],W=bt[1]-St[1],d){case SK:case fCt:{g&&(U=Math.max(S-C,Math.min(B-I,U)),P=C+U,L=I+U),_&&(W=Math.max(k-O,Math.min(R-F,W)),D=O+W,z=F+W);break}case g2:{g<0?(U=Math.max(S-C,Math.min(B-C,U)),P=C+U,L=I):g>0&&(U=Math.max(S-I,Math.min(B-I,U)),P=C,L=I+U),_<0?(W=Math.max(k-O,Math.min(R-O,W)),D=O+W,z=F):_>0&&(W=Math.max(k-F,Math.min(R-F,W)),D=O,z=F+W);break}case _2:{g&&(P=Math.max(S,Math.min(B,C-U*g)),L=Math.max(S,Math.min(B,I+U*g))),_&&(D=Math.max(k,Math.min(R,O-W*_)),z=Math.max(k,Math.min(R,F+W*_)));break}}L<P&&(g*=-1,pt=C,C=I,I=pt,pt=P,P=L,L=pt,p in pCt&&Kt.attr("cursor",Wp[p=pCt[p]])),z<D&&(_*=-1,pt=O,O=F,F=pt,pt=D,D=z,z=pt,p in dCt&&Kt.attr("cursor",Wp[p=dCt[p]])),y.selection&&(b=y.selection),ot&&(P=b[0][0],L=b[1][0]),st&&(D=b[0][1],z=b[1][1]),(b[0][0]!==P||b[0][1]!==D||b[1][0]!==L||b[1][1]!==z)&&(y.selection=[[P,D],[L,z]],s.call(f),Mt.brush())}function et(){if(wK(),wr.touches){if(wr.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500),lt.on("touchmove.brush touchend.brush touchcancel.brush",null)}else J$(wr.view,Z),_t.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);lt.attr("pointer-events","all"),Kt.attr("cursor",Wp.overlay),y.selection&&(b=y.selection),EK(b)&&(y.selection=null,s.call(f)),Mt.end()}function dt(){switch(wr.keyCode){case 16:{rt=g&&_;break}case 18:{d===g2&&(g&&(I=L-U*g,C=P+U*g),_&&(F=z-W*_,O=D+W*_),d=_2,X());break}case 32:{(d===g2||d===_2)&&(g<0?I=L-U:g>0&&(C=P-U),_<0?F=z-W:_>0&&(O=D-W),d=SK,Kt.attr("cursor",Wp.selection),X());break}default:return}hT()}function q(){switch(wr.keyCode){case 16:{rt&&(ot=st=rt=!1,X());break}case 18:{d===_2&&(g<0?I=L:g>0&&(C=P),_<0?F=z:_>0&&(O=D),d=g2,X());break}case 32:{d===SK&&(wr.altKey?(g&&(I=L-U*g,C=P+U*g),_&&(F=z-W*_,O=D+W*_),d=_2):(g<0?I=L:g>0&&(C=P),_<0?F=z:_>0&&(O=D),d=g2),Kt.attr("cursor",Wp[p]),X());break}default:return}hT()}}function h(){var f=this.__brush||{selection:null};return f.extent=t.apply(this,arguments),f.dim=e,f}return a.extent=function(f){return arguments.length?(t=typeof f=="function"?f:bK([[+f[0][0],+f[0][1]],[+f[1][0],+f[1][1]]]),a):t},a.filter=function(f){return arguments.length?(r=typeof f=="function"?f:bK(!!f),a):r},a.handleSize=function(f){return arguments.length?(i=+f,a):i},a.on=function(){var f=n.on.apply(n,arguments);return f===n?a:f},a}var fCt,SK,g2,_2,$R,KR,CCe,Wp,pCt,dCt,ACe,PCe,vCt=M(()=>{F$();P5t();rT();Es();sCt();lCt();uCt();hCt();fCt={name:"drag"},SK={name:"space"},g2={name:"handle"},_2={name:"center"},$R={name:"x",handles:["e","w"].map(fT),input:function(e,t){return e&&[[e[0],t[0][1]],[e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},KR={name:"y",handles:["n","s"].map(fT),input:function(e,t){return e&&[[t[0][0],e[0]],[t[1][0],e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},CCe={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(fT),input:function(e){return e},output:function(e){return e}},Wp={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},pCt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},dCt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ACe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},PCe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1}});var xCt=M(()=>{vCt()});function lg(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var vy=M(()=>{});function CK(e){return e.length===1&&(e=kCe(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function kCe(e){return function(t,r){return lg(e(t),r)}}var AK=M(()=>{vy()});var bCt,RCe,NCe,PK=M(()=>{vy();AK();bCt=CK(lg),RCe=bCt.right,NCe=bCt.left});var IK=M(()=>{});var wCt=M(()=>{IK()});var SCt=M(()=>{});var y2=M(()=>{});var LK=M(()=>{y2()});var kK=M(()=>{LK()});var RK=M(()=>{});var MCt,OCe,zCe,NK=M(()=>{MCt=Array.prototype,OCe=MCt.slice,zCe=MCt.map});var ECt=M(()=>{});var TCt=M(()=>{});function pT(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var DK=M(()=>{});var Sln,Mln,Eln,OK=M(()=>{Sln=Math.sqrt(50),Mln=Math.sqrt(10),Eln=Math.sqrt(2)});var zK=M(()=>{});var CCt=M(()=>{NK();PK();ECt();RK();TCt();DK();OK();zK()});var JR=M(()=>{y2()});var PCt=M(()=>{NK();vy();y2();JR()});var ICt=M(()=>{kK()});var LCt=M(()=>{});var kCt=M(()=>{y2()});var RCt=M(()=>{vy();y2();JR()});var NCt=M(()=>{});var FK=M(()=>{});var DCt=M(()=>{});var OCt=M(()=>{vy()});var zCt=M(()=>{});var FCt=M(()=>{});var BK=M(()=>{FK()});var BCt=M(()=>{BK()});var HCt=M(()=>{PK();vy();AK();wCt();SCt();kK();RK();CCt();PCt();ICt();zK();LCt();kCt();RCt();NCt();FK();IK();DCt();JR();DK();OCt();zCt();FCt();OK();BK();LK();BCt()});var HK,VK,VCt,dT,UK,qK,GK=M(()=>{HK=Math.cos,VK=Math.sin,VCt=Math.PI,dT=VCt/2,UK=VCt*2,qK=Math.max});function WCe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function UCt(){var e=0,t=null,r=null,n=null;function i(o){var a=o.length,s=[],l=pT(a),c=[],u=[],h=u.groups=new Array(a),f=new Array(a*a),p,d,g,_,y,x;for(p=0,y=-1;++y<a;){for(d=0,x=-1;++x<a;)d+=o[y][x];s.push(d),c.push(pT(a)),p+=d}for(t&&l.sort(function(B,I){return t(s[B],s[I])}),r&&c.forEach(function(B,I){B.sort(function(L,R){return r(o[I][L],o[I][R])})}),p=qK(0,UK-e*a)/p,_=p?e:UK/a,d=0,y=-1;++y<a;){for(g=d,x=-1;++x<a;){var b=l[y],S=c[b][x],C=o[b][S],P=d,k=d+=C*p;f[S*a+b]={index:b,subindex:S,startAngle:P,endAngle:k,value:C}}h[b]={index:b,startAngle:g,endAngle:d,value:s[b]},d+=_}for(y=-1;++y<a;)for(x=y-1;++x<a;){var O=f[x*a+y],D=f[y*a+x];(O.value||D.value)&&u.push(O.value<D.value?{source:D,target:O}:{source:O,target:D})}return n?u.sort(n):u}return i.padAngle=function(o){return arguments.length?(e=qK(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(r=o,i):r},i.sortChords=function(o){return arguments.length?(o==null?n=null:(n=WCe(o))._=o,i):n&&n._},i}var qCt=M(()=>{HCt();GK()});var GCt,WCt=M(()=>{GCt=Array.prototype.slice});function QR(e){return function(){return e}}var YCt=M(()=>{});function jK(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function jCt(){return new jK}var WK,YK,xy,YCe,XK,XCt=M(()=>{WK=Math.PI,YK=2*WK,xy=1e-6,YCe=YK-xy;jK.prototype=jCt.prototype={constructor:jK,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>xy)if(!(Math.abs(u*s-l*c)>xy)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((WK-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>xy&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>xy||Math.abs(this._y1-c)>xy)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%YK+YK),h>YCe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>xy&&(this._+="A"+r+","+r+",0,"+ +(h>=WK)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};XK=jCt});var $Ct=M(()=>{XCt()});function jCe(e){return e.source}function XCe(e){return e.target}function $Ce(e){return e.radius}function KCe(e){return e.startAngle}function ZCe(e){return e.endAngle}function KCt(){var e=jCe,t=XCe,r=$Ce,n=KCe,i=ZCe,o=null;function a(){var s,l=GCt.call(arguments),c=e.apply(this,l),u=t.apply(this,l),h=+r.apply(this,(l[0]=c,l)),f=n.apply(this,l)-dT,p=i.apply(this,l)-dT,d=h*HK(f),g=h*VK(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-dT,x=i.apply(this,l)-dT;if(o||(o=s=XK()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*HK(y),_*VK(y)),o.arc(0,0,_,y,x)),o.quadraticCurveTo(0,0,d,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(r=typeof s=="function"?s:QR(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:QR(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:QR(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}var ZCt=M(()=>{WCt();YCt();GK();$Ct()});var JCt=M(()=>{qCt();ZCt()});function tN(){}function QCt(e,t){var r=new tN;if(e instanceof tN)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var ll,by,eN=M(()=>{ll="$";tN.prototype=QCt.prototype={constructor:tN,has:function(e){return ll+e in this},get:function(e){return this[ll+e]},set:function(e,t){return this[ll+e]=t,this},remove:function(e){var t=ll+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===ll&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===ll&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===ll&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===ll&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===ll&&++e;return e},empty:function(){for(var e in this)if(e[0]===ll)return!1;return!0},each:function(e){for(var t in this)t[0]===ll&&e(this[t],t.slice(1),this)}};by=QCt});function rAt(){var e=[],t=[],r,n,i;function o(s,l,c,u){if(l>=e.length)return r!=null&&s.sort(r),n!=null?n(s):s;for(var h=-1,f=s.length,p=e[l++],d,g,_=by(),y,x=c();++h<f;)(y=_.get(d=p(g=s[h])+""))?y.push(g):_.set(d,[g]);return _.each(function(b,S){u(x,S,o(b,l,c,u))}),x}function a(s,l){if(++l>e.length)return s;var c,u=t[l-1];return n!=null&&l>=e.length?c=s.entries():(c=[],s.each(function(h,f){c.push({key:f,values:a(h,l)})})),u!=null?c.sort(function(h,f){return u(h.key,f.key)}):c}return i={object:function(s){return o(s,0,JCe,QCe)},map:function(s){return o(s,0,tAt,eAt)},entries:function(s){return a(o(s,0,tAt,eAt),0)},key:function(s){return e.push(s),i},sortKeys:function(s){return t[e.length-1]=s,i},sortValues:function(s){return r=s,i},rollup:function(s){return n=s,i}}}function JCe(){return{}}function QCe(e,t,r){e[t]=r}function tAt(){return by()}function eAt(e,t,r){e.set(t,r)}var nAt=M(()=>{eN()});function rN(){}function iAt(e,t){var r=new rN;if(e instanceof rN)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var wy,oAt,aAt=M(()=>{eN();wy=by.prototype;rN.prototype=iAt.prototype={constructor:rN,has:wy.has,add:function(e){return e+="",this[ll+e]=e,this},remove:wy.remove,clear:wy.clear,values:wy.keys,size:wy.size,empty:wy.empty,each:wy.each};oAt=iAt});function sAt(e){var t=[];for(var r in e)t.push(r);return t}var lAt=M(()=>{});function cAt(e){var t=[];for(var r in e)t.push(e[r]);return t}var uAt=M(()=>{});function hAt(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t}var fAt=M(()=>{});var pAt=M(()=>{nAt();aAt();eN();lAt();uAt();fAt()});function Yp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function cg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var nN=M(()=>{});function tf(){}function x2(e){var t;return e=(e+"").trim().toLowerCase(),(t=tAe.exec(e))?(t=parseInt(t[1],16),new to(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1)):(t=eAe.exec(e))?mAt(parseInt(t[1],16)):(t=rAe.exec(e))?new to(t[1],t[2],t[3],1):(t=nAe.exec(e))?new to(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=iAe.exec(e))?gAt(t[1],t[2],t[3],t[4]):(t=oAe.exec(e))?gAt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=aAe.exec(e))?_At(t[1],t[2]/100,t[3]/100,1):(t=sAe.exec(e))?_At(t[1],t[2]/100,t[3]/100,t[4]):dAt.hasOwnProperty(e)?mAt(dAt[e]):e==="transparent"?new to(NaN,NaN,NaN,0):null}function mAt(e){return new to(e>>16&255,e>>8&255,e&255,1)}function gAt(e,t,r,n){return n<=0&&(e=t=r=NaN),new to(e,t,r,n)}function gT(e){return e instanceof tf||(e=x2(e)),e?(e=e.rgb(),new to(e.r,e.g,e.b,e.opacity)):new to}function KK(e,t,r,n){return arguments.length===1?gT(e):new to(e,t,r,n==null?1:n)}function to(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function _At(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Jh(e,t,r,n)}function lAe(e){if(e instanceof Jh)return new Jh(e.h,e.s,e.l,e.opacity);if(e instanceof tf||(e=x2(e)),!e)return new Jh;if(e instanceof Jh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Jh(a,s,l,e.opacity)}function ZK(e,t,r,n){return arguments.length===1?lAe(e):new Jh(e,t,r,n==null?1:n)}function Jh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function $K(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var ug,Sy,v2,mT,Qh,tAe,eAe,rAe,nAe,iAe,oAe,aAe,sAe,dAt,iN=M(()=>{nN();ug=.7,Sy=1/ug,v2="\\s*([+-]?\\d+)\\s*",mT="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tAe=/^#([0-9a-f]{3})$/,eAe=/^#([0-9a-f]{6})$/,rAe=new RegExp("^rgb\\("+[v2,v2,v2]+"\\)$"),nAe=new RegExp("^rgb\\("+[Qh,Qh,Qh]+"\\)$"),iAe=new RegExp("^rgba\\("+[v2,v2,v2,mT]+"\\)$"),oAe=new RegExp("^rgba\\("+[Qh,Qh,Qh,mT]+"\\)$"),aAe=new RegExp("^hsl\\("+[mT,Qh,Qh]+"\\)$"),sAe=new RegExp("^hsla\\("+[mT,Qh,Qh,mT]+"\\)$"),dAt={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};Yp(tf,x2,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}});Yp(to,KK,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new to(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,e),new to(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}}));Yp(Jh,ZK,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new Jh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,e),new Jh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new to($K(e>=240?e-240:e+120,i,n),$K(e,i,n),$K(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}))});var oN,aN,JK=M(()=>{oN=Math.PI/180,aN=180/Math.PI});function nZ(e){if(e instanceof jp)return new jp(e.l,e.a,e.b,e.opacity);if(e instanceof hg){var t=e.h*oN;return new jp(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}e instanceof to||(e=gT(e));var r=rZ(e.r),n=rZ(e.g),i=rZ(e.b),o=QK((.4124564*r+.3575761*n+.1804375*i)/yAt),a=QK((.2126729*r+.7151522*n+.072175*i)/vAt),s=QK((.0193339*r+.119192*n+.9503041*i)/xAt);return new jp(116*a-16,500*(o-a),200*(a-s),e.opacity)}function lN(e,t,r,n){return arguments.length===1?nZ(e):new jp(e,t,r,n==null?1:n)}function jp(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function QK(e){return e>cAe?Math.pow(e,1/3):e/wAt+bAt}function tZ(e){return e>b2?e*e*e:wAt*(e-bAt)}function eZ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function rZ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function uAe(e){if(e instanceof hg)return new hg(e.h,e.c,e.l,e.opacity);e instanceof jp||(e=nZ(e));var t=Math.atan2(e.b,e.a)*aN;return new hg(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function iZ(e,t,r,n){return arguments.length===1?uAe(e):new hg(e,t,r,n==null?1:n)}function hg(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}var sN,yAt,vAt,xAt,bAt,b2,wAt,cAe,SAt=M(()=>{nN();iN();JK();sN=18,yAt=.95047,vAt=1,xAt=1.08883,bAt=4/29,b2=6/29,wAt=3*b2*b2,cAe=b2*b2*b2;Yp(jp,lN,cg(tf,{brighter:function(e){return new jp(this.l+sN*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new jp(this.l-sN*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return e=vAt*tZ(e),t=yAt*tZ(t),r=xAt*tZ(r),new to(eZ(3.2404542*t-1.5371385*e-.4985314*r),eZ(-.969266*t+1.8760108*e+.041556*r),eZ(.0556434*t-.2040259*e+1.0572252*r),this.opacity)}}));Yp(hg,iZ,cg(tf,{brighter:function(e){return new hg(this.h,this.c,this.l+sN*(e==null?1:e),this.opacity)},darker:function(e){return new hg(this.h,this.c,this.l-sN*(e==null?1:e),this.opacity)},rgb:function(){return nZ(this).rgb()}}))});function hAe(e){if(e instanceof My)return new My(e.h,e.s,e.l,e.opacity);e instanceof to||(e=gT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(TAt*n+MAt*t-EAt*r)/(TAt+MAt-EAt),o=n-i,a=(_T*(r-i)-aZ*o)/cN,s=Math.sqrt(a*a+o*o)/(_T*i*(1-i)),l=s?Math.atan2(a,o)*aN-120:NaN;return new My(l<0?l+360:l,s,i,e.opacity)}function uN(e,t,r,n){return arguments.length===1?hAe(e):new My(e,t,r,n==null?1:n)}function My(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var CAt,oZ,aZ,cN,_T,MAt,EAt,TAt,AAt=M(()=>{nN();iN();JK();CAt=-.14861,oZ=1.78277,aZ=-.29227,cN=-.90649,_T=1.97294,MAt=_T*cN,EAt=_T*oZ,TAt=oZ*aZ-cN*CAt;Yp(My,uN,cg(tf,{brighter:function(e){return e=e==null?Sy:Math.pow(Sy,e),new My(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?ug:Math.pow(ug,e),new My(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*oN,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new to(255*(t+r*(CAt*n+oZ*i)),255*(t+r*(aZ*n+cN*i)),255*(t+r*(_T*n)),this.opacity)}}))});var PAt=M(()=>{iN();SAt();AAt()});function LAt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r)throw new Error("illegal type: "+n);r[n]=[]}return new hN(r)}function hN(e){this._=e}function pAe(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function dAe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function IAt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=fAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var fAe,kAt,RAt=M(()=>{fAe={value:function(){}};hN.prototype=LAt.prototype={constructor:hN,on:function(e,t){var r=this._,n=pAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=dAe(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=IAt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=IAt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new hN(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};kAt=LAt});var NAt=M(()=>{RAt()});function OAt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new fN(r)}function fN(e){this._=e}function gAe(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function _Ae(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function DAt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=mAe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var mAe,sZ,zAt=M(()=>{mAe={value:function(){}};fN.prototype=OAt.prototype={constructor:fN,on:function(e,t){var r=this._,n=gAe(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=_Ae(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=DAt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=DAt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new fN(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};sZ=OAt});var FAt=M(()=>{zAt()});var pN,lZ,cZ=M(()=>{pN="http://www.w3.org/1999/xhtml",lZ={svg:"http://www.w3.org/2000/svg",xhtml:pN,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function dN(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),lZ.hasOwnProperty(t)?{space:lZ[t],local:e}:e}var uZ=M(()=>{cZ()});function yAe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===pN&&t.documentElement.namespaceURI===pN?t.createElement(e):t.createElementNS(r,e)}}function vAe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function mN(e){var t=dN(e);return(t.local?vAe:yAe)(t)}var hZ=M(()=>{uZ();cZ()});function xAe(){}function gN(e){return e==null?xAe:function(){return this.querySelector(e)}}var fZ=M(()=>{});function BAt(e){typeof e!="function"&&(e=gN(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new pi(n,this._parents)}var HAt=M(()=>{ef();fZ()});function bAe(){return[]}function VAt(e){return e==null?bAe:function(){return this.querySelectorAll(e)}}var UAt=M(()=>{});function qAt(e){typeof e!="function"&&(e=VAt(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new pi(n,i)}var GAt=M(()=>{ef();UAt()});function WAt(e){return function(){return this.matches(e)}}var YAt=M(()=>{});function jAt(e){typeof e!="function"&&(e=WAt(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new pi(n,this._parents)}var XAt=M(()=>{ef();YAt()});function _N(e){return new Array(e.length)}var pZ=M(()=>{});function $At(){return new pi(this._enter||this._groups.map(_N),this._parents)}function yT(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var dZ=M(()=>{pZ();ef();yT.prototype={constructor:yT,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function KAt(e){return function(){return e}}var ZAt=M(()=>{});function wAe(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new yT(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function SAe(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=JAt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=JAt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new yT(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function QAt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?SAe:wAe,n=this._parents,i=this._groups;typeof e!="function"&&(e=KAt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new pi(a,n),a._enter=s,a._exit=l,a}var JAt,t4t=M(()=>{ef();dZ();ZAt();JAt="$"});function e4t(){return new pi(this._exit||this._groups.map(_N),this._parents)}var r4t=M(()=>{pZ();ef()});function n4t(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var i4t=M(()=>{});function o4t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new pi(a,this._parents)}var a4t=M(()=>{ef()});function s4t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var l4t=M(()=>{});function c4t(e){e||(e=MAe);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new pi(i,this._parents).order()}function MAe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var u4t=M(()=>{ef()});function h4t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var f4t=M(()=>{});function p4t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var d4t=M(()=>{});function m4t(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var g4t=M(()=>{});function _4t(){var e=0;return this.each(function(){++e}),e}var y4t=M(()=>{});function v4t(){return!this.node()}var x4t=M(()=>{});function b4t(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var w4t=M(()=>{});function EAe(e){return function(){this.removeAttribute(e)}}function TAe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function CAe(e,t){return function(){this.setAttribute(e,t)}}function AAe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function PAe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function IAe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function S4t(e,t){var r=dN(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?TAe:EAe:typeof t=="function"?r.local?IAe:PAe:r.local?AAe:CAe)(r,t))}var M4t=M(()=>{uZ()});function yN(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var mZ=M(()=>{});function LAe(e){return function(){this.style.removeProperty(e)}}function kAe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function RAe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function E4t(e,t,r){return arguments.length>1?this.each((t==null?LAe:typeof t=="function"?RAe:kAe)(e,t,r==null?"":r)):NAe(this.node(),e)}function NAe(e,t){return e.style.getPropertyValue(t)||yN(e).getComputedStyle(e,null).getPropertyValue(t)}var T4t=M(()=>{mZ()});function DAe(e){return function(){delete this[e]}}function OAe(e,t){return function(){this[e]=t}}function zAe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function C4t(e,t){return arguments.length>1?this.each((t==null?DAe:typeof t=="function"?zAe:OAe)(e,t)):this.node()[e]}var A4t=M(()=>{});function P4t(e){return e.trim().split(/^|\s+/)}function gZ(e){return e.classList||new I4t(e)}function I4t(e){this._node=e,this._names=P4t(e.getAttribute("class")||"")}function L4t(e,t){for(var r=gZ(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function k4t(e,t){for(var r=gZ(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function FAe(e){return function(){L4t(this,e)}}function BAe(e){return function(){k4t(this,e)}}function HAe(e,t){return function(){(t.apply(this,arguments)?L4t:k4t)(this,e)}}function R4t(e,t){var r=P4t(e+"");if(arguments.length<2){for(var n=gZ(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?HAe:t?FAe:BAe)(r,t))}var N4t=M(()=>{I4t.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function VAe(){this.textContent=""}function UAe(e){return function(){this.textContent=e}}function qAe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function D4t(e){return arguments.length?this.each(e==null?VAe:(typeof e=="function"?qAe:UAe)(e)):this.node().textContent}var O4t=M(()=>{});function GAe(){this.innerHTML=""}function WAe(e){return function(){this.innerHTML=e}}function YAe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function z4t(e){return arguments.length?this.each(e==null?GAe:(typeof e=="function"?YAe:WAe)(e)):this.node().innerHTML}var F4t=M(()=>{});function jAe(){this.nextSibling&&this.parentNode.appendChild(this)}function B4t(){return this.each(jAe)}var H4t=M(()=>{});function XAe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function V4t(){return this.each(XAe)}var U4t=M(()=>{});function q4t(e){var t=typeof e=="function"?e:mN(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var G4t=M(()=>{hZ()});function $Ae(){return null}function W4t(e,t){var r=typeof e=="function"?e:mN(e),n=t==null?$Ae:typeof t=="function"?t:gN(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Y4t=M(()=>{hZ();fZ()});function KAe(){var e=this.parentNode;e&&e.removeChild(this)}function j4t(){return this.each(KAe)}var X4t=M(()=>{});function ZAe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function JAe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $4t(e){return this.select(e?JAe:ZAe)}var K4t=M(()=>{});function Z4t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var J4t=M(()=>{});function QAe(e,t,r){return e=ePt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function ePt(e,t,r){return function(n){var i=sn;sn=n;try{e.call(this,this.__data__,t,r)}finally{sn=i}}}function t4e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function e4e(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function r4e(e,t,r){var n=tPt.hasOwnProperty(e.type)?QAe:ePt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function rPt(e,t,r){var n=t4e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?r4e:e4e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function vN(e,t,r,n){var i=sn;e.sourceEvent=sn,sn=e;try{return t.apply(r,n)}finally{sn=i}}var tPt,sn,Q4t,xN=M(()=>{tPt={},sn=null;typeof document!="undefined"&&(Q4t=document.documentElement,"onmouseenter"in Q4t||(tPt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function nPt(e,t,r){var n=yN(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function n4e(e,t){return function(){return nPt(this,e,t)}}function i4e(e,t){return function(){return nPt(this,e,t.apply(this,arguments))}}function iPt(e,t){return this.each((typeof t=="function"?i4e:n4e)(e,t))}var oPt=M(()=>{mZ()});function pi(e,t){this._groups=e,this._parents=t}function o4e(){return new pi([[document.documentElement]],_Z)}var _Z,ef=M(()=>{HAt();GAt();XAt();t4t();dZ();r4t();i4t();a4t();l4t();u4t();f4t();d4t();g4t();y4t();x4t();w4t();M4t();T4t();A4t();N4t();O4t();F4t();H4t();U4t();G4t();Y4t();X4t();K4t();J4t();xN();oPt();_Z=[null];pi.prototype=o4e.prototype={constructor:pi,select:BAt,selectAll:qAt,filter:jAt,data:QAt,enter:$At,exit:e4t,join:n4t,merge:o4t,order:s4t,sort:c4t,call:h4t,nodes:p4t,node:m4t,size:_4t,empty:v4t,each:b4t,attr:S4t,style:E4t,property:C4t,classed:R4t,text:D4t,html:z4t,raise:B4t,lower:V4t,append:q4t,insert:W4t,remove:j4t,clone:$4t,datum:Z4t,on:rPt,dispatch:iPt}});function Ey(e){return typeof e=="string"?new pi([[document.querySelector(e)]],[document.documentElement]):new pi([[e]],_Z)}var aPt=M(()=>{ef()});function bN(){for(var e=sn,t;t=e.sourceEvent;)e=t;return e}var yZ=M(()=>{xN()});function wN(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var vZ=M(()=>{});function xZ(e){var t=bN();return t.changedTouches&&(t=t.changedTouches[0]),wN(e,t)}var sPt=M(()=>{yZ();vZ()});function bZ(e,t,r){arguments.length<3&&(r=t,t=bN().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return wN(e,o);return null}var lPt=M(()=>{yZ();vZ()});var SN=M(()=>{sPt();aPt();lPt();xN()});function MN(){sn.stopImmediatePropagation()}function fg(){sn.preventDefault(),sn.stopImmediatePropagation()}var wZ=M(()=>{SN()});function EN(e){var t=e.document.documentElement,r=Ey(e).on("dragstart.drag",fg,!0);"onselectstart"in t?r.on("selectstart.drag",fg,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function TN(e,t){var r=e.document.documentElement,n=Ey(e).on("dragstart.drag",null);t&&(n.on("click.drag",fg,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var SZ=M(()=>{SN();wZ()});function vT(e){return function(){return e}}var cPt=M(()=>{});function xT(e,t,r,n,i,o,a,s,l,c){this.target=e,this.type=t,this.subject=r,this.identifier=n,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}var uPt=M(()=>{xT.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e}});function a4e(){return!sn.button}function s4e(){return this.parentNode}function l4e(e){return e==null?{x:sn.x,y:sn.y}:e}function c4e(){return"ontouchstart"in this}function hPt(){var e=a4e,t=s4e,r=l4e,n=c4e,i={},o=sZ("start","drag","end"),a=0,s,l,c,u,h=0;function f(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",_).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!(u||!e.apply(this,arguments))){var S=b("mouse",t.apply(this,arguments),xZ,this,arguments);!S||(Ey(sn.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),EN(sn.view),MN(),c=!1,s=sn.clientX,l=sn.clientY,S("start"))}}function d(){if(fg(),!c){var S=sn.clientX-s,C=sn.clientY-l;c=S*S+C*C>h}i.mouse("drag")}function g(){Ey(sn.view).on("mousemove.drag mouseup.drag",null),TN(sn.view,c),fg(),i.mouse("end")}function _(){if(!!e.apply(this,arguments)){var S=sn.changedTouches,C=t.apply(this,arguments),P=S.length,k,O;for(k=0;k<P;++k)(O=b(S[k].identifier,C,bZ,this,arguments))&&(MN(),O("start"))}}function y(){var S=sn.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(fg(),k("drag"))}function x(){var S=sn.changedTouches,C=S.length,P,k;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),P=0;P<C;++P)(k=i[S[P].identifier])&&(MN(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!vN(new xT(f,"beforestart",B,S,a,D[0],D[1],0,0,R),function(){return(sn.subject=B=r.apply(k,O))==null?!1:(I=B.x-D[0]||0,L=B.y-D[1]||0,!0)}))return function F(z){var U=D,W;switch(z){case"start":i[S]=F,W=a++;break;case"end":delete i[S],--a;case"drag":D=P(C,S),W=a;break}vN(new xT(f,z,B,S,W,D[0]+I,D[1]+L,D[0]-U[0],D[1]-U[1],R),R.apply,R,[z,k,O])}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:vT(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:vT(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:vT(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:vT(!!S),f):n},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,f):Math.sqrt(h)},f}var fPt=M(()=>{FAt();SN();SZ();wZ();cPt();uPt()});var pPt=M(()=>{fPt();SZ()});function mPt(e){return new Function("d","return {"+e.map(function(t,r){return JSON.stringify(t)+": d["+r+"]"}).join(",")+"}")}function u4e(e,t){var r=mPt(e);return function(n,i){return t(r(n),i,e)}}function h4e(e){var t=Object.create(null),r=[];return e.forEach(function(n){for(var i in n)i in t||r.push(t[i]=i)}),r}function w2(e){var t=new RegExp('["'+e+`
\r]`),r=e.charCodeAt(0);function n(c,u){var h,f,p=i(c,function(d,g){if(h)return h(d,g-1);f=d,h=u?u4e(d,u):mPt(d)});return p.columns=f||[],p}function i(c,u){var h=[],f=c.length,p=0,d=0,g,_=f<=0,y=!1;c.charCodeAt(f-1)===bT&&--f,c.charCodeAt(f-1)===TZ&&--f;function x(){if(_)return MZ;if(y)return y=!1,dPt;var S,C=p,P;if(c.charCodeAt(C)===EZ){for(;p++<f&&c.charCodeAt(p)!==EZ||c.charCodeAt(++p)===EZ;);return(S=p)>=f?_=!0:(P=c.charCodeAt(p++))===bT?y=!0:P===TZ&&(y=!0,c.charCodeAt(p)===bT&&++p),c.slice(C+1,S-1).replace(/""/g,'"')}for(;p<f;){if((P=c.charCodeAt(S=p++))===bT)y=!0;else if(P===TZ)y=!0,c.charCodeAt(p)===bT&&++p;else if(P!==r)continue;return c.slice(C,S)}return _=!0,c.slice(C,f)}for(;(g=x())!==MZ;){for(var b=[];g!==dPt&&g!==MZ;)b.push(g),g=x();u&&(b=u(b,d++))==null||h.push(b)}return h}function o(c,u){return u==null&&(u=h4e(c)),[u.map(l).join(e)].concat(c.map(function(h){return u.map(function(f){return l(h[f])}).join(e)})).join(`
`)}function a(c){return c.map(s).join(`
`)}function s(c){return c.map(l).join(e)}function l(c){return c==null?"":t.test(c+="")?'"'+c.replace(/"/g,'""')+'"':c}return{parse:n,parseRows:i,format:o,formatRows:a}}var dPt,MZ,EZ,bT,TZ,CN=M(()=>{dPt={},MZ={},EZ=34,bT=10,TZ=13});var AN,gPt,_Pt,yPt,vPt,xPt=M(()=>{CN();AN=w2(","),gPt=AN.parse,_Pt=AN.parseRows,yPt=AN.format,vPt=AN.formatRows});var PN,bPt,wPt,SPt,MPt,EPt=M(()=>{CN();PN=w2("	"),bPt=PN.parse,wPt=PN.parseRows,SPt=PN.format,MPt=PN.formatRows});var TPt=M(()=>{CN();xPt();EPt()});function CPt(e){return+e}var APt=M(()=>{});function PPt(e){return e*e}function IPt(e){return e*(2-e)}function CZ(e){return((e*=2)<=1?e*e:--e*(2-e)+1)/2}var LPt=M(()=>{});function kPt(e){return e*e*e}function RPt(e){return--e*e*e+1}function AZ(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var NPt=M(()=>{});var PZ,DPt,OPt,IZ,zPt=M(()=>{PZ=3,DPt=function e(t){t=+t;function r(n){return Math.pow(n,t)}return r.exponent=e,r}(PZ),OPt=function e(t){t=+t;function r(n){return 1-Math.pow(1-n,t)}return r.exponent=e,r}(PZ),IZ=function e(t){t=+t;function r(n){return((n*=2)<=1?Math.pow(n,t):2-Math.pow(2-n,t))/2}return r.exponent=e,r}(PZ)});function HPt(e){return 1-Math.cos(e*BPt)}function VPt(e){return Math.sin(e*BPt)}function LZ(e){return(1-Math.cos(FPt*e))/2}var FPt,BPt,UPt=M(()=>{FPt=Math.PI,BPt=FPt/2});function qPt(e){return Math.pow(2,10*e-10)}function GPt(e){return 1-Math.pow(2,-10*e)}function kZ(e){return((e*=2)<=1?Math.pow(2,10*e-10):2-Math.pow(2,10-10*e))/2}var WPt=M(()=>{});function YPt(e){return 1-Math.sqrt(1-e*e)}function jPt(e){return Math.sqrt(1- --e*e)}function RZ(e){return((e*=2)<=1?1-Math.sqrt(1-e*e):Math.sqrt(1-(e-=2)*e)+1)/2}var XPt=M(()=>{});function $Pt(e){return 1-S2(1-e)}function S2(e){return(e=+e)<NZ?IN*e*e:e<p4e?IN*(e-=f4e)*e+d4e:e<g4e?IN*(e-=m4e)*e+_4e:IN*(e-=y4e)*e+v4e}function KPt(e){return((e*=2)<=1?1-S2(1-e):S2(e-1)+1)/2}var NZ,f4e,p4e,d4e,m4e,g4e,_4e,y4e,v4e,IN,ZPt=M(()=>{NZ=.36363636363636365,f4e=6/11,p4e=8/11,d4e=3/4,m4e=9/11,g4e=10/11,_4e=15/16,y4e=21/22,v4e=63/64,IN=1/NZ/NZ});var DZ,JPt,QPt,OZ,t6t=M(()=>{DZ=1.70158,JPt=function e(t){t=+t;function r(n){return n*n*((t+1)*n-t)}return r.overshoot=e,r}(DZ),QPt=function e(t){t=+t;function r(n){return--n*n*((t+1)*n+t)+1}return r.overshoot=e,r}(DZ),OZ=function e(t){t=+t;function r(n){return((n*=2)<1?n*n*((t+1)*n-t):(n-=2)*n*((t+1)*n+t)+2)/2}return r.overshoot=e,r}(DZ)});var M2,zZ,FZ,e6t,BZ,r6t,n6t=M(()=>{M2=2*Math.PI,zZ=1,FZ=.3,e6t=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return t*Math.pow(2,10*--o)*Math.sin((n-o)/r)}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ),BZ=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return 1-t*Math.pow(2,-10*(o=+o))*Math.sin((o+n)/r)}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ),r6t=function e(t,r){var n=Math.asin(1/(t=Math.max(1,t)))*(r/=M2);function i(o){return((o=o*2-1)<0?t*Math.pow(2,10*o)*Math.sin((n-o)/r):2-t*Math.pow(2,-10*o)*Math.sin((n+o)/r))/2}return i.amplitude=function(o){return e(o,r*M2)},i.period=function(o){return e(t,o)},i}(zZ,FZ)});var i6t=M(()=>{APt();LPt();NPt();zPt();UPt();WPt();XPt();ZPt();t6t();n6t()});function o6t(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var i,o=r.length,a,s=0,l=0;for(i=0;i<o;++i)a=r[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=r[i],a.x-=s,a.y-=l}return n.initialize=function(i){r=i},n.x=function(i){return arguments.length?(e=+i,n):e},n.y=function(i){return arguments.length?(t=+i,n):t},n}var a6t=M(()=>{});function zn(e){return function(){return e}}var Ty=M(()=>{});function Mu(){return(Math.random()-.5)*1e-6}var LN=M(()=>{});function s6t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return l6t(this.cover(t,r),t,r,e)}function l6t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function c6t(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),r=0;r<n;++r)l6t(this,a[r],s[r],e[r]);return this}var u6t=M(()=>{});function h6t(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a=i-r,s=this._root,l,c;r>e||e>=i||n>t||t>=o;)switch(c=(t<n)<<1|e<r,l=new Array(4),l[c]=s,s=l,a*=2,c){case 0:i=r+a,o=n+a;break;case 1:r=i-a,o=n+a;break;case 2:i=r+a,n=o-a;break;case 3:r=i-a,n=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}var f6t=M(()=>{});function p6t(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var d6t=M(()=>{});function m6t(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}var g6t=M(()=>{});function So(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var kN=M(()=>{});function _6t(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new So(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new So(p[3],_,y,l,c),new So(p[2],a,y,_,c),new So(p[1],_,s,l,y),new So(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}var y6t=M(()=>{kN()});function v6t(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function x6t(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var b6t=M(()=>{});function w6t(){return this._root}var S6t=M(()=>{});function M6t(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var E6t=M(()=>{});function T6t(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new So(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new So(i,c,u,s,l)),(i=n[2])&&t.push(new So(i,o,u,c,l)),(i=n[1])&&t.push(new So(i,c,a,s,u)),(i=n[0])&&t.push(new So(i,o,a,c,u))}return this}var C6t=M(()=>{kN()});function A6t(e){var t=[],r=[],n;for(this._root&&t.push(new So(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new So(o,a,s,u,h)),(o=i[1])&&t.push(new So(o,u,s,l,h)),(o=i[2])&&t.push(new So(o,a,h,u,c)),(o=i[3])&&t.push(new So(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}var P6t=M(()=>{kN()});function I6t(e){return e[0]}function L6t(e){return arguments.length?(this._x=e,this):this._x}var k6t=M(()=>{});function R6t(e){return e[1]}function N6t(e){return arguments.length?(this._y=e,this):this._y}var D6t=M(()=>{});function Cy(e,t,r){var n=new HZ(t==null?I6t:t,r==null?R6t:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function HZ(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function O6t(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Ga,z6t=M(()=>{u6t();f6t();d6t();g6t();y6t();b6t();S6t();E6t();C6t();P6t();k6t();D6t();Ga=Cy.prototype=HZ.prototype;Ga.copy=function(){var e=new HZ(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=O6t(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=O6t(n));return e};Ga.add=s6t;Ga.addAll=c6t;Ga.cover=h6t;Ga.data=p6t;Ga.extent=m6t;Ga.find=_6t;Ga.remove=v6t;Ga.removeAll=x6t;Ga.root=w6t;Ga.size=M6t;Ga.visit=T6t;Ga.visitAfter=A6t;Ga.x=L6t;Ga.y=N6t});var VZ=M(()=>{z6t()});function x4e(e){return e.x+e.vx}function b4e(e){return e.y+e.vy}function F6t(e){var t,r,n=1,i=1;typeof e!="function"&&(e=zn(e==null?1:+e));function o(){for(var l,c=t.length,u,h,f,p,d,g,_=0;_<i;++_)for(u=Cy(t,x4e,b4e).visitAfter(a),l=0;l<c;++l)h=t[l],d=r[h.index],g=d*d,f=h.x+h.vx,p=h.y+h.vy,u.visit(y);function y(x,b,S,C,P){var k=x.data,O=x.r,D=d+O;if(k){if(k.index>h.index){var B=f-k.x-k.vx,I=p-k.y-k.vy,L=B*B+I*I;L<D*D&&(B===0&&(B=Mu(),L+=B*B),I===0&&(I=Mu(),L+=I*I),L=(D-(L=Math.sqrt(L)))/L*n,h.vx+=(B*=L)*(D=(O*=O)/(g+O)),h.vy+=(I*=L)*D,k.vx-=B*(D=1-D),k.vy-=I*D)}return}return b>f+D||C<f-D||S>p+D||P<p-D}}function a(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function s(){if(!!t){var l,c=t.length,u;for(r=new Array(c),l=0;l<c;++l)u=t[l],r[u.index]=+e(u,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(n=+l,o):n},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:zn(+l),s(),o):e},o}var B6t=M(()=>{Ty();LN();VZ()});function RN(){}function H6t(e,t){var r=new RN;if(e instanceof RN)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var cl,pg,NN=M(()=>{cl="$";RN.prototype=H6t.prototype={constructor:RN,has:function(e){return cl+e in this},get:function(e){return this[cl+e]},set:function(e,t){return this[cl+e]=t,this},remove:function(e){var t=cl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===cl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===cl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===cl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===cl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===cl&&++e;return e},empty:function(){for(var e in this)if(e[0]===cl)return!1;return!0},each:function(e){for(var t in this)t[0]===cl&&e(this[t],t.slice(1),this)}};pg=H6t});var V6t=M(()=>{NN()});function DN(){}function w4e(e,t){var r=new DN;if(e instanceof DN)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var Ay,U6t=M(()=>{NN();Ay=pg.prototype;DN.prototype=w4e.prototype={constructor:DN,has:Ay.has,add:function(e){return e+="",this[cl+e]=e,this},remove:Ay.remove,clear:Ay.clear,values:Ay.keys,size:Ay.size,empty:Ay.empty,each:Ay.each}});var q6t=M(()=>{});var G6t=M(()=>{});var W6t=M(()=>{});var UZ=M(()=>{V6t();U6t();NN();q6t();G6t();W6t()});function S4e(e){return e.index}function Y6t(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function j6t(e){var t=S4e,r=u,n,i=zn(30),o,a,s,l,c=1;e==null&&(e=[]);function u(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var _=0,y=e.length;_<c;++_)for(var x=0,b,S,C,P,k,O,D;x<y;++x)b=e[x],S=b.source,C=b.target,P=C.x+C.vx-S.x-S.vx||Mu(),k=C.y+C.vy-S.y-S.vy||Mu(),O=Math.sqrt(P*P+k*k),O=(O-o[x])/O*g*n[x],P*=O,k*=O,C.vx-=P*(D=l[x]),C.vy-=k*D,S.vx+=P*(D=1-D),S.vy+=k*D}function f(){if(!!a){var g,_=a.length,y=e.length,x=pg(a,t),b;for(g=0,s=new Array(_);g<y;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=Y6t(x,b.source)),typeof b.target!="object"&&(b.target=Y6t(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(g=0,l=new Array(y);g<y;++g)b=e[g],l[g]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);n=new Array(y),p(),o=new Array(y),d()}}function p(){if(!!a)for(var g=0,_=e.length;g<_;++g)n[g]=+r(e[g],g,e)}function d(){if(!!a)for(var g=0,_=e.length;g<_;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g){a=g,f()},h.links=function(g){return arguments.length?(e=g,f(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(r=typeof g=="function"?g:zn(+g),p(),h):r},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:zn(+g),d(),h):i},h}var X6t=M(()=>{Ty();LN();UZ()});function K6t(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new ON(r)}function ON(e){this._=e}function E4e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function T4e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function $6t(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=M4e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var M4e,qZ,Z6t=M(()=>{M4e={value:function(){}};ON.prototype=K6t.prototype={constructor:ON,on:function(e,t){var r=this._,n=E4e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=T4e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=$6t(r[i],e.name,t);else if(t==null)for(i in r)r[i]=$6t(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new ON(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};qZ=K6t});var J6t=M(()=>{Z6t()});function YZ(){return Py||(eIt(C4e),Py=ET.now()+BN)}function C4e(){Py=0}function GZ(){this._call=this._time=this._next=null}function HN(e,t,r){var n=new GZ;return n.restart(e,t,r),n}function rIt(){YZ(),++E2;for(var e=zN,t;e;)(t=Py-e._time)>=0&&e._call.call(null,t),e=e._next;--E2}function Q6t(){Py=(FN=ET.now())+BN,E2=ST=0;try{rIt()}finally{E2=0,P4e(),Py=0}}function A4e(){var e=ET.now(),t=e-FN;t>tIt&&(BN-=t,FN=e)}function P4e(){for(var e,t=zN,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:zN=r);MT=e,WZ(n)}function WZ(e){if(!E2){ST&&(ST=clearTimeout(ST));var t=e-Py;t>24?(e<1/0&&(ST=setTimeout(Q6t,e-ET.now()-BN)),wT&&(wT=clearInterval(wT))):(wT||(FN=ET.now(),wT=setInterval(A4e,tIt)),E2=1,eIt(Q6t))}}var E2,ST,wT,tIt,zN,MT,FN,Py,BN,ET,eIt,nIt=M(()=>{E2=0,ST=0,wT=0,tIt=1e3,FN=0,Py=0,BN=0,ET=typeof performance=="object"&&performance.now?performance:Date,eIt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};GZ.prototype=HN.prototype={constructor:GZ,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?YZ():+r)+(t==null?0:+t),!this._next&&MT!==this&&(MT?MT._next=this:zN=this,MT=this),this._call=e,this._time=r,WZ()},stop:function(){this._call&&(this._call=null,this._time=1/0,WZ())}}});var iIt=M(()=>{nIt()});function oIt(e){return e.x}function aIt(e){return e.y}function sIt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=pg(),l=HN(u),c=qZ("tick","end");e==null&&(e=[]);function u(){h(),c.call("tick",t),r<n&&(l.stop(),c.call("end",t))}function h(){var d,g=e.length,_;for(r+=(o-r)*i,s.each(function(y){y(r)}),d=0;d<g;++d)_=e[d],_.fx==null?_.x+=_.vx*=a:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=a:(_.y=_.fy,_.vy=0)}function f(){for(var d=0,g=e.length,_;d<g;++d){if(_=e[d],_.index=d,isNaN(_.x)||isNaN(_.y)){var y=I4e*Math.sqrt(d),x=d*L4e;_.x=y*Math.cos(x),_.y=y*Math.sin(x)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function p(d){return d.initialize&&d.initialize(e),d}return f(),t={tick:h,restart:function(){return l.restart(u),t},stop:function(){return l.stop(),t},nodes:function(d){return arguments.length?(e=d,f(),s.each(p),t):e},alpha:function(d){return arguments.length?(r=+d,t):r},alphaMin:function(d){return arguments.length?(n=+d,t):n},alphaDecay:function(d){return arguments.length?(i=+d,t):+i},alphaTarget:function(d){return arguments.length?(o=+d,t):o},velocityDecay:function(d){return arguments.length?(a=1-d,t):1-a},force:function(d,g){return arguments.length>1?(g==null?s.remove(d):s.set(d,p(g)),t):s.get(d)},find:function(d,g,_){var y=0,x=e.length,b,S,C,P,k;for(_==null?_=1/0:_*=_,y=0;y<x;++y)P=e[y],b=d-P.x,S=g-P.y,C=b*b+S*S,C<_&&(k=P,_=C);return k},on:function(d,g){return arguments.length>1?(c.on(d,g),t):c.on(d)}}}var I4e,L4e,jZ=M(()=>{J6t();UZ();iIt();I4e=10,L4e=Math.PI*(3-Math.sqrt(5))});function lIt(){var e,t,r,n=zn(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=Cy(e,oIt,aIt).visitAfter(u);for(r=f,p=0;p<d;++p)t=e[p],g.visit(h)}function c(){if(!!e){var f,p=e.length,d;for(i=new Array(p),f=0;f<p;++f)d=e[f],i[d.index]=+n(d,f,e)}}function u(f){var p=0,d,g,_=0,y,x,b;if(f.length){for(y=x=b=0;b<4;++b)(d=f[b])&&(g=Math.abs(d.value))&&(p+=d.value,_+=g,y+=g*d.x,x+=g*d.y);f.x=y/_,f.y=x/_}else{d=f,d.x=d.data.x,d.y=d.data.y;do p+=i[d.data.index];while(d=d.next)}f.value=p}function h(f,p,d,g){if(!f.value)return!0;var _=f.x-t.x,y=f.y-t.y,x=g-p,b=_*_+y*y;if(x*x/s<b)return b<a&&(_===0&&(_=Mu(),b+=_*_),y===0&&(y=Mu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)),t.vx+=_*f.value*r/b,t.vy+=y*f.value*r/b),!0;if(f.length||b>=a)return;(f.data!==t||f.next)&&(_===0&&(_=Mu(),b+=_*_),y===0&&(y=Mu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)));do f.data!==t&&(x=i[f.data.index]*r/b,t.vx+=_*x,t.vy+=y*x);while(f=f.next)}return l.initialize=function(f){e=f,c()},l.strength=function(f){return arguments.length?(n=typeof f=="function"?f:zn(+f),c(),l):n},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}var cIt=M(()=>{Ty();LN();VZ();jZ()});function uIt(e,t,r){var n,i=zn(.1),o,a;typeof e!="function"&&(e=zn(+e)),t==null&&(t=0),r==null&&(r=0);function s(c){for(var u=0,h=n.length;u<h;++u){var f=n[u],p=f.x-t||1e-6,d=f.y-r||1e-6,g=Math.sqrt(p*p+d*d),_=(a[u]-g)*o[u]*c/g;f.vx+=p*_,f.vy+=d*_}}function l(){if(!!n){var c,u=n.length;for(o=new Array(u),a=new Array(u),c=0;c<u;++c)a[c]=+e(n[c],c,n),o[c]=isNaN(a[c])?0:+i(n[c],c,n)}}return s.initialize=function(c){n=c,l()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:zn(+c),l(),s):i},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:zn(+c),l(),s):e},s.x=function(c){return arguments.length?(t=+c,s):t},s.y=function(c){return arguments.length?(r=+c,s):r},s}var hIt=M(()=>{Ty()});function fIt(e){var t=zn(.1),r,n,i;typeof e!="function"&&(e=zn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vx+=(i[l]-u.x)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:zn(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:zn(+s),a(),o):e},o}var pIt=M(()=>{Ty()});function dIt(e){var t=zn(.1),r,n,i;typeof e!="function"&&(e=zn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vy+=(i[l]-u.y)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:zn(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:zn(+s),a(),o):e},o}var mIt=M(()=>{Ty()});var gIt=M(()=>{a6t();B6t();X6t();cIt();hIt();jZ();pIt();mIt()});function Iy(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var VN=M(()=>{});function rf(e){return e=Iy(Math.abs(e)),e?e[1]:NaN}var TT=M(()=>{VN()});function _It(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}var yIt=M(()=>{});function vIt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var xIt=M(()=>{});function bIt(e,t){e=e.toPrecision(t);t:for(var r=e.length,n=1,i=-1,o;n<r;++n)switch(e[n]){case".":i=o=n;break;case"0":i===0&&(i=n),o=n;break;case"e":break t;default:i>0&&(i=0);break}return i>0?e.slice(0,i)+e.slice(o+1):e}var wIt=M(()=>{});function SIt(e,t){var r=Iy(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(XZ=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+Iy(e,Math.max(0,t+o-1))[0]}var XZ,$Z=M(()=>{VN()});function KZ(e,t){var r=Iy(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var MIt=M(()=>{VN()});var UN,ZZ=M(()=>{wIt();$Z();MIt();UN={"":bIt,"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.round(e).toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return KZ(e*100,t)},r:KZ,s:SIt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function Ly(e){return new JZ(e)}function JZ(e){if(!(t=k4e.exec(e)))throw new Error("invalid format: "+e);var t,r=t[1]||" ",n=t[2]||">",i=t[3]||"-",o=t[4]||"",a=!!t[5],s=t[6]&&+t[6],l=!!t[7],c=t[8]&&+t[8].slice(1),u=t[9]||"";u==="n"?(l=!0,u="g"):UN[u]||(u=""),(a||r==="0"&&n==="=")&&(a=!0,r="0",n="="),this.fill=r,this.align=n,this.sign=i,this.symbol=o,this.zero=a,this.width=s,this.comma=l,this.precision=c,this.type=u}var k4e,QZ=M(()=>{ZZ();k4e=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;Ly.prototype=JZ.prototype;JZ.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+this.type}});function tJ(e){return e}var EIt=M(()=>{});function qN(e){var t=e.grouping&&e.thousands?_It(e.grouping,e.thousands):tJ,r=e.currency,n=e.decimal,i=e.numerals?vIt(e.numerals):tJ,o=e.percent||"%";function a(l){l=Ly(l);var c=l.fill,u=l.align,h=l.sign,f=l.symbol,p=l.zero,d=l.width,g=l.comma,_=l.precision,y=l.type,x=f==="$"?r[0]:f==="#"&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b=f==="$"?r[1]:/[%p]/.test(y)?o:"",S=UN[y],C=!y||/[defgprs%]/.test(y);_=_==null?y?6:12:/[gprs]/.test(y)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_));function P(k){var O=x,D=b,B,I,L;if(y==="c")D=S(k)+D,k="";else{k=+k;var R=k<0;if(k=S(Math.abs(k),_),R&&+k==0&&(R=!1),O=(R?h==="("?h:"-":h==="-"||h==="("?"":h)+O,D=(y==="s"?TIt[8+XZ/3]:"")+D+(R&&h==="("?")":""),C){for(B=-1,I=k.length;++B<I;)if(L=k.charCodeAt(B),48>L||L>57){D=(L===46?n+k.slice(B+1):k.slice(B))+D,k=k.slice(0,B);break}}}g&&!p&&(k=t(k,1/0));var F=O.length+k.length+D.length,z=F<d?new Array(d-F+1).join(c):"";switch(g&&p&&(k=t(z+k,z.length?d-D.length:1/0),z=""),u){case"<":k=O+k+D+z;break;case"=":k=O+z+k+D;break;case"^":k=z.slice(0,F=z.length>>1)+O+k+D+z.slice(F);break;default:k=z+O+k+D;break}return i(k)}return P.toString=function(){return l+""},P}function s(l,c){var u=a((l=Ly(l),l.type="f",l)),h=Math.max(-8,Math.min(8,Math.floor(rf(c)/3)))*3,f=Math.pow(10,-h),p=TIt[8+h/3];return function(d){return u(f*d)+p}}return{format:a,formatPrefix:s}}var TIt,eJ=M(()=>{TT();yIt();xIt();QZ();ZZ();$Z();EIt();TIt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function WN(e){return GN=qN(e),rJ=GN.format,nJ=GN.formatPrefix,GN}var GN,rJ,nJ,CIt=M(()=>{eJ();WN({decimal:".",thousands:",",grouping:[3],currency:["$",""]})});function AIt(e){return Math.max(0,-rf(Math.abs(e)))}var PIt=M(()=>{TT()});function IIt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(rf(t)/3)))*3-rf(Math.abs(e)))}var LIt=M(()=>{TT()});function kIt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,rf(t)-rf(e))+1}var RIt=M(()=>{TT()});var NIt=M(()=>{CIt();eJ();QZ();PIt();LIt();RIt()});function Cs(){return new jN}function jN(){this.reset()}function DIt(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var YN,ky=M(()=>{jN.prototype={constructor:jN,reset:function(){this.s=this.t=0},add:function(e){DIt(YN,e,this.t),DIt(this,YN.s,this.s),this.s?this.t+=YN.t:this.s=YN.t},valueOf:function(){return this.s}};YN=new jN});function KN(e){return e>1?0:e<-1?rr:Math.acos(e)}function Zn(e){return e>1?Fn:e<-1?-Fn:Math.asin(e)}function oJ(e){return(e=Jt(e/2))*e}var ce,iJ,rr,Fn,T2,Bi,Ur,we,Ye,yc,Sn,ae,CT,XN,Ry,$N,Jt,dg,Rr,C2,lr=M(()=>{ce=1e-6,iJ=1e-12,rr=Math.PI,Fn=rr/2,T2=rr/4,Bi=rr*2,Ur=180/rr,we=rr/180,Ye=Math.abs,yc=Math.atan,Sn=Math.atan2,ae=Math.cos,CT=Math.ceil,XN=Math.exp,Ry=Math.log,$N=Math.pow,Jt=Math.sin,dg=Math.sign||function(e){return e>0?1:e<0?-1:0},Rr=Math.sqrt,C2=Math.tan});function qr(){}var Xp=M(()=>{});function ZN(e,t){e&&zIt.hasOwnProperty(e.type)&&zIt[e.type](e,t)}function aJ(e,t,r){var n=-1,i=e.length-r,o;for(t.lineStart();++n<i;)o=e[n],t.point(o[0],o[1],o[2]);t.lineEnd()}function FIt(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)aJ(e[r],t,1);t.polygonEnd()}function Mo(e,t){e&&OIt.hasOwnProperty(e.type)?OIt[e.type](e,t):ZN(e,t)}var OIt,zIt,mg=M(()=>{OIt={Feature:function(e,t){ZN(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)ZN(r[n].geometry,t)}},zIt={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){aJ(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)aJ(r[n],t,0)},Polygon:function(e,t){FIt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)FIt(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)ZN(r[n],t)}}});function R4e(){Eu.point=D4e}function N4e(){VIt(BIt,HIt)}function D4e(e,t){Eu.point=VIt,BIt=e,HIt=t,e*=we,t*=we,sJ=e,lJ=ae(t=t/2+T2),cJ=Jt(t)}function VIt(e,t){e*=we,t*=we,t=t/2+T2;var r=e-sJ,n=r>=0?1:-1,i=n*r,o=ae(t),a=Jt(t),s=cJ*a,l=lJ*o+s*ae(i),c=s*n*Jt(i);AT.add(Sn(c,l)),sJ=e,lJ=o,cJ=a}function UIt(e){return JN.reset(),Mo(e,Eu),JN*2}var AT,JN,BIt,HIt,sJ,lJ,cJ,Eu,uJ=M(()=>{ky();lr();Xp();mg();AT=Cs(),JN=Cs(),Eu={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){AT.reset(),Eu.lineStart=R4e,Eu.lineEnd=N4e},polygonEnd:function(){var e=+AT;JN.add(e<0?Bi+e:e),this.lineStart=this.lineEnd=this.point=qr},sphere:function(){JN.add(Bi)}}});function Ny(e){return[Sn(e[1],e[0]),Zn(e[2])]}function vc(e){var t=e[0],r=e[1],n=ae(r);return[n*ae(t),n*Jt(t),Jt(r)]}function PT(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function $p(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function QN(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function IT(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Dy(e){var t=Rr(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var A2=M(()=>{lr()});function hJ(e,t){gg.push(Zp=[di=e,Ei=e]),t<hl&&(hl=t),t>xc&&(xc=t)}function XIt(e,t){var r=vc([e*we,t*we]);if(P2){var n=$p(P2,r),i=[n[1],-n[0],0],o=$p(i,n);Dy(o),o=Ny(o);var a=e-Oy,s=a>0?1:-1,l=o[0]*Ur*s,c,u=Ye(a)>180;u^(s*Oy<l&&l<s*e)?(c=o[1]*Ur,c>xc&&(xc=c)):(l=(l+360)%360-180,u^(s*Oy<l&&l<s*e)?(c=-o[1]*Ur,c<hl&&(hl=c)):(t<hl&&(hl=t),t>xc&&(xc=t))),u?e<Oy?ul(di,e)>ul(di,Ei)&&(Ei=e):ul(e,Ei)>ul(di,Ei)&&(di=e):Ei>=di?(e<di&&(di=e),e>Ei&&(Ei=e)):e>Oy?ul(di,e)>ul(di,Ei)&&(Ei=e):ul(e,Ei)>ul(di,Ei)&&(di=e)}else gg.push(Zp=[di=e,Ei=e]);t<hl&&(hl=t),t>xc&&(xc=t),P2=r,Oy=e}function qIt(){Kp.point=XIt}function GIt(){Zp[0]=di,Zp[1]=Ei,Kp.point=hJ,P2=null}function $It(e,t){if(P2){var r=e-Oy;LT.add(Ye(r)>180?r+(r>0?360:-360):r)}else YIt=e,jIt=t;Eu.point(e,t),XIt(e,t)}function O4e(){Eu.lineStart()}function z4e(){$It(YIt,jIt),Eu.lineEnd(),Ye(LT)>ce&&(di=-(Ei=180)),Zp[0]=di,Zp[1]=Ei,P2=null}function ul(e,t){return(t-=e)<0?t+360:t}function F4e(e,t){return e[0]-t[0]}function WIt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function KIt(e){var t,r,n,i,o,a,s;if(xc=Ei=-(di=hl=1/0),gg=[],Mo(e,Kp),r=gg.length){for(gg.sort(F4e),t=1,n=gg[0],o=[n];t<r;++t)i=gg[t],WIt(n,i[0])||WIt(n,i[1])?(ul(n[0],i[1])>ul(n[0],n[1])&&(n[1]=i[1]),ul(i[0],n[1])>ul(n[0],n[1])&&(n[0]=i[0])):o.push(n=i);for(a=-1/0,r=o.length-1,t=0,n=o[r];t<=r;n=i,++t)i=o[t],(s=ul(n[1],i[0]))>a&&(a=s,di=i[0],Ei=n[1])}return gg=Zp=null,di===1/0||hl===1/0?[[NaN,NaN],[NaN,NaN]]:[[di,hl],[Ei,xc]]}var di,hl,Ei,xc,Oy,YIt,jIt,P2,LT,gg,Zp,Kp,ZIt=M(()=>{ky();uJ();A2();lr();mg();LT=Cs(),Kp={point:hJ,lineStart:qIt,lineEnd:GIt,polygonStart:function(){Kp.point=$It,Kp.lineStart=O4e,Kp.lineEnd=z4e,LT.reset(),Eu.polygonStart()},polygonEnd:function(){Eu.polygonEnd(),Kp.point=hJ,Kp.lineStart=qIt,Kp.lineEnd=GIt,AT<0?(di=-(Ei=180),hl=-(xc=90)):LT>ce?xc=90:LT<-ce&&(hl=-90),Zp[0]=di,Zp[1]=Ei}}});function mJ(e,t){e*=we,t*=we;var r=ae(t);RT(r*ae(e),r*Jt(e),Jt(t))}function RT(e,t,r){++kT,eD+=(e-eD)/kT,rD+=(t-rD)/kT,nD+=(r-nD)/kT}function JIt(){Tu.point=B4e}function B4e(e,t){e*=we,t*=we;var r=ae(t);Wa=r*ae(e),Ya=r*Jt(e),ja=Jt(t),Tu.point=H4e,RT(Wa,Ya,ja)}function H4e(e,t){e*=we,t*=we;var r=ae(t),n=r*ae(e),i=r*Jt(e),o=Jt(t),a=Sn(Rr((a=Ya*o-ja*i)*a+(a=ja*n-Wa*o)*a+(a=Wa*i-Ya*n)*a),Wa*n+Ya*i+ja*o);tD+=a,iD+=a*(Wa+(Wa=n)),oD+=a*(Ya+(Ya=i)),aD+=a*(ja+(ja=o)),RT(Wa,Ya,ja)}function QIt(){Tu.point=mJ}function V4e(){Tu.point=q4e}function U4e(){r9t(t9t,e9t),Tu.point=mJ}function q4e(e,t){t9t=e,e9t=t,e*=we,t*=we,Tu.point=r9t;var r=ae(t);Wa=r*ae(e),Ya=r*Jt(e),ja=Jt(t),RT(Wa,Ya,ja)}function r9t(e,t){e*=we,t*=we;var r=ae(t),n=r*ae(e),i=r*Jt(e),o=Jt(t),a=Ya*o-ja*i,s=ja*n-Wa*o,l=Wa*i-Ya*n,c=Rr(a*a+s*s+l*l),u=Zn(c),h=c&&-u/c;fJ+=h*a,pJ+=h*s,dJ+=h*l,tD+=u,iD+=u*(Wa+(Wa=n)),oD+=u*(Ya+(Ya=i)),aD+=u*(ja+(ja=o)),RT(Wa,Ya,ja)}function n9t(e){kT=tD=eD=rD=nD=iD=oD=aD=fJ=pJ=dJ=0,Mo(e,Tu);var t=fJ,r=pJ,n=dJ,i=t*t+r*r+n*n;return i<iJ&&(t=iD,r=oD,n=aD,tD<ce&&(t=eD,r=rD,n=nD),i=t*t+r*r+n*n,i<iJ)?[NaN,NaN]:[Sn(r,t)*Ur,Zn(n/Rr(i))*Ur]}var kT,tD,eD,rD,nD,iD,oD,aD,fJ,pJ,dJ,t9t,e9t,Wa,Ya,ja,Tu,i9t=M(()=>{lr();Xp();mg();Tu={sphere:qr,point:mJ,lineStart:JIt,lineEnd:QIt,polygonStart:function(){Tu.lineStart=V4e,Tu.lineEnd=U4e},polygonEnd:function(){Tu.lineStart=JIt,Tu.lineEnd=QIt}}});function zy(e){return function(){return e}}var o9t=M(()=>{});function sD(e,t){function r(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(r.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),r}var gJ=M(()=>{});function _J(e,t){return[e>rr?e-Bi:e<-rr?e+Bi:e,t]}function NT(e,t,r){return(e%=Bi)?t||r?sD(s9t(e),l9t(t,r)):s9t(e):t||r?l9t(t,r):_J}function a9t(e){return function(t,r){return t+=e,[t>rr?t-Bi:t<-rr?t+Bi:t,r]}}function s9t(e){var t=a9t(e);return t.invert=a9t(-e),t}function l9t(e,t){var r=ae(e),n=Jt(e),i=ae(t),o=Jt(t);function a(s,l){var c=ae(l),u=ae(s)*c,h=Jt(s)*c,f=Jt(l),p=f*r+u*n;return[Sn(h*i-p*o,u*r-f*n),Zn(p*i+h*o)]}return a.invert=function(s,l){var c=ae(l),u=ae(s)*c,h=Jt(s)*c,f=Jt(l),p=f*i-h*o;return[Sn(h*i+f*o,u*r+p*n),Zn(p*r-u*n)]},a}function lD(e){e=NT(e[0]*we,e[1]*we,e.length>2?e[2]*we:0);function t(r){return r=e(r[0]*we,r[1]*we),r[0]*=Ur,r[1]*=Ur,r}return t.invert=function(r){return r=e.invert(r[0]*we,r[1]*we),r[0]*=Ur,r[1]*=Ur,r},t}var DT=M(()=>{gJ();lr();_J.invert=_J});function yJ(e,t,r,n,i,o){if(!!r){var a=ae(t),s=Jt(t),l=n*r;i==null?(i=t+n*Bi,o=t-l/2):(i=c9t(a,i),o=c9t(a,o),(n>0?i<o:i>o)&&(i+=n*Bi));for(var c,u=i;n>0?u>o:u<o;u-=l)c=Ny([a,-s*ae(u),-s*Jt(u)]),e.point(c[0],c[1])}}function c9t(e,t){t=vc(t),t[0]-=e,Dy(t);var r=KN(-t[1]);return((-t[2]<0?-r:r)+Bi-ce)%Bi}function u9t(){var e=zy([0,0]),t=zy(90),r=zy(6),n,i,o={point:a};function a(l,c){n.push(l=i(l,c)),l[0]*=Ur,l[1]*=Ur}function s(){var l=e.apply(this,arguments),c=t.apply(this,arguments)*we,u=r.apply(this,arguments)*we;return n=[],i=NT(-l[0]*we,-l[1]*we,0).invert,yJ(o,c,u,1),l={type:"Polygon",coordinates:[n]},n=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:zy([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:zy(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:zy(+l),s):r},s}var vJ=M(()=>{A2();o9t();lr();DT()});function cD(){var e=[],t;return{point:function(r,n){t.push([r,n])},lineStart:function(){e.push(t=[])},lineEnd:qr,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}var xJ=M(()=>{Xp()});function I2(e,t){return Ye(e[0]-t[0])<ce&&Ye(e[1]-t[1])<ce}var bJ=M(()=>{lr()});function uD(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function hD(e,t,r,n,i){var o=[],a=[],s,l;if(e.forEach(function(d){if(!((g=d.length-1)<=0)){var g,_=d[0],y=d[g],x;if(I2(_,y)){for(i.lineStart(),s=0;s<g;++s)i.point((_=d[s])[0],_[1]);i.lineEnd();return}o.push(x=new uD(_,d,null,!0)),a.push(x.o=new uD(_,null,x,!1)),o.push(x=new uD(y,d,null,!1)),a.push(x.o=new uD(y,null,x,!0))}}),!!o.length){for(a.sort(t),h9t(o),h9t(a),s=0,l=a.length;s<l;++s)a[s].e=r=!r;for(var c=o[0],u,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,l=u.length;s<l;++s)i.point((h=u[s])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((h=u[s])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function h9t(e){if(!!(t=e.length)){for(var t,r=0,n=e[0],i;++r<t;)n.n=i=e[r],i.p=n,n=i;n.n=i=e[0],i.p=n}}var wJ=M(()=>{bJ()});function fD(e,t){var r=t[0],n=t[1],i=[Jt(r),-ae(r),0],o=0,a=0;SJ.reset();for(var s=0,l=e.length;s<l;++s)if(!!(u=(c=e[s]).length))for(var c,u,h=c[u-1],f=h[0],p=h[1]/2+T2,d=Jt(p),g=ae(p),_=0;_<u;++_,f=x,d=S,g=C,h=y){var y=c[_],x=y[0],b=y[1]/2+T2,S=Jt(b),C=ae(b),P=x-f,k=P>=0?1:-1,O=k*P,D=O>rr,B=d*S;if(SJ.add(Sn(B*k*Jt(O),g*C+B*ae(O))),o+=D?P+k*Bi:P,D^f>=r^x>=r){var I=$p(vc(h),vc(y));Dy(I);var L=$p(i,I);Dy(L);var R=(D^P>=0?-1:1)*Zn(L[2]);(n>R||n===R&&(I[0]||I[1]))&&(a+=D^P>=0?1:-1)}}return(o<-ce||o<ce&&SJ<-ce)^a&1}var SJ,MJ=M(()=>{ky();A2();lr();SJ=Cs()});function _g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Fy=M(()=>{});function EJ(e){return e.length===1&&(e=G4e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function G4e(e){return function(t,r){return _g(e(t),r)}}var TJ=M(()=>{Fy()});var f9t,W4e,Y4e,CJ=M(()=>{Fy();TJ();f9t=EJ(_g),W4e=f9t.right,Y4e=f9t.left});var AJ=M(()=>{});var p9t=M(()=>{AJ()});var d9t=M(()=>{});var L2=M(()=>{});var PJ=M(()=>{L2()});var IJ=M(()=>{PJ()});var LJ=M(()=>{});var m9t,X4e,$4e,kJ=M(()=>{m9t=Array.prototype,X4e=m9t.slice,$4e=m9t.map});var g9t=M(()=>{});var _9t=M(()=>{});function Jp(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var RJ=M(()=>{});var k0n,R0n,N0n,NJ=M(()=>{k0n=Math.sqrt(50),R0n=Math.sqrt(10),N0n=Math.sqrt(2)});var DJ=M(()=>{});var y9t=M(()=>{kJ();CJ();g9t();LJ();_9t();RJ();NJ();DJ()});var dD=M(()=>{L2()});var x9t=M(()=>{kJ();Fy();L2();dD()});var b9t=M(()=>{IJ()});var w9t=M(()=>{});var S9t=M(()=>{L2()});var M9t=M(()=>{Fy();L2();dD()});function OT(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}var E9t=M(()=>{});var OJ=M(()=>{});var T9t=M(()=>{});var C9t=M(()=>{Fy()});var A9t=M(()=>{});var P9t=M(()=>{});var zJ=M(()=>{OJ()});var I9t=M(()=>{zJ()});var mD=M(()=>{CJ();Fy();TJ();p9t();d9t();IJ();LJ();y9t();x9t();b9t();DJ();w9t();S9t();M9t();E9t();OJ();AJ();T9t();dD();RJ();C9t();A9t();P9t();NJ();zJ();PJ();I9t()});function gD(e,t,r,n){return function(i){var o=t(i),a=cD(),s=t(a),l=!1,c,u,h,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=b,u=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,u=OT(u);var S=fD(c,n);u.length?(l||(i.polygonStart(),l=!0),hD(u,iPe,S,r,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(S,C){e(S,C)&&i.point(S,C)}function d(S,C){o.point(S,C)}function g(){f.point=d,o.lineStart()}function _(){f.point=p,o.lineEnd()}function y(S,C){h.push([S,C]),s.point(S,C)}function x(){s.lineStart(),h=[]}function b(){y(h[0][0],h[0][1]),s.lineEnd();var S=s.clean(),C=a.result(),P,k=C.length,O,D,B;if(h.pop(),c.push(h),h=null,!!k){if(S&1){if(D=C[0],(O=D.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),P=0;P<O;++P)i.point((B=D[P])[0],B[1]);i.lineEnd()}return}k>1&&S&2&&C.push(C.pop().concat(C.shift())),u.push(C.filter(nPe))}}return f}}function nPe(e){return e.length>1}function iPe(e,t){return((e=e.x)[0]<0?e[1]-Fn-ce:Fn-e[1])-((t=t.x)[0]<0?t[1]-Fn-ce:Fn-t[1])}var FJ=M(()=>{xJ();wJ();lr();MJ();mD()});function oPe(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?rr:-rr,l=Ye(o-t);Ye(l-rr)<ce?(e.point(t,r=(r+a)/2>0?Fn:-Fn),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),i=0):n!==s&&l>=rr&&(Ye(t-n)<ce&&(t-=n*ce),Ye(o-s)<ce&&(o-=s*ce),r=aPe(t,r,o,a),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),i=0),e.point(t=o,r=a),n=s},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-i}}}function aPe(e,t,r,n){var i,o,a=Jt(e-r);return Ye(a)>ce?yc((Jt(t)*(o=ae(n))*Jt(r)-Jt(n)*(i=ae(t))*Jt(e))/(i*o*a)):(t+n)/2}function sPe(e,t,r,n){var i;if(e==null)i=r*Fn,n.point(-rr,i),n.point(0,i),n.point(rr,i),n.point(rr,0),n.point(rr,-i),n.point(0,-i),n.point(-rr,-i),n.point(-rr,0),n.point(-rr,i);else if(Ye(e[0]-t[0])>ce){var o=e[0]<t[0]?rr:-rr;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])}var zT,BJ=M(()=>{FJ();lr();zT=gD(function(){return!0},oPe,sPe,[-rr,-Fn])});function _D(e){var t=ae(e),r=6*we,n=t>0,i=Ye(t)>ce;function o(u,h,f,p){yJ(p,e,r,f,u,h)}function a(u,h){return ae(u)*ae(h)>t}function s(u){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(_,y){var x=[_,y],b,S=a(_,y),C=n?S?0:c(_,y):S?c(_+(_<0?rr:-rr),y):0;if(!h&&(d=p=S)&&u.lineStart(),S!==p&&(b=l(h,x),(!b||I2(h,b)||I2(x,b))&&(x[0]+=ce,x[1]+=ce,S=a(x[0],x[1]))),S!==p)g=0,S?(u.lineStart(),b=l(x,h),u.point(b[0],b[1])):(b=l(h,x),u.point(b[0],b[1]),u.lineEnd()),h=b;else if(i&&h&&n^S){var P;!(C&f)&&(P=l(x,h,!0))&&(g=0,n?(u.lineStart(),u.point(P[0][0],P[0][1]),u.point(P[1][0],P[1][1]),u.lineEnd()):(u.point(P[1][0],P[1][1]),u.lineEnd(),u.lineStart(),u.point(P[0][0],P[0][1])))}S&&(!h||!I2(h,x))&&u.point(x[0],x[1]),h=x,p=S,f=C},lineEnd:function(){p&&u.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function l(u,h,f){var p=vc(u),d=vc(h),g=[1,0,0],_=$p(p,d),y=PT(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=$p(g,_),k=IT(g,S),O=IT(_,C);QN(k,O);var D=P,B=PT(k,D),I=PT(D,D),L=B*B-I*(PT(k,k)-1);if(!(L<0)){var R=Rr(L),F=IT(D,(-B-R)/I);if(QN(F,k),F=Ny(F),!f)return F;var z=u[0],U=h[0],W=u[1],Z=h[1],rt;U<z&&(rt=z,z=U,U=rt);var ot=U-z,st=Ye(ot-rr)<ce,St=st||ot<ce;if(!st&&Z<W&&(rt=W,W=Z,Z=rt),St?st?W+Z>0^F[1]<(Ye(F[0]-z)<ce?W:Z):W<=F[1]&&F[1]<=Z:ot>rr^(z<=F[0]&&F[0]<=U)){var bt=IT(D,(-B+R)/I);return QN(bt,k),[F,Ny(bt)]}}}function c(u,h){var f=n?e:rr-e,p=0;return u<-f?p|=1:u>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return gD(a,s,o,n?[0,-e]:[-rr,e-rr])}var HJ=M(()=>{A2();vJ();lr();bJ();FJ()});function L9t(e,t,r,n,i,o){var a=e[0],s=e[1],l=t[0],c=t[1],u=0,h=1,f=l-a,p=c-s,d;if(d=r-a,!(!f&&d>0)){if(d/=f,f<0){if(d<u)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>u&&(u=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>u&&(u=d)}else if(f>0){if(d<u)return;d<h&&(h=d)}if(d=n-s,!(!p&&d>0)){if(d/=p,p<0){if(d<u)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>u&&(u=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>u&&(u=d)}else if(p>0){if(d<u)return;d<h&&(h=d)}return u>0&&(e[0]=a+u*f,e[1]=s+u*p),h<1&&(t[0]=a+h*f,t[1]=s+h*p),!0}}}}}var k9t=M(()=>{});function Qp(e,t,r,n){function i(c,u){return e<=c&&c<=r&&t<=u&&u<=n}function o(c,u,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(u,h))||l(c,u)<0^h>0)do f.point(p===0||p===3?e:r,p>1?n:t);while((p=(p+h+4)%4)!==d);else f.point(u[0],u[1])}function a(c,u){return Ye(c[0]-e)<ce?u>0?0:3:Ye(c[0]-r)<ce?u>0?2:1:Ye(c[1]-t)<ce?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var h=a(c,1),f=a(u,1);return h!==f?h-f:h===0?u[1]-c[1]:h===1?c[0]-u[0]:h===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,h=cD(),f,p,d,g,_,y,x,b,S,C,P,k={point:O,lineStart:L,lineEnd:R,polygonStart:B,polygonEnd:I};function O(z,U){i(z,U)&&u.point(z,U)}function D(){for(var z=0,U=0,W=p.length;U<W;++U)for(var Z=p[U],rt=1,ot=Z.length,st=Z[0],St,bt,Mt=st[0],lt=st[1];rt<ot;++rt)St=Mt,bt=lt,st=Z[rt],Mt=st[0],lt=st[1],bt<=n?lt>n&&(Mt-St)*(n-bt)>(lt-bt)*(e-St)&&++z:lt<=n&&(Mt-St)*(n-bt)<(lt-bt)*(e-St)&&--z;return z}function B(){u=h,f=[],p=[],P=!0}function I(){var z=D(),U=P&&z,W=(f=OT(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&hD(f,s,z,o,c),c.polygonEnd()),u=c,f=p=d=null}function L(){k.point=F,p&&p.push(d=[]),C=!0,S=!1,x=b=NaN}function R(){f&&(F(g,_),y&&S&&h.rejoin(),f.push(h.result())),k.point=O,S&&u.lineEnd()}function F(z,U){var W=i(z,U);if(p&&d.push([z,U]),C)g=z,_=U,y=W,C=!1,W&&(u.lineStart(),u.point(z,U));else if(W&&S)u.point(z,U);else{var Z=[x=Math.max(yD,Math.min(FT,x)),b=Math.max(yD,Math.min(FT,b))],rt=[z=Math.max(yD,Math.min(FT,z)),U=Math.max(yD,Math.min(FT,U))];L9t(Z,rt,e,t,r,n)?(S||(u.lineStart(),u.point(Z[0],Z[1])),u.point(rt[0],rt[1]),W||u.lineEnd(),P=!1):W&&(u.lineStart(),u.point(z,U),P=!1)}x=z,b=U,S=W}return k}}var FT,yD,BT=M(()=>{lr();xJ();k9t();wJ();mD();FT=1e9,yD=-FT});function R9t(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Qp(e,t,r,n)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=o=null,a):[[e,t],[r,n]]}}}var N9t=M(()=>{BT()});function lPe(){k2.point=uPe,k2.lineEnd=cPe}function cPe(){k2.point=k2.lineEnd=qr}function uPe(e,t){e*=we,t*=we,UJ=e,vD=Jt(t),xD=ae(t),k2.point=hPe}function hPe(e,t){e*=we,t*=we;var r=Jt(t),n=ae(t),i=Ye(e-UJ),o=ae(i),a=Jt(i),s=n*a,l=xD*r-vD*n*o,c=vD*r+xD*n*o;VJ.add(Sn(Rr(s*s+l*l),c)),UJ=e,vD=r,xD=n}function bD(e){return VJ.reset(),Mo(e,k2),+VJ}var VJ,UJ,vD,xD,k2,qJ=M(()=>{ky();lr();Xp();mg();VJ=Cs(),k2={sphere:qr,point:qr,lineStart:lPe,lineEnd:qr,polygonStart:qr,polygonEnd:qr}});function By(e,t){return GJ[0]=e,GJ[1]=t,bD(fPe)}var GJ,fPe,WJ=M(()=>{qJ();GJ=[null,null],fPe={type:"LineString",coordinates:GJ}});function wD(e,t){return e&&O9t.hasOwnProperty(e.type)?O9t[e.type](e,t):!1}function z9t(e,t){return By(e,t)===0}function F9t(e,t){var r=By(e[0],e[1]),n=By(e[0],t),i=By(t,e[1]);return n+i<=r+ce}function B9t(e,t){return!!fD(e.map(pPe),H9t(t))}function pPe(e){return e=e.map(H9t),e.pop(),e}function H9t(e){return[e[0]*we,e[1]*we]}function V9t(e,t){return(e&&D9t.hasOwnProperty(e.type)?D9t[e.type]:wD)(e,t)}var D9t,O9t,U9t=M(()=>{MJ();WJ();lr();D9t={Feature:function(e,t){return wD(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(wD(r[n].geometry,t))return!0;return!1}},O9t={Sphere:function(){return!0},Point:function(e,t){return z9t(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(z9t(r[n],t))return!0;return!1},LineString:function(e,t){return F9t(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(F9t(r[n],t))return!0;return!1},Polygon:function(e,t){return B9t(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(B9t(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(wD(r[n],t))return!0;return!1}}});function q9t(e,t,r){var n=Jp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function G9t(e,t,r){var n=Jp(e,t-ce,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function SD(){var e,t,r,n,i,o,a,s,l=10,c=l,u=90,h=360,f,p,d,g,_=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return Jp(CT(n/u)*u,r,u).map(d).concat(Jp(CT(s/h)*h,a,h).map(g)).concat(Jp(CT(t/l)*l,e,l).filter(function(b){return Ye(b%u)>ce}).map(f)).concat(Jp(CT(o/c)*c,i,c).filter(function(b){return Ye(b%h)>ce}).map(p))}return y.lines=function(){return x().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(g(a).slice(1),d(r).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(n=+b[0][0],r=+b[1][0],s=+b[0][1],a=+b[1][1],n>r&&(b=n,n=r,r=b),s>a&&(b=s,s=a,a=b),y.precision(_)):[[n,s],[r,a]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],o=+b[0][1],i=+b[1][1],t>e&&(b=t,t=e,e=b),o>i&&(b=o,o=i,i=b),y.precision(_)):[[t,o],[e,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],h=+b[1],y):[u,h]},y.stepMinor=function(b){return arguments.length?(l=+b[0],c=+b[1],y):[l,c]},y.precision=function(b){return arguments.length?(_=+b,f=q9t(o,i,90),p=G9t(t,e,_),d=q9t(s,a,90),g=G9t(n,r,_),y):_},y.extentMajor([[-180,-90+ce],[180,90-ce]]).extentMinor([[-180,-80-ce],[180,80+ce]])}function W9t(){return SD()()}var Y9t=M(()=>{mD();lr()});function j9t(e,t){var r=e[0]*we,n=e[1]*we,i=t[0]*we,o=t[1]*we,a=ae(n),s=Jt(n),l=ae(o),c=Jt(o),u=a*ae(r),h=a*Jt(r),f=l*ae(i),p=l*Jt(i),d=2*Zn(Rr(oJ(o-n)+a*l*oJ(i-r))),g=Jt(d),_=d?function(y){var x=Jt(y*=d)/g,b=Jt(d-y)/g,S=b*u+x*f,C=b*h+x*p,P=b*s+x*c;return[Sn(C,S)*Ur,Sn(P,Rr(S*S+C*C))*Ur]}:function(){return[r*Ur,n*Ur]};return _.distance=d,_}var X9t=M(()=>{lr()});function nf(e){return e}var MD=M(()=>{});function dPe(){yg.point=mPe}function mPe(e,t){yg.point=Z9t,$9t=XJ=e,K9t=$J=t}function Z9t(e,t){jJ.add($J*e-XJ*t),XJ=e,$J=t}function gPe(){Z9t($9t,K9t)}var YJ,jJ,$9t,K9t,XJ,$J,yg,KJ,J9t=M(()=>{ky();lr();Xp();YJ=Cs(),jJ=Cs(),yg={point:qr,lineStart:qr,lineEnd:qr,polygonStart:function(){yg.lineStart=dPe,yg.lineEnd=gPe},polygonEnd:function(){yg.lineStart=yg.lineEnd=yg.point=qr,YJ.add(Ye(jJ)),jJ.reset()},result:function(){var e=YJ/2;return YJ.reset(),e}};KJ=yg});function yPe(e,t){e<R2&&(R2=e),e>HT&&(HT=e),t<ED&&(ED=t),t>TD&&(TD=t)}var R2,ED,HT,TD,_Pe,N2,ZJ=M(()=>{Xp();R2=1/0,ED=R2,HT=-R2,TD=HT,_Pe={point:yPe,lineStart:qr,lineEnd:qr,polygonStart:qr,polygonEnd:qr,result:function(){var e=[[R2,ED],[HT,TD]];return HT=TD=-(ED=R2=1/0),e}};N2=_Pe});function Hy(e,t){JJ+=e,QJ+=t,++VT}function Q9t(){Cu.point=vPe}function vPe(e,t){Cu.point=xPe,Hy(of=e,af=t)}function xPe(e,t){var r=e-of,n=t-af,i=Rr(r*r+n*n);CD+=i*(of+e)/2,AD+=i*(af+t)/2,D2+=i,Hy(of=e,af=t)}function tLt(){Cu.point=Hy}function bPe(){Cu.point=SPe}function wPe(){nLt(eLt,rLt)}function SPe(e,t){Cu.point=nLt,Hy(eLt=of=e,rLt=af=t)}function nLt(e,t){var r=e-of,n=t-af,i=Rr(r*r+n*n);CD+=i*(of+e)/2,AD+=i*(af+t)/2,D2+=i,i=af*e-of*t,tQ+=i*(of+e),eQ+=i*(af+t),UT+=i*3,Hy(of=e,af=t)}var JJ,QJ,VT,CD,AD,D2,tQ,eQ,UT,eLt,rLt,of,af,Cu,rQ,iLt=M(()=>{lr();JJ=0,QJ=0,VT=0,CD=0,AD=0,D2=0,tQ=0,eQ=0,UT=0,Cu={point:Hy,lineStart:Q9t,lineEnd:tLt,polygonStart:function(){Cu.lineStart=bPe,Cu.lineEnd=wPe},polygonEnd:function(){Cu.point=Hy,Cu.lineStart=Q9t,Cu.lineEnd=tLt},result:function(){var e=UT?[tQ/UT,eQ/UT]:D2?[CD/D2,AD/D2]:VT?[JJ/VT,QJ/VT]:[NaN,NaN];return JJ=QJ=VT=CD=AD=D2=tQ=eQ=UT=0,e}};rQ=Cu});function PD(e){this._context=e}var oLt=M(()=>{lr();Xp();PD.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,Bi);break}}},result:qr}});function MPe(e,t){ID.point=lLt,aLt=qT=e,sLt=GT=t}function lLt(e,t){qT-=e,GT-=t,iQ.add(Rr(qT*qT+GT*GT)),qT=e,GT=t}var iQ,nQ,aLt,sLt,qT,GT,ID,oQ,cLt=M(()=>{ky();lr();Xp();iQ=Cs(),ID={point:qr,lineStart:function(){ID.point=MPe},lineEnd:function(){nQ&&lLt(aLt,sLt),ID.point=qr},polygonStart:function(){nQ=!0},polygonEnd:function(){nQ=null},result:function(){var e=+iQ;return iQ.reset(),e}};oQ=ID});function LD(){this._string=[]}function uLt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var hLt=M(()=>{LD.prototype={_radius:4.5,_circle:uLt(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=uLt(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}}});function fLt(e,t){var r=4.5,n,i;function o(a){return a&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),Mo(a,n(i))),i.result()}return o.area=function(a){return Mo(a,n(KJ)),KJ.result()},o.measure=function(a){return Mo(a,n(oQ)),oQ.result()},o.bounds=function(a){return Mo(a,n(N2)),N2.result()},o.centroid=function(a){return Mo(a,n(rQ)),rQ.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,nf):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new LD):new PD(t=a),typeof r!="function"&&i.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(i.pointRadius(+a),+a),o):r},o.projection(e).context(t)}var pLt=M(()=>{MD();mg();J9t();ZJ();iLt();oLt();cLt();hLt()});function dLt(e){return{stream:vg(e)}}function vg(e){return function(t){var r=new aQ;for(var n in e)r[n]=e[n];return r.stream=t,r}}function aQ(){}var WT=M(()=>{aQ.prototype={constructor:aQ,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}});function sQ(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),Mo(r,e.stream(N2)),t(N2.result()),n!=null&&e.clipExtent(n),e}function Vy(e,t,r){return sQ(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),s=+t[0][0]+(i-a*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(o-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([s,l])},r)}function O2(e,t,r){return Vy(e,[[0,0],t],r)}function z2(e,t,r){return sQ(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),a=(i-o*(n[1][0]+n[0][0]))/2,s=-o*n[0][1];e.scale(150*o).translate([a,s])},r)}function F2(e,t,r){return sQ(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),a=-o*n[0][0],s=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])},r)}var kD=M(()=>{mg();ZJ()});function lQ(e,t){return+t?CPe(e,t):TPe(e)}function TPe(e){return vg({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function CPe(e,t){function r(n,i,o,a,s,l,c,u,h,f,p,d,g,_){var y=c-n,x=u-i,b=y*y+x*x;if(b>4*t&&g--){var S=a+f,C=s+p,P=l+d,k=Rr(S*S+C*C+P*P),O=Zn(P/=k),D=Ye(Ye(P)-1)<ce||Ye(o-h)<ce?(o+h)/2:Sn(C,S),B=e(D,O),I=B[0],L=B[1],R=I-n,F=L-i,z=x*R-y*F;(z*z/b>t||Ye((y*R+x*F)/b-.5)>.3||a*f+s*p+l*d<EPe)&&(r(n,i,o,a,s,l,I,L,D,S/=k,C/=k,P,g,_),_.point(I,L),r(I,L,D,S,C,P,c,u,h,f,p,d,g,_))}}return function(n){var i,o,a,s,l,c,u,h,f,p,d,g,_={point:y,lineStart:x,lineEnd:S,polygonStart:function(){n.polygonStart(),_.lineStart=C},polygonEnd:function(){n.polygonEnd(),_.lineStart=x}};function y(O,D){O=e(O,D),n.point(O[0],O[1])}function x(){h=NaN,_.point=b,n.lineStart()}function b(O,D){var B=vc([O,D]),I=e(O,D);r(h,f,u,p,d,g,h=I[0],f=I[1],u=O,p=B[0],d=B[1],g=B[2],mLt,n),n.point(h,f)}function S(){_.point=y,n.lineEnd()}function C(){x(),_.point=P,_.lineEnd=k}function P(O,D){b(i=O,D),o=h,a=f,s=p,l=d,c=g,_.point=b}function k(){r(h,f,u,p,d,g,o,a,i,s,l,c,mLt,n),_.lineEnd=S,S()}return _}}var mLt,EPe,gLt=M(()=>{A2();lr();WT();mLt=16,EPe=ae(30*we)});function PPe(e){return vg({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function eo(e){return YT(function(){return e})()}function YT(e){var t,r=150,n=480,i=250,o,a,s=0,l=0,c=0,u=0,h=0,f,p,d=null,g=zT,_=null,y,x,b,S=nf,C=.5,P=lQ(I,C),k,O;function D(F){return F=p(F[0]*we,F[1]*we),[F[0]*r+o,a-F[1]*r]}function B(F){return F=p.invert((F[0]-o)/r,(a-F[1])/r),F&&[F[0]*Ur,F[1]*Ur]}function I(F,z){return F=t(F,z),[F[0]*r+o,a-F[1]*r]}D.stream=function(F){return k&&O===F?k:k=APe(PPe(f)(g(P(S(O=F)))))},D.preclip=function(F){return arguments.length?(g=F,d=void 0,R()):g},D.postclip=function(F){return arguments.length?(S=F,_=y=x=b=null,R()):S},D.clipAngle=function(F){return arguments.length?(g=+F?_D(d=F*we):(d=null,zT),R()):d*Ur},D.clipExtent=function(F){return arguments.length?(S=F==null?(_=y=x=b=null,nf):Qp(_=+F[0][0],y=+F[0][1],x=+F[1][0],b=+F[1][1]),R()):_==null?null:[[_,y],[x,b]]},D.scale=function(F){return arguments.length?(r=+F,L()):r},D.translate=function(F){return arguments.length?(n=+F[0],i=+F[1],L()):[n,i]},D.center=function(F){return arguments.length?(s=F[0]%360*we,l=F[1]%360*we,L()):[s*Ur,l*Ur]},D.rotate=function(F){return arguments.length?(c=F[0]%360*we,u=F[1]%360*we,h=F.length>2?F[2]%360*we:0,L()):[c*Ur,u*Ur,h*Ur]},D.precision=function(F){return arguments.length?(P=lQ(I,C=F*F),R()):Rr(C)},D.fitExtent=function(F,z){return Vy(D,F,z)},D.fitSize=function(F,z){return O2(D,F,z)},D.fitWidth=function(F,z){return z2(D,F,z)},D.fitHeight=function(F,z){return F2(D,F,z)};function L(){p=sD(f=NT(c,u,h),t);var F=t(s,l);return o=n-F[0]*r,a=i+F[1]*r,R()}function R(){return k=O=null,D}return function(){return t=e.apply(this,arguments),D.invert=t.invert&&B,L()}}var APe,Au=M(()=>{BJ();HJ();BT();gJ();MD();lr();DT();WT();kD();gLt();APe=vg({point:function(e,t){this.stream.point(e*we,t*we)}})});function B2(e){var t=0,r=rr/3,n=YT(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*we,r=o[1]*we):[t*Ur,r*Ur]},i}var RD=M(()=>{lr();Au()});function _Lt(e){var t=ae(e);function r(n,i){return[n*t,Jt(i)/t]}return r.invert=function(n,i){return[n/t,Zn(i*t)]},r}var yLt=M(()=>{lr()});function cQ(e,t){var r=Jt(e),n=(r+Jt(t))/2;if(Ye(n)<ce)return _Lt(e);var i=1+r*(2*n-r),o=Rr(i)/n;function a(s,l){var c=Rr(i-2*n*Jt(l))/n;return[c*Jt(s*=n),o-c*ae(s)]}return a.invert=function(s,l){var c=o-l;return[Sn(s,Ye(c))/n*dg(c),Zn((i-(s*s+c*c)*n*n)/(2*n))]},a}function Uy(){return B2(cQ).scale(155.424).center([0,33.6442])}var ND=M(()=>{lr();RD();yLt()});function DD(){return Uy().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var uQ=M(()=>{ND()});function IPe(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i<t;)e[i].point(r,n)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function vLt(){var e,t,r=DD(),n,i=Uy().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=Uy().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(f,p){l=[f,p]}};function u(f){var p=f[0],d=f[1];return l=null,n.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}u.invert=function(f){var p=r.scale(),d=r.translate(),g=(f[0]-d[0])/p,_=(f[1]-d[1])/p;return(_>=.12&&_<.234&&g>=-.425&&g<-.214?i:_>=.166&&_<.234&&g>=-.214&&g<-.115?a:r).invert(f)},u.stream=function(f){return e&&t===f?e:e=IPe([r.stream(t=f),i.stream(f),a.stream(f)])},u.precision=function(f){return arguments.length?(r.precision(f),i.precision(f),a.precision(f),h()):r.precision()},u.scale=function(f){return arguments.length?(r.scale(f),i.scale(f*.35),a.scale(f),u.translate(r.translate())):r.scale()},u.translate=function(f){if(!arguments.length)return r.translate();var p=r.scale(),d=+f[0],g=+f[1];return n=r.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+ce,g+.12*p+ce],[d-.214*p-ce,g+.234*p-ce]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+ce,g+.166*p+ce],[d-.115*p-ce,g+.234*p-ce]]).stream(c),h()},u.fitExtent=function(f,p){return Vy(u,f,p)},u.fitSize=function(f,p){return O2(u,f,p)},u.fitWidth=function(f,p){return z2(u,f,p)},u.fitHeight=function(f,p){return F2(u,f,p)};function h(){return e=t=null,u}return u.scale(1070)}var xLt=M(()=>{lr();uQ();ND();kD()});function OD(e){return function(t,r){var n=ae(t),i=ae(r),o=e(n*i);return[o*i*Jt(t),o*Jt(r)]}}function sf(e){return function(t,r){var n=Rr(t*t+r*r),i=e(n),o=Jt(i),a=ae(i);return[Sn(t*o,n*a),Zn(n&&r*o/n)]}}var H2=M(()=>{lr()});function bLt(){return eo(zD).scale(124.75).clipAngle(180-.001)}var zD,wLt=M(()=>{lr();H2();Au();zD=OD(function(e){return Rr(2/(1+e))});zD.invert=sf(function(e){return 2*Zn(e/2)})});function SLt(){return eo(FD).scale(79.4188).clipAngle(180-.001)}var FD,MLt=M(()=>{lr();H2();Au();FD=OD(function(e){return(e=KN(e))&&e/Jt(e)});FD.invert=sf(function(e){return e})});function qy(e,t){return[e,Ry(C2((Fn+t)/2))]}function ELt(){return hQ(qy).scale(961/Bi)}function hQ(e){var t=eo(e),r=t.center,n=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,c;t.scale=function(h){return arguments.length?(n(h),u()):n()},t.translate=function(h){return arguments.length?(i(h),u()):i()},t.center=function(h){return arguments.length?(r(h),u()):r()},t.clipExtent=function(h){return arguments.length?(h==null?a=s=l=c=null:(a=+h[0][0],s=+h[0][1],l=+h[1][0],c=+h[1][1]),u()):a==null?null:[[a,s],[l,c]]};function u(){var h=rr*n(),f=t(lD(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===qy?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,l),c]]:[[a,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,c)]])}return u()}var BD=M(()=>{lr();DT();Au();qy.invert=function(e,t){return[e,2*yc(XN(t))-Fn]}});function HD(e){return C2((Fn+e)/2)}function fQ(e,t){var r=ae(e),n=e===t?Jt(e):Ry(r/ae(t))/Ry(HD(t)/HD(e)),i=r*$N(HD(e),n)/n;if(!n)return qy;function o(a,s){i>0?s<-Fn+ce&&(s=-Fn+ce):s>Fn-ce&&(s=Fn-ce);var l=i/$N(HD(s),n);return[l*Jt(n*a),i-l*ae(n*a)]}return o.invert=function(a,s){var l=i-s,c=dg(n)*Rr(a*a+l*l);return[Sn(a,Ye(l))/n*dg(l),2*yc($N(i/c,1/n))-Fn]},o}function TLt(){return B2(fQ).scale(109.5).parallels([30,30])}var CLt=M(()=>{lr();RD();BD()});function Gy(e,t){return[e,t]}function ALt(){return eo(Gy).scale(152.63)}var pQ=M(()=>{Au();Gy.invert=Gy});function dQ(e,t){var r=ae(e),n=e===t?Jt(e):(r-ae(t))/(t-e),i=r/n+e;if(Ye(n)<ce)return Gy;function o(a,s){var l=i-s,c=n*a;return[l*Jt(c),i-l*ae(c)]}return o.invert=function(a,s){var l=i-s;return[Sn(a,Ye(l))/n*dg(l),i-dg(n)*Rr(a*a+l*l)]},o}function PLt(){return B2(dQ).scale(131.154).center([0,13.9389])}var ILt=M(()=>{lr();RD();pQ()});function VD(e,t){var r=ae(t),n=ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function LLt(){return eo(VD).scale(144.049).clipAngle(60)}var kLt=M(()=>{lr();H2();Au();VD.invert=sf(yc)});function UD(e,t,r,n){return e===1&&t===1&&r===0&&n===0?nf:vg({point:function(i,o){this.stream.point(i*e+r,o*t+n)}})}function RLt(){var e=1,t=0,r=0,n=1,i=1,o=nf,a=null,s,l,c,u=nf,h,f,p;function d(){return h=f=null,p}return p={stream:function(g){return h&&f===g?h:h=o(u(f=g))},postclip:function(g){return arguments.length?(u=g,a=s=l=c=null,d()):u},clipExtent:function(g){return arguments.length?(u=g==null?(a=s=l=c=null,nf):Qp(a=+g[0][0],s=+g[0][1],l=+g[1][0],c=+g[1][1]),d()):a==null?null:[[a,s],[l,c]]},scale:function(g){return arguments.length?(o=UD((e=+g)*n,e*i,t,r),d()):e},translate:function(g){return arguments.length?(o=UD(e*n,e*i,t=+g[0],r=+g[1]),d()):[t,r]},reflectX:function(g){return arguments.length?(o=UD(e*(n=g?-1:1),e*i,t,r),d()):n<0},reflectY:function(g){return arguments.length?(o=UD(e*n,e*(i=g?-1:1),t,r),d()):i<0},fitExtent:function(g,_){return Vy(p,g,_)},fitSize:function(g,_){return O2(p,g,_)},fitWidth:function(g,_){return z2(p,g,_)},fitHeight:function(g,_){return F2(p,g,_)}}}var NLt=M(()=>{BT();MD();WT();kD()});function qD(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}function DLt(){return eo(qD).scale(175.295)}var OLt=M(()=>{Au();lr();qD.invert=function(e,t){var r=t,n=25,i;do{var o=r*r,a=o*o;r-=i=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(Ye(i)>ce&&--n>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]}});function GD(e,t){return[ae(t)*Jt(e),Jt(t)]}function zLt(){return eo(GD).scale(249.5).clipAngle(90+ce)}var FLt=M(()=>{lr();H2();Au();GD.invert=sf(Zn)});function WD(e,t){var r=ae(t),n=1+ae(e)*r;return[r*Jt(e)/n,Jt(t)/n]}function BLt(){return eo(WD).scale(250).clipAngle(142)}var HLt=M(()=>{lr();H2();Au();WD.invert=sf(function(e){return 2*yc(e)})});function YD(e,t){return[Ry(C2((Fn+t)/2)),-e]}function VLt(){var e=hQ(YD),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}var ULt=M(()=>{lr();BD();YD.invert=function(e,t){return[-t,2*yc(XN(e))-Fn]}});var qLt=M(()=>{uJ();ZIt();i9t();vJ();BJ();HJ();N9t();BT();U9t();WJ();Y9t();X9t();qJ();pLt();uQ();xLt();wLt();MLt();CLt();ND();ILt();pQ();kLt();NLt();Au();BD();OLt();FLt();HLt();ULt();DT();mg();WT()});function LPe(e,t){return e.parent===t.parent?1:2}function kPe(e){return e.reduce(RPe,0)/e.length}function RPe(e,t){return e+t.x}function NPe(e){return 1+e.reduce(DPe,0)}function DPe(e,t){return Math.max(e,t.y)}function OPe(e){for(var t;t=e.children;)e=t[0];return e}function zPe(e){for(var t;t=e.children;)e=t[t.length-1];return e}function GLt(){var e=LPe,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=kPe(p),f.y=NPe(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=OPe(o),c=zPe(o),u=l.x-e(l,c)/2,h=c.x+e(c,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-u)/(h-u)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}var WLt=M(()=>{});function FPe(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function YLt(){return this.eachAfter(FPe)}var jLt=M(()=>{});function XLt(e){var t=this,r,n=[t],i,o,a;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);while(n.length);return this}var $Lt=M(()=>{});function KLt(e){for(var t=this,r=[t],n,i;t=r.pop();)if(e(t),n=t.children,n)for(i=n.length-1;i>=0;--i)r.push(n[i]);return this}var ZLt=M(()=>{});function JLt(e){for(var t=this,r=[t],n=[],i,o,a;t=r.pop();)if(n.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);for(;t=n.pop();)e(t);return this}var QLt=M(()=>{});function tkt(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}var ekt=M(()=>{});function rkt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var nkt=M(()=>{});function ikt(e){for(var t=this,r=BPe(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function BPe(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var okt=M(()=>{});function akt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var skt=M(()=>{});function lkt(){var e=[];return this.each(function(t){e.push(t)}),e}var ckt=M(()=>{});function ukt(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var hkt=M(()=>{});function fkt(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}var pkt=M(()=>{});function jT(e,t){var r=new xg(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=VPe);i=o.pop();)if(n&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new xg(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore(mQ)}function HPe(){return jT(this).eachBefore(UPe)}function VPe(e){return e.children}function UPe(e){e.data=e.data.data}function mQ(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function xg(e){this.data=e,this.depth=this.height=0,this.parent=null}var jD=M(()=>{jLt();$Lt();ZLt();QLt();ekt();nkt();okt();skt();ckt();hkt();pkt();xg.prototype=jT.prototype={constructor:xg,count:YLt,each:XLt,eachAfter:JLt,eachBefore:KLt,sum:tkt,sort:rkt,path:ikt,ancestors:akt,descendants:lkt,leaves:ukt,links:fkt,copy:HPe}});function mkt(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}var dkt,gkt=M(()=>{dkt=Array.prototype.slice});function $D(e){for(var t=0,r=(e=mkt(dkt.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&_kt(o,i)?++t:(o=GPe(n=qPe(n,i)),t=0);return o}function qPe(e,t){var r,n;if(gQ(t,e))return[t];for(r=0;r<e.length;++r)if(XD(t,e[r])&&gQ(XT(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(XD(XT(e[r],e[n]),t)&&XD(XT(e[r],t),e[n])&&XD(XT(e[n],t),e[r])&&gQ(ykt(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function XD(e,t){var r=e.r-t.r,n=t.x-e.x,i=t.y-e.y;return r<0||r*r<n*n+i*i}function _kt(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function gQ(e,t){for(var r=0;r<t.length;++r)if(!_kt(e,t[r]))return!1;return!0}function GPe(e){switch(e.length){case 1:return WPe(e[0]);case 2:return XT(e[0],e[1]);case 3:return ykt(e[0],e[1],e[2])}}function WPe(e){return{x:e.x,y:e.y,r:e.r}}function XT(e,t){var r=e.x,n=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-r,c=a-n,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(r+o+l/h*u)/2,y:(n+a+c/h*u)/2,r:(h+i+s)/2}}function ykt(e,t,r){var n=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=r.x,u=r.y,h=r.r,f=n-a,p=n-c,d=i-s,g=i-u,_=l-o,y=h-o,x=n*n+i*i-o*o,b=x-a*a-s*s+l*l,S=x-c*c-u*u+h*h,C=p*d-f*g,P=(d*S-g*b)/(C*2)-n,k=(g*_-d*y)/C,O=(p*b-f*S)/(C*2)-i,D=(f*y-p*_)/C,B=k*k+D*D-1,I=2*(o+P*k+O*D),L=P*P+O*O-o*o,R=-(B?(I+Math.sqrt(I*I-4*B*L))/(2*B):L/I);return{x:n+P+k*R,y:i+O+D*R,r:R}}var _Q=M(()=>{gkt()});function vkt(e,t,r){var n=e.x,i=e.y,o=t.r+r.r,a=e.r+r.r,s=t.x-n,l=t.y-i,c=s*s+l*l;if(c){var u=.5+((a*=a)-(o*=o))/(2*c),h=Math.sqrt(Math.max(0,2*o*(a+c)-(a-=c)*a-o*o))/(2*c);r.x=n+u*s+h*l,r.y=i+u*l-h*s}else r.x=n+a,r.y=i}function xkt(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return i*i-1e-6>r*r+n*n}function bkt(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function KD(e){this._=e,this.next=null,this.previous=null}function yQ(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,h;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;vkt(r,t,n=e[2]),t=new KD(t),r=new KD(r),n=new KD(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){vkt(t._,r._,n=e[s]),n=new KD(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(xkt(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(xkt(c._,n._)){t=c,t.next=r,r.previous=t,--s;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,o=bkt(t);(n=n.next)!==r;)(a=bkt(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=$D(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function wkt(e){return yQ(e),e}var vQ=M(()=>{_Q()});function Skt(e){return e==null?null:V2(e)}function V2(e){if(typeof e!="function")throw new Error;return e}var ZD=M(()=>{});function td(){return 0}function bg(e){return function(){return e}}var xQ=M(()=>{});function YPe(e){return Math.sqrt(e.value)}function Tkt(){var e=null,t=1,r=1,n=td;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(Mkt(e)).eachAfter(bQ(n,.5)).eachBefore(Ekt(1)):o.eachBefore(Mkt(YPe)).eachAfter(bQ(td,1)).eachAfter(bQ(n,o.r/Math.min(t,r))).eachBefore(Ekt(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=Skt(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.padding=function(o){return arguments.length?(n=typeof o=="function"?o:bg(+o),i):n},i}function Mkt(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function bQ(e,t){return function(r){if(n=r.children){var n,i,o=n.length,a=e(r)*t||0,s;if(a)for(i=0;i<o;++i)n[i].r+=a;if(s=yQ(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function Ekt(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}var Ckt=M(()=>{vQ();ZD();xQ()});function JD(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var wQ=M(()=>{});function lf(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(n-t)/e.value;++s<l;)a=o[s],a.y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}var U2=M(()=>{});function Akt(){var e=1,t=1,r=0,n=!1;function i(a){var s=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),n&&a.eachBefore(JD),a}function o(a,s){return function(l){l.children&&lf(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var c=l.x0,u=l.y0,h=l.x1-r,f=l.y1-r;h<c&&(c=h=(c+h)/2),f<u&&(u=f=(u+f)/2),l.x0=c,l.y0=u,l.x1=h,l.y1=f}}return i.round=function(a){return arguments.length?(n=!!a,i):n},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(r=+a,i):r},i}var Pkt=M(()=>{wQ();U2()});function XPe(e){return e.id}function $Pe(e){return e.parentId}function kkt(){var e=XPe,t=$Pe;function r(n){var i,o,a=n.length,s,l,c,u=new Array(a),h,f,p={};for(o=0;o<a;++o)i=n[o],c=u[o]=new xg(i),(h=e(i,o,n))!=null&&(h+="")&&(f=Ikt+(c.id=h),p[f]=f in p?Lkt:c);for(o=0;o<a;++o)if(c=u[o],h=t(n[o],o,n),h==null||!(h+="")){if(s)throw new Error("multiple roots");s=c}else{if(l=p[Ikt+h],!l)throw new Error("missing: "+h);if(l===Lkt)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}if(!s)throw new Error("no root");if(s.parent=jPe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore(mQ),s.parent=null,a>0)throw new Error("cycle");return s}return r.id=function(n){return arguments.length?(e=V2(n),r):e},r.parentId=function(n){return arguments.length?(t=V2(n),r):t},r}var Ikt,jPe,Lkt,Rkt=M(()=>{ZD();jD();Ikt="$",jPe={depth:-1},Lkt={}});function KPe(e,t){return e.parent===t.parent?1:2}function SQ(e){var t=e.children;return t?t[0]:e.t}function MQ(e){var t=e.children;return t?t[t.length-1]:e.t}function ZPe(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function JPe(e){for(var t=0,r=0,n=e.children,i=n.length,o;--i>=0;)o=n[i],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function QPe(e,t,r){return e.a.parent===t.parent?e.a:r}function QD(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}function t6e(e){for(var t=new QD(e,0),r,n=[t],i,o,a,s;r=n.pop();)if(o=r._.children)for(r.children=new Array(s=o.length),a=s-1;a>=0;--a)n.push(i=r.children[a]=new QD(o[a],a)),i.parent=r;return(t.parent=new QD(null,0)).children=[t],t}function Nkt(){var e=KPe,t=1,r=1,n=null;function i(c){var u=t6e(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),n)c.eachBefore(l);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:e(h,f)/2,g=d-h.x,_=t/(f.x+d+g),y=r/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*_,x.y=x.depth*y})}return c}function o(c){var u=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(u){JPe(c);var p=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+e(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,h){if(u){for(var f=c,p=c,d=u,g=f.parent.children[0],_=f.m,y=p.m,x=d.m,b=g.m,S;d=MQ(d),f=SQ(f),d&&f;)g=SQ(g),p=MQ(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(ZPe(QPe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!MQ(p)&&(p.t=d,p.m+=x-y),f&&!SQ(g)&&(g.t=f,g.m+=_-b,h=c)}return h}function l(c){c.x*=t,c.y=c.depth*r}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(n=!1,t=+c[0],r=+c[1],i):n?null:[t,r]},i.nodeSize=function(c){return arguments.length?(n=!0,t=+c[0],r=+c[1],i):n?[t,r]:null},i}var Dkt=M(()=>{jD();QD.prototype=Object.create(xg.prototype)});function wg(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-r)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var $T=M(()=>{});function TQ(e,t,r,n,i,o){for(var a=[],s=t.children,l,c,u=0,h=0,f=s.length,p,d,g=t.value,_,y,x,b,S,C,P;u<f;){p=i-r,d=o-n;do _=s[h++].value;while(!_&&h<f);for(y=x=_,C=Math.max(d/p,p/d)/(g*e),P=_*_*C,S=Math.max(x/P,P/y);h<f;++h){if(_+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),P=_*_*C,b=Math.max(x/P,P/y),b>S){_-=c;break}S=b}a.push(l={value:_,dice:p<d,children:s.slice(u,h)}),l.dice?lf(l,r,n,i,g?n+=d*_/g:o):wg(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var EQ,tO,eO=M(()=>{U2();$T();EQ=(1+Math.sqrt(5))/2;tO=function e(t){function r(n,i,o,a,s){TQ(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(EQ)});function Okt(){var e=tO,t=!1,r=1,n=1,i=[0],o=td,a=td,s=td,l=td,c=td;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(JD),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,_=f.x1-p,y=f.y1-p;_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=_,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,_-=s(f)-p,y-=l(f)-p,_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),e(f,d,g,_,y))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(r=+f[0],n=+f[1],u):[r,n]},u.tile=function(f){return arguments.length?(e=V2(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:bg(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:bg(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:bg(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:bg(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:bg(+f),u):c},u}var zkt=M(()=>{wQ();eO();ZD();xQ()});function Fkt(e,t,r,n,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,r,n,i);function u(h,f,p,d,g,_,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=_,x.y1=y;return}for(var b=c[h],S=p/2+b,C=h+1,P=f-1;C<P;){var k=C+P>>>1;c[k]<S?C=k+1:P=k}S-c[C-1]<c[C]-S&&h+1<C&&--C;var O=c[C]-b,D=p-O;if(_-d>y-g){var B=(d*D+_*O)/p;u(h,C,O,d,g,B,y),u(C,f,D,B,g,_,y)}else{var I=(g*D+y*O)/p;u(h,C,O,d,g,_,I),u(C,f,D,d,I,_,y)}}}var Bkt=M(()=>{});function Hkt(e,t,r,n,i){(e.depth&1?wg:lf)(e,t,r,n,i)}var Vkt=M(()=>{U2();$T()});var Ukt,qkt=M(()=>{U2();$T();eO();Ukt=function e(t){function r(n,i,o,a,s){if((l=n._squarify)&&l.ratio===t)for(var l,c,u,h,f=-1,p,d=l.length,g=n.value;++f<d;){for(c=l[f],u=c.children,h=c.value=0,p=u.length;h<p;++h)c.value+=u[h].value;c.dice?lf(c,i,o,a,o+=(s-o)*c.value/g):wg(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=TQ(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(EQ)});var Gkt=M(()=>{WLt();jD();Ckt();vQ();_Q();Pkt();Rkt();Dkt();zkt();Bkt();U2();$T();Vkt();eO();qkt()});function ed(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Sg(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var rO=M(()=>{});function hf(){}function Ykt(){return this.rgb().formatHex()}function l6e(){return Jkt(this).formatHsl()}function jkt(){return this.rgb().formatRgb()}function Eg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=e6e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Xkt(t):r===3?new ro(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=r6e.exec(e))?new ro(t[1],t[2],t[3],1):(t=n6e.exec(e))?new ro(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=i6e.exec(e))?nO(t[1],t[2],t[3],t[4]):(t=o6e.exec(e))?nO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=a6e.exec(e))?Zkt(t[1],t[2]/100,t[3]/100,1):(t=s6e.exec(e))?Zkt(t[1],t[2]/100,t[3]/100,t[4]):Wkt.hasOwnProperty(e)?Xkt(Wkt[e]):e==="transparent"?new ro(NaN,NaN,NaN,0):null}function Xkt(e){return new ro(e>>16&255,e>>8&255,e&255,1)}function nO(e,t,r,n){return n<=0&&(e=t=r=NaN),new ro(e,t,r,n)}function ZT(e){return e instanceof hf||(e=Eg(e)),e?(e=e.rgb(),new ro(e.r,e.g,e.b,e.opacity)):new ro}function G2(e,t,r,n){return arguments.length===1?ZT(e):new ro(e,t,r,n==null?1:n)}function ro(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function $kt(){return"#"+CQ(this.r)+CQ(this.g)+CQ(this.b)}function Kkt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function CQ(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function Zkt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new cf(e,t,r,n)}function Jkt(e){if(e instanceof cf)return new cf(e.h,e.s,e.l,e.opacity);if(e instanceof hf||(e=Eg(e)),!e)return new cf;if(e instanceof cf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new cf(a,s,l,e.opacity)}function JT(e,t,r,n){return arguments.length===1?Jkt(e):new cf(e,t,r,n==null?1:n)}function cf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function AQ(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Mg,Wy,q2,KT,uf,e6e,r6e,n6e,i6e,o6e,a6e,s6e,Wkt,iO=M(()=>{rO();Mg=.7,Wy=1/Mg,q2="\\s*([+-]?\\d+)\\s*",KT="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",uf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",e6e=/^#([0-9a-f]{3,8})$/,r6e=new RegExp("^rgb\\("+[q2,q2,q2]+"\\)$"),n6e=new RegExp("^rgb\\("+[uf,uf,uf]+"\\)$"),i6e=new RegExp("^rgba\\("+[q2,q2,q2,KT]+"\\)$"),o6e=new RegExp("^rgba\\("+[uf,uf,uf,KT]+"\\)$"),a6e=new RegExp("^hsl\\("+[KT,uf,uf]+"\\)$"),s6e=new RegExp("^hsla\\("+[KT,uf,uf,KT]+"\\)$"),Wkt={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};ed(hf,Eg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:Ykt,formatHex:Ykt,formatHsl:l6e,formatRgb:jkt,toString:jkt});ed(ro,G2,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new ro(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,e),new ro(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:$kt,formatHex:$kt,formatRgb:Kkt,toString:Kkt}));ed(cf,JT,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new cf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,e),new cf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ro(AQ(e>=240?e-240:e+120,i,n),AQ(e,i,n),AQ(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var oO,aO,PQ=M(()=>{oO=Math.PI/180,aO=180/Math.PI});function i8t(e){if(e instanceof ff)return new ff(e.l,e.a,e.b,e.opacity);if(e instanceof rd)return o8t(e);e instanceof ro||(e=ZT(e));var t=RQ(e.r),r=RQ(e.g),n=RQ(e.b),i=IQ((.2225045*t+.7168786*r+.0606169*n)/t8t),o,a;return t===r&&r===n?o=a=i:(o=IQ((.4360747*t+.3850649*r+.1430804*n)/Qkt),a=IQ((.0139322*t+.0971045*r+.7141733*n)/e8t)),new ff(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Y2(e,t,r,n){return arguments.length===1?i8t(e):new ff(e,t,r,n==null?1:n)}function ff(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function IQ(e){return e>c6e?Math.pow(e,1/3):e/n8t+r8t}function LQ(e){return e>W2?e*e*e:n8t*(e-r8t)}function kQ(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function RQ(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function u6e(e){if(e instanceof rd)return new rd(e.h,e.c,e.l,e.opacity);if(e instanceof ff||(e=i8t(e)),e.a===0&&e.b===0)return new rd(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*aO;return new rd(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function QT(e,t,r,n){return arguments.length===1?u6e(e):new rd(e,t,r,n==null?1:n)}function rd(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function o8t(e){if(isNaN(e.h))return new ff(e.l,0,0,e.opacity);var t=e.h*oO;return new ff(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var sO,Qkt,t8t,e8t,r8t,W2,n8t,c6e,a8t=M(()=>{rO();iO();PQ();sO=18,Qkt=.96422,t8t=1,e8t=.82521,r8t=4/29,W2=6/29,n8t=3*W2*W2,c6e=W2*W2*W2;ed(ff,Y2,Sg(hf,{brighter:function(e){return new ff(this.l+sO*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new ff(this.l-sO*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=Qkt*LQ(t),e=t8t*LQ(e),r=e8t*LQ(r),new ro(kQ(3.1338561*t-1.6168667*e-.4906146*r),kQ(-.9787684*t+1.9161415*e+.033454*r),kQ(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));ed(rd,QT,Sg(hf,{brighter:function(e){return new rd(this.h,this.c,this.l+sO*(e==null?1:e),this.opacity)},darker:function(e){return new rd(this.h,this.c,this.l-sO*(e==null?1:e),this.opacity)},rgb:function(){return o8t(this).rgb()}}))});function h6e(e){if(e instanceof Yy)return new Yy(e.h,e.s,e.l,e.opacity);e instanceof ro||(e=ZT(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(c8t*n+s8t*t-l8t*r)/(c8t+s8t-l8t),o=n-i,a=(tC*(r-i)-DQ*o)/lO,s=Math.sqrt(a*a+o*o)/(tC*i*(1-i)),l=s?Math.atan2(a,o)*aO-120:NaN;return new Yy(l<0?l+360:l,s,i,e.opacity)}function j2(e,t,r,n){return arguments.length===1?h6e(e):new Yy(e,t,r,n==null?1:n)}function Yy(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var u8t,NQ,DQ,lO,tC,s8t,l8t,c8t,h8t=M(()=>{rO();iO();PQ();u8t=-.14861,NQ=1.78277,DQ=-.29227,lO=-.90649,tC=1.97294,s8t=tC*lO,l8t=tC*NQ,c8t=NQ*DQ-lO*u8t;ed(Yy,j2,Sg(hf,{brighter:function(e){return e=e==null?Wy:Math.pow(Wy,e),new Yy(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Mg:Math.pow(Mg,e),new Yy(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*oO,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new ro(255*(t+r*(u8t*n+NQ*i)),255*(t+r*(DQ*n+lO*i)),255*(t+r*(tC*n)),this.opacity)}}))});var jy=M(()=>{iO();a8t();h8t()});function OQ(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function cO(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return OQ((r-n/t)*t,a,i,o,s)}}var uO=M(()=>{});function hO(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return OQ((r-n/t)*t,i,o,a,s)}}var zQ=M(()=>{uO()});function X2(e){return function(){return e}}var FQ=M(()=>{});function f8t(e,t){return function(r){return e+r*t}}function f6e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function $2(e,t){var r=t-e;return r?f8t(e,r>180||r<-180?r-360*Math.round(r/360):r):X2(isNaN(e)?t:e)}function p8t(e){return(e=+e)==1?Jn:function(t,r){return r-t?f6e(t,r,e):X2(isNaN(t)?r:t)}}function Jn(e,t){var r=t-e;return r?f8t(e,r):X2(isNaN(e)?t:e)}var K2=M(()=>{FQ()});function d8t(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=G2(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var eC,m8t,g8t,BQ=M(()=>{jy();uO();zQ();K2();eC=function e(t){var r=p8t(t);function n(i,o){var a=r((i=G2(i)).r,(o=G2(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Jn(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);m8t=d8t(cO),g8t=d8t(hO)});function fO(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=Z2(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var HQ=M(()=>{pO()});function dO(e,t){var r=new Date;return e=+e,t-=e,function(n){return r.setTime(e+t*n),r}}var VQ=M(()=>{});function As(e,t){return e=+e,t-=e,function(r){return e+t*r}}var rC=M(()=>{});function mO(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Z2(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var UQ=M(()=>{pO()});function p6e(e){return function(){return e}}function d6e(e){return function(t){return e(t)+""}}function gO(e,t){var r=GQ.lastIndex=qQ.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=GQ.exec(e))&&(i=qQ.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:As(n,i)})),r=qQ.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?d6e(l[0].x):p6e(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var GQ,qQ,WQ=M(()=>{rC();GQ=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qQ=new RegExp(GQ.source,"g")});function Z2(e,t){var r=typeof t,n;return t==null||r==="boolean"?X2(t):(r==="number"?As:r==="string"?(n=Eg(t))?(t=n,eC):gO:t instanceof Eg?eC:t instanceof Date?dO:Array.isArray(t)?fO:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?mO:As)(e,t)}var pO=M(()=>{jy();BQ();HQ();VQ();rC();UQ();WQ();FQ()});function _8t(e,t){return e=+e,t-=e,function(r){return Math.round(e+t*r)}}var y8t=M(()=>{});function YQ(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*v8t,skewX:Math.atan(l)*v8t,scaleX:a,scaleY:s}}var v8t,_O,x8t=M(()=>{v8t=180/Math.PI,_O={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function w8t(e){return e==="none"?_O:(nC||(nC=document.createElement("DIV"),jQ=document.documentElement,b8t=document.defaultView),nC.style.transform=e,e=b8t.getComputedStyle(jQ.appendChild(nC),null).getPropertyValue("transform"),jQ.removeChild(nC),e=e.slice(7,-1).split(","),YQ(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function S8t(e){return e==null?_O:(yO||(yO=document.createElementNS("http://www.w3.org/2000/svg","g")),yO.setAttribute("transform",e),(e=yO.transform.baseVal.consolidate())?(e=e.matrix,YQ(e.a,e.b,e.c,e.d,e.e,e.f)):_O)}var nC,jQ,b8t,yO,M8t=M(()=>{x8t()});function E8t(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:As(c,h)},{i:g-2,x:As(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:As(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:As(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:As(c,h)},{i:g-2,x:As(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var T8t,C8t,A8t=M(()=>{rC();M8t();T8t=E8t(w8t,"px, ","px)","deg)"),C8t=E8t(S8t,", ",")",")")});function I8t(e){return((e=Math.exp(e))+1/e)/2}function g6e(e){return((e=Math.exp(e))-1/e)/2}function _6e(e){return((e=Math.exp(2*e))-1)/(e+1)}function L8t(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<m6e)f=Math.log(s/i)/iC,h=function(x){return[r+x*l,n+x*c,i*Math.exp(iC*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+P8t*u)/(2*i*XQ*p),g=(s*s-i*i-P8t*u)/(2*s*XQ*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/iC,h=function(x){var b=x*f,S=I8t(_),C=i/(XQ*p)*(S*_6e(iC*b+_)-g6e(_));return[r+C*l,n+C*c,i*S/I8t(iC*b+_)]}}return h.duration=f*1e3,h}var iC,XQ,P8t,m6e,k8t=M(()=>{iC=Math.SQRT2,XQ=2,P8t=4,m6e=1e-12});function R8t(e){return function(t,r){var n=e((t=JT(t)).h,(r=JT(r)).h),i=Jn(t.s,r.s),o=Jn(t.l,r.l),a=Jn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var N8t,D8t,O8t=M(()=>{jy();K2();N8t=R8t($2),D8t=R8t(Jn)});function $Q(e,t){var r=Jn((e=Y2(e)).l,(t=Y2(t)).l),n=Jn(e.a,t.a),i=Jn(e.b,t.b),o=Jn(e.opacity,t.opacity);return function(a){return e.l=r(a),e.a=n(a),e.b=i(a),e.opacity=o(a),e+""}}var z8t=M(()=>{jy();K2()});function F8t(e){return function(t,r){var n=e((t=QT(t)).h,(r=QT(r)).h),i=Jn(t.c,r.c),o=Jn(t.l,r.l),a=Jn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var B8t,H8t,V8t=M(()=>{jy();K2();B8t=F8t($2),H8t=F8t(Jn)});function U8t(e){return function t(r){r=+r;function n(i,o){var a=e((i=j2(i)).h,(o=j2(o)).h),s=Jn(i.s,o.s),l=Jn(i.l,o.l),c=Jn(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var q8t,G8t,W8t=M(()=>{jy();K2();q8t=U8t($2),G8t=U8t(Jn)});function Y8t(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}var j8t=M(()=>{});var X8t=M(()=>{pO();HQ();uO();zQ();VQ();rC();UQ();y8t();WQ();A8t();k8t();BQ();O8t();z8t();V8t();W8t();j8t()});function JQ(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function $8t(){return new JQ}var KQ,ZQ,Xy,y6e,K8t,Z8t=M(()=>{KQ=Math.PI,ZQ=2*KQ,Xy=1e-6,y6e=ZQ-Xy;JQ.prototype=$8t.prototype={constructor:JQ,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>Xy)if(!(Math.abs(u*s-l*c)>Xy)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((KQ-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>Xy&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Xy||Math.abs(this._y1-c)>Xy)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%ZQ+ZQ),h>y6e?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>Xy&&(this._+="A"+r+","+r+",0,"+ +(h>=KQ)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};K8t=$8t});var J8t=M(()=>{Z8t()});function Q8t(e){for(var t=-1,r=e.length,n,i=e[r-1],o=0;++t<r;)n=i,i=e[t],o+=n[1]*i[0]-n[0]*i[1];return o/2}var tRt=M(()=>{});function eRt(e){for(var t=-1,r=e.length,n=0,i=0,o,a=e[r-1],s,l=0;++t<r;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],n+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[n/l,i/l]}var rRt=M(()=>{});function nRt(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}var iRt=M(()=>{});function v6e(e,t){return e[0]-t[0]||e[1]-t[1]}function oRt(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&nRt(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function aRt(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t<r;++t)n[t]=[+e[t][0],+e[t][1],t];for(n.sort(v6e),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=oRt(n),a=oRt(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[n[o[t]][2]]);for(t=+s;t<a.length-l;++t)c.push(e[n[a[t]][2]]);return c}var sRt=M(()=>{iRt()});function lRt(e,t){for(var r=e.length,n=e[r-1],i=t[0],o=t[1],a=n[0],s=n[1],l,c,u=!1,h=0;h<r;++h)n=e[h],l=n[0],c=n[1],c>o!=s>o&&i<(a-l)*(o-c)/(s-c)+l&&(u=!u),a=l,s=c;return u}var cRt=M(()=>{});function uRt(e){for(var t=-1,r=e.length,n=e[r-1],i,o,a=n[0],s=n[1],l=0;++t<r;)i=a,o=s,n=e[t],a=n[0],s=n[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}var hRt=M(()=>{});var fRt=M(()=>{tRt();rRt();sRt();cRt();hRt()});function pRt(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return dRt(this.cover(t,r),t,r,e)}function dRt(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function mRt(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));for(u<l&&(l=this._x0,u=this._x1),h<c&&(c=this._y0,h=this._y1),this.cover(l,c).cover(u,h),r=0;r<n;++r)dRt(this,a[r],s[r],e[r]);return this}var gRt=M(()=>{});function _Rt(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else if(r>e||e>i||n>t||t>o){var a=i-r,s=this._root,l,c;switch(c=(t<(n+o)/2)<<1|e<(r+i)/2){case 0:{do l=new Array(4),l[c]=s,s=l;while(a*=2,i=r+a,o=n+a,e>i||t>o);break}case 1:{do l=new Array(4),l[c]=s,s=l;while(a*=2,r=i-a,o=n+a,r>e||t>o);break}case 2:{do l=new Array(4),l[c]=s,s=l;while(a*=2,i=r+a,n=o-a,e>i||n>t);break}case 3:{do l=new Array(4),l[c]=s,s=l;while(a*=2,r=i-a,n=o-a,r>e||n>t);break}}this._root&&this._root.length&&(this._root=s)}else return this;return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}var yRt=M(()=>{});function vRt(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}var xRt=M(()=>{});function bRt(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}var wRt=M(()=>{});function Eo(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}var vO=M(()=>{});function SRt(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new Eo(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new Eo(p[3],_,y,l,c),new Eo(p[2],a,y,_,c),new Eo(p[1],_,s,l,y),new Eo(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}var MRt=M(()=>{vO()});function ERt(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function TRt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}var CRt=M(()=>{});function ARt(){return this._root}var PRt=M(()=>{});function IRt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}var LRt=M(()=>{});function kRt(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new Eo(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new Eo(i,c,u,s,l)),(i=n[2])&&t.push(new Eo(i,o,u,c,l)),(i=n[1])&&t.push(new Eo(i,c,a,s,u)),(i=n[0])&&t.push(new Eo(i,o,a,c,u))}return this}var RRt=M(()=>{vO()});function NRt(e){var t=[],r=[],n;for(this._root&&t.push(new Eo(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new Eo(o,a,s,u,h)),(o=i[1])&&t.push(new Eo(o,u,s,l,h)),(o=i[2])&&t.push(new Eo(o,a,h,u,c)),(o=i[3])&&t.push(new Eo(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}var DRt=M(()=>{vO()});function ORt(e){return e[0]}function zRt(e){return arguments.length?(this._x=e,this):this._x}var FRt=M(()=>{});function BRt(e){return e[1]}function HRt(e){return arguments.length?(this._y=e,this):this._y}var VRt=M(()=>{});function xO(e,t,r){var n=new QQ(t==null?ORt:t,r==null?BRt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function QQ(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function URt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var Xa,qRt=M(()=>{gRt();yRt();xRt();wRt();MRt();CRt();PRt();LRt();RRt();DRt();FRt();VRt();Xa=xO.prototype=QQ.prototype;Xa.copy=function(){var e=new QQ(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=URt(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=URt(n));return e};Xa.add=pRt;Xa.addAll=mRt;Xa.cover=_Rt;Xa.data=vRt;Xa.extent=bRt;Xa.find=SRt;Xa.remove=ERt;Xa.removeAll=TRt;Xa.root=ARt;Xa.size=IRt;Xa.visit=kRt;Xa.visitAfter=NRt;Xa.x=zRt;Xa.y=HRt});var GRt=M(()=>{qRt()});var WRt,YRt=M(()=>{WRt=[].slice});function ttt(e){this._size=e,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function jRt(e){if(!e._start)try{b6e(e)}catch(t){if(e._tasks[e._ended+e._active-1])ett(e,t);else if(!e._data)throw t}}function b6e(e){for(;e._start=e._waiting&&e._active<e._size;){var t=e._ended+e._active,r=e._tasks[t],n=r.length-1,i=r[n];r[n]=w6e(e,t),--e._waiting,++e._active,r=i.apply(null,r),e._tasks[t]&&(e._tasks[t]=r||x6e)}}function w6e(e,t){return function(r,n){!e._tasks[t]||(--e._active,++e._ended,e._tasks[t]=null,e._error==null&&(r!=null?ett(e,r):(e._data[t]=n,e._waiting?jRt(e):bO(e))))}}function ett(e,t){var r=e._tasks.length,n;for(e._error=t,e._data=void 0,e._waiting=NaN;--r>=0;)if((n=e._tasks[r])&&(e._tasks[r]=null,n.abort))try{n.abort()}catch(i){}e._active=NaN,bO(e)}function bO(e){if(!e._active&&e._call){var t=e._data;e._data=void 0,e._call(e._error,t)}}function wO(e){if(e==null)e=1/0;else if(!((e=+e)>=1))throw new Error("invalid concurrency");return new ttt(e)}var x6e,XRt=M(()=>{YRt();x6e={};ttt.prototype=wO.prototype={constructor:ttt,defer:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(this._error!=null)return this;var t=WRt.call(arguments,1);return t.push(e),++this._waiting,this._tasks.push(t),jRt(this),this},abort:function(){return this._error==null&&ett(this,new Error("abort")),this},await:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(t,r){e.apply(null,[t].concat(r))},bO(this),this},awaitAll:function(e){if(typeof e!="function")throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=e,bO(this),this}}});var $Rt=M(()=>{XRt()});function bc(){return Math.random()}var $y=M(()=>{});var KRt,ZRt=M(()=>{$y();KRt=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return t()*i+n}}return r.source=e,r}(bc)});var SO,rtt=M(()=>{$y();SO=function e(t){function r(n,i){var o,a;return n=n==null?0:+n,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return n+i*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=e,r}(bc)});var JRt,QRt=M(()=>{$y();rtt();JRt=function e(t){function r(){var n=SO.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(bc)});var MO,ntt=M(()=>{$y();MO=function e(t){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=t();return i}}return r.source=e,r}(bc)});var tNt,eNt=M(()=>{$y();ntt();tNt=function e(t){function r(n){var i=MO.source(t)(n);return function(){return i()/n}}return r.source=e,r}(bc)});var rNt,nNt=M(()=>{$y();rNt=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(bc)});var iNt=M(()=>{ZRt();rtt();QRt();eNt();ntt();nNt()});function J2(e,t){var r,n=vs("beforesend","progress","load","error"),i,o=Ji(),a=new XMLHttpRequest,s=null,l=null,c,u,h=0;typeof XDomainRequest!="undefined"&&!("withCredentials"in a)&&/^(http(s)?:)?\/\//.test(e)&&(a=new XDomainRequest),"onload"in a?a.onload=a.onerror=a.ontimeout=f:a.onreadystatechange=function(p){a.readyState>3&&f(p)};function f(p){var d=a.status,g;if(!d&&M6e(a)||d>=200&&d<300||d===304){if(c)try{g=c.call(r,a)}catch(_){n.call("error",r,_);return}else g=a;n.call("load",r,g)}else n.call("error",r,p)}if(a.onprogress=function(p){n.call("progress",r,p)},r={header:function(p,d){return p=(p+"").toLowerCase(),arguments.length<2?o.get(p):(d==null?o.remove(p):o.set(p,d+""),r)},mimeType:function(p){return arguments.length?(i=p==null?null:p+"",r):i},responseType:function(p){return arguments.length?(u=p,r):u},timeout:function(p){return arguments.length?(h=+p,r):h},user:function(p){return arguments.length<1?s:(s=p==null?null:p+"",r)},password:function(p){return arguments.length<1?l:(l=p==null?null:p+"",r)},response:function(p){return c=p,r},get:function(p,d){return r.send("GET",p,d)},post:function(p,d){return r.send("POST",p,d)},send:function(p,d,g){return a.open(p,e,!0,s,l),i!=null&&!o.has("accept")&&o.set("accept",i+",*/*"),a.setRequestHeader&&o.each(function(_,y){a.setRequestHeader(y,_)}),i!=null&&a.overrideMimeType&&a.overrideMimeType(i),u!=null&&(a.responseType=u),h>0&&(a.timeout=h),g==null&&typeof d=="function"&&(g=d,d=null),g!=null&&g.length===1&&(g=S6e(g)),g!=null&&r.on("error",g).on("load",function(_){g(null,_)}),n.call("beforesend",r,a),a.send(d==null?null:d),r},abort:function(){return a.abort(),r},on:function(){var p=n.on.apply(n,arguments);return p===n?r:p}},t!=null){if(typeof t!="function")throw new Error("invalid callback: "+t);return r.get(t)}return r}function S6e(e){return function(t,r){e(t==null?r:null)}}function M6e(e){var t=e.responseType;return t&&t!=="text"?e.response:e.responseText}var EO=M(()=>{Tb();km()});function Tg(e,t){return function(r,n){var i=J2(r).mimeType(e).response(t);if(n!=null){if(typeof n!="function")throw new Error("invalid callback: "+n);return i.get(n)}return i}}var oC=M(()=>{EO()});var oNt,aNt=M(()=>{oC();oNt=Tg("text/html",function(e){return document.createRange().createContextualFragment(e.responseText)})});var sNt,lNt=M(()=>{oC();sNt=Tg("application/json",function(e){return JSON.parse(e.responseText)})});var cNt,uNt=M(()=>{oC();cNt=Tg("text/plain",function(e){return e.responseText})});var hNt,fNt=M(()=>{oC();hNt=Tg("application/xml",function(e){var t=e.responseXML;if(!t)throw new Error("parse error");return t})});function TO(e,t){return function(r,n,i){arguments.length<3&&(i=n,n=null);var o=J2(r).mimeType(e);return o.row=function(a){return arguments.length?o.response(E6e(t,n=a)):n},o.row(n),i?o.get(i):o}}function E6e(e,t){return function(r){return e(r.responseText,t)}}var itt=M(()=>{EO()});var pNt,dNt=M(()=>{qE();itt();pNt=TO("text/csv",Cb)});var mNt,gNt=M(()=>{qE();itt();mNt=TO("text/tab-separated-values",Ab)});var _Nt=M(()=>{EO();aNt();lNt();uNt();fNt();dNt();gNt()});function pf(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Ky=M(()=>{});function aC(e){return e.length===1&&(e=T6e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function T6e(e){return function(t,r){return pf(e(t),r)}}var ott=M(()=>{Ky()});var yNt,vNt,C6e,df,att=M(()=>{Ky();ott();yNt=aC(pf),vNt=yNt.right,C6e=yNt.left,df=vNt});var stt=M(()=>{});var xNt=M(()=>{stt()});var bNt=M(()=>{});function Q2(e){return e===null?NaN:+e}var tw=M(()=>{});var ltt=M(()=>{tw()});var ctt=M(()=>{ltt()});var utt=M(()=>{});var wNt,P6e,I6e,htt=M(()=>{wNt=Array.prototype,P6e=wNt.slice,I6e=wNt.map});var SNt=M(()=>{});var MNt=M(()=>{});function CO(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var ftt=M(()=>{});function sC(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=ew(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function ew(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=ptt?10:o>=dtt?5:o>=mtt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ptt?10:o>=dtt?5:o>=mtt?2:1)}function Zy(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=ptt?i*=10:o>=dtt?i*=5:o>=mtt&&(i*=2),t<e?-i:i}var ptt,dtt,mtt,gtt=M(()=>{ptt=Math.sqrt(50),dtt=Math.sqrt(10),mtt=Math.sqrt(2)});var _tt=M(()=>{});var ENt=M(()=>{htt();att();SNt();utt();MNt();ftt();gtt();_tt()});function lC(e,t,r){if(r==null&&(r=Q2),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}var AO=M(()=>{tw()});var TNt=M(()=>{htt();Ky();tw();AO()});var CNt=M(()=>{ctt()});var ANt=M(()=>{});var PNt=M(()=>{tw()});var INt=M(()=>{Ky();tw();AO()});var LNt=M(()=>{});var ytt=M(()=>{});var kNt=M(()=>{});var RNt=M(()=>{Ky()});var NNt=M(()=>{});var DNt=M(()=>{});var vtt=M(()=>{ytt()});var ONt=M(()=>{vtt()});var mf=M(()=>{att();Ky();ott();xNt();bNt();ctt();utt();ENt();TNt();CNt();_tt();ANt();PNt();INt();LNt();ytt();stt();kNt();AO();ftt();RNt();NNt();DNt();gtt();vtt();ltt();ONt()});function PO(){}function zNt(e,t){var r=new PO;if(e instanceof PO)e.each(function(s,l){r.set(l,s)});else if(Array.isArray(e)){var n=-1,i=e.length,o;if(t==null)for(;++n<i;)r.set(n,e[n]);else for(;++n<i;)r.set(t(o=e[n],n,e),o)}else if(e)for(var a in e)r.set(a,e[a]);return r}var fl,Jy,IO=M(()=>{fl="$";PO.prototype=zNt.prototype={constructor:PO,has:function(e){return fl+e in this},get:function(e){return this[fl+e]},set:function(e,t){return this[fl+e]=t,this},remove:function(e){var t=fl+e;return t in this&&delete this[t]},clear:function(){for(var e in this)e[0]===fl&&delete this[e]},keys:function(){var e=[];for(var t in this)t[0]===fl&&e.push(t.slice(1));return e},values:function(){var e=[];for(var t in this)t[0]===fl&&e.push(this[t]);return e},entries:function(){var e=[];for(var t in this)t[0]===fl&&e.push({key:t.slice(1),value:this[t]});return e},size:function(){var e=0;for(var t in this)t[0]===fl&&++e;return e},empty:function(){for(var e in this)if(e[0]===fl)return!1;return!0},each:function(e){for(var t in this)t[0]===fl&&e(this[t],t.slice(1),this)}};Jy=zNt});var FNt=M(()=>{IO()});function LO(){}function O6e(e,t){var r=new LO;if(e instanceof LO)e.each(function(o){r.add(o)});else if(e){var n=-1,i=e.length;if(t==null)for(;++n<i;)r.add(e[n]);else for(;++n<i;)r.add(t(e[n],n,e))}return r}var Qy,BNt=M(()=>{IO();Qy=Jy.prototype;LO.prototype=O6e.prototype={constructor:LO,has:Qy.has,add:function(e){return e+="",this[fl+e]=e,this},remove:Qy.remove,clear:Qy.clear,values:Qy.keys,size:Qy.size,empty:Qy.empty,each:Qy.each}});var HNt=M(()=>{});var VNt=M(()=>{});var UNt=M(()=>{});var qNt=M(()=>{FNt();BNt();IO();HNt();VNt();UNt()});var GNt,rw,pl,Cg=M(()=>{GNt=Array.prototype,rw=GNt.map,pl=GNt.slice});function nw(e){var t=Jy(),r=[],n=kO;e=e==null?[]:pl.call(e);function i(o){var a=o+"",s=t.get(a);if(!s){if(n!==kO)return n;t.set(a,s=r.push(o))}return e[(s-1)%e.length]}return i.domain=function(o){if(!arguments.length)return r.slice();r=[],t=Jy();for(var a=-1,s=o.length,l,c;++a<s;)t.has(c=(l=o[a])+"")||t.set(c,r.push(l));return i},i.range=function(o){return arguments.length?(e=pl.call(o),i):e.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return nw().domain(r).range(e).unknown(n)},i}var kO,xtt=M(()=>{qNt();Cg();kO={name:"implicit"}});function cC(){var e=nw().unknown(void 0),t=e.domain,r=e.range,n=[0,1],i,o,a=!1,s=0,l=0,c=.5;delete e.unknown;function u(){var h=t().length,f=n[1]<n[0],p=n[f-0],d=n[1-f];i=(d-p)/Math.max(1,h-s+l*2),a&&(i=Math.floor(i)),p+=(d-p-i*(h-s))*c,o=i*(1-s),a&&(p=Math.round(p),o=Math.round(o));var g=CO(h).map(function(_){return p+i*_});return r(f?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),u()):t()},e.range=function(h){return arguments.length?(n=[+h[0],+h[1]],u()):n.slice()},e.rangeRound=function(h){return n=[+h[0],+h[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(a=!!h,u()):a},e.padding=function(h){return arguments.length?(s=l=Math.max(0,Math.min(1,h)),u()):s},e.paddingInner=function(h){return arguments.length?(s=Math.max(0,Math.min(1,h)),u()):s},e.paddingOuter=function(h){return arguments.length?(l=Math.max(0,Math.min(1,h)),u()):l},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),u()):c},e.copy=function(){return cC().domain(t()).range(n).round(a).paddingInner(s).paddingOuter(l).align(c)},u()}function WNt(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return WNt(t())},e}function YNt(){return WNt(cC().paddingInner(1))}var jNt=M(()=>{mf();xtt()});function iw(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function uC(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var btt=M(()=>{});function ev(){}function $Nt(){return this.rgb().formatHex()}function G6e(){return eDt(this).formatHsl()}function KNt(){return this.rgb().formatRgb()}function Pg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=z6e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?ZNt(t):r===3?new ha(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?RO(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?RO(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=F6e.exec(e))?new ha(t[1],t[2],t[3],1):(t=B6e.exec(e))?new ha(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=H6e.exec(e))?RO(t[1],t[2],t[3],t[4]):(t=V6e.exec(e))?RO(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=U6e.exec(e))?tDt(t[1],t[2]/100,t[3]/100,1):(t=q6e.exec(e))?tDt(t[1],t[2]/100,t[3]/100,t[4]):XNt.hasOwnProperty(e)?ZNt(XNt[e]):e==="transparent"?new ha(NaN,NaN,NaN,0):null}function ZNt(e){return new ha(e>>16&255,e>>8&255,e&255,1)}function RO(e,t,r,n){return n<=0&&(e=t=r=NaN),new ha(e,t,r,n)}function Mtt(e){return e instanceof ev||(e=Pg(e)),e?(e=e.rgb(),new ha(e.r,e.g,e.b,e.opacity)):new ha}function aw(e,t,r,n){return arguments.length===1?Mtt(e):new ha(e,t,r,n==null?1:n)}function ha(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function JNt(){return"#"+wtt(this.r)+wtt(this.g)+wtt(this.b)}function QNt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function wtt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function tDt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new gf(e,t,r,n)}function eDt(e){if(e instanceof gf)return new gf(e.h,e.s,e.l,e.opacity);if(e instanceof ev||(e=Pg(e)),!e)return new gf;if(e instanceof gf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new gf(a,s,l,e.opacity)}function rDt(e,t,r,n){return arguments.length===1?eDt(e):new gf(e,t,r,n==null?1:n)}function gf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Stt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var Ag,tv,ow,hC,_f,z6e,F6e,B6e,H6e,V6e,U6e,q6e,XNt,Ett=M(()=>{btt();Ag=.7,tv=1/Ag,ow="\\s*([+-]?\\d+)\\s*",hC="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_f="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",z6e=/^#([0-9a-f]{3,8})$/,F6e=new RegExp("^rgb\\("+[ow,ow,ow]+"\\)$"),B6e=new RegExp("^rgb\\("+[_f,_f,_f]+"\\)$"),H6e=new RegExp("^rgba\\("+[ow,ow,ow,hC]+"\\)$"),V6e=new RegExp("^rgba\\("+[_f,_f,_f,hC]+"\\)$"),U6e=new RegExp("^hsl\\("+[hC,_f,_f]+"\\)$"),q6e=new RegExp("^hsla\\("+[hC,_f,_f,hC]+"\\)$"),XNt={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};iw(ev,Pg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:$Nt,formatHex:$Nt,formatHsl:G6e,formatRgb:KNt,toString:KNt});iw(ha,aw,uC(ev,{brighter:function(e){return e=e==null?tv:Math.pow(tv,e),new ha(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new ha(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:JNt,formatHex:JNt,formatRgb:QNt,toString:QNt}));iw(gf,rDt,uC(ev,{brighter:function(e){return e=e==null?tv:Math.pow(tv,e),new gf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new gf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ha(Stt(e>=240?e-240:e+120,i,n),Stt(e,i,n),Stt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var nDt,iDt,oDt=M(()=>{nDt=Math.PI/180,iDt=180/Math.PI});function W6e(e){if(e instanceof rv)return new rv(e.h,e.s,e.l,e.opacity);e instanceof ha||(e=Mtt(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(lDt*n+aDt*t-sDt*r)/(lDt+aDt-sDt),o=n-i,a=(fC*(r-i)-Ctt*o)/NO,s=Math.sqrt(a*a+o*o)/(fC*i*(1-i)),l=s?Math.atan2(a,o)*iDt-120:NaN;return new rv(l<0?l+360:l,s,i,e.opacity)}function $a(e,t,r,n){return arguments.length===1?W6e(e):new rv(e,t,r,n==null?1:n)}function rv(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var cDt,Ttt,Ctt,NO,fC,aDt,sDt,lDt,uDt=M(()=>{btt();Ett();oDt();cDt=-.14861,Ttt=1.78277,Ctt=-.29227,NO=-.90649,fC=1.97294,aDt=fC*NO,sDt=fC*Ttt,lDt=Ttt*Ctt-NO*cDt;iw(rv,$a,uC(ev,{brighter:function(e){return e=e==null?tv:Math.pow(tv,e),new rv(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Ag:Math.pow(Ag,e),new rv(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*nDt,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new ha(255*(t+r*(cDt*n+Ttt*i)),255*(t+r*(Ctt*n+NO*i)),255*(t+r*(fC*n)),this.opacity)}}))});var sw=M(()=>{Ett();uDt()});function Att(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function hDt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Att((r-n/t)*t,a,i,o,s)}}var Ptt=M(()=>{});function fDt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Att((r-n/t)*t,i,o,a,s)}}var pDt=M(()=>{Ptt()});function lw(e){return function(){return e}}var Itt=M(()=>{});function dDt(e,t){return function(r){return e+r*t}}function Y6e(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function mDt(e,t){var r=t-e;return r?dDt(e,r>180||r<-180?r-360*Math.round(r/360):r):lw(isNaN(e)?t:e)}function gDt(e){return(e=+e)==1?nd:function(t,r){return r-t?Y6e(t,r,e):lw(isNaN(t)?r:t)}}function nd(e,t){var r=t-e;return r?dDt(e,r):lw(isNaN(e)?t:e)}var Ltt=M(()=>{Itt()});function _Dt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=aw(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var ktt,_5n,y5n,yDt=M(()=>{sw();Ptt();pDt();Ltt();ktt=function e(t){var r=gDt(t);function n(i,o){var a=r((i=aw(i)).r,(o=aw(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=nd(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);_5n=_Dt(hDt),y5n=_Dt(fDt)});function vDt(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function xDt(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var bDt=M(()=>{});function wDt(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=nv(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}var SDt=M(()=>{DO()});function MDt(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var EDt=M(()=>{});function yf(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var OO=M(()=>{});function TDt(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=nv(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var CDt=M(()=>{DO()});function j6e(e){return function(){return e}}function X6e(e){return function(t){return e(t)+""}}function ADt(e,t){var r=Ntt.lastIndex=Rtt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Ntt.exec(e))&&(i=Rtt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:yf(n,i)})),r=Rtt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?X6e(l[0].x):j6e(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var Ntt,Rtt,PDt=M(()=>{OO();Ntt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Rtt=new RegExp(Ntt.source,"g")});function nv(e,t){var r=typeof t,n;return t==null||r==="boolean"?lw(t):(r==="number"?yf:r==="string"?(n=Pg(t))?(t=n,ktt):ADt:t instanceof Pg?ktt:t instanceof Date?MDt:xDt(t)?vDt:Array.isArray(t)?wDt:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?TDt:yf)(e,t)}var DO=M(()=>{sw();yDt();SDt();EDt();OO();CDt();PDt();Itt();bDt()});function Dtt(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var IDt=M(()=>{});function LDt(e){return function t(r){r=+r;function n(i,o){var a=e((i=$a(i)).h,(o=$a(o)).h),s=nd(i.s,o.s),l=nd(i.l,o.l),c=nd(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var $6e,cw,kDt=M(()=>{sw();Ltt();$6e=LDt(mDt),cw=LDt(nd)});var uw=M(()=>{DO();OO();IDt();kDt()});function hw(e){return function(){return e}}var zO=M(()=>{});function FO(e){return+e}var Ott=M(()=>{});function pC(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:hw(t)}function K6e(e){return function(t,r){var n=e(t=+t,r=+r);return function(i){return i<=t?0:i>=r?1:n(i)}}}function Z6e(e){return function(t,r){var n=e(t=+t,r=+r);return function(i){return i<=0?t:i>=1?r:n(i)}}}function J6e(e,t,r,n){var i=e[0],o=e[1],a=t[0],s=t[1];return o<i?(i=r(o,i),a=n(s,a)):(i=r(i,o),a=n(a,s)),function(l){return a(i(l))}}function Q6e(e,t,r,n){var i=Math.min(e.length,t.length)-1,o=new Array(i),a=new Array(i),s=-1;for(e[i]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<i;)o[s]=r(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(l){var c=df(e,l,1,i)-1;return a[c](o[c](l))}}function Ig(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp())}function id(e,t){var r=RDt,n=RDt,i=nv,o=!1,a,s,l;function c(){return a=Math.min(r.length,n.length)>2?Q6e:J6e,s=l=null,u}function u(h){return(s||(s=a(r,n,o?K6e(e):e,i)))(+h)}return u.invert=function(h){return(l||(l=a(n,r,pC,o?Z6e(t):t)))(+h)},u.domain=function(h){return arguments.length?(r=rw.call(h,FO),c()):r.slice()},u.range=function(h){return arguments.length?(n=pl.call(h),c()):n.slice()},u.rangeRound=function(h){return n=pl.call(h),i=Dtt,c()},u.clamp=function(h){return arguments.length?(o=!!h,c()):o},u.interpolate=function(h){return arguments.length?(i=h,c()):i},c()}var RDt,dC=M(()=>{mf();uw();Cg();zO();Ott();RDt=[0,1]});function NDt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function iv(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}var mC=M(()=>{});function vf(e){return e=iv(Math.abs(e)),e?e[1]:NaN}var gC=M(()=>{mC()});function DDt(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}var ODt=M(()=>{});function zDt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var FDt=M(()=>{});function Lg(e){if(!(t=tIe.exec(e)))throw new Error("invalid format: "+e);var t;return new BO({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function BO(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}var tIe,ztt=M(()=>{tIe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;Lg.prototype=BO.prototype;BO.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type}});function BDt(e){t:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break t;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var HDt=M(()=>{});function VDt(e,t){var r=iv(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(Ftt=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+iv(e,Math.max(0,t+o-1))[0]}var Ftt,Btt=M(()=>{mC()});function Htt(e,t){var r=iv(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var UDt=M(()=>{mC()});var Vtt,qDt=M(()=>{mC();Btt();UDt();Vtt={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:NDt,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return Htt(e*100,t)},r:Htt,s:VDt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}}});function Utt(e){return e}var GDt=M(()=>{});function jDt(e){var t=e.grouping===void 0||e.thousands===void 0?Utt:DDt(WDt.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?Utt:zDt(WDt.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(h){h=Lg(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,_=h.zero,y=h.width,x=h.comma,b=h.precision,S=h.trim,C=h.type;C==="n"?(x=!0,C="g"):Vtt[C]||(b===void 0&&(b=12),S=!0,C="g"),(_||f==="0"&&p==="=")&&(_=!0,f="0",p="=");var P=g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",k=g==="$"?n:/[%p]/.test(C)?a:"",O=Vtt[C],D=/[defgprs%]/.test(C);b=b===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function B(I){var L=P,R=k,F,z,U;if(C==="c")R=O(I)+R,I="";else{I=+I;var W=I<0||1/I<0;if(I=isNaN(I)?l:O(Math.abs(I),b),S&&(I=BDt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?YDt[8+Ftt/3]:"")+R+(W&&d==="("?")":""),D){for(F=-1,z=I.length;++F<z;)if(U=I.charCodeAt(F),48>U||U>57){R=(U===46?i+I.slice(F+1):I.slice(F))+R,I=I.slice(0,F);break}}}x&&!_&&(I=t(I,1/0));var Z=L.length+I.length+R.length,rt=Z<y?new Array(y-Z+1).join(f):"";switch(x&&_&&(I=t(rt+I,rt.length?y-R.length:1/0),rt=""),p){case"<":I=L+I+R+rt;break;case"=":I=L+rt+I+R;break;case"^":I=rt.slice(0,Z=rt.length>>1)+L+I+R+rt.slice(Z);break;default:I=rt+L+I+R;break}return o(I)}return B.toString=function(){return h+""},B}function u(h,f){var p=c((h=Lg(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(vf(f)/3)))*3,g=Math.pow(10,-d),_=YDt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var WDt,YDt,XDt=M(()=>{gC();ODt();FDt();ztt();HDt();qDt();Btt();GDt();WDt=Array.prototype.map,YDt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]});function qtt(e){return HO=jDt(e),fw=HO.format,VO=HO.formatPrefix,HO}var HO,fw,VO,$Dt=M(()=>{XDt();qtt({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})});function Gtt(e){return Math.max(0,-vf(Math.abs(e)))}var KDt=M(()=>{gC()});function Wtt(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(vf(t)/3)))*3-vf(Math.abs(e)))}var ZDt=M(()=>{gC()});function Ytt(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,vf(t)-vf(e))+1}var JDt=M(()=>{gC()});var jtt=M(()=>{$Dt();ztt();KDt();ZDt();JDt()});function QDt(e,t,r){var n=e[0],i=e[e.length-1],o=Zy(n,i,t==null?10:t),a;switch(r=Lg(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(n),Math.abs(i));return r.precision==null&&!isNaN(a=Wtt(o,s))&&(r.precision=a),VO(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=Ytt(o,Math.max(Math.abs(n),Math.abs(i))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=Gtt(o))&&(r.precision=a-(r.type==="%")*2);break}}return fw(r)}var tOt=M(()=>{mf();jtt()});function od(e){var t=e.domain;return e.ticks=function(r){var n=t();return sC(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){return QDt(t(),r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=ew(a,s,r),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=ew(a,s,r)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=ew(a,s,r)),l>0?(n[i]=Math.floor(a/l)*l,n[o]=Math.ceil(s/l)*l,t(n)):l<0&&(n[i]=Math.ceil(a*l)/l,n[o]=Math.floor(s*l)/l,t(n)),e},e}function UO(){var e=id(pC,yf);return e.copy=function(){return Ig(e,UO())},od(e)}var pw=M(()=>{mf();uw();dC();tOt()});function qO(){var e=[0,1];function t(r){return+r}return t.invert=t,t.domain=t.range=function(r){return arguments.length?(e=rw.call(r,FO),t):e.slice()},t.copy=function(){return qO().domain(e)},od(t)}var eOt=M(()=>{Cg();pw();Ott()});function GO(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}var Xtt=M(()=>{});function eIe(e,t){return(t=Math.log(t/e))?function(r){return Math.log(r/e)/t}:hw(t)}function rIe(e,t){return e<0?function(r){return-Math.pow(-t,r)*Math.pow(-e,1-r)}:function(r){return Math.pow(t,r)*Math.pow(e,1-r)}}function nIe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function rOt(e){return e===10?nIe:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function nOt(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function iOt(e){return function(t){return-e(-t)}}function WO(){var e=id(eIe,rIe).domain([1,10]),t=e.domain,r=10,n=nOt(10),i=rOt(10);function o(){return n=nOt(r),i=rOt(r),t()[0]<0&&(n=iOt(n),i=iOt(i)),e}return e.base=function(a){return arguments.length?(r=+a,o()):r},e.domain=function(a){return arguments.length?(t(a),o()):t()},e.ticks=function(a){var s=t(),l=s[0],c=s[s.length-1],u;(u=c<l)&&(h=l,l=c,c=h);var h=n(l),f=n(c),p,d,g,_=a==null?10:+a,y=[];if(!(r%1)&&f-h<_){if(h=Math.round(h)-1,f=Math.round(f)+1,l>0){for(;h<f;++h)for(d=1,p=i(h);d<r;++d)if(g=p*d,!(g<l)){if(g>c)break;y.push(g)}}else for(;h<f;++h)for(d=r-1,p=i(h);d>=1;--d)if(g=p*d,!(g<l)){if(g>c)break;y.push(g)}}else y=sC(h,f,Math.min(f-h,_)).map(i);return u?y.reverse():y},e.tickFormat=function(a,s){if(s==null&&(s=r===10?".0e":","),typeof s!="function"&&(s=fw(s)),a===1/0)return s;a==null&&(a=10);var l=Math.max(1,r*a/e.ticks().length);return function(c){var u=c/i(Math.round(n(c)));return u*r<r-.5&&(u*=r),u<=l?s(c):""}},e.nice=function(){return t(GO(t(),{floor:function(a){return i(Math.floor(n(a)))},ceil:function(a){return i(Math.ceil(n(a)))}}))},e.copy=function(){return Ig(e,WO().base(r))},e}var oOt=M(()=>{mf();jtt();zO();Xtt();dC()});function dw(e,t){return e<0?-Math.pow(-e,t):Math.pow(e,t)}function _C(){var e=1,t=id(n,i),r=t.domain;function n(o,a){return(a=dw(a,e)-(o=dw(o,e)))?function(s){return(dw(s,e)-o)/a}:hw(a)}function i(o,a){return a=dw(a,e)-(o=dw(o,e)),function(s){return dw(o+a*s,1/e)}}return t.exponent=function(o){return arguments.length?(e=+o,r(r())):e},t.copy=function(){return Ig(t,_C().exponent(e))},od(t)}function aOt(){return _C().exponent(.5)}var sOt=M(()=>{zO();pw();dC()});function YO(){var e=[],t=[],r=[];function n(){var o=0,a=Math.max(1,t.length);for(r=new Array(a-1);++o<a;)r[o-1]=lC(e,o/a);return i}function i(o){if(!isNaN(o=+o))return t[df(r,o)]}return i.invertExtent=function(o){var a=t.indexOf(o);return a<0?[NaN,NaN]:[a>0?r[a-1]:e[0],a<r.length?r[a]:e[e.length-1]]},i.domain=function(o){if(!arguments.length)return e.slice();e=[];for(var a=0,s=o.length,l;a<s;++a)l=o[a],l!=null&&!isNaN(l=+l)&&e.push(l);return e.sort(pf),n()},i.range=function(o){return arguments.length?(t=pl.call(o),n()):t.slice()},i.quantiles=function(){return r.slice()},i.copy=function(){return YO().domain(e).range(t)},i}var lOt=M(()=>{mf();Cg()});function jO(){var e=0,t=1,r=1,n=[.5],i=[0,1];function o(s){if(s<=s)return i[df(n,s,0,r)]}function a(){var s=-1;for(n=new Array(r);++s<r;)n[s]=((s+1)*t-(s-r)*e)/(r+1);return o}return o.domain=function(s){return arguments.length?(e=+s[0],t=+s[1],a()):[e,t]},o.range=function(s){return arguments.length?(r=(i=pl.call(s)).length-1,a()):i.slice()},o.invertExtent=function(s){var l=i.indexOf(s);return l<0?[NaN,NaN]:l<1?[e,n[0]]:l>=r?[n[r-1],t]:[n[l-1],n[l]]},o.copy=function(){return jO().domain([e,t]).range(i)},od(o)}var cOt=M(()=>{mf();Cg();pw()});function XO(){var e=[.5],t=[0,1],r=1;function n(i){if(i<=i)return t[df(e,i,0,r)]}return n.domain=function(i){return arguments.length?(e=pl.call(i),r=Math.min(e.length,t.length-1),n):e.slice()},n.range=function(i){return arguments.length?(t=pl.call(i),r=Math.min(e.length,t.length-1),n):t.slice()},n.invertExtent=function(i){var o=t.indexOf(i);return[e[o-1],e[o]]},n.copy=function(){return XO().domain(e).range(t)},n}var uOt=M(()=>{mf();Cg()});function Nr(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Nr(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return $tt.setTime(+o),Ktt.setTime(+a),e($tt),e(Ktt),Math.floor(r($tt,Ktt))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var $tt,Ktt,Ka=M(()=>{$tt=new Date,Ktt=new Date});var $O,mw,hOt,fOt=M(()=>{Ka();$O=Nr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});$O.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Nr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):$O};mw=$O,hOt=$O.range});var ov,wc,gw,KO,ZO,xf=M(()=>{ov=1e3,wc=6e4,gw=36e5,KO=864e5,ZO=6048e5});var pOt,_w,dOt,mOt=M(()=>{Ka();xf();pOt=Nr(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*ov)},function(e,t){return(t-e)/ov},function(e){return e.getUTCSeconds()}),_w=pOt,dOt=pOt.range});var gOt,Ztt,iIe,_Ot=M(()=>{Ka();xf();gOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ov)},function(e,t){e.setTime(+e+t*wc)},function(e,t){return(t-e)/wc},function(e){return e.getMinutes()}),Ztt=gOt,iIe=gOt.range});var yOt,Jtt,oIe,vOt=M(()=>{Ka();xf();yOt=Nr(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*ov-e.getMinutes()*wc)},function(e,t){e.setTime(+e+t*gw)},function(e,t){return(t-e)/gw},function(e){return e.getHours()}),Jtt=yOt,oIe=yOt.range});var xOt,yw,aIe,bOt=M(()=>{Ka();xf();xOt=Nr(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*wc)/KO},function(e){return e.getDate()-1}),yw=xOt,aIe=xOt.range});function av(e){return Nr(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*wc)/ZO})}var sv,vw,wOt,SOt,kg,MOt,EOt,TOt,sIe,lIe,cIe,uIe,hIe,fIe,COt=M(()=>{Ka();xf();sv=av(0),vw=av(1),wOt=av(2),SOt=av(3),kg=av(4),MOt=av(5),EOt=av(6),TOt=sv.range,sIe=vw.range,lIe=wOt.range,cIe=SOt.range,uIe=kg.range,hIe=MOt.range,fIe=EOt.range});var AOt,Qtt,pIe,POt=M(()=>{Ka();AOt=Nr(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),Qtt=AOt,pIe=AOt.range});var tet,ad,dIe,IOt=M(()=>{Ka();tet=Nr(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});tet.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Nr(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};ad=tet,dIe=tet.range});var LOt,eet,mIe,kOt=M(()=>{Ka();xf();LOt=Nr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*wc)},function(e,t){return(t-e)/wc},function(e){return e.getUTCMinutes()}),eet=LOt,mIe=LOt.range});var ROt,ret,gIe,NOt=M(()=>{Ka();xf();ROt=Nr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*gw)},function(e,t){return(t-e)/gw},function(e){return e.getUTCHours()}),ret=ROt,gIe=ROt.range});var DOt,xw,_Ie,OOt=M(()=>{Ka();xf();DOt=Nr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/KO},function(e){return e.getUTCDate()-1}),xw=DOt,_Ie=DOt.range});function lv(e){return Nr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/ZO})}var cv,bw,zOt,FOt,Rg,BOt,HOt,VOt,yIe,vIe,xIe,bIe,wIe,SIe,UOt=M(()=>{Ka();xf();cv=lv(0),bw=lv(1),zOt=lv(2),FOt=lv(3),Rg=lv(4),BOt=lv(5),HOt=lv(6),VOt=cv.range,yIe=bw.range,vIe=zOt.range,xIe=FOt.range,bIe=Rg.range,wIe=BOt.range,SIe=HOt.range});var qOt,net,MIe,GOt=M(()=>{Ka();qOt=Nr(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),net=qOt,MIe=qOt.range});var iet,sd,EIe,WOt=M(()=>{Ka();iet=Nr(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});iet.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Nr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};sd=iet,EIe=iet.range});var JO=M(()=>{fOt();mOt();_Ot();vOt();bOt();COt();POt();IOt();kOt();NOt();OOt();UOt();GOt();WOt()});function oet(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function aet(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function yC(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function set(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=vC(i),u=xC(i),h=vC(o),f=xC(o),p=vC(a),d=xC(a),g=vC(s),_=xC(s),y=vC(l),x=xC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:ZOt,e:ZOt,f:XIe,g:i9e,G:a9e,H:WIe,I:YIe,j:jIe,L:r7t,m:$Ie,M:KIe,p:st,q:St,Q:t7t,s:e7t,S:ZIe,u:JIe,U:QIe,V:t9e,w:e9e,W:r9e,x:null,X:null,y:n9e,Y:o9e,Z:s9e,"%":QOt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:JOt,e:JOt,f:h9e,g:b9e,G:S9e,H:l9e,I:c9e,j:u9e,L:i7t,m:f9e,M:p9e,p:_t,q:ct,Q:t7t,s:e7t,S:d9e,u:m9e,U:g9e,V:_9e,w:y9e,W:v9e,x:null,X:null,y:x9e,Y:w9e,Z:M9e,"%":QOt},C={a:B,A:I,b:L,B:R,c:F,d:$Ot,e:$Ot,f:VIe,g:XOt,G:jOt,H:KOt,I:KOt,j:zIe,L:HIe,m:OIe,M:FIe,p:D,q:DIe,Q:qIe,s:GIe,S:BIe,u:IIe,U:LIe,V:kIe,w:PIe,W:RIe,x:z,X:U,y:XOt,Y:jOt,Z:NIe,"%":UIe};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(X,et){return function(dt){var q=[],pt=-1,ht=0,wt=X.length,kt,ie,ee;for(dt instanceof Date||(dt=new Date(+dt));++pt<wt;)X.charCodeAt(pt)===37&&(q.push(X.slice(ht,pt)),(ie=YOt[kt=X.charAt(++pt)])!=null?kt=X.charAt(++pt):ie=kt==="e"?" ":"0",(ee=et[kt])&&(kt=ee(dt,ie)),q.push(kt),ht=pt+1);return q.push(X.slice(ht,pt)),q.join("")}}function k(X,et){return function(dt){var q=yC(1900,void 0,1),pt=O(q,X,dt+="",0),ht,wt;if(pt!=dt.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(et&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(ht=aet(yC(q.y,0,1)),wt=ht.getUTCDay(),ht=wt>4||wt===0?bw.ceil(ht):bw(ht),ht=xw.offset(ht,(q.V-1)*7),q.y=ht.getUTCFullYear(),q.m=ht.getUTCMonth(),q.d=ht.getUTCDate()+(q.w+6)%7):(ht=oet(yC(q.y,0,1)),wt=ht.getDay(),ht=wt>4||wt===0?vw.ceil(ht):vw(ht),ht=yw.offset(ht,(q.V-1)*7),q.y=ht.getFullYear(),q.m=ht.getMonth(),q.d=ht.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),wt="Z"in q?aet(yC(q.y,0,1)).getUTCDay():oet(yC(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(wt+5)%7:q.w+q.U*7-(wt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,aet(q)):oet(q)}}function O(X,et,dt,q){for(var pt=0,ht=et.length,wt=dt.length,kt,ie;pt<ht;){if(q>=wt)return-1;if(kt=et.charCodeAt(pt++),kt===37){if(kt=et.charAt(pt++),ie=C[kt in YOt?et.charAt(pt++):kt],!ie||(q=ie(X,dt,q))<0)return-1}else if(kt!=dt.charCodeAt(q++))return-1}return q}function D(X,et,dt){var q=c.exec(et.slice(dt));return q?(X.p=u[q[0].toLowerCase()],dt+q[0].length):-1}function B(X,et,dt){var q=p.exec(et.slice(dt));return q?(X.w=d[q[0].toLowerCase()],dt+q[0].length):-1}function I(X,et,dt){var q=h.exec(et.slice(dt));return q?(X.w=f[q[0].toLowerCase()],dt+q[0].length):-1}function L(X,et,dt){var q=y.exec(et.slice(dt));return q?(X.m=x[q[0].toLowerCase()],dt+q[0].length):-1}function R(X,et,dt){var q=g.exec(et.slice(dt));return q?(X.m=_[q[0].toLowerCase()],dt+q[0].length):-1}function F(X,et,dt){return O(X,t,et,dt)}function z(X,et,dt){return O(X,r,et,dt)}function U(X,et,dt){return O(X,n,et,dt)}function W(X){return a[X.getDay()]}function Z(X){return o[X.getDay()]}function rt(X){return l[X.getMonth()]}function ot(X){return s[X.getMonth()]}function st(X){return i[+(X.getHours()>=12)]}function St(X){return 1+~~(X.getMonth()/3)}function bt(X){return a[X.getUTCDay()]}function Mt(X){return o[X.getUTCDay()]}function lt(X){return l[X.getUTCMonth()]}function Kt(X){return s[X.getUTCMonth()]}function _t(X){return i[+(X.getUTCHours()>=12)]}function ct(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var et=P(X+="",b);return et.toString=function(){return X},et},parse:function(X){var et=k(X+="",!1);return et.toString=function(){return X},et},utcFormat:function(X){var et=P(X+="",S);return et.toString=function(){return X},et},utcParse:function(X){var et=k(X+="",!0);return et.toString=function(){return X},et}}}function Gr(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function AIe(e){return e.replace(CIe,"\\$&")}function vC(e){return new RegExp("^(?:"+e.map(AIe).join("|")+")","i")}function xC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function PIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function IIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function LIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function kIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function RIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function jOt(e,t,r){var n=To.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function XOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function NIe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function DIe(e,t,r){var n=To.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function OIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function $Ot(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function zIe(e,t,r){var n=To.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function KOt(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function FIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function BIe(e,t,r){var n=To.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function HIe(e,t,r){var n=To.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function VIe(e,t,r){var n=To.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function UIe(e,t,r){var n=TIe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function qIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function GIe(e,t,r){var n=To.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function ZOt(e,t){return Gr(e.getDate(),t,2)}function WIe(e,t){return Gr(e.getHours(),t,2)}function YIe(e,t){return Gr(e.getHours()%12||12,t,2)}function jIe(e,t){return Gr(1+yw.count(ad(e),e),t,3)}function r7t(e,t){return Gr(e.getMilliseconds(),t,3)}function XIe(e,t){return r7t(e,t)+"000"}function $Ie(e,t){return Gr(e.getMonth()+1,t,2)}function KIe(e,t){return Gr(e.getMinutes(),t,2)}function ZIe(e,t){return Gr(e.getSeconds(),t,2)}function JIe(e){var t=e.getDay();return t===0?7:t}function QIe(e,t){return Gr(sv.count(ad(e)-1,e),t,2)}function n7t(e){var t=e.getDay();return t>=4||t===0?kg(e):kg.ceil(e)}function t9e(e,t){return e=n7t(e),Gr(kg.count(ad(e),e)+(ad(e).getDay()===4),t,2)}function e9e(e){return e.getDay()}function r9e(e,t){return Gr(vw.count(ad(e)-1,e),t,2)}function n9e(e,t){return Gr(e.getFullYear()%100,t,2)}function i9e(e,t){return e=n7t(e),Gr(e.getFullYear()%100,t,2)}function o9e(e,t){return Gr(e.getFullYear()%1e4,t,4)}function a9e(e,t){var r=e.getDay();return e=r>=4||r===0?kg(e):kg.ceil(e),Gr(e.getFullYear()%1e4,t,4)}function s9e(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Gr(t/60|0,"0",2)+Gr(t%60,"0",2)}function JOt(e,t){return Gr(e.getUTCDate(),t,2)}function l9e(e,t){return Gr(e.getUTCHours(),t,2)}function c9e(e,t){return Gr(e.getUTCHours()%12||12,t,2)}function u9e(e,t){return Gr(1+xw.count(sd(e),e),t,3)}function i7t(e,t){return Gr(e.getUTCMilliseconds(),t,3)}function h9e(e,t){return i7t(e,t)+"000"}function f9e(e,t){return Gr(e.getUTCMonth()+1,t,2)}function p9e(e,t){return Gr(e.getUTCMinutes(),t,2)}function d9e(e,t){return Gr(e.getUTCSeconds(),t,2)}function m9e(e){var t=e.getUTCDay();return t===0?7:t}function g9e(e,t){return Gr(cv.count(sd(e)-1,e),t,2)}function o7t(e){var t=e.getUTCDay();return t>=4||t===0?Rg(e):Rg.ceil(e)}function _9e(e,t){return e=o7t(e),Gr(Rg.count(sd(e),e)+(sd(e).getUTCDay()===4),t,2)}function y9e(e){return e.getUTCDay()}function v9e(e,t){return Gr(bw.count(sd(e)-1,e),t,2)}function x9e(e,t){return Gr(e.getUTCFullYear()%100,t,2)}function b9e(e,t){return e=o7t(e),Gr(e.getUTCFullYear()%100,t,2)}function w9e(e,t){return Gr(e.getUTCFullYear()%1e4,t,4)}function S9e(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Rg(e):Rg.ceil(e),Gr(e.getUTCFullYear()%1e4,t,4)}function M9e(){return"+0000"}function QOt(){return"%"}function t7t(e){return+e}function e7t(e){return Math.floor(+e/1e3)}var YOt,To,TIe,CIe,a7t=M(()=>{JO();YOt={"-":"",_:" ",0:"0"},To=/^\s*\d+/,TIe=/^%/,CIe=/[\\^$*+?|[\]().{}]/g});function cet(e){return ww=set(e),QO=ww.format,s7t=ww.parse,t7=ww.utcFormat,l7t=ww.utcParse,ww}var ww,QO,s7t,t7,l7t,c7t=M(()=>{a7t();cet({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});var uet=M(()=>{c7t()});function T9e(e){return new Date(e)}function C9e(e){return e instanceof Date?+e:+new Date(+e)}function e7(e,t,r,n,i,o,a,s,l){var c=id(pC,yf),u=c.invert,h=c.domain,f=l(".%L"),p=l(":%S"),d=l("%I:%M"),g=l("%I %p"),_=l("%a %d"),y=l("%b %d"),x=l("%B"),b=l("%Y"),S=[[a,1,bC],[a,5,5*bC],[a,15,15*bC],[a,30,30*bC],[o,1,wC],[o,5,5*wC],[o,15,15*wC],[o,30,30*wC],[i,1,SC],[i,3,3*SC],[i,6,6*SC],[i,12,12*SC],[n,1,MC],[n,2,2*MC],[r,1,E9e],[t,1,u7t],[t,3,3*u7t],[e,1,het]];function C(k){return(a(k)<k?f:o(k)<k?p:i(k)<k?d:n(k)<k?g:t(k)<k?r(k)<k?_:y:e(k)<k?x:b)(k)}function P(k,O,D,B){if(k==null&&(k=10),typeof k=="number"){var I=Math.abs(D-O)/k,L=aC(function(R){return R[2]}).right(S,I);L===S.length?(B=Zy(O/het,D/het,k),k=e):L?(L=S[I/S[L-1][2]<S[L][2]/I?L-1:L],B=L[1],k=L[0]):(B=Math.max(Zy(O,D,k),1),k=s)}return B==null?k:k.every(B)}return c.invert=function(k){return new Date(u(k))},c.domain=function(k){return arguments.length?h(rw.call(k,C9e)):h().map(T9e)},c.ticks=function(k,O){var D=h(),B=D[0],I=D[D.length-1],L=I<B,R;return L&&(R=B,B=I,I=R),R=P(k,B,I,O),R=R?R.range(B,I+1):[],L?R.reverse():R},c.tickFormat=function(k,O){return O==null?C:l(O)},c.nice=function(k,O){var D=h();return(k=P(k,D[0],D[D.length-1],O))?h(GO(D,k)):c},c.copy=function(){return Ig(c,e7(e,t,r,n,i,o,a,s,l))},c}function h7t(){return e7(ad,Qtt,sv,yw,Jtt,Ztt,_w,mw,QO).domain([new Date(2e3,0,1),new Date(2e3,0,2)])}var bC,wC,SC,MC,E9e,u7t,het,fet=M(()=>{mf();uw();JO();uet();Cg();dC();Xtt();bC=1e3,wC=bC*60,SC=wC*60,MC=SC*24,E9e=MC*7,u7t=MC*30,het=MC*365});function f7t(){return e7(sd,net,cv,xw,ret,eet,_w,mw,t7).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])}var p7t=M(()=>{fet();uet();JO()});function dl(e){return e.match(/.{6}/g).map(function(t){return"#"+t})}var Sw=M(()=>{});var d7t,m7t=M(()=>{Sw();d7t=dl("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf")});var g7t,_7t=M(()=>{Sw();g7t=dl("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6")});var y7t,v7t=M(()=>{Sw();y7t=dl("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9")});var x7t,b7t=M(()=>{Sw();x7t=dl("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5")});var w7t,S7t=M(()=>{sw();uw();w7t=cw($a(300,.5,0),$a(-240,.5,1))});function T7t(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return r7.h=360*e-100,r7.s=1.5-1.5*t,r7.l=.8-.9*t,r7+""}var M7t,E7t,r7,C7t=M(()=>{sw();uw();M7t=cw($a(-100,.75,.35),$a(80,1.5,.8)),E7t=cw($a(260,.75,.35),$a(80,1.5,.8)),r7=$a()});function n7(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var A7t,P7t,I7t,L7t,k7t=M(()=>{Sw();A7t=n7(dl("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),P7t=n7(dl("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),I7t=n7(dl("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),L7t=n7(dl("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"))});function i7(e){var t=0,r=1,n=!1;function i(o){var a=(o-t)/(r-t);return e(n?Math.max(0,Math.min(1,a)):a)}return i.domain=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.clamp=function(o){return arguments.length?(n=!!o,i):n},i.interpolator=function(o){return arguments.length?(e=o,i):e},i.copy=function(){return i7(e).domain([t,r]).clamp(n)},od(i)}var R7t=M(()=>{pw()});var N7t=M(()=>{jNt();eOt();pw();oOt();xtt();sOt();lOt();cOt();uOt();fet();p7t();m7t();_7t();v7t();b7t();S7t();C7t();k7t();R7t()});var o7,EC,a7=M(()=>{o7="http://www.w3.org/1999/xhtml",EC={svg:"http://www.w3.org/2000/svg",xhtml:o7,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function Mw(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),EC.hasOwnProperty(t)?{space:EC[t],local:e}:e}var s7=M(()=>{a7()});function A9e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===o7&&t.documentElement.namespaceURI===o7?t.createElement(e):t.createElementNS(r,e)}}function P9e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Ng(e){var t=Mw(e);return(t.local?P9e:A9e)(t)}var TC=M(()=>{s7();a7()});function I9e(){}function Ew(e){return e==null?I9e:function(){return this.querySelector(e)}}var l7=M(()=>{});function D7t(e){typeof e!="function"&&(e=Ew(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Bn(n,this._parents)}var O7t=M(()=>{Sc();l7()});function L9e(){return[]}function c7(e){return e==null?L9e:function(){return this.querySelectorAll(e)}}var pet=M(()=>{});function z7t(e){typeof e!="function"&&(e=c7(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new Bn(n,i)}var F7t=M(()=>{Sc();pet()});var H7t,Tw,B7t,u7,det=M(()=>{H7t=function(e){return function(){return this.matches(e)}};typeof document!="undefined"&&(Tw=document.documentElement,Tw.matches||(B7t=Tw.webkitMatchesSelector||Tw.msMatchesSelector||Tw.mozMatchesSelector||Tw.oMatchesSelector,H7t=function(e){return function(){return B7t.call(this,e)}}));u7=H7t});function V7t(e){typeof e!="function"&&(e=u7(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Bn(n,this._parents)}var U7t=M(()=>{Sc();det()});function h7(e){return new Array(e.length)}var met=M(()=>{});function q7t(){return new Bn(this._enter||this._groups.map(h7),this._parents)}function CC(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var get=M(()=>{met();Sc();CC.prototype={constructor:CC,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function G7t(e){return function(){return e}}var W7t=M(()=>{});function k9e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new CC(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function R9e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=Y7t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=Y7t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new CC(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function j7t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?R9e:k9e,n=this._parents,i=this._groups;typeof e!="function"&&(e=G7t(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new Bn(a,n),a._enter=s,a._exit=l,a}var Y7t,X7t=M(()=>{Sc();get();W7t();Y7t="$"});function $7t(){return new Bn(this._exit||this._groups.map(h7),this._parents)}var K7t=M(()=>{met();Sc()});function Z7t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Bn(a,this._parents)}var J7t=M(()=>{Sc()});function Q7t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&o!==a.nextSibling&&o.parentNode.insertBefore(a,o),o=a);return this}var tzt=M(()=>{});function ezt(e){e||(e=N9e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Bn(i,this._parents).order()}function N9e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var rzt=M(()=>{Sc()});function nzt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var izt=M(()=>{});function ozt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var azt=M(()=>{});function szt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var lzt=M(()=>{});function czt(){var e=0;return this.each(function(){++e}),e}var uzt=M(()=>{});function hzt(){return!this.node()}var fzt=M(()=>{});function pzt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var dzt=M(()=>{});function D9e(e){return function(){this.removeAttribute(e)}}function O9e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function z9e(e,t){return function(){this.setAttribute(e,t)}}function F9e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function B9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function H9e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function mzt(e,t){var r=Mw(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?O9e:D9e:typeof t=="function"?r.local?H9e:B9e:r.local?F9e:z9e)(r,t))}var gzt=M(()=>{s7()});function Cw(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var f7=M(()=>{});function V9e(e){return function(){this.style.removeProperty(e)}}function U9e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function q9e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function _zt(e,t,r){return arguments.length>1?this.each((t==null?V9e:typeof t=="function"?q9e:U9e)(e,t,r==null?"":r)):_et(this.node(),e)}function _et(e,t){return e.style.getPropertyValue(t)||Cw(e).getComputedStyle(e,null).getPropertyValue(t)}var yet=M(()=>{f7()});function G9e(e){return function(){delete this[e]}}function W9e(e,t){return function(){this[e]=t}}function Y9e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function yzt(e,t){return arguments.length>1?this.each((t==null?G9e:typeof t=="function"?Y9e:W9e)(e,t)):this.node()[e]}var vzt=M(()=>{});function xzt(e){return e.trim().split(/^|\s+/)}function vet(e){return e.classList||new bzt(e)}function bzt(e){this._node=e,this._names=xzt(e.getAttribute("class")||"")}function wzt(e,t){for(var r=vet(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function Szt(e,t){for(var r=vet(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function j9e(e){return function(){wzt(this,e)}}function X9e(e){return function(){Szt(this,e)}}function $9e(e,t){return function(){(t.apply(this,arguments)?wzt:Szt)(this,e)}}function Mzt(e,t){var r=xzt(e+"");if(arguments.length<2){for(var n=vet(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?$9e:t?j9e:X9e)(r,t))}var Ezt=M(()=>{bzt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function K9e(){this.textContent=""}function Z9e(e){return function(){this.textContent=e}}function J9e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function Tzt(e){return arguments.length?this.each(e==null?K9e:(typeof e=="function"?J9e:Z9e)(e)):this.node().textContent}var Czt=M(()=>{});function Q9e(){this.innerHTML=""}function tLe(e){return function(){this.innerHTML=e}}function eLe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Azt(e){return arguments.length?this.each(e==null?Q9e:(typeof e=="function"?eLe:tLe)(e)):this.node().innerHTML}var Pzt=M(()=>{});function rLe(){this.nextSibling&&this.parentNode.appendChild(this)}function Izt(){return this.each(rLe)}var Lzt=M(()=>{});function nLe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kzt(){return this.each(nLe)}var Rzt=M(()=>{});function Nzt(e){var t=typeof e=="function"?e:Ng(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var Dzt=M(()=>{TC()});function iLe(){return null}function Ozt(e,t){var r=typeof e=="function"?e:Ng(e),n=t==null?iLe:typeof t=="function"?t:Ew(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var zzt=M(()=>{TC();l7()});function oLe(){var e=this.parentNode;e&&e.removeChild(this)}function Fzt(){return this.each(oLe)}var Bzt=M(()=>{});function aLe(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function sLe(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function Hzt(e){return this.select(e?sLe:aLe)}var Vzt=M(()=>{});function Uzt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var qzt=M(()=>{});function lLe(e,t,r){return e=Yzt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function Yzt(e,t,r){return function(n){var i=Pu;Pu=n;try{e.call(this,this.__data__,t,r)}finally{Pu=i}}}function cLe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function uLe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function hLe(e,t,r){var n=Wzt.hasOwnProperty(e.type)?lLe:Yzt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function jzt(e,t,r){var n=cLe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?hLe:uLe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Xzt(e,t,r,n){var i=Pu;e.sourceEvent=Pu,Pu=e;try{return t.apply(r,n)}finally{Pu=i}}var Wzt,Pu,Gzt,p7=M(()=>{Wzt={},Pu=null;typeof document!="undefined"&&(Gzt=document.documentElement,"onmouseenter"in Gzt||(Wzt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function $zt(e,t,r){var n=Cw(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function fLe(e,t){return function(){return $zt(this,e,t)}}function pLe(e,t){return function(){return $zt(this,e,t.apply(this,arguments))}}function Kzt(e,t){return this.each((typeof t=="function"?pLe:fLe)(e,t))}var Zzt=M(()=>{f7()});function Bn(e,t){this._groups=e,this._parents=t}function Jzt(){return new Bn([[document.documentElement]],AC)}var AC,Qzt,Sc=M(()=>{O7t();F7t();U7t();X7t();get();K7t();J7t();tzt();rzt();izt();azt();lzt();uzt();fzt();dzt();gzt();yet();vzt();Ezt();Czt();Pzt();Lzt();Rzt();Dzt();zzt();Bzt();Vzt();qzt();p7();Zzt();AC=[null];Bn.prototype=Jzt.prototype={constructor:Bn,select:D7t,selectAll:z7t,filter:V7t,data:j7t,enter:q7t,exit:$7t,merge:Z7t,order:Q7t,sort:ezt,call:nzt,nodes:ozt,node:szt,size:czt,empty:hzt,each:pzt,attr:mzt,style:_zt,property:yzt,classed:Mzt,text:Tzt,html:Azt,raise:Izt,lower:kzt,append:Nzt,insert:Ozt,remove:Fzt,clone:Hzt,datum:Uzt,on:jzt,dispatch:Kzt};Qzt=Jzt});function d7(e){return typeof e=="string"?new Bn([[document.querySelector(e)]],[document.documentElement]):new Bn([[e]],AC)}var xet=M(()=>{Sc()});function tFt(e){return d7(Ng(e).call(document.documentElement))}var eFt=M(()=>{TC();xet()});function m7(){return new bet}function bet(){this._="@"+(++dLe).toString(36)}var dLe,rFt=M(()=>{dLe=0;bet.prototype=m7.prototype={constructor:bet,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}}});function Aw(){for(var e=Pu,t;t=e.sourceEvent;)e=t;return e}var g7=M(()=>{p7()});function Dg(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var PC=M(()=>{});function nFt(e){var t=Aw();return t.changedTouches&&(t=t.changedTouches[0]),Dg(e,t)}var iFt=M(()=>{g7();PC()});function oFt(e){return typeof e=="string"?new Bn([document.querySelectorAll(e)],[document.documentElement]):new Bn([e==null?[]:e],AC)}var aFt=M(()=>{Sc()});function sFt(e,t,r){arguments.length<3&&(r=t,t=Aw().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Dg(e,o);return null}var lFt=M(()=>{g7();PC()});function cFt(e,t){t==null&&(t=Aw().touches);for(var r=0,n=t?t.length:0,i=new Array(n);r<n;++r)i[r]=Dg(e,t[r]);return i}var uFt=M(()=>{g7();PC()});var hFt=M(()=>{eFt();TC();rFt();det();iFt();s7();a7();PC();xet();aFt();Sc();l7();pet();yet();lFt();uFt();f7();p7()});function Eet(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function fFt(){return new Eet}var wet,Met,uv,mLe,Iu,pFt=M(()=>{wet=Math.PI,Met=2*wet,uv=1e-6,mLe=Met-uv;Eet.prototype=fFt.prototype={constructor:Eet,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>uv)if(!(Math.abs(u*s-l*c)>uv)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((wet-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>uv&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>uv||Math.abs(this._y1-c)>uv)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%Met+Met),h>mLe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>uv&&(this._+="A"+r+","+r+",0,"+ +(h>=wet)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};Iu=fFt});var Pw=M(()=>{pFt()});function Ge(e){return function(){return e}}var Og=M(()=>{});function mFt(e){return e>1?0:e<-1?ku:Math.acos(e)}function Cet(e){return e>=1?IC:e<=-1?-IC:Math.asin(e)}var Tet,Ho,zg,dFt,_7,Lu,hv,Co,ku,IC,Mc,Iw=M(()=>{Tet=Math.abs,Ho=Math.atan2,zg=Math.cos,dFt=Math.max,_7=Math.min,Lu=Math.sin,hv=Math.sqrt,Co=1e-12,ku=Math.PI,IC=ku/2,Mc=2*ku});function gLe(e){return e.innerRadius}function _Le(e){return e.outerRadius}function yLe(e){return e.startAngle}function vLe(e){return e.endAngle}function xLe(e){return e&&e.padAngle}function bLe(e,t,r,n,i,o,a,s){var l=r-e,c=n-t,u=a-i,h=s-o,f=(u*(t-o)-h*(e-i))/(h*l-u*c);return[e+f*l,t+f*c]}function y7(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/hv(s*s+l*l),u=c*l,h=-c*s,f=e+u,p=t+h,d=r+u,g=n+h,_=(f+d)/2,y=(p+g)/2,x=d-f,b=g-p,S=x*x+b*b,C=i-o,P=f*g-d*p,k=(b<0?-1:1)*hv(dFt(0,C*C*S-P*P)),O=(P*b-x*k)/S,D=(-P*x-b*k)/S,B=(P*b+x*k)/S,I=(-P*x+b*k)/S,L=O-_,R=D-y,F=B-_,z=I-y;return L*L+R*R>F*F+z*z&&(O=B,D=I),{cx:O,cy:D,x01:-u,y01:-h,x11:O*(i/C-1),y11:D*(i/C-1)}}function gFt(){var e=gLe,t=_Le,r=Ge(0),n=null,i=yLe,o=vLe,a=xLe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-IC,d=o.apply(this,arguments)-IC,g=Tet(d-p),_=d>p;if(s||(s=c=Iu()),f<h&&(u=f,f=h,h=u),!(f>Co))s.moveTo(0,0);else if(g>Mc-Co)s.moveTo(f*zg(p),f*Lu(p)),s.arc(0,0,f,p,d,!_),h>Co&&(s.moveTo(h*zg(d),h*Lu(d)),s.arc(0,0,h,d,p,_));else{var y=p,x=d,b=p,S=d,C=g,P=g,k=a.apply(this,arguments)/2,O=k>Co&&(n?+n.apply(this,arguments):hv(h*h+f*f)),D=_7(Tet(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>Co){var F=Cet(O/h*Lu(k)),z=Cet(O/f*Lu(k));(C-=F*2)>Co?(F*=_?1:-1,b+=F,S-=F):(C=0,b=S=(p+d)/2),(P-=z*2)>Co?(z*=_?1:-1,y+=z,x-=z):(P=0,y=x=(p+d)/2)}var U=f*zg(y),W=f*Lu(y),Z=h*zg(S),rt=h*Lu(S);if(D>Co){var ot=f*zg(x),st=f*Lu(x),St=h*zg(b),bt=h*Lu(b);if(g<ku){var Mt=C>Co?bLe(U,W,St,bt,ot,st,Z,rt):[Z,rt],lt=U-Mt[0],Kt=W-Mt[1],_t=ot-Mt[0],ct=st-Mt[1],X=1/Lu(mFt((lt*_t+Kt*ct)/(hv(lt*lt+Kt*Kt)*hv(_t*_t+ct*ct)))/2),et=hv(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=_7(D,(h-et)/(X-1)),I=_7(D,(f-et)/(X+1))}}P>Co?I>Co?(L=y7(St,bt,U,W,f,I,_),R=y7(ot,st,Z,rt,f,I,_),s.moveTo(L.cx+L.x01,L.cy+L.y01),I<D?s.arc(L.cx,L.cy,I,Ho(L.y01,L.x01),Ho(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,I,Ho(L.y01,L.x01),Ho(L.y11,L.x11),!_),s.arc(0,0,f,Ho(L.cy+L.y11,L.cx+L.x11),Ho(R.cy+R.y11,R.cx+R.x11),!_),s.arc(R.cx,R.cy,I,Ho(R.y11,R.x11),Ho(R.y01,R.x01),!_))):(s.moveTo(U,W),s.arc(0,0,f,y,x,!_)):s.moveTo(U,W),!(h>Co)||!(C>Co)?s.lineTo(Z,rt):B>Co?(L=y7(Z,rt,ot,st,h,-B,_),R=y7(U,W,St,bt,h,-B,_),s.lineTo(L.cx+L.x01,L.cy+L.y01),B<D?s.arc(L.cx,L.cy,B,Ho(L.y01,L.x01),Ho(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,B,Ho(L.y01,L.x01),Ho(L.y11,L.x11),!_),s.arc(0,0,h,Ho(L.cy+L.y11,L.cx+L.x11),Ho(R.cy+R.y11,R.cx+R.x11),_),s.arc(R.cx,R.cy,B,Ho(R.y11,R.x11),Ho(R.y01,R.x01),!_))):s.arc(0,0,h,S,b,_)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-ku/2;return[zg(u)*c,Lu(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:Ge(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:Ge(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:Ge(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:Ge(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:Ge(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:Ge(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:Ge(+c),l):a},l.context=function(c){return arguments.length?(s=c==null?null:c,l):s},l}var _Ft=M(()=>{Pw();Og();Iw()});function yFt(e){this._context=e}function Fg(e){return new yFt(e)}var LC=M(()=>{yFt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}}});function Lw(e){return e[0]}function kw(e){return e[1]}var v7=M(()=>{});function Rw(){var e=Lw,t=kw,r=Ge(!0),n=null,i=Fg,o=null;function a(s){var l,c=s.length,u,h=!1,f;for(n==null&&(o=i(f=Iu())),l=0;l<=c;++l)!(l<c&&r(u=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(u,l,s),+t(u,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:Ge(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:Ge(+s),a):t},a.defined=function(s){return arguments.length?(r=typeof s=="function"?s:Ge(!!s),a):r},a.curve=function(s){return arguments.length?(i=s,n!=null&&(o=i(n)),a):i},a.context=function(s){return arguments.length?(s==null?n=o=null:o=i(n=s),a):n},a}var x7=M(()=>{Pw();Og();LC();v7()});function b7(){var e=Lw,t=null,r=Ge(0),n=kw,i=Ge(!0),o=null,a=Fg,s=null;function l(u){var h,f,p,d=u.length,g,_=!1,y,x=new Array(d),b=new Array(d);for(o==null&&(s=a(y=Iu())),h=0;h<=d;++h){if(!(h<d&&i(g=u[h],h,u))===_)if(_=!_)f=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=h-1;p>=f;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}_&&(x[h]=+e(g,h,u),b[h]=+r(g,h,u),s.point(t?+t(g,h,u):x[h],n?+n(g,h,u):b[h]))}if(y)return s=null,y+""||null}function c(){return Rw().defined(i).curve(a).context(o)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:Ge(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:Ge(+u),l):t},l.y=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),n=null,l):r},l.y0=function(u){return arguments.length?(r=typeof u=="function"?u:Ge(+u),l):r},l.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:Ge(+u),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(r)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(t).y(r)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:Ge(!!u),l):i},l.curve=function(u){return arguments.length?(a=u,o!=null&&(s=a(o)),l):a},l.context=function(u){return arguments.length?(u==null?o=s=null:s=a(o=u),l):o},l}var Aet=M(()=>{Pw();Og();LC();x7();v7()});function vFt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var xFt=M(()=>{});function bFt(e){return e}var wFt=M(()=>{});function SFt(){var e=bFt,t=vFt,r=null,n=Ge(0),i=Ge(Mc),o=Ge(0);function a(s){var l,c=s.length,u,h,f=0,p=new Array(c),d=new Array(c),g=+n.apply(this,arguments),_=Math.min(Mc,Math.max(-Mc,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(_)/c,o.apply(this,arguments)),b=x*(_<0?-1:1),S;for(l=0;l<c;++l)(S=d[p[l]=l]=+e(s[l],l,s))>0&&(f+=S);for(t!=null?p.sort(function(C,P){return t(d[C],d[P])}):r!=null&&p.sort(function(C,P){return r(s[C],s[P])}),l=0,h=f?(_-c*b)/f:0;l<c;++l,g=y)u=p[l],S=d[u],y=g+(S>0?S*h:0)+b,d[u]={data:s[u],index:l,value:S,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:Ge(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:Ge(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:Ge(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:Ge(+s),a):o},a}var MFt=M(()=>{Og();xFt();wFt();Iw()});function EFt(e){this._curve=e}function Nw(e){function t(r){return new EFt(e(r))}return t._curve=e,t}var w7,Pet=M(()=>{LC();w7=Nw(Fg);EFt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}}});function Dw(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Nw(r)):t()._curve},e}function Iet(){return Dw(Rw().curve(w7))}var Let=M(()=>{Pet();x7()});function ket(){var e=b7().curve(w7),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Dw(r())},delete e.lineX0,e.lineEndAngle=function(){return Dw(n())},delete e.lineX1,e.lineInnerRadius=function(){return Dw(i())},delete e.lineY0,e.lineOuterRadius=function(){return Dw(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Nw(a)):t()._curve},e}var TFt=M(()=>{Pet();Aet();Let()});function fv(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var Ret=M(()=>{});var kC,Net=M(()=>{kC=Array.prototype.slice});function wLe(e){return e.source}function SLe(e){return e.target}function Det(e){var t=wLe,r=SLe,n=Lw,i=kw,o=null;function a(){var s,l=kC.call(arguments),c=t.apply(this,l),u=r.apply(this,l);if(o||(o=s=Iu()),e(o,+n.apply(this,(l[0]=c,l)),+i.apply(this,l),+n.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(r=s,a):r},a.x=function(s){return arguments.length?(n=typeof s=="function"?s:Ge(+s),a):n},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:Ge(+s),a):i},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}function MLe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function ELe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function TLe(e,t,r,n,i){var o=fv(t,r),a=fv(t,r=(r+i)/2),s=fv(n,r),l=fv(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function CFt(){return Det(MLe)}function AFt(){return Det(ELe)}function PFt(){var e=Det(TLe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var IFt=M(()=>{Pw();Net();Og();v7();Ret()});var RC,Oet=M(()=>{Iw();RC={draw:function(e,t){var r=Math.sqrt(t/ku);e.moveTo(r,0),e.arc(0,0,r,0,Mc)}}});var S7,zet=M(()=>{S7={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}}});var LFt,CLe,M7,Fet=M(()=>{LFt=Math.sqrt(.3333333333333333),CLe=LFt*2,M7={draw:function(e,t){var r=Math.sqrt(t/CLe),n=r*LFt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}}});var ALe,kFt,PLe,ILe,E7,Bet=M(()=>{Iw();ALe=.8908130915292852,kFt=Math.sin(ku/10)/Math.sin(7*ku/10),PLe=Math.sin(Mc/10)*kFt,ILe=-Math.cos(Mc/10)*kFt,E7={draw:function(e,t){var r=Math.sqrt(t*ALe),n=PLe*r,i=ILe*r;e.moveTo(0,-r),e.lineTo(n,i);for(var o=1;o<5;++o){var a=Mc*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}}});var T7,Het=M(()=>{T7={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}}});var Vet,C7,Uet=M(()=>{Vet=Math.sqrt(3),C7={draw:function(e,t){var r=-Math.sqrt(t/(Vet*3));e.moveTo(0,r*2),e.lineTo(-Vet*r,-r),e.lineTo(Vet*r,-r),e.closePath()}}});var Ec,Tc,qet,LLe,A7,Get=M(()=>{Ec=-.5,Tc=Math.sqrt(3)/2,qet=1/Math.sqrt(12),LLe=(qet/2+1)*3,A7={draw:function(e,t){var r=Math.sqrt(t/LLe),n=r/2,i=r*qet,o=n,a=r*qet+r,s=-o,l=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Ec*n-Tc*i,Tc*n+Ec*i),e.lineTo(Ec*o-Tc*a,Tc*o+Ec*a),e.lineTo(Ec*s-Tc*l,Tc*s+Ec*l),e.lineTo(Ec*n+Tc*i,Ec*i-Tc*n),e.lineTo(Ec*o+Tc*a,Ec*a-Tc*o),e.lineTo(Ec*s+Tc*l,Ec*l-Tc*s),e.closePath()}}});function NFt(){var e=Ge(RC),t=Ge(64),r=null;function n(){var i;if(r||(r=i=Iu()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(e=typeof i=="function"?i:Ge(i),n):e},n.size=function(i){return arguments.length?(t=typeof i=="function"?i:Ge(+i),n):t},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}var RFt,DFt=M(()=>{Pw();Oet();zet();Fet();Bet();Het();Uet();Get();Og();RFt=[RC,S7,M7,T7,E7,C7,A7]});function Cc(){}var NC=M(()=>{});function Ow(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function DC(e){this._context=e}function OFt(e){return new DC(e)}var OC=M(()=>{DC.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ow(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function zFt(e){this._context=e}function FFt(e){return new zFt(e)}var BFt=M(()=>{NC();OC();zFt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function HFt(e){this._context=e}function VFt(e){return new HFt(e)}var UFt=M(()=>{OC();HFt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ow(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}});function qFt(e,t){this._basis=new DC(e),this._beta=t}var GFt,WFt=M(()=>{OC();qFt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,a=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};GFt=function e(t){function r(n){return t===1?new DC(n):new qFt(n,t)}return r.beta=function(n){return e(+n)},r}(.85)});function zw(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function P7(e,t){this._context=e,this._k=(1-t)/6}var YFt,zC=M(()=>{P7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:zw(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};YFt=function e(t){function r(n){return new P7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function I7(e,t){this._context=e,this._k=(1-t)/6}var jFt,Wet=M(()=>{NC();zC();I7.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};jFt=function e(t){function r(n){return new I7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function L7(e,t){this._context=e,this._k=(1-t)/6}var XFt,Yet=M(()=>{zC();L7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zw(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};XFt=function e(t){function r(n){return new L7(n,t)}return r.tension=function(n){return e(+n)},r}(0)});function FC(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>Co){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Co){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function $Ft(e,t){this._context=e,this._alpha=t}var KFt,k7=M(()=>{Iw();zC();$Ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};KFt=function e(t){function r(n){return t?new $Ft(n,t):new P7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function ZFt(e,t){this._context=e,this._alpha=t}var JFt,QFt=M(()=>{Wet();NC();k7();ZFt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};JFt=function e(t){function r(n){return t?new ZFt(n,t):new I7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function tBt(e,t){this._context=e,this._alpha=t}var eBt,rBt=M(()=>{Yet();k7();tBt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:FC(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};eBt=function e(t){function r(n){return t?new tBt(n,t):new L7(n,0)}return r.alpha=function(n){return e(+n)},r}(.5)});function nBt(e){this._context=e}function iBt(e){return new nBt(e)}var oBt=M(()=>{NC();nBt.prototype={areaStart:Cc,areaEnd:Cc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}});function aBt(e){return e<0?-1:1}function sBt(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(aBt(o)+aBt(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function lBt(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function jet(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function R7(e){this._context=e}function cBt(e){this._context=new uBt(e)}function uBt(e){this._context=e}function hBt(e){return new R7(e)}function fBt(e){return new cBt(e)}var pBt=M(()=>{R7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:jet(this,this._t0,lBt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,jet(this,lBt(this,r=sBt(this,e,t)),r);break;default:jet(this,this._t0,r=sBt(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};(cBt.prototype=Object.create(R7.prototype)).point=function(e,t){R7.prototype.point.call(this,t,e)};uBt.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}}});function mBt(e){this._context=e}function dBt(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function gBt(e){return new mBt(e)}var _Bt=M(()=>{mBt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=dBt(e),i=dBt(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}});function N7(e,t){this._context=e,this._t=t}function yBt(e){return new N7(e,.5)}function vBt(e){return new N7(e,0)}function xBt(e){return new N7(e,1)}var bBt=M(()=>{N7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}}});function Ru(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,s=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}var Fw=M(()=>{});function Nu(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}var Bw=M(()=>{});function kLe(e,t){return e[t]}function wBt(){var e=Ge([]),t=Nu,r=Ru,n=kLe;function i(o){var a=e.apply(this,arguments),s,l=o.length,c=a.length,u=new Array(c),h;for(s=0;s<c;++s){for(var f=a[s],p=u[s]=new Array(l),d=0,g;d<l;++d)p[d]=g=[0,+n(o[d],f,d,o)],g.data=o[d];p.key=f}for(s=0,h=t(u);s<c;++s)u[h[s]].index=s;return r(u,h),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:Ge(kC.call(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:Ge(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?Nu:typeof o=="function"?o:Ge(kC.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?Ru:o,i):r},i}var SBt=M(()=>{Net();Og();Fw();Bw()});function MBt(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}Ru(e,t)}}var EBt=M(()=>{Fw()});function TBt(e,t){if((l=e.length)>1)for(var r,n=0,i,o,a,s,l,c=e[t[0]].length;n<c;++n)for(a=s=0,r=0;r<l;++r)(o=(i=e[t[r]][n])[1]-i[0])>=0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):i[0]=a}var CBt=M(()=>{});function ABt(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,s=0;a<i;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}Ru(e,t)}}var PBt=M(()=>{Fw()});function IBt(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],h=u[n][1]||0,f=u[n-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=e[t[d]],_=g[n][1]||0,y=g[n-1][1]||0;p+=_-y}l+=h,c+=p*h}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,Ru(e,t)}}var LBt=M(()=>{Fw()});function D7(e){var t=e.map(Xet);return Nu(e).sort(function(r,n){return t[r]-t[n]})}function Xet(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}var O7=M(()=>{Bw()});function kBt(e){return D7(e).reverse()}var RBt=M(()=>{O7()});function NBt(e){var t=e.length,r,n,i=e.map(Xet),o=Nu(e).sort(function(u,h){return i[h]-i[u]}),a=0,s=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}var DBt=M(()=>{Bw();O7()});function OBt(e){return Nu(e).reverse()}var zBt=M(()=>{Bw()});var FBt=M(()=>{_Ft();Aet();x7();MFt();TFt();Let();Ret();IFt();DFt();Oet();zet();Fet();Het();Bet();Uet();Get();BFt();UFt();OC();WFt();Wet();Yet();zC();QFt();rBt();k7();oBt();LC();pBt();_Bt();bBt();SBt();EBt();CBt();Fw();PBt();LBt();O7();RBt();DBt();Bw();zBt()});function Sr(e,t,r,n){function i(o){return e(o=new Date(+o)),o}return i.floor=i,i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return Sr(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return $et.setTime(+o),Ket.setTime(+a),e($et),e(Ket),Math.floor(r($et,Ket))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var $et,Ket,fa=M(()=>{$et=new Date,Ket=new Date});var z7,Zet,Jet,BBt=M(()=>{fa();z7=Sr(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});z7.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Sr(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):z7};Zet=z7,Jet=z7.range});var BC,Ps,bf,F7,B7,wf=M(()=>{BC=1e3,Ps=6e4,bf=36e5,F7=864e5,B7=6048e5});var HBt,Qet,trt,VBt=M(()=>{fa();wf();HBt=Sr(function(e){e.setTime(Math.floor(e/BC)*BC)},function(e,t){e.setTime(+e+t*BC)},function(e,t){return(t-e)/BC},function(e){return e.getUTCSeconds()}),Qet=HBt,trt=HBt.range});var UBt,qBt,GBt,WBt=M(()=>{fa();wf();UBt=Sr(function(e){e.setTime(Math.floor(e/Ps)*Ps)},function(e,t){e.setTime(+e+t*Ps)},function(e,t){return(t-e)/Ps},function(e){return e.getMinutes()}),qBt=UBt,GBt=UBt.range});var YBt,jBt,XBt,$Bt=M(()=>{fa();wf();YBt=Sr(function(e){var t=e.getTimezoneOffset()*Ps%bf;t<0&&(t+=bf),e.setTime(Math.floor((+e-t)/bf)*bf+t)},function(e,t){e.setTime(+e+t*bf)},function(e,t){return(t-e)/bf},function(e){return e.getHours()}),jBt=YBt,XBt=YBt.range});var KBt,ZBt,JBt,QBt=M(()=>{fa();wf();KBt=Sr(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Ps)/F7},function(e){return e.getDate()-1}),ZBt=KBt,JBt=KBt.range});function pv(e){return Sr(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*Ps)/B7})}var H7,ert,rrt,nrt,irt,ort,art,srt,tHt,eHt,rHt,nHt,iHt,oHt,aHt=M(()=>{fa();wf();H7=pv(0),ert=pv(1),rrt=pv(2),nrt=pv(3),irt=pv(4),ort=pv(5),art=pv(6),srt=H7.range,tHt=ert.range,eHt=rrt.range,rHt=nrt.range,nHt=irt.range,iHt=ort.range,oHt=art.range});var sHt,lHt,cHt,uHt=M(()=>{fa();sHt=Sr(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),lHt=sHt,cHt=sHt.range});var lrt,hHt,fHt,pHt=M(()=>{fa();lrt=Sr(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});lrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Sr(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};hHt=lrt,fHt=lrt.range});var dHt,mHt,gHt,_Ht=M(()=>{fa();wf();dHt=Sr(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*Ps)},function(e,t){return(t-e)/Ps},function(e){return e.getUTCMinutes()}),mHt=dHt,gHt=dHt.range});var yHt,vHt,xHt,bHt=M(()=>{fa();wf();yHt=Sr(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*bf)},function(e,t){return(t-e)/bf},function(e){return e.getUTCHours()}),vHt=yHt,xHt=yHt.range});var wHt,SHt,MHt,EHt=M(()=>{fa();wf();wHt=Sr(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/F7},function(e){return e.getUTCDate()-1}),SHt=wHt,MHt=wHt.range});function dv(e){return Sr(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/B7})}var V7,crt,urt,hrt,frt,prt,drt,mrt,THt,CHt,AHt,PHt,IHt,LHt,kHt=M(()=>{fa();wf();V7=dv(0),crt=dv(1),urt=dv(2),hrt=dv(3),frt=dv(4),prt=dv(5),drt=dv(6),mrt=V7.range,THt=crt.range,CHt=urt.range,AHt=hrt.range,PHt=frt.range,IHt=prt.range,LHt=drt.range});var RHt,NHt,DHt,OHt=M(()=>{fa();RHt=Sr(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),NHt=RHt,DHt=RHt.range});var grt,zHt,FHt,BHt=M(()=>{fa();grt=Sr(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});grt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:Sr(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};zHt=grt,FHt=grt.range});var HHt=M(()=>{fa();BBt();VBt();WBt();$Bt();QBt();aHt();uHt();pHt();_Ht();bHt();EHt();kHt();OHt();BHt()});function pa(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return pa(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return _rt.setTime(+o),yrt.setTime(+a),e(_rt),e(yrt),Math.floor(r(_rt,yrt))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var _rt,yrt,mv=M(()=>{_rt=new Date,yrt=new Date});var U7,q7,G7,HC=M(()=>{U7=6e4,q7=864e5,G7=6048e5});var VHt,W7,RLe,UHt=M(()=>{mv();HC();VHt=pa(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*U7)/q7},function(e){return e.getDate()-1}),W7=VHt,RLe=VHt.range});function gv(e){return pa(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*U7)/G7})}var VC,Hw,qHt,GHt,Vw,WHt,YHt,jHt,NLe,DLe,OLe,zLe,FLe,BLe,XHt=M(()=>{mv();HC();VC=gv(0),Hw=gv(1),qHt=gv(2),GHt=gv(3),Vw=gv(4),WHt=gv(5),YHt=gv(6),jHt=VC.range,NLe=Hw.range,DLe=qHt.range,OLe=GHt.range,zLe=Vw.range,FLe=WHt.range,BLe=YHt.range});var vrt,_v,HLe,$Ht=M(()=>{mv();vrt=pa(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});vrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:pa(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};_v=vrt,HLe=vrt.range});var KHt,Y7,VLe,ZHt=M(()=>{mv();HC();KHt=pa(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/q7},function(e){return e.getUTCDate()-1}),Y7=KHt,VLe=KHt.range});function yv(e){return pa(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/G7})}var UC,Uw,JHt,QHt,qw,tVt,eVt,rVt,ULe,qLe,GLe,WLe,YLe,jLe,nVt=M(()=>{mv();HC();UC=yv(0),Uw=yv(1),JHt=yv(2),QHt=yv(3),qw=yv(4),tVt=yv(5),eVt=yv(6),rVt=UC.range,ULe=Uw.range,qLe=JHt.range,GLe=QHt.range,WLe=qw.range,YLe=tVt.range,jLe=eVt.range});var xrt,vv,XLe,iVt=M(()=>{mv();xrt=pa(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});xrt.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:pa(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};vv=xrt,XLe=xrt.range});var oVt=M(()=>{UHt();XHt();$Ht();ZHt();nVt();iVt()});function $Le(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function j7(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qC(e){return{y:e,m:0,d:1,H:0,M:0,S:0,L:0}}function YC(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=GC(i),u=WC(i),h=GC(o),f=WC(o),p=GC(a),d=WC(a),g=GC(s),_=WC(s),y=GC(l),x=WC(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:cVt,e:cVt,f:vke,H:gke,I:_ke,j:yke,L:dVt,m:xke,M:bke,p:st,Q:fVt,s:pVt,S:wke,u:Ske,U:Mke,V:Eke,w:Tke,W:Cke,x:null,X:null,y:Ake,Y:Pke,Z:Ike,"%":hVt},S={a:St,A:bt,b:Mt,B:lt,c:null,d:uVt,e:uVt,f:Nke,H:Lke,I:kke,j:Rke,L:mVt,m:Dke,M:Oke,p:Kt,Q:fVt,s:pVt,S:zke,u:Fke,U:Bke,V:Hke,w:Vke,W:Uke,x:null,X:null,y:qke,Y:Gke,Z:Wke,"%":hVt},C={a:B,A:I,b:L,B:R,c:F,d:sVt,e:sVt,f:fke,H:lVt,I:lVt,j:lke,L:hke,m:ske,M:cke,p:D,Q:dke,s:mke,S:uke,u:tke,U:eke,V:rke,w:QLe,W:nke,x:z,X:U,y:oke,Y:ike,Z:ake,"%":pke};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(_t,ct){return function(X){var et=[],dt=-1,q=0,pt=_t.length,ht,wt,kt;for(X instanceof Date||(X=new Date(+X));++dt<pt;)_t.charCodeAt(dt)===37&&(et.push(_t.slice(q,dt)),(wt=aVt[ht=_t.charAt(++dt)])!=null?ht=_t.charAt(++dt):wt=ht==="e"?" ":"0",(kt=ct[ht])&&(ht=kt(X,wt)),et.push(ht),q=dt+1);return et.push(_t.slice(q,dt)),et.join("")}}function k(_t,ct){return function(X){var et=qC(1900),dt=O(et,_t,X+="",0),q,pt;if(dt!=X.length)return null;if("Q"in et)return new Date(et.Q);if("p"in et&&(et.H=et.H%12+et.p*12),"V"in et){if(et.V<1||et.V>53)return null;"w"in et||(et.w=1),"Z"in et?(q=j7(qC(et.y)),pt=q.getUTCDay(),q=pt>4||pt===0?Uw.ceil(q):Uw(q),q=Y7.offset(q,(et.V-1)*7),et.y=q.getUTCFullYear(),et.m=q.getUTCMonth(),et.d=q.getUTCDate()+(et.w+6)%7):(q=ct(qC(et.y)),pt=q.getDay(),q=pt>4||pt===0?Hw.ceil(q):Hw(q),q=W7.offset(q,(et.V-1)*7),et.y=q.getFullYear(),et.m=q.getMonth(),et.d=q.getDate()+(et.w+6)%7)}else("W"in et||"U"in et)&&("w"in et||(et.w="u"in et?et.u%7:"W"in et?1:0),pt="Z"in et?j7(qC(et.y)).getUTCDay():ct(qC(et.y)).getDay(),et.m=0,et.d="W"in et?(et.w+6)%7+et.W*7-(pt+5)%7:et.w+et.U*7-(pt+6)%7);return"Z"in et?(et.H+=et.Z/100|0,et.M+=et.Z%100,j7(et)):ct(et)}}function O(_t,ct,X,et){for(var dt=0,q=ct.length,pt=X.length,ht,wt;dt<q;){if(et>=pt)return-1;if(ht=ct.charCodeAt(dt++),ht===37){if(ht=ct.charAt(dt++),wt=C[ht in aVt?ct.charAt(dt++):ht],!wt||(et=wt(_t,X,et))<0)return-1}else if(ht!=X.charCodeAt(et++))return-1}return et}function D(_t,ct,X){var et=c.exec(ct.slice(X));return et?(_t.p=u[et[0].toLowerCase()],X+et[0].length):-1}function B(_t,ct,X){var et=p.exec(ct.slice(X));return et?(_t.w=d[et[0].toLowerCase()],X+et[0].length):-1}function I(_t,ct,X){var et=h.exec(ct.slice(X));return et?(_t.w=f[et[0].toLowerCase()],X+et[0].length):-1}function L(_t,ct,X){var et=y.exec(ct.slice(X));return et?(_t.m=x[et[0].toLowerCase()],X+et[0].length):-1}function R(_t,ct,X){var et=g.exec(ct.slice(X));return et?(_t.m=_[et[0].toLowerCase()],X+et[0].length):-1}function F(_t,ct,X){return O(_t,t,ct,X)}function z(_t,ct,X){return O(_t,r,ct,X)}function U(_t,ct,X){return O(_t,n,ct,X)}function W(_t){return a[_t.getDay()]}function Z(_t){return o[_t.getDay()]}function rt(_t){return l[_t.getMonth()]}function ot(_t){return s[_t.getMonth()]}function st(_t){return i[+(_t.getHours()>=12)]}function St(_t){return a[_t.getUTCDay()]}function bt(_t){return o[_t.getUTCDay()]}function Mt(_t){return l[_t.getUTCMonth()]}function lt(_t){return s[_t.getUTCMonth()]}function Kt(_t){return i[+(_t.getUTCHours()>=12)]}return{format:function(_t){var ct=P(_t+="",b);return ct.toString=function(){return _t},ct},parse:function(_t){var ct=k(_t+="",$Le);return ct.toString=function(){return _t},ct},utcFormat:function(_t){var ct=P(_t+="",S);return ct.toString=function(){return _t},ct},utcParse:function(_t){var ct=k(_t,j7);return ct.toString=function(){return _t},ct}}}function gn(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function JLe(e){return e.replace(ZLe,"\\$&")}function GC(e){return new RegExp("^(?:"+e.map(JLe).join("|")+")","i")}function WC(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function QLe(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function tke(e,t,r){var n=Vo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function eke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function rke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function nke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function ike(e,t,r){var n=Vo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function oke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function ake(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function ske(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function sVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function lke(e,t,r){var n=Vo.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function lVt(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function cke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function uke(e,t,r){var n=Vo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function hke(e,t,r){var n=Vo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function fke(e,t,r){var n=Vo.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function pke(e,t,r){var n=KLe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function dke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function mke(e,t,r){var n=Vo.exec(t.slice(r));return n?(e.Q=+n[0]*1e3,r+n[0].length):-1}function cVt(e,t){return gn(e.getDate(),t,2)}function gke(e,t){return gn(e.getHours(),t,2)}function _ke(e,t){return gn(e.getHours()%12||12,t,2)}function yke(e,t){return gn(1+W7.count(_v(e),e),t,3)}function dVt(e,t){return gn(e.getMilliseconds(),t,3)}function vke(e,t){return dVt(e,t)+"000"}function xke(e,t){return gn(e.getMonth()+1,t,2)}function bke(e,t){return gn(e.getMinutes(),t,2)}function wke(e,t){return gn(e.getSeconds(),t,2)}function Ske(e){var t=e.getDay();return t===0?7:t}function Mke(e,t){return gn(VC.count(_v(e),e),t,2)}function Eke(e,t){var r=e.getDay();return e=r>=4||r===0?Vw(e):Vw.ceil(e),gn(Vw.count(_v(e),e)+(_v(e).getDay()===4),t,2)}function Tke(e){return e.getDay()}function Cke(e,t){return gn(Hw.count(_v(e),e),t,2)}function Ake(e,t){return gn(e.getFullYear()%100,t,2)}function Pke(e,t){return gn(e.getFullYear()%1e4,t,4)}function Ike(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+gn(t/60|0,"0",2)+gn(t%60,"0",2)}function uVt(e,t){return gn(e.getUTCDate(),t,2)}function Lke(e,t){return gn(e.getUTCHours(),t,2)}function kke(e,t){return gn(e.getUTCHours()%12||12,t,2)}function Rke(e,t){return gn(1+Y7.count(vv(e),e),t,3)}function mVt(e,t){return gn(e.getUTCMilliseconds(),t,3)}function Nke(e,t){return mVt(e,t)+"000"}function Dke(e,t){return gn(e.getUTCMonth()+1,t,2)}function Oke(e,t){return gn(e.getUTCMinutes(),t,2)}function zke(e,t){return gn(e.getUTCSeconds(),t,2)}function Fke(e){var t=e.getUTCDay();return t===0?7:t}function Bke(e,t){return gn(UC.count(vv(e),e),t,2)}function Hke(e,t){var r=e.getUTCDay();return e=r>=4||r===0?qw(e):qw.ceil(e),gn(qw.count(vv(e),e)+(vv(e).getUTCDay()===4),t,2)}function Vke(e){return e.getUTCDay()}function Uke(e,t){return gn(Uw.count(vv(e),e),t,2)}function qke(e,t){return gn(e.getUTCFullYear()%100,t,2)}function Gke(e,t){return gn(e.getUTCFullYear()%1e4,t,4)}function Wke(){return"+0000"}function hVt(){return"%"}function fVt(e){return+e}function pVt(e){return Math.floor(+e/1e3)}var aVt,Vo,KLe,ZLe,brt=M(()=>{oVt();aVt={"-":"",_:" ",0:"0"},Vo=/^\s*\d+/,KLe=/^%/,ZLe=/[\\^$*+?|[\]().{}]/g});function X7(e){return Gw=YC(e),wrt=Gw.format,Srt=Gw.parse,jC=Gw.utcFormat,XC=Gw.utcParse,Gw}var Gw,wrt,Srt,jC,XC,$7=M(()=>{brt();X7({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})});function Yke(e){return e.toISOString()}var Mrt,jke,gVt,Ert=M(()=>{$7();Mrt="%Y-%m-%dT%H:%M:%S.%LZ";jke=Date.prototype.toISOString?Yke:jC(Mrt),gVt=jke});function Xke(e){var t=new Date(e);return isNaN(t)?null:t}var $ke,_Vt,yVt=M(()=>{Ert();$7();$ke=+new Date("2000-01-01T00:00:00.000Z")?Xke:XC(Mrt),_Vt=$ke});var vVt=M(()=>{$7();brt();Ert();yVt()});function Yw(){return xv||(wVt(Kke),xv=JC.now()+J7)}function Kke(){xv=0}function bv(){this._call=this._time=this._next=null}function Crt(e,t,r){var n=new bv;return n.restart(e,t,r),n}function Art(){Yw(),++Ww;for(var e=K7,t;e;)(t=xv-e._time)>=0&&e._call.call(null,t),e=e._next;--Ww}function xVt(){xv=(Z7=JC.now())+J7,Ww=KC=0;try{Art()}finally{Ww=0,Jke(),xv=0}}function Zke(){var e=JC.now(),t=e-Z7;t>bVt&&(J7-=t,Z7=e)}function Jke(){for(var e,t=K7,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:K7=r);ZC=e,Trt(n)}function Trt(e){if(!Ww){KC&&(KC=clearTimeout(KC));var t=e-xv;t>24?(e<1/0&&(KC=setTimeout(xVt,e-JC.now()-J7)),$C&&($C=clearInterval($C))):($C||(Z7=JC.now(),$C=setInterval(Zke,bVt)),Ww=1,wVt(xVt))}}var Ww,KC,$C,bVt,K7,ZC,Z7,xv,J7,JC,wVt,Q7=M(()=>{Ww=0,KC=0,$C=0,bVt=1e3,Z7=0,xv=0,J7=0,JC=typeof performance=="object"&&performance.now?performance:Date,wVt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};bv.prototype=Crt.prototype={constructor:bv,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Yw():+r)+(t==null?0:+t),!this._next&&ZC!==this&&(ZC?ZC._next=this:K7=this,ZC=this),this._call=e,this._time=r,Trt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Trt())}}});function SVt(e,t,r){var n=new bv;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var MVt=M(()=>{Q7()});function EVt(e,t,r){var n=new bv,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?Yw():+r,n.restart(function o(a){a+=i,n.restart(o,i+=t,r),e(a)},t,r),n)}var TVt=M(()=>{Q7()});var CVt=M(()=>{Q7();MVt();TVt()});var tz,Prt,Irt=M(()=>{tz="http://www.w3.org/1999/xhtml",Prt={svg:"http://www.w3.org/2000/svg",xhtml:tz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function ld(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),Prt.hasOwnProperty(t)?{space:Prt[t],local:e}:e}var ez=M(()=>{Irt()});function Qke(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===tz&&t.documentElement.namespaceURI===tz?t.createElement(e):t.createElementNS(r,e)}}function t8e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function rz(e){var t=ld(e);return(t.local?t8e:Qke)(t)}var Lrt=M(()=>{ez();Irt()});function e8e(){}function wv(e){return e==null?e8e:function(){return this.querySelector(e)}}var nz=M(()=>{});function AVt(e){typeof e!="function"&&(e=wv(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new no(n,this._parents)}var PVt=M(()=>{Sf();nz()});function r8e(){return[]}function QC(e){return e==null?r8e:function(){return this.querySelectorAll(e)}}var krt=M(()=>{});function IVt(e){typeof e!="function"&&(e=QC(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new no(n,i)}var LVt=M(()=>{Sf();krt()});function tA(e){return function(){return this.matches(e)}}var Rrt=M(()=>{});function kVt(e){typeof e!="function"&&(e=tA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new no(n,this._parents)}var RVt=M(()=>{Sf();Rrt()});function iz(e){return new Array(e.length)}var Nrt=M(()=>{});function NVt(){return new no(this._enter||this._groups.map(iz),this._parents)}function eA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Drt=M(()=>{Nrt();Sf();eA.prototype={constructor:eA,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function DVt(e){return function(){return e}}var OVt=M(()=>{});function n8e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new eA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function i8e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=zVt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=zVt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new eA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function FVt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?i8e:n8e,n=this._parents,i=this._groups;typeof e!="function"&&(e=DVt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new no(a,n),a._enter=s,a._exit=l,a}var zVt,BVt=M(()=>{Sf();Drt();OVt();zVt="$"});function HVt(){return new no(this._exit||this._groups.map(iz),this._parents)}var VVt=M(()=>{Nrt();Sf()});function UVt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var qVt=M(()=>{});function GVt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new no(a,this._parents)}var WVt=M(()=>{Sf()});function YVt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var jVt=M(()=>{});function XVt(e){e||(e=o8e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new no(i,this._parents).order()}function o8e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var $Vt=M(()=>{Sf()});function KVt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var ZVt=M(()=>{});function JVt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var QVt=M(()=>{});function tUt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var eUt=M(()=>{});function rUt(){var e=0;return this.each(function(){++e}),e}var nUt=M(()=>{});function iUt(){return!this.node()}var oUt=M(()=>{});function aUt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var sUt=M(()=>{});function a8e(e){return function(){this.removeAttribute(e)}}function s8e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function l8e(e,t){return function(){this.setAttribute(e,t)}}function c8e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function u8e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function h8e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function lUt(e,t){var r=ld(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?s8e:a8e:typeof t=="function"?r.local?h8e:u8e:r.local?c8e:l8e)(r,t))}var cUt=M(()=>{ez()});function oz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Ort=M(()=>{});function f8e(e){return function(){this.style.removeProperty(e)}}function p8e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function d8e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function uUt(e,t,r){return arguments.length>1?this.each((t==null?f8e:typeof t=="function"?d8e:p8e)(e,t,r==null?"":r)):Bg(this.node(),e)}function Bg(e,t){return e.style.getPropertyValue(t)||oz(e).getComputedStyle(e,null).getPropertyValue(t)}var zrt=M(()=>{Ort()});function m8e(e){return function(){delete this[e]}}function g8e(e,t){return function(){this[e]=t}}function _8e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function hUt(e,t){return arguments.length>1?this.each((t==null?m8e:typeof t=="function"?_8e:g8e)(e,t)):this.node()[e]}var fUt=M(()=>{});function pUt(e){return e.trim().split(/^|\s+/)}function Frt(e){return e.classList||new dUt(e)}function dUt(e){this._node=e,this._names=pUt(e.getAttribute("class")||"")}function mUt(e,t){for(var r=Frt(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function gUt(e,t){for(var r=Frt(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function y8e(e){return function(){mUt(this,e)}}function v8e(e){return function(){gUt(this,e)}}function x8e(e,t){return function(){(t.apply(this,arguments)?mUt:gUt)(this,e)}}function _Ut(e,t){var r=pUt(e+"");if(arguments.length<2){for(var n=Frt(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?x8e:t?y8e:v8e)(r,t))}var yUt=M(()=>{dUt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function b8e(){this.textContent=""}function w8e(e){return function(){this.textContent=e}}function S8e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function vUt(e){return arguments.length?this.each(e==null?b8e:(typeof e=="function"?S8e:w8e)(e)):this.node().textContent}var xUt=M(()=>{});function M8e(){this.innerHTML=""}function E8e(e){return function(){this.innerHTML=e}}function T8e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function bUt(e){return arguments.length?this.each(e==null?M8e:(typeof e=="function"?T8e:E8e)(e)):this.node().innerHTML}var wUt=M(()=>{});function C8e(){this.nextSibling&&this.parentNode.appendChild(this)}function SUt(){return this.each(C8e)}var MUt=M(()=>{});function A8e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function EUt(){return this.each(A8e)}var TUt=M(()=>{});function CUt(e){var t=typeof e=="function"?e:rz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var AUt=M(()=>{Lrt()});function P8e(){return null}function PUt(e,t){var r=typeof e=="function"?e:rz(e),n=t==null?P8e:typeof t=="function"?t:wv(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var IUt=M(()=>{Lrt();nz()});function I8e(){var e=this.parentNode;e&&e.removeChild(this)}function LUt(){return this.each(I8e)}var kUt=M(()=>{});function L8e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function k8e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function RUt(e){return this.select(e?k8e:L8e)}var NUt=M(()=>{});function DUt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var OUt=M(()=>{});function R8e(e,t,r){return e=BUt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function BUt(e,t,r){return function(n){var i=Brt;Brt=n;try{e.call(this,this.__data__,t,r)}finally{Brt=i}}}function N8e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function D8e(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function O8e(e,t,r){var n=FUt.hasOwnProperty(e.type)?R8e:BUt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function HUt(e,t,r){var n=N8e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?O8e:D8e,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}var FUt,Brt,zUt,VUt=M(()=>{FUt={},Brt=null;typeof document!="undefined"&&(zUt=document.documentElement,"onmouseenter"in zUt||(FUt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function UUt(e,t,r){var n=oz(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function z8e(e,t){return function(){return UUt(this,e,t)}}function F8e(e,t){return function(){return UUt(this,e,t.apply(this,arguments))}}function qUt(e,t){return this.each((typeof t=="function"?F8e:z8e)(e,t))}var GUt=M(()=>{Ort()});function no(e,t){this._groups=e,this._parents=t}function WUt(){return new no([[document.documentElement]],B8e)}var B8e,cd,Sf=M(()=>{PVt();LVt();RVt();BVt();Drt();VVt();qVt();WVt();jVt();$Vt();ZVt();QVt();eUt();nUt();oUt();sUt();cUt();zrt();fUt();yUt();xUt();wUt();MUt();TUt();AUt();IUt();kUt();NUt();OUt();VUt();GUt();B8e=[null];no.prototype=WUt.prototype={constructor:no,select:AVt,selectAll:IVt,filter:kVt,data:FVt,enter:NVt,exit:HVt,join:UVt,merge:GVt,order:YVt,sort:XVt,call:KVt,nodes:JVt,node:tUt,size:rUt,empty:iUt,each:aUt,attr:lUt,style:uUt,property:hUt,classed:_Ut,text:vUt,html:bUt,raise:SUt,lower:EUt,append:CUt,insert:PUt,remove:LUt,clone:RUt,datum:DUt,on:HUt,dispatch:qUt};cd=WUt});var Mf=M(()=>{Rrt();ez();Sf();nz();krt();zrt()});function jUt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new az(r)}function az(e){this._=e}function V8e(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function U8e(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function YUt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=H8e,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var H8e,Hrt,XUt=M(()=>{H8e={value:function(){}};az.prototype=jUt.prototype={constructor:az,on:function(e,t){var r=this._,n=V8e(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=U8e(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=YUt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=YUt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new az(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};Hrt=jUt});var $Ut=M(()=>{XUt()});function Xw(){return Sv||(JUt(q8e),Sv=oA.now()+cz)}function q8e(){Sv=0}function aA(){this._call=this._time=this._next=null}function uz(e,t,r){var n=new aA;return n.restart(e,t,r),n}function QUt(){Xw(),++jw;for(var e=sz,t;e;)(t=Sv-e._time)>=0&&e._call.call(null,t),e=e._next;--jw}function KUt(){Sv=(lz=oA.now())+cz,jw=nA=0;try{QUt()}finally{jw=0,W8e(),Sv=0}}function G8e(){var e=oA.now(),t=e-lz;t>ZUt&&(cz-=t,lz=e)}function W8e(){for(var e,t=sz,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:sz=r);iA=e,Vrt(n)}function Vrt(e){if(!jw){nA&&(nA=clearTimeout(nA));var t=e-Sv;t>24?(e<1/0&&(nA=setTimeout(KUt,e-oA.now()-cz)),rA&&(rA=clearInterval(rA))):(rA||(lz=oA.now(),rA=setInterval(G8e,ZUt)),jw=1,JUt(KUt))}}var jw,nA,rA,ZUt,sz,iA,lz,Sv,cz,oA,JUt,Urt=M(()=>{jw=0,nA=0,rA=0,ZUt=1e3,lz=0,Sv=0,cz=0,oA=typeof performance=="object"&&performance.now?performance:Date,JUt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};aA.prototype=uz.prototype={constructor:aA,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Xw():+r)+(t==null?0:+t),!this._next&&iA!==this&&(iA?iA._next=this:sz=this,iA=this),this._call=e,this._time=r,Vrt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Vrt())}}});function hz(e,t,r){var n=new aA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var tqt=M(()=>{Urt()});var qrt=M(()=>{Urt();tqt()});function Hg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;X8e(e,r,{name:t,index:n,group:i,on:Y8e,tween:j8e,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:rqt})}function cA(e,t){var r=io(e,t);if(r.state>rqt)throw new Error("too late; already scheduled");return r}function Du(e,t){var r=io(e,t);if(r.state>lA)throw new Error("too late; already started");return r}function io(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function X8e(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=uz(o,0,r.time);function o(c){r.state=fz,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==fz)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===Grt)return hz(a);p.state===eqt?(p.state=sA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=sA,p.timer.stop(),delete n[u])}if(hz(function(){r.state===Grt&&(r.state=eqt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=lA,r.on.call("start",e,e.__data__,r.index,r.group),r.state===lA){for(r.state=Grt,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=pz,1),h=-1,f=i.length;++h<f;)i[h].call(null,u);r.state===pz&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=sA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var Y8e,j8e,rqt,fz,lA,Grt,eqt,pz,sA,Ac=M(()=>{$Ut();qrt();Y8e=Hrt("start","end","interrupt"),j8e=[],rqt=0,fz=1,lA=2,Grt=3,eqt=4,pz=5,sA=6});function dz(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>lA&&n.state<pz,n.state=sA,n.timer.stop(),i&&n.on.call("interrupt",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Wrt=M(()=>{Ac()});function nqt(e){return this.each(function(){dz(this,e)})}var iqt=M(()=>{Wrt()});function mz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Yrt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var oqt=M(()=>{});function fA(){}function sqt(){return this.rgb().formatHex()}function rRe(){return pqt(this).formatHsl()}function lqt(){return this.rgb().formatRgb()}function Vg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=$8e.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?cqt(t):r===3?new ml(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?gz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?gz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=K8e.exec(e))?new ml(t[1],t[2],t[3],1):(t=Z8e.exec(e))?new ml(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=J8e.exec(e))?gz(t[1],t[2],t[3],t[4]):(t=Q8e.exec(e))?gz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=tRe.exec(e))?fqt(t[1],t[2]/100,t[3]/100,1):(t=eRe.exec(e))?fqt(t[1],t[2]/100,t[3]/100,t[4]):aqt.hasOwnProperty(e)?cqt(aqt[e]):e==="transparent"?new ml(NaN,NaN,NaN,0):null}function cqt(e){return new ml(e>>16&255,e>>8&255,e&255,1)}function gz(e,t,r,n){return n<=0&&(e=t=r=NaN),new ml(e,t,r,n)}function nRe(e){return e instanceof fA||(e=Vg(e)),e?(e=e.rgb(),new ml(e.r,e.g,e.b,e.opacity)):new ml}function Kw(e,t,r,n){return arguments.length===1?nRe(e):new ml(e,t,r,n==null?1:n)}function ml(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function uqt(){return"#"+jrt(this.r)+jrt(this.g)+jrt(this.b)}function hqt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function jrt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function fqt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Ef(e,t,r,n)}function pqt(e){if(e instanceof Ef)return new Ef(e.h,e.s,e.l,e.opacity);if(e instanceof fA||(e=Vg(e)),!e)return new Ef;if(e instanceof Ef)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Ef(a,s,l,e.opacity)}function dqt(e,t,r,n){return arguments.length===1?pqt(e):new Ef(e,t,r,n==null?1:n)}function Ef(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Xrt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uA,_z,$w,hA,Tf,$8e,K8e,Z8e,J8e,Q8e,tRe,eRe,aqt,mqt=M(()=>{oqt();uA=.7,_z=1/uA,$w="\\s*([+-]?\\d+)\\s*",hA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Tf="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$8e=/^#([0-9a-f]{3,8})$/,K8e=new RegExp("^rgb\\("+[$w,$w,$w]+"\\)$"),Z8e=new RegExp("^rgb\\("+[Tf,Tf,Tf]+"\\)$"),J8e=new RegExp("^rgba\\("+[$w,$w,$w,hA]+"\\)$"),Q8e=new RegExp("^rgba\\("+[Tf,Tf,Tf,hA]+"\\)$"),tRe=new RegExp("^hsl\\("+[hA,Tf,Tf]+"\\)$"),eRe=new RegExp("^hsla\\("+[hA,Tf,Tf,hA]+"\\)$"),aqt={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};mz(fA,Vg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:sqt,formatHex:sqt,formatHsl:rRe,formatRgb:lqt,toString:lqt});mz(ml,Kw,Yrt(fA,{brighter:function(e){return e=e==null?_z:Math.pow(_z,e),new ml(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?uA:Math.pow(uA,e),new ml(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uqt,formatHex:uqt,formatRgb:hqt,toString:hqt}));mz(Ef,dqt,Yrt(fA,{brighter:function(e){return e=e==null?_z:Math.pow(_z,e),new Ef(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?uA:Math.pow(uA,e),new Ef(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new ml(Xrt(e>=240?e-240:e+120,i,n),Xrt(e,i,n),Xrt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var $rt=M(()=>{mqt()});function Krt(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function gqt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Krt((r-n/t)*t,a,i,o,s)}}var Zrt=M(()=>{});function _qt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Krt((r-n/t)*t,i,o,a,s)}}var yqt=M(()=>{Zrt()});function Jrt(e){return function(){return e}}var vqt=M(()=>{});function iRe(e,t){return function(r){return e+r*t}}function oRe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function xqt(e){return(e=+e)==1?yz:function(t,r){return r-t?oRe(t,r,e):Jrt(isNaN(t)?r:t)}}function yz(e,t){var r=t-e;return r?iRe(e,r):Jrt(isNaN(e)?t:e)}var bqt=M(()=>{vqt()});function wqt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=Kw(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var vz,aRe,sRe,Sqt=M(()=>{$rt();Zrt();yqt();bqt();vz=function e(t){var r=xqt(t);function n(i,o){var a=r((i=Kw(i)).r,(o=Kw(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=yz(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);aRe=wqt(gqt),sRe=wqt(_qt)});function Pc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var xz=M(()=>{});function lRe(e){return function(){return e}}function cRe(e){return function(t){return e(t)+""}}function ent(e,t){var r=tnt.lastIndex=Qrt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=tnt.exec(e))&&(i=Qrt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Pc(n,i)})),r=Qrt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?cRe(l[0].x):lRe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var tnt,Qrt,Mqt=M(()=>{xz();tnt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Qrt=new RegExp(tnt.source,"g")});function rnt(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Eqt,skewX:Math.atan(l)*Eqt,scaleX:a,scaleY:s}}var Eqt,bz,Tqt=M(()=>{Eqt=180/Math.PI,bz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function Aqt(e){return e==="none"?bz:(pA||(pA=document.createElement("DIV"),nnt=document.documentElement,Cqt=document.defaultView),pA.style.transform=e,e=Cqt.getComputedStyle(nnt.appendChild(pA),null).getPropertyValue("transform"),nnt.removeChild(pA),e=e.slice(7,-1).split(","),rnt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Pqt(e){return e==null?bz:(wz||(wz=document.createElementNS("http://www.w3.org/2000/svg","g")),wz.setAttribute("transform",e),(e=wz.transform.baseVal.consolidate())?(e=e.matrix,rnt(e.a,e.b,e.c,e.d,e.e,e.f)):bz)}var pA,nnt,Cqt,wz,Iqt=M(()=>{Tqt()});function Lqt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Pc(c,h)},{i:g-2,x:Pc(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Pc(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Pc(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Pc(c,h)},{i:g-2,x:Pc(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var int,ont,kqt=M(()=>{xz();Iqt();int=Lqt(Aqt,"px, ","px)","deg)"),ont=Lqt(Pqt,", ",")",")")});var Sz=M(()=>{xz();Mqt();kqt();Sqt()});function uRe(e,t){var r,n;return function(){var i=Du(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function hRe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Du(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function Rqt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=io(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?uRe:hRe)(r,e,t))}function Zw(e,t,r){var n=e._id;return e.each(function(){var i=Du(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return io(i,n).value[t]}}var dA=M(()=>{Ac()});function Mz(e,t){var r;return(typeof t=="number"?Pc:t instanceof Vg?vz:(r=Vg(t))?(t=r,vz):ent)(e,t)}var ant=M(()=>{$rt();Sz()});function fRe(e){return function(){this.removeAttribute(e)}}function pRe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function dRe(e,t,r){var n,i;return function(){var o=this.getAttribute(e);return o===r?null:o===n?i:i=t(n=o,r)}}function mRe(e,t,r){var n,i;return function(){var o=this.getAttributeNS(e.space,e.local);return o===r?null:o===n?i:i=t(n=o,r)}}function gRe(e,t,r){var n,i,o;return function(){var a,s=r(this);return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),a===s?null:a===n&&s===i?o:o=t(n=a,i=s))}}function _Re(e,t,r){var n,i,o;return function(){var a,s=r(this);return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),a===s?null:a===n&&s===i?o:o=t(n=a,i=s))}}function Nqt(e,t){var r=ld(e),n=r==="transform"?ont:Mz;return this.attrTween(e,typeof t=="function"?(r.local?_Re:gRe)(r,n,Zw(this,"attr."+e,t)):t==null?(r.local?pRe:fRe)(r):(r.local?mRe:dRe)(r,n,t+""))}var Dqt=M(()=>{Sz();Mf();dA();ant()});function yRe(e,t){function r(){var n=this,i=t.apply(n,arguments);return i&&function(o){n.setAttributeNS(e.space,e.local,i(o))}}return r._value=t,r}function vRe(e,t){function r(){var n=this,i=t.apply(n,arguments);return i&&function(o){n.setAttribute(e,i(o))}}return r._value=t,r}function Oqt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=ld(e);return this.tween(r,(n.local?yRe:vRe)(n,t))}var zqt=M(()=>{Mf()});function xRe(e,t){return function(){cA(this,e).delay=+t.apply(this,arguments)}}function bRe(e,t){return t=+t,function(){cA(this,e).delay=t}}function Fqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xRe:bRe)(t,e)):io(this.node(),t).delay}var Bqt=M(()=>{Ac()});function wRe(e,t){return function(){Du(this,e).duration=+t.apply(this,arguments)}}function SRe(e,t){return t=+t,function(){Du(this,e).duration=t}}function Hqt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?wRe:SRe)(t,e)):io(this.node(),t).duration}var Vqt=M(()=>{Ac()});function MRe(e,t){if(typeof t!="function")throw new Error;return function(){Du(this,e).ease=t}}function Uqt(e){var t=this._id;return arguments.length?this.each(MRe(t,e)):io(this.node(),t).ease}var qqt=M(()=>{Ac()});function Gqt(e){typeof e!="function"&&(e=tA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Uo(n,this._parents,this._name,this._id)}var Wqt=M(()=>{Mf();ud()});function Yqt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Uo(a,this._parents,this._name,this._id)}var jqt=M(()=>{ud()});function ERe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function TRe(e,t,r){var n,i,o=ERe(t)?cA:Du;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function Xqt(e,t){var r=this._id;return arguments.length<2?io(this.node(),r).on.on(e):this.each(TRe(r,e,t))}var $qt=M(()=>{Ac()});function CRe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function Kqt(){return this.on("end.remove",CRe(this._id))}var Zqt=M(()=>{});function Jqt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=wv(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Hg(c[f],t,r,f,c,io(u,r)));return new Uo(o,this._parents,t,r)}var Qqt=M(()=>{Mf();ud();Ac()});function tGt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=QC(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=io(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Hg(p,t,r,g,f,d);o.push(f),a.push(u)}return new Uo(o,a,t,r)}var eGt=M(()=>{Mf();ud();Ac()});function rGt(){return new ARe(this._groups,this._parents)}var ARe,nGt=M(()=>{Mf();ARe=cd.prototype.constructor});function PRe(e,t){var r,n,i;return function(){var o=Bg(this,e),a=(this.style.removeProperty(e),Bg(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function IRe(e){return function(){this.style.removeProperty(e)}}function LRe(e,t,r){var n,i;return function(){var o=Bg(this,e);return o===r?null:o===n?i:i=t(n=o,r)}}function kRe(e,t,r){var n,i,o;return function(){var a=Bg(this,e),s=r(this);return s==null&&(s=(this.style.removeProperty(e),Bg(this,e))),a===s?null:a===n&&s===i?o:o=t(n=a,i=s)}}function iGt(e,t,r){var n=(e+="")=="transform"?int:Mz;return t==null?this.styleTween(e,PRe(e,n)).on("end.style."+e,IRe(e)):this.styleTween(e,typeof t=="function"?kRe(e,n,Zw(this,"style."+e,t)):LRe(e,n,t+""),r)}var oGt=M(()=>{Sz();Mf();dA();ant()});function RRe(e,t,r){function n(){var i=this,o=t.apply(i,arguments);return o&&function(a){i.style.setProperty(e,o(a),r)}}return n._value=t,n}function aGt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,RRe(e,t,r==null?"":r))}var sGt=M(()=>{});function NRe(e){return function(){this.textContent=e}}function DRe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function lGt(e){return this.tween("text",typeof e=="function"?DRe(Zw(this,"text",e)):NRe(e==null?"":e+""))}var cGt=M(()=>{dA()});function uGt(){for(var e=this._name,t=this._id,r=Ez(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=io(l,t);Hg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Uo(n,this._parents,e,r)}var hGt=M(()=>{ud();Ac()});function Uo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Tz(e){return cd().transition(e)}function Ez(){return++ORe}var ORe,Jw,ud=M(()=>{Mf();Dqt();zqt();Bqt();Vqt();qqt();Wqt();jqt();$qt();Zqt();Qqt();eGt();nGt();oGt();sGt();cGt();hGt();dA();ORe=0;Jw=cd.prototype;Uo.prototype=Tz.prototype={constructor:Uo,select:Jqt,selectAll:tGt,filter:Gqt,merge:Yqt,selection:rGt,transition:uGt,call:Jw.call,nodes:Jw.nodes,node:Jw.node,size:Jw.size,empty:Jw.empty,each:Jw.each,on:Xqt,attr:Nqt,attrTween:Oqt,style:iGt,styleTween:aGt,text:lGt,remove:Kqt,tween:Rqt,delay:Fqt,duration:Hqt,ease:Uqt}});function zRe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return snt.time=Xw(),snt;return r}function fGt(e){var t,r;e instanceof Uo?(t=e._id,e=e._name):(t=Ez(),(r=snt).time=Xw(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Hg(l,e,t,c,a,r||zRe(l,t));return new Uo(n,this._parents,e,t)}var snt,pGt=M(()=>{ud();Ac();I_();qrt();snt={time:null,delay:0,duration:250,ease:xs}});var dGt=M(()=>{Mf();iqt();pGt();cd.prototype.interrupt=nqt;cd.prototype.transition=fGt});function mGt(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>fz&&n.name===t)return new Uo([[e]],FRe,t,+i)}return null}var FRe,gGt=M(()=>{ud();Ac();FRe=[null]});var _Gt=M(()=>{dGt();ud();gGt();Wrt()});function lnt(e){return function(){return e}}var yGt=M(()=>{});function vGt(e){return e[0]}function xGt(e){return e[1]}var bGt=M(()=>{});function cnt(){this._=null}function Qw(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function mA(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function gA(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function wGt(e){for(;e.L;)e=e.L;return e}var unt,Cz=M(()=>{cnt.prototype={constructor:cnt,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=wGt(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(mA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,gA(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(gA(this,r),e=r,r=e.U),r.C=!1,n.C=!0,mA(this,n))),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,r,n=e.L,i=e.R,o,a;if(n?i?o=wGt(i):o=n:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,n&&i?(a=o.C,o.C=e.C,o.L=n,n.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(r=t.R,r.C&&(r.C=!1,t.C=!0,mA(this,t),r=t.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,gA(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,mA(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,gA(this,t),r=t.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,mA(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,gA(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};unt=cnt});function tS(e,t,r,n){var i=[null,null],o=Ao.push(i)-1;return i.left=e,i.right=t,r&&_A(i,e,t,r),n&&_A(i,t,e,n),Za[e.index].halfedges.push(o),Za[t.index].halfedges.push(o),i}function eS(e,t,r){var n=[t,r];return n.left=e,n}function _A(e,t,r,n){!e[0]&&!e[1]?(e[0]=n,e.left=t,e.right=r):e.left===r?e[1]=n:e[0]=n}function BRe(e,t,r,n,i){var o=e[0],a=e[1],s=o[0],l=o[1],c=a[0],u=a[1],h=0,f=1,p=c-s,d=u-l,g;if(g=t-s,!(!p&&g>0)){if(g/=p,p<0){if(g<h)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>h&&(h=g)}if(g=n-s,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>h&&(h=g)}else if(p>0){if(g<h)return;g<f&&(f=g)}if(g=r-l,!(!d&&g>0)){if(g/=d,d<0){if(g<h)return;g<f&&(f=g)}else if(d>0){if(g>f)return;g>h&&(h=g)}if(g=i-l,!(!d&&g<0)){if(g/=d,d<0){if(g>f)return;g>h&&(h=g)}else if(d>0){if(g<h)return;g<f&&(f=g)}return!(h>0)&&!(f<1)||(h>0&&(e[0]=[s+h*p,l+h*d]),f<1&&(e[1]=[s+f*p,l+f*d])),!0}}}}}function HRe(e,t,r,n,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,c=s[0],u=s[1],h=l[0],f=l[1],p=(c+h)/2,d=(u+f)/2,g,_;if(f===u){if(p<t||p>=n)return;if(c>h){if(!a)a=[p,r];else if(a[1]>=i)return;o=[p,i]}else{if(!a)a=[p,i];else if(a[1]<r)return;o=[p,r]}}else if(g=(c-h)/(f-u),_=d-g*p,g<-1||g>1)if(c>h){if(!a)a=[(r-_)/g,r];else if(a[1]>=i)return;o=[(i-_)/g,i]}else{if(!a)a=[(i-_)/g,i];else if(a[1]<r)return;o=[(r-_)/g,r]}else if(u<f){if(!a)a=[t,g*t+_];else if(a[0]>=n)return;o=[n,g*n+_]}else{if(!a)a=[n,g*n+_];else if(a[0]<t)return;o=[t,g*t+_]}return e[0]=a,e[1]=o,!0}function SGt(e,t,r,n){for(var i=Ao.length,o;i--;)(!HRe(o=Ao[i],e,t,r,n)||!BRe(o,e,t,r,n)||!(Math.abs(o[0][0]-o[1][0])>Wr||Math.abs(o[0][1]-o[1][1])>Wr))&&delete Ao[i]}var Az=M(()=>{rS()});function MGt(e){return Za[e.index]={site:e,halfedges:[]}}function VRe(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function hnt(e,t){return t[+(t.left!==e.site)]}function URe(e,t){return t[+(t.left===e.site)]}function EGt(){for(var e=0,t=Za.length,r,n,i,o;e<t;++e)if((r=Za[e])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=VRe(r,Ao[n[i]]);for(a.sort(function(l,c){return s[c]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function TGt(e,t,r,n){var i=Za.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Za[o]){for(s=a.site,c=a.halfedges,l=c.length;l--;)Ao[c[l]]||c.splice(l,1);for(l=0,u=c.length;l<u;)d=URe(a,Ao[c[l]]),g=d[0],_=d[1],h=hnt(a,Ao[c[++l%u]]),f=h[0],p=h[1],(Math.abs(g-f)>Wr||Math.abs(_-p)>Wr)&&(c.splice(l,0,Ao.push(eS(s,d,Math.abs(g-e)<Wr&&n-_>Wr?[e,Math.abs(f-e)<Wr?p:n]:Math.abs(_-n)<Wr&&r-g>Wr?[Math.abs(p-n)<Wr?f:r,n]:Math.abs(g-r)<Wr&&_-t>Wr?[r,Math.abs(f-r)<Wr?p:t]:Math.abs(_-t)<Wr&&g-e>Wr?[Math.abs(p-t)<Wr?f:e,t]:null))-1),++u);u&&(y=!1)}if(y){var x,b,S,C=1/0;for(o=0,y=null;o<i;++o)(a=Za[o])&&(s=a.site,x=s[0]-e,b=s[1]-t,S=x*x+b*b,S<C&&(C=S,y=a));if(y){var P=[e,t],k=[e,n],O=[r,n],D=[r,t];y.halfedges.push(Ao.push(eS(s=y.site,P,k))-1,Ao.push(eS(s,k,O))-1,Ao.push(eS(s,O,D))-1,Ao.push(eS(s,D,P))-1)}}for(o=0;o<i;++o)(a=Za[o])&&(a.halfedges.length||delete Za[o])}var fnt=M(()=>{Az();rS()});function qRe(){Qw(this),this.x=this.y=this.arc=this.site=this.cy=null}function Mv(e){var t=e.P,r=e.N;if(!(!t||!r)){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,c=n[1]-s,u=o[0]-a,h=o[1]-s,f=2*(l*h-c*u);if(!(f>=-AGt)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=CGt.pop()||new qRe;y.arc=e,y.site=i,y.x=g+a,y.y=(y.cy=_+s)+Math.sqrt(g*g+_*_),e.circle=y;for(var x=null,b=nS._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x)if(b.L)b=b.L;else{x=b.P;break}else if(b.R)b=b.R;else{x=b;break}nS.insert(x,y),x||(Pz=y)}}}}function Ev(e){var t=e.circle;t&&(t.P||(Pz=t.N),nS.remove(t),CGt.push(t),Qw(t),e.circle=null)}var CGt,Pz,pnt=M(()=>{Cz();rS();CGt=[]});function GRe(){Qw(this),this.edge=this.site=this.circle=null}function PGt(e){var t=IGt.pop()||new GRe;return t.site=e,t}function dnt(e){Ev(e),Tv.remove(e),IGt.push(e),Qw(e)}function LGt(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];dnt(e);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<Wr&&Math.abs(n-l.circle.cy)<Wr;)o=l.P,s.unshift(l),dnt(l),l=o;s.unshift(l),Ev(l);for(var c=a;c.circle&&Math.abs(r-c.circle.x)<Wr&&Math.abs(n-c.circle.cy)<Wr;)a=c.N,s.push(c),dnt(c),c=a;s.push(c),Ev(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],_A(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=tS(l.site,c.site,null,i),Mv(l),Mv(c)}function kGt(e){for(var t=e[0],r=e[1],n,i,o,a,s=Tv._;s;)if(o=RGt(s,r)-t,o>Wr)s=s.L;else if(a=t-WRe(s,r),a>Wr){if(!s.R){n=s;break}s=s.R}else{o>-Wr?(n=s.P,i=s):a>-Wr?(n=s,i=s.N):n=i=s;break}MGt(e);var l=PGt(e);if(Tv.insert(n,l),!(!n&&!i)){if(n===i){Ev(n),i=PGt(n.site),Tv.insert(l,i),l.edge=i.edge=tS(n.site,l.site),Mv(n),Mv(i);return}if(!i){l.edge=tS(n.site,l.site);return}Ev(n),Ev(i);var c=n.site,u=c[0],h=c[1],f=e[0]-u,p=e[1]-h,d=i.site,g=d[0]-u,_=d[1]-h,y=2*(f*_-p*g),x=f*f+p*p,b=g*g+_*_,S=[(_*x-p*b)/y+u,(f*b-g*x)/y+h];_A(i.edge,c,d,S),l.edge=tS(c,e,null,S),i.edge=tS(e,d,null,S),Mv(n),Mv(i)}}function RGt(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],c=l-t;if(!c)return s;var u=s-n,h=1/o-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function WRe(e,t){var r=e.N;if(r)return RGt(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var IGt,NGt=M(()=>{Cz();fnt();pnt();Az();rS();IGt=[]});function YRe(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function jRe(e,t){return t[1]-e[1]||t[0]-e[0]}function yA(e,t){var r=e.sort(jRe).pop(),n,i,o;for(Ao=[],Za=new Array(e.length),Tv=new unt,nS=new unt;;)if(o=Pz,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(kGt(r),n=r[0],i=r[1]),r=e.pop();else if(o)LGt(o.arc);else break;if(EGt(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];SGt(a,s,l,c),TGt(a,s,l,c)}this.edges=Ao,this.cells=Za,Tv=nS=Ao=Za=null}var Wr,AGt,Tv,Za,nS,Ao,rS=M(()=>{NGt();fnt();pnt();Az();Cz();Wr=1e-6,AGt=1e-12;yA.prototype={constructor:yA,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return hnt(t,e[n])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,c=t[o[s-1]],u=c.left===i?c.right:c.left;++a<s;)l=u,c=t[o[a]],u=c.left===i?c.right:c.left,l&&u&&n<l.index&&n<u.index&&YRe(i,l,u)<0&&e.push([i.data,l.data,u.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],c=t-s.site[1],u=l*l+c*c;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(h){var f=n.edges[h],p=f.left;if(!((p===s.site||!p)&&!(p=f.right))){var d=e-p[0],g=t-p[1],_=d*d+g*g;_<u&&(u=_,o=p.index)}});while(o!==null);return n._found=i,r==null||u<=r*r?s.site:null}}});function DGt(){var e=vGt,t=xGt,r=null;function n(i){return new yA(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Wr)*Wr,Math.round(t(o,a,i)/Wr)*Wr];return s.index=a,s.data=o,s}),r)}return n.polygons=function(i){return n(i).polygons()},n.links=function(i){return n(i).links()},n.triangles=function(i){return n(i).triangles()},n.x=function(i){return arguments.length?(e=typeof i=="function"?i:lnt(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:lnt(+i),n):t},n.extent=function(i){return arguments.length?(r=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(i){return arguments.length?(r=i==null?null:[[0,0],[+i[0],+i[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}var OGt=M(()=>{yGt();bGt();rS()});var zGt=M(()=>{OGt()});function BGt(){for(var e=0,t=arguments.length,r={},n;e<t;++e){if(!(n=arguments[e]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Iz(r)}function Iz(e){this._=e}function $Re(e,t){return e.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!t.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}function KRe(e,t){for(var r=0,n=e.length,i;r<n;++r)if((i=e[r]).name===t)return i.value}function FGt(e,t,r){for(var n=0,i=e.length;n<i;++n)if(e[n].name===t){e[n]=XRe,e=e.slice(0,n).concat(e.slice(n+1));break}return r!=null&&e.push({name:t,value:r}),e}var XRe,vA,HGt=M(()=>{XRe={value:function(){}};Iz.prototype=BGt.prototype={constructor:Iz,on:function(e,t){var r=this._,n=$Re(e+"",r),i,o=-1,a=n.length;if(arguments.length<2){for(;++o<a;)if((i=(e=n[o]).type)&&(i=KRe(r[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++o<a;)if(i=(e=n[o]).type)r[i]=FGt(r[i],e.name,t);else if(t==null)for(i in r)r[i]=FGt(r[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var r in t)e[r]=t[r].slice();return new Iz(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,o;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(o=this._[e],n=0,i=o.length;n<i;++n)o[n].value.apply(t,r)},apply:function(e,t,r){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var n=this._[e],i=0,o=n.length;i<o;++i)n[i].value.apply(t,r)}};vA=BGt});var mnt=M(()=>{HGt()});var Lz,gnt,_nt=M(()=>{Lz="http://www.w3.org/1999/xhtml",gnt={svg:"http://www.w3.org/2000/svg",xhtml:Lz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"}});function hd(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),gnt.hasOwnProperty(t)?{space:gnt[t],local:e}:e}var kz=M(()=>{_nt()});function ZRe(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Lz&&t.documentElement.namespaceURI===Lz?t.createElement(e):t.createElementNS(r,e)}}function JRe(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rz(e){var t=hd(e);return(t.local?JRe:ZRe)(t)}var ynt=M(()=>{kz();_nt()});function QRe(){}function Cv(e){return e==null?QRe:function(){return this.querySelector(e)}}var Nz=M(()=>{});function VGt(e){typeof e!="function"&&(e=Cv(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new mi(n,this._parents)}var UGt=M(()=>{Ou();Nz()});function tNe(){return[]}function xA(e){return e==null?tNe:function(){return this.querySelectorAll(e)}}var vnt=M(()=>{});function qGt(e){typeof e!="function"&&(e=xA(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new mi(n,i)}var GGt=M(()=>{Ou();vnt()});function bA(e){return function(){return this.matches(e)}}var xnt=M(()=>{});function WGt(e){typeof e!="function"&&(e=bA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new mi(n,this._parents)}var YGt=M(()=>{Ou();xnt()});function Dz(e){return new Array(e.length)}var bnt=M(()=>{});function jGt(){return new mi(this._enter||this._groups.map(Dz),this._parents)}function wA(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var wnt=M(()=>{bnt();Ou();wA.prototype={constructor:wA,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}});function XGt(e){return function(){return e}}var $Gt=M(()=>{});function eNe(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new wA(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function rNe(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=KGt+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=KGt+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new wA(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function ZGt(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?rNe:eNe,n=this._parents,i=this._groups;typeof e!="function"&&(e=XGt(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new mi(a,n),a._enter=s,a._exit=l,a}var KGt,JGt=M(()=>{Ou();wnt();$Gt();KGt="$"});function QGt(){return new mi(this._exit||this._groups.map(Dz),this._parents)}var tWt=M(()=>{bnt();Ou()});function eWt(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}var rWt=M(()=>{});function nWt(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new mi(a,this._parents)}var iWt=M(()=>{Ou()});function oWt(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}var aWt=M(()=>{});function sWt(e){e||(e=nNe);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new mi(i,this._parents).order()}function nNe(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var lWt=M(()=>{Ou()});function cWt(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var uWt=M(()=>{});function hWt(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}var fWt=M(()=>{});function pWt(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}var dWt=M(()=>{});function mWt(){var e=0;return this.each(function(){++e}),e}var gWt=M(()=>{});function _Wt(){return!this.node()}var yWt=M(()=>{});function vWt(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}var xWt=M(()=>{});function iNe(e){return function(){this.removeAttribute(e)}}function oNe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function aNe(e,t){return function(){this.setAttribute(e,t)}}function sNe(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function lNe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function cNe(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function bWt(e,t){var r=hd(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?oNe:iNe:typeof t=="function"?r.local?cNe:lNe:r.local?sNe:aNe)(r,t))}var wWt=M(()=>{kz()});function Oz(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Snt=M(()=>{});function uNe(e){return function(){this.style.removeProperty(e)}}function hNe(e,t,r){return function(){this.style.setProperty(e,t,r)}}function fNe(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function SWt(e,t,r){return arguments.length>1?this.each((t==null?uNe:typeof t=="function"?fNe:hNe)(e,t,r==null?"":r)):Ug(this.node(),e)}function Ug(e,t){return e.style.getPropertyValue(t)||Oz(e).getComputedStyle(e,null).getPropertyValue(t)}var Mnt=M(()=>{Snt()});function pNe(e){return function(){delete this[e]}}function dNe(e,t){return function(){this[e]=t}}function mNe(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function MWt(e,t){return arguments.length>1?this.each((t==null?pNe:typeof t=="function"?mNe:dNe)(e,t)):this.node()[e]}var EWt=M(()=>{});function TWt(e){return e.trim().split(/^|\s+/)}function Ent(e){return e.classList||new CWt(e)}function CWt(e){this._node=e,this._names=TWt(e.getAttribute("class")||"")}function AWt(e,t){for(var r=Ent(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function PWt(e,t){for(var r=Ent(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function gNe(e){return function(){AWt(this,e)}}function _Ne(e){return function(){PWt(this,e)}}function yNe(e,t){return function(){(t.apply(this,arguments)?AWt:PWt)(this,e)}}function IWt(e,t){var r=TWt(e+"");if(arguments.length<2){for(var n=Ent(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?yNe:t?gNe:_Ne)(r,t))}var LWt=M(()=>{CWt.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}}});function vNe(){this.textContent=""}function xNe(e){return function(){this.textContent=e}}function bNe(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function kWt(e){return arguments.length?this.each(e==null?vNe:(typeof e=="function"?bNe:xNe)(e)):this.node().textContent}var RWt=M(()=>{});function wNe(){this.innerHTML=""}function SNe(e){return function(){this.innerHTML=e}}function MNe(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function NWt(e){return arguments.length?this.each(e==null?wNe:(typeof e=="function"?MNe:SNe)(e)):this.node().innerHTML}var DWt=M(()=>{});function ENe(){this.nextSibling&&this.parentNode.appendChild(this)}function OWt(){return this.each(ENe)}var zWt=M(()=>{});function TNe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function FWt(){return this.each(TNe)}var BWt=M(()=>{});function HWt(e){var t=typeof e=="function"?e:Rz(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var VWt=M(()=>{ynt()});function CNe(){return null}function UWt(e,t){var r=typeof e=="function"?e:Rz(e),n=t==null?CNe:typeof t=="function"?t:Cv(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var qWt=M(()=>{ynt();Nz()});function ANe(){var e=this.parentNode;e&&e.removeChild(this)}function GWt(){return this.each(ANe)}var WWt=M(()=>{});function PNe(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function INe(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function YWt(e){return this.select(e?INe:PNe)}var jWt=M(()=>{});function XWt(e){return arguments.length?this.property("__data__",e):this.node().__data__}var $Wt=M(()=>{});function LNe(e,t,r){return e=JWt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function JWt(e,t,r){return function(n){var i=Yr;Yr=n;try{e.call(this,this.__data__,t,r)}finally{Yr=i}}}function kNe(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function RNe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function NNe(e,t,r){var n=ZWt.hasOwnProperty(e.type)?LNe:JWt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function QWt(e,t,r){var n=kNe(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?NNe:RNe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Tnt(e,t,r,n){var i=Yr;e.sourceEvent=Yr,Yr=e;try{return t.apply(r,n)}finally{Yr=i}}var ZWt,Yr,KWt,zz=M(()=>{ZWt={},Yr=null;typeof document!="undefined"&&(KWt=document.documentElement,"onmouseenter"in KWt||(ZWt={mouseenter:"mouseover",mouseleave:"mouseout"}))});function tYt(e,t,r){var n=Oz(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function DNe(e,t){return function(){return tYt(this,e,t)}}function ONe(e,t){return function(){return tYt(this,e,t.apply(this,arguments))}}function eYt(e,t){return this.each((typeof t=="function"?ONe:DNe)(e,t))}var rYt=M(()=>{Snt()});function mi(e,t){this._groups=e,this._parents=t}function nYt(){return new mi([[document.documentElement]],Cnt)}var Cnt,fd,Ou=M(()=>{UGt();GGt();YGt();JGt();wnt();tWt();rWt();iWt();aWt();lWt();uWt();fWt();dWt();gWt();yWt();xWt();wWt();Mnt();EWt();LWt();RWt();DWt();zWt();BWt();VWt();qWt();WWt();jWt();$Wt();zz();rYt();Cnt=[null];mi.prototype=nYt.prototype={constructor:mi,select:VGt,selectAll:qGt,filter:WGt,data:ZGt,enter:jGt,exit:QGt,join:eWt,merge:nWt,order:oWt,sort:sWt,call:cWt,nodes:hWt,node:pWt,size:mWt,empty:_Wt,each:vWt,attr:bWt,style:SWt,property:MWt,classed:IWt,text:kWt,html:NWt,raise:OWt,lower:FWt,append:HWt,insert:UWt,remove:GWt,clone:YWt,datum:XWt,on:QWt,dispatch:eYt};fd=nYt});function pd(e){return typeof e=="string"?new mi([[document.querySelector(e)]],[document.documentElement]):new mi([[e]],Cnt)}var iYt=M(()=>{Ou()});function Fz(){for(var e=Yr,t;t=e.sourceEvent;)e=t;return e}var Ant=M(()=>{zz()});function Bz(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}var Pnt=M(()=>{});function iS(e){var t=Fz();return t.changedTouches&&(t=t.changedTouches[0]),Bz(e,t)}var oYt=M(()=>{Ant();Pnt()});function Hz(e,t,r){arguments.length<3&&(r=t,t=Fz().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Bz(e,o);return null}var aYt=M(()=>{Ant();Pnt()});var Is=M(()=>{xnt();oYt();kz();iYt();Ou();Nz();vnt();Mnt();aYt();zz()});function Vz(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var sYt=M(()=>{Is()});function Int(e){var t=e.document.documentElement,r=pd(e).on("dragstart.drag",Vz,!0);"onselectstart"in t?r.on("selectstart.drag",Vz,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Lnt(e,t){var r=e.document.documentElement,n=pd(e).on("dragstart.drag",null);t&&(n.on("click.drag",Vz,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}var lYt=M(()=>{Is();sYt()});var cYt=M(()=>{lYt()});function Uz(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function knt(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}var uYt=M(()=>{});function EA(){}function fYt(){return this.rgb().formatHex()}function GNe(){return yYt(this).formatHsl()}function pYt(){return this.rgb().formatRgb()}function qg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=zNe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?dYt(t):r===3?new gl(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?qz(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?qz(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=FNe.exec(e))?new gl(t[1],t[2],t[3],1):(t=BNe.exec(e))?new gl(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=HNe.exec(e))?qz(t[1],t[2],t[3],t[4]):(t=VNe.exec(e))?qz(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=UNe.exec(e))?_Yt(t[1],t[2]/100,t[3]/100,1):(t=qNe.exec(e))?_Yt(t[1],t[2]/100,t[3]/100,t[4]):hYt.hasOwnProperty(e)?dYt(hYt[e]):e==="transparent"?new gl(NaN,NaN,NaN,0):null}function dYt(e){return new gl(e>>16&255,e>>8&255,e&255,1)}function qz(e,t,r,n){return n<=0&&(e=t=r=NaN),new gl(e,t,r,n)}function WNe(e){return e instanceof EA||(e=qg(e)),e?(e=e.rgb(),new gl(e.r,e.g,e.b,e.opacity)):new gl}function aS(e,t,r,n){return arguments.length===1?WNe(e):new gl(e,t,r,n==null?1:n)}function gl(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function mYt(){return"#"+Rnt(this.r)+Rnt(this.g)+Rnt(this.b)}function gYt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function Rnt(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function _Yt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Cf(e,t,r,n)}function yYt(e){if(e instanceof Cf)return new Cf(e.h,e.s,e.l,e.opacity);if(e instanceof EA||(e=qg(e)),!e)return new Cf;if(e instanceof Cf)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Cf(a,s,l,e.opacity)}function vYt(e,t,r,n){return arguments.length===1?yYt(e):new Cf(e,t,r,n==null?1:n)}function Cf(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function Nnt(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var SA,Gz,oS,MA,Af,zNe,FNe,BNe,HNe,VNe,UNe,qNe,hYt,xYt=M(()=>{uYt();SA=.7,Gz=1/SA,oS="\\s*([+-]?\\d+)\\s*",MA="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Af="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",zNe=/^#([0-9a-f]{3,8})$/,FNe=new RegExp("^rgb\\("+[oS,oS,oS]+"\\)$"),BNe=new RegExp("^rgb\\("+[Af,Af,Af]+"\\)$"),HNe=new RegExp("^rgba\\("+[oS,oS,oS,MA]+"\\)$"),VNe=new RegExp("^rgba\\("+[Af,Af,Af,MA]+"\\)$"),UNe=new RegExp("^hsl\\("+[MA,Af,Af]+"\\)$"),qNe=new RegExp("^hsla\\("+[MA,Af,Af,MA]+"\\)$"),hYt={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};Uz(EA,qg,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:fYt,formatHex:fYt,formatHsl:GNe,formatRgb:pYt,toString:pYt});Uz(gl,aS,knt(EA,{brighter:function(e){return e=e==null?Gz:Math.pow(Gz,e),new gl(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?SA:Math.pow(SA,e),new gl(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mYt,formatHex:mYt,formatRgb:gYt,toString:gYt}));Uz(Cf,vYt,knt(EA,{brighter:function(e){return e=e==null?Gz:Math.pow(Gz,e),new Cf(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?SA:Math.pow(SA,e),new Cf(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new gl(Nnt(e>=240?e-240:e+120,i,n),Nnt(e,i,n),Nnt(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}))});var Dnt=M(()=>{xYt()});function Ont(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function bYt(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return Ont((r-n/t)*t,a,i,o,s)}}var znt=M(()=>{});function wYt(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return Ont((r-n/t)*t,i,o,a,s)}}var SYt=M(()=>{znt()});function Fnt(e){return function(){return e}}var MYt=M(()=>{});function YNe(e,t){return function(r){return e+r*t}}function jNe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function EYt(e){return(e=+e)==1?Wz:function(t,r){return r-t?jNe(t,r,e):Fnt(isNaN(t)?r:t)}}function Wz(e,t){var r=t-e;return r?YNe(e,r):Fnt(isNaN(e)?t:e)}var TYt=M(()=>{MYt()});function CYt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=aS(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var Yz,XNe,$Ne,AYt=M(()=>{Dnt();znt();SYt();TYt();Yz=function e(t){var r=EYt(t);function n(i,o){var a=r((i=aS(i)).r,(o=aS(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Wz(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);XNe=CYt(bYt),$Ne=CYt(wYt)});function Ic(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var jz=M(()=>{});function KNe(e){return function(){return e}}function ZNe(e){return function(t){return e(t)+""}}function Vnt(e,t){var r=Hnt.lastIndex=Bnt.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Hnt.exec(e))&&(i=Bnt.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ic(n,i)})),r=Bnt.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?ZNe(l[0].x):KNe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}var Hnt,Bnt,PYt=M(()=>{jz();Hnt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bnt=new RegExp(Hnt.source,"g")});function Unt(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*IYt,skewX:Math.atan(l)*IYt,scaleX:a,scaleY:s}}var IYt,Xz,LYt=M(()=>{IYt=180/Math.PI,Xz={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function RYt(e){return e==="none"?Xz:(TA||(TA=document.createElement("DIV"),qnt=document.documentElement,kYt=document.defaultView),TA.style.transform=e,e=kYt.getComputedStyle(qnt.appendChild(TA),null).getPropertyValue("transform"),qnt.removeChild(TA),e=e.slice(7,-1).split(","),Unt(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function NYt(e){return e==null?Xz:($z||($z=document.createElementNS("http://www.w3.org/2000/svg","g")),$z.setAttribute("transform",e),(e=$z.transform.baseVal.consolidate())?(e=e.matrix,Unt(e.a,e.b,e.c,e.d,e.e,e.f)):Xz)}var TA,qnt,kYt,$z,DYt=M(()=>{LYt()});function OYt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:Ic(c,h)},{i:g-2,x:Ic(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:Ic(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:Ic(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:Ic(c,h)},{i:g-2,x:Ic(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var Gnt,Wnt,zYt=M(()=>{jz();DYt();Gnt=OYt(RYt,"px, ","px)","deg)"),Wnt=OYt(NYt,", ",")",")")});function BYt(e){return((e=Math.exp(e))+1/e)/2}function QNe(e){return((e=Math.exp(e))-1/e)/2}function tDe(e){return((e=Math.exp(2*e))-1)/(e+1)}function jnt(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<JNe)f=Math.log(s/i)/CA,h=function(x){return[r+x*l,n+x*c,i*Math.exp(CA*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+FYt*u)/(2*i*Ynt*p),g=(s*s-i*i-FYt*u)/(2*s*Ynt*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/CA,h=function(x){var b=x*f,S=BYt(_),C=i/(Ynt*p)*(S*tDe(CA*b+_)-QNe(_));return[r+C*l,n+C*c,i*S/BYt(CA*b+_)]}}return h.duration=f*1e3,h}var CA,Ynt,FYt,JNe,HYt=M(()=>{CA=Math.SQRT2,Ynt=2,FYt=4,JNe=1e-12});var AA=M(()=>{jz();PYt();zYt();HYt();AYt()});function lS(){return Av||(qYt(eDe),Av=kA.now()+Jz)}function eDe(){Av=0}function RA(){this._call=this._time=this._next=null}function Qz(e,t,r){var n=new RA;return n.restart(e,t,r),n}function GYt(){lS(),++sS;for(var e=Kz,t;e;)(t=Av-e._time)>=0&&e._call.call(null,t),e=e._next;--sS}function VYt(){Av=(Zz=kA.now())+Jz,sS=IA=0;try{GYt()}finally{sS=0,nDe(),Av=0}}function rDe(){var e=kA.now(),t=e-Zz;t>UYt&&(Jz-=t,Zz=e)}function nDe(){for(var e,t=Kz,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:Kz=r);LA=e,Xnt(n)}function Xnt(e){if(!sS){IA&&(IA=clearTimeout(IA));var t=e-Av;t>24?(e<1/0&&(IA=setTimeout(VYt,e-kA.now()-Jz)),PA&&(PA=clearInterval(PA))):(PA||(Zz=kA.now(),PA=setInterval(rDe,UYt)),sS=1,qYt(VYt))}}var sS,IA,PA,UYt,Kz,LA,Zz,Av,Jz,kA,qYt,$nt=M(()=>{sS=0,IA=0,PA=0,UYt=1e3,Zz=0,Av=0,Jz=0,kA=typeof performance=="object"&&performance.now?performance:Date,qYt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};RA.prototype=Qz.prototype={constructor:RA,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?lS():+r)+(t==null?0:+t),!this._next&&LA!==this&&(LA?LA._next=this:Kz=this,LA=this),this._call=e,this._time=r,Xnt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xnt())}}});function tF(e,t,r){var n=new RA;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}var WYt=M(()=>{$nt()});var Knt=M(()=>{$nt();WYt()});function Gg(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;aDe(e,r,{name:t,index:n,group:i,on:iDe,tween:oDe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jYt})}function DA(e,t){var r=oo(e,t);if(r.state>jYt)throw new Error("too late; already scheduled");return r}function Ja(e,t){var r=oo(e,t);if(r.state>eF)throw new Error("too late; already running");return r}function oo(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function aDe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=Qz(o,0,r.time);function o(c){r.state=Znt,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==Znt)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===eF)return tF(a);p.state===YYt?(p.state=NA,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=NA,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(tF(function(){r.state===eF&&(r.state=YYt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=rF,r.on.call("start",e,e.__data__,r.index,r.group),r.state===rF){for(r.state=eF,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=nF,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===nF&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=NA,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}var iDe,oDe,jYt,Znt,rF,eF,YYt,nF,NA,Ls=M(()=>{mnt();Knt();iDe=vA("start","end","cancel","interrupt"),oDe=[],jYt=0,Znt=1,rF=2,eF=3,YYt=4,nF=5,NA=6});function Pv(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>rF&&n.state<nF,n.state=NA,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}var Jnt=M(()=>{Ls()});function XYt(e){return this.each(function(){Pv(this,e)})}var $Yt=M(()=>{Jnt()});function sDe(e,t){var r,n;return function(){var i=Ja(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function lDe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Ja(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function KYt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=oo(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?sDe:lDe)(r,e,t))}function cS(e,t,r){var n=e._id;return e.each(function(){var i=Ja(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return oo(i,n).value[t]}}var OA=M(()=>{Ls()});function iF(e,t){var r;return(typeof t=="number"?Ic:t instanceof qg?Yz:(r=qg(t))?(t=r,Yz):Vnt)(e,t)}var Qnt=M(()=>{Dnt();AA()});function cDe(e){return function(){this.removeAttribute(e)}}function uDe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function hDe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function fDe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function pDe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function dDe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function ZYt(e,t){var r=hd(e),n=r==="transform"?Wnt:iF;return this.attrTween(e,typeof t=="function"?(r.local?dDe:pDe)(r,n,cS(this,"attr."+e,t)):t==null?(r.local?uDe:cDe)(r):(r.local?fDe:hDe)(r,n,t))}var JYt=M(()=>{AA();Is();OA();Qnt()});function mDe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function gDe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function _De(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&gDe(e,o)),r}return i._value=t,i}function yDe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&mDe(e,o)),r}return i._value=t,i}function QYt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=hd(e);return this.tween(r,(n.local?_De:yDe)(n,t))}var tjt=M(()=>{Is()});function vDe(e,t){return function(){DA(this,e).delay=+t.apply(this,arguments)}}function xDe(e,t){return t=+t,function(){DA(this,e).delay=t}}function ejt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?vDe:xDe)(t,e)):oo(this.node(),t).delay}var rjt=M(()=>{Ls()});function bDe(e,t){return function(){Ja(this,e).duration=+t.apply(this,arguments)}}function wDe(e,t){return t=+t,function(){Ja(this,e).duration=t}}function njt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?bDe:wDe)(t,e)):oo(this.node(),t).duration}var ijt=M(()=>{Ls()});function SDe(e,t){if(typeof t!="function")throw new Error;return function(){Ja(this,e).ease=t}}function ojt(e){var t=this._id;return arguments.length?this.each(SDe(t,e)):oo(this.node(),t).ease}var ajt=M(()=>{Ls()});function sjt(e){typeof e!="function"&&(e=bA(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new da(n,this._parents,this._name,this._id)}var ljt=M(()=>{Is();dd()});function cjt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new da(a,this._parents,this._name,this._id)}var ujt=M(()=>{dd()});function MDe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function EDe(e,t,r){var n,i,o=MDe(t)?DA:Ja;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function hjt(e,t){var r=this._id;return arguments.length<2?oo(this.node(),r).on.on(e):this.each(EDe(r,e,t))}var fjt=M(()=>{Ls()});function TDe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function pjt(){return this.on("end.remove",TDe(this._id))}var djt=M(()=>{});function mjt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Cv(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Gg(c[f],t,r,f,c,oo(u,r)));return new da(o,this._parents,t,r)}var gjt=M(()=>{Is();dd();Ls()});function _jt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=xA(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=oo(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Gg(p,t,r,g,f,d);o.push(f),a.push(u)}return new da(o,a,t,r)}var yjt=M(()=>{Is();dd();Ls()});function vjt(){return new CDe(this._groups,this._parents)}var CDe,xjt=M(()=>{Is();CDe=fd.prototype.constructor});function ADe(e,t){var r,n,i;return function(){var o=Ug(this,e),a=(this.style.removeProperty(e),Ug(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function bjt(e){return function(){this.style.removeProperty(e)}}function PDe(e,t,r){var n,i=r+"",o;return function(){var a=Ug(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function IDe(e,t,r){var n,i,o;return function(){var a=Ug(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Ug(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function LDe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Ja(this,e),c=l.on,u=l.value[o]==null?s||(s=bjt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function wjt(e,t,r){var n=(e+="")=="transform"?Gnt:iF;return t==null?this.styleTween(e,ADe(e,n)).on("end.style."+e,bjt(e)):typeof t=="function"?this.styleTween(e,IDe(e,n,cS(this,"style."+e,t))).each(LDe(this._id,e)):this.styleTween(e,PDe(e,n,t),r).on("end.style."+e,null)}var Sjt=M(()=>{AA();Is();Ls();OA();Qnt()});function kDe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function RDe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&kDe(e,a,r)),n}return o._value=t,o}function Mjt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,RDe(e,t,r==null?"":r))}var Ejt=M(()=>{});function NDe(e){return function(){this.textContent=e}}function DDe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Tjt(e){return this.tween("text",typeof e=="function"?DDe(cS(this,"text",e)):NDe(e==null?"":e+""))}var Cjt=M(()=>{OA()});function ODe(e){return function(t){this.textContent=e.call(this,t)}}function zDe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&ODe(i)),t}return n._value=e,n}function Ajt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,zDe(e))}var Pjt=M(()=>{});function Ijt(){for(var e=this._name,t=this._id,r=oF(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=oo(l,t);Gg(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new da(n,this._parents,e,r)}var Ljt=M(()=>{dd();Ls()});function kjt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=Ja(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var Rjt=M(()=>{Ls()});function da(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function tit(e){return fd().transition(e)}function oF(){return++FDe}var FDe,uS,dd=M(()=>{Is();JYt();tjt();rjt();ijt();ajt();ljt();ujt();fjt();djt();gjt();yjt();xjt();Sjt();Ejt();Cjt();Pjt();Ljt();OA();Rjt();FDe=0;uS=fd.prototype;da.prototype=tit.prototype={constructor:da,select:mjt,selectAll:_jt,filter:sjt,merge:cjt,selection:vjt,transition:Ijt,call:uS.call,nodes:uS.nodes,node:uS.node,size:uS.size,empty:uS.empty,each:uS.each,on:hjt,attr:ZYt,attrTween:QYt,style:wjt,styleTween:Mjt,text:Tjt,textTween:Ajt,remove:pjt,tween:KYt,delay:ejt,duration:njt,ease:ojt,end:kjt}});function BDe(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return eit.time=lS(),eit;return r}function Njt(e){var t,r;e instanceof da?(t=e._id,e=e._name):(t=oF(),(r=eit).time=lS(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Gg(l,e,t,c,a,r||BDe(l,t));return new da(n,this._parents,e,t)}var eit,Djt=M(()=>{dd();Ls();I_();Knt();eit={time:null,delay:0,duration:250,ease:xs}});var Ojt=M(()=>{Is();$Yt();Djt();fd.prototype.interrupt=XYt;fd.prototype.transition=Njt});var zjt=M(()=>{dd();Ls()});var Fjt=M(()=>{Ojt();dd();zjt();Jnt()});function zA(e){return function(){return e}}var Bjt=M(()=>{});function rit(e,t,r){this.target=e,this.type=t,this.transform=r}var Hjt=M(()=>{});function Pf(e,t,r){this.k=e,this.x=t,this.y=r}function aF(e){return e.__zoom||hS}var hS,nit=M(()=>{Pf.prototype={constructor:Pf,scale:function(e){return e===1?this:new Pf(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Pf(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};hS=new Pf(1,0,0);aF.prototype=Pf.prototype});function sF(){Yr.stopImmediatePropagation()}function fS(){Yr.preventDefault(),Yr.stopImmediatePropagation()}var Vjt=M(()=>{Is()});function HDe(){return!Yr.button}function VDe(){var e=this,t,r;return e instanceof SVGElement?(e=e.ownerSVGElement||e,t=e.width.baseVal.value,r=e.height.baseVal.value):(t=e.clientWidth,r=e.clientHeight),[[0,0],[t,r]]}function Ujt(){return this.__zoom||hS}function UDe(){return-Yr.deltaY*(Yr.deltaMode?120:1)/500}function qDe(){return"ontouchstart"in this}function GDe(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function qjt(){var e=HDe,t=VDe,r=GDe,n=UDe,i=qDe,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=jnt,c=[],u=vA("start","zoom","end"),h,f,p=500,d=150,g=0;function _(R){R.property("__zoom",Ujt).on("wheel.zoom",k).on("mousedown.zoom",O).on("dblclick.zoom",D).filter(i).on("touchstart.zoom",B).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",L).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}_.transform=function(R,F){var z=R.selection?R.selection():R;z.property("__zoom",Ujt),R!==z?S(R,F):z.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof F=="function"?F.apply(this,arguments):F).end()})},_.scaleBy=function(R,F){_.scaleTo(R,function(){var z=this.__zoom.k,U=typeof F=="function"?F.apply(this,arguments):F;return z*U})},_.scaleTo=function(R,F){_.transform(R,function(){var z=t.apply(this,arguments),U=this.__zoom,W=b(z),Z=U.invert(W),rt=typeof F=="function"?F.apply(this,arguments):F;return r(x(y(U,rt),W,Z),z,a)})},_.translateBy=function(R,F,z){_.transform(R,function(){return r(this.__zoom.translate(typeof F=="function"?F.apply(this,arguments):F,typeof z=="function"?z.apply(this,arguments):z),t.apply(this,arguments),a)})},_.translateTo=function(R,F,z){_.transform(R,function(){var U=t.apply(this,arguments),W=this.__zoom,Z=b(U);return r(hS.translate(Z[0],Z[1]).scale(W.k).translate(typeof F=="function"?-F.apply(this,arguments):-F,typeof z=="function"?-z.apply(this,arguments):-z),U,a)})};function y(R,F){return F=Math.max(o[0],Math.min(o[1],F)),F===R.k?R:new Pf(F,R.x,R.y)}function x(R,F,z){var U=F[0]-z[0]*R.k,W=F[1]-z[1]*R.k;return U===R.x&&W===R.y?R:new Pf(R.k,U,W)}function b(R){return[(+R[0][0]+ +R[1][0])/2,(+R[0][1]+ +R[1][1])/2]}function S(R,F,z){R.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var U=this,W=arguments,Z=C(U,W),rt=t.apply(U,W),ot=z||b(rt),st=Math.max(rt[1][0]-rt[0][0],rt[1][1]-rt[0][1]),St=U.__zoom,bt=typeof F=="function"?F.apply(U,W):F,Mt=l(St.invert(ot).concat(st/St.k),bt.invert(ot).concat(st/bt.k));return function(lt){if(lt===1)lt=bt;else{var Kt=Mt(lt),_t=st/Kt[2];lt=new Pf(_t,ot[0]-Kt[0]*_t,ot[1]-Kt[1]*_t)}Z.zoom(null,lt)}})}function C(R,F){for(var z=0,U=c.length,W;z<U;++z)if((W=c[z]).that===R)return W;return new P(R,F)}function P(R,F){this.that=R,this.args=F,this.index=-1,this.active=0,this.extent=t.apply(R,F)}P.prototype={start:function(){return++this.active===1&&(this.index=c.push(this)-1,this.emit("start")),this},zoom:function(R,F){return this.mouse&&R!=="mouse"&&(this.mouse[1]=F.invert(this.mouse[0])),this.touch0&&R!=="touch"&&(this.touch0[1]=F.invert(this.touch0[0])),this.touch1&&R!=="touch"&&(this.touch1[1]=F.invert(this.touch1[0])),this.that.__zoom=F,this.emit("zoom"),this},end:function(){return--this.active===0&&(c.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(R){Tnt(new rit(_,R,this.that.__zoom),u.apply,u,[R,this.that,this.args])}};function k(){if(!e.apply(this,arguments))return;var R=C(this,arguments),F=this.__zoom,z=Math.max(o[0],Math.min(o[1],F.k*Math.pow(2,n.apply(this,arguments)))),U=iS(this);if(R.wheel)(R.mouse[0][0]!==U[0]||R.mouse[0][1]!==U[1])&&(R.mouse[1]=F.invert(R.mouse[0]=U)),clearTimeout(R.wheel);else{if(F.k===z)return;R.mouse=[U,F.invert(U)],Pv(this),R.start()}fS(),R.wheel=setTimeout(W,d),R.zoom("mouse",r(x(y(F,z),R.mouse[0],R.mouse[1]),R.extent,a));function W(){R.wheel=null,R.end()}}function O(){if(f||!e.apply(this,arguments))return;var R=C(this,arguments),F=pd(Yr.view).on("mousemove.zoom",Z,!0).on("mouseup.zoom",rt,!0),z=iS(this),U=Yr.clientX,W=Yr.clientY;Int(Yr.view),sF(),R.mouse=[z,this.__zoom.invert(z)],Pv(this),R.start();function Z(){if(fS(),!R.moved){var ot=Yr.clientX-U,st=Yr.clientY-W;R.moved=ot*ot+st*st>g}R.zoom("mouse",r(x(R.that.__zoom,R.mouse[0]=iS(R.that),R.mouse[1]),R.extent,a))}function rt(){F.on("mousemove.zoom mouseup.zoom",null),Lnt(Yr.view,R.moved),fS(),R.end()}}function D(){if(!!e.apply(this,arguments)){var R=this.__zoom,F=iS(this),z=R.invert(F),U=R.k*(Yr.shiftKey?.5:2),W=r(x(y(R,U),F,z),t.apply(this,arguments),a);fS(),s>0?pd(this).transition().duration(s).call(S,W,F):pd(this).call(_.transform,W)}}function B(){if(!!e.apply(this,arguments)){var R=C(this,arguments),F=Yr.changedTouches,z,U=F.length,W,Z,rt;for(sF(),W=0;W<U;++W)Z=F[W],rt=Hz(this,F,Z.identifier),rt=[rt,this.__zoom.invert(rt),Z.identifier],R.touch0?R.touch1||(R.touch1=rt):(R.touch0=rt,z=!0);if(h&&(h=clearTimeout(h),!R.touch1)){R.end(),rt=pd(this).on("dblclick.zoom"),rt&&rt.apply(this,arguments);return}z&&(h=setTimeout(function(){h=null},p),Pv(this),R.start())}}function I(){var R=C(this,arguments),F=Yr.changedTouches,z=F.length,U,W,Z,rt;for(fS(),h&&(h=clearTimeout(h)),U=0;U<z;++U)W=F[U],Z=Hz(this,F,W.identifier),R.touch0&&R.touch0[2]===W.identifier?R.touch0[0]=Z:R.touch1&&R.touch1[2]===W.identifier&&(R.touch1[0]=Z);if(W=R.that.__zoom,R.touch1){var ot=R.touch0[0],st=R.touch0[1],St=R.touch1[0],bt=R.touch1[1],Mt=(Mt=St[0]-ot[0])*Mt+(Mt=St[1]-ot[1])*Mt,lt=(lt=bt[0]-st[0])*lt+(lt=bt[1]-st[1])*lt;W=y(W,Math.sqrt(Mt/lt)),Z=[(ot[0]+St[0])/2,(ot[1]+St[1])/2],rt=[(st[0]+bt[0])/2,(st[1]+bt[1])/2]}else if(R.touch0)Z=R.touch0[0],rt=R.touch0[1];else return;R.zoom("touch",r(x(W,Z,rt),R.extent,a))}function L(){var R=C(this,arguments),F=Yr.changedTouches,z=F.length,U,W;for(sF(),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),U=0;U<z;++U)W=F[U],R.touch0&&R.touch0[2]===W.identifier?delete R.touch0:R.touch1&&R.touch1[2]===W.identifier&&delete R.touch1;R.touch1&&!R.touch0&&(R.touch0=R.touch1,delete R.touch1),R.touch0?R.touch0[1]=this.__zoom.invert(R.touch0[0]):R.end()}return _.wheelDelta=function(R){return arguments.length?(n=typeof R=="function"?R:zA(+R),_):n},_.filter=function(R){return arguments.length?(e=typeof R=="function"?R:zA(!!R),_):e},_.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:zA(!!R),_):i},_.extent=function(R){return arguments.length?(t=typeof R=="function"?R:zA([[+R[0][0],+R[0][1]],[+R[1][0],+R[1][1]]]),_):t},_.scaleExtent=function(R){return arguments.length?(o[0]=+R[0],o[1]=+R[1],_):[o[0],o[1]]},_.translateExtent=function(R){return arguments.length?(a[0][0]=+R[0][0],a[1][0]=+R[1][0],a[0][1]=+R[0][1],a[1][1]=+R[1][1],_):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},_.constrain=function(R){return arguments.length?(r=R,_):r},_.duration=function(R){return arguments.length?(s=+R,_):s},_.interpolate=function(R){return arguments.length?(l=R,_):l},_.on=function(){var R=u.on.apply(u,arguments);return R===u?_:R},_.clickDistance=function(R){return arguments.length?(g=(R=+R)*R,_):Math.sqrt(g)},_}var Gjt=M(()=>{mnt();cYt();AA();Is();Fjt();Bjt();Hjt();nit();Vjt()});var Wjt=M(()=>{Gjt();nit()});var Mr={};Ks(Mr,{active:()=>mGt,arc:()=>gFt,area:()=>b7,areaRadial:()=>ket,ascending:()=>_c,axisBottom:()=>ZMt,axisLeft:()=>JMt,axisRight:()=>KMt,axisTop:()=>$Mt,bisect:()=>sR,bisectLeft:()=>sMt,bisectRight:()=>x$,bisector:()=>aR,brush:()=>yCt,brushSelection:()=>mCt,brushX:()=>gCt,brushY:()=>_Ct,chord:()=>UCt,clientPoint:()=>Dg,cluster:()=>GLt,color:()=>x2,create:()=>tFt,creator:()=>Ng,cross:()=>cMt,csv:()=>pNt,csvFormat:()=>yPt,csvFormatRows:()=>vPt,csvParse:()=>gPt,csvParseRows:()=>_Pt,cubehelix:()=>uN,curveBasis:()=>OFt,curveBasisClosed:()=>FFt,curveBasisOpen:()=>VFt,curveBundle:()=>GFt,curveCardinal:()=>YFt,curveCardinalClosed:()=>jFt,curveCardinalOpen:()=>XFt,curveCatmullRom:()=>KFt,curveCatmullRomClosed:()=>JFt,curveCatmullRomOpen:()=>eBt,curveLinear:()=>Fg,curveLinearClosed:()=>iBt,curveMonotoneX:()=>hBt,curveMonotoneY:()=>fBt,curveNatural:()=>gBt,curveStep:()=>yBt,curveStepAfter:()=>xBt,curveStepBefore:()=>vBt,customEvent:()=>Xzt,descending:()=>hMt,deviation:()=>cR,dispatch:()=>kAt,drag:()=>hPt,dragDisable:()=>EN,dragEnable:()=>TN,dsvFormat:()=>w2,easeBack:()=>OZ,easeBackIn:()=>JPt,easeBackInOut:()=>OZ,easeBackOut:()=>QPt,easeBounce:()=>S2,easeBounceIn:()=>$Pt,easeBounceInOut:()=>KPt,easeBounceOut:()=>S2,easeCircle:()=>RZ,easeCircleIn:()=>YPt,easeCircleInOut:()=>RZ,easeCircleOut:()=>jPt,easeCubic:()=>AZ,easeCubicIn:()=>kPt,easeCubicInOut:()=>AZ,easeCubicOut:()=>RPt,easeElastic:()=>BZ,easeElasticIn:()=>e6t,easeElasticInOut:()=>r6t,easeElasticOut:()=>BZ,easeExp:()=>kZ,easeExpIn:()=>qPt,easeExpInOut:()=>kZ,easeExpOut:()=>GPt,easeLinear:()=>CPt,easePoly:()=>IZ,easePolyIn:()=>DPt,easePolyInOut:()=>IZ,easePolyOut:()=>OPt,easeQuad:()=>CZ,easeQuadIn:()=>PPt,easeQuadInOut:()=>CZ,easeQuadOut:()=>IPt,easeSin:()=>LZ,easeSinIn:()=>HPt,easeSinInOut:()=>LZ,easeSinOut:()=>VPt,entries:()=>hAt,event:()=>Pu,extent:()=>uR,forceCenter:()=>o6t,forceCollide:()=>F6t,forceLink:()=>j6t,forceManyBody:()=>lIt,forceRadial:()=>uIt,forceSimulation:()=>sIt,forceX:()=>fIt,forceY:()=>dIt,format:()=>rJ,formatDefaultLocale:()=>WN,formatLocale:()=>qN,formatPrefix:()=>nJ,formatSpecifier:()=>Ly,geoAlbers:()=>DD,geoAlbersUsa:()=>vLt,geoArea:()=>UIt,geoAzimuthalEqualArea:()=>bLt,geoAzimuthalEqualAreaRaw:()=>zD,geoAzimuthalEquidistant:()=>SLt,geoAzimuthalEquidistantRaw:()=>FD,geoBounds:()=>KIt,geoCentroid:()=>n9t,geoCircle:()=>u9t,geoClipAntimeridian:()=>zT,geoClipCircle:()=>_D,geoClipExtent:()=>R9t,geoClipRectangle:()=>Qp,geoConicConformal:()=>TLt,geoConicConformalRaw:()=>fQ,geoConicEqualArea:()=>Uy,geoConicEqualAreaRaw:()=>cQ,geoConicEquidistant:()=>PLt,geoConicEquidistantRaw:()=>dQ,geoContains:()=>V9t,geoDistance:()=>By,geoEquirectangular:()=>ALt,geoEquirectangularRaw:()=>Gy,geoGnomonic:()=>LLt,geoGnomonicRaw:()=>VD,geoGraticule:()=>SD,geoGraticule10:()=>W9t,geoIdentity:()=>RLt,geoInterpolate:()=>j9t,geoLength:()=>bD,geoMercator:()=>ELt,geoMercatorRaw:()=>qy,geoNaturalEarth1:()=>DLt,geoNaturalEarth1Raw:()=>qD,geoOrthographic:()=>zLt,geoOrthographicRaw:()=>GD,geoPath:()=>fLt,geoProjection:()=>eo,geoProjectionMutator:()=>YT,geoRotation:()=>lD,geoStereographic:()=>BLt,geoStereographicRaw:()=>WD,geoStream:()=>Mo,geoTransform:()=>dLt,geoTransverseMercator:()=>VLt,geoTransverseMercatorRaw:()=>YD,hcl:()=>iZ,hierarchy:()=>jT,histogram:()=>xMt,hsl:()=>ZK,html:()=>oNt,interpolate:()=>Z2,interpolateArray:()=>fO,interpolateBasis:()=>cO,interpolateBasisClosed:()=>hO,interpolateCool:()=>E7t,interpolateCubehelix:()=>q8t,interpolateCubehelixDefault:()=>w7t,interpolateCubehelixLong:()=>G8t,interpolateDate:()=>dO,interpolateHcl:()=>B8t,interpolateHclLong:()=>H8t,interpolateHsl:()=>N8t,interpolateHslLong:()=>D8t,interpolateInferno:()=>I7t,interpolateLab:()=>$Q,interpolateMagma:()=>P7t,interpolateNumber:()=>As,interpolateObject:()=>mO,interpolatePlasma:()=>L7t,interpolateRainbow:()=>T7t,interpolateRgb:()=>eC,interpolateRgbBasis:()=>m8t,interpolateRgbBasisClosed:()=>g8t,interpolateRound:()=>_8t,interpolateString:()=>gO,interpolateTransformCss:()=>T8t,interpolateTransformSvg:()=>C8t,interpolateViridis:()=>A7t,interpolateWarm:()=>M7t,interpolateZoom:()=>L8t,interrupt:()=>dz,interval:()=>EVt,isoFormat:()=>gVt,isoParse:()=>_Vt,json:()=>sNt,keys:()=>sAt,lab:()=>lN,line:()=>Rw,lineRadial:()=>Iet,linkHorizontal:()=>CFt,linkRadial:()=>PFt,linkVertical:()=>AFt,local:()=>m7,map:()=>by,matcher:()=>u7,max:()=>TMt,mean:()=>AMt,median:()=>IMt,merge:()=>kMt,min:()=>mR,mouse:()=>nFt,namespace:()=>Mw,namespaces:()=>EC,nest:()=>rAt,now:()=>Yw,pack:()=>Tkt,packEnclose:()=>$D,packSiblings:()=>wkt,pairs:()=>lMt,partition:()=>Akt,path:()=>K8t,permute:()=>NMt,pie:()=>SFt,pointRadial:()=>fv,polygonArea:()=>Q8t,polygonCentroid:()=>eRt,polygonContains:()=>lRt,polygonHull:()=>aRt,polygonLength:()=>uRt,precisionFixed:()=>AIt,precisionPrefix:()=>IIt,precisionRound:()=>kIt,quadtree:()=>xO,quantile:()=>dy,quantize:()=>Y8t,queue:()=>wO,radialArea:()=>ket,radialLine:()=>Iet,randomBates:()=>tNt,randomExponential:()=>rNt,randomIrwinHall:()=>MO,randomLogNormal:()=>JRt,randomNormal:()=>SO,randomUniform:()=>KRt,range:()=>hR,request:()=>J2,rgb:()=>KK,ribbon:()=>KCt,scaleBand:()=>cC,scaleIdentity:()=>qO,scaleImplicit:()=>kO,scaleLinear:()=>UO,scaleLog:()=>WO,scaleOrdinal:()=>nw,scalePoint:()=>YNt,scalePow:()=>_C,scaleQuantile:()=>YO,scaleQuantize:()=>jO,scaleSequential:()=>i7,scaleSqrt:()=>aOt,scaleThreshold:()=>XO,scaleTime:()=>h7t,scaleUtc:()=>f7t,scan:()=>OMt,schemeCategory10:()=>d7t,schemeCategory20:()=>x7t,schemeCategory20b:()=>g7t,schemeCategory20c:()=>y7t,select:()=>d7,selectAll:()=>oFt,selection:()=>Qzt,selector:()=>Ew,selectorAll:()=>c7,set:()=>oAt,shuffle:()=>FMt,stack:()=>wBt,stackOffsetDiverging:()=>TBt,stackOffsetExpand:()=>MBt,stackOffsetNone:()=>Ru,stackOffsetSilhouette:()=>ABt,stackOffsetWiggle:()=>IBt,stackOrderAscending:()=>D7,stackOrderDescending:()=>kBt,stackOrderInsideOut:()=>NBt,stackOrderNone:()=>Nu,stackOrderReverse:()=>OBt,stratify:()=>kkt,style:()=>_et,sum:()=>HMt,symbol:()=>NFt,symbolCircle:()=>RC,symbolCross:()=>S7,symbolDiamond:()=>M7,symbolSquare:()=>T7,symbolStar:()=>E7,symbolTriangle:()=>C7,symbolWye:()=>A7,symbols:()=>RFt,text:()=>cNt,thresholdFreedmanDiaconis:()=>wMt,thresholdScott:()=>MMt,thresholdSturges:()=>pR,tickIncrement:()=>k$,tickStep:()=>fR,ticks:()=>vMt,timeDay:()=>ZBt,timeDays:()=>JBt,timeFormat:()=>wrt,timeFormatDefaultLocale:()=>X7,timeFormatLocale:()=>YC,timeFriday:()=>ort,timeFridays:()=>iHt,timeHour:()=>jBt,timeHours:()=>XBt,timeInterval:()=>Sr,timeMillisecond:()=>Zet,timeMilliseconds:()=>Jet,timeMinute:()=>qBt,timeMinutes:()=>GBt,timeMonday:()=>ert,timeMondays:()=>tHt,timeMonth:()=>lHt,timeMonths:()=>cHt,timeParse:()=>Srt,timeSaturday:()=>art,timeSaturdays:()=>oHt,timeSecond:()=>Qet,timeSeconds:()=>trt,timeSunday:()=>H7,timeSundays:()=>srt,timeThursday:()=>irt,timeThursdays:()=>nHt,timeTuesday:()=>rrt,timeTuesdays:()=>eHt,timeWednesday:()=>nrt,timeWednesdays:()=>rHt,timeWeek:()=>H7,timeWeeks:()=>srt,timeYear:()=>hHt,timeYears:()=>fHt,timeout:()=>SVt,timer:()=>Crt,timerFlush:()=>Art,touch:()=>sFt,touches:()=>cFt,transition:()=>Tz,transpose:()=>gR,tree:()=>Nkt,treemap:()=>Okt,treemapBinary:()=>Fkt,treemapDice:()=>lf,treemapResquarify:()=>Ukt,treemapSlice:()=>wg,treemapSliceDice:()=>Hkt,treemapSquarify:()=>tO,tsv:()=>mNt,tsvFormat:()=>SPt,tsvFormatRows:()=>MPt,tsvParse:()=>bPt,tsvParseRows:()=>wPt,utcDay:()=>SHt,utcDays:()=>MHt,utcFormat:()=>jC,utcFriday:()=>prt,utcFridays:()=>IHt,utcHour:()=>vHt,utcHours:()=>xHt,utcMillisecond:()=>Zet,utcMilliseconds:()=>Jet,utcMinute:()=>mHt,utcMinutes:()=>gHt,utcMonday:()=>crt,utcMondays:()=>THt,utcMonth:()=>NHt,utcMonths:()=>DHt,utcParse:()=>XC,utcSaturday:()=>drt,utcSaturdays:()=>LHt,utcSecond:()=>Qet,utcSeconds:()=>trt,utcSunday:()=>V7,utcSundays:()=>mrt,utcThursday:()=>frt,utcThursdays:()=>PHt,utcTuesday:()=>urt,utcTuesdays:()=>CHt,utcWednesday:()=>hrt,utcWednesdays:()=>AHt,utcWeek:()=>V7,utcWeeks:()=>mrt,utcYear:()=>zHt,utcYears:()=>FHt,values:()=>cAt,variance:()=>lR,version:()=>iMt,voronoi:()=>DGt,window:()=>Cw,xml:()=>hNt,zip:()=>UMt,zoom:()=>qjt,zoomIdentity:()=>hS,zoomTransform:()=>aF});var Er=M(()=>{oMt();GMt();tEt();xCt();JCt();pAt();PAt();NAt();pPt();TPt();i6t();gIt();NIt();qLt();Gkt();X8t();J8t();fRt();GRt();$Rt();iNt();_Nt();N7t();hFt();FBt();HHt();vVt();CVt();_Gt();zGt();Wjt()});var $jt=H(Xjt=>{"use strict";Object.defineProperty(Xjt,"__esModule",{value:!0});var Yjt=(Er(),Ut(Mr)),Wg=Yjt,jjt=Yjt;function WDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.select(this);for(var i in r)n.attr(i,r[i])})}function YDe(e,t){for(var r in t)e.attr(r,t[r]);return e}function jDe(e){return(typeof e=="function"?WDe:YDe)(this,e)}function XDe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Wg.select(this);for(var o in n)i.style(o,n[o],r)})}function $De(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function KDe(e,t){return(typeof e=="function"?XDe:$De)(this,e,t==null?"":t)}function ZDe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.select(this);for(var i in r)n.property(i,r[i])})}function JDe(e,t){for(var r in t)e.property(r,t[r]);return e}function QDe(e){return(typeof e=="function"?ZDe:JDe)(this,e)}function tOe(e,t){return e.each(function(){var r=t.apply(this,arguments),n=Wg.select(this).transition(e);for(var i in r)n.attr(i,r[i])})}function eOe(e,t){for(var r in t)e.attr(r,t[r]);return e}function rOe(e){return(typeof e=="function"?tOe:eOe)(this,e)}function nOe(e,t,r){return e.each(function(){var n=t.apply(this,arguments),i=Wg.select(this).transition(e);for(var o in n)i.style(o,n[o],r)})}function iOe(e,t,r){for(var n in t)e.style(n,t[n],r);return e}function oOe(e,t){return(typeof e=="function"?nOe:iOe)(this,e,t==null?"":t)}Wg.selection.prototype.attrs=jDe;Wg.selection.prototype.styles=KDe;Wg.selection.prototype.properties=QDe;jjt.transition.prototype.attrs=rOe;jjt.transition.prototype.styles=oOe});var Yg=H(iit=>{"use strict";Object.defineProperty(iit,"__esModule",{value:!0});var Kjt=(Er(),Ut(Mr));function aOe(e){if(e.attrs==null)if(e.nodes==null){var t=[];return e.each(function(){t.push(this)}),Kjt.selectAll(t)}else return Kjt.selectAll(e.nodes());else return e}iit.coerceExternalD3=aOe});var If=H(oit=>{"use strict";Object.defineProperty(oit,"__esModule",{value:!0});function sOe(e){return e.reduce(function(t,r){return t[r]=r,t},{})}oit.makeEnum=sOe});var Jjt=H(lF=>{"use strict";Object.defineProperty(lF,"__esModule",{value:!0});var dr=(I_(),Ut(Bvt)),lOe=Yg(),cOe=If(),Zjt={linear:dr.easeLinear,quad:dr.easeQuad,quadIn:dr.easeQuadIn,quadOut:dr.easeQuadOut,quadInOut:dr.easeQuadInOut,cubic:dr.easeCubic,cubicIn:dr.easeCubicIn,cubicOut:dr.easeCubicOut,cubicInOut:dr.easeCubicInOut,poly:dr.easePoly,polyIn:dr.easePolyIn,polyOut:dr.easePolyOut,polyInOut:dr.easePolyInOut,sin:dr.easeSin,sinIn:dr.easeSinIn,sinOut:dr.easeSinOut,sinInOut:dr.easeSinInOut,exp:dr.easeExp,expIn:dr.easeExpIn,expOut:dr.easeExpOut,expInOut:dr.easeExpInOut,circle:dr.easeCircle,circleIn:dr.easeCircleIn,circleOut:dr.easeCircleOut,circleInOut:dr.easeCircleInOut,bounce:dr.easeBounce,bounceIn:dr.easeBounceIn,bounceOut:dr.easeBounceOut,bounceInOut:dr.easeBounceInOut,back:dr.easeBack,backIn:dr.easeBackIn,backOut:dr.easeBackOut,backInOut:dr.easeBackInOut,elastic:dr.easeElastic,elasticIn:dr.easeElasticIn,elasticOut:dr.easeElasticOut,elasticInOut:dr.easeElasticInOut};lF.EaseName=cOe.makeEnum(["linear","quad","quadIn","quadOut","quadInOut","cubic","cubicIn","cubicOut","cubicInOut","poly","polyIn","polyOut","polyInOut","sin","sinIn","sinOut","sinInOut","exp","expIn","expOut","expInOut","circle","circleIn","circleOut","circleInOut","bounce","bounceIn","bounceOut","bounceInOut","back","backIn","backOut","backInOut","elastic","elasticIn","elasticOut","elasticInOut"]);var uOe=function(){function e(){this._startDelay=e._DEFAULT_START_DELAY_MILLISECONDS,this._stepDuration=e._DEFAULT_STEP_DURATION_MILLISECONDS,this._stepDelay=e._DEFAULT_ITERATIVE_DELAY_MILLISECONDS,this._maxTotalDuration=e._DEFAULT_MAX_TOTAL_DURATION_MILLISECONDS,this._easingMode=e._DEFAULT_EASING_MODE}return e.prototype.totalTime=function(t){var r=this._getAdjustedIterativeDelay(t);return this.startDelay()+r*Math.max(t-1,0)+this.stepDuration()},e.prototype.animate=function(t,r){var n=this;t=lOe.coerceExternalD3(t);var i=t.size(),o=this._getAdjustedIterativeDelay(i);return t.transition().ease(this._getEaseFactory()).duration(this.stepDuration()).delay(function(a,s){return n.startDelay()+o*s}).attrs(r)},e.prototype.startDelay=function(t){return t==null?this._startDelay:(this._startDelay=t,this)},e.prototype.stepDuration=function(t){return t==null?Math.min(this._stepDuration,this._maxTotalDuration):(this._stepDuration=t,this)},e.prototype.stepDelay=function(t){return t==null?this._stepDelay:(this._stepDelay=t,this)},e.prototype.maxTotalDuration=function(t){return t==null?this._maxTotalDuration:(this._maxTotalDuration=t,this)},e.prototype.easingMode=function(t){return t==null?this._easingMode:(this._easingMode=t,this)},e.prototype._getEaseFactory=function(){var t=this.easingMode();if(typeof t=="string"){var r=Zjt[t];return r==null?Zjt.linear:r}else return t},e.prototype._getAdjustedIterativeDelay=function(t){var r=this.maxTotalDuration()-this.stepDuration();r=Math.max(r,0);var n=r/Math.max(t-1,1);return Math.min(this.stepDelay(),n)},e._DEFAULT_START_DELAY_MILLISECONDS=0,e._DEFAULT_STEP_DURATION_MILLISECONDS=300,e._DEFAULT_ITERATIVE_DELAY_MILLISECONDS=15,e._DEFAULT_MAX_TOTAL_DURATION_MILLISECONDS=1/0,e._DEFAULT_EASING_MODE="expOut",e}();lF.Easing=uOe});var Qjt=H(ait=>{"use strict";Object.defineProperty(ait,"__esModule",{value:!0});var hOe=Yg(),fOe=function(){function e(){}return e.prototype.totalTime=function(t){return 0},e.prototype.animate=function(t,r){return t=hOe.coerceExternalD3(t),t.attrs(r)},e}();ait.Null=fOe});var Lf=H(cF=>{"use strict";Object.defineProperty(cF,"__esModule",{value:!0});var tXt=(de(),Ut(pe));tXt.__exportStar(Jjt(),cF);tXt.__exportStar(Qjt(),cF)});var eXt=H(sit=>{"use strict";Object.defineProperty(sit,"__esModule",{value:!0});var pOe=function(){function e(t){this.cache={},this.compute=t}return e.prototype.get=function(t){return this.cache.hasOwnProperty(t)||(this.cache[t]=this.compute(t)),this.cache[t]},e.prototype.clear=function(){return this.cache={},this},e}();sit.Cache=pOe});var rXt=H(lit=>{"use strict";Object.defineProperty(lit,"__esModule",{value:!0});var dOe=function(){function e(){}return e.arrayEq=function(t,r){if(t==null||r==null)return t===r;if(t.length!==r.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==r[n])return!1;return!0},e.objEq=function(t,r){if(t==null||r==null)return t===r;var n=Object.keys(t).sort(),i=Object.keys(r).sort(),o=n.map(function(s){return t[s]}),a=i.map(function(s){return r[s]});return e.arrayEq(n,i)&&e.arrayEq(o,a)},e.strictEq=function(t,r){return t===r},e.defaults=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];if(t==null)throw new TypeError("Cannot convert undefined or null to object");var i=Object(t);return r.forEach(function(o){if(o!=null)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a])}),i},e}();lit.Methods=dOe});var nXt=H(cit=>{"use strict";Object.defineProperty(cit,"__esModule",{value:!0});var mOe=function(){function e(){}return e.combineWhitespace=function(t){return t.replace(/[ \t]+/g," ")},e.isNotEmptyString=function(t){return t&&t.trim()!==""},e.trimStart=function(t,r){if(!t)return t;var n=t.split(""),i=r?function(o){return o.split(r).some(e.isNotEmptyString)}:e.isNotEmptyString;return n.reduce(function(o,a){return i(o+a)?o+a:o},"")},e.trimEnd=function(t,r){if(!t)return t;var n=t.split("");return n.reverse(),n=e.trimStart(n.join(""),r).split(""),n.reverse(),n.join("")},e}();cit.StringMethods=mOe});var iXt=H(uit=>{"use strict";Object.defineProperty(uit,"__esModule",{value:!0});var gOe=function(){function e(){this.WordDividerRegExp=new RegExp("\\W"),this.WhitespaceRegExp=new RegExp("\\s")}return e.prototype.tokenize=function(t){var r=this;return t.split("").reduce(function(n,i){return n.slice(0,-1).concat(r.shouldCreateNewToken(n[n.length-1],i))},[""])},e.prototype.shouldCreateNewToken=function(t,r){if(!t)return[r];var n=t[t.length-1];return this.WhitespaceRegExp.test(n)&&this.WhitespaceRegExp.test(r)?[t+r]:this.WhitespaceRegExp.test(n)||this.WhitespaceRegExp.test(r)?[t,r]:this.WordDividerRegExp.test(n)?n===r?[t+r]:[t,r]:[t+r]},e}();uit.Tokenizer=gOe});var pS=H(uF=>{"use strict";function hF(e){for(var t in e)uF.hasOwnProperty(t)||(uF[t]=e[t])}Object.defineProperty(uF,"__esModule",{value:!0});hF(eXt());hF(rXt());hF(nXt());hF(iXt())});var aXt=H(hit=>{"use strict";Object.defineProperty(hit,"__esModule",{value:!0});var oXt=pS(),_Oe={textRotation:0,textShear:0,xAlign:"left",yAlign:"top"},fF=function(){function e(t,r,n){this._measurer=t,this._penFactory=r,this._wrapper=n}return e.prototype.measurer=function(t){return this._measurer=t,this},e.prototype.wrapper=function(t){return this._wrapper=t,this},e.prototype.penFactory=function(t){return this._penFactory=t,this},e.prototype.write=function(t,r,n,i,o){if(i===void 0&&(i={}),i=oXt.Methods.defaults({},_Oe,i),e.SupportedRotation.indexOf(i.textRotation)===-1)throw new Error("unsupported rotation - "+i.textRotation+". Supported rotations are "+e.SupportedRotation.join(", "));if(i.textShear!=null&&i.textShear<-80||i.textShear>80)throw new Error("unsupported shear angle - "+i.textShear+". Must be between -80 and 80");var a=Math.abs(Math.abs(i.textRotation)-90)>45,s=a?r:n,l=a?n:r,c=i.textShear,u=c*Math.PI/180,h=this._measurer.measure().height,f=h*Math.tan(u),p=s/Math.cos(u)-Math.abs(f),d=l*Math.cos(u),g=oXt.StringMethods.combineWhitespace(t),_=this._wrapper?this._wrapper.wrap(g,this._measurer,p,d).wrappedText:g,y=_.split(`
`),x=e.XOffsetFactor[i.xAlign]*p*Math.sin(u),b=e.YOffsetFactor[i.yAlign]*(d-y.length*h),S=x-b,C=[0,0],P=i.textRotation+c;switch(i.textRotation){case 90:C=[r+S,0];break;case-90:C=[-S,n];break;case 180:C=[r,n+S];break;default:C=[0,-S];break}var k=this._penFactory.createPen(t,{translate:C,rotate:P},o);this.writeLines(y,k,p,h,f,i.xAlign),k.destroy!=null&&k.destroy()},e.prototype.writeLines=function(t,r,n,i,o,a){t.forEach(function(s,l){var c=o>0?(l+1)*o:l*o;r.write(s,n,a,c,(l+1)*i)})},e}();fF.XOffsetFactor={center:.5,left:0,right:1};fF.YOffsetFactor={bottom:1,center:.5,top:0};fF.SupportedRotation=[-90,0,180,90];hit.Writer=fF});var FA=H(pF=>{"use strict";function yOe(e){for(var t in e)pF.hasOwnProperty(t)||(pF[t]=e[t])}Object.defineProperty(pF,"__esModule",{value:!0});yOe(aXt())});var fit=H(dF=>{"use strict";Object.defineProperty(dF,"__esModule",{value:!0});var BA=function(){function e(){}return e.append=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=e.create.apply(e,[r].concat(n));return t.appendChild(o),o},e.create=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=document.createElement(t);return e.addClasses.apply(e,[i].concat(r)),i},e.addClasses=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];r=r.filter(function(i){return i!=null}),t.classList!=null?r.forEach(function(i){t.classList.add(i)}):t.setAttribute("class",r.join(" "))},e.getDimensions=function(t){if(t.getBoundingClientRect)try{var r=t.getBoundingClientRect(),n=r.width,i=r.height;return{width:n,height:i}}catch(o){}return{height:0,width:0}},e}();dF.HtmlUtils=BA;var vOe=function(){function e(t,r,n){n===void 0&&(n=!1);var i=this;this.element=t,this.className=r,this.addTitle=n,this.createRuler=function(){return function(o){var a=BA.append(i.element,"span","text-tmp",i.className);a.textContent=o;var s=BA.getDimensions(a);return i.element.removeChild(a),s}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=BA.append(s,"div","text-block",i.className);return l.style.position="relative",l.style.transform="translate(0, -1em) "+("translate("+a.translate[0]+"px, "+a.translate[1]+"px) ")+("rotate("+a.rotate+"deg)"),l.style.transformOrigin="0 1.2em",i.addTitle&&l.setAttribute("title",o),i.createHtmlLinePen(l)}}return e.prototype.setAddTitle=function(t){this.addTitle=t},e.prototype.createHtmlLinePen=function(t){return{write:function(r,n,i,o,a){var s=BA.append(t,"div","text-line");s.textContent=r,s.style.width=n+"px",s.style.textAlign=i,s.style.position="absolute",s.style.whiteSpace="nowrap",s.style.top=a+"px",s.style.left=o+"px"}}},e}();dF.HtmlContext=vOe});var cXt=H(mF=>{"use strict";Object.defineProperty(mF,"__esModule",{value:!0});var xOe=FA(),sXt=fit(),jg=function(){function e(){}return e.append=function(t,r){for(var n=[],i=2;i<arguments.length;i++)n[i-2]=arguments[i];var o=e.create.apply(e,[r].concat(n));return t.appendChild(o),o},e.create=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=document.createElementNS(e.SVG_NS,t);return sXt.HtmlUtils.addClasses.apply(sXt.HtmlUtils,[i].concat(r)),i},e.getDimensions=function(t){if(t.getBBox)try{var r=t.getBBox(),n=r.width,i=r.height;return{width:n,height:i}}catch(o){}return{height:0,width:0}},e}();jg.SVG_NS="http://www.w3.org/2000/svg";mF.SvgUtils=jg;var lXt=function(){function e(t,r,n){n===void 0&&(n=!1);var i=this;this.element=t,this.className=r,this.addTitleElement=n,this.createRuler=function(){var o=i.getTextElements(i.element),a=o.parentElement,s=o.containerElement,l=o.textElement;return function(c){a.appendChild(s),l.textContent=c;var u=jg.getDimensions(l);return a.removeChild(s),u}},this.createPen=function(o,a,s){s==null&&(s=i.element);var l=jg.append(s,"g","text-container",i.className);i.addTitleElement&&(jg.append(l,"title").textContent=o,l.setAttribute("title",o));var c=jg.append(l,"g","text-area");return c.setAttribute("transform","translate("+a.translate[0]+","+a.translate[1]+")"+("rotate("+a.rotate+")")),i.createSvgLinePen(c)}}return e.prototype.setAddTitleElement=function(t){this.addTitleElement=t},e.prototype.createSvgLinePen=function(t){return{write:function(r,n,i,o,a){o+=n*xOe.Writer.XOffsetFactor[i];var s=jg.append(t,"text","text-line");s.textContent=r,s.setAttribute("text-anchor",e.AnchorMap[i]),s.setAttribute("transform","translate("+o+","+a+")"),s.setAttribute("y","-0.25em")}}},e.prototype.getTextElements=function(t){if(t.tagName==="text"){var r=t.parentElement;return r==null&&(r=t.parentNode),r.removeChild(t),{containerElement:t,parentElement:r,textElement:t}}var n=t.querySelector("text");if(n!=null){var r=n.parentElement;return r==null&&(r=n.parentNode),r.removeChild(n),{containerElement:n,parentElement:r,textElement:n}}var i=jg.create("text",this.className);return{containerElement:i,parentElement:t,textElement:i}},e}();lXt.AnchorMap={center:"middle",left:"start",right:"end"};mF.SvgContext=lXt});var uXt=H(pit=>{"use strict";Object.defineProperty(pit,"__esModule",{value:!0});var bOe=FA(),wOe="#444",SOe=function(){function e(t,r,n){r===void 0&&(r=10),n===void 0&&(n={});var i=this;this.ctx=t,this.lineHeight=r,this.style=n,this.createRuler=function(){return function(o){i.ctx.font=i.style.font;var a=i.ctx.measureText(o).width;return{width:a,height:i.lineHeight}}},this.createPen=function(o,a,s){return s==null&&(s=i.ctx),s.save(),s.translate(a.translate[0],a.translate[1]),s.rotate(a.rotate*Math.PI/180),i.createCanvasPen(s)},this.style.fill===void 0&&(this.style.fill=wOe)}return e.prototype.createCanvasPen=function(t){var r=this;return{destroy:function(){t.restore()},write:function(n,i,o,a,s){a+=i*bOe.Writer.XOffsetFactor[o],t.textAlign=o,r.style.font!=null&&(t.font=r.style.font),r.style.fill!=null&&(t.fillStyle=r.style.fill,t.fillText(n,a,s)),r.style.stroke!=null&&(t.strokeStyle=r.style.fill,t.strokeText(n,a,s))}}},e}();pit.CanvasContext=SOe});var mit=H(gF=>{"use strict";function dit(e){for(var t in e)gF.hasOwnProperty(t)||(gF[t]=e[t])}Object.defineProperty(gF,"__esModule",{value:!0});dit(cXt());dit(uXt());dit(fit())});var _F=H(git=>{"use strict";Object.defineProperty(git,"__esModule",{value:!0});var hXt=function(){function e(t){t.createRuler!=null?this.ruler=t.createRuler():this.ruler=t}return e.prototype.measure=function(t){return t===void 0&&(t=e.HEIGHT_TEXT),this.ruler(t)},e}();hXt.HEIGHT_TEXT="bdpql";git.AbstractMeasurer=hXt});var _it=H(HA=>{"use strict";var MOe=HA&&HA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(HA,"__esModule",{value:!0});var yF=_F(),EOe=function(e){MOe(t,e);function t(r,n){n===void 0&&(n=!1);var i=e.call(this,r)||this;return i.useGuards=n,i}return t.prototype._addGuards=function(r){return yF.AbstractMeasurer.HEIGHT_TEXT+r+yF.AbstractMeasurer.HEIGHT_TEXT},t.prototype._measureLine=function(r,n){n===void 0&&(n=!1);var i=this.useGuards||n||/^[\t ]$/.test(r),o=i?this._addGuards(r):r,a=e.prototype.measure.call(this,o);return a.width-=i?2*this.getGuardWidth():0,a},t.prototype.measure=function(r){var n=this;if(r===void 0&&(r=yF.AbstractMeasurer.HEIGHT_TEXT),r.trim()==="")return{width:0,height:0};var i=r.trim().split(`
`).map(function(o){return n._measureLine(o)});return{height:i.reduce(function(o,a){return o+a.height},0),width:i.reduce(function(o,a){return Math.max(o,a.width)},0)}},t.prototype.getGuardWidth=function(){return this.guardWidth==null&&(this.guardWidth=e.prototype.measure.call(this).width),this.guardWidth},t}(yF.AbstractMeasurer);HA.Measurer=EOe});var yit=H(VA=>{"use strict";var TOe=VA&&VA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(VA,"__esModule",{value:!0});var COe=_it(),AOe=function(e){TOe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype._measureCharacter=function(r){return e.prototype._measureLine.call(this,r)},t.prototype._measureLine=function(r){var n=this,i=r.split("").map(function(o){return n._measureCharacter(o)});return{height:i.reduce(function(o,a){return Math.max(o,a.height)},0),width:i.reduce(function(o,a){return o+a.width},0)}},t}(COe.Measurer);VA.CharacterMeasurer=AOe});var vit=H(UA=>{"use strict";var POe=UA&&UA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(UA,"__esModule",{value:!0});var IOe=pS(),LOe=yit(),kOe=function(e){POe(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.cache=new IOe.Cache(function(o){return i._measureCharacterNotFromCache(o)}),i}return t.prototype._measureCharacterNotFromCache=function(r){return e.prototype._measureCharacter.call(this,r)},t.prototype._measureCharacter=function(r){return this.cache.get(r)},t.prototype.reset=function(){this.cache.clear()},t}(LOe.CharacterMeasurer);UA.CacheCharacterMeasurer=kOe});var fXt=H(qA=>{"use strict";var ROe=qA&&qA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(qA,"__esModule",{value:!0});var NOe=pS(),DOe=_F(),OOe=vit(),zOe=function(e){ROe(t,e);function t(r){var n=e.call(this,r)||this;return n.dimCache=new NOe.Cache(function(i){return n._measureNotFromCache(i)}),n}return t.prototype._measureNotFromCache=function(r){return e.prototype.measure.call(this,r)},t.prototype.measure=function(r){return r===void 0&&(r=DOe.AbstractMeasurer.HEIGHT_TEXT),this.dimCache.get(r)},t.prototype.reset=function(){this.dimCache.clear(),e.prototype.reset.call(this)},t}(OOe.CacheCharacterMeasurer);qA.CacheMeasurer=zOe});var xit=H(vF=>{"use strict";function GA(e){for(var t in e)vF.hasOwnProperty(t)||(vF[t]=e[t])}Object.defineProperty(vF,"__esModule",{value:!0});GA(_F());GA(vit());GA(fXt());GA(yit());GA(_it())});var wit=H(bit=>{"use strict";Object.defineProperty(bit,"__esModule",{value:!0});var WA=pS(),FOe=function(){function e(){this.maxLines(1/0),this.textTrimming("ellipsis"),this.allowBreakingWords(!1),this._tokenizer=new WA.Tokenizer,this._breakingCharacter="-"}return e.prototype.maxLines=function(t){return t==null?this._maxLines:(this._maxLines=t,this)},e.prototype.textTrimming=function(t){if(t==null)return this._textTrimming;if(t!=="ellipsis"&&t!=="none")throw new Error(t+" - unsupported text trimming option.");return this._textTrimming=t,this},e.prototype.allowBreakingWords=function(t){return t==null?this._allowBreakingWords:(this._allowBreakingWords=t,this)},e.prototype.wrap=function(t,r,n,i){var o=this;i===void 0&&(i=1/0);var a={noBrokeWords:0,noLines:0,originalText:t,truncatedText:"",wrappedText:""},s={availableLines:Math.min(Math.floor(i/r.measure().height),this._maxLines),availableWidth:n,canFitText:!0,currentLine:"",wrapping:a},l=t.split(`
`);return l.reduce(function(c,u,h){return o.breakLineToFitWidth(c,u,h!==l.length-1,r)},s).wrapping},e.prototype.breakLineToFitWidth=function(t,r,n,i){var o=this;!t.canFitText&&t.wrapping.truncatedText!==""&&(t.wrapping.truncatedText+=`
`);var a=this._tokenizer.tokenize(r);t=a.reduce(function(l,c){return o.wrapNextToken(c,l,i)},t);var s=WA.StringMethods.trimEnd(t.currentLine);return t.wrapping.noLines+=+(s!==""),t.wrapping.noLines===t.availableLines&&this._textTrimming!=="none"&&n?t.canFitText=!1:t.wrapping.wrappedText+=s,t.currentLine=`
`,t},e.prototype.canFitToken=function(t,r,n){var i=this,o=t.split("").map(function(a,s){return s!==t.length-1?a+i._breakingCharacter:a});return n.measure(t).width<=r||o.every(function(a){return n.measure(a).width<=r})},e.prototype.addEllipsis=function(t,r,n){if(this._textTrimming==="none")return{remainingToken:"",wrappedToken:t};var i=t.substring(0).trim(),o=n.measure(i).width,a=n.measure("...").width,s=t.length>0&&t[0]===`
`?`
`:"";if(r<=a){var l=a/3,c=Math.floor(r/l);return{remainingToken:t,wrappedToken:s+"...".substr(0,c)}}for(;o+a>r;)i=WA.StringMethods.trimEnd(i.substr(0,i.length-1)),o=n.measure(i).width;return{remainingToken:WA.StringMethods.trimEnd(t.substring(i.length),"-").trim(),wrappedToken:s+i+"..."}},e.prototype.wrapNextToken=function(t,r,n){if(!r.canFitText||r.availableLines===r.wrapping.noLines||!this.canFitToken(t,r.availableWidth,n))return this.finishWrapping(t,r,n);for(var i=t;i;){var o=this.breakTokenToFitInWidth(i,r.currentLine,r.availableWidth,n);if(r.currentLine=o.line,i=o.remainingToken,i!=null)if(r.wrapping.noBrokeWords+=+o.breakWord,++r.wrapping.noLines,r.availableLines===r.wrapping.noLines){var a=this.addEllipsis(r.currentLine,r.availableWidth,n);return r.wrapping.wrappedText+=a.wrappedToken,r.wrapping.truncatedText+=a.remainingToken+i,r.currentLine=`
`,r}else r.wrapping.wrappedText+=WA.StringMethods.trimEnd(r.currentLine),r.currentLine=`
`}return r},e.prototype.finishWrapping=function(t,r,n){if(r.canFitText&&r.availableLines!==r.wrapping.noLines&&this._textTrimming!=="none"){var i=this.addEllipsis(r.currentLine+t,r.availableWidth,n);r.wrapping.wrappedText+=i.wrappedToken,r.wrapping.truncatedText+=i.remainingToken,r.wrapping.noBrokeWords+=+(i.remainingToken.length<t.length),r.wrapping.noLines+=+(i.wrappedToken.length>0),r.currentLine=""}else r.wrapping.truncatedText+=t;return r.canFitText=!1,r},e.prototype.breakTokenToFitInWidth=function(t,r,n,i,o){if(o===void 0&&(o=this._breakingCharacter),i.measure(r+t).width<=n)return{breakWord:!1,line:r+t,remainingToken:null};if(t.trim()==="")return{breakWord:!1,line:r,remainingToken:""};if(!this._allowBreakingWords&&r.trim()!=="")return{breakWord:!1,line:r,remainingToken:t};for(var a=0;a<t.length&&i.measure(r+t.substring(0,a+1)+o).width<=n;)++a;var s="";return a>0&&(s=o),{breakWord:a>0,line:r+t.substring(0,a)+s,remainingToken:t.substring(a)}},e}();bit.Wrapper=FOe});var dXt=H(YA=>{"use strict";var BOe=YA&&YA.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}();Object.defineProperty(YA,"__esModule",{value:!0});var HOe=wit(),pXt=function(e){BOe(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.wrap=function(r,n,i,o){var a=this;o===void 0&&(o=1/0);var s=r.split(`
`);if(s.length>1)throw new Error("SingleLineWrapper is designed to work only on single line");var l=function(g){return e.prototype.wrap.call(a,r,n,g,o)},c=l(i);if(c.noLines<2)return c;for(var u=0,h=i,f=0;f<t.NO_WRAP_ITERATIONS&&h>u;++f){var p=(h+u)/2,d=l(p);this.areSameResults(c,d)?(h=p,c=d):u=p}return c},t.prototype.areSameResults=function(r,n){return r.noLines===n.noLines&&r.truncatedText===n.truncatedText},t}(HOe.Wrapper);pXt.NO_WRAP_ITERATIONS=5;YA.SingleLineWrapper=pXt});var Sit=H(xF=>{"use strict";function mXt(e){for(var t in e)xF.hasOwnProperty(t)||(xF[t]=e[t])}Object.defineProperty(xF,"__esModule",{value:!0});mXt(dXt());mXt(wit())});var gXt=H(Eit=>{"use strict";Object.defineProperty(Eit,"__esModule",{value:!0});var Mit=mit(),VOe=xit(),UOe=Sit(),qOe=FA(),GOe=function(){function e(t){this.context=t,this.measurer=new VOe.CacheMeasurer(this.context),this.wrapper=new UOe.Wrapper,this.writer=new qOe.Writer(this.measurer,this.context,this.wrapper)}return e.svg=function(t,r,n){return new e(new Mit.SvgContext(t,r,n))},e.canvas=function(t,r,n){return new e(new Mit.CanvasContext(t,r,n))},e.html=function(t,r,n){return new e(new Mit.HtmlContext(t,r,n))},e.prototype.write=function(t,r,n,i,o){this.writer.write(t,r,n,i,o)},e.prototype.clearMeasurerCache=function(){this.measurer.reset()},e}();Eit.Typesetter=GOe});var _l=H(bF=>{"use strict";function dS(e){for(var t in e)bF.hasOwnProperty(t)||(bF[t]=e[t])}Object.defineProperty(bF,"__esModule",{value:!0});dS(mit());dS(xit());dS(gXt());dS(pS());dS(Sit());dS(FA())});var _Xt=H(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});var WOe=(Er(),Ut(Mr)),YOe=window.Array;function jOe(e,t){if(e.length!==t.length)throw new Error("attempted to add arrays of unequal length");return e.map(function(r,n){return e[n]+t[n]})}mS.add=jOe;function XOe(e){var t=WOe.set(),r=[];return e.forEach(function(n){t.has(String(n))||(t.add(String(n)),r.push(n))}),r}mS.uniq=XOe;function $Oe(e){return YOe.prototype.concat.apply([],e)}mS.flatten=$Oe;function KOe(e,t){for(var r=[],n=0;n<t;n++)r[n]=typeof e=="function"?e(n):e;return r}mS.createFilledArray=KOe});var xXt=H(jA=>{"use strict";Object.defineProperty(jA,"__esModule",{value:!0});var vXt=(Er(),Ut(Mr)),ZOe=window.Math;function JOe(e,t){var r=yXt(e)+.05,n=yXt(t)+.05;return r>n?r/n:n/r}jA.contrast=JOe;function QOe(e,t){var r=vXt.color(e).brighter(t);return r.rgb().toString()}jA.lightenColor=QOe;function t7e(e,t){e.classed(t,!0);var r=e.style("background-color");if(r==="transparent")return null;var n=/\((.+)\)/.exec(r);if(!n)return null;var i=n[1].split(",").map(function(a){var s=+a,l=s.toString(16);return s<16?"0"+l:l});if(i.length===4&&i[3]==="00")return null;var o="#"+i.join("");return e.classed(t,!1),o}jA.colorTest=t7e;function yXt(e){var t=vXt.rgb(e),r=function(a){return a=a/255,a<=.03928?a/12.92:ZOe.pow((a+.055)/1.055,2.4)},n=r(t.r),i=r(t.g),o=r(t.b);return .2126*n+.7152*i+.0722*o}});var Cit=H(ao=>{"use strict";Object.defineProperty(ao,"__esModule",{value:!0});var Tit=(Er(),Ut(Mr)),ma=window.Math;function e7e(e,t){for(var r=t;r!=null&&r!==e;)r=r.parentNode;return r===e}ao.contains=e7e;function wXt(e){var t;try{t=e.node().getBBox()}catch(r){t={x:0,y:0,width:0,height:0}}return t}ao.elementBBox=wXt;function r7e(e){if(e instanceof SVGElement)return wXt(Tit.select(e));if(e instanceof HTMLElement){var t=e.getBoundingClientRect();return{x:t.left,y:t.top,width:t.width,height:t.height}}else return{x:0,y:0,width:0,height:0}}ao.entityBounds=r7e;ao.SCREEN_REFRESH_RATE_MILLISECONDS=1e3/60;function n7e(e){window.requestAnimationFrame!=null?window.requestAnimationFrame(e):setTimeout(e,ao.SCREEN_REFRESH_RATE_MILLISECONDS)}ao.requestAnimationFramePolyfill=n7e;function i7e(e){var t=e instanceof Tit.selection?e.node():e,r=window.getComputedStyle(t);return kf(r,"width")+kf(r,"padding-left")+kf(r,"padding-right")+kf(r,"border-left-width")+kf(r,"border-right-width")}ao.elementWidth=i7e;function o7e(e){var t=e instanceof Tit.selection?e.node():e,r=window.getComputedStyle(t);return kf(r,"height")+kf(r,"padding-top")+kf(r,"padding-bottom")+kf(r,"border-top-width")+kf(r,"border-bottom-width")}ao.elementHeight=o7e;var Lc="\\s",XA="(?:[-+]?[0-9]*\\.?[0-9]+)",SXt="(?:(?:"+Lc+"+,?"+Lc+"*)|(?:,"+Lc+"*))",a7e=new RegExp("translate"+Lc+"*\\("+Lc+"*("+XA+")(?:"+SXt+"("+XA+"))?"+Lc+"*\\)"),s7e=new RegExp("rotate"+Lc+"*\\("+Lc+"*("+XA+")"+Lc+"*\\)"),l7e=new RegExp("scale"+Lc+"*\\("+Lc+"*("+XA+")(?:"+SXt+"("+XA+"))?"+Lc+"*\\)");function c7e(e){var t=a7e.exec(e.attr("transform"));if(t!=null){var r=t[1],n=t[2],i=n===void 0?0:n;return[+r,+i]}else return[0,0]}ao.getTranslateValues=c7e;function u7e(e){var t=s7e.exec(e.attr("transform"));if(t!=null){var r=t[1];return+r}else return 0}ao.getRotate=u7e;function h7e(e){var t=l7e.exec(e.attr("transform"));if(t!=null){var r=t[1],n=t[2];return[+r,n==null?+r:+n]}else return[0,0]}ao.getScaleValues=h7e;function f7e(e,t){return!(ma.floor(e.right)<=ma.ceil(t.left)||ma.ceil(e.left)>=ma.floor(t.right)||ma.floor(e.bottom)<=ma.ceil(t.top)||ma.ceil(e.top)>=ma.floor(t.bottom))}ao.clientRectsOverlap=f7e;function p7e(e,t){return{left:e.left-t,top:e.top-t,right:e.right+t,bottom:e.bottom+t,width:e.width+t*2,height:e.height+t*2}}ao.expandRect=p7e;function d7e(e,t){return ma.floor(t.left)<=ma.ceil(e.left)&&ma.floor(t.top)<=ma.ceil(e.top)&&ma.floor(e.right)<=ma.ceil(t.right)&&ma.floor(e.bottom)<=ma.ceil(t.bottom)}ao.clientRectInside=d7e;function m7e(e,t,r,n){n===void 0&&(n=.5);var i=bXt(e),o=bXt(t);return r.x+r.width>=i.min-n&&r.x<=i.max+n&&r.y+r.height>=o.min-n&&r.y<=o.max+n}ao.intersectsBBox=m7e;function bXt(e){if(typeof e=="number"){var t=e;return{min:t,max:t}}var r=e;if(r instanceof Object&&"min"in r&&"max"in r)return r;throw new Error("input '"+e+"' can't be parsed as an Range")}function kf(e,t){var r=e.getPropertyValue(t),n=parseFloat(r);return n||0}function g7e(e){for(var t=[];e&&e instanceof HTMLElement;)t.push(e),e=e.parentElement;return t}ao.getHtmlElementAncestors=g7e;function _7e(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return x7e(r)}ao.getElementTransform=_7e;var y7e=/^matrix\(([^)]+)\)$/,v7e=/[, ]+/;function x7e(e){if(e==null||e==="none")return null;var t=e.match(y7e);if(t==null||t.length<2)return null;var r=t[1].split(v7e).map(function(n){return parseFloat(n)});return r.length!=6?null:r}});var Ait=H(so=>{"use strict";Object.defineProperty(so,"__esModule",{value:!0});var SF=(Er(),Ut(Mr)),MXt=Cit(),md=window.Math,b7e=[1,0,0,1,0,0];function w7e(e,t,r){return md.min(t,r)<=e&&e<=md.max(t,r)}so.inRange=w7e;function S7e(e,t,r){return md.min(md.max(t,e),r)}so.clamp=S7e;function M7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?SF.max(e):SF.max(e,n);return o!==void 0?o:i}so.max=M7e;function E7e(e,t,r){var n=typeof t=="function"?t:null,i=n==null?t:r,o=n==null?SF.min(e):SF.min(e,n);return o!==void 0?o:i}so.min=E7e;function T7e(e){return e!==e}so.isNaN=T7e;function C7e(e){return typeof e=="number"&&e-e<1}so.isValidNumber=C7e;function A7e(e,t,r){if(r===void 0&&(r=1),r===0)throw new Error("step cannot be 0");for(var n=md.max(md.ceil((t-e)/r),0),i=[],o=0;o<n;++o)i[o]=e+r*o;return i}so.range=A7e;function P7e(e,t){return md.pow(t.y-e.y,2)+md.pow(t.x-e.x,2)}so.distanceSquared=P7e;function I7e(e){return e/360*md.PI*2}so.degreesToRadians=I7e;function L7e(e,t){return t.topLeft.x<=e.x&&t.bottomRight.x>=e.x&&t.topLeft.y<=e.y&&t.bottomRight.y>=e.y}so.within=L7e;function k7e(e,t,r,n,i,o,a,s){return e<=i+a&&i<=e+r&&t<=o+s&&o<=t+n}so.boundsIntersects=k7e;function R7e(e){for(var t=MXt.getHtmlElementAncestors(e),r=b7e,n=null,i=0,o=t;i<o.length;i++){var a=o[i],s=MXt.getElementTransform(a);if(s!=null){var l=a.clientWidth/2,c=a.clientHeight/2;r=wF(r,[l,c]),r=EXt(r,TXt(s)),r=wF(r,[-l,-c])}var u=a.scrollLeft,h=a.scrollTop;(n===null||a===n)&&(u-=a.offsetLeft+a.clientLeft,h-=a.offsetTop+a.clientTop,n=a.offsetParent),r=wF(r,[u,h])}return r}so.getCumulativeTransform=R7e;function EXt(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}so.multiplyMatrix=EXt;function N7e(e,t){return[t[0],t[1],t[2],t[3],t[4]+e[0],t[5]+e[1]]}so.premultiplyTranslate=N7e;function wF(e,t){return[e[0],e[1],e[2],e[3],e[0]*t[0]+e[2]*t[1]+e[4],e[1]*t[0]+e[3]*t[1]+e[5]]}so.multiplyTranslate=wF;function TXt(e){var t=e[0]*e[3]-e[1]*e[2];if(t===0)throw new Error("singular matrix");var r=1/t;return[r*e[3],r*-e[1],r*-e[2],r*e[0],r*(-e[3]*e[4]+e[2]*e[5]),r*(e[1]*e[4]+-e[0]*e[5])]}so.invertMatrix=TXt;function D7e(e,t){return{x:e[0]*t.x+e[2]*t.y+e[4],y:e[1]*t.x+e[3]*t.y+e[5]}}so.applyTransform=D7e});var CXt=H(MF=>{"use strict";Object.defineProperty(MF,"__esModule",{value:!0});var O7e=function(){function e(){}return e.prototype.split=function(t,r){for(var n=Math.ceil(t.length/2),i=0;i<n;i++)r[0].insert(t[i]);for(var i=n;i<t.length;i++)r[1].insert(t[i])},e}();MF.SplitStrategyTrivial=O7e;var z7e=function(){function e(){}return e.prototype.split=function(t,r){for(t=t.slice(),this.chooseFirstSplit(t,r);t.length>0;)this.addNext(t,r)},e.prototype.chooseFirstSplit=function(t,r){for(var n=0,i=0,o=t.length-1,a=t.length-1,s=1;s<t.length-1;s++){var l=t[s];l.bounds.xl>t[o].bounds.xl?o=s:l.bounds.xh<t[n].bounds.xh&&(n=s),l.bounds.yl>t[a].bounds.yl?a=s:l.bounds.yh<t[i].bounds.yh&&(i=s)}var c=Math.abs(t[n].bounds.xh-t[o].bounds.xl),u=Math.abs(t[i].bounds.yh-t[a].bounds.yl),h=c>u?[n,o]:[i,a],f=h[0],p=h[1];f===p&&(f=0,p=t.length-1),r[0].insert(t.splice(Math.max(f,p),1)[0]),r[1].insert(t.splice(Math.min(f,p),1)[0])},e.prototype.addNext=function(t,r){for(var n=null,i=null,o=null,a=0;a<t.length;a++){var s=t[a],l=r[0].unionAreaDifference(s.bounds),c=r[1].unionAreaDifference(s.bounds);(l<i||n==null)&&(n=a,i=l,o=r[0]),c<i&&(n=a,i=c,o=r[1])}o.insert(t.splice(n,1)[0])},e}();MF.SplitStrategyLinear=z7e});var Iit=H(gd=>{"use strict";Object.defineProperty(gd,"__esModule",{value:!0});var F7e=CXt(),B7e=5,H7e=new F7e.SplitStrategyLinear,Rf;(function(e){e[e.PASS=0]="PASS",e[e.FAIL=1]="FAIL",e[e.PASS_AND_OVERWRITE=2]="PASS_AND_OVERWRITE"})(Rf=gd.QueryPredicateResult||(gd.QueryPredicateResult={}));function EF(e,t,r){var n=1/0,i=1/0,o=1/0;return function(a){var s=t(a.bounds,e),l=r(a.bounds,e);return a.value!=null?s<n?(n=s,i=s,o=l,Rf.PASS_AND_OVERWRITE):s===n?Rf.PASS:Rf.FAIL:s>o?Rf.FAIL:(i=Math.min(s,i),o=Math.max(l,o),Rf.PASS)}}gd.createMinimizingNodePredicate=EF;function Pit(e,t){return function(r,n){return t(n.bounds,e)-t(r.bounds,e)}}gd.createNodeSort=Pit;var V7e=function(){function e(t,r){t===void 0&&(t=B7e),r===void 0&&(r=H7e),this.maxNodeChildren=t,this.splitStrategy=r,this.root=new TF(!0),this.size=0}return e.prototype.getRoot=function(){return this.root},e.prototype.clear=function(){this.root=new TF(!0),this.size=0},e.prototype.insert=function(t,r){for(var n=this.root;!n.leaf;)n=n.subtree(t);var i=TF.valueNode(t,r);for(n.insert(i),this.size+=1;n.overflow(this.maxNodeChildren);)n=n.split(this.splitStrategy),n.parent==null&&(this.root=n);return i},e.prototype.locate=function(t){return this.query(function(r){return r.contains(t)})},e.prototype.locateNearest=function(t){var r=EF(t,Qa.distanceSquaredToNearEdge,Qa.distanceSquaredToFarEdge),n=this.queryNodes(r);return n.map(function(i){return i.value})},e.prototype.locateNearestX=function(t){var r=EF(t,Qa.absoluteDistanceToNearEdgeX,Qa.absoluteDistanceToFarEdgeX),n=this.queryNodes(r);return n.sort(Pit(t,Qa.absoluteDistanceToNearEdgeY)),n.map(function(i){return i.value})},e.prototype.locateNearestY=function(t){var r=EF(t,Qa.absoluteDistanceToNearEdgeY,Qa.absoluteDistanceToFarEdgeY),n=this.queryNodes(r);return n.sort(Pit(t,Qa.absoluteDistanceToNearEdgeX)),n.map(function(i){return i.value})},e.prototype.intersect=function(t){return this.query(function(r){return Qa.isBoundsOverlapBounds(r,t)})},e.prototype.intersectX=function(t){return this.query(function(r){return Qa.isBoundsOverlapX(r,t)})},e.prototype.intersectY=function(t){return this.query(function(r){return Qa.isBoundsOverlapY(r,t)})},e.prototype.query=function(t){var r=[];if(this.root.bounds!=null&&!t(this.root.bounds))return r;for(var n=[this.root];n.length>0;)for(var i=n.shift(),o=0;o<i.entries.length;o++){var a=i.entries[o];t(a.bounds)&&(i.leaf?r.push(a.value):n.push(a))}return r},e.prototype.queryNodes=function(t){var r=[];if(this.root.bounds!=null&&t(this.root)===Rf.FAIL)return r;for(var n=[this.root];n.length>0;)for(var i=n.shift(),o=0;o<i.entries.length;o++){var a=i.entries[o],s=t(a);s===Rf.PASS_AND_OVERWRITE&&(r=[]),(s===Rf.PASS||s===Rf.PASS_AND_OVERWRITE)&&(i.leaf?r.push(a):n.push(a))}return r},e}();gd.RTree=V7e;var TF=function(){function e(t){this.leaf=t,this.bounds=null,this.entries=[],this.parent=null,this.value=null}return e.valueNode=function(t,r){var n=new e(!0);return n.bounds=t,n.value=r,n},e.prototype.overflow=function(t){return this.entries.length>t},e.prototype.insert=function(t){this.entries.push(t),t.parent=this;for(var r=this;r!=null;)r.bounds=Qa.unionAll([r.bounds,t.bounds]),r=r.parent;return this},e.prototype.remove=function(t){var r=this.entries.indexOf(t);if(r>=0){this.entries.splice(r,1);for(var n=this;n!=null;)n.bounds=Qa.unionAll(n.entries.map(function(i){return i.bounds})),n=n.parent}return this},e.prototype.subtree=function(t){for(var r=1/0,n=null,i=0;i<this.entries.length;i++){var o=this.entries[i],a=o.unionAreaDifference(t);(a<r||a===r&&n!=null&&o.entries.length<n.entries.length)&&(n=o)}return n},e.prototype.split=function(t){this.parent!=null&&this.parent.remove(this);var r=[new e(this.leaf),new e(this.leaf)];t.split(this.entries,r);var n=this.parent!=null?this.parent:new e(!1);return n.insert(r[0]),n.insert(r[1]),n.leaf=!1,n},e.prototype.unionAreaDifference=function(t){return Math.abs(Qa.union(this.bounds,t).area()-this.bounds.area())},e.prototype.maxDepth=function(){return this.leaf?1:1+this.entries.map(function(t){return t.maxDepth()}).reduce(function(t,r){return Math.max(t,r)})},e}();gd.RTreeNode=TF;var Qa=function(){function e(t,r,n,i){this.xl=t,this.yl=r,this.xh=n,this.yh=i,this.width=this.xh-this.xl,this.height=this.yh-this.yl}return e.xywh=function(t,r,n,i){return new e(t,r,t+n,r+i)},e.entityBounds=function(t){return new e(t.x,t.y,t.x+t.width,t.y+t.height)},e.bounds=function(t){return e.pointPair(t.topLeft,t.bottomRight)},e.pointPair=function(t,r){return new e(Math.min(t.x,r.x),Math.min(t.y,r.y),Math.max(t.x,r.x),Math.max(t.y,r.y))},e.points=function(t){if(t.length<2)throw new Error("need at least 2 points to create bounds");var r=t.map(function(i){return i.x}),n=t.map(function(i){return i.y});return new e(r.reduce(function(i,o){return Math.min(i,o)}),n.reduce(function(i,o){return Math.min(i,o)}),r.reduce(function(i,o){return Math.max(i,o)}),n.reduce(function(i,o){return Math.max(i,o)}))},e.union=function(t,r){return new e(Math.min(t.xl,r.xl),Math.min(t.yl,r.yl),Math.max(t.xh,r.xh),Math.max(t.yh,r.yh))},e.unionAll=function(t){return t=t.filter(function(r){return r!=null}),t.length===0?null:t.reduce(function(r,n){return e.union(r,n)})},e.isBoundsOverlapBounds=function(t,r){return e.isBoundsOverlapX(t,r)&&e.isBoundsOverlapY(t,r)},e.isBoundsOverlapX=function(t,r){return!(t.xh<r.xl)&&!(t.xl>r.xh)},e.isBoundsOverlapY=function(t,r){return!(t.yh<r.yl)&&!(t.yl>r.yh)},e.absoluteDistanceToNearEdgeX=function(t,r){var n=t.width/2,i=t.xl+n;return Math.max(Math.abs(r.x-i)-n,0)},e.absoluteDistanceToNearEdgeY=function(t,r){var n=t.height/2,i=t.yl+n;return Math.max(Math.abs(r.y-i)-n,0)},e.absoluteDistanceToFarEdgeX=function(t,r){var n=e.absoluteDistanceToNearEdgeX(t,r);return n===0?0:n+t.width},e.absoluteDistanceToFarEdgeY=function(t,r){var n=e.absoluteDistanceToNearEdgeY(t,r);return n===0?0:n+t.height},e.distanceSquaredToNearEdge=function(t,r){var n=e.absoluteDistanceToNearEdgeX(t,r),i=e.absoluteDistanceToNearEdgeY(t,r);return n*n+i*i},e.distanceSquaredToFarEdge=function(t,r){var n=e.absoluteDistanceToFarEdgeX(t,r),i=e.absoluteDistanceToFarEdgeY(t,r);return n*n+i*i},e.prototype.area=function(){return this.areaCached==null&&(this.areaCached=(this.xh-this.xl)*(this.yh-this.yl)),this.areaCached},e.prototype.contains=function(t){return this.xl<=t.x&&this.xh>=t.x&&this.yl<=t.y&&this.yh>=t.y},e}();gd.RTreeBounds=Qa});var IXt=H(_d=>{"use strict";Object.defineProperty(_d,"__esModule",{value:!0});var AXt=(Er(),Ut(Mr)),U7e=Oe(),Xg=Fe(),q7e=If();_d.IStackingOrder=q7e.makeEnum(["topdown","bottomup"]);var PXt=window.Math;function G7e(e,t,r,n){n===void 0&&(n="bottomup");var i=AXt.map(),o=AXt.map(),a=new Xg.Map;n==="topdown"&&(e=e.slice(),e.reverse());for(var s=0,l=e;s<l.length;s++){for(var c=l[s],u=new Xg.Map,h=c.data(),f=h.length,p=0;p<f;p++){var d=h[p],g=t(d,p,c),_=_d.normalizeKey(g),y=+r(d,p,c),x=void 0,b=y>=0?i:o;b.has(_)?(x=b.get(_),b.set(_,x+y)):(x=0,b.set(_,y)),u.set(_,{offset:x,value:y,axisValue:g,originalDatum:d,originalDataset:c,originalIndex:p})}a.set(c,u)}return a}_d.stack=G7e;function W7e(e){var t=new Xg.Map,r=new Xg.Map;return e.forEach(function(n){n.forEach(function(i,o){var a=i.offset+i.value,s=Xg.Math.max([a,i.offset],i.offset),l=Xg.Math.min([a,i.offset],i.offset),c=i.axisValue;t.has(o)?t.get(o).extent<s&&t.set(o,{extent:s,axisValue:c,stackedDatum:i}):t.set(o,{extent:s,axisValue:c,stackedDatum:i}),r.has(o)?r.get(o).extent>l&&r.set(o,{extent:l,axisValue:c,stackedDatum:i}):r.set(o,{extent:l,axisValue:c,stackedDatum:i})})}),{maximumExtents:t,minimumExtents:r}}_d.stackedExtents=W7e;function Y7e(e,t,r){var n=[];e.forEach(function(a,s){for(var l=s.data(),c=l.length,u=0;u<c;u++){var h=l[u];if(!(r!=null&&!r(h,u,s))){var f=a.get(_d.normalizeKey(t(h,u,s)));n.push(f.value+f.offset)}}});var i=Xg.Math.max(n,0),o=Xg.Math.min(n,0);return[PXt.min(o,0),PXt.max(0,i)]}_d.stackedExtent=Y7e;_d.normalizeKey=U7e.memoize(function(e){return String(e)})});var $A=H(CF=>{"use strict";Object.defineProperty(CF,"__esModule",{value:!0});CF.SHOW_WARNINGS=!0;CF.ADD_TITLE_ELEMENTS=!0});var AF=H(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});var j7e=$A();function LXt(e){!j7e.SHOW_WARNINGS||console.warn(e)}gS.warn=LXt;function kXt(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return t===0?(e(r),-1):window.setTimeout(e,t,r)}gS.setTimeout=kXt;function X7e(e,t,r){var n=null,i=[],o=function(){t.apply(r,i)};return function(){i=Array.prototype.slice.call(arguments),clearTimeout(n),n=kXt(o,e)}}gS.debounce=X7e;function $7e(e,t,r){r===void 0&&(r=""),LXt("Method "+e+" has been deprecated in version "+t+". Please refer to the release notes. "+r)}gS.deprecated=$7e});var RXt=H(Lit=>{"use strict";Object.defineProperty(Lit,"__esModule",{value:!0});var K7e=function(){function e(t,r,n){this.entryIndex=t,this.exitIndex=t,this.minIndex=t,this.maxIndex=t,this.bucketValue=r,this.minValue=n,this.maxValue=n}return e.prototype.isInBucket=function(t){return t==this.bucketValue},e.prototype.addToBucket=function(t,r){t<this.minValue&&(this.minValue=t,this.minIndex=r),t>this.maxValue&&(this.maxValue=t,this.maxIndex=r),this.exitIndex=r},e.prototype.getUniqueIndices=function(){var t=[this.entryIndex,this.maxIndex,this.minIndex,this.exitIndex];return t.filter(function(r,n){return n==0||r!=t[n-1]})},e}();Lit.Bucket=K7e});var Rit=H(kit=>{"use strict";Object.defineProperty(kit,"__esModule",{value:!0});var Z7e=function(){function e(){typeof window.Set=="function"?this._es6Set=new window.Set:this._values=[],this.size=0}return e.prototype.add=function(t){return this._es6Set!=null?(this._es6Set.add(t),this.size=this._es6Set.size,this):(this.has(t)||(this._values.push(t),this.size=this._values.length),this)},e.prototype.delete=function(t){if(this._es6Set!=null){var r=this._es6Set.delete(t);return this.size=this._es6Set.size,r}var n=this._values.indexOf(t);return n!==-1?(this._values.splice(n,1),this.size=this._values.length,!0):!1},e.prototype.has=function(t){return this._es6Set!=null?this._es6Set.has(t):this._values.indexOf(t)!==-1},e.prototype.forEach=function(t,r){var n=this;if(this._es6Set!=null){var i=function(o,a){return t.call(r,o,a,n)};this._es6Set.forEach(i,r);return}this._values.forEach(function(o){t.call(r,o,o,n)})},e}();kit.Set=Z7e});var NXt=H(Nit=>{"use strict";Object.defineProperty(Nit,"__esModule",{value:!0});var J7e=(de(),Ut(pe)),Q7e=Rit(),tze=function(e){J7e.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.callCallbacks=function(){for(var r=this,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return this.forEach(function(o){o.apply(r,n)}),this},t}(Q7e.Set);Nit.CallbackSet=tze});var DXt=H(Dit=>{"use strict";Object.defineProperty(Dit,"__esModule",{value:!0});var $g=Iit(),eze=function(){function e(){this._entities=[],this._rtree=new $g.RTree}return e.prototype.addAll=function(t,r,n){if(this._entities=this._entities.concat(t),n!==void 0)for(var i=$g.RTreeBounds.bounds(n),o=0;o<t.length;o++){var a=t[o],s=$g.RTreeBounds.entityBounds(r(a));$g.RTreeBounds.isBoundsOverlapBounds(i,s)&&this._rtree.insert(s,a)}else for(var o=0;o<t.length;o++){var a=t[o],s=$g.RTreeBounds.entityBounds(r(a));this._rtree.insert(s,a)}},e.prototype.entityNearest=function(t){return this._rtree.locateNearest(t).pop()},e.prototype.entityNearestX=function(t){return this._rtree.locateNearestX(t).pop()},e.prototype.entityNearestY=function(t){return this._rtree.locateNearestY(t).pop()},e.prototype.entitiesInBounds=function(t){return this._rtree.intersect($g.RTreeBounds.entityBounds(t))},e.prototype.entitiesInXBounds=function(t){return this._rtree.intersectX($g.RTreeBounds.entityBounds(t))},e.prototype.entitiesInYBounds=function(t){return this._rtree.intersectY($g.RTreeBounds.entityBounds(t))},e.prototype.entities=function(){return this._entities},e}();Dit.EntityStore=eze});var OXt=H(Oit=>{"use strict";Object.defineProperty(Oit,"__esModule",{value:!0});var rze=Ait(),nze=function(){function e(){typeof window.Map=="function"?this._es6Map=new window.Map:this._keyValuePairs=[]}return e.prototype.set=function(t,r){if(rze.isNaN(t))throw new Error("NaN may not be used as a key to the Map");if(this._es6Map!=null)return this._es6Map.set(t,r),this;for(var n=0;n<this._keyValuePairs.length;n++)if(this._keyValuePairs[n].key===t)return this._keyValuePairs[n].value=r,this;return this._keyValuePairs.push({key:t,value:r}),this},e.prototype.get=function(t){if(this._es6Map!=null)return this._es6Map.get(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return this._keyValuePairs[r].value},e.prototype.has=function(t){if(this._es6Map!=null)return this._es6Map.has(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return!0;return!1},e.prototype.forEach=function(t,r){var n=this;if(this._es6Map!=null){var i=function(o,a){return t.call(r,o,a,n)};this._es6Map.forEach(i,r);return}this._keyValuePairs.forEach(function(o){t.call(r,o.value,o.key,n)})},e.prototype.delete=function(t){if(this._es6Map!=null)return this._es6Map.delete(t);for(var r=0;r<this._keyValuePairs.length;r++)if(this._keyValuePairs[r].key===t)return this._keyValuePairs.splice(r,1),!0;return!1},e}();Oit.Map=nze});var zXt=H(zit=>{"use strict";Object.defineProperty(zit,"__esModule",{value:!0});function ize(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var r={},n=0,i=e;n<i.length;n++)for(var o=i[n],a=Object.keys(o),s=0,l=a;s<l.length;s++){var c=l[s];r[c]=o[c]}return r}zit.assign=ize});var HXt=H(PF=>{"use strict";Object.defineProperty(PF,"__esModule",{value:!0});var Fit=Fe(),FXt="__Plottable_ClientTranslator";function oze(e){var t=e.root().rootElement().node(),r=t[FXt];return r==null&&(r=new BXt(t),t[FXt]=r),r}PF.getTranslator=oze;var BXt=function(){function e(t){this._rootElement=t}return e.prototype.computePosition=function(t,r){var n={x:t,y:r},i=Fit.Math.getCumulativeTransform(this._rootElement);if(i==null)return n;var o=Fit.Math.applyTransform(i,n);return o},e.isEventInside=function(t,r){return Fit.DOM.contains(t.root().rootElement().node(),r.target)},e}();PF.Translator=BXt});var Fe=H(qo=>{"use strict";Object.defineProperty(qo,"__esModule",{value:!0});var Kg=(de(),Ut(pe)),aze=_Xt();qo.Array=aze;var sze=xXt();qo.Color=sze;var lze=Cit();qo.DOM=lze;var cze=Ait();qo.Math=cze;var uze=Iit();qo.RTree=uze;var hze=IXt();qo.Stacking=hze;var fze=AF();qo.Window=fze;Kg.__exportStar(RXt(),qo);Kg.__exportStar(NXt(),qo);Kg.__exportStar(Yg(),qo);Kg.__exportStar(DXt(),qo);Kg.__exportStar(OXt(),qo);Kg.__exportStar(zXt(),qo);Kg.__exportStar(Rit(),qo);Kg.__exportStar(HXt(),qo)});var Hit=H(KA=>{"use strict";Object.defineProperty(KA,"__esModule",{value:!0});var VXt=Fe(),Bit=IF(),pze=function(){function e(){}return e.prototype.render=function(){Bit.flush()},e}();KA.Immediate=pze;var dze=function(){function e(){}return e.prototype.render=function(){VXt.DOM.requestAnimationFramePolyfill(Bit.flush)},e}();KA.AnimationFrame=dze;var mze=function(){function e(){this._timeoutMsec=VXt.DOM.SCREEN_REFRESH_RATE_MILLISECONDS}return e.prototype.render=function(){setTimeout(Bit.flush,this._timeoutMsec)},e}();KA.Timeout=mze});var IF=H(zu=>{"use strict";Object.defineProperty(zu,"__esModule",{value:!0});var _S=Fe(),gze=If(),LF=Hit(),JA=new _S.Set,Vit=new _S.Set,kF=!1,Uit=!1;zu.Policy=gze.makeEnum(["immediate","animationFrame","timeout"]);var ZA=new LF.AnimationFrame;function _ze(e){if(e==null)return ZA;switch(e){case zu.Policy.immediate:ZA=new LF.Immediate;break;case zu.Policy.animationFrame:ZA=new LF.AnimationFrame;break;case zu.Policy.timeout:ZA=new LF.Timeout;break;default:_S.Window.warn("Unrecognized renderPolicy: "+e)}}zu.renderPolicy=_ze;function yze(e){Uit&&_S.Window.warn("Registered to render while other components are flushing: request may be ignored"),JA.add(e),qXt()}zu.registerToRender=yze;function UXt(e){Vit.add(e),JA.add(e),qXt()}zu.registerToComputeLayoutAndRender=UXt;function vze(e){UXt(e)}zu.registerToComputeLayout=vze;function qXt(){kF||(kF=!0,ZA.render())}function xze(){if(kF){Vit.forEach(function(t){return t.computeLayout()}),JA.forEach(function(t){return t.render()}),Uit=!0;var e=new _S.Set;JA.forEach(function(t){try{t.renderImmediately()}catch(r){window.setTimeout(function(){throw r},0),e.add(t)}}),Vit=new _S.Set,JA=e,kF=!1,Uit=!1}}zu.flush=xze});var kc=H(QA=>{"use strict";Object.defineProperty(QA,"__esModule",{value:!0});var GXt=(Er(),Ut(Mr)),RF=IF(),yS=Fe(),bze=Oe(),WXt=Yg(),YXt=If();QA.XAlignment=YXt.makeEnum(["left","center","right"]);QA.YAlignment=YXt.makeEnum(["top","center","bottom"]);var wze=function(){function e(){this._overflowHidden=!1,this._origin={x:0,y:0},this._xAlignment="left",this._yAlignment="top",this._isSetup=!1,this._isAnchored=!1,this._cssClasses=new yS.Set,this._destroyed=!1,this._onAnchorCallbacks=new yS.CallbackSet,this._onDetachCallbacks=new yS.CallbackSet,this._cssClasses.add("component")}return e.prototype.anchor=function(t){if(t=WXt.coerceExternalD3(t),this._destroyed)throw new Error("Can't reuse destroy()-ed Components!");return this.isRoot()&&(this._rootElement=t,this._rootElement.classed("plottable",!0)),this._element!=null?t.node().appendChild(this._element.node()):(this._element=t.append("div"),this._setup()),this._isAnchored=!0,this._onAnchorCallbacks.callCallbacks(this),this},e.prototype.onAnchor=function(t){return this._isAnchored&&t(this),this._onAnchorCallbacks.add(t),this},e.prototype.offAnchor=function(t){return this._onAnchorCallbacks.delete(t),this},e.prototype._setup=function(){var t=this;this._isSetup||(this._cssClasses.forEach(function(r){t._element.classed(r,!0)}),this._cssClasses=new yS.Set,this._backgroundContainer=this._element.append("svg").classed("background-container",!0),this._content=this._element.append("svg").classed("content",!0),this._foregroundContainer=this._element.append("svg").classed("foreground-container",!0),this._overflowHidden?this._content.classed("component-overflow-hidden",!0):this._content.classed("component-overflow-visible",!0),this._isSetup=!0)},e.prototype.requestedSpace=function(t,r){return{minWidth:0,minHeight:0}},e.prototype.computeLayout=function(t,r,n){if(t==null||r==null||n==null){if(this._element==null)throw new Error("anchor() must be called before computeLayout()");if(this._rootElement!=null){t={x:0,y:0};var i=this._rootElement.node();r=yS.DOM.elementWidth(i),n=yS.DOM.elementHeight(i)}else throw new Error("null arguments cannot be passed to computeLayout() on a non-root, unanchored node")}var o=this._sizeFromOffer(r,n),a=o.height,s=o.width,l=e._xAlignToProportion[this._xAlignment],c=e._yAlignToProportion[this._yAlignment],u=t.x+(r-s)*l,h=t.y+(n-a)*c;return this.setBounds(s,a,u,h),this},e.prototype.setBounds=function(t,r,n,i){return n===void 0&&(n=0),i===void 0&&(i=0),this._width=t,this._height=r,this._origin={x:n,y:i},this._element!=null&&this._element.styles({left:n+"px",height:r+"px",top:i+"px",width:t+"px"}),this._resizeHandler!=null&&this._resizeHandler({width:t,height:r}),this},e.prototype._sizeFromOffer=function(t,r){var n=this.requestedSpace(t,r);return{width:this.fixedWidth()?Math.min(t,n.minWidth):t,height:this.fixedHeight()?Math.min(r,n.minHeight):r}},e.prototype.render=function(){return this._isAnchored&&this._isSetup&&this.width()>=0&&this.height()>=0&&RF.registerToRender(this),this},e.prototype.renderLowPriority=function(){return this.render()},e.prototype._scheduleComputeLayout=function(){this._isAnchored&&this._isSetup&&RF.registerToComputeLayoutAndRender(this)},e.prototype.onResize=function(t){return this._resizeHandler=t,this},e.prototype.renderImmediately=function(){return this},e.prototype.redraw=function(){return this._isAnchored&&this._isSetup&&(this.isRoot()?this._scheduleComputeLayout():this.parent().redraw()),this},e.prototype.invalidateCache=function(){},e.prototype.renderTo=function(t){if(this.detach(),t!=null){var r=void 0;if(typeof t=="string"||bze.isElement(t)?r=GXt.select(t):r=WXt.coerceExternalD3(t),!r.node()||r.node().nodeName==null)throw new Error("Plottable requires a valid Element to renderTo");if(r.node().nodeName==="svg")throw new Error("Plottable 3.x and later can only renderTo an HTML component; pass a div instead!");this.anchor(r)}if(this._element==null)throw new Error("If a Component has never been rendered before, then renderTo must be given a node to render to, or a d3.Selection, or a selector string");return RF.registerToComputeLayoutAndRender(this),RF.flush(),this},e.prototype.xAlignment=function(t){if(t==null)return this._xAlignment;if(t=t.toLowerCase(),e._xAlignToProportion[t]==null)throw new Error("Unsupported alignment: "+t);return this._xAlignment=t,this.redraw(),this},e.prototype.yAlignment=function(t){if(t==null)return this._yAlignment;if(t=t.toLowerCase(),e._yAlignToProportion[t]==null)throw new Error("Unsupported alignment: "+t);return this._yAlignment=t,this.redraw(),this},e.prototype.hasClass=function(t){return t==null?!1:this._element==null?this._cssClasses.has(t):this._element.classed(t)},e.prototype.addClass=function(t){return t==null?this:(this._element==null?this._cssClasses.add(t):this._element.classed(t,!0),this)},e.prototype.removeClass=function(t){return t==null?this:(this._element==null?this._cssClasses.delete(t):this._element.classed(t,!1),this)},e.prototype.fixedWidth=function(){return!1},e.prototype.fixedHeight=function(){return!1},e.prototype.detach=function(){return this.parent(null),this._isAnchored&&this._element.remove(),this._isAnchored=!1,this._onDetachCallbacks.callCallbacks(this),this},e.prototype.onDetach=function(t){return this._onDetachCallbacks.add(t),this},e.prototype.offDetach=function(t){return this._onDetachCallbacks.delete(t),this},e.prototype.parent=function(t){if(t===void 0)return this._parent;if(t!==null&&!t.has(this))throw new Error("Passed invalid parent");return this._parent=t,this},e.prototype.bounds=function(){var t=this.origin();return{topLeft:t,bottomRight:{x:t.x+this.width(),y:t.y+this.height()}}},e.prototype.destroy=function(){this._destroyed=!0,this.detach()},e.prototype.width=function(){return this._width},e.prototype.height=function(){return this._height},e.prototype.origin=function(){return{x:this._origin.x,y:this._origin.y}},e.prototype.originToRoot=function(){for(var t=this.origin(),r=this.parent();r!=null;){var n=r.origin();t.x+=n.x,t.y+=n.y,r=r.parent()}return t},e.prototype.root=function(){for(var t=this;!t.isRoot();)t=t.parent();return t},e.prototype.isRoot=function(){return this.parent()==null},e.prototype.foreground=function(){return this._foregroundContainer},e.prototype.content=function(){return this._content},e.prototype.element=function(){return this._element},e.prototype.rootElement=function(){return this.root()._rootElement},e.prototype.background=function(){return this._backgroundContainer},e._xAlignToProportion={left:0,center:.5,right:1},e._yAlignToProportion={top:0,center:.5,bottom:1},e}();QA.Component=wze});var Bu=H(Fu=>{"use strict";Object.defineProperty(Fu,"__esModule",{value:!0});var vS=(Er(),Ut(Mr)),Sze=!1;function Mze(e,t,r){e===void 0&&(e=2),t===void 0&&(t="$"),r===void 0&&(r=!0);var n=qit(e);return function(i){var o=n(Math.abs(i));return o!==""&&(r?o=t+o:o+=t,i<0&&(o="-"+o)),o}}Fu.currency=Mze;function qit(e){return e===void 0&&(e=3),NF(e),function(t){return t.toFixed(e)}}Fu.fixed=qit;function Eze(e){return e===void 0&&(e=3),NF(e),function(t){if(typeof t=="number"){var r=Math.pow(10,e);return String(Math.round(t*r)/r)}else return String(t)}}Fu.general=Eze;function Tze(){return function(e){return String(e)}}Fu.identity=Tze;function Cze(e){e===void 0&&(e=0);var t=qit(e);return function(r){var n=r*100,i=r.toString(),o=Math.pow(10,i.length-(i.indexOf(".")+1));return n=parseInt((n*o).toString(),10)/o,t(n)+"%"}}Fu.percentage=Cze;function Aze(e){return e===void 0&&(e=3),NF(e),function(t){return vS.format("."+e+"s")(t)}}Fu.siSuffix=Aze;function Pze(e){e===void 0&&(e=3),NF(e);var t="KMBTQ",r=vS.format("."+e+"e"),n=vS.format("."+e+"f"),i=Math.pow(10,3*(t.length+1)),o=Math.pow(10,-e);return function(a){var s=Math.abs(a);if((s<o||s>=i)&&s!==0)return r(a);for(var l=-1;s>=Math.pow(1e3,l+2)&&l<t.length-1;)l++;var c="";return l===-1?c=n(a):c=n(a/Math.pow(1e3,l+1))+t[l],(a>0&&c.substr(0,4)==="1000"||a<0&&c.substr(0,5)==="-1000")&&(l<t.length-1?(l++,c=n(a/Math.pow(1e3,l+1))+t[l]):c=r(a)),c}}Fu.shortScale=Pze;function Ize(){var e=[{specifier:".%L",predicate:function(t){return t.getMilliseconds()!==0}},{specifier:":%S",predicate:function(t){return t.getSeconds()!==0}},{specifier:"%I:%M",predicate:function(t){return t.getMinutes()!==0}},{specifier:"%I %p",predicate:function(t){return t.getHours()!==0}},{specifier:"%a %d",predicate:function(t){return t.getDay()!==0&&t.getDate()!==1}},{specifier:"%b %d",predicate:function(t){return t.getDate()!==1}},{specifier:"%b",predicate:function(t){return t.getMonth()!==0}}];return function(t){var r=e.filter(function(i){return i.predicate(t)}),n=r.length>0?r[0].specifier:"%Y";return vS.timeFormat(n)(t)}}Fu.multiTime=Ize;function Lze(e,t){return t===void 0&&(t=Sze),t?vS.utcFormat(e):vS.timeFormat(e)}Fu.time=Lze;function NF(e){if(e<0||e>20)throw new RangeError("Formatter precision must be between 0 and 20");if(e!==Math.floor(e))throw new RangeError("Formatter precision must be an integer")}});var t4=H(DF=>{"use strict";Object.defineProperty(DF,"__esModule",{value:!0});var kze=(de(),Ut(pe)),yd=(Er(),Ut(Mr)),Git=_l(),Rze=kc(),jXt=Bu(),xS=Fe(),Nze=If();DF.AxisOrientation=Nze.makeEnum(["bottom","left","right","top"]);var Dze=function(e){kze.__extends(t,e);function t(r,n){var i=e.call(this)||this;if(i._endTickLength=5,i._innerTickLength=5,i._tickLabelPadding=10,i._margin=15,i._showEndTickLabels=!1,i._annotationsEnabled=!1,i._annotationTierCount=1,r==null||n==null)throw new Error("Axis requires a scale and orientation");return i._scale=r,i.orientation(n),i._setDefaultAlignment(),i.addClass("axis"),i.isHorizontal()?i.addClass("x-axis"):i.addClass("y-axis"),i.formatter(jXt.identity()),i._rescaleCallback=function(o){return i._rescale()},i._scale.onUpdate(i._rescaleCallback),i._annotatedTicks=[],i._annotationFormatter=jXt.identity(),i}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this._scale.offUpdate(this._rescaleCallback)},t.prototype.tickLabelDataOnElement=function(r){if(r!=null){for(var n;r!=null&&r.classList&&n===void 0;)r.classList.contains(t.TICK_LABEL_CLASS)?n=r:r=r.parentNode;return r===void 0?void 0:yd.select(r).datum()}},t.prototype._computeWidth=function(){return this._maxLabelTickLength()},t.prototype._computeHeight=function(){return this._maxLabelTickLength()},t.prototype.requestedSpace=function(r,n){var i=0,o=0;if(this.isHorizontal()){if(o=this._computeHeight()+this._margin,this.annotationsEnabled()){var a=this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING;o+=a*this.annotationTierCount()}}else if(i=this._computeWidth()+this._margin,this.annotationsEnabled()){var a=this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING;i+=a*this.annotationTierCount()}return{minWidth:i,minHeight:o}},t.prototype.fixedHeight=function(){return this.isHorizontal()},t.prototype.fixedWidth=function(){return!this.isHorizontal()},t.prototype._rescale=function(){this.render()},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.isHorizontal()?this._scale.range([0,this.width()]):this._scale.range([this.height(),0]),this},t.prototype._sizeFromOffer=function(r,n){var i=this.requestedSpace(r,n);return this.isHorizontal()?{width:r,height:i.minHeight}:{height:n,width:i.minWidth}},t.prototype._setup=function(){e.prototype._setup.call(this),this._tickMarkContainer=this.content().append("g").classed(t.TICK_MARK_CLASS+"-container",!0),this._tickLabelContainer=this.content().append("g").classed(t.TICK_LABEL_CLASS+"-container",!0),this._baseline=this.content().append("line").classed("baseline",!0),this._annotationContainer=this.content().append("g").classed("annotation-container",!0),this._annotationContainer.append("g").classed("annotation-line-container",!0),this._annotationContainer.append("g").classed("annotation-circle-container",!0),this._annotationContainer.append("g").classed("annotation-rect-container",!0);var r=this._annotationContainer.append("g").classed("annotation-label-container",!0),n=new Git.SvgContext(r.node());this._annotationMeasurer=new Git.CacheMeasurer(n),this._annotationWriter=new Git.Writer(this._annotationMeasurer,n)},t.prototype._getTickValues=function(){return[]},t.prototype.renderImmediately=function(){var r=this._getTickValues(),n=this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS).data(r),i=n.enter().append("line").classed(t.TICK_MARK_CLASS,!0).merge(n);return i.attrs(this._generateTickMarkAttrHash()),yd.select(i.nodes()[0]).classed(t.END_TICK_MARK_CLASS,!0).attrs(this._generateTickMarkAttrHash(!0)),yd.select(i.nodes()[r.length-1]).classed(t.END_TICK_MARK_CLASS,!0).attrs(this._generateTickMarkAttrHash(!0)),n.exit().remove(),this._baseline.attrs(this._generateBaselineAttrHash()),this.annotationsEnabled()?this._drawAnnotations():this._removeAnnotations(),this},t.prototype.annotatedTicks=function(r){return r==null?this._annotatedTicks:(this._annotatedTicks=r,this.render(),this)},t.prototype.annotationFormatter=function(r){return r==null?this._annotationFormatter:(this._annotationFormatter=r,this.render(),this)},t.prototype.annotationsEnabled=function(r){return r==null?this._annotationsEnabled:(this._annotationsEnabled=r,this.redraw(),this)},t.prototype.annotationTierCount=function(r){if(r==null)return this._annotationTierCount;if(r<0)throw new Error("annotationTierCount cannot be negative");return this._annotationTierCount=r,this.redraw(),this},t.prototype._drawAnnotations=function(){var r=this,n=t._ANNOTATION_LABEL_PADDING,i=new xS.Map,o=this._annotatedTicksToRender();o.forEach(function(P){var k=r._annotationMeasurer.measure(r.annotationFormatter()(P)),O={width:k.width+2*n,height:k.height+2*n};i.set(P,O)});var a=this._annotationMeasurer.measure().height+2*n,s=this._annotationToTier(i),l=new xS.Set,c=this.isHorizontal()?this.height():this.width(),u=this._coreSize(),h=Math.min(this.annotationTierCount(),Math.floor((c-u)/a));s.forEach(function(P,k){(P===-1||P>=h)&&l.add(k)});var f=function(P,k,O){var D=P.selectAll("."+O).data(o),B=D.enter().append(k).classed(O,!0).merge(D);return D.exit().remove(),B},p=function(P){switch(r.orientation()){case"bottom":case"right":return s.get(P)*a+u;case"top":case"left":return c-u-s.get(P)*a}},d=function(P){return r._scale.scale(P)},g=function(P){return l.has(P)?"hidden":"visible"},_;switch(this.orientation()){case"bottom":case"right":_=0;break;case"top":_=this.height();break;case"left":_=this.width();break}var y=this.isHorizontal();f(this._annotationContainer.select(".annotation-line-container"),"line",t.ANNOTATION_LINE_CLASS).attrs({x1:y?d:_,x2:y?d:p,y1:y?_:d,y2:y?p:d,visibility:g}),f(this._annotationContainer.select(".annotation-circle-container"),"circle",t.ANNOTATION_CIRCLE_CLASS).attrs({cx:y?d:_,cy:y?_:d,r:3});var x=function(P){switch(r.orientation()){case"bottom":case"right":return p(P);case"top":case"left":return p(P)-i.get(P).height}};f(this._annotationContainer.select(".annotation-rect-container"),"rect",t.ANNOTATION_RECT_CLASS).attrs({x:y?d:x,y:y?x:d,width:y?function(P){return i.get(P).width}:function(P){return i.get(P).height},height:y?function(P){return i.get(P).height}:function(P){return i.get(P).width},visibility:g});var b=this._annotationWriter,S=this.annotationFormatter(),C=f(this._annotationContainer.select(".annotation-label-container"),"g",t.ANNOTATION_LABEL_CLASS);C.selectAll(".text-container").remove(),C.attrs({transform:function(P){var k=y?d(P):x(P),O=y?x(P):d(P);return"translate("+k+","+O+")"},visibility:g}).each(function(P){b.write(S(P),y?i.get(P).width:i.get(P).height,y?i.get(P).height:i.get(P).width,{xAlign:"center",yAlign:"center",textRotation:y?0:90},yd.select(this).node())})},t.prototype._annotatedTicksToRender=function(){var r=this,n=this._scale.range();return xS.Array.uniq(this.annotatedTicks().filter(function(i){return i==null?!1:xS.Math.inRange(r._scale.scale(i),n[0],n[1])}))},t.prototype._coreSize=function(){var r=this.isHorizontal()?this.height():this.width(),n=this.isHorizontal()?this._computeHeight():this._computeWidth();return Math.min(n,r)},t.prototype._annotationTierHeight=function(){return this._annotationMeasurer.measure().height+2*t._ANNOTATION_LABEL_PADDING},t.prototype._annotationToTier=function(r){var n=this,i=[[]],o=new xS.Map,a=this.isHorizontal()?this.width():this.height();return this._annotatedTicksToRender().forEach(function(s){var l=n._scale.scale(s),c=r.get(s).width;if(l<0||l+c>a){o.set(s,-1);return}for(var u=function(f){return i[f].some(function(p){var d=n._scale.scale(p),g=r.get(p).width;return l+c>=d&&l<=d+g})},h=0;u(h);)h++,i.length===h&&i.push([]);i[h].push(s),o.set(s,h)}),o},t.prototype._removeAnnotations=function(){this._annotationContainer.selectAll(".annotation-line").remove(),this._annotationContainer.selectAll(".annotation-circle").remove(),this._annotationContainer.selectAll(".annotation-rect").remove(),this._annotationContainer.selectAll(".annotation-label").remove()},t.prototype._generateBaselineAttrHash=function(){var r={x1:0,y1:0,x2:0,y2:0};switch(this._orientation){case"bottom":r.x2=this.width();break;case"top":r.x2=this.width(),r.y1=this.height(),r.y2=this.height();break;case"left":r.x1=this.width(),r.x2=this.width(),r.y2=this.height();break;case"right":r.y2=this.height();break}return r},t.prototype._generateTickMarkAttrHash=function(r){var n=this;r===void 0&&(r=!1);var i={x1:0,y1:0,x2:0,y2:0},o=function(s){return n._scale.scale(s)};this.isHorizontal()?(i.x1=o,i.x2=o):(i.y1=o,i.y2=o);var a=r?this._endTickLength:this._innerTickLength;switch(this._orientation){case"bottom":i.y2=a;break;case"top":i.y1=this.height(),i.y2=this.height()-a;break;case"left":i.x1=this.width(),i.x2=this.width()-a;break;case"right":i.x2=a;break}return i},t.prototype._setDefaultAlignment=function(){switch(this._orientation){case"bottom":this.yAlignment("top");break;case"top":this.yAlignment("bottom");break;case"left":this.xAlignment("right");break;case"right":this.xAlignment("left");break}},t.prototype.isHorizontal=function(){return this._orientation==="top"||this._orientation==="bottom"},t.prototype.getScale=function(){return this._scale},t.prototype.formatter=function(r){return r==null?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.innerTickLength=function(r){if(r==null)return this._innerTickLength;if(r<0)throw new Error("inner tick length must be positive");return this._innerTickLength=r,this.redraw(),this},t.prototype.endTickLength=function(r){if(r==null)return this._endTickLength;if(r<0)throw new Error("end tick length must be positive");return this._endTickLength=r,this.redraw(),this},t.prototype._maxLabelTickLength=function(){return this.showEndTickLabels()?Math.max(this.innerTickLength(),this.endTickLength()):this.innerTickLength()},t.prototype.tickLabelPadding=function(r){if(r==null)return this._tickLabelPadding;if(r<0)throw new Error("tick label padding must be positive");return this._tickLabelPadding=r,this.redraw(),this},t.prototype.margin=function(r){if(r==null)return this._margin;if(r<0)throw new Error("margin size must be positive");return this._margin=r,this.redraw(),this},t.prototype.orientation=function(r){if(r==null)return this._orientation;var n=r.toLowerCase();if(n!=="top"&&n!=="bottom"&&n!=="left"&&n!=="right")throw new Error("unsupported orientation");return this._orientation=n,this.redraw(),this},t.prototype.showEndTickLabels=function(r){return r==null?this._showEndTickLabels:(this._showEndTickLabels=r,this.render(),this)},t.prototype._showAllTickMarks=function(){this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS).each(function(){yd.select(this).style("visibility","inherit")})},t.prototype._showAllTickLabels=function(){this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS).each(function(){yd.select(this).style("visibility","inherit")})},t.prototype._hideOverflowingTickLabels=function(){var r=this.element().node().getBoundingClientRect(),n=this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS);n.empty()||n.each(function(i,o){xS.DOM.clientRectInside(this.getBoundingClientRect(),r)||yd.select(this).style("visibility","hidden")})},t.prototype._hideTickMarksWithoutLabel=function(){var r=this._tickMarkContainer.selectAll("."+t.TICK_MARK_CLASS),n=this._tickLabelContainer.selectAll("."+t.TICK_LABEL_CLASS).filter(function(o,a){var s=yd.select(this).style("visibility");return s==="inherit"||s==="visible"}),i=n.data();r.each(function(o,a){i.indexOf(o)===-1&&yd.select(this).style("visibility","hidden")})},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._annotationMeasurer.reset()},t.END_TICK_MARK_CLASS="end-tick-mark",t.TICK_MARK_CLASS="tick-mark",t.TICK_LABEL_CLASS="tick-label",t.ANNOTATION_LINE_CLASS="annotation-line",t.ANNOTATION_RECT_CLASS="annotation-rect",t.ANNOTATION_CIRCLE_CLASS="annotation-circle",t.ANNOTATION_LABEL_CLASS="annotation-label",t._ANNOTATION_LABEL_PADDING=4,t}(Rze.Component);DF.Axis=Dze});var $Xt=H(jit=>{"use strict";Object.defineProperty(jit,"__esModule",{value:!0});var Oze=(de(),Ut(pe)),Wit=(Er(),Ut(Mr)),OF=_l(),zze=kc(),XXt=Fe(),Yit=t4(),Fze=function(e){Oze.__extends(t,e);function t(r,n){n===void 0&&(n="bottom");var i=e.call(this,r,n)||this;return i._tickLabelAngle=0,i._tickLabelShearAngle=0,i.addClass("category-axis"),i}return Object.defineProperty(t.prototype,"_wrapper",{get:function(){var r=new OF.Wrapper;return this._tickLabelMaxLines!=null&&r.maxLines(this._tickLabelMaxLines),r},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_writer",{get:function(){return new OF.Writer(this._measurer,this._typesetterContext,this._wrapper)},enumerable:!0,configurable:!0}),t.prototype._setup=function(){e.prototype._setup.call(this),this._typesetterContext=new OF.SvgContext(this._tickLabelContainer.node()),this._measurer=new OF.CacheMeasurer(this._typesetterContext)},t.prototype._rescale=function(){return this.redraw()},t.prototype.requestedSpace=function(r,n){var i=this.isHorizontal()?0:this._tickSpaceRequired()+this.margin(),o=this.isHorizontal()?this._tickSpaceRequired()+this.margin():0;if(this._scale.domain().length===0)return{minWidth:0,minHeight:0};if(this.annotationsEnabled()){var a=this._annotationTierHeight()*this.annotationTierCount();this.isHorizontal()?o+=a:i+=a}var s=this._measureTickLabels(r,n);return{minWidth:s.usedWidth+i,minHeight:s.usedHeight+o}},t.prototype._coreSize=function(){var r=this.isHorizontal()?this.height():this.width(),n=this.isHorizontal()?this.requestedSpace(this.width(),this.height()).minHeight:this.requestedSpace(this.width(),this.height()).minWidth,i=this.margin()+this._annotationTierHeight(),o=n-i;return Math.min(o,r)},t.prototype._getTickValues=function(){return this.getDownsampleInfo().domain},t.prototype._sizeFromOffer=function(r,n){return zze.Component.prototype._sizeFromOffer.call(this,r,n)},t.prototype.getDownsampleInfo=function(r,n){r===void 0&&(r=this._scale),n===void 0&&(n=r.invertRange());var i=this._tickLabelAngle===0?1:1/Math.cos(this._tickLabelShearAngle/180*Math.PI),o=t._MINIMUM_WIDTH_PER_LABEL_PX*i,a=Math.ceil(o/r.stepWidth());return{domain:n.filter(function(s,l){return l%a===0}),stepWidth:a*r.stepWidth()}},t.prototype.tickLabelAngle=function(r){if(r==null)return this._tickLabelAngle;if(r!==0&&r!==90&&r!==-90)throw new Error("Angle "+r+" not supported; only 0, 90, and -90 are valid values");return this._tickLabelAngle=r,this.redraw(),this},t.prototype.tickLabelShearAngle=function(r){if(r==null)return this._tickLabelShearAngle;if(r<-80||r>80)throw new Error("Angle "+r+" not supported; Must be between [-80, 80]");return this._tickLabelShearAngle=r,this.redraw(),this},t.prototype.tickLabelMaxWidth=function(r){return arguments.length===0?this._tickLabelMaxWidth:(this._tickLabelMaxWidth=r,this.redraw(),this)},t.prototype.tickLabelMaxLines=function(r){return arguments.length===0?this._tickLabelMaxLines:(this._tickLabelMaxLines=r,this.redraw(),this)},t.prototype._tickSpaceRequired=function(){return this._maxLabelTickLength()+this.tickLabelPadding()},t.prototype._drawTicks=function(r,n){var i=this,o,a;switch(this.tickLabelAngle()){case 0:o={left:"right",right:"left",top:"center",bottom:"center"},a={left:"center",right:"center",top:"bottom",bottom:"top"};break;case 90:o={left:"center",right:"center",top:"right",bottom:"left"},a={left:"top",right:"bottom",top:"center",bottom:"center"};break;case-90:o={left:"center",right:"center",top:"left",bottom:"right"},a={left:"bottom",right:"top",top:"center",bottom:"center"};break}n.each(function(s){var l=Wit.select(this),c=i.isHorizontal()?r:i.width()-i._tickSpaceRequired(),u=i.isHorizontal()?i.height()-i._tickSpaceRequired():r,h={xAlign:o[i.orientation()],yAlign:a[i.orientation()],textRotation:i.tickLabelAngle(),textShear:i.tickLabelShearAngle()};if(i._tickLabelMaxWidth!=null){if(i.orientation()==="left"&&c>i._tickLabelMaxWidth){var f=c-i._tickLabelMaxWidth,p=l.attr("transform")+" translate("+f+", 0)";l.attr("transform",p)}c=Math.min(c,i._tickLabelMaxWidth)}i._writer.write(i.formatter()(s),c,u,h,l.node())})},t.prototype._measureTickLabels=function(r,n){var i=this,o=this._scale,a=o.cloneWithoutProviders().range([0,this.isHorizontal()?r:n]),s=this.getDownsampleInfo(a),l=s.domain,c=s.stepWidth,u=r-this._tickSpaceRequired();this.isHorizontal()&&(u=c,this._tickLabelAngle!==0&&(u=n-this._tickSpaceRequired()),u=Math.max(u,0));var h=c;this.isHorizontal()&&(h=n-this._tickSpaceRequired(),this._tickLabelAngle!==0&&(h=r-this._tickSpaceRequired()),h=Math.max(h,0)),this._tickLabelMaxWidth!=null&&(u=Math.min(u,this._tickLabelMaxWidth));var f=l.map(function(x){return i._wrapper.wrap(i.formatter()(x),i._measurer,u,h)}),p=this.isHorizontal()&&this._tickLabelAngle===0?Wit.sum:XXt.Math.max,d=this.isHorizontal()&&this._tickLabelAngle===0?XXt.Math.max:Wit.sum,g=p(f,function(x){return i._measurer.measure(x.wrappedText).width},0),_=d(f,function(x){return i._measurer.measure(x.wrappedText).height},0);return this._tickLabelAngle!==0&&(y=[_,g],g=y[0],_=y[1]),{usedWidth:g,usedHeight:_};var y},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n=this._scale,i=this.getDownsampleInfo(n),o=i.domain,a=i.stepWidth,s=a;this.isHorizontal()&&this._tickLabelMaxWidth!=null&&(s=Math.min(s,this._tickLabelMaxWidth));var l=function(p,d){var g=n.scale(p)-s/2,_=r.isHorizontal()?g:0,y=r.isHorizontal()?0:g;return"translate("+_+","+y+")"},c=this._tickLabelContainer.selectAll("."+Yit.Axis.TICK_LABEL_CLASS).data(o),u=c.enter().append("g").classed(Yit.Axis.TICK_LABEL_CLASS,!0).merge(c);c.exit().remove(),u.attr("transform",l),u.text(""),this._drawTicks(a,u);var h=this.orientation()==="right"?this._tickSpaceRequired():0,f=this.orientation()==="bottom"?this._tickSpaceRequired():0;return this._tickLabelContainer.attr("transform","translate("+h+","+f+")"),this._showAllTickMarks(),this._showAllTickLabels(),this._hideTickMarksWithoutLabel(),this},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.isHorizontal()||this._scale.range([0,this.height()]),this},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t._MINIMUM_WIDTH_PER_LABEL_PX=15,t}(Yit.Axis);jit.Category=Fze});var KXt=H($it=>{"use strict";Object.defineProperty($it,"__esModule",{value:!0});var Bze=(de(),Ut(pe)),zF=(Er(),Ut(Mr)),Xit=_l(),Hze=Bu(),bS=Fe(),wS=t4(),Vze=function(e){Bze.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i._tickLabelPositioning="center",i._usesTextWidthApproximation=!1,i.formatter(Hze.general()),i}return t.prototype._setup=function(){e.prototype._setup.call(this);var r=new Xit.SvgContext(this._tickLabelContainer.node(),wS.Axis.TICK_LABEL_CLASS);this._measurer=new Xit.CacheMeasurer(r),this._wrapper=new Xit.Wrapper().maxLines(1)},t.prototype._computeWidth=function(){var r=this._usesTextWidthApproximation?this._computeApproximateTextWidth():this._computeExactTextWidth();return this._tickLabelPositioning==="center"?this._maxLabelTickLength()+this.tickLabelPadding()+r:Math.max(this._maxLabelTickLength(),this.tickLabelPadding()+r)},t.prototype._computeExactTextWidth=function(){var r=this,n=this._getTickValues(),i=n.map(function(o){var a=r.formatter()(o);return r._measurer.measure(a).width});return bS.Math.max(i,0)},t.prototype._computeApproximateTextWidth=function(){var r=this,n=this._getTickValues(),i=this._measurer.measure("M").width,o=n.map(function(a){var s=r.formatter()(a);return s.length*i});return bS.Math.max(o,0)},t.prototype._computeHeight=function(){var r=this._measurer.measure().height;return this._tickLabelPositioning==="center"?this._maxLabelTickLength()+this.tickLabelPadding()+r:Math.max(this._maxLabelTickLength(),this.tickLabelPadding()+r)},t.prototype._getTickValues=function(){var r=this._scale,n=r.domain(),i=n[0]<=n[1]?n[0]:n[1],o=n[0]>=n[1]?n[0]:n[1];return r.ticks().filter(function(a){return a>=i&&a<=o})},t.prototype._rescale=function(){if(!!this._isSetup){if(!this.isHorizontal()){var r=this._computeWidth();if(r>this.width()||r<this.width()-this.margin()){this.redraw();return}}this.render()}},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n={x:0,y:0,dx:"0em",dy:"0.3em"},i=this._maxLabelTickLength(),o=this.tickLabelPadding(),a="middle",s=0,l=0,c=0,u=0;if(this.isHorizontal())switch(this._tickLabelPositioning){case"left":a="end",s=-o,u=o;break;case"center":u=i+o;break;case"right":a="start",s=o,u=o;break}else switch(this._tickLabelPositioning){case"top":n.dy="-0.3em",c=o,l=-o;break;case"center":c=i+o;break;case"bottom":n.dy="1em",c=o,l=o;break}var h=this._generateTickMarkAttrHash();switch(this.orientation()){case"bottom":n.x=h.x1,n.dy="0.95em",l=h.y1+u;break;case"top":n.x=h.x1,n.dy="-.25em",l=h.y1-u;break;case"left":a="end",s=h.x1-c,n.y=h.y1;break;case"right":a="start",s=h.x1+c,n.y=h.y1;break}var f=this._getTickValues(),p=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS).data(f);p.exit().remove();var d=p.enter().append("text").classed(wS.Axis.TICK_LABEL_CLASS,!0).merge(p);d.style("text-anchor",a).style("visibility","inherit").attrs(n).text(function(_){return r.formatter()(_)});var g="translate("+s+", "+l+")";return this._tickLabelContainer.attr("transform",g),this._showAllTickMarks(),this.showEndTickLabels()||this._hideEndTickLabels(),this._hideOverflowingTickLabels(),this._hideOverlappingTickLabels(),this._tickLabelPositioning!=="center"&&this._hideTickMarksWithoutLabel(),this},t.prototype.tickLabelPosition=function(r){if(r==null)return this._tickLabelPositioning;var n=r.toLowerCase();if(this.isHorizontal()){if(!(n==="left"||n==="center"||n==="right"))throw new Error(n+" is not a valid tick label position for a horizontal NumericAxis")}else if(!(n==="top"||n==="center"||n==="bottom"))throw new Error(n+" is not a valid tick label position for a vertical NumericAxis");return this._tickLabelPositioning=n,this.redraw(),this},t.prototype.usesTextWidthApproximation=function(r){return r==null?this._usesTextWidthApproximation:(this._usesTextWidthApproximation=r,this)},t.prototype._hideEndTickLabels=function(){var r=this.element().node().getBoundingClientRect(),n=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS);if(n.size()!==0){var i=n.nodes()[0];bS.DOM.clientRectInside(i.getBoundingClientRect(),r)||zF.select(i).style("visibility","hidden");var o=n.nodes()[n.size()-1];bS.DOM.clientRectInside(o.getBoundingClientRect(),r)||zF.select(o).style("visibility","hidden")}},t.prototype._hideOverlappingTickLabels=function(){for(var r=this._tickLabelContainer.selectAll("."+wS.Axis.TICK_LABEL_CLASS).filter(function(o,a){var s=zF.select(this).style("visibility");return s==="inherit"||s==="visible"}),n=r.nodes().map(function(o){return o.getBoundingClientRect()}),i=1;!this._hasOverlapWithInterval(i,n)&&i<n.length;)i+=1;r.each(function(o,a){var s=zF.select(this);a%i!==0&&s.style("visibility","hidden")})},t.prototype._hasOverlapWithInterval=function(r,n){for(var i=this._tickLabelPositioning==="center"?this.tickLabelPadding():this.tickLabelPadding()*3,o=n.map(function(c){return bS.DOM.expandRect(c,i)}),a=0;a<o.length-r;a+=r){var s=o[a],l=o[a+r];if(bS.DOM.clientRectsOverlap(s,l))return!1}return!0},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t}(wS.Axis);$it.Numeric=Vze});var ZXt=H(FF=>{"use strict";Object.defineProperty(FF,"__esModule",{value:!0});var Uze=Fe();function qze(e){if(e<=0)throw new Error("interval must be positive number");return function(t){var r=t.domain(),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),o=Math.ceil(n/e)*e,a=Math.floor((i-o)/e)+1,s=n%e===0?[]:[n],l=Uze.Math.range(0,a).map(function(u){return o+u*e}),c=i%e===0?[]:[i];return s.concat(l).concat(c)}}FF.intervalTickGenerator=qze;function Gze(){return function(e){var t=e.defaultTicks();return t.filter(function(r,n){return r%1===0||n===0||n===t.length-1})}}FF.integerTickGenerator=Gze});var e4=H(Iv=>{"use strict";Object.defineProperty(Iv,"__esModule",{value:!0});function Zit(e,t,r){return r-(r-e)*t}Iv.zoomOut=Zit;function Kit(e,t,r){return(e*t-r)/(t-1)}function Wze(e,t,r,n,i,o,a){return t=JXt(e,t,n,i),QXt(e,t,r,o,a)}Iv.constrainedZoom=Wze;function JXt(e,t,r,n){var i=t>1,o=i?n:r;if(o==null)return t;var a=e.getTransformationDomain(),s=a[0],l=a[1],c=Math.abs(l-s),u=i?Math.min:Math.max;return u(t,o/c)}Iv.constrainZoomExtents=JXt;function QXt(e,t,r,n,i){if(t<=1)return{centerPoint:r,zoomAmount:t};if(n==null&&i==null)return{centerPoint:r,zoomAmount:t};var o=t$t(e),a=jze(e),s=a?1/0:-1/0,l=a?-1/0:1/0;n=n==null?s:n,i=i==null?l:i;var c=e.getTransformationDomain(),u=c[0],h=c[1],f=e.scaleTransformation(i),p=e.scaleTransformation(h),d=Zit(p,t,r),g=e.scaleTransformation(n),_=e.scaleTransformation(u),y=Zit(_,t,r),x=Math.abs(f-g),b=Math.abs(d-y);if(b>x){var S=(f-g)/(p-_);if(S!==1){var C=Kit(p,S,f);return{centerPoint:C,zoomAmount:S}}else return{centerPoint:r,zoomAmount:S}}else return d>f!=o?{centerPoint:Kit(p,t,f),zoomAmount:t}:y<g!=o?{centerPoint:Kit(_,t,g),zoomAmount:t}:{centerPoint:r,zoomAmount:t}}Iv.constrainZoomValues=QXt;function Yze(e,t,r,n){var i=e.getTransformationDomain(),o=i[0],a=i[1],s=t$t(e);if(t>0!==s){var l=n;if(l!=null){var c=e.scaleTransformation(a),u=e.scaleTransformation(l);t=(s?Math.max:Math.min)(c+t,u)-c}}else{var l=r;if(l!=null){var h=e.scaleTransformation(o),f=e.scaleTransformation(l);t=(s?Math.min:Math.max)(h+t,f)-h}}return t}Iv.constrainedTranslation=Yze;function t$t(e){var t=e.range();return t[1]<t[0]}function jze(e){var t=e.getTransformationDomain();return t[1]<t[0]}});var Lv=H(Jit=>{"use strict";Object.defineProperty(Jit,"__esModule",{value:!0});var e$t=Fe(),Xze=function(){function e(){this._autoDomainAutomatically=!0,this._domainModificationInProgress=!1,this._updateId=0,this._callbacks=new e$t.CallbackSet,this._includedValuesProviders=new e$t.Set}return e.prototype.extentOfValues=function(t){return[]},e.prototype._getAllIncludedValues=function(t){var r=this;t===void 0&&(t=!1);var n=[];return this._includedValuesProviders.forEach(function(i){var o=i(r,t);n=n.concat(o)}),n},e.prototype._getExtent=function(){return[]},e.prototype.onUpdate=function(t){return this._callbacks.add(t),this},e.prototype.offUpdate=function(t){return this._callbacks.delete(t),this},e.prototype._dispatchUpdate=function(){this._updateId++,this._callbacks.callCallbacks(this)},e.prototype.autoDomain=function(){return this._autoDomainAutomatically=!0,this._setDomain(this._getExtent()),this},e.prototype.autoDomainIfAutomaticMode=function(){this._autoDomainAutomatically&&this.autoDomain()},e.prototype.scale=function(t){throw new Error("Subclasses should override scale")},e.prototype.ticks=function(){return this.domain()},e.prototype.domain=function(t){return t==null?this._getDomain():(this._autoDomainAutomatically=!1,this._setDomain(t),this)},e.prototype._getDomain=function(){throw new Error("Subclasses should override _getDomain")},e.prototype._setDomain=function(t){this._domainModificationInProgress||(this._domainModificationInProgress=!0,this._backingScaleDomain(t),this._dispatchUpdate(),this._domainModificationInProgress=!1)},e.prototype._backingScaleDomain=function(t){throw new Error("Subclasses should override _backingDomain")},e.prototype.range=function(t){return t==null?this._getRange():(this._setRange(t),this)},e.prototype._getRange=function(){throw new Error("Subclasses should override _getRange")},e.prototype._setRange=function(t){throw new Error("Subclasses should override _setRange")},e.prototype.addIncludedValuesProvider=function(t){return this._includedValuesProviders.add(t),this.autoDomainIfAutomaticMode(),this},e.prototype.removeIncludedValuesProvider=function(t){return this._includedValuesProviders.delete(t),this.autoDomainIfAutomaticMode(),this},e.prototype.updateId=function(){return this._updateId},e}();Jit.Scale=Xze});var eot=H(tot=>{"use strict";Object.defineProperty(tot,"__esModule",{value:!0});var $ze=(de(),Ut(pe)),BF=(Er(),Ut(Mr)),Kze=e4(),r$t=Fe(),Zze=Lv(),Qit=[0,1],Jze=function(e){$ze.__extends(t,e);function t(){var r=e.call(this)||this;r._range=[0,1],r._d3Scale=BF.scaleBand(),r._d3Scale.range(Qit),r._d3TransformationScale=BF.scaleLinear(),r._d3TransformationScale.domain(Qit);var n=.3;return r._innerPadding=t._convertToPlottableInnerPadding(n),r._outerPadding=t._convertToPlottableOuterPadding(.5,n),r}return t.prototype.cloneWithoutProviders=function(){var r=new t().domain(this.domain()).range(this.range()).innerPadding(this.innerPadding()).outerPadding(this.outerPadding());return r._d3TransformationScale.domain(this._d3TransformationScale.domain()),r},t.prototype.extentOfValues=function(r){return r$t.Array.uniq(r)},t.prototype._getExtent=function(){return r$t.Array.uniq(this._getAllIncludedValues())},t.prototype.domain=function(r){return e.prototype.domain.call(this,r)},t.prototype.invertRange=function(r){var n=this;r===void 0&&(r=this.range());var i=this._d3Scale.bandwidth(),o=this.invertedTransformation(r[0]),a=this.invertedTransformation(r[1]),s=this._d3Scale.domain(),l=s.map(function(h){return n._d3Scale(h)+i/2}),c=BF.bisect(l,o),u=BF.bisect(l,a);return s.slice(c,u)},t.prototype.range=function(r){return e.prototype.range.call(this,r)},t._convertToPlottableInnerPadding=function(r){return 1/(1-r)-1},t._convertToPlottableOuterPadding=function(r,n){return r/(1-n)},t.prototype._setBands=function(){var r=1-1/(1+this.innerPadding()),n=this.outerPadding()/(1+this.innerPadding());this._d3Scale.paddingInner(r),this._d3Scale.paddingOuter(n)},t.prototype.rangeBand=function(){return this._rescaleBand(this._d3Scale.bandwidth())},t.prototype.stepWidth=function(){return this._rescaleBand(this._d3Scale.bandwidth()*(1+this.innerPadding()))},t.prototype.ticks=function(){return this.domain()},t.prototype.innerPadding=function(r){return r==null?this._innerPadding:(this._innerPadding=r,this.range(this.range()),this._dispatchUpdate(),this)},t.prototype.outerPadding=function(r){return r==null?this._outerPadding:(this._outerPadding=r,this.range(this.range()),this._dispatchUpdate(),this)},t.prototype.scale=function(r){var n=this._d3Scale(r)+this._d3Scale.bandwidth()/2;return this._d3TransformationScale(n)},t.prototype.zoom=function(r,n){var i=this,o=function(a){return i._d3TransformationScale.invert(Kze.zoomOut(a,r,n))};this._d3TransformationScale.domain(this._d3TransformationScale.range().map(o)),this._dispatchUpdate()},t.prototype.pan=function(r){var n=this,i=function(o){return n._d3TransformationScale.invert(o+r)};this._d3TransformationScale.domain(this._d3TransformationScale.range().map(i)),this._dispatchUpdate()},t.prototype.scaleTransformation=function(r){return this._d3TransformationScale(r)},t.prototype.invertedTransformation=function(r){return this._d3TransformationScale.invert(r)},t.prototype.getTransformationExtent=function(){return Qit},t.prototype.getTransformationDomain=function(){return this._d3TransformationScale.domain()},t.prototype.setTransformationDomain=function(r){this._d3TransformationScale.domain(r),this._dispatchUpdate()},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this._setBands(),this)},t.prototype._getRange=function(){return this._range},t.prototype._setRange=function(r){this._range=r,this._d3TransformationScale.range(r),this._setBands()},t.prototype._rescaleBand=function(r){return Math.abs(this._d3TransformationScale(r)-this._d3TransformationScale(0))},t}(Zze.Scale);tot.Category=Jze});var n$t=H(rot=>{"use strict";Object.defineProperty(rot,"__esModule",{value:!0});var Qze=(de(),Ut(pe)),Nf=(Er(),Ut(Mr)),SS=Fe(),tFe=Lv(),eFe=function(){function e(){this.count=0,this.tracker={}}return e.prototype.getIndex=function(t){if(this.tracker[t]!=null)return this.tracker[t];var r=this.count;return this.tracker[t]=r,this.count+=1,r},e.prototype.clear=function(){this.count=0,this.tracker={}},e}(),rFe=function(e){Qze.__extends(t,e);function t(r){var n=e.call(this)||this;n._rangeLength=1,n._tracker=new eFe;var i;switch(r){case null:case void 0:t._plottableColorCache==null&&(t._plottableColorCache=t._getPlottableColors()),i=Nf.scaleOrdinal().range(t._plottableColorCache);break;case"Category10":case"category10":case"10":i=Nf.scaleOrdinal(Nf.schemeCategory10);break;case"Category20":case"category20":case"20":i=Nf.scaleOrdinal(Nf.schemeCategory20);break;case"Category20b":case"category20b":case"20b":i=Nf.scaleOrdinal(Nf.schemeCategory20b);break;case"Category20c":case"category20c":case"20c":i=Nf.scaleOrdinal(Nf.schemeCategory20c);break;default:throw new Error("Unsupported ColorScale type")}return n._d3Scale=i,n._rangeLength=n._d3Scale.range().length,n}return t.prototype.extentOfValues=function(r){return SS.Array.uniq(r)},t.prototype._getExtent=function(){return SS.Array.uniq(this._getAllIncludedValues())},t.invalidateColorCache=function(){t._plottableColorCache=null},t._getPlottableColors=function(){for(var r=[],n=Nf.select("body").append("plottable-color-tester"),i=SS.Color.colorTest(n,""),o=0,a=SS.Color.colorTest(n,"plottable-colors-0");a!=null&&o<this._MAXIMUM_COLORS_FROM_CSS&&!(a===i&&a===r[r.length-1]);)r.push(a),o++,a=SS.Color.colorTest(n,"plottable-colors-"+o);return n.remove(),r},t.prototype.scale=function(r){var n=this._d3Scale(r),i=this._tracker.getIndex(r),o=Math.floor(i/this._rangeLength);if(o===0)return n;var a=Math.log(o*t._LOOP_LIGHTEN_FACTOR+1);return SS.Color.lightenColor(n,a)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this._tracker.clear(),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r),this._rangeLength=r.length},t._LOOP_LIGHTEN_FACTOR=1.6,t._MAXIMUM_COLORS_FROM_CSS=256,t}(tFe.Scale);rot.Color=rFe});var o$t=H(not=>{"use strict";Object.defineProperty(not,"__esModule",{value:!0});var nFe=(de(),Ut(pe)),MS=(Er(),Ut(Mr)),i$t=Fe(),iFe=Lv(),oFe=function(e){nFe.__extends(t,e);function t(r){r===void 0&&(r="linear");var n=e.call(this)||this;switch(r){case"linear":n._colorScale=MS.scaleLinear();break;case"log":n._colorScale=MS.scaleLog();break;case"sqrt":n._colorScale=MS.scaleSqrt();break;case"pow":n._colorScale=MS.scalePow();break}if(n._colorScale==null)throw new Error("unknown QuantitativeScale scale type "+r);return n.range(t.REDS),n}return t.prototype.extentOfValues=function(r){var n=MS.extent(r);return n[0]==null||n[1]==null?[]:n},t.prototype._d3InterpolatedScale=function(){return this._colorScale.range([0,1]).interpolate(this._interpolateColors())},t.prototype._interpolateColors=function(){var r=this._colorRange;if(r.length<2)throw new Error("Color scale arrays must have at least two elements.");return function(n,i){return function(o){o=Math.max(0,Math.min(1,o));var a=o*(r.length-1),s=Math.floor(a),l=Math.ceil(a),c=a-s;return MS.interpolateLab(r[s],r[l])(c)}}},t.prototype._resetScale=function(){this._d3Scale=this._d3InterpolatedScale(),this.autoDomainIfAutomaticMode(),this._dispatchUpdate()},t.prototype.autoDomain=function(){var r=this._getAllIncludedValues();return r.length>0&&this._setDomain([i$t.Math.min(r,0),i$t.Math.max(r,0)]),this},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._colorRange},t.prototype._setRange=function(r){this._colorRange=r,this._resetScale()},t.REDS=["#FFFFFF","#FFF6E1","#FEF4C0","#FED976","#FEB24C","#FD8D3C","#FC4E2A","#E31A1C","#B10026"],t.BLUES=["#FFFFFF","#CCFFFF","#A5FFFD","#85F7FB","#6ED3EF","#55A7E0","#417FD0","#2545D3","#0B02E1"],t.POSNEG=["#0B02E1","#2545D3","#417FD0","#55A7E0","#6ED3EF","#85F7FB","#A5FFFD","#CCFFFF","#FFFFFF","#FFF6E1","#FEF4C0","#FED976","#FEB24C","#FD8D3C","#FC4E2A","#E31A1C","#B10026"],t}(iFe.Scale);not.InterpolatedColor=oFe});var vd=H(iot=>{"use strict";Object.defineProperty(iot,"__esModule",{value:!0});var aFe=(de(),Ut(pe)),sFe=(Er(),Ut(Mr)),lFe=e4(),ES=Fe(),cFe=Lv(),uFe=function(e){aFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._tickGenerator=function(n){return n.defaultTicks()},r._padProportion=.05,r._snappingDomainEnabled=!0,r._paddingExceptionsProviders=new ES.Set,r}return t.prototype.autoDomain=function(){return this._domainMin=null,this._domainMax=null,e.prototype.autoDomain.call(this),this},t.prototype.autoDomainIfAutomaticMode=function(){if(this._domainMin!=null&&this._domainMax!=null){this._setDomain([this._domainMin,this._domainMax]);return}var r=this._getExtent();if(this._domainMin!=null){var n=r[1];this._domainMin>=n&&(n=this._expandSingleValueDomain([this._domainMin,this._domainMin])[1]),this._setDomain([this._domainMin,n]);return}if(this._domainMax!=null){var i=r[0];this._domainMax<=i&&(i=this._expandSingleValueDomain([this._domainMax,this._domainMax])[0]),this._setDomain([i,this._domainMax]);return}e.prototype.autoDomainIfAutomaticMode.call(this)},t.prototype._getUnboundedExtent=function(r){r===void 0&&(r=!1);var n=this._getAllIncludedValues(r),i=this._defaultExtent();if(n.length!==0){var o=[ES.Math.min(n,i[0]),ES.Math.max(n,i[1])];i=this._padDomain(o)}return i},t.prototype._getExtent=function(){var r=this._getUnboundedExtent();return this._domainMin!=null&&(r[0]=this._domainMin),this._domainMax!=null&&(r[1]=this._domainMax),r},t.prototype.addPaddingExceptionsProvider=function(r){return this._paddingExceptionsProviders.add(r),this.autoDomainIfAutomaticMode(),this},t.prototype.removePaddingExceptionsProvider=function(r){return this._paddingExceptionsProviders.delete(r),this.autoDomainIfAutomaticMode(),this},t.prototype.padProportion=function(r){if(r==null)return this._padProportion;if(r<0)throw new Error("padProportion must be non-negative");return this._padProportion=r,this.autoDomainIfAutomaticMode(),this},t.prototype._padDomain=function(r){var n=this;if(r[0].valueOf()===r[1].valueOf())return this._expandSingleValueDomain(r);if(this._padProportion===0)return r;var i=this._padProportion/2,o=r[0],a=r[1],s=!1,l=!1;this._paddingExceptionsProviders.forEach(function(f){var p=f(n);p.forEach(function(d){d.valueOf()===o.valueOf()&&(s=!0),d.valueOf()===a.valueOf()&&(l=!0)})});var c=this._backingScaleDomain();this._backingScaleDomain(r);var u=s?o:this.invert(this.scale(o)-(this.scale(a)-this.scale(o))*i),h=l?a:this.invert(this.scale(a)+(this.scale(a)-this.scale(o))*i);return this._backingScaleDomain(c),this._snappingDomainEnabled?this._niceDomain([u,h]):[u,h]},t.prototype.snappingDomainEnabled=function(r){return r==null?this._snappingDomainEnabled:(this._snappingDomainEnabled=r,this.autoDomainIfAutomaticMode(),this)},t.prototype._expandSingleValueDomain=function(r){return r},t.prototype.invert=function(r){throw new Error("Subclasses should override invert")},t.prototype.domain=function(r){return r!=null&&(this._domainMin=r[0],this._domainMax=r[1]),e.prototype.domain.call(this,r)},t.prototype.domainMin=function(r){return r==null?this.domain()[0]:(this._domainMin=r,this.autoDomainIfAutomaticMode(),this)},t.prototype.domainMax=function(r){return r==null?this.domain()[1]:(this._domainMax=r,this.autoDomainIfAutomaticMode(),this)},t.prototype.extentOfValues=function(r){var n=sFe.extent(r.filter(function(i){return ES.Math.isValidNumber(+i)}));return n[0]==null||n[1]==null?[]:n},t.prototype.zoom=function(r,n){var i=this,o=function(a){return i.invert(lFe.zoomOut(a,r,n))};this.domain(this.range().map(o))},t.prototype.pan=function(r){var n=this,i=function(o){return n.invert(o+r)};this.domain(this.range().map(i))},t.prototype.scaleTransformation=function(r){throw new Error("Subclasses should override scaleTransformation")},t.prototype.invertedTransformation=function(r){throw new Error("Subclasses should override invertedTransformation")},t.prototype.getTransformationExtent=function(){throw new Error("Subclasses should override getTransformationExtent")},t.prototype.getTransformationDomain=function(){throw new Error("Subclasses should override getTransformationDomain")},t.prototype.setTransformationDomain=function(r){throw new Error("Subclasses should override setTransformationDomain")},t.prototype._setDomain=function(r){var n=function(i){return ES.Math.isNaN(i)||i===1/0||i===-1/0};if(n(r[0])||n(r[1])){ES.Window.warn("Warning: QuantitativeScales cannot take NaN or Infinity as a domain value. Ignoring.");return}e.prototype._setDomain.call(this,r)},t.prototype.defaultTicks=function(){throw new Error("Subclasses should override _getDefaultTicks")},t.prototype.ticks=function(){return this._tickGenerator(this)},t.prototype._niceDomain=function(r,n){throw new Error("Subclasses should override _niceDomain")},t.prototype._defaultExtent=function(){throw new Error("Subclasses should override _defaultExtent")},t.prototype.tickGenerator=function(r){return r==null?this._tickGenerator:(this._tickGenerator=r,this)},t._DEFAULT_NUM_TICKS=10,t}(cFe.Scale);iot.QuantitativeScale=uFe});var a$t=H(oot=>{"use strict";Object.defineProperty(oot,"__esModule",{value:!0});var hFe=(de(),Ut(pe)),fFe=(Er(),Ut(Mr)),pFe=vd(),dFe=function(e){hFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=fFe.scaleLinear(),r}return t.prototype._defaultExtent=function(){return[0,1]},t.prototype._expandSingleValueDomain=function(r){return r[0]===r[1]?[r[0]-1,r[1]+1]:r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r,n){return this._d3Scale.copy().domain(r).nice(n).domain()},t}(pFe.QuantitativeScale);oot.Linear=dFe});var s$t=H(aot=>{"use strict";Object.defineProperty(aot,"__esModule",{value:!0});var mFe=(de(),Ut(pe)),gFe=(Er(),Ut(Mr)),_Fe=vd(),yFe=function(e){mFe.__extends(t,e);function t(r){r===void 0&&(r=10);var n=e.call(this)||this;return n._d3Scale=gFe.scaleLog().base(r),n._setDomain(n._defaultExtent()),n}return t.prototype._defaultExtent=function(){return[1,this._d3Scale.base()]},t.prototype._expandSingleValueDomain=function(r){return r[0]===r[1]?[r[0]/this._d3Scale.base(),r[1]*this._d3Scale.base()]:r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r,n){return this._d3Scale.copy().domain(r).nice().domain()},t}(_Fe.QuantitativeScale);aot.Log=yFe});var l$t=H(lot=>{"use strict";Object.defineProperty(lot,"__esModule",{value:!0});var vFe=(de(),Ut(pe)),r4=(Er(),Ut(Mr)),TS=Fe(),sot=ks(),xFe=vd(),bFe=function(e){vFe.__extends(t,e);function t(r){r===void 0&&(r=10);var n=e.call(this)||this;if(n._logTickGenerator=function(i){var o=function(x,b,S){return[x,b,S].sort(function(C,P){return C-P})[1]},a=TS.Math.min(n._untransformedDomain,0),s=TS.Math.max(n._untransformedDomain,0),l=a,c=o(a,s,-n._pivot),u=o(a,s,n._pivot),h=s,f=n._logTicks(-c,-l).map(function(x){return-x}).reverse(),p=n._logTicks(u,h),d=Math.max(a,-n._pivot),g=Math.min(s,n._pivot),_=r4.scaleLinear().domain([d,g]).ticks(n._howManyTicks(d,g)),y=f.concat(_).concat(p);return y.length<=1&&(y=r4.scaleLinear().domain([a,s]).ticks(sot.ModifiedLog._DEFAULT_NUM_TICKS)),y},n._d3Scale=r4.scaleLinear(),n._base=r,n._pivot=n._base,n._setDomain(n._defaultExtent()),n.tickGenerator(n._logTickGenerator),r<=1)throw new Error("ModifiedLogScale: The base must be > 1");return n}return t.prototype._adjustedLog=function(r){var n=r<0?-1:1;return r*=n,r<this._pivot&&(r+=(this._pivot-r)/this._pivot),r=Math.log(r)/Math.log(this._base),r*=n,r},t.prototype._invertedAdjustedLog=function(r){var n=r<0?-1:1;return r*=n,r=Math.pow(this._base,r),r<this._pivot&&(r=this._pivot*(r-1)/(this._pivot-1)),r*=n,r},t.prototype.scale=function(r){return this._d3Scale(this._adjustedLog(r))},t.prototype.invert=function(r){return this._invertedAdjustedLog(this._d3Scale.invert(r))},t.prototype.scaleTransformation=function(r){return this.scale(r)},t.prototype.invertedTransformation=function(r){return this.invert(r)},t.prototype.getTransformationExtent=function(){return this._getUnboundedExtent(!0)},t.prototype.getTransformationDomain=function(){return this.domain()},t.prototype.setTransformationDomain=function(r){this.domain(r)},t.prototype._getDomain=function(){return this._untransformedDomain},t.prototype._setDomain=function(r){this._untransformedDomain=r;var n=[this._adjustedLog(r[0]),this._adjustedLog(r[1])];e.prototype._setDomain.call(this,n)},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._logTicks=function(r,n){var i=this,o=this._howManyTicks(r,n);if(o===0)return[];var a=Math.floor(Math.log(r)/Math.log(this._base)),s=Math.ceil(Math.log(n)/Math.log(this._base)),l=r4.range(s,a,-Math.ceil((s-a)/o)),c=r4.range(this._base,1,-(this._base-1)).map(Math.floor),u=TS.Array.uniq(c),h=l.map(function(g){return u.map(function(_){return Math.pow(i._base,g-1)*_})}),f=TS.Array.flatten(h),p=f.filter(function(g){return r<=g&&g<=n}),d=p.sort(function(g,_){return g-_});return d},t.prototype._howManyTicks=function(r,n){var i=this._adjustedLog(TS.Math.min(this._untransformedDomain,0)),o=this._adjustedLog(TS.Math.max(this._untransformedDomain,0)),a=this._adjustedLog(r),s=this._adjustedLog(n),l=(s-a)/(o-i),c=Math.ceil(l*sot.ModifiedLog._DEFAULT_NUM_TICKS);return c},t.prototype._niceDomain=function(r,n){return r},t.prototype._defaultExtent=function(){return[0,this._base]},t.prototype._expandSingleValueDomain=function(r){if(r[0]===r[1]){var n=r[0];return n>0?[n/this._base,n*this._base]:n===0?[-this._base,this._base]:[n*this._base,n/this._base]}return r},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(sot.ModifiedLog._DEFAULT_NUM_TICKS)},t}(xFe.QuantitativeScale);lot.ModifiedLog=bFe});var c$t=H(cot=>{"use strict";Object.defineProperty(cot,"__esModule",{value:!0});var wFe=(de(),Ut(pe)),ga=(Er(),Ut(Mr)),kv=HF(),SFe=vd(),MFe=function(e){wFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._d3Scale=ga.scaleTime(),r.autoDomain(),r}return t.prototype.tickInterval=function(r,n,i){n===void 0&&(n=1),i===void 0&&(i=!1);var o=ga.scaleTime(),a=t.timeIntervalToD3Time(r,i).every(n);return o.domain(this.domain()),o.range(this.range()),o.ticks(a)},t.prototype._setDomain=function(r){if(r[1]<r[0])throw new Error("Scale.Time domain values must be in chronological order");return e.prototype._setDomain.call(this,r)},t.prototype._defaultExtent=function(){return[new Date("1970-01-01"),new Date("1970-01-02")]},t.prototype._expandSingleValueDomain=function(r){var n=r[0].getTime(),i=r[1].getTime();if(n===i){var o=new Date(n);o.setDate(o.getDate()-1);var a=new Date(i);return a.setDate(a.getDate()+1),[o,a]}return r},t.prototype.scale=function(r){return this._d3Scale(r)},t.prototype.scaleTransformation=function(r){return this.scale(new Date(r))},t.prototype.invertedTransformation=function(r){return this.invert(r).getTime()},t.prototype.getTransformationExtent=function(){var r=this._getUnboundedExtent(!0);return[r[0].valueOf(),r[1].valueOf()]},t.prototype.getTransformationDomain=function(){var r=this.domain();return[r[0].valueOf(),r[1].valueOf()]},t.prototype.setTransformationDomain=function(r){var n=r[0],i=r[1];this.domain([new Date(n),new Date(i)])},t.prototype._getDomain=function(){return this._backingScaleDomain()},t.prototype._backingScaleDomain=function(r){return r==null?this._d3Scale.domain():(this._d3Scale.domain(r),this)},t.prototype._getRange=function(){return this._d3Scale.range()},t.prototype._setRange=function(r){this._d3Scale.range(r)},t.prototype.invert=function(r){return this._d3Scale.invert(r)},t.prototype.defaultTicks=function(){return this._d3Scale.ticks(t._DEFAULT_NUM_TICKS)},t.prototype._niceDomain=function(r){return this._d3Scale.copy().domain(r).nice().domain()},t.timeIntervalToD3Time=function(r,n){switch(r){case kv.TimeInterval.second:return n?ga.utcSecond:ga.timeSecond;case kv.TimeInterval.minute:return n?ga.utcMinute:ga.timeMinute;case kv.TimeInterval.hour:return n?ga.utcHour:ga.timeHour;case kv.TimeInterval.day:return n?ga.utcDay:ga.timeDay;case kv.TimeInterval.week:return n?ga.utcWeek:ga.timeWeek;case kv.TimeInterval.month:return n?ga.utcMonth:ga.timeMonth;case kv.TimeInterval.year:return n?ga.utcYear:ga.timeYear;default:throw Error("TimeInterval specified does not exist: "+r)}},t}(SFe.QuantitativeScale);cot.Time=MFe});var ks=H(Hu=>{"use strict";Object.defineProperty(Hu,"__esModule",{value:!0});var Rv=(de(),Ut(pe)),EFe=ZXt();Hu.TickGenerators=EFe;Rv.__exportStar(eot(),Hu);Rv.__exportStar(n$t(),Hu);Rv.__exportStar(o$t(),Hu);Rv.__exportStar(a$t(),Hu);Rv.__exportStar(s$t(),Hu);Rv.__exportStar(l$t(),Hu);Rv.__exportStar(c$t(),Hu);var TFe=eot(),CFe=vd();function AFe(e){return e instanceof CFe.QuantitativeScale||e instanceof TFe.Category}Hu.isTransformable=AFe});var HF=H(Se=>{"use strict";Object.defineProperty(Se,"__esModule",{value:!0});var PFe=(de(),Ut(pe)),Vu=(Er(),Ut(Mr)),u$t=_l(),h$t=Bu(),IFe=ks(),n4=Fe(),uot=If(),ts=t4();Se.TimeInterval=uot.makeEnum(["second","minute","hour","day","week","month","year"]);Se.TimeAxisOrientation=uot.makeEnum(["top","bottom"]);Se.TierLabelPosition=uot.makeEnum(["between","center"]);var LFe=function(e){PFe.__extends(t,e);function t(r,n,i){var o=e.call(this,r,n)||this;return o._maxTimeIntervalPrecision=null,o._tierLabelPositions=[],o._useUTC=i,o.addClass("time-axis"),o.tickLabelPadding(5),o.axisConfigurations(t._DEFAULT_TIME_AXIS_CONFIGURATIONS(o._useUTC)),o.annotationFormatter(h$t.time("%a %b %d, %Y",o._useUTC)),o}return t.prototype.tierLabelPositions=function(r){if(r==null)return this._tierLabelPositions;if(!r.every(function(n){return n.toLowerCase()==="between"||n.toLowerCase()==="center"}))throw new Error("Unsupported position for tier labels");return this._tierLabelPositions=r,this.redraw(),this},t.prototype.maxTimeIntervalPrecision=function(r){return r==null?this._maxTimeIntervalPrecision:(this._maxTimeIntervalPrecision=r,this.redraw(),this)},t.prototype.currentAxisConfiguration=function(){return this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex]},t.prototype.axisConfigurations=function(r){if(r==null)return this._possibleTimeAxisConfigurations;this._possibleTimeAxisConfigurations=r,this._numTiers=n4.Math.max(this._possibleTimeAxisConfigurations.map(function(a){return a.length}),0),this._isAnchored&&this._setupDomElements();for(var n=this.tierLabelPositions(),i=[],o=0;o<this._numTiers;o++)i.push(n[o]||"between");return this.tierLabelPositions(i),this.redraw(),this},t.prototype._getMostPreciseConfigurationIndex=function(){var r=this,n=this._possibleTimeAxisConfigurations.length;return this._possibleTimeAxisConfigurations.forEach(function(i,o){o<n&&i.every(function(a){return r._checkTimeAxisTierConfiguration(a)})&&(n=o)}),n===this._possibleTimeAxisConfigurations.length&&(n4.Window.warn("zoomed out too far: could not find suitable interval to display labels"),--n),n},t.prototype.orientation=function(r){if(r&&(r.toLowerCase()==="right"||r.toLowerCase()==="left"))throw new Error(r+" is not a supported orientation for TimeAxis - only horizontal orientations are supported");return e.prototype.orientation.call(this,r)},t.prototype._computeHeight=function(){var r=this._measurer.measure().height;this._tierHeights=[];for(var n=0;n<this._numTiers;n++)this._tierHeights.push(r+this.tickLabelPadding()+(this._tierLabelPositions[n]==="between"?0:this._maxLabelTickLength()));return Vu.sum(this._tierHeights)},t.prototype._getIntervalLength=function(r){var n=this._scale.domain()[0],i=IFe.Time.timeIntervalToD3Time(r.interval,this._useUTC),o=i.offset(n,r.step);if(o>this._scale.domain()[1])return this.width();var a=Math.abs(this._scale.scale(o)-this._scale.scale(n));return a},t.prototype._maxWidthForInterval=function(r){return this._measurer.measure(r.formatter(t._LONG_DATE)).width},t.prototype._checkTimeAxisTierConfiguration=function(r){if(this._maxTimeIntervalPrecision!=null){var n=t._SORTED_TIME_INTERVAL_INDEX[this._maxTimeIntervalPrecision],i=t._SORTED_TIME_INTERVAL_INDEX[r.interval];if(n!=null&&i!=null&&i<n)return!1}var o=this._maxWidthForInterval(r)+2*this.tickLabelPadding();return Math.min(this._getIntervalLength(r),this.width())>=o},t.prototype._sizeFromOffer=function(r,n){var i=e.prototype._sizeFromOffer.call(this,r,n),o=this._tierHeights.reduce(function(s,l,c,u){return s+l>i.height?s:s+l}),a=this.margin()+(this.annotationsEnabled()?this.annotationTierCount()*this._annotationTierHeight():0);return i.height=Math.min(i.height,o+a),i},t.prototype._setup=function(){e.prototype._setup.call(this),this._setupDomElements()},t.prototype._setupDomElements=function(){this.content().selectAll("."+t.TIME_AXIS_TIER_CLASS).remove(),this._tierLabelContainers=[],this._tierMarkContainers=[],this._tierBaselines=[],this._tickLabelContainer.remove(),this._baseline.remove();for(var r=0;r<this._numTiers;++r){var n=this.content().append("g").classed(t.TIME_AXIS_TIER_CLASS,!0);this._tierLabelContainers.push(n.append("g").classed(ts.Axis.TICK_LABEL_CLASS+"-container",!0)),this._tierMarkContainers.push(n.append("g").classed(ts.Axis.TICK_MARK_CLASS+"-container",!0)),this._tierBaselines.push(n.append("line").classed("baseline",!0))}var i=new u$t.SvgContext(this._tierLabelContainers[0].node());this._measurer=new u$t.CacheMeasurer(i)},t.prototype._getTickIntervalValues=function(r){return this._scale.tickInterval(r.interval,r.step,this._useUTC)},t.prototype._getTickValues=function(){var r=this;return this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex].reduce(function(n,i){return n.concat(r._getTickIntervalValues(i))},[])},t.prototype._cleanTiers=function(){for(var r=0;r<this._tierLabelContainers.length;r++)this._tierLabelContainers[r].selectAll("."+ts.Axis.TICK_LABEL_CLASS).remove(),this._tierMarkContainers[r].selectAll("."+ts.Axis.TICK_MARK_CLASS).remove(),this._tierBaselines[r].style("visibility","hidden")},t.prototype._getTickValuesForConfiguration=function(r){var n=this._scale.tickInterval(r.interval,r.step,this._useUTC),i=this._scale.domain(),o=n.map(function(a){return a.valueOf()});return o.indexOf(i[0].valueOf())===-1&&n.unshift(i[0]),o.indexOf(i[1].valueOf())===-1&&n.push(i[1]),n},t.prototype._renderTierLabels=function(r,n,i){var o=this,a=this._getTickValuesForConfiguration(n),s=[];this._tierLabelPositions[i]==="between"&&n.step===1?a.map(function(g,_){_+1>=a.length||s.push(new Date((a[_+1].valueOf()-a[_].valueOf())/2+a[_].valueOf()))}):s=a;var l=r.selectAll("."+ts.Axis.TICK_LABEL_CLASS).data(s,function(g){return String(g.valueOf())}),c=l.enter().append("g").classed(ts.Axis.TICK_LABEL_CLASS,!0);c.append("text");var u=this._tierLabelPositions[i]==="center"||n.step===1?0:this.tickLabelPadding(),h;this.orientation()==="bottom"?h=Vu.sum(this._tierHeights.slice(0,i+1))-this.tickLabelPadding():this._tierLabelPositions[i]==="center"?h=this.height()-Vu.sum(this._tierHeights.slice(0,i))-this.tickLabelPadding()-this._maxLabelTickLength():h=this.height()-Vu.sum(this._tierHeights.slice(0,i))-this.tickLabelPadding();var f=l.merge(c),p=f.selectAll("text");p.size()>0&&p.attr("transform","translate("+u+","+h+")"),l.exit().remove(),f.attr("transform",function(g){return"translate("+o._scale.scale(g)+",0)"});var d=this._tierLabelPositions[i]==="center"||n.step===1?"middle":"start";f.selectAll("text").text(n.formatter).style("text-anchor",d)},t.prototype._renderTickMarks=function(r,n){var i=this._tierMarkContainers[n].selectAll("."+ts.Axis.TICK_MARK_CLASS).data(r),o=i.enter().append("line").classed(ts.Axis.TICK_MARK_CLASS,!0).merge(i),a=this._generateTickMarkAttrHash(),s=this._tierHeights.slice(0,n).reduce(function(l,c){return l+c},0);this.orientation()==="bottom"?(a.y1=s,a.y2=s+(this._tierLabelPositions[n]==="center"?this.innerTickLength():this._tierHeights[n])):(a.y1=this.height()-s,a.y2=this.height()-(s+(this._tierLabelPositions[n]==="center"?this.innerTickLength():this._tierHeights[n]))),o.attrs(a),this.orientation()==="bottom"?(a.y1=s,a.y2=s+(this._tierLabelPositions[n]==="center"?this.endTickLength():this._tierHeights[n])):(a.y1=this.height()-s,a.y2=this.height()-(s+(this._tierLabelPositions[n]==="center"?this.endTickLength():this._tierHeights[n]))),Vu.select(o.nodes()[0]).attrs(a),Vu.select(o.nodes()[o.size()-1]).attrs(a),Vu.select(o.nodes()[0]).classed(ts.Axis.END_TICK_MARK_CLASS,!0),Vu.select(o.nodes()[o.size()-1]).classed(ts.Axis.END_TICK_MARK_CLASS,!0),i.exit().remove()},t.prototype._renderLabellessTickMarks=function(r){var n=this._tickMarkContainer.selectAll("."+ts.Axis.TICK_MARK_CLASS).data(r),i=n.enter().append("line").classed(ts.Axis.TICK_MARK_CLASS,!0).merge(n),o=this._generateTickMarkAttrHash();o.y2=this.orientation()==="bottom"?this.tickLabelPadding():this.height()-this.tickLabelPadding(),i.attrs(o),n.exit().remove()},t.prototype._generateLabellessTicks=function(){return this._mostPreciseConfigIndex<1?[]:this._getTickIntervalValues(this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex-1][0])},t.prototype.renderImmediately=function(){var r=this;this._mostPreciseConfigIndex=this._getMostPreciseConfigurationIndex();var n=this._possibleTimeAxisConfigurations[this._mostPreciseConfigIndex];this._cleanTiers(),n.forEach(function(h,f){return r._renderTierLabels(r._tierLabelContainers[f],h,f)});for(var i=n.map(function(h,f){return r._getTickValuesForConfiguration(h)}),o=0,a=0;a<Math.max(n.length,1);++a){var s=this._generateBaselineAttrHash();s.y1+=this.orientation()==="bottom"?o:-o,s.y2=s.y1,this._tierBaselines[a].attrs(s).style("visibility","inherit"),o+=this._tierHeights[a]}var l=[],c=this._scale.domain(),u=this._scale.scale(c[1])-this._scale.scale(c[0]);this._getIntervalLength(n[0])*1.5>=u&&(l=this._generateLabellessTicks()),this._renderLabellessTickMarks(l),this._hideOverflowingTiers();for(var a=0;a<n.length;++a)this._renderTickMarks(i[a],a),this._hideOverlappingAndCutOffLabels(a);return this.annotationsEnabled()?this._drawAnnotations():this._removeAnnotations(),this},t.prototype._hideOverflowingTiers=function(){var r=this,n=this.height(),i=0;this.content().selectAll("."+t.TIME_AXIS_TIER_CLASS).attr("visibility",function(o,a){return i+=r._tierHeights[a],i<=n?"inherit":"hidden"})},t.prototype._hideOverlappingAndCutOffLabels=function(r){var n=this,i=this.element().node().getBoundingClientRect(),o=function(u){return Math.floor(i.left)<=Math.ceil(u.left)&&Math.floor(i.top)<=Math.ceil(u.top)&&Math.floor(u.right)<=Math.ceil(i.left+n.width())&&Math.floor(u.bottom)<=Math.ceil(i.top+n.height())},a=this._tierMarkContainers[r].selectAll("."+ts.Axis.TICK_MARK_CLASS).filter(function(u,h){var f=Vu.select(this).style("visibility");return f==="visible"||f==="inherit"}),s=a.nodes().map(function(u){return u.getBoundingClientRect()}),l=this._tierLabelContainers[r].selectAll("."+ts.Axis.TICK_LABEL_CLASS).filter(function(u,h){var f=Vu.select(this).style("visibility");return f==="visible"||f==="inherit"}),c;l.each(function(u,h){var f=this.getBoundingClientRect(),p=Vu.select(this),d=s[h],g=s[h+1],_=c!=null&&n4.DOM.clientRectsOverlap(f,c),y=d!=null&&n4.DOM.clientRectsOverlap(f,d),x=g!=null&&n4.DOM.clientRectsOverlap(f,g);!o(f)||_||y||x?p.style("visibility","hidden"):(c=f,p.style("visibility","inherit"))})},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t.TIME_AXIS_TIER_CLASS="time-axis-tier",t._SORTED_TIME_INTERVAL_INDEX=(xd={},xd[Se.TimeInterval.second]=0,xd[Se.TimeInterval.minute]=1,xd[Se.TimeInterval.hour]=2,xd[Se.TimeInterval.day]=3,xd[Se.TimeInterval.week]=4,xd[Se.TimeInterval.month]=5,xd[Se.TimeInterval.year]=6,xd),t._DEFAULT_TIME_AXIS_CONFIGURATIONS=function(r){var n=function(i){return h$t.time(i,r)};return[[{interval:Se.TimeInterval.second,step:1,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:5,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:10,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:15,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.second,step:30,formatter:n("%I:%M:%S %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:1,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:5,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:10,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:15,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.minute,step:30,formatter:n("%I:%M %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:1,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:3,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:6,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.hour,step:12,formatter:n("%I %p")},{interval:Se.TimeInterval.day,step:1,formatter:n("%B %e, %Y")}],[{interval:Se.TimeInterval.day,step:1,formatter:n("%a %e")},{interval:Se.TimeInterval.month,step:1,formatter:n("%B %Y")}],[{interval:Se.TimeInterval.day,step:1,formatter:n("%e")},{interval:Se.TimeInterval.month,step:1,formatter:n("%B %Y")}],[{interval:Se.TimeInterval.month,step:1,formatter:n("%B")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:1,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:3,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.month,step:6,formatter:n("%b")},{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1,formatter:n("%y")}],[{interval:Se.TimeInterval.year,step:5,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:25,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:50,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:100,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:200,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:500,formatter:n("%Y")}],[{interval:Se.TimeInterval.year,step:1e3,formatter:n("%Y")}]]},t._LONG_DATE=new Date(9999,8,29,12,59,9999),t}(ts.Axis);Se.Time=LFe;var xd});var f$t=H(i4=>{"use strict";Object.defineProperty(i4,"__esModule",{value:!0});var hot=(de(),Ut(pe));hot.__exportStar($Xt(),i4);hot.__exportStar(KXt(),i4);hot.__exportStar(HF(),i4)});var o4=H(fot=>{"use strict";Object.defineProperty(fot,"__esModule",{value:!0});var kFe=Fe(),RFe=function(){function e(){this._eventToProcessingFunction={},this._eventTarget=document,this._eventNameToCallbackSet={},this._connected=!1}return e.prototype._hasNoCallbacks=function(){for(var t=Object.keys(this._eventNameToCallbackSet),r=0;r<t.length;r++)if(this._eventNameToCallbackSet[t[r]].size!==0)return!1;return!0},e.prototype._connect=function(){var t=this;this._connected||(Object.keys(this._eventToProcessingFunction).forEach(function(r){var n=t._eventToProcessingFunction[r],i=r==="wheel"?{passive:!1}:void 0;t._eventTarget.addEventListener(r,n,i)}),this._connected=!0)},e.prototype._disconnect=function(){var t=this;this._connected&&this._hasNoCallbacks()&&(Object.keys(this._eventToProcessingFunction).forEach(function(r){var n=t._eventToProcessingFunction[r];t._eventTarget.removeEventListener(r,n)}),this._connected=!1)},e.prototype._addCallbackForEvent=function(t,r){this._eventNameToCallbackSet[t]==null&&(this._eventNameToCallbackSet[t]=new kFe.CallbackSet),this._eventNameToCallbackSet[t].add(r),this._connect()},e.prototype._removeCallbackForEvent=function(t,r){this._eventNameToCallbackSet[t]!=null&&this._eventNameToCallbackSet[t].delete(r),this._disconnect()},e.prototype._callCallbacksForEvent=function(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=this._eventNameToCallbackSet[t];i!=null&&i.callCallbacks.apply(i,r)},e}();fot.Dispatcher=RFe});var p$t=H(pot=>{"use strict";Object.defineProperty(pot,"__esModule",{value:!0});var NFe=(de(),Ut(pe)),DFe=o4(),OFe=function(e){NFe.__extends(t,e);function t(){var r=e.call(this)||this;return r._eventToProcessingFunction[t._KEYDOWN_EVENT_NAME]=function(n){return r._processKeydown(n)},r._eventToProcessingFunction[t._KEYUP_EVENT_NAME]=function(n){return r._processKeyup(n)},r}return t.getDispatcher=function(){var r=document[t._DISPATCHER_KEY];return r==null&&(r=new t,document[t._DISPATCHER_KEY]=r),r},t.prototype._processKeydown=function(r){this._callCallbacksForEvent(t._KEYDOWN_EVENT_NAME,r.keyCode,r)},t.prototype._processKeyup=function(r){this._callCallbacksForEvent(t._KEYUP_EVENT_NAME,r.keyCode,r)},t.prototype.onKeyDown=function(r){return this._addCallbackForEvent(t._KEYDOWN_EVENT_NAME,r),this},t.prototype.offKeyDown=function(r){return this._removeCallbackForEvent(t._KEYDOWN_EVENT_NAME,r),this},t.prototype.onKeyUp=function(r){return this._addCallbackForEvent(t._KEYUP_EVENT_NAME,r),this},t.prototype.offKeyUp=function(r){return this._removeCallbackForEvent(t._KEYUP_EVENT_NAME,r),this},t._DISPATCHER_KEY="__Plottable_Dispatcher_Key",t._KEYDOWN_EVENT_NAME="keydown",t._KEYUP_EVENT_NAME="keyup",t}(DFe.Dispatcher);pot.Key=OFe});var m$t=H(dot=>{"use strict";Object.defineProperty(dot,"__esModule",{value:!0});var zFe=(de(),Ut(pe)),d$t=Fe(),FFe=o4(),BFe=function(e){zFe.__extends(t,e);function t(r){var n=e.call(this)||this;n._lastMousePosition={x:-1,y:-1},n._translator=d$t.getTranslator(r);var i=function(o){return n._measureAndDispatch(r,o,t._MOUSEMOVE_EVENT_NAME,"page")};return n._eventToProcessingFunction[t._MOUSEOVER_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEMOVE_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEOUT_EVENT_NAME]=i,n._eventToProcessingFunction[t._MOUSEDOWN_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._MOUSEDOWN_EVENT_NAME)},n._eventToProcessingFunction[t._MOUSEUP_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._MOUSEUP_EVENT_NAME,"page")},n._eventToProcessingFunction[t._WHEEL_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._WHEEL_EVENT_NAME)},n._eventToProcessingFunction[t._DBLCLICK_EVENT_NAME]=function(o){return n._measureAndDispatch(r,o,t._DBLCLICK_EVENT_NAME)},n}return t.getDispatcher=function(r){var n=r.root().rootElement(),i=n[t._DISPATCHER_KEY];return i==null&&(i=new t(r),n[t._DISPATCHER_KEY]=i),i},t.prototype.onMouseMove=function(r){return this._addCallbackForEvent(t._MOUSEMOVE_EVENT_NAME,r),this},t.prototype.offMouseMove=function(r){return this._removeCallbackForEvent(t._MOUSEMOVE_EVENT_NAME,r),this},t.prototype.onMouseDown=function(r){return this._addCallbackForEvent(t._MOUSEDOWN_EVENT_NAME,r),this},t.prototype.offMouseDown=function(r){return this._removeCallbackForEvent(t._MOUSEDOWN_EVENT_NAME,r),this},t.prototype.onMouseUp=function(r){return this._addCallbackForEvent(t._MOUSEUP_EVENT_NAME,r),this},t.prototype.offMouseUp=function(r){return this._removeCallbackForEvent(t._MOUSEUP_EVENT_NAME,r),this},t.prototype.onWheel=function(r){return this._addCallbackForEvent(t._WHEEL_EVENT_NAME,r),this},t.prototype.offWheel=function(r){return this._removeCallbackForEvent(t._WHEEL_EVENT_NAME,r),this},t.prototype.onDblClick=function(r){return this._addCallbackForEvent(t._DBLCLICK_EVENT_NAME,r),this},t.prototype.offDblClick=function(r){return this._removeCallbackForEvent(t._DBLCLICK_EVENT_NAME,r),this},t.prototype._measureAndDispatch=function(r,n,i,o){if(o===void 0&&(o="element"),o!=="page"&&o!=="element")throw new Error("Invalid scope '"+o+"', must be 'element' or 'page'");if(o==="page"||this.eventInside(r,n)){var a=this._translator.computePosition(n.clientX,n.clientY);this._lastMousePosition=a,this._callCallbacksForEvent(i,this.lastMousePosition(),n)}},t.prototype.eventInside=function(r,n){return d$t.Translator.isEventInside(r,n)},t.prototype.lastMousePosition=function(){return this._lastMousePosition},t._DISPATCHER_KEY="__Plottable_Dispatcher_Mouse",t._MOUSEOVER_EVENT_NAME="mouseover",t._MOUSEMOVE_EVENT_NAME="mousemove",t._MOUSEOUT_EVENT_NAME="mouseout",t._MOUSEDOWN_EVENT_NAME="mousedown",t._MOUSEUP_EVENT_NAME="mouseup",t._WHEEL_EVENT_NAME="wheel",t._DBLCLICK_EVENT_NAME="dblclick",t}(FFe.Dispatcher);dot.Mouse=BFe});var _$t=H(mot=>{"use strict";Object.defineProperty(mot,"__esModule",{value:!0});var HFe=(de(),Ut(pe)),g$t=Fe(),VFe=o4(),UFe=function(e){HFe.__extends(t,e);function t(r){var n=e.call(this)||this;return n._translator=g$t.getTranslator(r),n._eventToProcessingFunction[t._TOUCHSTART_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHSTART_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHMOVE_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHMOVE_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHEND_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHEND_EVENT_NAME,"page")},n._eventToProcessingFunction[t._TOUCHCANCEL_EVENT_NAME]=function(i){return n._measureAndDispatch(r,i,t._TOUCHCANCEL_EVENT_NAME,"page")},n}return t.getDispatcher=function(r){var n=r.root().rootElement(),i=n[t._DISPATCHER_KEY];return i==null&&(i=new t(r),n[t._DISPATCHER_KEY]=i),i},t.prototype.onTouchStart=function(r){return this._addCallbackForEvent(t._TOUCHSTART_EVENT_NAME,r),this},t.prototype.offTouchStart=function(r){return this._removeCallbackForEvent(t._TOUCHSTART_EVENT_NAME,r),this},t.prototype.onTouchMove=function(r){return this._addCallbackForEvent(t._TOUCHMOVE_EVENT_NAME,r),this},t.prototype.offTouchMove=function(r){return this._removeCallbackForEvent(t._TOUCHMOVE_EVENT_NAME,r),this},t.prototype.onTouchEnd=function(r){return this._addCallbackForEvent(t._TOUCHEND_EVENT_NAME,r),this},t.prototype.offTouchEnd=function(r){return this._removeCallbackForEvent(t._TOUCHEND_EVENT_NAME,r),this},t.prototype.onTouchCancel=function(r){return this._addCallbackForEvent(t._TOUCHCANCEL_EVENT_NAME,r),this},t.prototype.offTouchCancel=function(r){return this._removeCallbackForEvent(t._TOUCHCANCEL_EVENT_NAME,r),this},t.prototype._measureAndDispatch=function(r,n,i,o){if(o===void 0&&(o="element"),o!=="page"&&o!=="element")throw new Error("Invalid scope '"+o+"', must be 'element' or 'page'");if(!(o==="element"&&!this.eventInside(r,n))){for(var a=n.changedTouches,s={},l=[],c=0;c<a.length;c++){var u=a[c],h=u.identifier,f=this._translator.computePosition(u.clientX,u.clientY);f!=null&&(s[h]=f,l.push(h))}l.length>0&&this._callCallbacksForEvent(i,l,s,n)}},t.prototype.eventInside=function(r,n){return g$t.Translator.isEventInside(r,n)},t._DISPATCHER_KEY="__Plottable_Dispatcher_Touch",t._TOUCHSTART_EVENT_NAME="touchstart",t._TOUCHMOVE_EVENT_NAME="touchmove",t._TOUCHEND_EVENT_NAME="touchend",t._TOUCHCANCEL_EVENT_NAME="touchcancel",t}(VFe.Dispatcher);mot.Touch=UFe});var Nv=H(a4=>{"use strict";Object.defineProperty(a4,"__esModule",{value:!0});var got=(de(),Ut(pe));got.__exportStar(p$t(),a4);got.__exportStar(m$t(),a4);got.__exportStar(_$t(),a4)});var Dv=H(_ot=>{"use strict";Object.defineProperty(_ot,"__esModule",{value:!0});var qFe=function(){function e(){var t=this;this._anchorCallback=function(r){return t._anchor(r)},this._enabled=!0}return e.prototype.attachTo=function(t){return this._disconnect(),this._componentAttachedTo=t,this._connect(),this},e.prototype.detachFrom=function(t){return this.detach()},e.prototype.detach=function(){return this._disconnect(),this._componentAttachedTo=null,this},e.prototype.enabled=function(t){return t==null?this._enabled:(this._enabled=t,this._enabled?this._connect():this._disconnect(),this)},e.prototype._anchor=function(t){this._isAnchored=!0},e.prototype._unanchor=function(){this._isAnchored=!1},e.prototype._translateToComponentSpace=function(t){var r=this._componentAttachedTo.originToRoot();return{x:t.x-r.x,y:t.y-r.y}},e.prototype._isInsideComponent=function(t){return 0<=t.x&&0<=t.y&&t.x<=this._componentAttachedTo.width()&&t.y<=this._componentAttachedTo.height()},e.prototype._connect=function(){this.enabled()&&this._componentAttachedTo!=null&&!this._isAnchored&&this._componentAttachedTo.onAnchor(this._anchorCallback)},e.prototype._disconnect=function(){this._isAnchored&&this._unanchor(),this._componentAttachedTo!=null&&this._componentAttachedTo.offAnchor(this._anchorCallback)},e}();_ot.Interaction=qFe});var x$t=H(yot=>{"use strict";Object.defineProperty(yot,"__esModule",{value:!0});var GFe=(de(),Ut(pe)),y$t=Nv(),v$t=Fe(),WFe=Dv(),YFe=function(e){GFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._clickedDown=!1,r._doubleClicking=!1,r._onClickCallbacks=new v$t.CallbackSet,r._onDoubleClickCallbacks=new v$t.CallbackSet,r._mouseDownCallback=function(n,i){return r._handleClickDown(n,i)},r._mouseUpCallback=function(n,i){return r._handleClickUp(n,i)},r._dblClickCallback=function(n,i){return r._handleDblClick(n,i)},r._touchStartCallback=function(n,i,o){return r._handleClickDown(i[n[0]],o)},r._touchEndCallback=function(n,i,o){return r._handleClickUp(i[n[0]],o)},r._touchCancelCallback=function(n,i){return r._clickedDown=!1},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=y$t.Mouse.getDispatcher(r),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._mouseDispatcher.onDblClick(this._dblClickCallback),this._touchDispatcher=y$t.Touch.getDispatcher(r),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback),this._touchDispatcher.onTouchCancel(this._touchCancelCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseDown(this._mouseDownCallback),this._mouseDispatcher.offMouseUp(this._mouseUpCallback),this._mouseDispatcher.offDblClick(this._dblClickCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher.offTouchCancel(this._touchCancelCallback),this._touchDispatcher=null},t.prototype._handleClickDown=function(r,n){var i=this._translateToComponentSpace(r);this._isInsideComponent(i)&&(this._clickedDown=!0,this._clickedPoint=i)},t.prototype._handleClickUp=function(r,n){var i=this,o=this._translateToComponentSpace(r);this._clickedDown&&t._pointsEqual(o,this._clickedPoint)&&setTimeout(function(){i._doubleClicking||i._onClickCallbacks.callCallbacks(o,n)},0),this._clickedDown=!1},t.prototype._handleDblClick=function(r,n){var i=this,o=this._translateToComponentSpace(r);this._doubleClicking=!0,this._onDoubleClickCallbacks.callCallbacks(o,n),setTimeout(function(){return i._doubleClicking=!1},0)},t._pointsEqual=function(r,n){return r.x===n.x&&r.y===n.y},t.prototype.onClick=function(r){return this._onClickCallbacks.add(r),this},t.prototype.offClick=function(r){return this._onClickCallbacks.delete(r),this},t.prototype.onDoubleClick=function(r){return this._onDoubleClickCallbacks.add(r),this},t.prototype.offDoubleClick=function(r){return this._onDoubleClickCallbacks.delete(r),this},t}(WFe.Interaction);yot.Click=YFe});var w$t=H(vot=>{"use strict";Object.defineProperty(vot,"__esModule",{value:!0});var jFe=(de(),Ut(pe)),b$t=Nv(),s4=Fe(),XFe=Dv(),$Fe=function(e){jFe.__extends(t,e);function t(r){var n=e.call(this)||this;return n._dragging=!1,n._constrainedToComponent=!0,n._mouseFilter=t._DEFAULT_MOUSE_FILTER,n._dragStartCallbacks=new s4.CallbackSet,n._dragCallbacks=new s4.CallbackSet,n._dragEndCallbacks=new s4.CallbackSet,n._mouseDownCallback=function(i,o){return n._startDrag(i,o)},n._mouseMoveCallback=function(i,o){return n._doDrag(i,o)},n._mouseUpCallback=function(i,o){return n._endDrag(i,o)},n._touchStartCallback=function(i,o,a){return n._startDrag(o[i[0]],a)},n._touchMoveCallback=function(i,o,a){return n._doDrag(o[i[0]],a)},n._touchEndCallback=function(i,o,a){return n._endDrag(o[i[0]],a)},n._mouseButton=r!==void 0?r:0,n}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=b$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseDown(this._mouseDownCallback),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._mouseDispatcher.onMouseUp(this._mouseUpCallback),this._touchDispatcher=b$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchMove(this._touchMoveCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseDown(this._mouseDownCallback),this._mouseDispatcher.offMouseMove(this._mouseMoveCallback),this._mouseDispatcher.offMouseUp(this._mouseUpCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchMove(this._touchMoveCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher=null},t.prototype._translateAndConstrain=function(r){var n=this._translateToComponentSpace(r);return this._constrainedToComponent?{x:s4.Math.clamp(n.x,0,this._componentAttachedTo.width()),y:s4.Math.clamp(n.y,0,this._componentAttachedTo.height())}:n},t.prototype._startDrag=function(r,n){if(!(n instanceof MouseEvent&&!this._mouseFilter(n))){var i=this._translateToComponentSpace(r);this._isInsideComponent(i)&&(n.preventDefault(),this._dragging=!0,this._dragOrigin=i,this._dragStartCallbacks.callCallbacks(this._dragOrigin))}},t.prototype._doDrag=function(r,n){this._dragging&&this._dragCallbacks.callCallbacks(this._dragOrigin,this._translateAndConstrain(r))},t.prototype._endDrag=function(r,n){n instanceof MouseEvent&&n.button!==this._mouseButton||this._dragging&&(this._dragging=!1,this._dragEndCallbacks.callCallbacks(this._dragOrigin,this._translateAndConstrain(r)))},t.prototype.constrainedToComponent=function(r){return r==null?this._constrainedToComponent:(this._constrainedToComponent=r,this)},t.prototype.mouseFilter=function(r){return arguments.length===0?this._mouseFilter:(this._mouseFilter=r,this)},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t._DEFAULT_MOUSE_FILTER=function(r){return r.button===0},t}(XFe.Interaction);vot.Drag=$Fe});var wot=H(bot=>{"use strict";Object.defineProperty(bot,"__esModule",{value:!0});var KFe=(de(),Ut(pe)),S$t=Nv(),xot=Fe(),ZFe=Dv(),JFe=function(e){KFe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._keyPressCallbacks={},r._keyReleaseCallbacks={},r._mouseMoveCallback=function(n){return!1},r._downedKeys=new xot.Set,r._keyDownCallback=function(n,i){return r._handleKeyDownEvent(n,i)},r._keyUpCallback=function(n){return r._handleKeyUpEvent(n)},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._positionDispatcher=S$t.Mouse.getDispatcher(this._componentAttachedTo),this._positionDispatcher.onMouseMove(this._mouseMoveCallback),this._keyDispatcher=S$t.Key.getDispatcher(),this._keyDispatcher.onKeyDown(this._keyDownCallback),this._keyDispatcher.onKeyUp(this._keyUpCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._positionDispatcher.offMouseMove(this._mouseMoveCallback),this._positionDispatcher=null,this._keyDispatcher.offKeyDown(this._keyDownCallback),this._keyDispatcher.offKeyUp(this._keyUpCallback),this._keyDispatcher=null},t.prototype._handleKeyDownEvent=function(r,n){var i=this._translateToComponentSpace(this._positionDispatcher.lastMousePosition());this._isInsideComponent(i)&&!n.repeat&&(this._keyPressCallbacks[r]&&this._keyPressCallbacks[r].callCallbacks(r),this._downedKeys.add(r))},t.prototype._handleKeyUpEvent=function(r){this._downedKeys.has(r)&&this._keyReleaseCallbacks[r]&&this._keyReleaseCallbacks[r].callCallbacks(r),this._downedKeys.delete(r)},t.prototype.onKeyPress=function(r,n){return this._keyPressCallbacks[r]||(this._keyPressCallbacks[r]=new xot.CallbackSet),this._keyPressCallbacks[r].add(n),this},t.prototype.offKeyPress=function(r,n){return this._keyPressCallbacks[r].delete(n),this._keyPressCallbacks[r].size===0&&delete this._keyPressCallbacks[r],this},t.prototype.onKeyRelease=function(r,n){return this._keyReleaseCallbacks[r]||(this._keyReleaseCallbacks[r]=new xot.CallbackSet),this._keyReleaseCallbacks[r].add(n),this},t.prototype.offKeyRelease=function(r,n){return this._keyReleaseCallbacks[r].delete(n),this._keyReleaseCallbacks[r].size===0&&delete this._keyReleaseCallbacks[r],this},t}(ZFe.Interaction);bot.Key=JFe});var C$t=H(Sot=>{"use strict";Object.defineProperty(Sot,"__esModule",{value:!0});var QFe=(de(),Ut(pe)),tBe=(Er(),Ut(Mr)),M$t=Nv(),E$t=ks(),yl=Fe(),eBe=l4(),rBe=Dv(),T$t=e4(),nBe=function(e){QFe.__extends(t,e);function t(r,n){var i=e.call(this)||this;return i._wheelFilter=function(o){return!0},i._wheelCallback=function(o,a){return i._handleWheelEvent(o,a)},i._touchStartCallback=function(o,a,s){return i._handleTouchStart(o,a,s)},i._touchMoveCallback=function(o,a,s){return i._handlePinch(o,a,s)},i._touchEndCallback=function(o,a,s){return i._handleTouchEnd(o,a,s)},i._touchCancelCallback=function(o,a,s){return i._handleTouchEnd(o,a,s)},i._panEndCallbacks=new yl.CallbackSet,i._zoomEndCallbacks=new yl.CallbackSet,i._panZoomUpdateCallbacks=new yl.CallbackSet,i._xScales=new yl.Set,i._yScales=new yl.Set,i._dragInteraction=new eBe.Drag,i._setupDragInteraction(),i._touchIds=tBe.map(),i._minDomainExtents=new yl.Map,i._maxDomainExtents=new yl.Map,i._minDomainValues=new yl.Map,i._maxDomainValues=new yl.Map,r!=null&&i.addXScale(r),n!=null&&i.addYScale(n),i}return t.prototype.dragInteraction=function(){return this._dragInteraction},t.prototype.wheelFilter=function(r){return arguments.length===0?this._wheelFilter:(this._wheelFilter=r,this)},t.prototype.pan=function(r){var n=this;this.xScales().forEach(function(i){i.pan(n._constrainedTranslation(i,r.x))}),this.yScales().forEach(function(i){i.pan(n._constrainedTranslation(i,r.y))}),this._panZoomUpdateCallbacks.callCallbacks()},t.prototype.zoom=function(r,n,i){var o=this;i===void 0&&(i=!0);var a,s;return n!=null&&(a=n.x,s=n.y,i&&(this.xScales().forEach(function(l){var c=o._constrainedZoom(l,r,a);a=c.centerPoint,r=c.zoomAmount}),this.yScales().forEach(function(l){var c=o._constrainedZoom(l,r,s);s=c.centerPoint,r=c.zoomAmount}))),this.xScales().forEach(function(l){var c=l.range(),u=a==null?(c[1]+c[0])/2:a;l.zoom(r,u)}),this.yScales().forEach(function(l){var c=l.range(),u=s==null?(c[1]+c[0])/2:s;l.zoom(r,u)}),this._panZoomUpdateCallbacks.callCallbacks(),{zoomAmount:r,centerValue:{centerX:a,centerY:s}}},t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._dragInteraction.attachTo(r),this._mouseDispatcher=M$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onWheel(this._wheelCallback),this._touchDispatcher=M$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback),this._touchDispatcher.onTouchMove(this._touchMoveCallback),this._touchDispatcher.onTouchEnd(this._touchEndCallback),this._touchDispatcher.onTouchCancel(this._touchCancelCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offWheel(this._wheelCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher.offTouchMove(this._touchMoveCallback),this._touchDispatcher.offTouchEnd(this._touchEndCallback),this._touchDispatcher.offTouchCancel(this._touchCancelCallback),this._touchDispatcher=null,this._dragInteraction.detach()},t.prototype._handleTouchStart=function(r,n,i){for(var o=0;o<r.length&&this._touchIds.size()<2;o++){var a=r[o];this._touchIds.set(a.toString(),this._translateToComponentSpace(n[a]))}},t.prototype._handlePinch=function(r,n,i){var o=this;if(!(this._touchIds.size()<2)){var a=this._touchIds.values();if(!(!this._isInsideComponent(this._translateToComponentSpace(a[0]))||!this._isInsideComponent(this._translateToComponentSpace(a[1])))){var s=t._pointDistance(a[0],a[1]);if(s!==0){r.forEach(function(S){o._touchIds.has(S.toString())&&o._touchIds.set(S.toString(),o._translateToComponentSpace(n[S]))});var l=this._touchIds.values(),c=t._pointDistance(l[0],l[1]);if(c!==0){var u=s/c,h=l.map(function(S,C){return{x:(S.x-a[C].x)/u,y:(S.y-a[C].y)/u}}),f=t.centerPoint(a[0],a[1]),p=this.zoom(u,f),d=p.centerValue,g=p.zoomAmount,_=d.centerX,y=d.centerY,x=a.map(function(S,C){return{x:h[C].x*g+S.x,y:h[C].y*g+S.y}}),b={x:_-(x[0].x+x[1].x)/2,y:y-(x[0].y+x[1].y)/2};this.pan(b)}}}}},t.centerPoint=function(r,n){var i=Math.min(r.x,n.x),o=Math.max(r.x,n.x),a=Math.min(r.y,n.y),s=Math.max(r.y,n.y);return{x:(i+o)/2,y:(s+a)/2}},t._pointDistance=function(r,n){var i=Math.min(r.x,n.x),o=Math.max(r.x,n.x),a=Math.min(r.y,n.y),s=Math.max(r.y,n.y);return Math.sqrt(Math.pow(o-i,2)+Math.pow(s-a,2))},t.prototype._handleTouchEnd=function(r,n,i){var o=this;r.forEach(function(a){o._touchIds.remove(a.toString())}),this._touchIds.size()>0&&this._zoomEndCallbacks.callCallbacks()},t.prototype._handleWheelEvent=function(r,n){if(!!this._wheelFilter(n)){var i=this._translateToComponentSpace(r);if(this._isInsideComponent(i)){n.preventDefault();var o=n.deltaY!==0?n.deltaY:n.deltaX,a=o*(n.deltaMode?t._PIXELS_PER_LINE:1),s=Math.pow(2,a*.002);this.zoom(s,i),this._zoomEndCallbacks.callCallbacks()}}},t.prototype._constrainedZoom=function(r,n,i){return T$t.constrainedZoom(r,n,i,this.minDomainExtent(r),this.maxDomainExtent(r),this.minDomainValue(r),this.maxDomainValue(r))},t.prototype._constrainedTranslation=function(r,n){return T$t.constrainedTranslation(r,n,this.minDomainValue(r),this.maxDomainValue(r))},t.prototype._setupDragInteraction=function(){var r=this;this._dragInteraction.constrainedToComponent(!1);var n;this._dragInteraction.onDragStart(function(){return n=null}),this._dragInteraction.onDrag(function(i,o){if(!(r._touchIds.size()>=2)){var a={x:(n==null?i.x:n.x)-o.x,y:(n==null?i.y:n.y)-o.y};r.pan(a),n=o}}),this._dragInteraction.onDragEnd(function(){return r._panEndCallbacks.callCallbacks()})},t.prototype._nonLinearScaleWithExtents=function(r){return this.minDomainExtent(r)!=null&&this.maxDomainExtent(r)!=null&&!(r instanceof E$t.Linear)&&!(r instanceof E$t.Time)},t.prototype.xScales=function(r){var n=this;if(r==null){var i=[];return this._xScales.forEach(function(o){i.push(o)}),i}return this._xScales=new yl.Set,r.forEach(function(o){n.addXScale(o)}),this},t.prototype.yScales=function(r){var n=this;if(r==null){var i=[];return this._yScales.forEach(function(o){i.push(o)}),i}return this._yScales=new yl.Set,r.forEach(function(o){n.addYScale(o)}),this},t.prototype.addXScale=function(r){return this._xScales.add(r),this},t.prototype.removeXScale=function(r){return this._xScales.delete(r),this._minDomainExtents.delete(r),this._maxDomainExtents.delete(r),this._minDomainValues.delete(r),this._maxDomainValues.delete(r),this},t.prototype.addYScale=function(r){return this._yScales.add(r),this},t.prototype.removeYScale=function(r){return this._yScales.delete(r),this._minDomainExtents.delete(r),this._maxDomainExtents.delete(r),this._minDomainValues.delete(r),this._maxDomainValues.delete(r),this},t.prototype.minDomainExtent=function(r,n){if(n==null)return this._minDomainExtents.get(r);if(n.valueOf()<0)throw new Error("extent must be non-negative");var i=this.maxDomainExtent(r);if(i!=null&&i.valueOf()<n.valueOf())throw new Error("minDomainExtent must be smaller than maxDomainExtent for the same Scale");return this._nonLinearScaleWithExtents(r)&&yl.Window.warn("Panning and zooming with extents on a nonlinear scale may have unintended behavior."),this._minDomainExtents.set(r,n),this},t.prototype.maxDomainExtent=function(r,n){if(n==null)return this._maxDomainExtents.get(r);if(n.valueOf()<=0)throw new Error("extent must be positive");var i=this.minDomainExtent(r);if(i!=null&&n.valueOf()<i.valueOf())throw new Error("maxDomainExtent must be larger than minDomainExtent for the same Scale");return this._nonLinearScaleWithExtents(r)&&yl.Window.warn("Panning and zooming with extents on a nonlinear scale may have unintended behavior."),this._maxDomainExtents.set(r,n),this},t.prototype.minDomainValue=function(r,n){return n==null?this._minDomainValues.get(r):(this._minDomainValues.set(r,n),this)},t.prototype.maxDomainValue=function(r,n){return n==null?this._maxDomainValues.get(r):(this._maxDomainValues.set(r,n),this)},t.prototype.setMinMaxDomainValuesTo=function(r){this._minDomainValues.delete(r),this._maxDomainValues.delete(r);var n=r.getTransformationDomain(),i=n[0],o=n[1];return this.minDomainValue(r,i),this.maxDomainValue(r,o),this},t.prototype.onPanEnd=function(r){return this._panEndCallbacks.add(r),this},t.prototype.offPanEnd=function(r){return this._panEndCallbacks.delete(r),this},t.prototype.onZoomEnd=function(r){return this._zoomEndCallbacks.add(r),this},t.prototype.offZoomEnd=function(r){return this._zoomEndCallbacks.delete(r),this},t.prototype.onPanZoomUpdate=function(r){return this._panZoomUpdateCallbacks.add(r),this},t.prototype.offPanZoomUpdate=function(r){return this._panZoomUpdateCallbacks.delete(r),this},t._PIXELS_PER_LINE=120,t}(rBe.Interaction);Sot.PanZoom=nBe});var P$t=H(Eot=>{"use strict";Object.defineProperty(Eot,"__esModule",{value:!0});var iBe=(de(),Ut(pe)),A$t=Nv(),Mot=Fe(),oBe=Dv(),aBe=function(e){iBe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._overComponent=!1,r._pointerEnterCallbacks=new Mot.CallbackSet,r._pointerMoveCallbacks=new Mot.CallbackSet,r._pointerExitCallbacks=new Mot.CallbackSet,r._mouseMoveCallback=function(n,i){return r._handleMouseEvent(n,i)},r._touchStartCallback=function(n,i,o){return r._handleTouchEvent(i[n[0]],o)},r}return t.prototype._anchor=function(r){e.prototype._anchor.call(this,r),this._mouseDispatcher=A$t.Mouse.getDispatcher(this._componentAttachedTo),this._mouseDispatcher.onMouseMove(this._mouseMoveCallback),this._touchDispatcher=A$t.Touch.getDispatcher(this._componentAttachedTo),this._touchDispatcher.onTouchStart(this._touchStartCallback)},t.prototype._unanchor=function(){e.prototype._unanchor.call(this),this._mouseDispatcher.offMouseMove(this._mouseMoveCallback),this._mouseDispatcher=null,this._touchDispatcher.offTouchStart(this._touchStartCallback),this._touchDispatcher=null},t.prototype._handleMouseEvent=function(r,n){var i=this._mouseDispatcher.eventInside(this._componentAttachedTo,n);this._handlePointerEvent(r,i)},t.prototype._handleTouchEvent=function(r,n){var i=this._touchDispatcher.eventInside(this._componentAttachedTo,n);this._handlePointerEvent(r,i)},t.prototype._handlePointerEvent=function(r,n){var i=this._translateToComponentSpace(r),o=this._isInsideComponent(i);o&&n?(this._overComponent||this._pointerEnterCallbacks.callCallbacks(i),this._pointerMoveCallbacks.callCallbacks(i)):this._overComponent&&this._pointerExitCallbacks.callCallbacks(i),this._overComponent=o&&n},t.prototype.onPointerEnter=function(r){return this._pointerEnterCallbacks.add(r),this},t.prototype.offPointerEnter=function(r){return this._pointerEnterCallbacks.delete(r),this},t.prototype.onPointerMove=function(r){return this._pointerMoveCallbacks.add(r),this},t.prototype.offPointerMove=function(r){return this._pointerMoveCallbacks.delete(r),this},t.prototype.onPointerExit=function(r){return this._pointerExitCallbacks.add(r),this},t.prototype.offPointerExit=function(r){return this._pointerExitCallbacks.delete(r),this},t}(oBe.Interaction);Eot.Pointer=aBe});var l4=H(Zg=>{"use strict";Object.defineProperty(Zg,"__esModule",{value:!0});var c4=(de(),Ut(pe));c4.__exportStar(x$t(),Zg);c4.__exportStar(w$t(),Zg);c4.__exportStar(wot(),Zg);c4.__exportStar(C$t(),Zg);c4.__exportStar(P$t(),Zg);var sBe=e4();Zg.zoomOut=sBe.zoomOut});var Tot=H(u4=>{"use strict";Object.defineProperty(u4,"__esModule",{value:!0});var lBe=(de(),Ut(pe)),VF=Fe(),cBe=kc(),es;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(es=u4.PropertyMode||(u4.PropertyMode={}));var uBe=function(e){lBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._boxVisible=!1,r._boxBounds={topLeft:{x:0,y:0},bottomRight:{x:0,y:0}},r._xBoundsMode=es.PIXEL,r._yBoundsMode=es.PIXEL,r.addClass("selection-box-layer"),r._adjustBoundsCallback=function(){r.render()},r._overflowHidden=!0,r._xExtent=[void 0,void 0],r._yExtent=[void 0,void 0],r}return t.prototype._setup=function(){e.prototype._setup.call(this),this._box=this.content().append("g").classed("selection-box",!0).remove(),this._boxArea=this._box.append("rect").classed("selection-area",!0)},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype.bounds=function(r){return r==null?this._getBounds():(this._setBounds(r),this._xBoundsMode=es.PIXEL,this._yBoundsMode=es.PIXEL,this.render(),this)},t.prototype._setBounds=function(r){var n={x:Math.min(r.topLeft.x,r.bottomRight.x),y:Math.min(r.topLeft.y,r.bottomRight.y)},i={x:Math.max(r.topLeft.x,r.bottomRight.x),y:Math.max(r.topLeft.y,r.bottomRight.y)};this._boxBounds={topLeft:n,bottomRight:i}},t.prototype._getBounds=function(){return{topLeft:{x:this._xBoundsMode===es.PIXEL?this._boxBounds.topLeft.x:this._xScale==null?0:Math.min(this.xScale().scale(this.xExtent()[0]),this.xScale().scale(this.xExtent()[1])),y:this._yBoundsMode===es.PIXEL?this._boxBounds.topLeft.y:this._yScale==null?0:Math.min(this.yScale().scale(this.yExtent()[0]),this.yScale().scale(this.yExtent()[1]))},bottomRight:{x:this._xBoundsMode===es.PIXEL?this._boxBounds.bottomRight.x:this._xScale==null?0:Math.max(this.xScale().scale(this.xExtent()[0]),this.xScale().scale(this.xExtent()[1])),y:this._yBoundsMode===es.PIXEL?this._boxBounds.bottomRight.y:this._yScale==null?0:Math.max(this.yScale().scale(this.yExtent()[0]),this.yScale().scale(this.yExtent()[1]))}}},t.prototype.renderImmediately=function(){if(e.prototype.renderImmediately.call(this),this._boxVisible){var r=this.bounds(),n=r.topLeft.y,i=r.bottomRight.y,o=r.topLeft.x,a=r.bottomRight.x;if(!(VF.Math.isValidNumber(n)&&VF.Math.isValidNumber(i)&&VF.Math.isValidNumber(o)&&VF.Math.isValidNumber(a)))throw new Error("bounds have not been properly set");this._boxArea.attrs({x:o,y:n,width:a-o,height:i-n}),this.content().node().appendChild(this._box.node())}else this._box.remove();return this},t.prototype.boxVisible=function(r){return r==null?this._boxVisible:(this._boxVisible=r,this.render(),this)},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.xScale=function(r){return r==null?this._xScale:(this._xScale!=null&&this._xScale.offUpdate(this._adjustBoundsCallback),this._xScale=r,this._xBoundsMode=es.VALUE,this._xScale.onUpdate(this._adjustBoundsCallback),this.render(),this)},t.prototype.yScale=function(r){return r==null?this._yScale:(this._yScale!=null&&this._yScale.offUpdate(this._adjustBoundsCallback),this._yScale=r,this._yBoundsMode=es.VALUE,this._yScale.onUpdate(this._adjustBoundsCallback),this.render(),this)},t.prototype.xExtent=function(r){return r==null?this._getXExtent():(this._setXExtent(r),this._xBoundsMode=es.VALUE,this.render(),this)},t.prototype._getXExtent=function(){return this._xBoundsMode===es.VALUE?this._xExtent:this._xScale==null?[void 0,void 0]:[this._xScale.invert(this._boxBounds.topLeft.x),this._xScale.invert(this._boxBounds.bottomRight.x)]},t.prototype._setXExtent=function(r){this._xExtent=r},t.prototype.yExtent=function(r){return r==null?this._getYExtent():(this._setYExtent(r),this._yBoundsMode=es.VALUE,this.render(),this)},t.prototype._getYExtent=function(){return this._yBoundsMode===es.VALUE?this._yExtent:this._yScale==null?[void 0,void 0]:[this._yScale.invert(this._boxBounds.topLeft.y),this._yScale.invert(this._boxBounds.bottomRight.y)]},t.prototype._setYExtent=function(r){this._yExtent=r},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._xScale!=null&&this.xScale().offUpdate(this._adjustBoundsCallback),this._yScale!=null&&this.yScale().offUpdate(this._adjustBoundsCallback)},t}(cBe.Component);u4.SelectionBoxLayer=uBe});var qF=H(Aot=>{"use strict";Object.defineProperty(Aot,"__esModule",{value:!0});var hBe=(de(),Ut(pe)),fBe=l4(),Cot=Fe(),pBe=Yg(),UF=Pot(),dBe=Tot(),mBe=function(e){hBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._detectionRadius=3,r._resizable=!1,r._movable=!1,r._hasCorners=!0,r.addClass("drag-box-layer"),r._dragInteraction=new fBe.Drag,r._setUpCallbacks(),r._dragInteraction.attachTo(r),r._dragStartCallbacks=new Cot.CallbackSet,r._dragCallbacks=new Cot.CallbackSet,r._dragEndCallbacks=new Cot.CallbackSet,r}return t.prototype._setUpCallbacks=function(){var r=this,n,i,o,a,s={newBox:0,resize:1,move:2},l=s.newBox,c=function(f){n=r._getResizingEdges(f);var p=r.bounds(),d=p.topLeft.x<=f.x&&f.x<=p.bottomRight.x&&p.topLeft.y<=f.y&&f.y<=p.bottomRight.y;r.boxVisible()&&(n.top||n.bottom||n.left||n.right)?l=s.resize:r.boxVisible()&&r.movable()&&d?l=s.move:(l=s.newBox,r._setBounds({topLeft:f,bottomRight:f}),r._xBoundsMode===UF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(f.x),r.xScale().invert(f.x)]),r._yBoundsMode===UF.PropertyMode.VALUE&&r.yScale()!=null&&r._setYExtent([r.yScale().invert(f.y),r.yScale().invert(f.y)]),r.render()),r.boxVisible(!0),p=r.bounds(),i={x:p.topLeft.x,y:p.topLeft.y},o={x:p.bottomRight.x,y:p.bottomRight.y},a=f,r._dragStartCallbacks.callCallbacks(p)},u=function(f,p){switch(l){case s.newBox:o.x=p.x,o.y=p.y;break;case s.resize:n.bottom?o.y=p.y:n.top&&(i.y=p.y),n.right?o.x=p.x:n.left&&(i.x=p.x);break;case s.move:var d=p.x-a.x,g=p.y-a.y;i.x+=d,i.y+=g,o.x+=d,o.y+=g,a=p;break}r._setBounds({topLeft:i,bottomRight:o}),r._xBoundsMode===UF.PropertyMode.VALUE&&r.xScale()!=null&&r._setXExtent([r.xScale().invert(i.x),r.xScale().invert(o.x)]),r._yBoundsMode===UF.PropertyMode.VALUE&&r.yScale()!=null&&r._setYExtent([r.yScale().invert(i.y),r.yScale().invert(o.y)]),r.render(),r._dragCallbacks.callCallbacks(r.bounds())},h=function(f,p){l===s.newBox&&f.x===p.x&&f.y===p.y&&r.boxVisible(!1),r._dragEndCallbacks.callCallbacks(r.bounds())};this._dragInteraction.onDragStart(c),this._dragInteraction.onDrag(u),this._dragInteraction.onDragEnd(h),this._disconnectInteraction=function(){r._dragInteraction.offDragStart(c),r._dragInteraction.offDrag(u),r._dragInteraction.offDragEnd(h),r._dragInteraction.detach()}},t.prototype._setup=function(){var r=this;e.prototype._setup.call(this);var n=function(){return r._box.append("line").styles({opacity:0,stroke:"pink","pointer-events":"visibleStroke"})};if(this._detectionEdgeT=n().classed("drag-edge-tb",!0),this._detectionEdgeB=n().classed("drag-edge-tb",!0),this._detectionEdgeL=n().classed("drag-edge-lr",!0),this._detectionEdgeR=n().classed("drag-edge-lr",!0),this._hasCorners){var i=function(){return r._box.append("circle").styles({opacity:0,fill:"pink","pointer-events":"visibleFill"})};this._detectionCornerTL=i().classed("drag-corner-tl",!0),this._detectionCornerTR=i().classed("drag-corner-tr",!0),this._detectionCornerBL=i().classed("drag-corner-bl",!0),this._detectionCornerBR=i().classed("drag-corner-br",!0)}},t.prototype._getResizingEdges=function(r){var n={top:!1,bottom:!1,left:!1,right:!1};if(!this.resizable())return n;var i=this.bounds(),o=i.topLeft.y,a=i.bottomRight.y,s=i.topLeft.x,l=i.bottomRight.x,c=this._detectionRadius;return s-c<=r.x&&r.x<=l+c&&(n.top=o-c<=r.y&&r.y<=o+c,n.bottom=a-c<=r.y&&r.y<=a+c),o-c<=r.y&&r.y<=a+c&&(n.left=s-c<=r.x&&r.x<=s+c,n.right=l-c<=r.x&&r.x<=l+c),n},t.prototype.renderImmediately=function(){if(e.prototype.renderImmediately.call(this),this.boxVisible()){var r=this.bounds(),n=r.topLeft.y,i=r.bottomRight.y,o=r.topLeft.x,a=r.bottomRight.x;this._detectionEdgeT.attrs({x1:o,y1:n,x2:a,y2:n,"stroke-width":this._detectionRadius*2}),this._detectionEdgeB.attrs({x1:o,y1:i,x2:a,y2:i,"stroke-width":this._detectionRadius*2}),this._detectionEdgeL.attrs({x1:o,y1:n,x2:o,y2:i,"stroke-width":this._detectionRadius*2}),this._detectionEdgeR.attrs({x1:a,y1:n,x2:a,y2:i,"stroke-width":this._detectionRadius*2}),this._hasCorners&&(this._detectionCornerTL.attrs({cx:o,cy:n,r:this._detectionRadius}),this._detectionCornerTR.attrs({cx:a,cy:n,r:this._detectionRadius}),this._detectionCornerBL.attrs({cx:o,cy:i,r:this._detectionRadius}),this._detectionCornerBR.attrs({cx:a,cy:i,r:this._detectionRadius}))}return this},t.prototype.detectionRadius=function(r){if(r==null)return this._detectionRadius;if(r<0)throw new Error("detection radius cannot be negative.");return this._detectionRadius=r,this.render(),this},t.prototype.resizable=function(r){return r==null?this._resizable:(this._resizable=r,this._setResizableClasses(r),this)},t.prototype._setResizableClasses=function(r){r&&this.enabled()?(this.addClass("x-resizable"),this.addClass("y-resizable")):(this.removeClass("x-resizable"),this.removeClass("y-resizable"))},t.prototype.movable=function(r){return r==null?this._movable:(this._movable=r,this._setMovableClass(),this)},t.prototype._setMovableClass=function(){this.movable()&&this.enabled()?this.addClass("movable"):this.removeClass("movable")},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t.prototype.dragInteraction=function(){return this._dragInteraction},t.prototype.enabled=function(r){return r==null?this._dragInteraction.enabled():(this._dragInteraction.enabled(r),this._setResizableClasses(this.resizable()),this._setMovableClass(),this)},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._dragStartCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragEndCallbacks.forEach(function(n){return r._dragEndCallbacks.delete(n)}),this._disconnectInteraction()},t.prototype.detach=function(){return this._resetState(),this._dragInteraction.detach(),e.prototype.detach.call(this),this},t.prototype.anchor=function(r){return r=pBe.coerceExternalD3(r),this._dragInteraction.attachTo(this),e.prototype.anchor.call(this,r),this},t.prototype._resetState=function(){this.bounds({topLeft:{x:0,y:0},bottomRight:{x:0,y:0}})},t}(dBe.SelectionBoxLayer);Aot.DragBoxLayer=mBe});var Lot=H(Iot=>{"use strict";Object.defineProperty(Iot,"__esModule",{value:!0});var gBe=(de(),Ut(pe)),_Be=Fe(),yBe=kc(),Ov;(function(e){e[e.VALUE=0]="VALUE",e[e.PIXEL=1]="PIXEL"})(Ov||(Ov={}));var vBe=function(e){gBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._mode=Ov.VALUE,r!==t.ORIENTATION_VERTICAL&&r!==t.ORIENTATION_HORIZONTAL)throw new Error(r+" is not a valid orientation for GuideLineLayer");return n._orientation=r,n._overflowHidden=!0,n.addClass("guide-line-layer"),n._isVertical()?n.addClass("vertical"):n.addClass("horizontal"),n._scaleUpdateCallback=function(){n._syncPixelPositionAndValue(),n.render()},n}return t.prototype._setup=function(){e.prototype._setup.call(this),this._guideLine=this.content().append("line").classed("guide-line",!0)},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype._isVertical=function(){return this._orientation===t.ORIENTATION_VERTICAL},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this.scale()!=null&&(this._isVertical()?this.scale().range([0,this.width()]):this.scale().range([this.height(),0])),this},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._syncPixelPositionAndValue(),this._guideLine.attrs({x1:this._isVertical()?this.pixelPosition():0,y1:this._isVertical()?0:this.pixelPosition(),x2:this._isVertical()?this.pixelPosition():this.width(),y2:this._isVertical()?this.height():this.pixelPosition()}),this},t.prototype._syncPixelPositionAndValue=function(){this.scale()!=null&&(this._mode===Ov.VALUE&&this.value()!=null?this._pixelPosition=this.scale().scale(this.value()):this._mode===Ov.PIXEL&&this.pixelPosition()!=null&&(this._value=this.scale().invert(this.pixelPosition())))},t.prototype._setPixelPositionWithoutChangingMode=function(r){this._pixelPosition=r,this.scale()!=null&&(this._value=this.scale().invert(this.pixelPosition())),this.render()},t.prototype.scale=function(r){if(r==null)return this._scale;var n=this._scale;return n!=null&&n.offUpdate(this._scaleUpdateCallback),this._scale=r,this._scale.onUpdate(this._scaleUpdateCallback),this._syncPixelPositionAndValue(),this.redraw(),this},t.prototype.value=function(r){return r==null?this._value:(this._value=r,this._mode=Ov.VALUE,this._syncPixelPositionAndValue(),this.render(),this)},t.prototype.pixelPosition=function(r){if(r==null)return this._pixelPosition;if(!_Be.Math.isValidNumber(r))throw new Error("pixelPosition must be a finite number");return this._pixelPosition=r,this._mode=Ov.PIXEL,this._syncPixelPositionAndValue(),this.render(),this},t.prototype.destroy=function(){e.prototype.destroy.call(this),this.scale()!=null&&this.scale().offUpdate(this._scaleUpdateCallback)},t.ORIENTATION_VERTICAL="vertical",t.ORIENTATION_HORIZONTAL="horizontal",t}(yBe.Component);Iot.GuideLineLayer=vBe});var I$t=H(Rot=>{"use strict";Object.defineProperty(Rot,"__esModule",{value:!0});var xBe=(de(),Ut(pe)),bBe=Lot(),wBe=l4(),kot=Fe(),SBe=function(e){xBe.__extends(t,e);function t(r){var n=e.call(this,r)||this;n._detectionRadius=3,n._enabled=!0,n.addClass("drag-line-layer"),n.addClass("enabled"),n._dragInteraction=new wBe.Drag,n._dragInteraction.attachTo(n);var i=function(c){return n._isVertical()&&n.pixelPosition()-n.detectionRadius()<=c.x&&c.x<=n.pixelPosition()+n.detectionRadius()||!n._isVertical()&&n.pixelPosition()-n.detectionRadius()<=c.y&&c.y<=n.pixelPosition()+n.detectionRadius()},o=!1,a=function(c){i(c)&&(o=!0,n._dragStartCallbacks.callCallbacks(n))};n._dragInteraction.onDragStart(a);var s=function(c,u){o&&(n._setPixelPositionWithoutChangingMode(n._isVertical()?u.x:u.y),n._dragCallbacks.callCallbacks(n))};n._dragInteraction.onDrag(s);var l=function(c,u){o&&(o=!1,n._dragEndCallbacks.callCallbacks(n))};return n._dragInteraction.onDragEnd(l),n._disconnectInteraction=function(){n._dragInteraction.offDragStart(a),n._dragInteraction.offDrag(s),n._dragInteraction.offDragEnd(l),n._dragInteraction.detach()},n._dragStartCallbacks=new kot.CallbackSet,n._dragCallbacks=new kot.CallbackSet,n._dragEndCallbacks=new kot.CallbackSet,n}return t.prototype._setup=function(){e.prototype._setup.call(this),this._detectionEdge=this.content().append("line").styles({opacity:0,stroke:"pink","pointer-events":"visibleStroke"}).classed("drag-edge",!0)},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._detectionEdge.attrs({x1:this._isVertical()?this.pixelPosition():0,y1:this._isVertical()?0:this.pixelPosition(),x2:this._isVertical()?this.pixelPosition():this.width(),y2:this._isVertical()?this.height():this.pixelPosition(),"stroke-width":this._detectionRadius*2}),this},t.prototype.detectionRadius=function(r){if(r==null)return this._detectionRadius;if(r<0)throw new Error("detection radius cannot be negative.");return this._detectionRadius=r,this.render(),this},t.prototype.enabled=function(r){return r==null?this._enabled:(this._enabled=r,r?this.addClass("enabled"):this.removeClass("enabled"),this._dragInteraction.enabled(r),this)},t.prototype.onDragStart=function(r){return this._dragStartCallbacks.add(r),this},t.prototype.offDragStart=function(r){return this._dragStartCallbacks.delete(r),this},t.prototype.onDrag=function(r){return this._dragCallbacks.add(r),this},t.prototype.offDrag=function(r){return this._dragCallbacks.delete(r),this},t.prototype.onDragEnd=function(r){return this._dragEndCallbacks.add(r),this},t.prototype.offDragEnd=function(r){return this._dragEndCallbacks.delete(r),this},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._dragStartCallbacks.forEach(function(n){return r._dragStartCallbacks.delete(n)}),this._dragCallbacks.forEach(function(n){return r._dragCallbacks.delete(n)}),this._dragEndCallbacks.forEach(function(n){return r._dragEndCallbacks.delete(n)}),this._disconnectInteraction()},t}(bBe.GuideLineLayer);Rot.DragLineLayer=SBe});var L$t=H(Not=>{"use strict";Object.defineProperty(Not,"__esModule",{value:!0});var MBe=(de(),Ut(pe)),EBe=kc();function GF(e,t,r){var n={};if(r!==void 0)for(var i=0;i<r.length;i++){var o=r[i-1],a=r[i];n[a]=o}return function(s){var l=e.scale(s);if(!t)return l;var c,u=n[s]===void 0?void 0:e.scale(n[s]);return u!==void 0&&(c=u+(l-u)/2),c}}var TBe=function(e){MBe.__extends(t,e);function t(r,n){var i=e.call(this)||this;return i.addClass("gridlines"),i._xScale=r,i._yScale=n,i._renderCallback=function(o){return i.render()},i._xScale&&i._xScale.onUpdate(i._renderCallback),i._yScale&&i._yScale.onUpdate(i._renderCallback),i}return t.prototype.betweenX=function(r){return r===void 0?this._betweenX:(r!==this._betweenX&&(this._betweenX=r,this.render()),this)},t.prototype.betweenY=function(r){return r===void 0?this._betweenY:(r!==this._betweenY&&(this._betweenY=r,this.render()),this)},t.prototype.destroy=function(){return e.prototype.destroy.call(this),this._xScale&&this._xScale.offUpdate(this._renderCallback),this._yScale&&this._yScale.offUpdate(this._renderCallback),this},t.prototype._setup=function(){e.prototype._setup.call(this),this._xLinesContainer=this.content().append("g").classed("x-gridlines",!0),this._yLinesContainer=this.content().append("g").classed("y-gridlines",!0)},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._redrawXLines(),this._redrawYLines(),this},t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._xScale!=null&&this._xScale.range([0,this.width()]),this._yScale!=null&&this._yScale.range([this.height(),0]),this},t.prototype._redrawXLines=function(){if(this._xScale){var r=this.betweenX(),n=this._xScale.ticks().slice(r?1:0),i=this._xLinesContainer.selectAll("line").data(n),o=i.enter().append("line").merge(i);o.attr("x1",GF(this._xScale,r,this._xScale.ticks())).attr("y1",0).attr("x2",GF(this._xScale,r,this._xScale.ticks())).attr("y2",this.height()).classed("betweenline",r).classed("zeroline",function(a){return a===0}),i.exit().remove()}},t.prototype._redrawYLines=function(){if(this._yScale){var r=this.betweenY(),n=this._yScale.ticks().slice(r?1:0),i=this._yLinesContainer.selectAll("line").data(n),o=i.enter().append("line").merge(i);o.attr("x1",0).attr("y1",GF(this._yScale,r,this._yScale.ticks())).attr("x2",this.width()).attr("y2",GF(this._yScale,r,this._yScale.ticks())).classed("betweenline",r).classed("zeroline",function(a){return a===0}),i.exit().remove()}},t}(EBe.Component);Not.Gridlines=TBe});var WF=H(Dot=>{"use strict";Object.defineProperty(Dot,"__esModule",{value:!0});var CBe=(de(),Ut(pe)),ABe=Yg(),PBe=kc(),IBe=function(e){CBe.__extends(t,e);function t(){var r=e.call(this)||this;return r._detachCallback=function(n){return r.remove(n)},r}return t.prototype.anchor=function(r){var n=this;return r=ABe.coerceExternalD3(r),e.prototype.anchor.call(this,r),this._forEach(function(i){return i.anchor(n.element())}),this},t.prototype.render=function(){return this._forEach(function(r){return r.render()}),this},t.prototype.has=function(r){throw new Error("has() is not implemented on ComponentContainer")},t.prototype._adoptAndAnchor=function(r){r.parent(this),r.onDetach(this._detachCallback),this._isAnchored&&r.anchor(this.element())},t.prototype.remove=function(r){return this.has(r)&&(r.offDetach(this._detachCallback),this._remove(r),r.detach(),this.redraw()),this},t.prototype._remove=function(r){return!1},t.prototype._forEach=function(r){throw new Error("_forEach() is not implemented on ComponentContainer")},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._forEach(function(r){return r.destroy()})},t.prototype.invalidateCache=function(){this._forEach(function(r){return r.invalidateCache()})},t}(PBe.Component);Dot.ComponentContainer=IBe});var zot=H(Oot=>{"use strict";Object.defineProperty(Oot,"__esModule",{value:!0});var LBe=(de(),Ut(pe)),k$t=Fe(),kBe=WF(),RBe=function(e){LBe.__extends(t,e);function t(r){r===void 0&&(r=[]);var n=e.call(this)||this;return n._components=[],n.addClass("component-group"),r.forEach(function(i){return n.append(i)}),n}return t.prototype._forEach=function(r){this.components().forEach(r)},t.prototype.has=function(r){return this._components.indexOf(r)>=0},t.prototype.requestedSpace=function(r,n){var i=this._components.map(function(o){return o.requestedSpace(r,n)});return{minWidth:k$t.Math.max(i,function(o){return o.minWidth},0),minHeight:k$t.Math.max(i,function(o){return o.minHeight},0)}},t.prototype.computeLayout=function(r,n,i){var o=this;return e.prototype.computeLayout.call(this,r,n,i),this._forEach(function(a){a.computeLayout({x:0,y:0},o.width(),o.height())}),this},t.prototype._sizeFromOffer=function(r,n){return{width:r,height:n}},t.prototype.fixedWidth=function(){return this._components.every(function(r){return r.fixedWidth()})},t.prototype.fixedHeight=function(){return this._components.every(function(r){return r.fixedHeight()})},t.prototype.components=function(){return this._components.slice()},t.prototype.append=function(r){return r!=null&&!this.has(r)&&(r.detach(),this._components.push(r),this._adoptAndAnchor(r),this.redraw()),this},t.prototype._remove=function(r){var n=this._components.indexOf(r);return n>=0?(this._components.splice(n,1),!0):!1},t}(kBe.ComponentContainer);Oot.Group=RBe});var R$t=H(Fot=>{"use strict";Object.defineProperty(Fot,"__esModule",{value:!0});var NBe=(de(),Ut(pe)),YF=_l(),DBe=$A(),OBe=Bu(),zBe=Fe(),FBe=kc(),BBe=function(e){NBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._textPadding=5,r==null)throw new Error("InterpolatedColorLegend requires a interpolatedColorScale");return n._scale=r,n._redrawCallback=function(i){return n.redraw()},n._scale.onUpdate(n._redrawCallback),n._formatter=OBe.general(),n._orientation="horizontal",n._expands=!1,n.addClass("legend"),n.addClass("interpolated-color-legend"),n}return t.prototype.destroy=function(){e.prototype.destroy.call(this),this._scale.offUpdate(this._redrawCallback)},t.prototype.formatter=function(r){return r===void 0?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.expands=function(r){return r==null?this._expands:(this._expands=r,this.redraw(),this)},t._ensureOrientation=function(r){if(r=r.toLowerCase(),r==="horizontal"||r==="left"||r==="right")return r;throw new Error('"'+r+'" is not a valid orientation for InterpolatedColorLegend')},t.prototype.orientation=function(r){return r==null?this._orientation:(this._orientation=t._ensureOrientation(r),this.redraw(),this)},t.prototype.fixedWidth=function(){return!this.expands()||this._isVertical()},t.prototype.fixedHeight=function(){return!this.expands()||!this._isVertical()},t.prototype._generateTicks=function(r){r===void 0&&(r=t._DEFAULT_NUM_SWATCHES);var n=this._scale.domain();if(r===1)return[n[0]];for(var i=(n[1]-n[0])/(r-1),o=[],a=0;a<r;a++)o.push(n[0]+i*a);return o},t.prototype._setup=function(){e.prototype._setup.call(this),this._swatchContainer=this.content().append("g").classed("swatch-container",!0),this._swatchBoundingBox=this.content().append("rect").classed("swatch-bounding-box",!0),this._lowerLabel=this.content().append("g").classed(t.LEGEND_LABEL_CLASS,!0),this._upperLabel=this.content().append("g").classed(t.LEGEND_LABEL_CLASS,!0);var r=new YF.SvgContext(this.content().node());this._measurer=new YF.Measurer(r),this._wrapper=new YF.Wrapper,this._writer=new YF.Writer(this._measurer,r,this._wrapper)},t.prototype.requestedSpace=function(r,n){var i=this,o=this._measurer.measure().height,a=o,s=this._scale.domain(),l=s.map(function(p){return i._measurer.measure(i._formatter(p)).width}),c,u,h=t._DEFAULT_NUM_SWATCHES;if(this._isVertical()){var f=zBe.Math.max(l,0);u=a+o+this._textPadding+f+this._textPadding,c=h*o}else c=a+o+a,u=this._textPadding+l[0]+h*o+l[1]+this._textPadding;return{minWidth:u,minHeight:c}},t.prototype._isVertical=function(){return this._orientation!=="horizontal"},t.prototype.renderImmediately=function(){var r=this;e.prototype.renderImmediately.call(this);var n=this._scale.domain(),i=this._formatter(n[0]),o=this._measurer.measure(i).width,a=this._formatter(n[1]),s=this._measurer.measure(a).width,l=this._measurer.measure().height,c=this._textPadding,u={x:0,y:0},h={x:0,y:0},f={xAlign:"center",yAlign:"center",textRotation:0},p={xAlign:"center",yAlign:"center",textRotation:0},d,g,_,y,x={x:0,y:0,width:0,height:0},b,S;if(this._isVertical()){S=Math.floor(this.height());var C=Math.max(o,s);b=(this.width()-C-2*this._textPadding)/2,d=Math.max(this.width()-b-2*c-C,0),g=1,y=function(L,R){return r.height()-(R+1)},p.yAlign="top",u.y=0,f.yAlign="bottom",h.y=0,this._orientation==="left"?(_=function(L,R){return c+C+c},p.xAlign="right",u.x=-(b+d+c),f.xAlign="right",h.x=-(b+d+c)):(_=function(L,R){return b},p.xAlign="left",u.x=b+d+c,f.xAlign="left",h.x=b+d+c),x.width=d,x.height=S*g}else b=Math.max(c,(this.height()-l)/2),S=Math.max(Math.floor(this.width()-c*4-o-s),0),d=1,g=Math.max(this.height()-2*b,0),_=function(L,R){return Math.floor(o+2*c)+R},y=function(L,R){return b},p.xAlign="right",u.x=-c,f.xAlign="left",h.x=c,x.y=b,x.width=S*d,x.height=g;x.x=_(null,0),this._upperLabel.text(""),this._writer.write(a,this.width(),this.height(),p,this._upperLabel.node());var P="translate("+u.x+", "+u.y+")";this._upperLabel.attr("transform",P),this._lowerLabel.text(""),this._writer.write(i,this.width(),this.height(),f,this._lowerLabel.node());var k="translate("+h.x+", "+h.y+")";this._lowerLabel.attr("transform",k),this._swatchBoundingBox.attrs(x);var O=this._generateTicks(S),D=this._swatchContainer.selectAll("rect.swatch").data(O),B=D.enter().append("rect").classed("swatch",!0),I=D.merge(B);return D.exit().remove(),I.attrs({fill:function(L,R){return r._scale.scale(L)},width:d,height:g,x:_,y,"shape-rendering":"crispEdges"}),DBe.ADD_TITLE_ELEMENTS&&B.append("title").text(function(L){return r._formatter(L)}),this},t._DEFAULT_NUM_SWATCHES=11,t.LEGEND_LABEL_CLASS="legend-label",t}(FBe.Component);Fot.InterpolatedColorLegend=BBe});var Vot=H(h4=>{"use strict";Object.defineProperty(h4,"__esModule",{value:!0});var Bot=(de(),Ut(pe)),jF=_l(),HBe=kc(),Hot=function(e){Bot.__extends(t,e);function t(r,n){r===void 0&&(r=""),n===void 0&&(n=0);var i=e.call(this)||this;return i.addClass("label"),i.text(r),i.angle(n),i.xAlignment("center").yAlignment("center"),i._padding=0,i}return t.prototype.requestedSpace=function(r,n){var i=this._measurer.measure(this._text),o=(this.angle()===0?i.width:i.height)+2*this.padding(),a=(this.angle()===0?i.height:i.width)+2*this.padding();return{minWidth:o,minHeight:a}},t.prototype._setup=function(){e.prototype._setup.call(this),this._textContainer=this.content().append("g");var r=new jF.SvgContext(this._textContainer.node());this._measurer=new jF.CacheMeasurer(r),this._wrapper=new jF.Wrapper,this._writer=new jF.Writer(this._measurer,r,this._wrapper),this.text(this._text)},t.prototype.text=function(r){if(r==null)return this._text;if(typeof r!="string")throw new Error("Label.text() only takes strings as input");return this._text=r,this.redraw(),this},t.prototype.angle=function(r){if(r==null)return this._angle;if(r%=360,r>180?r-=360:r<-180&&(r+=360),r===-90||r===0||r===90)this._angle=r;else throw new Error(r+" is not a valid angle for Label");return this.redraw(),this},t.prototype.padding=function(r){if(r==null)return this._padding;if(r=+r,r<0)throw new Error(r+" is not a valid padding value. Cannot be less than 0.");return this._padding=r,this.redraw(),this},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.renderImmediately=function(){e.prototype.renderImmediately.call(this),this._textContainer.selectAll("g").remove();var r=this._measurer.measure(this._text),n=Math.max(Math.min((this.height()-r.height)/2,this.padding()),0),i=Math.max(Math.min((this.width()-r.width)/2,this.padding()),0);this._textContainer.attr("transform","translate("+i+","+n+")");var o=this.width()-2*i,a=this.height()-2*n,s={xAlign:this.xAlignment(),yAlign:this.yAlignment(),textRotation:this.angle()};return this._writer.write(this._text,o,a,s),this},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t}(HBe.Component);h4.Label=Hot;var VBe=function(e){Bot.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.addClass(t.TITLE_LABEL_CLASS),i}return t.TITLE_LABEL_CLASS="title-label",t}(Hot);h4.TitleLabel=VBe;var UBe=function(e){Bot.__extends(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.addClass(t.AXIS_LABEL_CLASS),i}return t.AXIS_LABEL_CLASS="axis-label",t}(Hot);h4.AxisLabel=UBe});var XF=H(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});var Rs=(Er(),Ut(Mr));function qBe(){return function(e){return Rs.symbol().type(Rs.symbolCircle).size(Math.PI*Math.pow(e/2,2))}}bd.circle=qBe;function GBe(){return function(e){return Rs.symbol().type(Rs.symbolSquare).size(Math.pow(e,2))}}bd.square=GBe;function WBe(){return function(e){return Rs.symbol().type(Rs.symbolCross).size(5/9*Math.pow(e,2))}}bd.cross=WBe;function YBe(){return function(e){return Rs.symbol().type(Rs.symbolDiamond).size(Math.tan(Math.PI/6)*Math.pow(e,2)/2)}}bd.diamond=YBe;function jBe(){return function(e){return Rs.symbol().type(Rs.symbolTriangle).size(Math.sqrt(3)*Math.pow(e/2,2))}}bd.triangle=jBe;var XBe=.8908130915292852;function $Be(){return function(e){return Rs.symbol().type(Rs.symbolStar).size(XBe*Math.pow(e/2,2))}}bd.star=$Be;var KBe=(1/Math.sqrt(12)/2+1)*3;function ZBe(){return function(e){return Rs.symbol().type(Rs.symbolWye).size(KBe*Math.pow(e/2.4,2))}}bd.wye=ZBe});var N$t=H(qot=>{"use strict";Object.defineProperty(qot,"__esModule",{value:!0});var JBe=(de(),Ut(pe)),zv=(Er(),Ut(Mr)),$F=_l(),QBe=$A(),tHe=Bu(),eHe=XF(),Jg=Fe(),rHe=kc(),Uot=function(){function e(t,r,n){t===void 0&&(t=[]),r===void 0&&(r=0),n===void 0&&(n=1/0),this.columns=t,this.bottomPadding=r,this.maxWidth=n}return e.prototype.addColumn=function(t){var r=t.width,n=this.getWidthAvailable();t.width=Math.min(n,r),this.columns.push(t)},e.prototype.getBounds=function(t){for(var r=this.columns[t],n=0,i=0;i<t;i++)n+=this.columns[i].width;return{topLeft:{x:n,y:0},bottomRight:{x:n+r.width,y:r.height}}},e.prototype.getHeight=function(){return Jg.Math.max(this.columns.map(function(t){var r=t.height;return r}),0)+this.bottomPadding},e.prototype.getWidth=function(){return Math.min(this.columns.reduce(function(t,r){var n=r.width;return t+n},0),this.maxWidth)},e.prototype.getWidthAvailable=function(){var t=this.getWidth();return Math.max(this.maxWidth-t,0)},e}(),nHe=function(){function e(t,r,n,i){t===void 0&&(t=1/0),r===void 0&&(r=1/0),n===void 0&&(n=0),i===void 0&&(i=[]),this.maxWidth=t,this.maxHeight=r,this.padding=n,this.rows=i}return e.prototype.addRow=function(t){t.maxWidth=this.maxWidth-this.padding*2,this.rows.push(t)},e.prototype.getColumnBounds=function(t,r){var n=this.getRowBounds(t),i=this.rows[t].getBounds(r);return i.topLeft.x+=n.topLeft.x,i.bottomRight.x+=n.topLeft.x,i.topLeft.y+=n.topLeft.y,i.bottomRight.y+=n.topLeft.y,i},e.prototype.getRowBounds=function(t){for(var r=this.padding,n=this.padding,i=0;i<t;i++)n+=this.rows[i].getHeight();var o={topLeft:{x:r,y:n},bottomRight:{x:r+this.rows[t].getWidth(),y:n+this.rows[t].getHeight()}};return o},e.prototype.getHeight=function(){return Math.min(this.rows.reduce(function(t,r){return t+r.getHeight()},0)+this.padding*2,this.maxHeight)},e.prototype.getWidth=function(){return Math.min(Jg.Math.max(this.rows.map(function(t){return t.getWidth()}),0)+this.padding*2,this.maxWidth)},e}(),iHe=function(e){JBe.__extends(t,e);function t(r){var n=e.call(this)||this;if(n._padding=5,n._rowBottomPadding=3,n.addClass("legend"),n.maxEntriesPerRow(1),r==null)throw new Error("Legend requires a colorScale");return n._colorScale=r,n._redrawCallback=function(i){return n.redraw()},n._colorScale.onUpdate(n._redrawCallback),n._formatter=tHe.identity(),n.maxLinesPerEntry(1),n.xAlignment("right").yAlignment("top"),n.comparator(function(i,o){var a=n._colorScale.domain().slice().map(function(s){return n._formatter(s)});return a.indexOf(i)-a.indexOf(o)}),n._symbolFactoryAccessor=function(){return eHe.circle()},n._symbolOpacityAccessor=function(){return 1},n}return t.prototype._setup=function(){e.prototype._setup.call(this);var r=this.content().append("g").classed(t.LEGEND_ROW_CLASS,!0),n=r.append("g").classed(t.LEGEND_ENTRY_CLASS,!0);n.append("text");var i=new $F.SvgContext(r.node(),null,QBe.ADD_TITLE_ELEMENTS);this._measurer=new $F.CacheMeasurer(i),this._wrapper=new $F.Wrapper().maxLines(this.maxLinesPerEntry()),this._writer=new $F.Writer(this._measurer,i,this._wrapper)},t.prototype.formatter=function(r){return r==null?this._formatter:(this._formatter=r,this.redraw(),this)},t.prototype.maxEntriesPerRow=function(r){return r==null?this._maxEntriesPerRow:(this._maxEntriesPerRow=r,this.redraw(),this)},t.prototype.maxLinesPerEntry=function(r){return r==null?this._maxLinesPerEntry:(this._maxLinesPerEntry=r,this.redraw(),this)},t.prototype.maxWidth=function(r){return r==null?this._maxWidth:(this._maxWidth=r,this.redraw(),this)},t.prototype.comparator=function(r){return r==null?this._comparator:(this._comparator=r,this.redraw(),this)},t.prototype.colorScale=function(r){return r!=null?(this._colorScale.offUpdate(this._redrawCallback),this._colorScale=r,this._colorScale.onUpdate(this._redrawCallback),this.redraw(),this):this._colorScale},t.prototype.destroy=function(){e.prototype.destroy.call(this),this._colorScale.offUpdate(this._redrawCallback)},t.prototype._buildLegendTable=function(r,n){var i=this,o=this._measurer.measure().height,a=new nHe(r,n,this._padding),s=this._colorScale.domain().slice().sort(function(c,u){return i._comparator(i._formatter(c),i._formatter(u))}),l=new Uot;return a.addRow(l),l.bottomPadding=this._rowBottomPadding,s.forEach(function(c,u){l.columns.length/2===i.maxEntriesPerRow()&&(l=new Uot,l.bottomPadding=i._rowBottomPadding,a.addRow(l));var h=l.getWidthAvailable(),f=i._formatter(c),p=i._measurer.measure(f).width,d=h-o-p<0;d&&l.columns.length>1&&(l=new Uot,l.bottomPadding=i._rowBottomPadding,a.addRow(l));var g={width:o,height:o,data:{name:c,type:"symbol"}};l.addColumn(g),h=l.getWidthAvailable();var _=Math.min(h,p);i._wrapper.maxLines(i.maxLinesPerEntry());var y=i._wrapper.wrap(f,i._measurer,_).noLines,x=y*o,b={width:_,height:x,data:{name:c,type:"text"}};l.addColumn(b)}),a},t.prototype.requestedSpace=function(r,n){var i=this._buildLegendTable(Jg.Math.min([this.maxWidth(),r],r),n);return{minHeight:i.getHeight(),minWidth:i.getWidth()}},t.prototype.entitiesAt=function(r){var n=this;if(!this._isSetup)return[];var i=this._buildLegendTable(this.width(),this.height());return i.rows.reduce(function(o,a,s){if(o.length!==0)return o;var l=i.getRowBounds(s),c=Jg.Math.within(r,l);return c?a.columns.reduce(function(u,h,f){var p=i.getColumnBounds(s,f),d=Jg.Math.within(r,p);if(d){var g=n.content().selectAll("."+t.LEGEND_ROW_CLASS).nodes()[s],_=zv.select(g).selectAll("."+t.LEGEND_ENTRY_CLASS).nodes()[Math.floor(f/2)],y=zv.select(_).select("."+t.LEGEND_SYMBOL_CLASS),x=Jg.DOM.getTranslateValues(zv.select(g)),b=Jg.DOM.getTranslateValues(y);return[{bounds:Jg.DOM.elementBBox(zv.select(g)),datum:h.data.name,position:{x:x[0]+b[0],y:x[1]+b[1]},selection:zv.select(_),component:n}]}return u},o):o},[])},t.prototype.renderImmediately=function(){e.prototype.renderImmediately.call(this);var r=this._buildLegendTable(this.width(),this.height());this.content().selectAll("*").remove();var n=this.content().selectAll("g."+t.LEGEND_ROW_CLASS).data(r.rows),i=n.enter().append("g").classed(t.LEGEND_ROW_CLASS,!0).merge(n);n.exit().remove(),i.attr("transform",function(a,s){var l=r.getRowBounds(s);return"translate("+l.topLeft.x+", "+l.topLeft.y+")"});var o=this;return i.each(function(a,s){for(var l=[],c=0;c<a.columns.length;c+=2)l.push([a.columns[c],a.columns[c+1]]);var u=zv.select(this).selectAll("g."+t.LEGEND_ENTRY_CLASS).data(l),h=u.enter().append("g").classed(t.LEGEND_ENTRY_CLASS,!0).merge(u);h.append("path").attr("d",function(f,p){var d=f[0];return o.symbol()(d.data.name,s)(d.height*.6)(null)}).attr("transform",function(f,p){var d=f[0],g=r.rows[s].columns.indexOf(d),_=r.getColumnBounds(s,g);return"translate("+(_.topLeft.x+d.width/2)+", "+d.height/2+")"}).attr("fill",function(f){return o._colorScale.scale(f[0].data.name)}).attr("opacity",function(f,p){return o.symbolOpacity()(f[0].data.name,s)}).classed(t.LEGEND_SYMBOL_CLASS,!0),h.append("g").classed("text-container",!0).attr("transform",function(f,p){var d=f[1],g=r.rows[s].columns.indexOf(d),_=r.getColumnBounds(s,g);return"translate("+_.topLeft.x+", 0)"}).each(function(f,p,d){var g=zv.select(this),_=f[1],y={xAlign:"left",yAlign:"top",textRotation:0};o._writer.write(o._formatter(_.data.name),_.width,o.height(),y,g.node())}),u.exit().remove()}),this},t.prototype.symbol=function(r){return r==null?this._symbolFactoryAccessor:(this._symbolFactoryAccessor=r,this.render(),this)},t.prototype.symbolOpacity=function(r){return r==null?this._symbolOpacityAccessor:(typeof r=="number"?this._symbolOpacityAccessor=function(){return r}:this._symbolOpacityAccessor=r,this.render(),this)},t.prototype.fixedWidth=function(){return!0},t.prototype.fixedHeight=function(){return!0},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t.LEGEND_ROW_CLASS="legend-row",t.LEGEND_ENTRY_CLASS="legend-entry",t.LEGEND_SYMBOL_CLASS="legend-symbol",t}(rHe.Component);qot.Legend=iHe});var Got=H(KF=>{"use strict";Object.defineProperty(KF,"__esModule",{value:!0});var oHe;(function(e){e.MAIN="main",e.RESET="reset"})(oHe=KF.Animator||(KF.Animator={}))});var O$t=H((eGn,D$t)=>{"use strict";D$t.exports=function(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}});var B$t=H((rGn,F$t)=>{"use strict";var aHe=O$t();function z$t(e){return aHe(e)===!0&&Object.prototype.toString.call(e)==="[object Object]"}F$t.exports=function(t){var r,n;return!(z$t(t)===!1||(r=t.constructor,typeof r!="function")||(n=r.prototype,z$t(n)===!1)||n.hasOwnProperty("isPrototypeOf")===!1)}});var Yot=H(Wot=>{"use strict";Object.defineProperty(Wot,"__esModule",{value:!0});var sHe=Fe(),H$t=0,lHe=function(){function e(t,r){t===void 0&&(t=[]),r===void 0&&(r={}),this._updateId=H$t++,this._data=t,this._metadata=r,this._callbacks=new sHe.CallbackSet}return e.prototype.onUpdate=function(t){return this._callbacks.add(t),this},e.prototype.offUpdate=function(t){return this._callbacks.delete(t),this},e.prototype.data=function(t){return t==null?this._data:(this._data=t,this._dispatchUpdate(),this)},e.prototype.metadata=function(t){return t==null?this._metadata:(this._metadata=t,this._dispatchUpdate(),this)},e.prototype.updateId=function(){return this._updateId},e.prototype._dispatchUpdate=function(){this._updateId=H$t++,this._callbacks.callCallbacks(this)},e}();Wot.Dataset=lHe});var $ot=H(Rc=>{"use strict";Object.defineProperty(Rc,"__esModule",{value:!0});var jot=(de(),Ut(pe)),cHe=B$t(),uHe=Yot(),hHe=Lv();function Xot(e){return e instanceof p4?e:e instanceof Date?f4(e.valueOf()):e instanceof hHe.Scale?V$t(e):e instanceof uHe.Dataset?U$t(e):cHe(e)?ZF(e):Array.isArray(e)?q$t(e):f4(e)}Rc.sign=Xot;function V$t(e){var t={domain:e.domain(),range:e.range(),updateId:e.updateId(),ref:f4(e)};return ZF(t)}Rc.signScale=V$t;function U$t(e){var t={ref:f4(e),updateId:e.updateId()};return ZF(t)}Rc.signDataset=U$t;function f4(e){return new W$t(e)}Rc.signRef=f4;function q$t(e){return new G$t(e.map(function(t){return Xot(t)}))}Rc.signArray=q$t;function ZF(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[r]=Xot(e[r]));return new Y$t(t)}Rc.signObj=ZF;var p4=function(){function e(){}return e.prototype.isDifferent=function(t){return t instanceof this.constructor?this.isSignatureDifferent(t):!0},e}();Rc.Signature=p4;var G$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.array=r,n}return t.prototype.isSignatureDifferent=function(r){if(r.array.length!==this.array.length)return!0;for(var n=0;n<this.array.length;n++)if(this.array[n].isDifferent(r.array[n]))return!0;return!1},t}(p4);Rc.ArraySignature=G$t;var W$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.ref=r,n}return t.prototype.isSignatureDifferent=function(r){return this.ref!==r.ref},t}(p4);Rc.ReferenceSignature=W$t;var Y$t=function(e){jot.__extends(t,e);function t(r){var n=e.call(this)||this;return n.obj=r,n}return t.prototype.isSignatureDifferent=function(r){var n=Object.keys(this.obj),i=Object.keys(r.obj);if(n.length!==i.length)return!0;for(var o=0,a=n;o<a.length;o++){var s=a[o];if(!r.obj.hasOwnProperty(s)||this.obj[s].isDifferent(r.obj[s]))return!0}return!1},t}(p4);Rc.ObjectSignature=Y$t});var j$t=H(Kot=>{"use strict";Object.defineProperty(Kot,"__esModule",{value:!0});var fHe=$ot();function pHe(e){var t=void 0,r,n=!1,i=!1,o=function(){for(var a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];if(n)return r;var l=fHe.signArray(a);return t===void 0||t.isDifferent(l)?(i&&console.warn("cache miss! computing"),t=l,r=e.apply(this,a)):i&&console.warn("cache hit!"),r};return o.doLocked=function(a){if(n)throw new Error("Locking an already locked memoize function!");n=!0;var s=a.apply(this);return n=!1,s},o.logPerformance=function(a){return a===void 0&&(a=!0),i=a,this},o}Kot.memoize=pHe});var K$t=H(JF=>{"use strict";Object.defineProperty(JF,"__esModule",{value:!0});var dHe=Oe(),Zot=function(){function e(){this.map=Object.create(null),this.exists=Object.create(null)}return e.prototype.delete=function(t){return delete this.map[t],delete this.exists[t],!0},e.prototype.get=function(t){return this.map[t]},e.prototype.has=function(t){return!!this.exists[t]},e.prototype.set=function(t,r){return this.map[t]=r,this.exists[t]=!0,this},e}(),X$t=function(){function e(){this.map=new Zot}return e.prototype.get=function(t){return this.map.get(t[0]).get(t[1])},e.prototype.has=function(t){return this.map.has(t[0])&&this.map.get(t[0]).has(t[1])},e.prototype.set=function(t,r){return this.map.has(t[0])||this.map.set(t[0],new Zot),this.map.get(t[0]).set(t[1],r),this},e.prototype.delete=function(t){return this.map.has(t[0])&&this.map.get(t[0]).delete(t[1]),!0},e.prototype.clear=function(){this.map=new Zot},e.resolver=function(t,r,n){return[n.updateId(),r]},e}();function $$t(e){var t=dHe.memoize(e,X$t.resolver);return t.cache=new X$t,t}JF.memoizeProjector=$$t;function mHe(e){return Object.keys(e).forEach(function(t){e[t]=$$t(e[t])}),e}JF.memoizeProjectors=mHe});var Z$t=H(Jot=>{"use strict";Object.defineProperty(Jot,"__esModule",{value:!0});var gHe=CS();function _He(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.slice(0,-1),n=e[e.length-1],i=gHe.memoize(n),o=function(){var a=this,s=r.map(function(l){return l.apply(a)});return i.apply(void 0,s)};return o}Jot.memThunk=_He});var CS=H(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});var Qot=(de(),Ut(pe));Qot.__exportStar(j$t(),AS);Qot.__exportStar(K$t(),AS);Qot.__exportStar(Z$t(),AS);var yHe=$ot();AS.sign=yHe.sign});var Fv=H(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});var J$t=(Er(),Ut(Mr)),vHe=function(){function e(t,r){this._context=t,this._drawStep=r}return e.prototype.getDrawStep=function(){return this._drawStep},e.prototype.draw=function(t,r){var n=r[r.length-1].attrToAppliedProjector;this._context.save(),this._drawStep(this._context,t,n),this._context.restore()},e.prototype.getVisualPrimitives=function(){return[]},e.prototype.getVisualPrimitiveAtIndex=function(t){return null},e.prototype.remove=function(){},e}();Nc.CanvasDrawer=vHe;Nc.ContextStyleAttrs=["fill-opacity","fill","opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function xHe(e,t,r,n){var i=Nc.ContextStyleAttrs.concat(t);return Q$t(e,i,r,n)}Nc.resolveAttributesSubsetWithStyles=xHe;function Q$t(e,t,r,n){for(var i={},o=0,a=t;o<a.length;o++){var s=a[o];e.hasOwnProperty(s)&&(i[s]=e[s](r,n))}return i}Nc.resolveAttributes=Q$t;function bHe(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["stroke-opacity"]!=null?parseFloat(e["stroke-opacity"]):1;return r*t}function wHe(e){var t=e.opacity!=null?parseFloat(e.opacity):1,r=e["fill-opacity"]!=null?parseFloat(e["fill-opacity"]):1;return r*t}function tKt(e){return e["stroke-width"]!=null?parseFloat(e["stroke-width"]):1}Nc.getStrokeWidth=tKt;function eKt(e){var t=e["stroke-dasharray"];if(t!=null)try{return t.split(/[ ,]+/).map(function(r){return parseInt(r,10)})}catch(r){return console.error("getStrokeDashArray failed with: "+r),[]}return[]}Nc.getStrokeDashArray=eKt;function SHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",tat(e,n),e.restore()}Nc.renderArea=SHe;function MHe(e,t,r,n){e.save(),e.beginPath(),t.context(e),t(r),e.lineJoin="round",tat(e,n),e.restore()}Nc.renderLine=MHe;function tat(e,t){if(t.stroke){e.lineWidth=tKt(t);var r=J$t.color(t.stroke),n=eKt(t);e.setLineDash(n),r.opacity*=bHe(t),e.strokeStyle=r.toString(),e.stroke()}if(t.fill){var i=J$t.color(t.fill);i.opacity*=wHe(t),e.fillStyle=i.toString(),e.fill()}}Nc.renderPathWithStyle=tat});var Uu=H(eat=>{"use strict";Object.defineProperty(eat,"__esModule",{value:!0});var EHe=function(){function e(t,r){this._svgDrawerFactory=t,this._canvasDrawerFactory=r}return e.prototype.useSVG=function(t){this._currentDrawer!=null&&this._currentDrawer.remove();var r=this._svgDrawerFactory();r.attachTo(t),this._currentDrawer=r},e.prototype.useCanvas=function(t){this._currentDrawer!=null&&this._currentDrawer.remove(),this._currentDrawer=this._canvasDrawerFactory(t.node().getContext("2d"))},e.prototype.getDrawer=function(){return this._currentDrawer},e.prototype.remove=function(){this._currentDrawer!=null&&this._currentDrawer.remove()},e.prototype.draw=function(t,r){this._currentDrawer.draw(t,r)},e.prototype.getVisualPrimitives=function(){return this._currentDrawer.getVisualPrimitives()},e.prototype.getVisualPrimitiveAtIndex=function(t){return this._currentDrawer.getVisualPrimitiveAtIndex(t)},e}();eat.ProxyDrawer=EHe});var Df=H(rat=>{"use strict";Object.defineProperty(rat,"__esModule",{value:!0});var THe=(Er(),Ut(Mr)),rKt=Fe(),CHe=function(){function e(t,r){this._root=THe.select(document.createElementNS("http://www.w3.org/2000/svg","g")),this._className=r,this._svgElementName=t}return e.prototype.draw=function(t,r){var n=this;this._createAndDestroyDOMElements(t);for(var i=0,o=r.length,a=function(l){var c=r[l];rKt.Window.setTimeout(function(){return n._drawStep(c)},i),i+=c.animator.totalTime(t.length)},s=0;s<o;s++)a(s)},e.prototype.getVisualPrimitives=function(){return this._cachedVisualPrimitivesNodes==null&&(this._cachedVisualPrimitivesNodes=this._selection.nodes()),this._cachedVisualPrimitivesNodes},e.prototype.getVisualPrimitiveAtIndex=function(t){return this._cachedVisualPrimitivesNodeMap==null?null:this._cachedVisualPrimitivesNodeMap.get(t)},e.prototype.remove=function(){this._root.remove()},e.prototype.attachTo=function(t){t.node().appendChild(this._root.node())},e.prototype.getRoot=function(){return this._root},e.prototype.selector=function(){return this._svgElementName},e.prototype._applyDefaultAttributes=function(t){},e.prototype._createAndDestroyDOMElements=function(t){var r=t.map(function(a,s){return a!=null?{d:a,i:s}:null}),n=r.filter(function(a){return a!=null}),i=this._root.selectAll(this.selector()).data(n);this._selection=i.enter().append(this._svgElementName).merge(i),i.exit().remove();var o=new rKt.Map;this._selection.each(function(a){o.set(a.i,this)}),this._cachedVisualPrimitivesNodeMap=o,this._cachedVisualPrimitivesNodes=null,this._selection.data(this._selection.data().map(function(a){var s=a.d;return s})),this._className!=null&&this._selection.classed(this._className,!0),this._applyDefaultAttributes(this._selection)},e.prototype._drawStep=function(t){var r=this,n=["fill","stroke"];n.forEach(function(i){t.attrToAppliedProjector[i]!=null&&r._selection.attr(i,t.attrToAppliedProjector[i])}),t.animator.animate(this._selection,t.attrToAppliedProjector),this._className!=null&&this._selection.classed(this._className,!0)},e}();rat.SVGDrawer=CHe});var iat=H(nat=>{"use strict";Object.defineProperty(nat,"__esModule",{value:!0});var nKt=function(){function e(){var t=this;this.scale=0,this.translate=0,this.cachedDomain=[null,null],this.lastSeenDomain=[null,null],this.updateDomain=function(r){t.lastSeenDomain=r.getTransformationDomain();var n=r.scaleTransformation(t.cachedDomain[1])-r.scaleTransformation(t.cachedDomain[0]),i=r.scaleTransformation(t.lastSeenDomain[1])-r.scaleTransformation(t.lastSeenDomain[0]);t.scale=n/i||1,t.translate=r.scaleTransformation(t.cachedDomain[0])-r.scaleTransformation(t.lastSeenDomain[0])*t.scale||0}}return e.prototype.reset=function(){this.scale=1,this.translate=0,this.cachedDomain=this.lastSeenDomain},e.prototype.setDomain=function(t){this.cachedDomain=t.getTransformationDomain()},e}(),AHe=function(){function e(t,r){var n=this;this.renderCallback=t,this.applyTransformCallback=r,this.domainTransformX=new nKt,this.domainTransformY=new nKt,this.renderDeferred=function(){n.applyTransform(),clearTimeout(n.timeoutToken),n.timeoutToken=setTimeout(function(){n.renderCallback()},e.DEFERRED_RENDERING_DELAY)}}return e.prototype.setDomains=function(t,r){t&&this.domainTransformX.setDomain(t),r&&this.domainTransformY.setDomain(r),this.renderDeferred()},e.prototype.updateDomains=function(t,r){t&&this.domainTransformX.updateDomain(t),r&&this.domainTransformY.updateDomain(r),this.renderDeferred()},e.prototype.resetTransforms=function(){this.domainTransformX.reset(),this.domainTransformY.reset(),this.applyTransform()},e.prototype.applyTransform=function(){this.applyTransformCallback(this.domainTransformX.translate,this.domainTransformY.translate,this.domainTransformX.scale,this.domainTransformY.scale)},e.DEFERRED_RENDERING_DELAY=200,e}();nat.DeferredRenderer=AHe});var rs=H(QF=>{"use strict";Object.defineProperty(QF,"__esModule",{value:!0});var PHe=(de(),Ut(pe)),wd=(Er(),Ut(Mr)),d4=Lf(),Sd=Fe(),iKt=Got(),oat=CS(),IHe=kc(),LHe=Fv(),kHe=Uu(),RHe=Df(),NHe=Yg(),DHe=If(),OHe=iat();QF.Renderer=DHe.makeEnum(["svg","canvas"]);var zHe=function(e){PHe.__extends(t,e);function t(){var r=e.call(this)||this;r._dataChanged=!1,r._attrExtents={},r._animate=!1,r._animators={},r._propertyExtents={},r._resetEntityStore=function(){r._cachedEntityStore=void 0},r._overflowHidden=!0,r.addClass("plot"),r._datasetToDrawer=new Sd.Map,r._attrBindings=wd.map(),r._includedValuesProvider=function(i,o){return r._includedValuesForScale(i,o)},r._renderCallback=function(){return r.render()},r._onDatasetUpdateCallback=function(){return r._onDatasetUpdate()},r._propertyBindings=wd.map();var n=new d4.Easing().maxTotalDuration(t._ANIMATION_MAX_DURATION);return r.animator(iKt.Animator.MAIN,n),r.animator(iKt.Animator.RESET,new d4.Null),r._deferredResetEntityStore=Sd.Window.debounce(OHe.DeferredRenderer.DEFERRED_RENDERING_DELAY,r._resetEntityStore),r}return t.getTotalDrawTime=function(r,n){return n.reduce(function(i,o){return i+o.animator.totalTime(r.length)},0)},t.applyDrawSteps=function(r,n){var i=r.map(function(o){var a=o.attrToProjector,s={};return Object.keys(a).forEach(function(l){s[l]=function(c,u){return a[l](c,u,n)}}),{attrToAppliedProjector:s,animator:o.animator}});return i},t.prototype.anchor=function(r){return r=NHe.coerceExternalD3(r),e.prototype.anchor.call(this,r),this._dataChanged=!0,this._resetEntityStore(),this._updateExtents(),this},t.prototype._setup=function(){var r=this;this._isSetup||(e.prototype._setup.call(this),this._canvas!=null&&this._appendCanvasNode(),this._renderArea=this.content().append("g").classed("render-area",!0),this.datasets().forEach(function(n){return r._createNodesForDataset(n)}))},t.prototype._appendCanvasNode=function(){var r=this.element().select(".plot-canvas-container");r.empty()&&(r=this.element().append("div").classed("plot-canvas-container",!0),r.node().appendChild(this._canvas.node()))},t.prototype.setBounds=function(r,n,i,o){if(e.prototype.setBounds.call(this,r,n,i,o),this._updateExtents(),this._canvas!=null){if(this._bufferCanvas&&!this._bufferCanvasValid){this._bufferCanvas.attr("width",this._canvas.attr("width")),this._bufferCanvas.attr("height",this._canvas.attr("height"));var a=this._bufferCanvas.node().getContext("2d");if(a){var s=this._canvas.node();s.width>0&&s.height>0?a.canvas.width>0&&a.canvas.height>0&&a.drawImage(s,0,0):console.warn("Failed to fill buffer canvas with with 0x0 canvas")}this._bufferCanvasValid=!0}var l=window.devicePixelRatio!=null?window.devicePixelRatio:1;this._canvas.attr("width",r*l),this._canvas.attr("height",n*l);var c=this._canvas.node().getContext("2d");if(c&&(c.setTransform(l,0,0,l,0,0),this._bufferCanvas)){var u=this._bufferCanvas.node();u.width>0&&u.height>0?c.canvas.width>0&&c.canvas.height>0&&c.drawImage(u,0,0,r,n):console.warn("Failed to fill canvas with 0x0 buffer canvas")}}return this},t.prototype.destroy=function(){var r=this;e.prototype.destroy.call(this),this._scales().forEach(function(n){return n.offUpdate(r._renderCallback)}),this.datasets([])},t.prototype._createNodesForDataset=function(r){var n=this._datasetToDrawer.get(r);return this.renderer()==="svg"?n.useSVG(this._renderArea):n.useCanvas(this._canvas),n},t.prototype._createDrawer=function(r){return new kHe.ProxyDrawer(function(){return new RHe.SVGDrawer("path","")},function(n){return new LHe.CanvasDrawer(n,function(){})})},t.prototype._getAnimator=function(r){return this._animateOnNextRender()?this._animators[r]||new d4.Null:new d4.Null},t.prototype._onDatasetUpdate=function(){this._updateExtents(),this._dataChanged=!0,this._resetEntityStore(),this.renderLowPriority()},t.prototype.attr=function(r,n,i){return n==null?this._attrBindings.get(r):(this._bindAttr(r,n,i),this.render(),this)},t.prototype._bindProperty=function(r,n,i,o){var a=this._propertyBindings.get(r),s=a!=null?a.scale:null,l=typeof n=="function"?n:function(){return n};this._propertyBindings.set(r,{accessor:l,scale:i,postScale:o}),s!=null&&this._uninstallScaleForKey(s,r),i!=null&&this._installScaleForKey(i,r),this._clearAttrToProjectorCache()},t.prototype._bindAttr=function(r,n,i){var o=this._attrBindings.get(r),a=o!=null?o.scale:null,s=typeof n=="function"?n:function(){return n};this._attrBindings.set(r,{accessor:s,scale:i}),a!=null&&this._uninstallScaleForKey(a,r),i!=null&&this._installScaleForKey(i,r),this._clearAttrToProjectorCache()},t.prototype._clearAttrToProjectorCache=function(){delete this._cachedAttrToProjector},t.prototype._getAttrToProjector=function(){if(this._cachedAttrToProjector==null){var r=this._generateAttrToProjector();t.OPTIMIZE_MEMOIZE_PROJECTORS&&(r=oat.memoizeProjectors(r)),this._cachedAttrToProjector=r}return Sd.assign({},this._cachedAttrToProjector)},t.prototype._generateAttrToProjector=function(){var r={};this._attrBindings.each(function(i,o){r[o]=t._scaledAccessor(i)});var n=this._propertyProjectors();return Object.keys(n).forEach(function(i){r[i]==null&&(r[i]=n[i])}),r},t.prototype.renderImmediately=function(){return e.prototype.renderImmediately.call(this),this._isAnchored&&(this._paint(),this._dataChanged=!1),this},t.prototype.renderLowPriority=function(){return this._renderCallback(),this},t.prototype.animated=function(r){return r==null?this._animate:(this._animate=r,this)},t.prototype.detach=function(){return e.prototype.detach.call(this),this._updateExtents(),this},t.prototype._scales=function(){var r=[];return this._attrBindings.each(function(n,i){var o=n.scale;o!=null&&r.indexOf(o)===-1&&r.push(o)}),this._propertyBindings.each(function(n,i){var o=n.scale;o!=null&&r.indexOf(o)===-1&&r.push(o)}),r},t.prototype._updateExtents=function(){var r=this;this._resetEntityStore(),this._scales().forEach(function(n){return n.addIncludedValuesProvider(r._includedValuesProvider)})},t.prototype._filterForProperty=function(r){return null},t.prototype.getExtentsForAttr=function(r){var n=this;if(this._attrExtents[r]==null){var i=oat.memThunk(function(){return n.datasets()},function(){return n._attrBindings.get(r)},function(o,a){return a==null||a.accessor==null?null:o.map(function(s){return oKt(s,a,null)})});this._attrExtents[r]=i}return this._attrExtents[r]()},t.prototype.getExtentsForProperty=function(r){var n=this;if(this._propertyExtents[r]==null){var i=oat.memThunk(function(){return n.datasets()},function(){return n._propertyBindings.get(r)},function(){return n._filterForProperty(r)},function(o,a,s){return a==null||a.accessor==null?null:o.map(function(l){return oKt(l,a,s)})});this._propertyExtents[r]=i}return this._propertyExtents[r]()},t.prototype._includedValuesForScale=function(r,n){var i=this;if(!this._isAnchored&&!n)return[];var o=[];return this._attrBindings.each(function(a,s){if(a.scale===r){var l=i.getExtentsForAttr(s);l!=null&&(o=o.concat(wd.merge(l)))}}),this._propertyBindings.each(function(a,s){if(a.scale===r){var l=i.getExtentsForProperty(s);l!=null&&(o=o.concat(wd.merge(l)))}}),o},t.prototype.animator=function(r,n){return n===void 0?this._animators[r]:(this._animators[r]=n,this)},t.prototype.renderer=function(r){var n=this;return r===void 0?this._canvas==null?"svg":"canvas":(this._canvas==null&&r==="canvas"?(this._canvas=wd.select(document.createElement("canvas")).classed("plot-canvas",!0),this._bufferCanvas=wd.select(document.createElement("canvas")),this.element()!=null&&this._appendCanvasNode(),this._datasetToDrawer.forEach(function(i){i.useCanvas(n._canvas)}),this.render()):this._canvas!=null&&r=="svg"&&(this._canvas.remove(),this._canvas=null,this._bufferCanvas=null,this._datasetToDrawer.forEach(function(i){i.useSVG(n._renderArea)}),this.render()),this)},t.prototype.addDataset=function(r){return this._addDataset(r),this._onDatasetUpdate(),this},t.prototype._addDataset=function(r){this._removeDataset(r);var n=this._createDrawer(r);return this._datasetToDrawer.set(r,n),this._isSetup&&this._createNodesForDataset(r),r.onUpdate(this._onDatasetUpdateCallback),this},t.prototype.removeDataset=function(r){return this._removeDataset(r),this._onDatasetUpdate(),this},t.prototype._removeDataset=function(r){return this.datasets().indexOf(r)===-1?this:(this._removeDatasetNodes(r),r.offUpdate(this._onDatasetUpdateCallback),this._datasetToDrawer.delete(r),this)},t.prototype._removeDatasetNodes=function(r){var n=this._datasetToDrawer.get(r);n.remove()},t.prototype.datasets=function(r){var n=this,i=[];return this._datasetToDrawer.forEach(function(o,a){return i.push(a)}),r==null?i:(i.forEach(function(o){return n._removeDataset(o)}),r.forEach(function(o){return n._addDataset(o)}),this._onDatasetUpdate(),this)},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:new d4.Null}]},t.prototype._additionalPaint=function(r){},t.prototype._buildLightweightPlotEntities=function(r){var n=this,i=[];return r.forEach(function(o,a){for(var s=n._datasetToDrawer.get(o),l=0,c=o.data(),u=c.length,h=function(p){var d=c[p],g=n._pixelPoint(d,p,o);if(Sd.Math.isNaN(g.x)||Sd.Math.isNaN(g.y))return"continue";var _=n;i.push({datum:d,get position(){return _._pixelPoint.call(_,d,p,o)},index:p,dataset:o,datasetIndex:a,component:n,drawer:s,validDatumIndex:l}),l++},f=0;f<u;f++)h(f)}),i},t.prototype._getDataToDraw=function(){var r=new Sd.Map;return this.datasets().forEach(function(n){return r.set(n,n.data())}),r},t.prototype._paint=function(){var r=this;delete this._cachedAttrToProjector;var n=this._generateDrawSteps(),i=this._getDataToDraw(),o=this.datasets().map(function(u){return r._datasetToDrawer.get(u)});if(this.renderer()==="canvas"){var a=this._canvas.node(),s=a.getContext("2d");s.clearRect(0,0,a.clientWidth,a.clientHeight),this._bufferCanvasValid=!1}this.datasets().forEach(function(u,h){var f=t.applyDrawSteps(n,u);o[h].draw(i.get(u),f)});var l=this.datasets().map(function(u,h){return t.getTotalDrawTime(i.get(u),n)}),c=Sd.Math.max(l,0);this._additionalPaint(c)},t.prototype.selections=function(r){var n=this;if(r===void 0&&(r=this.datasets()),this.renderer()==="canvas")return wd.selectAll();var i=[];return r.forEach(function(o){var a=n._datasetToDrawer.get(o);if(a!=null){var s=a.getVisualPrimitives();i.push.apply(i,s)}}),wd.selectAll(i)},t.prototype.entities=function(r){var n=this;return this._getEntityStore(r).entities().map(function(i){return n._lightweightPlotEntityToPlotEntity(i)})},t.prototype.filterEntities=function(r){var n=this;return this._getEntityStore().entities().filter(r).map(function(i){return n._lightweightPlotEntityToPlotEntity(i)})},t.prototype._getEntityStore=function(r){var n=this,i=function(a){return n._entityBounds(a)};if(r!==void 0){var o=new Sd.EntityStore;return o.addAll(this._buildLightweightPlotEntities(r),i,this._localOriginBounds()),o}else if(this._cachedEntityStore===void 0){var o=new Sd.EntityStore;o.addAll(this._buildLightweightPlotEntities(this.datasets()),i,this._localOriginBounds()),this._cachedEntityStore=o}return this._cachedEntityStore},t.prototype._localOriginBounds=function(){return{topLeft:{x:0,y:0},bottomRight:{x:this.width(),y:this.height()}}},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset,a=this._pixelPoint(n,i,o),s=a.x,l=a.y;return{x:s,y:l,width:0,height:0}},t.prototype._lightweightPlotEntityToPlotEntity=function(r){var n={bounds:this._entityBounds(r),component:r.component,dataset:r.dataset,datasetIndex:r.datasetIndex,datum:r.datum,index:r.index,position:r.position,selection:wd.select(r.drawer.getVisualPrimitiveAtIndex(r.validDatumIndex))};return n},t.prototype.entitiesAt=function(r){throw new Error("plots must implement entitiesAt")},t.prototype.entityNearest=function(r){var n=this._getEntityStore().entityNearest(r);return n===void 0?void 0:this._lightweightPlotEntityToPlotEntity(n)},t.prototype.entitiesIn=function(r,n){var i;if(n==null){var o=r;i={x:o.topLeft.x,y:o.topLeft.y,width:o.bottomRight.x-o.topLeft.x,height:o.bottomRight.y-o.topLeft.y}}else{var a=r;i={x:a.min,y:n.min,width:a.max-a.min,height:n.max-n.min}}return this.entitiesInBounds(i)},t.prototype.entitiesInBounds=function(r){var n=this,i=this._getEntityStore().entitiesInBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype.entitiesInXBounds=function(r){var n=this,i=this._getEntityStore().entitiesInXBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype.entitiesInYBounds=function(r){var n=this,i=this._getEntityStore().entitiesInYBounds(r);if(!!i)return i.map(function(o){return n._lightweightPlotEntityToPlotEntity(o)})},t.prototype._uninstallScaleForKey=function(r,n){r.offUpdate(this._renderCallback),r.offUpdate(this._deferredResetEntityStore),r.removeIncludedValuesProvider(this._includedValuesProvider)},t.prototype._installScaleForKey=function(r,n){r.onUpdate(this._renderCallback),r.onUpdate(this._deferredResetEntityStore),r.addIncludedValuesProvider(this._includedValuesProvider)},t.prototype._propertyProjectors=function(){return{}},t._scaledAccessor=function(r){var n=r.scale,i=r.accessor,o=r.postScale,a=n==null?i:function(l,c,u){return n.scale(i(l,c,u))},s=o==null?a:function(l,c,u){return o(a(l,c,u),l,c,u)};return s},t.prototype._pixelPoint=function(r,n,i){return{x:0,y:0}},t.prototype._animateOnNextRender=function(){return this._animate&&this._dataChanged},t.OPTIMIZE_MEMOIZE_PROJECTORS=!1,t._ANIMATION_MAX_DURATION=600,t}(IHe.Component);QF.Plot=zHe;function oKt(e,t,r){var n=t.accessor,i=t.scale;if(i==null)return[];var o=e.data();r!=null&&(o=o.filter(function(l,c){return r(l,c,e)}));var a=function(l,c){return n(l,c,e)},s=o.map(a);return i.extentOfValues(s)}});var aKt=H(aat=>{"use strict";Object.defineProperty(aat,"__esModule",{value:!0});var FHe=(de(),Ut(pe)),BHe=rs(),HHe=Fe(),VHe=zot(),UHe=function(e){FHe.__extends(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.entityNearest=function(r){var n,i=1/0;return this.components().forEach(function(o){var a=o,s=a.entityNearest(r);if(s!=null){var l=HHe.Math.distanceSquared(s.position,r);l<=i&&(i=l,n=s)}}),n},t.prototype.append=function(r){if(r!=null&&!(r instanceof BHe.Plot))throw new Error("Plot Group only accepts plots");return e.prototype.append.call(this,r),this},t}(VHe.Group);aat.PlotGroup=UHe});var sKt=H(sat=>{"use strict";Object.defineProperty(sat,"__esModule",{value:!0});var qHe=(de(),Ut(pe)),qu=(Er(),Ut(Mr)),Go=Fe(),GHe=WF(),WHe=function(e){qHe.__extends(t,e);function t(r){r===void 0&&(r=[]);var n=e.call(this)||this;return n._rowPadding=0,n._columnPadding=0,n._rows=[],n._rowWeights=[],n._columnWeights=[],n._nRows=0,n._nCols=0,n._calculatedLayout=null,n.addClass("table"),r.forEach(function(i,o){i.forEach(function(a,s){a!=null&&n.add(a,o,s)})}),n}return t.prototype._forEach=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)this._rows[n][i]!=null&&r(this._rows[n][i])},t.prototype.has=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)if(this._rows[n][i]===r)return!0;return!1},t.prototype.componentAt=function(r,n){return r<0||r>=this._nRows||n<0||n>=this._nCols?null:this._rows[r][n]},t.prototype.add=function(r,n,i){if(r==null)throw Error("Cannot add null to a table cell");if(!this.has(r)){var o=this._rows[n]&&this._rows[n][i];if(o!=null)throw new Error("cell is occupied");r.detach(),this._nRows=Math.max(n+1,this._nRows),this._nCols=Math.max(i+1,this._nCols),this._padTableToSize(this._nRows,this._nCols),this._rows[n][i]=r,this._adoptAndAnchor(r),this.redraw()}return this},t.prototype._remove=function(r){for(var n=0;n<this._nRows;n++)for(var i=0;i<this._nCols;i++)if(this._rows[n][i]===r)return this._rows[n][i]=null,!0;return!1},t.prototype._iterateLayout=function(r,n,i){i===void 0&&(i=!1);for(var o=this._rows,a=qu.transpose(this._rows),s=r-this._columnPadding*(this._nCols-1),l=n-this._rowPadding*(this._nRows-1),c=t._calcComponentWeights(this._rowWeights,o,function(z){return z==null||z.fixedHeight()}),u=t._calcComponentWeights(this._columnWeights,a,function(z){return z==null||z.fixedWidth()}),h=u.map(function(z){return z===0?.5:z}),f=c.map(function(z){return z===0?.5:z}),p=t._calcProportionalSpace(h,s),d=t._calcProportionalSpace(f,l),g=Go.Array.createFilledArray(0,this._nCols),_=Go.Array.createFilledArray(0,this._nRows),y,x,b=0,S,C,P;;){var k=Go.Array.add(_,d),O=Go.Array.add(g,p);S=this._determineGuarantees(O,k,i),g=S.guaranteedWidths,_=S.guaranteedHeights,C=S.wantsWidthArr.some(function(z){return z}),P=S.wantsHeightArr.some(function(z){return z});var D=y,B=x;y=s-qu.sum(S.guaranteedWidths),x=l-qu.sum(S.guaranteedHeights);var I=void 0;C?(I=S.wantsWidthArr.map(function(z){return z?.1:0}),I=Go.Array.add(I,u)):I=u;var L=void 0;P?(L=S.wantsHeightArr.map(function(z){return z?.1:0}),L=Go.Array.add(L,c)):L=c,p=t._calcProportionalSpace(I,y),d=t._calcProportionalSpace(L,x),b++;var R=y>0&&y!==D,F=x>0&&x!==B;if(!(R||F)||b>5)break}return y=s-qu.sum(S.guaranteedWidths),x=l-qu.sum(S.guaranteedHeights),p=t._calcProportionalSpace(u,y),d=t._calcProportionalSpace(c,x),{colProportionalSpace:p,rowProportionalSpace:d,guaranteedWidths:S.guaranteedWidths,guaranteedHeights:S.guaranteedHeights,wantsWidth:C,wantsHeight:P}},t.prototype._determineGuarantees=function(r,n,i){i===void 0&&(i=!1);var o=Go.Array.createFilledArray(0,this._nCols),a=Go.Array.createFilledArray(0,this._nRows),s=Go.Array.createFilledArray(!1,this._nCols),l=Go.Array.createFilledArray(!1,this._nRows);return this._rows.forEach(function(c,u){c.forEach(function(h,f){var p;h!=null?p=h.requestedSpace(r[f],n[u]):p={minWidth:0,minHeight:0};var d=i?Math.min(p.minWidth,r[f]):p.minWidth;o[f]=Math.max(o[f],d);var g=i?Math.min(p.minHeight,n[u]):p.minHeight;a[u]=Math.max(a[u],g);var _=p.minWidth>r[f];s[f]=s[f]||_;var y=p.minHeight>n[u];l[u]=l[u]||y})}),{guaranteedWidths:o,guaranteedHeights:a,wantsWidthArr:s,wantsHeightArr:l}},t.prototype.requestedSpace=function(r,n){return this._calculatedLayout=this._iterateLayout(r,n),{minWidth:qu.sum(this._calculatedLayout.guaranteedWidths),minHeight:qu.sum(this._calculatedLayout.guaranteedHeights)}},t.prototype.computeLayout=function(r,n,i){var o=this;e.prototype.computeLayout.call(this,r,n,i);var a=qu.sum(this._calculatedLayout.guaranteedWidths),s=qu.sum(this._calculatedLayout.guaranteedHeights),l=this._calculatedLayout;(a>this.width()||s>this.height())&&(l=this._iterateLayout(this.width(),this.height(),!0));var c=0,u=Go.Array.add(l.rowProportionalSpace,l.guaranteedHeights),h=Go.Array.add(l.colProportionalSpace,l.guaranteedWidths);return this._rows.forEach(function(f,p){var d=0;f.forEach(function(g,_){g!=null&&g.computeLayout({x:d,y:c},h[_],u[p]),d+=h[_]+o._columnPadding}),c+=u[p]+o._rowPadding}),this},t.prototype.rowPadding=function(r){if(r==null)return this._rowPadding;if(!Go.Math.isValidNumber(r)||r<0)throw Error("rowPadding must be a non-negative finite value");return this._rowPadding=r,this.redraw(),this},t.prototype.columnPadding=function(r){if(r==null)return this._columnPadding;if(!Go.Math.isValidNumber(r)||r<0)throw Error("columnPadding must be a non-negative finite value");return this._columnPadding=r,this.redraw(),this},t.prototype.rowWeight=function(r,n){if(n==null)return this._rowWeights[r];if(!Go.Math.isValidNumber(n)||n<0)throw Error("rowWeight must be a non-negative finite value");return this._rowWeights[r]=n,this.redraw(),this},t.prototype.columnWeight=function(r,n){if(n==null)return this._columnWeights[r];if(!Go.Math.isValidNumber(n)||n<0)throw Error("columnWeight must be a non-negative finite value");return this._columnWeights[r]=n,this.redraw(),this},t.prototype.fixedWidth=function(){var r=qu.transpose(this._rows);return t._fixedSpace(r,function(n){return n==null||n.fixedWidth()})},t.prototype.fixedHeight=function(){return t._fixedSpace(this._rows,function(r){return r==null||r.fixedHeight()})},t.prototype._padTableToSize=function(r,n){for(var i=0;i<r;i++){this._rows[i]===void 0&&(this._rows[i]=[],this._rowWeights[i]=null);for(var o=0;o<n;o++)this._rows[i][o]===void 0&&(this._rows[i][o]=null)}for(var o=0;o<n;o++)this._columnWeights[o]===void 0&&(this._columnWeights[o]=null)},t._calcComponentWeights=function(r,n,i){return r.map(function(o,a){if(o!=null)return o;var s=n[a].map(i),l=s.reduce(function(c,u){return c&&u},!0);return l?0:1})},t._calcProportionalSpace=function(r,n){var i=qu.sum(r);return i===0?Go.Array.createFilledArray(0,r.length):r.map(function(o){return n*o/i})},t._fixedSpace=function(r,n){var i=function(a){return a.reduce(function(s,l){return s&&l},!0)},o=function(a){return i(a.map(n))};return i(r.map(o))},t}(GHe.ComponentContainer);sat.Table=WHe});var lKt=H(lat=>{"use strict";Object.defineProperty(lat,"__esModule",{value:!0});var YHe=(de(),Ut(pe)),jHe=Vot(),XHe=2,$He=function(e){YHe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r._maxLines=XHe,r}return t.prototype.requestedSpace=function(r,n){this._wrapper.maxLines(this._maxLines);var i=this.angle()===0?r:n;i===0&&(i=1/0);var o=this._wrapper.wrap(this._text,this._measurer,i),a=this._measurer.measure(o.wrappedText),s=(this.angle()===0?a.width:a.height)+2*this.padding(),l=(this.angle()===0?a.height:a.width)+2*this.padding();return{minWidth:s,minHeight:l}},t.prototype.maxLines=function(r){return arguments.length===0?this._maxLines:(this._maxLines=r,this.redraw(),this)},t}(jHe.Label);lat.WrappedLabel=$He});var cKt=H(cat=>{"use strict";Object.defineProperty(cat,"__esModule",{value:!0});var KHe=(de(),Ut(pe)),ZHe=qF(),JHe=function(e){KHe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("x-drag-box-layer"),r._hasCorners=!1,r}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._setBounds(this.bounds()),this},t.prototype._setBounds=function(r){e.prototype._setBounds.call(this,{topLeft:{x:r.topLeft.x,y:0},bottomRight:{x:r.bottomRight.x,y:this.height()}})},t.prototype._setResizableClasses=function(r){r&&this.enabled()?this.addClass("x-resizable"):this.removeClass("x-resizable")},t.prototype.yScale=function(r){if(r==null)return e.prototype.yScale.call(this);throw new Error("yScales cannot be set on an XDragBoxLayer")},t.prototype.yExtent=function(r){if(r==null)return e.prototype.yExtent.call(this);throw new Error("XDragBoxLayer has no yExtent")},t}(ZHe.DragBoxLayer);cat.XDragBoxLayer=JHe});var uKt=H(uat=>{"use strict";Object.defineProperty(uat,"__esModule",{value:!0});var QHe=(de(),Ut(pe)),tVe=qF(),eVe=function(e){QHe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("y-drag-box-layer"),r._hasCorners=!1,r}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._setBounds(this.bounds()),this},t.prototype._setBounds=function(r){e.prototype._setBounds.call(this,{topLeft:{x:0,y:r.topLeft.y},bottomRight:{x:this.width(),y:r.bottomRight.y}})},t.prototype._setResizableClasses=function(r){r&&this.enabled()?this.addClass("y-resizable"):this.removeClass("y-resizable")},t.prototype.xScale=function(r){if(r==null)return e.prototype.xScale.call(this);throw new Error("xScales cannot be set on an YDragBoxLayer")},t.prototype.xExtent=function(r){if(r==null)return e.prototype.xExtent.call(this);throw new Error("YDragBoxLayer has no xExtent")},t}(tVe.DragBoxLayer);uat.YDragBoxLayer=eVe});var Pot=H(_a=>{"use strict";Object.defineProperty(_a,"__esModule",{value:!0});var Ns=(de(),Ut(pe));Ns.__exportStar(qF(),_a);Ns.__exportStar(I$t(),_a);Ns.__exportStar(L$t(),_a);Ns.__exportStar(zot(),_a);Ns.__exportStar(Lot(),_a);Ns.__exportStar(R$t(),_a);Ns.__exportStar(Vot(),_a);Ns.__exportStar(N$t(),_a);Ns.__exportStar(aKt(),_a);Ns.__exportStar(Tot(),_a);Ns.__exportStar(sKt(),_a);Ns.__exportStar(lKt(),_a);Ns.__exportStar(cKt(),_a);Ns.__exportStar(uKt(),_a)});var fat=H(hat=>{"use strict";Object.defineProperty(hat,"__esModule",{value:!0});var rVe=(de(),Ut(pe)),nVe=Df(),iVe=function(e){rVe.__extends(t,e);function t(){return e.call(this,"path","arc fill")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("stroke","none")},t}(nVe.SVGDrawer);hat.ArcSVGDrawer=iVe});var dat=H(pat=>{"use strict";Object.defineProperty(pat,"__esModule",{value:!0});var oVe=(de(),Ut(pe)),aVe=Df(),sVe=function(e){oVe.__extends(t,e);function t(){return e.call(this,"path","arc outline")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("fill","none")},t}(aVe.SVGDrawer);pat.ArcOutlineSVGDrawer=sVe});var mat=H(eB=>{"use strict";Object.defineProperty(eB,"__esModule",{value:!0});var lVe=(de(),Ut(pe)),tB=Fv(),cVe=Df(),uVe=function(e){lVe.__extends(t,e);function t(){return e.call(this,"path","area")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("stroke","none")},t.prototype.getVisualPrimitiveAtIndex=function(r){return e.prototype.getVisualPrimitiveAtIndex.call(this,0)},t}(cVe.SVGDrawer);eB.AreaSVGDrawer=uVe;var hVe=["opacity","fill","fill-opacity"],fVe=["opacity","stroke","stroke-width"];function pVe(e,t){return function(r,n,i){var o=tB.resolveAttributes(i,hVe,n[0],0);tB.renderArea(r,e(),n[0],o);var a=tB.resolveAttributes(i,fVe,n[0],0);tB.renderLine(r,t(),n[0],a)}}eB.makeAreaCanvasDrawStep=pVe});var nB=H(rB=>{"use strict";Object.defineProperty(rB,"__esModule",{value:!0});var dVe=(de(),Ut(pe)),hKt=Fv(),mVe=Df(),gVe=function(e){dVe.__extends(t,e);function t(){return e.call(this,"path","line")||this}return t.prototype._applyDefaultAttributes=function(r){r.style("fill","none")},t.prototype.getVisualPrimitiveAtIndex=function(r){return e.prototype.getVisualPrimitiveAtIndex.call(this,0)},t}(mVe.SVGDrawer);rB.LineSVGDrawer=gVe;var _Ve=["opacity","stroke-opacity","stroke-width","stroke","stroke-dasharray"];function yVe(e){return function(t,r,n){var i=hKt.resolveAttributes(n,_Ve,r[0],0);hKt.renderLine(t,e(),r[0],i)}}rB.makeLineCanvasDrawStep=yVe});var oB=H(PS=>{"use strict";Object.defineProperty(PS,"__esModule",{value:!0});var fKt=(de(),Ut(pe)),iB=Fv(),vVe=Df(),xVe=function(e){fKt.__extends(t,e);function t(r){r===void 0&&(r="");var n=e.call(this,"rect","")||this;return n._rootClassName=r,n._root.classed(n._rootClassName,!0),n}return t}(vVe.SVGDrawer);PS.RectangleSVGDrawer=xVe;var bVe=iB.ContextStyleAttrs.concat(["x","y","width","height"]);PS.RectangleCanvasDrawStep=function(e,t,r){e.save();for(var n=t.length,i=0;i<n;i++){var o=t[i];if(o!=null){var a=iB.resolveAttributes(r,bVe,o,i);e.beginPath(),e.rect(a.x,a.y,a.width,a.height),iB.renderPathWithStyle(e,a)}}e.restore()};var wVe=function(e){fKt.__extends(t,e);function t(r){return e.call(this,r,PS.RectangleCanvasDrawStep)||this}return t}(iB.CanvasDrawer);PS.RectangleCanvasDrawer=wVe});var _at=H(gat=>{"use strict";Object.defineProperty(gat,"__esModule",{value:!0});var SVe=(de(),Ut(pe)),MVe=Df(),EVe=function(e){SVe.__extends(t,e);function t(){return e.call(this,"line","")||this}return t}(MVe.SVGDrawer);gat.SegmentSVGDrawer=EVe});var pKt=H(yat=>{"use strict";Object.defineProperty(yat,"__esModule",{value:!0});var TVe=function(){function e(t,r,n){n===void 0&&(n=window.devicePixelRatio),this.screenWidth=t,this.screenHeight=r,this.devicePixelRatio=n,this.pixelWidth=t*n,this.pixelHeight=r*n,this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),e.sizePixels(this.ctx,t,r,n)}return e.sizePixels=function(t,r,n,i){var o=t.canvas;o.width=r*i,o.height=n*i,o.style.width=r+"px",o.style.height=n+"px",t.setTransform(1,0,0,1,0,0),t.scale(i,i)},e.prototype.blit=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=0),t.drawImage(this.canvas,r,n,this.screenWidth,this.screenHeight)},e.prototype.blitCenter=function(t,r,n){r===void 0&&(r=0),n===void 0&&(n=0),this.blit(t,Math.floor(r-this.screenWidth/2),Math.floor(n-this.screenHeight/2))},e.prototype.resize=function(t,r,n){n===void 0&&(n=!1);var i=this.devicePixelRatio;return this.screenWidth=t,this.screenHeight=r,this.pixelWidth=t*i,this.pixelHeight=r*i,e.sizePixels(this.ctx,t,r,i),n&&this.ctx.translate(t/2,t/2),this},e.prototype.clear=function(t){var r=this,n=r.pixelWidth,i=r.pixelHeight,o=r.ctx;return o.save(),o.setTransform(1,0,0,1,0,0),t==null?o.clearRect(0,0,n,i):(o.fillStyle=t,o.fillRect(0,0,n,i)),o.restore(),this},e.prototype.getImageData=function(){return this.ctx.getImageData(0,0,this.pixelWidth,this.pixelHeight)},e}();yat.CanvasBuffer=TVe});var vat=H(aB=>{"use strict";Object.defineProperty(aB,"__esModule",{value:!0});var CVe=(de(),Ut(pe)),m4=Fv(),AVe=pKt(),PVe=Df(),IVe=function(e){CVe.__extends(t,e);function t(){return e.call(this,"path","symbol")||this}return t}(PVe.SVGDrawer);aB.SymbolSVGDrawer=IVe;var LVe=m4.ContextStyleAttrs.concat(["x","y"]);function kVe(e,t,r,n){var i=this;return function(o,a,s){for(var l=o.canvas,c=l.clientWidth,u=l.clientHeight,h=n===void 0?new AVe.CanvasBuffer(0,0):n,f=t(),p=r(),d=null,g=null,_=null,y=0;y<a.length;y++){var x=a[y];if(x!=null){var b=m4.resolveAttributes(s,LVe,x,y),S=p(x,y,e);if(!!RVe(c,u,b.x,b.y,S)){var C=NVe(d,b,m4.ContextStyleAttrs),P=f(x,y,i._dataset);if(!(C&&_==S&&g==P)){var k=m4.getStrokeWidth(b),O=S+k+1;(O>h.screenWidth||O>h.screenHeight)&&h.resize(O,O,!0),h.clear();var D=h.ctx;D.beginPath(),P(S).context(D)(null),D.closePath(),m4.renderPathWithStyle(D,b),g=P,_=S,d=b}h.blitCenter(o,b.x,b.y)}}}}}aB.makeSymbolCanvasDrawStep=kVe;function RVe(e,t,r,n,i){return r+i>=0&&r-i<=e&&n+i>=0&&n-i<=t}function NVe(e,t,r){if(e==null)return!1;for(var n=0;n<r.length;n++){var i=r[n];if(e[i]!=t[i])return!1}return!0}});var Bv=H(Dc=>{"use strict";Object.defineProperty(Dc,"__esModule",{value:!0});var Of=(de(),Ut(pe));Of.__exportStar(fat(),Dc);Of.__exportStar(dat(),Dc);Of.__exportStar(mat(),Dc);Of.__exportStar(Fv(),Dc);Of.__exportStar(Uu(),Dc);Of.__exportStar(nB(),Dc);Of.__exportStar(oB(),Dc);Of.__exportStar(_at(),Dc);Of.__exportStar(Df(),Dc);Of.__exportStar(vat(),Dc)});var Hv=H(bat=>{"use strict";Object.defineProperty(bat,"__esModule",{value:!0});var DVe=(de(),Ut(pe)),dKt=ks(),xat=Fe(),OVe=iat(),g4=rs(),zVe=function(e){DVe.__extends(t,e);function t(){var r=e.call(this)||this;return r._autoAdjustXScaleDomain=!1,r._autoAdjustYScaleDomain=!1,r._deferredRendering=!1,r._applyDeferredRenderingTransform=function(n,i,o,a){!r._isAnchored||(r._renderArea!=null&&r._renderArea.attr("transform","translate("+n+", "+i+") scale("+o+", "+a+")"),r._canvas!=null&&r._canvas.style("transform","translate("+n+"px, "+i+"px) scale("+o+", "+a+")"))},r.addClass("xy-plot"),r._adjustYDomainOnChangeFromXCallback=function(n){return r._adjustYDomainOnChangeFromX()},r._adjustXDomainOnChangeFromYCallback=function(n){return r._adjustXDomainOnChangeFromY()},r._renderCallback=function(){if(r.deferredRendering()){var n=r.x()&&r.x().scale,i=r.y()&&r.y().scale;r._deferredRenderer.updateDomains(n,i)}else r.render()},r._deferredRenderer=new OVe.DeferredRenderer(function(){return r.render()},r._applyDeferredRenderingTransform),r}return t.prototype.render=function(){return this.deferredRendering()&&this._deferredRenderer.resetTransforms(),e.prototype.render.call(this)},t.prototype.deferredRendering=function(r){if(r==null)return this._deferredRendering;if(r){var n=this.x()&&this.x().scale,i=this.y()&&this.y().scale;this._deferredRenderer.setDomains(n,i)}return this._deferredRendering=r,this},t.prototype.x=function(r,n,i){if(r==null)return this._propertyBindings.get(t._X_KEY);this._bindProperty(t._X_KEY,r,n,i);var o=this.width();return n!=null&&o!=null&&n.range([0,o]),this._autoAdjustYScaleDomain&&this._updateYExtentsAndAutodomain(),this.render(),this},t.prototype.y=function(r,n,i){if(r==null)return this._propertyBindings.get(t._Y_KEY);this._bindProperty(t._Y_KEY,r,n,i);var o=this.height();return n!=null&&o!=null&&(n instanceof dKt.Category?n.range([0,o]):n.range([o,0])),this._autoAdjustXScaleDomain&&this._updateXExtentsAndAutodomain(),this.render(),this},t.prototype._filterForProperty=function(r){return r==="x"&&this._autoAdjustXScaleDomain?this._makeFilterByProperty("y"):(r==="y"||r==="y0")&&this._autoAdjustYScaleDomain?this._makeFilterByProperty("x"):null},t.prototype._makeFilterByProperty=function(r){var n=this._propertyBindings.get(r);if(n!=null){var i=n.accessor,o=n.scale;if(o!=null)return function(a,s,l){var c=o.range();return xat.Math.inRange(o.scale(i(a,s,l)),c[0],c[1])}}return null},t.prototype._uninstallScaleForKey=function(r,n){e.prototype._uninstallScaleForKey.call(this,r,n);var i=n===t._X_KEY?this._adjustYDomainOnChangeFromXCallback:this._adjustXDomainOnChangeFromYCallback;r.offUpdate(i)},t.prototype._installScaleForKey=function(r,n){e.prototype._installScaleForKey.call(this,r,n);var i=n===t._X_KEY?this._adjustYDomainOnChangeFromXCallback:this._adjustXDomainOnChangeFromYCallback;r.onUpdate(i)},t.prototype.destroy=function(){return e.prototype.destroy.call(this),this.x().scale&&this.x().scale.offUpdate(this._adjustYDomainOnChangeFromXCallback),this.y().scale&&this.y().scale.offUpdate(this._adjustXDomainOnChangeFromYCallback),this},t.prototype.autorangeMode=function(r){if(r==null)return this._autoAdjustXScaleDomain?"x":this._autoAdjustYScaleDomain?"y":"none";switch(r){case"x":this._autoAdjustXScaleDomain=!0,this._autoAdjustYScaleDomain=!1,this._adjustXDomainOnChangeFromY();break;case"y":this._autoAdjustXScaleDomain=!1,this._autoAdjustYScaleDomain=!0,this._adjustYDomainOnChangeFromX();break;case"none":this._autoAdjustXScaleDomain=!1,this._autoAdjustYScaleDomain=!1;break;default:throw new Error("Invalid scale name '"+r+"', must be 'x', 'y' or 'none'")}return this},t.prototype.computeLayout=function(r,n,i){e.prototype.computeLayout.call(this,r,n,i);var o=this.x(),a=o&&o.scale;a!=null&&a.range([0,this.width()]);var s=this.y(),l=s&&s.scale;return l!=null&&(l instanceof dKt.Category?l.range([0,this.height()]):l.range([this.height(),0])),this},t.prototype._updateXExtentsAndAutodomain=function(){var r=this.x().scale;r!=null&&r.autoDomain()},t.prototype._updateYExtentsAndAutodomain=function(){var r=this.y().scale;r!=null&&r.autoDomain()},t.prototype.showAllData=function(){return this._updateXExtentsAndAutodomain(),this._updateYExtentsAndAutodomain(),this},t.prototype._adjustYDomainOnChangeFromX=function(){!this._projectorsReady()||this._autoAdjustYScaleDomain&&this._updateYExtentsAndAutodomain()},t.prototype._adjustXDomainOnChangeFromY=function(){!this._projectorsReady()||this._autoAdjustXScaleDomain&&this._updateXExtentsAndAutodomain()},t.prototype._projectorsReady=function(){var r=this.x(),n=this.y();return r!=null&&r.accessor!=null&&n!=null&&n.accessor!=null},t.prototype._pixelPoint=function(r,n,i){var o=g4.Plot._scaledAccessor(this.x()),a=g4.Plot._scaledAccessor(this.y());return{x:o(r,n,i),y:a(r,n,i)}},t.prototype._getDataToDraw=function(){var r=this,n=e.prototype._getDataToDraw.call(this),i=this.attr("defined"),o=function(a,s,l){var c=g4.Plot._scaledAccessor(r.x())(a,s,l),u=g4.Plot._scaledAccessor(r.y())(a,s,l);return i&&i.accessor(a,s,l)===!1?!1:xat.Math.isValidNumber(c)&&xat.Math.isValidNumber(u)};return this.datasets().forEach(function(a){n.set(a,n.get(a).filter(function(s,l){return o(s,l,a)}))}),n},t._X_KEY="x",t._Y_KEY="y",t}(g4.Plot);bat.XYPlot=zVe});var Sat=H(lB=>{"use strict";Object.defineProperty(lB,"__esModule",{value:!0});var FVe=(de(),Ut(pe)),ya=(Er(),Ut(Mr)),BVe=Lf(),HVe=Bv(),VVe=Uu(),mKt=nB(),UVe=ks(),sB=vd(),Qg=Fe(),qVe=If(),wat=IS(),vl=rs(),GVe=Hv(),gKt={linear:ya.curveLinear,linearClosed:ya.curveLinearClosed,step:ya.curveStep,stepBefore:ya.curveStepBefore,stepAfter:ya.curveStepAfter,basis:ya.curveBasis,basisOpen:ya.curveBasisOpen,basisClosed:ya.curveBasisClosed,bundle:ya.curveBundle,cardinal:ya.curveCardinal,cardinalOpen:ya.curveCardinalOpen,cardinalClosed:ya.curveCardinalClosed,monotone:ya.curveMonotoneX};lB.CurveName=qVe.makeEnum(["linear","linearClosed","step","stepBefore","stepAfter","basis","basisOpen","basisClosed","bundle","cardinal","cardinalOpen","cardinalClosed","monotone"]);var WVe=function(e){FVe.__extends(t,e);function t(){var r=e.call(this)||this;r._curve="linear",r._autorangeSmooth=!1,r._croppedRenderingEnabled=!0,r._collapseDenseVerticalLinesEnabled=!1,r._downsamplingEnabled=!1,r.addClass("line-plot");var n=new BVe.Easing;return n.stepDuration(vl.Plot._ANIMATION_MAX_DURATION),n.easingMode("expInOut"),n.maxTotalDuration(vl.Plot._ANIMATION_MAX_DURATION),r.animator(wat.Animator.MAIN,n),r.attr("stroke",new UVe.Color().range()[0]),r.attr("stroke-width","2px"),r}return t.prototype.x=function(r,n,i){return r==null?e.prototype.x.call(this):(e.prototype.x.call(this,r,n,i),this._setScaleSnapping(),this)},t.prototype.y=function(r,n,i){return r==null?e.prototype.y.call(this):(e.prototype.y.call(this,r,n,i),this._setScaleSnapping(),this)},t.prototype.autorangeMode=function(r){return r==null?e.prototype.autorangeMode.call(this):(e.prototype.autorangeMode.call(this,r),this._setScaleSnapping(),this)},t.prototype.autorangeSmooth=function(r){return r==null?this._autorangeSmooth:(this._autorangeSmooth=r,this._setScaleSnapping(),this)},t.prototype._setScaleSnapping=function(){this.autorangeMode()==="x"&&this.x()&&this.x().scale&&this.x().scale instanceof sB.QuantitativeScale&&this.x().scale.snappingDomainEnabled(!this.autorangeSmooth()),this.autorangeMode()==="y"&&this.y()&&this.y().scale&&this.y().scale instanceof sB.QuantitativeScale&&this.y().scale.snappingDomainEnabled(!this.autorangeSmooth())},t.prototype.curve=function(r){return r==null?this._curve:(this._curve=r,this.render(),this)},t.prototype.downsamplingEnabled=function(r){return r==null?this._downsamplingEnabled:(this._downsamplingEnabled=r,this)},t.prototype.croppedRenderingEnabled=function(r){return r==null?this._croppedRenderingEnabled:(this._croppedRenderingEnabled=r,this.render(),this)},t.prototype.collapseDenseLinesEnabled=function(r){return r==null?this._collapseDenseVerticalLinesEnabled:(this._collapseDenseVerticalLinesEnabled=r,this.render(),this)},t.prototype._createDrawer=function(r){var n=this;return new VVe.ProxyDrawer(function(){return new mKt.LineSVGDrawer},function(i){return new HVe.CanvasDrawer(i,mKt.makeLineCanvasDrawStep(function(){return n._d3LineFactory(r)}))})},t.prototype.getExtentsForProperty=function(r){var n=e.prototype.getExtentsForProperty.call(this,r);if(!this._autorangeSmooth||this.autorangeMode()!==r||this.autorangeMode()!=="x"&&this.autorangeMode()!=="y")return n;var i=this._getEdgeIntersectionPoints(),o;return this.autorangeMode()==="y"?o=i.left.concat(i.right).map(function(a){return a.y}):o=i.top.concat(i.bottom).map(function(a){return a.x}),n.map(function(a){return ya.extent(ya.merge([a,o]))})},t.prototype._getEdgeIntersectionPoints=function(){var r=this;if(!(this.y().scale instanceof sB.QuantitativeScale&&this.x().scale instanceof sB.QuantitativeScale))return{left:[],right:[],top:[],bottom:[]};var n=this.y().scale,i=this.x().scale,o={left:[],right:[],top:[],bottom:[]},a=i.scale(i.domain()[0]),s=i.scale(i.domain()[1]),l=n.scale(n.domain()[0]),c=n.scale(n.domain()[1]);return this.datasets().forEach(function(u){for(var h=u.data(),f,p,d,g,_,y,x,b,S=1;S<h.length;S++)_=x||i.scale(r.x().accessor(h[S-1],S-1,u)),y=b||n.scale(r.y().accessor(h[S-1],S-1,u)),x=i.scale(r.x().accessor(h[S],S,u)),b=n.scale(r.y().accessor(h[S],S,u)),_<a==a<=x&&(f=a-_,p=x-_,g=b-y,d=f*g/p,o.left.push({x:a,y:n.invert(y+d)})),_<s==s<=x&&(f=s-_,p=x-_,g=b-y,d=f*g/p,o.right.push({x:s,y:n.invert(y+d)})),y<c==c<=b&&(p=x-_,d=c-y,g=b-y,f=d*p/g,o.top.push({x:i.invert(_+f),y:c})),y<l==l<=b&&(p=x-_,d=l-y,g=b-y,f=d*p/g,o.bottom.push({x:i.invert(_+f),y:l}))}),o},t.prototype._getResetYFunction=function(){var r=this.y().scale.domain(),n=Math.max(r[0],r[1]),i=Math.min(r[0],r[1]),o=n<0&&n||i>0&&i||0,a=this.y().scale.scale(o);return function(s,l,c){return a}},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector();n.d=this._constructLineProjector(vl.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(wat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(wat.Animator.MAIN)}),r},t.prototype._generateAttrToProjector=function(){var r=e.prototype._generateAttrToProjector.call(this);return Object.keys(r).forEach(function(n){if(n!=="d"){var i=r[n];r[n]=function(o,a,s){return o.length>0?i(o[0],a,s):null}}}),r},t.prototype.entitiesAt=function(r){var n=this.entityNearestByXThenY(r);return n!=null?[n]:[]},t.prototype.entityNearestByXThenY=function(r){for(var n=1/0,i=1/0,o,a=this.bounds(),s=this.entities(),l=s.length,c=0;c<l;c++){var u=s[c];if(!!Qg.Math.within(u.position,a)){var h=Math.abs(r.x-u.position.x),f=Math.abs(r.y-u.position.y);(h<n||h===n&&f<i)&&(o=u,n=h,i=f)}}return o},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return r.d=this._constructLineProjector(vl.Plot._scaledAccessor(this.x()),vl.Plot._scaledAccessor(this.y())),r},t.prototype._constructLineProjector=function(r,n){var i=this;return function(o,a,s){return i._d3LineFactory(s,r,n)(o)}},t.prototype._d3LineFactory=function(r,n,i){n===void 0&&(n=vl.Plot._scaledAccessor(this.x())),i===void 0&&(i=vl.Plot._scaledAccessor(this.y()));var o=function(a,s,l){var c=n(a,s,l),u=i(a,s,l);return Qg.Math.isValidNumber(c)&&Qg.Math.isValidNumber(u)};return ya.line().x(function(a,s){return n(a,s,r)}).y(function(a,s){return i(a,s,r)}).curve(this._getCurveFactory()).defined(function(a,s){return o(a,s,r)})},t.prototype._getCurveFactory=function(){var r=this.curve();if(typeof r=="string"){var n=gKt[r];return n==null?gKt.linear:n}else return r},t.prototype._getDataToDraw=function(){var r=this,n=new Qg.Map;return this.datasets().forEach(function(i){var o=i.data();if(!r._croppedRenderingEnabled&&!r._downsamplingEnabled){n.set(i,[o]);return}for(var a=[],s=o.length,l=0;l<s;l++)a[l]=l;r._croppedRenderingEnabled&&(a=r._filterCroppedRendering(i,a)),r._downsamplingEnabled&&(a=r._filterDownsampling(i,a)),r._collapseDenseVerticalLinesEnabled&&(a=r._filterDenseLines(i,a));for(var c=[],u=a.length,l=0;l<u;l++){var h=a[l];c[l]=o[h]}n.set(i,[c])}),n},t.prototype._filterCroppedRendering=function(r,n){for(var i=this,o=vl.Plot._scaledAccessor(this.x()),a=vl.Plot._scaledAccessor(this.y()),s=r.data(),l=[],c=function(x,b){return Qg.Math.inRange(x,0,i.width())&&Qg.Math.inRange(b,0,i.height())},u=0;u<n.length;u++){var h=o(s[n[u]],n[u],r),f=a(s[n[u]],n[u],r),p=c(h,f);if(!p&&n[u-1]!=null&&s[n[u-1]]!=null){var d=o(s[n[u-1]],n[u-1],r),g=a(s[n[u-1]],n[u-1],r);p=p||c(d,g)}if(!p&&n[u+1]!=null&&s[n[u+1]]!=null){var _=o(s[n[u+1]],n[u+1],r),y=a(s[n[u+1]],n[u+1],r);p=p||c(_,y)}p&&l.push(n[u])}return l},t.prototype._filterDownsampling=function(r,n){if(n.length===0)return[];for(var i=r.data(),o=vl.Plot._scaledAccessor(this.x()),a=vl.Plot._scaledAccessor(this.y()),s=[n[0]],l=function(k,O){var D=o(i[n[k]],n[k],r),B=a(i[n[k]],n[k],r),I=o(i[n[k+1]],n[k+1],r),L=a(i[n[k+1]],n[k+1],r);if(O===1/0)return Math.floor(D)===Math.floor(I);var R=B+(I-D)*O;return Math.floor(L)===Math.floor(R)},c=0;c<n.length-1;){for(var u=n[c],h=o(i[n[c]],n[c],r),f=a(i[n[c]],n[c],r),p=o(i[n[c+1]],n[c+1],r),d=a(i[n[c+1]],n[c+1],r),g=Math.floor(h)===Math.floor(p)?1/0:(d-f)/(p-h),_=n[c],y=g===1/0?f:h,x=_,b=y,S=!0;c<n.length-1&&(S||l(c,g));){c++,S=!1;var C=g===1/0?a(i[n[c]],n[c],r):o(i[n[c]],n[c],r);C>b&&(b=C,x=n[c]),C<y&&(y=C,_=n[c])}var P=n[c];_!==u&&s.push(_),x!==_&&x!==u&&s.push(x),P!==u&&P!==_&&P!==x&&s.push(P)}return s},t.prototype._filterDenseLines=function(r,n){if(n.length===0)return[];var i=r.data(),o=vl.Plot._scaledAccessor(this.x()),a=vl.Plot._scaledAccessor(this.y()),s=function(c){return o(i[c],c,r)},l=function(c){return a(i[c],c,r)};return this._bucketByX(r,n,s,l)},t.prototype._bucketByX=function(r,n,i,o){for(var a=[],s=r.data(),l=null,c=n.length,u=0;u<=c;++u){var h=n[u];if(s[h]!=null){var f=Math.floor(i(h)),p=o(h);l==null?l=new Qg.Bucket(h,f,p):l.isInBucket(f)?l.addToBucket(p,h):(a.push.apply(a,l.getUniqueIndices()),l=new Qg.Bucket(h,f,p))}}return l!=null&&a.push.apply(a,l.getUniqueIndices()),a},t}(GVe.XYPlot);lB.Line=WVe});var Tat=H(Eat=>{"use strict";Object.defineProperty(Eat,"__esModule",{value:!0});var YVe=(de(),Ut(pe)),cB=(Er(),Ut(Mr)),jVe=ks(),_4=Fe(),Mat=Bv(),_Kt=mat(),XVe=Uu(),yKt=nB(),uB=IS(),$Ve=Sat(),Ds=rs(),KVe=function(e){YVe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("area-plot"),r.y0(0),r.attr("fill-opacity",.25),r.attr("fill",new jVe.Color().range()[0]),r._lineDrawers=new _4.Map,r}return t.prototype.y=function(r,n){if(r==null)return e.prototype.y.call(this);if(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),n!=null){var i=this.y0().accessor;i!=null&&this._bindProperty(t._Y0_KEY,i,n),this._updateYScale()}return this},t.prototype.y0=function(r){if(r==null)return this._propertyBindings.get(t._Y0_KEY);var n=this.y(),i=n&&n.scale;return this._bindProperty(t._Y0_KEY,r,i),this._updateYScale(),this.render(),this},t.prototype._onDatasetUpdate=function(){e.prototype._onDatasetUpdate.call(this),this._updateYScale()},t.prototype._addDataset=function(r){var n=this;return this._lineDrawers.set(r,new Mat.ProxyDrawer(function(){return new yKt.LineSVGDrawer},function(i){return new Mat.CanvasDrawer(i,yKt.makeLineCanvasDrawStep(function(){var o=Ds.Plot._scaledAccessor(n.x()),a=Ds.Plot._scaledAccessor(n.y());return n._d3LineFactory(r,o,a)}))})),e.prototype._addDataset.call(this,r),this},t.prototype._createNodesForDataset=function(r){e.prototype._createNodesForDataset.call(this,r);var n=this._lineDrawers.get(r);return this.renderer()==="svg"?n.useSVG(this._renderArea):n.useCanvas(this._canvas),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r),this._lineDrawers.get(r).remove()},t.prototype._additionalPaint=function(){var r=this,n=this._generateLineDrawSteps(),i=this._getDataToDraw();this.datasets().forEach(function(o){var a=Ds.Plot.applyDrawSteps(n,o);r._lineDrawers.get(o).draw(i.get(o),a)})},t.prototype._generateLineDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._generateLineAttrToProjector();n.d=this._constructLineProjector(Ds.Plot._scaledAccessor(this.x()),this._getResetYFunction()),r.push({attrToProjector:n,animator:this._getAnimator(uB.Animator.RESET)})}return r.push({attrToProjector:this._generateLineAttrToProjector(),animator:this._getAnimator(uB.Animator.MAIN)}),r},t.prototype._generateLineAttrToProjector=function(){var r=this._getAttrToProjector();return r.d=this._constructLineProjector(Ds.Plot._scaledAccessor(this.x()),Ds.Plot._scaledAccessor(this.y())),r},t.prototype._createDrawer=function(r){var n=this;return new XVe.ProxyDrawer(function(){return new _Kt.AreaSVGDrawer},function(i){return new Mat.CanvasDrawer(i,_Kt.makeAreaCanvasDrawStep(function(){var o=n._coordinateProjectors(),a=o[0],s=o[1],l=o[2],c=n._createDefinedProjector(a,s);return n._createAreaGenerator(a,s,l,c,r)},function(){var o=n._coordinateProjectors(),a=o[0],s=o[1],l=n._createDefinedProjector(a,s);return n._createTopLineGenerator(a,s,l,r)}))})},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector();n.d=this._constructAreaProjector(Ds.Plot._scaledAccessor(this.x()),this._getResetYFunction(),Ds.Plot._scaledAccessor(this.y0())),r.push({attrToProjector:n,animator:this._getAnimator(uB.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(uB.Animator.MAIN)}),r},t.prototype._updateYScale=function(){var r=this.getExtentsForProperty("y0"),n=_4.Array.flatten(r),i=_4.Array.uniq(n),o=i.length===1?i[0]:null,a=this.y(),s=a&&a.scale;s!=null&&(this._constantBaselineValueProvider!=null&&(s.removePaddingExceptionsProvider(this._constantBaselineValueProvider),this._constantBaselineValueProvider=null),o!=null&&(this._constantBaselineValueProvider=function(){return[o]},s.addPaddingExceptionsProvider(this._constantBaselineValueProvider)))},t.prototype._getResetYFunction=function(){return Ds.Plot._scaledAccessor(this.y0())},t.prototype._coordinateProjectors=function(){return[Ds.Plot._scaledAccessor(this.x()),Ds.Plot._scaledAccessor(this.y()),Ds.Plot._scaledAccessor(this.y0())]},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=this._coordinateProjectors(),i=n[0],o=n[1],a=n[2];return r.d=this._constructAreaProjector(i,o,a),r},t.prototype.selections=function(r){var n=this;if(r===void 0&&(r=this.datasets()),this.renderer()==="canvas")return cB.selectAll();var i=e.prototype.selections.call(this,r).nodes(),o=r.map(function(a){return n._lineDrawers.get(a)}).filter(function(a){return a!=null});return o.forEach(function(a){return i.push.apply(i,a.getVisualPrimitives())}),cB.selectAll(i)},t.prototype._constructAreaProjector=function(r,n,i){var o=this,a=this._createDefinedProjector(Ds.Plot._scaledAccessor(this.x()),Ds.Plot._scaledAccessor(this.y()));return function(s,l,c){var u=o._createAreaGenerator(r,n,i,a,c);return u(s)}},t.prototype._createDefinedProjector=function(r,n){return function(i,o,a){var s=r(i,o,a),l=n(i,o,a);return _4.Math.isValidNumber(s)&&_4.Math.isValidNumber(l)}},t.prototype._createAreaGenerator=function(r,n,i,o,a){var s=this._getCurveFactory(),l=cB.area().x(function(c,u){return r(c,u,a)}).y1(function(c,u){return n(c,u,a)}).y0(function(c,u){return i(c,u,a)}).curve(s).defined(function(c,u){return o(c,u,a)});return l},t.prototype._createTopLineGenerator=function(r,n,i,o){var a=this._getCurveFactory(),s=cB.line().x(function(l,c){return r(l,c,o)}).y(function(l,c){return n(l,c,o)}).curve(a).defined(function(l,c){return i(l,c,o)});return s},t._Y0_KEY="y0",t}($Ve.Line);Eat.Area=KVe});var y4=H(Gu=>{"use strict";Object.defineProperty(Gu,"__esModule",{value:!0});var ZVe=(de(),Ut(pe)),Aat=(Er(),Ut(Mr)),Cat=_l(),JVe=Lf(),QVe=Bu(),tUe=Bv(),eUe=Uu(),rUe=oB(),nUe=CS(),Pat=ks(),vKt=vd(),xl=Fe(),Lat=If(),xKt=IS(),hB=rs(),iUe=Hv();Gu.BarOrientation=Lat.makeEnum(["vertical","horizontal"]);Gu.LabelsPosition=Lat.makeEnum(["start","middle","end","outside"]);Gu.BarAlignment=Lat.makeEnum(["start","middle","end"]);var Iat=function(e){ZVe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this)||this;if(n._labelFormatter=QVe.identity(),n._labelsEnabled=!1,n._labelsPosition=Gu.LabelsPosition.end,n._hideBarsIfAnyAreTooWide=!0,n._barAlignment="middle",n._computeBarPixelThickness=nUe.memoize(oUe),n._fixedBarPixelThickness=!0,n.addClass("bar-plot"),r!=="vertical"&&r!=="horizontal")throw new Error(r+" is not a valid orientation for Plots.Bar");return n._isVertical=r==="vertical",n.animator("baseline",new JVe.Null),n.attr("fill",new Pat.Color().range()[0]),n.attr(t._BAR_THICKNESS_KEY,function(){return n._barPixelThickness()}),n._labelConfig=new xl.Map,n._baselineValueProvider=function(){return[n.baselineValue()]},n}return t.prototype.computeLayout=function(r,n,i){return e.prototype.computeLayout.call(this,r,n,i),this._updateExtents(),this},t.prototype.x=function(r,n){return r==null?e.prototype.x.call(this):(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n),this._updateThicknessAttr(),this._updateLengthScale(),this)},t.prototype.y=function(r,n){return r==null?e.prototype.y.call(this):(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),this._updateLengthScale(),this)},t.prototype.length=function(){return this._isVertical?this.y():this.x()},t.prototype.position=function(){return this._isVertical?this.x():this.y()},t.prototype.barEnd=function(r){if(r==null)return this._propertyBindings.get(t._BAR_END_KEY);var n=this.position(),i=n&&n.scale;return this._bindProperty(t._BAR_END_KEY,r,i),this._updateThicknessAttr(),this._updateLengthScale(),this.render(),this},t.prototype.barAlignment=function(r){return r==null?this._barAlignment:(this._barAlignment=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype.orientation=function(){return this._isVertical?"vertical":"horizontal"},t.prototype._createDrawer=function(){return new eUe.ProxyDrawer(function(){return new rUe.RectangleSVGDrawer(t._BAR_AREA_CLASS)},function(r){return new tUe.RectangleCanvasDrawer(r)})},t.prototype._setup=function(){e.prototype._setup.call(this),this._baseline=this._renderArea.append("line").classed("baseline",!0)},t.prototype.baselineValue=function(r){if(r==null){if(this._baselineValue!=null)return this._baselineValue;if(!this._projectorsReady())return 0;var n=this.length().scale;return n&&n instanceof Pat.Time?new Date(0):0}return this._baselineValue=r,this._updateLengthScale(),this._clearAttrToProjectorCache(),this.render(),this},t.prototype.addDataset=function(r){return e.prototype.addDataset.call(this,r),this},t.prototype._addDataset=function(r){return e.prototype._addDataset.call(this,r),this},t.prototype.removeDataset=function(r){return e.prototype.removeDataset.call(this,r),this},t.prototype._removeDataset=function(r){return e.prototype._removeDataset.call(this,r),this},t.prototype.datasets=function(r){return r==null?e.prototype.datasets.call(this):(e.prototype.datasets.call(this,r),this)},t.prototype.labelsEnabled=function(r,n){return r==null?this._labelsEnabled:(this._labelsEnabled=r,n!=null&&(this._labelsPosition=n),this._clearAttrToProjectorCache(),this.render(),this)},t.prototype.labelFormatter=function(r){return r==null?this._labelFormatter:(this._labelFormatter=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r),i=this._renderArea.append("g").classed(t._LABEL_AREA_CLASS,!0),o=new Cat.SvgContext(i.node()),a=new Cat.CacheMeasurer(o),s=new Cat.Writer(a,o);return this._labelConfig.set(r,{labelArea:i,measurer:a,writer:s}),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r);var n=this._labelConfig.get(r);n!=null&&(n.labelArea.remove(),this._labelConfig.delete(r))},t.prototype.entityNearest=function(r){var n=this,i=function(){var o=n._isVertical?n._getEntityStore().entityNearestX(r):n._getEntityStore().entityNearestY(r);return o===void 0?void 0:n._lightweightPlotEntityToPlotEntity(o)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesAt=function(r){var n=this,i=function(){return n._entitiesIntersecting(r.x,r.y)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInXBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInXBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype.entitiesInYBounds=function(r){var n=this,i=function(){return e.prototype.entitiesInYBounds.call(n,r)};return this._fixedBarPixelThickness?this._computeBarPixelThickness.doLocked(i):i()},t.prototype._entitiesIntersecting=function(r,n){for(var i=[],o=this._getEntityStore().entities(),a=o.length,s=0;s<a;s++){var l=o[s];xl.DOM.intersectsBBox(r,n,this._entityBounds(l))&&i.push(this._lightweightPlotEntityToPlotEntity(l))}return i},t.prototype._updateLengthScale=function(){if(!!this._projectorsReady()){var r=this.length().scale;r instanceof vKt.QuantitativeScale&&(r.addPaddingExceptionsProvider(this._baselineValueProvider),r.addIncludedValuesProvider(this._baselineValueProvider))}},t.prototype.renderImmediately=function(){var r=this;return this._barPixelThickness(),this._computeBarPixelThickness.doLocked(function(){return e.prototype.renderImmediately.call(r)})},t.prototype._additionalPaint=function(r){var n=this,i=this.length().scale,o=i.scale(this.baselineValue()),a={x1:this._isVertical?0:o,y1:this._isVertical?o:0,x2:this._isVertical?this.width():o,y2:this._isVertical?o:this.height()};this._getAnimator("baseline").animate(this._baseline,a),this.datasets().forEach(function(s){return n._labelConfig.get(s).labelArea.selectAll("g").remove()}),this._labelsEnabled&&xl.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype.getExtentsForProperty=function(r){var n=this,i=e.prototype.getExtentsForProperty.call(this,r),o;if(r==="x"&&this._isVertical)o=this.x();else if(r==="y"&&!this._isVertical)o=this.y();else return i;if(!(o&&o.scale&&o.scale instanceof vKt.QuantitativeScale))return i;var a=o.scale,s=this._barPixelThickness();return i=i.map(function(l){return Aat.extent([a.invert(n._getPositionAttr(a.scale(l[0]),s)),a.invert(n._getPositionAttr(a.scale(l[0]),s)+s),a.invert(n._getPositionAttr(a.scale(l[1]),s)),a.invert(n._getPositionAttr(a.scale(l[1]),s)+s)])}),i},t.prototype._getPositionAttr=function(r,n){switch(this._isVertical||(r-=n,n*=-1),this._barAlignment){case"start":return r;case"end":return r-n;case"middle":default:return r-n/2}},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw(),i=this._getAttrToProjector(),o=this.datasets().some(function(a){return n.get(a).some(function(s,l){return s==null?!1:r._drawLabel(s,l,a,i)})});this._hideBarsIfAnyAreTooWide&&o&&this.datasets().forEach(function(a){return r._labelConfig.get(a).labelArea.selectAll("g").remove()})},t.prototype._drawLabel=function(r,n,i,o){var a=this._labelConfig.get(i),s=a.labelArea,l=a.measurer,c=a.writer,u=this.length().accessor,h=u(r,n,i),f=this.length().scale,p=f!=null?f.scale(h):h,d=f!=null?f.scale(this.baselineValue()):this.baselineValue(),g={x:o.x(r,n,i),y:o.y(r,n,i)},_={width:o.width(r,n,i),height:o.height(r,n,i)},y=this._labelFormatter(h,r,n,i),x=l.measure(y),b=this._shouldShowLabelOnBar(g,_,x),S=this._isVertical?p<=d:p<d,C=this._calculateLabelProperties(g,_,x,b,S),P=C.containerDimensions,k=C.labelContainerOrigin,O=C.labelOrigin,D=C.alignment,B=o.fill(r,n,i),I=this._createLabelContainer(s,k,O,x,b,B),L={xAlign:D.x,yAlign:D.y};c.write(y,P.width,P.height,L,I.node());var R=this._isVertical?_.width<x.width:_.height<x.height;return R},t.prototype._shouldShowLabelOnBar=function(r,n,i){if(this._labelsPosition===Gu.LabelsPosition.outside)return!1;var o=this._isVertical?r.y:r.x,a=this._isVertical?n.height:n.width,s=this._isVertical?this.height():this.width(),l=this._isVertical?i.height:i.width,c=o+a,u=a;return c>s?u=s-o:o<0&&(u=c),l+t._LABEL_MARGIN_INSIDE_BAR<=u},t.prototype._calculateLabelProperties=function(r,n,i,o,a){var s=this,l=this._isVertical?r.y:r.x,c=this._isVertical?n.height:n.width,u=this._isVertical?i.height:i.width,h="center",f=c,p=l,d=l,g=function(_){switch(_){case"topLeft":h=s._isVertical?"top":"left",p+=t._LABEL_MARGIN_INSIDE_BAR,d+=t._LABEL_MARGIN_INSIDE_BAR;return;case"center":d+=(c+u)/2;return;case"bottomRight":h=s._isVertical?"bottom":"right",p-=t._LABEL_MARGIN_INSIDE_BAR,d+=f-t._LABEL_MARGIN_INSIDE_BAR-u;return}};if(o)switch(this._labelsPosition){case Gu.LabelsPosition.start:g(a?"bottomRight":"topLeft");break;case Gu.LabelsPosition.middle:g("center");break;case Gu.LabelsPosition.end:g(a?"topLeft":"bottomRight");break}else a?(h=this._isVertical?"top":"left",f=c+t._LABEL_MARGIN_INSIDE_BAR+u,p-=t._LABEL_MARGIN_INSIDE_BAR+u,d-=t._LABEL_MARGIN_INSIDE_BAR+u):(h=this._isVertical?"bottom":"right",f=c+t._LABEL_MARGIN_INSIDE_BAR+u,d+=c+t._LABEL_MARGIN_INSIDE_BAR);return{containerDimensions:{width:this._isVertical?n.width:f,height:this._isVertical?f:n.height},labelContainerOrigin:{x:this._isVertical?r.x:p,y:this._isVertical?p:r.y},labelOrigin:{x:this._isVertical?r.x+n.width/2-i.width/2:d,y:this._isVertical?d:r.y+n.height/2-i.height/2},alignment:{x:this._isVertical?"center":h,y:this._isVertical?h:"center"}}},t.prototype._createLabelContainer=function(r,n,i,o,a,s){var l=r.append("g").attr("transform","translate("+n.x+", "+n.y+")");if(a){l.classed("on-bar-label",!0);var c=xl.Color.contrast("white",s)*1.6<xl.Color.contrast("black",s);l.classed(c?"dark-label":"light-label",!0)}else l.classed("off-bar-label",!0);return l},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector(),i=this.length().scale,o=i.scale(this.baselineValue()),a=this._isVertical?"y":"x",s=this._isVertical?"height":"width";n[a]=function(){return o},n[s]=function(){return 0},r.push({attrToProjector:n,animator:this._getAnimator(xKt.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(xKt.Animator.MAIN)}),r},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this.length().scale,o=i.scale(this.baselineValue()),a=this._isVertical?"y":"x",s=this._isVertical?"x":"y",l=hB.Plot._scaledAccessor(this.position()),c=hB.Plot._scaledAccessor(this.length()),u=function(d,g,_){return Math.abs(o-c(d,g,_))},h=n[t._BAR_THICKNESS_KEY],f=n.gap,p=f==null?h:function(d,g,_){var y=h(d,g,_);return y<t._BAR_GAPLESS_THRESHOLD_PX?y:y-f(d,g,_)};return n.width=this._isVertical?p:u,n.height=this._isVertical?u:p,n[a]=function(d,g,_){var y=c(d,g,_);return y>o?o:y},n[s]=function(d,g,_){return r._getPositionAttr(l(d,g,_),h(d,g,_))},n},t.prototype._updateThicknessAttr=function(){var r=this,n=this.position(),i=this.barEnd();n!=null&&i!=null?(this._fixedBarPixelThickness=!1,this.attr(t._BAR_THICKNESS_KEY,function(o,a,s){var l=n.accessor(o,a,s),c=i.accessor(o,a,s);return l=n.scale?n.scale.scale(l):l,c=i.scale?i.scale.scale(c):c,Math.abs(c-l)})):(this._fixedBarPixelThickness=!0,this.attr(t._BAR_THICKNESS_KEY,function(){return r._barPixelThickness()}))},t.prototype._barPixelThickness=function(){return this._fixedBarPixelThickness&&this._projectorsReady()?this._computeBarPixelThickness(this.position(),this.datasets(),this._isVertical?this.width():this.height()):0},t.prototype.entities=function(r){if(r===void 0&&(r=this.datasets()),!this._projectorsReady())return[];var n=e.prototype.entities.call(this,r);return n},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset;return this._pixelBounds(n,i,o)},t.prototype._pixelBounds=function(r,n,i){var o=this._getAttrToProjector();return{x:o.x(r,n,i),y:o.y(r,n,i),width:o.width(r,n,i),height:o.height(r,n,i)}},t.prototype._pixelPoint=function(r,n,i){var o=this._pixelBounds(r,n,i),a=(this._isVertical?hB.Plot._scaledAccessor(this.y()):hB.Plot._scaledAccessor(this.x()))(r,n,i),s=(this._isVertical?this.y().scale:this.x().scale).scale(this.baselineValue());return this._pixelPointBar(a,s,o)},t.prototype._pixelPointBar=function(r,n,i){var o,a;return this._isVertical?(o=i.x+i.width/2,a=r<=n?i.y:i.y+i.height):(o=r>=n?i.x+i.width:i.x,a=i.y+i.height/2),{x:o,y:a}},t.prototype._uninstallScaleForKey=function(r,n){e.prototype._uninstallScaleForKey.call(this,r,n)},t.prototype._getDataToDraw=function(){var r=this,n=new xl.Map,i=this._getAttrToProjector(),o=this.width(),a=this.height();return this.datasets().forEach(function(s){var l=s.data().map(function(c,u){var h=r._isDatumOnScreen(i,o,a,c,u,s);return h?c:null});n.set(s,l)}),n},t.prototype._isDatumOnScreen=function(r,n,i,o,a,s){var l=r.x(o,a,s),c=r.y(o,a,s),u=r.width(o,a,s),h=r.height(o,a,s),f=xl.Math.isValidNumber(l)&&xl.Math.isValidNumber(c)&&xl.Math.isValidNumber(u)&&xl.Math.isValidNumber(h);return f?xl.Math.boundsIntersects(l,c,u,h,0,0,n,i):!1},t.prototype.invalidateCache=function(){var r=this;e.prototype.invalidateCache.call(this),this.datasets().forEach(function(n){return r._labelConfig.get(n).measurer.reset()})},t._BAR_THICKNESS_RATIO=.95,t._BAR_GAPLESS_THRESHOLD_PX=3,t._SINGLE_BAR_DIMENSION_RATIO=.4,t._BAR_AREA_CLASS="bar-area",t._BAR_END_KEY="barEnd",t._BAR_THICKNESS_KEY="width",t._LABEL_AREA_CLASS="bar-label-text-area",t._LABEL_MARGIN_INSIDE_BAR=10,t}(iUe.XYPlot);Gu.Bar=Iat;function oUe(e,t,r){var n,i=e.scale;if(i instanceof Pat.Category)n=i.rangeBand();else{var o=e.accessor,a=Aat.set(xl.Array.flatten(t.map(function(c){return c.data().map(function(u,h){return o(u,h,c)}).filter(function(u){return u!=null}).map(function(u){return u.valueOf()})}))).values().map(function(c){return+c});a.sort(function(c,u){return c-u});var s=a.map(function(c){return i.scale(c)}),l=Aat.pairs(s);n=xl.Math.min(l,function(c,u){return Math.abs(c[1]-c[0])},r*Iat._SINGLE_BAR_DIMENSION_RATIO),n*=Iat._BAR_THICKNESS_RATIO}return n}});var wKt=H(kat=>{"use strict";Object.defineProperty(kat,"__esModule",{value:!0});var aUe=(de(),Ut(pe)),sUe=ks(),lUe=Fe(),bKt=y4(),cUe=rs(),uUe=function(e){aUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._clusterOffsets=new lUe.Map,n}return t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this._makeInnerScale(),o=function(l,c){return i.rangeBand()};n.width=this._isVertical?o:n.width,n.height=this._isVertical?n.height:o;var a=n.x,s=n.y;return n.x=this._isVertical?function(l,c,u){return a(l,c,u)+r._clusterOffsets.get(u)}:function(l,c,u){return a(l,c,u)},n.y=this._isVertical?function(l,c,u){return s(l,c,u)}:function(l,c,u){return s(l,c,u)+r._clusterOffsets.get(u)},n},t.prototype._updateClusterPosition=function(){var r=this,n=this._makeInnerScale();this.datasets().forEach(function(i,o){return r._clusterOffsets.set(i,n.scale(String(o))-n.rangeBand()/2)})},t.prototype._makeInnerScale=function(){var r=new sUe.Category;r.domain(this.datasets().map(function(i,o){return String(o)}));var n=cUe.Plot._scaledAccessor(this.attr(bKt.Bar._BAR_THICKNESS_KEY));return r.range([0,n(null,0,null)]),r},t.prototype._getDataToDraw=function(){return this._updateClusterPosition(),e.prototype._getDataToDraw.call(this)},t}(bKt.Bar);kat.ClusteredBar=uUe});var SKt=H(Nat=>{"use strict";Object.defineProperty(Nat,"__esModule",{value:!0});var hUe=(de(),Ut(pe)),v4=(Er(),Ut(Mr)),Rat=_l(),fUe=Lf(),pUe=Bu(),dUe=ks(),Vv=Fe(),mUe=fat(),gUe=dat(),_Ue=Uu(),yUe=AF(),Md=rs(),vUe=function(e){hUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._startAngle=0,r._endAngle=2*Math.PI,r._labelFormatter=pUe.identity(),r._labelsEnabled=!1,r.innerRadius(0),r.outerRadius(function(){var n=r._pieCenter();return Math.min(Math.max(r.width()-n.x,n.x),Math.max(r.height()-n.y,n.y))}),r.addClass("pie-plot"),r.attr("fill",function(n,i){return String(i)},new dUe.Color),r._strokeDrawers=new Vv.Map,r}return t.prototype._setup=function(){var r=this;e.prototype._setup.call(this),this._strokeDrawers.forEach(function(n){return n.attachTo(r._renderArea)})},t.prototype.computeLayout=function(r,n,i){e.prototype.computeLayout.call(this,r,n,i);var o=this._pieCenter();this._renderArea.attr("transform","translate("+o.x+","+o.y+")");var a=Math.min(Math.max(this.width()-o.x,o.x),Math.max(this.height()-o.y,o.y));return this.innerRadius().scale!=null&&this.innerRadius().scale.range([0,a]),this.outerRadius().scale!=null&&this.outerRadius().scale.range([0,a]),this},t.prototype.addDataset=function(r){return e.prototype.addDataset.call(this,r),this},t.prototype._addDataset=function(r){if(this.datasets().length===1)return Vv.Window.warn("Only one dataset is supported in Pie plots"),this;this._updatePieAngles(),e.prototype._addDataset.call(this,r);var n=new gUe.ArcOutlineSVGDrawer;return this._isSetup&&n.attachTo(this._renderArea),this._strokeDrawers.set(r,n),this},t.prototype.removeDataset=function(r){return e.prototype.removeDataset.call(this,r),this},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r),this._strokeDrawers.get(r).remove()},t.prototype._removeDataset=function(r){return e.prototype._removeDataset.call(this,r),this._strokeDrawers.delete(r),this._startAngles=[],this._endAngles=[],this},t.prototype.selections=function(r){var n=this;r===void 0&&(r=this.datasets());var i=e.prototype.selections.call(this,r).nodes();return r.forEach(function(o){var a=n._strokeDrawers.get(o);a!=null&&i.push.apply(i,a.getVisualPrimitives())}),v4.selectAll(i)},t.prototype._onDatasetUpdate=function(){e.prototype._onDatasetUpdate.call(this),this._updatePieAngles(),this.render()},t.prototype._createDrawer=function(){return new _Ue.ProxyDrawer(function(){return new mUe.ArcSVGDrawer},function(){return yUe.warn("canvas renderer is not supported on Pie Plot!"),null})},t.prototype.entities=function(r){var n=this;r===void 0&&(r=this.datasets());var i=e.prototype.entities.call(this,r);return i.map(function(o){o.position.x+=n.width()/2,o.position.y+=n.height()/2;var a=v4.select(n._strokeDrawers.get(o.dataset).getVisualPrimitiveAtIndex(o.index)),s=o;return s.strokeSelection=a,s})},t.prototype.sectorValue=function(r,n){return r==null?this._propertyBindings.get(t._SECTOR_VALUE_KEY):(this._bindProperty(t._SECTOR_VALUE_KEY,r,n),this._updatePieAngles(),this.render(),this)},t.prototype.innerRadius=function(r,n){return r==null?this._propertyBindings.get(t._INNER_RADIUS_KEY):(this._bindProperty(t._INNER_RADIUS_KEY,r,n),this.render(),this)},t.prototype.outerRadius=function(r,n){return r==null?this._propertyBindings.get(t._OUTER_RADIUS_KEY):(this._bindProperty(t._OUTER_RADIUS_KEY,r,n),this.render(),this)},t.prototype.startAngle=function(r){return r==null?this._startAngle:(this._startAngle=r,this._updatePieAngles(),this.render(),this)},t.prototype.endAngle=function(r){return r==null?this._endAngle:(this._endAngle=r,this._updatePieAngles(),this.render(),this)},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this.render(),this)},t.prototype.labelFormatter=function(r){return r==null?this._labelFormatter:(this._labelFormatter=r,this.render(),this)},t.prototype.entitiesAt=function(r){var n={x:this.width()/2,y:this.height()/2},i={x:r.x-n.x,y:r.y-n.y},o=this._sliceIndexForPoint(i);return o==null?[]:[this.entities()[o]]},t.prototype._propertyProjectors=function(){var r=this,n=e.prototype._propertyProjectors.call(this),i=Md.Plot._scaledAccessor(this.innerRadius()),o=Md.Plot._scaledAccessor(this.outerRadius());return n.d=function(a,s,l){return v4.arc().innerRadius(i(a,s,l)).outerRadius(o(a,s,l)).startAngle(r._startAngles[s]).endAngle(r._endAngles[s])(a,s)},n},t.prototype._updatePieAngles=function(){if(this.sectorValue()!=null&&this.datasets().length!==0){var r=Md.Plot._scaledAccessor(this.sectorValue()),n=this.datasets()[0],i=this._getDataToDraw().get(n),o=v4.pie().sort(null).startAngle(this._startAngle).endAngle(this._endAngle).value(function(a,s){return r(a,s,n)})(i);this._startAngles=o.map(function(a){return a.startAngle}),this._endAngles=o.map(function(a){return a.endAngle})}},t.prototype._pieCenter=function(){var r=this._startAngle<this._endAngle?this._startAngle:this._endAngle,n=this._startAngle<this._endAngle?this._endAngle:this._startAngle,i=Math.sin(r),o=Math.cos(r),a=Math.sin(n),s=Math.cos(n),l,c,u,h;return i>=0&&a>=0?o>=0&&s>=0?(l=o,c=0,h=0,u=a):o<0&&s<0?(l=0,c=-s,h=0,u=i):o>=0&&s<0?(l=o,c=-s,h=0,u=i):o<0&&s>=0&&(l=1,c=1,h=1,u=Math.max(i,a)):i>=0&&a<0?o>=0&&s>=0?(l=Math.max(o,s),c=1,h=1,u=1):o<0&&s<0?(l=0,c=1,h=-a,u=i):o>=0&&s<0?(l=o,c=1,h=-a,u=1):o<0&&s>=0&&(l=s,c=1,h=1,u=i):i<0&&a>=0?o>=0&&s>=0?(l=1,c=0,h=-i,u=a):o<0&&s<0?(l=1,c=Math.max(-o,-s),h=1,u=1):o>=0&&s<0?(l=1,c=-s,h=-i,u=1):o<0&&s>=0&&(l=1,c=-o,h=1,u=a):i<0&&a<0&&(o>=0&&s>=0?(l=s,c=0,h=-i,u=0):o<0&&s<0?(l=0,c=-o,h=-a,u=0):o>=0&&s<0?(l=1,c=1,h=Math.max(o,-s),u=1):o<0&&s>=0&&(l=s,c=-o,h=1,u=0)),{x:h+u==0?0:h/(h+u)*this.width(),y:l+c==0?0:l/(l+c)*this.height()}},t.prototype._getDataToDraw=function(){var r=e.prototype._getDataToDraw.call(this);if(this.datasets().length===0)return r;var n=Md.Plot._scaledAccessor(this.sectorValue()),i=this.datasets()[0],o=r.get(i),a=o.filter(function(s,l){return t._isValidData(n(s,l,i))});return r.set(i,a),r},t._isValidData=function(r){return Vv.Math.isValidNumber(r)&&r>=0},t.prototype._pixelPoint=function(r,n,i){var o=Md.Plot._scaledAccessor(this.sectorValue());if(!t._isValidData(o(r,n,i)))return{x:NaN,y:NaN};var a=Md.Plot._scaledAccessor(this.innerRadius())(r,n,i),s=Md.Plot._scaledAccessor(this.outerRadius())(r,n,i),l=(a+s)/2,c=v4.pie().sort(null).value(function(p,d){var g=o(p,d,i);return t._isValidData(g)?g:0}).startAngle(this._startAngle).endAngle(this._endAngle)(i.data()),u=c[n].startAngle,h=c[n].endAngle,f=(u+h)/2;return{x:l*Math.sin(f),y:-l*Math.cos(f)}},t.prototype._additionalPaint=function(r){var n=this;this._renderArea.select(".label-area").remove(),this._labelsEnabled&&Vv.Window.setTimeout(function(){return n._drawLabels()},r);var i=this._generateStrokeDrawSteps(),o=this._getDataToDraw();this.datasets().forEach(function(a){var s=Md.Plot.applyDrawSteps(i,a);n._strokeDrawers.get(a).draw(o.get(a),s)})},t.prototype._generateStrokeDrawSteps=function(){var r=this._getAttrToProjector();return[{attrToProjector:r,animator:new fUe.Null}]},t.prototype._sliceIndexForPoint=function(r){var n=Math.sqrt(Math.pow(r.x,2)+Math.pow(r.y,2)),i=Math.acos(-r.y/n);r.x<0&&(i=Math.PI*2-i);for(var o,a=0;a<this._startAngles.length;a++)if(this._startAngles[a]<i&&this._endAngles[a]>i){o=a;break}if(o!==void 0){var s=this.datasets()[0],l=s.data()[o],c=this.innerRadius().accessor(l,o,s),u=this.outerRadius().accessor(l,o,s);if(n>c&&n<u)return o}return null},t.prototype._drawLabels=function(){for(var r=this,n=this._getAttrToProjector(),i=this._renderArea.append("g").classed("label-area",!0),o=new Rat.SvgContext(i.node()),a=new Rat.CacheMeasurer(o),s=new Rat.Writer(a,o),l=this.datasets()[0],c=this._getDataToDraw().get(l),u=c.length,h=function(d){var g=c[d],_=f.sectorValue().accessor(g,d,l);if(!Vv.Math.isValidNumber(_))return"continue";_=f._labelFormatter(_,g,d,l);var y=a.measure(_),x=(f._endAngles[d]+f._startAngles[d])/2,b=f.outerRadius().accessor(g,d,l);f.outerRadius().scale&&(b=f.outerRadius().scale.scale(b));var S=f.innerRadius().accessor(g,d,l);f.innerRadius().scale&&(S=f.innerRadius().scale.scale(S));var C=(b+S)/2,P=Math.sin(x)*C-y.width/2,k=-Math.cos(x)*C-y.height/2,O=[{x:P,y:k},{x:P,y:k+y.height},{x:P+y.width,y:k},{x:P+y.width,y:k+y.height}],D=O.every(function(z){return Math.abs(z.x)<=r.width()/2&&Math.abs(z.y)<=r.height()/2});if(D){var B=O.map(function(z){return r._sliceIndexForPoint(z)});D=B.every(function(z){return z===d})}var I=n.fill(g,d,l),L=Vv.Color.contrast("white",I)*1.6<Vv.Color.contrast("black",I),R=i.append("g").attr("transform","translate("+P+","+k+")"),F=L?"dark-label":"light-label";R.classed(F,!0),R.style("visibility",D?"inherit":"hidden"),s.write(_,y.width,y.height,{xAlign:"center",yAlign:"center"},R.node())},f=this,p=0;p<u;p++)h(p)},t._INNER_RADIUS_KEY="inner-radius",t._OUTER_RADIUS_KEY="outer-radius",t._SECTOR_VALUE_KEY="sector-value",t}(Md.Plot);Nat.Pie=vUe});var MKt=H(Oat=>{"use strict";Object.defineProperty(Oat,"__esModule",{value:!0});var xUe=(de(),Ut(pe)),bUe=(Er(),Ut(Mr)),Dat=_l(),wUe=Lf(),SUe=Bv(),MUe=Uu(),EUe=oB(),fB=ks(),Oc=Fe(),pB=rs(),TUe=Hv(),CUe=function(e){xUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._labelsEnabled=!1,r._label=null,r.animator("rectangles",new wUe.Null),r.addClass("rectangle-plot"),r.attr("fill",new fB.Color().range()[0]),r}return t.prototype._createDrawer=function(){return new MUe.ProxyDrawer(function(){return new EUe.RectangleSVGDrawer},function(r){return new SUe.RectangleCanvasDrawer(r)})},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=pB.Plot._scaledAccessor(this.x()),o=n[t._X2_KEY],a=pB.Plot._scaledAccessor(this.y()),s=n[t._Y2_KEY],l=this.x().scale,c=this.y().scale;return o!=null?(n.width=function(u,h,f){return Math.abs(o(u,h,f)-i(u,h,f))},n.x=function(u,h,f){return Math.min(o(u,h,f),i(u,h,f))}):(n.width=function(u,h,f){return r._rectangleWidth(l)},n.x=function(u,h,f){return i(u,h,f)-.5*n.width(u,h,f)}),s!=null?(n.height=function(u,h,f){return Math.abs(s(u,h,f)-a(u,h,f))},n.y=function(u,h,f){return Math.max(s(u,h,f),a(u,h,f))-n.height(u,h,f)}):(n.height=function(u,h,f){return r._rectangleWidth(c)},n.y=function(u,h,f){return a(u,h,f)-.5*n.height(u,h,f)}),delete n[t._X2_KEY],delete n[t._Y2_KEY],n},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:this._getAnimator("rectangles")}]},t.prototype._filterForProperty=function(r){return r==="x2"?e.prototype._filterForProperty.call(this,"x"):r==="y2"?e.prototype._filterForProperty.call(this,"y"):e.prototype._filterForProperty.call(this,r)},t.prototype.x=function(r,n,i){if(r==null)return e.prototype.x.call(this);if(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n,i),n!=null){var o=this.x2(),a=o&&o.accessor;a!=null&&this._bindProperty(t._X2_KEY,a,n,o.postScale)}return n instanceof fB.Category&&n.innerPadding(0).outerPadding(0),this},t.prototype.x2=function(r,n){if(r==null)return this._propertyBindings.get(t._X2_KEY);var i=this.x(),o=i&&i.scale;return this._bindProperty(t._X2_KEY,r,o,n),this.render(),this},t.prototype.y=function(r,n,i){if(r==null)return e.prototype.y.call(this);if(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n,i),n!=null){var o=this.y2(),a=o&&o.accessor;a!=null&&this._bindProperty(t._Y2_KEY,a,n,o.postScale)}return n instanceof fB.Category&&n.innerPadding(0).outerPadding(0),this},t.prototype.y2=function(r,n){if(r==null)return this._propertyBindings.get(t._Y2_KEY);var i=this.y(),o=i&&i.scale;return this._bindProperty(t._Y2_KEY,r,o,n),this.render(),this},t.prototype.entitiesAt=function(r){var n=this._getAttrToProjector();return this.entities().filter(function(i){var o=i.datum,a=i.index,s=i.dataset,l=n.x(o,a,s),c=n.y(o,a,s),u=n.width(o,a,s),h=n.height(o,a,s);return l<=r.x&&r.x<=l+u&&c<=r.y&&r.y<=c+h})},t.prototype._entityBounds=function(r){var n=r.datum,i=r.index,o=r.dataset;return this._entityBBox(n,i,o,this._getAttrToProjector())},t.prototype._entityBBox=function(r,n,i,o){return{x:o.x(r,n,i),y:o.y(r,n,i),width:o.width(r,n,i),height:o.height(r,n,i)}},t.prototype.label=function(r){return r==null?this._label:(this._label=r,this.render(),this)},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this.render(),this)},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return this.x2()!=null&&(r.x2=pB.Plot._scaledAccessor(this.x2())),this.y2()!=null&&(r.y2=pB.Plot._scaledAccessor(this.y2())),r},t.prototype._pixelPoint=function(r,n,i){var o=this._getAttrToProjector(),a=o.x(r,n,i),s=o.y(r,n,i),l=o.width(r,n,i),c=o.height(r,n,i),u=a+l/2,h=s+c/2;return{x:u,y:h}},t.prototype._rectangleWidth=function(r){if(r instanceof fB.Category)return r.rangeBand();var n=r===this.x().scale?this.x().accessor:this.y().accessor,i=bUe.set(Oc.Array.flatten(this.datasets().map(function(c){return c.data().map(function(u,h){return n(u,h,c).valueOf()})}))).values().map(function(c){return+c}),o=Oc.Math.min(i,0),a=Oc.Math.max(i,0),s=r.scale(o),l=r.scale(a);return(l-s)/Math.abs(a-o)},t.prototype._getDataToDraw=function(){var r=new Oc.Map,n=this._getAttrToProjector();return this.datasets().forEach(function(i){var o=i.data().map(function(a,s){var l=Oc.Math.isValidNumber(n.x(a,s,i))&&Oc.Math.isValidNumber(n.y(a,s,i))&&Oc.Math.isValidNumber(n.width(a,s,i))&&Oc.Math.isValidNumber(n.height(a,s,i));return l?a:null});r.set(i,o)}),r},t.prototype._additionalPaint=function(r){var n=this;this._renderArea.selectAll(".label-area").remove(),this._labelsEnabled&&this.label()!=null&&Oc.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw();this.datasets().forEach(function(i,o){return r._drawLabel(n,i,o)})},t.prototype._drawLabel=function(r,n,i){for(var o=this._getAttrToProjector(),a=this._renderArea.append("g").classed("label-area",!0),s=new Dat.SvgContext(a.node()),l=new Dat.CacheMeasurer(s),c=new Dat.Writer(l,s),u=this.x().scale.range(),h=this.y().scale.range(),f=Math.min.apply(null,u),p=Math.max.apply(null,u),d=Math.min.apply(null,h),g=Math.max.apply(null,h),_=r.get(n),y=_.length,x=0;x<y;x++){var b=_[x];if(b!=null){var S=""+this.label()(b,x,n),C=l.measure(S),P=o.x(b,x,n),k=o.y(b,x,n),O=o.width(b,x,n),D=o.height(b,x,n);if(C.height<=D&&C.width<=O){var B=(O-C.width)/2,I=(D-C.height)/2;P+=B,k+=I;var L={min:P,max:P+C.width},R={min:k,max:k+C.height};if(L.min<f||L.max>p||R.min<d||R.max>g||this._overlayLabel(L,R,x,i,r))continue;var F=o.fill(b,x,n),z=Oc.Color.contrast("white",F)*1.6<Oc.Color.contrast("black",F),U=a.append("g").attr("transform","translate("+P+","+k+")"),W=z?"dark-label":"light-label";U.classed(W,!0),c.write(S,C.width,C.height,{xAlign:"center",yAlign:"center"},U.node())}}}},t.prototype._overlayLabel=function(r,n,i,o,a){for(var s=this._getAttrToProjector(),l=this.datasets(),c=o;c<l.length;c++)for(var u=l[c],h=a.get(u),f=h.length,p=c===o?i+1:0;p<f;p++)if(Oc.DOM.intersectsBBox(r,n,this._entityBBox(h[p],p,u,s)))return!0;return!1},t._X2_KEY="x2",t._Y2_KEY="y2",t}(TUe.XYPlot);Oat.Rectangle=CUe});var TKt=H(Hat=>{"use strict";Object.defineProperty(Hat,"__esModule",{value:!0});var AUe=(de(),Ut(pe)),zat=_l(),PUe=Bu(),IUe=XF(),LUe=Uu(),EKt=vat(),kUe=Lf(),RUe=Bv(),NUe=ks(),Fat=Fe(),Bat=IS(),bl=rs(),DUe=Hv(),OUe=function(e){AUe.__extends(t,e);function t(){var r=e.call(this)||this;r._labelFormatter=PUe.identity(),r._labelsEnabled=!1,r.addClass("scatter-plot");var n=new kUe.Easing;n.startDelay(5),n.stepDuration(250),n.maxTotalDuration(bl.Plot._ANIMATION_MAX_DURATION),r.animator(Bat.Animator.MAIN,n),r.attr("opacity",.6),r.attr("fill",new NUe.Color().range()[0]),r.size(6);var i=IUe.circle();return r.symbol(function(){return i}),r._labelConfig=new Fat.Map,r}return t.prototype._buildLightweightPlotEntities=function(r){var n=this,i=e.prototype._buildLightweightPlotEntities.call(this,r);return i.map(function(o){var a=bl.Plot._scaledAccessor(n.size())(o.datum,o.index,o.dataset);return o.diameter=a,o})},t.prototype._createDrawer=function(r){var n=this;return new LUe.ProxyDrawer(function(){return new EKt.SymbolSVGDrawer},function(i){return new RUe.CanvasDrawer(i,EKt.makeSymbolCanvasDrawStep(r,function(){return bl.Plot._scaledAccessor(n.symbol())},function(){return bl.Plot._scaledAccessor(n.size())}))})},t.prototype.size=function(r,n){return r==null?this._propertyBindings.get(t._SIZE_KEY):(this._bindProperty(t._SIZE_KEY,r,n),this.render(),this)},t.prototype.symbol=function(r){return r==null?this._propertyBindings.get(t._SYMBOL_KEY):(this._propertyBindings.set(t._SYMBOL_KEY,{accessor:r}),this.render(),this)},t.prototype._generateDrawSteps=function(){var r=[];if(this._animateOnNextRender()){var n=this._getAttrToProjector(),i=bl.Plot._scaledAccessor(this.symbol());n.d=function(o,a,s){return i(o,a,s)(0)(null)},r.push({attrToProjector:n,animator:this._getAnimator(Bat.Animator.RESET)})}return r.push({attrToProjector:this._getAttrToProjector(),animator:this._getAnimator(Bat.Animator.MAIN)}),r},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=bl.Plot._scaledAccessor(this.x()),i=bl.Plot._scaledAccessor(this.y());return r.x=n,r.y=i,r.transform=function(o,a,s){return"translate("+n(o,a,s)+","+i(o,a,s)+")"},r.d=this._constructSymbolGenerator(),r},t.prototype._constructSymbolGenerator=function(){var r=bl.Plot._scaledAccessor(this.symbol()),n=bl.Plot._scaledAccessor(this.size());return function(i,o,a){return r(i,o,a)(n(i,o,a))(null)}},t.prototype._entityBounds=function(r){return{x:r.position.x-r.diameter/2,y:r.position.y-r.diameter/2,width:r.diameter,height:r.diameter}},t.prototype._entityVisibleOnPlot=function(r,n){var i={min:n.topLeft.x,max:n.bottomRight.x},o={min:n.topLeft.y,max:n.bottomRight.y},a=this._entityBounds(r);return Fat.DOM.intersectsBBox(i,o,a)},t.prototype.entitiesAt=function(r){var n=bl.Plot._scaledAccessor(this.x()),i=bl.Plot._scaledAccessor(this.y()),o=bl.Plot._scaledAccessor(this.size());return this.entities().filter(function(a){var s=a.datum,l=a.index,c=a.dataset,u=n(s,l,c),h=i(s,l,c),f=o(s,l,c);return u-f/2<=r.x&&r.x<=u+f/2&&h-f/2<=r.y&&r.y<=h+f/2})},t.prototype.labelsEnabled=function(r){return r==null?this._labelsEnabled:(this._labelsEnabled=r,this._clearAttrToProjectorCache(),this.render(),this)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r),i=this._renderArea.append("g").classed(t._LABEL_AREA_CLASS,!0),o=new zat.SvgContext(i.node()),a=new zat.CacheMeasurer(o),s=new zat.Writer(a,o);return this._labelConfig.set(r,{labelArea:i,measurer:a,writer:s}),n},t.prototype._removeDatasetNodes=function(r){e.prototype._removeDatasetNodes.call(this,r);var n=this._labelConfig.get(r);n!=null&&(n.labelArea.remove(),this._labelConfig.delete(r))},t.prototype._additionalPaint=function(r){var n=this;this.datasets().forEach(function(i){return n._labelConfig.get(i).labelArea.selectAll("g").remove()}),this._labelsEnabled&&Fat.Window.setTimeout(function(){return n._drawLabels()},r)},t.prototype._drawLabels=function(){var r=this,n=this._getDataToDraw(),i=this._getAttrToProjector();this.datasets().forEach(function(o){for(var a=n.get(o),s=a.length,l=0;l<s;l++){var c=a[l];c!=null&&r._drawLabel(c,l,o,i)}})},t.prototype._drawLabel=function(r,n,i,o){if(r.label!=null){var a=this._labelConfig.get(i),s=a.labelArea,l=a.measurer,c=a.writer,u={x:o.x(r,n,i),y:o.y(r,n,i)},h=bl.Plot._scaledAccessor(this.size()),f=h(r,n,i),p=this._labelFormatter(r.label,r,n,i),d=l.measure(p),g=this._calculateLabelProperties(u,f,d),_=g.containerDimensions,y=g.labelContainerOrigin,x=g.labelOrigin,b=g.alignment,S=this._createLabelContainer(s,y,x,d),C={xAlign:b.x,yAlign:b.y};c.write(p,_.width,_.height,C,S.node())}},t.prototype._calculateLabelProperties=function(r,n,i){var o=n<i.height?n/2+t._LABEL_MARGIN_FROM_BUBBLE:0;return{containerDimensions:{width:i.width,height:i.height},labelContainerOrigin:{x:r.x-i.width/2,y:r.y-i.height/2+o},labelOrigin:{x:r.x,y:r.y},alignment:{x:"center",y:"center"}}},t.prototype._createLabelContainer=function(r,n,i,o){var a=r.append("g").attr("transform","translate("+n.x+", "+n.y+")");return a.classed("on-bar-label",!0),a},t._SIZE_KEY="size",t._SYMBOL_KEY="symbol",t._LABEL_AREA_CLASS="scatter-label-text-area",t._LABEL_MARGIN_FROM_BUBBLE=15,t}(DUe.XYPlot);Hat.Scatter=OUe});var CKt=H(Vat=>{"use strict";Object.defineProperty(Vat,"__esModule",{value:!0});var zUe=(de(),Ut(pe)),FUe=Lf(),BUe=Uu(),HUe=_at(),VUe=ks(),UUe=AF(),LS=rs(),qUe=Hv(),GUe=function(e){zUe.__extends(t,e);function t(){var r=e.call(this)||this;return r.addClass("segment-plot"),r.attr("stroke",new VUe.Color().range()[0]),r.attr("stroke-width","2px"),r}return t.prototype._createDrawer=function(){return new BUe.ProxyDrawer(function(){return new HUe.SegmentSVGDrawer},function(){return UUe.warn("canvas renderer is not supported on Segment Plot!"),null})},t.prototype._generateDrawSteps=function(){return[{attrToProjector:this._getAttrToProjector(),animator:new FUe.Null}]},t.prototype._filterForProperty=function(r){return r==="x2"?e.prototype._filterForProperty.call(this,"x"):r==="y2"?e.prototype._filterForProperty.call(this,"y"):e.prototype._filterForProperty.call(this,r)},t.prototype.x=function(r,n){if(r==null)return e.prototype.x.call(this);if(n==null)e.prototype.x.call(this,r);else{e.prototype.x.call(this,r,n);var i=this.x2(),o=i&&i.accessor;o!=null&&this._bindProperty(t._X2_KEY,o,n)}return this},t.prototype.x2=function(r){if(r==null)return this._propertyBindings.get(t._X2_KEY);var n=this.x(),i=n&&n.scale;return this._bindProperty(t._X2_KEY,r,i),this.render(),this},t.prototype.y=function(r,n){if(r==null)return e.prototype.y.call(this);if(n==null)e.prototype.y.call(this,r);else{e.prototype.y.call(this,r,n);var i=this.y2(),o=i&&i.accessor;o!=null&&this._bindProperty(t._Y2_KEY,o,n)}return this},t.prototype.y2=function(r){if(r==null)return this._propertyBindings.get(t._Y2_KEY);var n=this.y(),i=n&&n.scale;return this._bindProperty(t._Y2_KEY,r,i),this.render(),this},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this);return r.x1=LS.Plot._scaledAccessor(this.x()),r.x2=this.x2()==null?LS.Plot._scaledAccessor(this.x()):LS.Plot._scaledAccessor(this.x2()),r.y1=LS.Plot._scaledAccessor(this.y()),r.y2=this.y2()==null?LS.Plot._scaledAccessor(this.y()):LS.Plot._scaledAccessor(this.y2()),r},t.prototype.entitiesAt=function(r){var n=this.entityNearest(r);return n!=null?[n]:[]},t.prototype.entitiesIn=function(r,n){var i,o;if(n==null){var a=r;i={min:a.topLeft.x,max:a.bottomRight.x},o={min:a.topLeft.y,max:a.bottomRight.y}}else i=r,o=n;return this._entitiesIntersecting(i,o)},t.prototype._entitiesIntersecting=function(r,n){for(var i=[],o=this._getAttrToProjector(),a=this.entities(),s=a.length,l=0;l<s;l++){var c=a[l];this._lineIntersectsBox(c,r,n,o)&&i.push(c)}return i},t.prototype._lineIntersectsBox=function(r,n,i,o){var a=this,s=o.x1(r.datum,r.index,r.dataset),l=o.x2(r.datum,r.index,r.dataset),c=o.y1(r.datum,r.index,r.dataset),u=o.y2(r.datum,r.index,r.dataset);if(n.min<=s&&s<=n.max&&i.min<=c&&c<=i.max||n.min<=l&&l<=n.max&&i.min<=u&&u<=i.max)return!0;var h={x:s,y:c},f={x:l,y:u},p=[{x:n.min,y:i.min},{x:n.min,y:i.max},{x:n.max,y:i.max},{x:n.max,y:i.min}],d=p.filter(function(g,_){return _!==0?a._lineIntersectsSegment(h,f,g,p[_-1])&&a._lineIntersectsSegment(g,p[_-1],h,f):!1});return d.length>0},t.prototype._lineIntersectsSegment=function(r,n,i,o){var a=function(s,l,c){return(l.x-s.x)*(c.y-l.y)-(l.y-s.y)*(c.x-l.x)};return a(r,n,i)*a(r,n,o)<0},t._X2_KEY="x2",t._Y2_KEY="y2",t}(qUe.XYPlot);Vat.Segment=GUe});var IKt=H(Uat=>{"use strict";Object.defineProperty(Uat,"__esModule",{value:!0});var WUe=(de(),Ut(pe)),AKt=(Er(),Ut(Mr)),YUe=Lf(),PKt=CS(),t0=Fe(),jUe=Tat(),XUe=rs(),$Ue=function(e){WUe.__extends(t,e);function t(){var r=e.call(this)||this;return r._stackingResult=PKt.memThunk(function(){return r.datasets()},function(){return r.x().accessor},function(){return r.y().accessor},function(){return r._stackingOrder},function(n,i,o,a){return t0.Stacking.stack(n,i,o,a)}),r._stackedExtent=PKt.memThunk(r._stackingResult,function(){return r.x().accessor},function(){return r._filterForProperty("y")},function(n,i,o){return t0.Stacking.stackedExtent(n,i,o)}),r._baselineValue=0,r._stackingOrder="bottomup",r.addClass("stacked-area-plot"),r._baselineValueProvider=function(){return[r._baselineValue]},r.croppedRenderingEnabled(!1),r}return t.prototype.croppedRenderingEnabled=function(r){return r==null?e.prototype.croppedRenderingEnabled.call(this):r?(t0.Window.warn("Warning: Stacked Area Plot does not support cropped rendering."),this):e.prototype.croppedRenderingEnabled.call(this,r)},t.prototype._getAnimator=function(r){return new YUe.Null},t.prototype._setup=function(){e.prototype._setup.call(this),this._baseline=this._renderArea.append("line").classed("baseline",!0)},t.prototype.x=function(r,n){return r==null?e.prototype.x.call(this):(n==null?e.prototype.x.call(this,r):e.prototype.x.call(this,r,n),this._checkSameDomain(),this)},t.prototype.y=function(r,n){return r==null?e.prototype.y.call(this):(n==null?e.prototype.y.call(this,r):e.prototype.y.call(this,r,n),this._checkSameDomain(),this)},t.prototype.yOffset=function(r,n){var i=this._stackingResult();if(i!=null){var o=i.get(r);if(o!=null){var a=o.get(String(n));if(a!=null)return a.offset}}},t.prototype.stackingOrder=function(r){return r==null?this._stackingOrder:(this._stackingOrder=r,this._onDatasetUpdate(),this)},t.prototype.downsamplingEnabled=function(r){return r==null?e.prototype.downsamplingEnabled.call(this):(t0.Window.warn("Warning: Stacked Area Plot does not support downsampling"),this)},t.prototype._additionalPaint=function(){var r=this.y().scale.scale(this._baselineValue),n={x1:0,y1:r,x2:this.width(),y2:r};this._getAnimator("baseline").animate(this._baseline,n)},t.prototype._updateYScale=function(){var r=this.y(),n=r&&r.scale;n!=null&&(n.addPaddingExceptionsProvider(this._baselineValueProvider),n.addIncludedValuesProvider(this._baselineValueProvider))},t.prototype._onDatasetUpdate=function(){return this._checkSameDomain(),e.prototype._onDatasetUpdate.call(this),this},t.prototype.getExtentsForProperty=function(r){var n="y";return r===n?[this._stackedExtent()]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype._checkSameDomain=function(){if(!!this._projectorsReady()){var r=this.datasets(),n=this.x().accessor,i=r.map(function(a){return AKt.set(a.data().map(function(s,l){return t0.Stacking.normalizeKey(n(s,l,a))})).values()}),o=t._domainKeys(r,n);i.some(function(a){return a.length!==o.length})&&t0.Window.warn("the domains across the datasets are not the same. Plot may produce unintended behavior.")}},t._domainKeys=function(r,n){var i=AKt.set();return r.forEach(function(o){for(var a=o.data(),s=a.length,l=0;l<s;l++){var c=a[l];i.add(n(c,l,o))}}),i.values()},t.prototype._coordinateProjectors=function(){var r=this,n=XUe.Plot._scaledAccessor(this.x()),i=this.y().accessor,o=this.x().accessor,a=function(u,h,f){return t0.Stacking.normalizeKey(o(u,h,f))},s=this._stackingResult(),l=function(u,h,f){var p=+i(u,h,f),d=s.get(f).get(a(u,h,f)).offset;return r.y().scale.scale(p+d)},c=function(u,h,f){var p=s.get(f).get(a(u,h,f)).offset;return r.y().scale.scale(p)};return[n,l,c]},t.prototype._propertyProjectors=function(){var r=e.prototype._propertyProjectors.call(this),n=this._coordinateProjectors(),i=n[0],o=n[1],a=n[2];return r.d=this._constructAreaProjector(i,o,a),r},t.prototype._pixelPoint=function(r,n,i){var o=e.prototype._pixelPoint.call(this,r,n,i),a=this.x().accessor(r,n,i),s=this.y().accessor(r,n,i),l=this.y().scale.scale(+s+this._stackingResult().get(i).get(t0.Stacking.normalizeKey(a)).offset);return{x:o.x,y:l}},t}(jUe.Area);Uat.StackedArea=$Ue});var kKt=H(Wat=>{"use strict";Object.defineProperty(Wat,"__esModule",{value:!0});var KUe=(de(),Ut(pe)),qat=_l(),ZUe=Bu(),LKt=CS(),dB=Fe(),Gat=y4(),JUe=rs(),QUe=function(e){KUe.__extends(t,e);function t(r){r===void 0&&(r="vertical");var n=e.call(this,r)||this;return n._extremaFormatter=ZUe.identity(),n._stackingResult=LKt.memThunk(function(){return n.datasets()},function(){return n.position().accessor},function(){return n.length().accessor},function(){return n._stackingOrder},function(i,o,a,s){return dB.Stacking.stack(i,o,a,s)}),n._stackedExtent=LKt.memThunk(n._stackingResult,function(){return n.position().accessor},function(){return n._filterForProperty(n._isVertical?"y":"x")},function(i,o,a){return dB.Stacking.stackedExtent(i,o,a)}),n.addClass("stacked-bar-plot"),n._stackingOrder="bottomup",n}return t.prototype.stackingOrder=function(r){return r==null?this._stackingOrder:(this._stackingOrder=r,this._onDatasetUpdate(),this)},t.prototype.extremaFormatter=function(r){return arguments.length===0?this._extremaFormatter:(this._extremaFormatter=r,this.render(),this)},t.prototype._setup=function(){e.prototype._setup.call(this),this._labelArea=this._renderArea.append("g").classed(Gat.Bar._LABEL_AREA_CLASS,!0);var r=new qat.SvgContext(this._labelArea.node());this._measurer=new qat.CacheMeasurer(r),this._writer=new qat.Writer(this._measurer,r)},t.prototype._drawLabels=function(){var r=this;e.prototype._drawLabels.call(this),this._labelArea.selectAll("g").remove();var n=+this.baselineValue(),i=this.position().scale,o=this.length().scale,a=dB.Stacking.stackedExtents(this._stackingResult()),s=a.maximumExtents,l=a.minimumExtents,c=[],u=function(f,p,d){var g=p.topLeft,_=g.x,y=g.y,x=p.bottomRight.x-p.topLeft.x,b=p.bottomRight.y-p.topLeft.y,S=r._isVertical?x>d:b>d;if(!S){var C=r._labelArea.append("g").attr("transform","translate("+_+", "+y+")");C.classed("stacked-bar-label",!0);var P={xAlign:"center",yAlign:"center"};r._writer.write(f,x,b,P,C.node())}return S},h=function(f,p){var d=r._generateAttrToProjector(),g=r.width(),_=r.height();f.forEach(function(y){if(y.extent!==n){var x=r.extremaFormatter()(y.extent),b=r._measurer.measure(x),S=y.stackedDatum,C=S.originalDatum,P=S.originalIndex,k=S.originalDataset;if(!r._isDatumOnScreen(d,g,_,C,P,k))return;var O=JUe.Plot._scaledAccessor(r.attr(Gat.Bar._BAR_THICKNESS_KEY))(C,P,k),D=o.scale(y.extent),B=r._getPositionAttr(i.scale(y.axisValue),O)+O/2,I=r._isVertical?{x:B,y:D}:{x:D,y:B},L=p(I,b,O),R=u(x,{topLeft:L,bottomRight:{x:L.x+b.width,y:L.y+b.height}},O);c.push(R)}})};h(s,function(f,p,d){var g=r._isVertical?p.width:p.height,_=r._isVertical?p.height:p.width;return{x:r._isVertical?f.x-g/2:f.x+t._EXTREMA_LABEL_MARGIN_FROM_BAR,y:r._isVertical?f.y-_:f.y-g/2}}),h(l,function(f,p,d){var g=r._isVertical?p.width:p.height,_=r._isVertical?p.height:p.width;return{x:r._isVertical?f.x-g/2:f.x-_,y:r._isVertical?f.y+t._EXTREMA_LABEL_MARGIN_FROM_BAR:f.y-g/2}}),c.some(function(f){return f})&&this._labelArea.selectAll("g").remove()},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this._isVertical?"y":"x",o=this.length().scale,a=this.length().accessor,s=this.position().accessor,l=function(d,g,_){return dB.Stacking.normalizeKey(s(d,g,_))},c=this._stackingResult(),u=function(d,g,_){return o.scale(c.get(_).get(l(d,g,_)).offset)},h=function(d,g,_){return o.scale(+a(d,g,_)+c.get(_).get(l(d,g,_)).offset)},f=function(d,g,_){return Math.abs(h(d,g,_)-u(d,g,_))};n[this._isVertical?"height":"width"]=f;var p=function(d,g,_){return+a(d,g,_)<0?u(d,g,_):h(d,g,_)};return n[i]=function(d,g,_){return r._isVertical?p(d,g,_):p(d,g,_)-f(d,g,_)},n},t.prototype.getExtentsForProperty=function(r){var n=this._isVertical?"y":"x";return r===n?[this._stackedExtent()]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype.invalidateCache=function(){e.prototype.invalidateCache.call(this),this._measurer.reset()},t._EXTREMA_LABEL_MARGIN_FROM_BAR=5,t}(Gat.Bar);Wat.StackedBar=QUe});var RKt=H(Yat=>{"use strict";Object.defineProperty(Yat,"__esModule",{value:!0});var tqe=(de(),Ut(pe)),eqe=Fe(),rqe=y4(),nqe=rs(),iqe=function(e){tqe.__extends(t,e);function t(){var r=e.call(this)||this;return r._connectorsEnabled=!1,r.addClass("waterfall-plot"),r}return t.prototype.connectorsEnabled=function(r){return r==null?this._connectorsEnabled:(this._connectorsEnabled=r,this)},t.prototype.total=function(r){return r==null?this._propertyBindings.get(t._TOTAL_KEY):(this._bindProperty(t._TOTAL_KEY,r,null),this)},t.prototype._additionalPaint=function(r){var n=this;this._connectorArea.selectAll("line").remove(),this._connectorsEnabled&&eqe.Window.setTimeout(function(){return n._drawConnectors()},r)},t.prototype._createNodesForDataset=function(r){var n=e.prototype._createNodesForDataset.call(this,r);return this._connectorArea=this._renderArea.append("g").classed(t._CONNECTOR_AREA_CLASS,!0),n},t.prototype.getExtentsForProperty=function(r){var n="y";return r===n?[this._extent]:e.prototype.getExtentsForProperty.call(this,r)},t.prototype._generateAttrToProjector=function(){var r=this,n=e.prototype._generateAttrToProjector.call(this),i=this.y().scale,o=nqe.Plot._scaledAccessor(this.total()),a=this.attr("y");a==null&&(n.y=function(l,c,u){var h=r.y().accessor(l,c,u),f=o(l,c,u);if(f)return Math.min(i.scale(h),i.scale(0));var p=r._subtotals[c];if(c===0)return h<0?i.scale(p-h):i.scale(p);var d=r._subtotals[c-1];return p>d?i.scale(p):i.scale(d)});var s=this.attr("height");return s==null&&(n.height=function(l,c,u){var h=o(l,c,u),f=r.y().accessor(l,c,u);if(h)return Math.abs(i.scale(f)-i.scale(0));var p=r._subtotals[c];if(c===0)return Math.abs(i.scale(p)-i.scale(p-f));var d=r._subtotals[c-1];return Math.abs(i.scale(p)-i.scale(d))}),n.class=function(l,c,u){var h="";r.attr("class")!=null&&(h=r.attr("class").accessor(l,c,u)+" ");var f=o(l,c,u);if(f)return h+t._BAR_TOTAL_CLASS;var p=r.y().accessor(l,c,u);return h+(p>0?t._BAR_GROWTH_CLASS:t._BAR_DECLINE_CLASS)},n},t.prototype._onDatasetUpdate=function(){return this._updateSubtotals(),e.prototype._onDatasetUpdate.call(this),this},t.prototype._calculateSubtotalsAndExtent=function(r){for(var n=Number.MAX_VALUE,i=Number.MIN_VALUE,o=0,a=!1,s=r.data(),l=s.length,c=0;c<l;c++){var u=s[c],h=this.y().accessor(u,c,r),f=this.total().accessor(u,c,r);if((!f||c===0)&&(o+=h),this._subtotals.push(o),o<n&&(n=o),o>i&&(i=o),f&&(h<n&&(n=h),h>i&&(i=h)),!a&&f){for(var p=h-o,d=0;d<this._subtotals.length;d++)this._subtotals[d]+=p;a=!0,o+=p,n+=p,i+=p}}this._extent=[n,i]},t.prototype._drawConnectors=function(){for(var r=this._getAttrToProjector(),n=this.datasets()[0],i=1;i<n.data().length;i++){var o=i-1,a=n.data()[i],s=n.data()[o],l=r.x(s,o,n),c=r.x(a,i,n)+r.width(a,i,n),u=r.y(a,i,n);(this._subtotals[i]>0&&this._subtotals[i]>this._subtotals[o]||this._subtotals[i]<0&&this._subtotals[i]>=this._subtotals[o])&&(u=r.y(a,i,n)+r.height(a,i,n)),this._connectorArea.append("line").classed(t._CONNECTOR_CLASS,!0).attr("x1",l).attr("x2",c).attr("y1",u).attr("y2",u)}},t.prototype._updateSubtotals=function(){var r=this.datasets();if(r.length>0){var n=r[r.length-1];this._subtotals=new Array,this._calculateSubtotalsAndExtent(n)}},t._BAR_DECLINE_CLASS="waterfall-decline",t._BAR_GROWTH_CLASS="waterfall-growth",t._BAR_TOTAL_CLASS="waterfall-total",t._CONNECTOR_CLASS="connector",t._CONNECTOR_AREA_CLASS="connector-area",t._TOTAL_KEY="total",t}(rqe.Bar);Yat.Waterfall=iqe});var IS=H(Os=>{"use strict";Object.defineProperty(Os,"__esModule",{value:!0});var zc=(de(),Ut(pe));zc.__exportStar(Tat(),Os);zc.__exportStar(y4(),Os);zc.__exportStar(Got(),Os);zc.__exportStar(wKt(),Os);zc.__exportStar(Sat(),Os);zc.__exportStar(SKt(),Os);zc.__exportStar(MKt(),Os);zc.__exportStar(TKt(),Os);zc.__exportStar(CKt(),Os);zc.__exportStar(IKt(),Os);zc.__exportStar(kKt(),Os);zc.__exportStar(RKt(),Os)});var NKt=H(jat=>{"use strict";Object.defineProperty(jat,"__esModule",{value:!0});jat.version="3.9.0"});var wl=H(ln=>{"use strict";Object.defineProperty(ln,"__esModule",{value:!0});var Fc=(de(),Ut(pe));$jt();var oqe=Lf();ln.Animators=oqe;var aqe=f$t();ln.Axes=aqe;var sqe=Pot();ln.Components=sqe;var lqe=$A();ln.Configs=lqe;var cqe=Bu();ln.Formatters=cqe;var uqe=IF();ln.RenderController=uqe;var hqe=Hit();ln.RenderPolicies=hqe;var fqe=XF();ln.SymbolFactories=fqe;var pqe=Nv();ln.Dispatchers=pqe;var dqe=Bv();ln.Drawers=dqe;var mqe=l4();ln.Interactions=mqe;var gqe=IS();ln.Plots=gqe;var _qe=ks();ln.Scales=_qe;var yqe=Fe();ln.Utils=yqe;Fc.__exportStar(t4(),ln);var vqe=HF();ln.TimeInterval=vqe.TimeInterval;Fc.__exportStar(kc(),ln);Fc.__exportStar(WF(),ln);Fc.__exportStar(Yot(),ln);var xqe=NKt();ln.version=xqe.version;Fc.__exportStar(o4(),ln);Fc.__exportStar(Uu(),ln);Fc.__exportStar(Dv(),ln);Fc.__exportStar(wot(),ln);Fc.__exportStar(Hv(),ln);Fc.__exportStar(rs(),ln);Fc.__exportStar(vd(),ln);Fc.__exportStar(Lv(),ln)});var QKt=H((sXn,JKt)=>{function Bqe(){this.__data__=[],this.size=0}JKt.exports=Bqe});var Yv=H((lXn,tZt)=>{function Hqe(e,t){return e===t||e!==e&&t!==t}tZt.exports=Hqe});var M4=H((cXn,eZt)=>{var Vqe=Yv();function Uqe(e,t){for(var r=e.length;r--;)if(Vqe(e[r][0],t))return r;return-1}eZt.exports=Uqe});var nZt=H((uXn,rZt)=>{var qqe=M4(),Gqe=Array.prototype,Wqe=Gqe.splice;function Yqe(e){var t=this.__data__,r=qqe(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Wqe.call(t,r,1),--this.size,!0}rZt.exports=Yqe});var oZt=H((hXn,iZt)=>{var jqe=M4();function Xqe(e){var t=this.__data__,r=jqe(t,e);return r<0?void 0:t[r][1]}iZt.exports=Xqe});var sZt=H((fXn,aZt)=>{var $qe=M4();function Kqe(e){return $qe(this.__data__,e)>-1}aZt.exports=Kqe});var cZt=H((pXn,lZt)=>{var Zqe=M4();function Jqe(e,t){var r=this.__data__,n=Zqe(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}lZt.exports=Jqe});var E4=H((dXn,uZt)=>{var Qqe=QKt(),tGe=nZt(),eGe=oZt(),rGe=sZt(),nGe=cZt();function zS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}zS.prototype.clear=Qqe;zS.prototype.delete=tGe;zS.prototype.get=eGe;zS.prototype.has=rGe;zS.prototype.set=nGe;uZt.exports=zS});var fZt=H((mXn,hZt)=>{var iGe=E4();function oGe(){this.__data__=new iGe,this.size=0}hZt.exports=oGe});var dZt=H((gXn,pZt)=>{function aGe(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}pZt.exports=aGe});var gZt=H((_Xn,mZt)=>{function sGe(e){return this.__data__.get(e)}mZt.exports=sGe});var yZt=H((yXn,_Zt)=>{function lGe(e){return this.__data__.has(e)}_Zt.exports=lGe});var cst=H((vXn,vZt)=>{var cGe=typeof global=="object"&&global&&global.Object===Object&&global;vZt.exports=cGe});var Hc=H((xXn,xZt)=>{var uGe=cst(),hGe=typeof self=="object"&&self&&self.Object===Object&&self,fGe=uGe||hGe||Function("return this")();xZt.exports=fGe});var jv=H((bXn,bZt)=>{var pGe=Hc(),dGe=pGe.Symbol;bZt.exports=dGe});var EZt=H((wXn,MZt)=>{var wZt=jv(),SZt=Object.prototype,mGe=SZt.hasOwnProperty,gGe=SZt.toString,T4=wZt?wZt.toStringTag:void 0;function _Ge(e){var t=mGe.call(e,T4),r=e[T4];try{e[T4]=void 0;var n=!0}catch(o){}var i=gGe.call(e);return n&&(t?e[T4]=r:delete e[T4]),i}MZt.exports=_Ge});var CZt=H((SXn,TZt)=>{var yGe=Object.prototype,vGe=yGe.toString;function xGe(e){return vGe.call(e)}TZt.exports=xGe});var s0=H((MXn,IZt)=>{var AZt=jv(),bGe=EZt(),wGe=CZt(),SGe="[object Null]",MGe="[object Undefined]",PZt=AZt?AZt.toStringTag:void 0;function EGe(e){return e==null?e===void 0?MGe:SGe:PZt&&PZt in Object(e)?bGe(e):wGe(e)}IZt.exports=EGe});var Ml=H((EXn,LZt)=>{function TGe(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}LZt.exports=TGe});var FS=H((TXn,kZt)=>{var CGe=s0(),AGe=Ml(),PGe="[object AsyncFunction]",IGe="[object Function]",LGe="[object GeneratorFunction]",kGe="[object Proxy]";function RGe(e){if(!AGe(e))return!1;var t=CGe(e);return t==IGe||t==LGe||t==PGe||t==kGe}kZt.exports=RGe});var NZt=H((CXn,RZt)=>{var NGe=Hc(),DGe=NGe["__core-js_shared__"];RZt.exports=DGe});var zZt=H((AXn,OZt)=>{var ust=NZt(),DZt=function(){var e=/[^.]+$/.exec(ust&&ust.keys&&ust.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function OGe(e){return!!DZt&&DZt in e}OZt.exports=OGe});var hst=H((PXn,FZt)=>{var zGe=Function.prototype,FGe=zGe.toString;function BGe(e){if(e!=null){try{return FGe.call(e)}catch(t){}try{return e+""}catch(t){}}return""}FZt.exports=BGe});var HZt=H((IXn,BZt)=>{var HGe=FS(),VGe=zZt(),UGe=Ml(),qGe=hst(),GGe=/[\\^$.*+?()[\]{}|]/g,WGe=/^\[object .+?Constructor\]$/,YGe=Function.prototype,jGe=Object.prototype,XGe=YGe.toString,$Ge=jGe.hasOwnProperty,KGe=RegExp("^"+XGe.call($Ge).replace(GGe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZGe(e){if(!UGe(e)||VGe(e))return!1;var t=HGe(e)?KGe:WGe;return t.test(qGe(e))}BZt.exports=ZGe});var UZt=H((LXn,VZt)=>{function JGe(e,t){return e==null?void 0:e[t]}VZt.exports=JGe});var l0=H((kXn,qZt)=>{var QGe=HZt(),tWe=UZt();function eWe(e,t){var r=tWe(e,t);return QGe(r)?r:void 0}qZt.exports=eWe});var zB=H((RXn,GZt)=>{var rWe=l0(),nWe=Hc(),iWe=rWe(nWe,"Map");GZt.exports=iWe});var C4=H((NXn,WZt)=>{var oWe=l0(),aWe=oWe(Object,"create");WZt.exports=aWe});var XZt=H((DXn,jZt)=>{var YZt=C4();function sWe(){this.__data__=YZt?YZt(null):{},this.size=0}jZt.exports=sWe});var KZt=H((OXn,$Zt)=>{function lWe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}$Zt.exports=lWe});var JZt=H((zXn,ZZt)=>{var cWe=C4(),uWe="__lodash_hash_undefined__",hWe=Object.prototype,fWe=hWe.hasOwnProperty;function pWe(e){var t=this.__data__;if(cWe){var r=t[e];return r===uWe?void 0:r}return fWe.call(t,e)?t[e]:void 0}ZZt.exports=pWe});var tJt=H((FXn,QZt)=>{var dWe=C4(),mWe=Object.prototype,gWe=mWe.hasOwnProperty;function _We(e){var t=this.__data__;return dWe?t[e]!==void 0:gWe.call(t,e)}QZt.exports=_We});var rJt=H((BXn,eJt)=>{var yWe=C4(),vWe="__lodash_hash_undefined__";function xWe(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=yWe&&t===void 0?vWe:t,this}eJt.exports=xWe});var iJt=H((HXn,nJt)=>{var bWe=XZt(),wWe=KZt(),SWe=JZt(),MWe=tJt(),EWe=rJt();function BS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}BS.prototype.clear=bWe;BS.prototype.delete=wWe;BS.prototype.get=SWe;BS.prototype.has=MWe;BS.prototype.set=EWe;nJt.exports=BS});var sJt=H((VXn,aJt)=>{var oJt=iJt(),TWe=E4(),CWe=zB();function AWe(){this.size=0,this.__data__={hash:new oJt,map:new(CWe||TWe),string:new oJt}}aJt.exports=AWe});var cJt=H((UXn,lJt)=>{function PWe(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}lJt.exports=PWe});var A4=H((qXn,uJt)=>{var IWe=cJt();function LWe(e,t){var r=e.__data__;return IWe(t)?r[typeof t=="string"?"string":"hash"]:r.map}uJt.exports=LWe});var fJt=H((GXn,hJt)=>{var kWe=A4();function RWe(e){var t=kWe(this,e).delete(e);return this.size-=t?1:0,t}hJt.exports=RWe});var dJt=H((WXn,pJt)=>{var NWe=A4();function DWe(e){return NWe(this,e).get(e)}pJt.exports=DWe});var gJt=H((YXn,mJt)=>{var OWe=A4();function zWe(e){return OWe(this,e).has(e)}mJt.exports=zWe});var yJt=H((jXn,_Jt)=>{var FWe=A4();function BWe(e,t){var r=FWe(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}_Jt.exports=BWe});var FB=H((XXn,vJt)=>{var HWe=sJt(),VWe=fJt(),UWe=dJt(),qWe=gJt(),GWe=yJt();function HS(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}HS.prototype.clear=HWe;HS.prototype.delete=VWe;HS.prototype.get=UWe;HS.prototype.has=qWe;HS.prototype.set=GWe;vJt.exports=HS});var bJt=H(($Xn,xJt)=>{var WWe=E4(),YWe=zB(),jWe=FB(),XWe=200;function $We(e,t){var r=this.__data__;if(r instanceof WWe){var n=r.__data__;if(!YWe||n.length<XWe-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new jWe(n)}return r.set(e,t),this.size=r.size,this}xJt.exports=$We});var P4=H((KXn,wJt)=>{var KWe=E4(),ZWe=fZt(),JWe=dZt(),QWe=gZt(),tYe=yZt(),eYe=bJt();function VS(e){var t=this.__data__=new KWe(e);this.size=t.size}VS.prototype.clear=ZWe;VS.prototype.delete=JWe;VS.prototype.get=QWe;VS.prototype.has=tYe;VS.prototype.set=eYe;wJt.exports=VS});var BB=H((ZXn,SJt)=>{function rYe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}SJt.exports=rYe});var fst=H((JXn,MJt)=>{var nYe=l0(),iYe=function(){try{var e=nYe(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();MJt.exports=iYe});var I4=H((QXn,TJt)=>{var EJt=fst();function oYe(e,t,r){t=="__proto__"&&EJt?EJt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}TJt.exports=oYe});var L4=H((t$n,CJt)=>{var aYe=I4(),sYe=Yv(),lYe=Object.prototype,cYe=lYe.hasOwnProperty;function uYe(e,t,r){var n=e[t];(!(cYe.call(e,t)&&sYe(n,r))||r===void 0&&!(t in e))&&aYe(e,t,r)}CJt.exports=uYe});var US=H((e$n,AJt)=>{var hYe=L4(),fYe=I4();function pYe(e,t,r,n){var i=!r;r||(r={});for(var o=-1,a=t.length;++o<a;){var s=t[o],l=n?n(r[s],e[s],s,r,e):void 0;l===void 0&&(l=e[s]),i?fYe(r,s,l):hYe(r,s,l)}return r}AJt.exports=pYe});var IJt=H((r$n,PJt)=>{function dYe(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}PJt.exports=dYe});var Yu=H((n$n,LJt)=>{function mYe(e){return e!=null&&typeof e=="object"}LJt.exports=mYe});var RJt=H((i$n,kJt)=>{var gYe=s0(),_Ye=Yu(),yYe="[object Arguments]";function vYe(e){return _Ye(e)&&gYe(e)==yYe}kJt.exports=vYe});var qS=H((o$n,OJt)=>{var NJt=RJt(),xYe=Yu(),DJt=Object.prototype,bYe=DJt.hasOwnProperty,wYe=DJt.propertyIsEnumerable,SYe=NJt(function(){return arguments}())?NJt:function(e){return xYe(e)&&bYe.call(e,"callee")&&!wYe.call(e,"callee")};OJt.exports=SYe});var Ti=H((a$n,zJt)=>{var MYe=Array.isArray;zJt.exports=MYe});var BJt=H((s$n,FJt)=>{function EYe(){return!1}FJt.exports=EYe});var Xv=H((k4,GS)=>{var TYe=Hc(),CYe=BJt(),UJt=typeof k4=="object"&&k4&&!k4.nodeType&&k4,HJt=UJt&&typeof GS=="object"&&GS&&!GS.nodeType&&GS,AYe=HJt&&HJt.exports===UJt,VJt=AYe?TYe.Buffer:void 0,PYe=VJt?VJt.isBuffer:void 0,IYe=PYe||CYe;GS.exports=IYe});var R4=H((l$n,qJt)=>{var LYe=9007199254740991,kYe=/^(?:0|[1-9]\d*)$/;function RYe(e,t){var r=typeof e;return t=t==null?LYe:t,!!t&&(r=="number"||r!="symbol"&&kYe.test(e))&&e>-1&&e%1==0&&e<t}qJt.exports=RYe});var HB=H((c$n,GJt)=>{var NYe=9007199254740991;function DYe(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=NYe}GJt.exports=DYe});var YJt=H((u$n,WJt)=>{var OYe=s0(),zYe=HB(),FYe=Yu(),BYe="[object Arguments]",HYe="[object Array]",VYe="[object Boolean]",UYe="[object Date]",qYe="[object Error]",GYe="[object Function]",WYe="[object Map]",YYe="[object Number]",jYe="[object Object]",XYe="[object RegExp]",$Ye="[object Set]",KYe="[object String]",ZYe="[object WeakMap]",JYe="[object ArrayBuffer]",QYe="[object DataView]",tje="[object Float32Array]",eje="[object Float64Array]",rje="[object Int8Array]",nje="[object Int16Array]",ije="[object Int32Array]",oje="[object Uint8Array]",aje="[object Uint8ClampedArray]",sje="[object Uint16Array]",lje="[object Uint32Array]",Vn={};Vn[tje]=Vn[eje]=Vn[rje]=Vn[nje]=Vn[ije]=Vn[oje]=Vn[aje]=Vn[sje]=Vn[lje]=!0;Vn[BYe]=Vn[HYe]=Vn[JYe]=Vn[VYe]=Vn[QYe]=Vn[UYe]=Vn[qYe]=Vn[GYe]=Vn[WYe]=Vn[YYe]=Vn[jYe]=Vn[XYe]=Vn[$Ye]=Vn[KYe]=Vn[ZYe]=!1;function cje(e){return FYe(e)&&zYe(e.length)&&!!Vn[OYe(e)]}WJt.exports=cje});var N4=H((h$n,jJt)=>{function uje(e){return function(t){return e(t)}}jJt.exports=uje});var VB=H((D4,WS)=>{var hje=cst(),XJt=typeof D4=="object"&&D4&&!D4.nodeType&&D4,O4=XJt&&typeof WS=="object"&&WS&&!WS.nodeType&&WS,fje=O4&&O4.exports===XJt,pst=fje&&hje.process,pje=function(){try{var e=O4&&O4.require&&O4.require("util").types;return e||pst&&pst.binding&&pst.binding("util")}catch(t){}}();WS.exports=pje});var YS=H((f$n,ZJt)=>{var dje=YJt(),mje=N4(),$Jt=VB(),KJt=$Jt&&$Jt.isTypedArray,gje=KJt?mje(KJt):dje;ZJt.exports=gje});var dst=H((p$n,JJt)=>{var _je=IJt(),yje=qS(),vje=Ti(),xje=Xv(),bje=R4(),wje=YS(),Sje=Object.prototype,Mje=Sje.hasOwnProperty;function Eje(e,t){var r=vje(e),n=!r&&yje(e),i=!r&&!n&&xje(e),o=!r&&!n&&!i&&wje(e),a=r||n||i||o,s=a?_je(e.length,String):[],l=s.length;for(var c in e)(t||Mje.call(e,c))&&!(a&&(c=="length"||i&&(c=="offset"||c=="parent")||o&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||bje(c,l)))&&s.push(c);return s}JJt.exports=Eje});var z4=H((d$n,QJt)=>{var Tje=Object.prototype;function Cje(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Tje;return e===r}QJt.exports=Cje});var mst=H((m$n,tQt)=>{function Aje(e,t){return function(r){return e(t(r))}}tQt.exports=Aje});var rQt=H((g$n,eQt)=>{var Pje=mst(),Ije=Pje(Object.keys,Object);eQt.exports=Ije});var UB=H((_$n,nQt)=>{var Lje=z4(),kje=rQt(),Rje=Object.prototype,Nje=Rje.hasOwnProperty;function Dje(e){if(!Lje(e))return kje(e);var t=[];for(var r in Object(e))Nje.call(e,r)&&r!="constructor"&&t.push(r);return t}nQt.exports=Dje});var Bf=H((y$n,iQt)=>{var Oje=FS(),zje=HB();function Fje(e){return e!=null&&zje(e.length)&&!Oje(e)}iQt.exports=Fje});var Ad=H((v$n,oQt)=>{var Bje=dst(),Hje=UB(),Vje=Bf();function Uje(e){return Vje(e)?Bje(e):Hje(e)}oQt.exports=Uje});var sQt=H((x$n,aQt)=>{var qje=US(),Gje=Ad();function Wje(e,t){return e&&qje(t,Gje(t),e)}aQt.exports=Wje});var cQt=H((b$n,lQt)=>{function Yje(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}lQt.exports=Yje});var hQt=H((w$n,uQt)=>{var jje=Ml(),Xje=z4(),$je=cQt(),Kje=Object.prototype,Zje=Kje.hasOwnProperty;function Jje(e){if(!jje(e))return $je(e);var t=Xje(e),r=[];for(var n in e)n=="constructor"&&(t||!Zje.call(e,n))||r.push(n);return r}uQt.exports=Jje});var c0=H((S$n,fQt)=>{var Qje=dst(),tXe=hQt(),eXe=Bf();function rXe(e){return eXe(e)?Qje(e,!0):tXe(e)}fQt.exports=rXe});var dQt=H((M$n,pQt)=>{var nXe=US(),iXe=c0();function oXe(e,t){return e&&nXe(t,iXe(t),e)}pQt.exports=oXe});var gst=H((F4,jS)=>{var aXe=Hc(),yQt=typeof F4=="object"&&F4&&!F4.nodeType&&F4,mQt=yQt&&typeof jS=="object"&&jS&&!jS.nodeType&&jS,sXe=mQt&&mQt.exports===yQt,gQt=sXe?aXe.Buffer:void 0,_Qt=gQt?gQt.allocUnsafe:void 0;function lXe(e,t){if(t)return e.slice();var r=e.length,n=_Qt?_Qt(r):new e.constructor(r);return e.copy(n),n}jS.exports=lXe});var _st=H((E$n,vQt)=>{function cXe(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}vQt.exports=cXe});var yst=H((T$n,xQt)=>{function uXe(e,t){for(var r=-1,n=e==null?0:e.length,i=0,o=[];++r<n;){var a=e[r];t(a,r,e)&&(o[i++]=a)}return o}xQt.exports=uXe});var vst=H((C$n,bQt)=>{function hXe(){return[]}bQt.exports=hXe});var qB=H((A$n,SQt)=>{var fXe=yst(),pXe=vst(),dXe=Object.prototype,mXe=dXe.propertyIsEnumerable,wQt=Object.getOwnPropertySymbols,gXe=wQt?function(e){return e==null?[]:(e=Object(e),fXe(wQt(e),function(t){return mXe.call(e,t)}))}:pXe;SQt.exports=gXe});var EQt=H((P$n,MQt)=>{var _Xe=US(),yXe=qB();function vXe(e,t){return _Xe(e,yXe(e),t)}MQt.exports=vXe});var GB=H((I$n,TQt)=>{function xXe(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}TQt.exports=xXe});var B4=H((L$n,CQt)=>{var bXe=mst(),wXe=bXe(Object.getPrototypeOf,Object);CQt.exports=wXe});var xst=H((k$n,AQt)=>{var SXe=GB(),MXe=B4(),EXe=qB(),TXe=vst(),CXe=Object.getOwnPropertySymbols,AXe=CXe?function(e){for(var t=[];e;)SXe(t,EXe(e)),e=MXe(e);return t}:TXe;AQt.exports=AXe});var IQt=H((R$n,PQt)=>{var PXe=US(),IXe=xst();function LXe(e,t){return PXe(e,IXe(e),t)}PQt.exports=LXe});var bst=H((N$n,LQt)=>{var kXe=GB(),RXe=Ti();function NXe(e,t,r){var n=t(e);return RXe(e)?n:kXe(n,r(e))}LQt.exports=NXe});var wst=H((D$n,kQt)=>{var DXe=bst(),OXe=qB(),zXe=Ad();function FXe(e){return DXe(e,zXe,OXe)}kQt.exports=FXe});var NQt=H((O$n,RQt)=>{var BXe=bst(),HXe=xst(),VXe=c0();function UXe(e){return BXe(e,VXe,HXe)}RQt.exports=UXe});var OQt=H((z$n,DQt)=>{var qXe=l0(),GXe=Hc(),WXe=qXe(GXe,"DataView");DQt.exports=WXe});var FQt=H((F$n,zQt)=>{var YXe=l0(),jXe=Hc(),XXe=YXe(jXe,"Promise");zQt.exports=XXe});var Sst=H((B$n,BQt)=>{var $Xe=l0(),KXe=Hc(),ZXe=$Xe(KXe,"Set");BQt.exports=ZXe});var VQt=H((H$n,HQt)=>{var JXe=l0(),QXe=Hc(),t$e=JXe(QXe,"WeakMap");HQt.exports=t$e});var Kv=H((V$n,XQt)=>{var Mst=OQt(),Est=zB(),Tst=FQt(),Cst=Sst(),Ast=VQt(),jQt=s0(),XS=hst(),UQt="[object Map]",e$e="[object Object]",qQt="[object Promise]",GQt="[object Set]",WQt="[object WeakMap]",YQt="[object DataView]",r$e=XS(Mst),n$e=XS(Est),i$e=XS(Tst),o$e=XS(Cst),a$e=XS(Ast),$v=jQt;(Mst&&$v(new Mst(new ArrayBuffer(1)))!=YQt||Est&&$v(new Est)!=UQt||Tst&&$v(Tst.resolve())!=qQt||Cst&&$v(new Cst)!=GQt||Ast&&$v(new Ast)!=WQt)&&($v=function(e){var t=jQt(e),r=t==e$e?e.constructor:void 0,n=r?XS(r):"";if(n)switch(n){case r$e:return YQt;case n$e:return UQt;case i$e:return qQt;case o$e:return GQt;case a$e:return WQt}return t});XQt.exports=$v});var KQt=H((U$n,$Qt)=>{var s$e=Object.prototype,l$e=s$e.hasOwnProperty;function c$e(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&l$e.call(e,"index")&&(r.index=e.index,r.input=e.input),r}$Qt.exports=c$e});var Pst=H((q$n,ZQt)=>{var u$e=Hc(),h$e=u$e.Uint8Array;ZQt.exports=h$e});var WB=H((G$n,QQt)=>{var JQt=Pst();function f$e(e){var t=new e.constructor(e.byteLength);return new JQt(t).set(new JQt(e)),t}QQt.exports=f$e});var ete=H((W$n,tte)=>{var p$e=WB();function d$e(e,t){var r=t?p$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}tte.exports=d$e});var nte=H((Y$n,rte)=>{var m$e=/\w*$/;function g$e(e){var t=new e.constructor(e.source,m$e.exec(e));return t.lastIndex=e.lastIndex,t}rte.exports=g$e});var lte=H((j$n,ste)=>{var ite=jv(),ote=ite?ite.prototype:void 0,ate=ote?ote.valueOf:void 0;function _$e(e){return ate?Object(ate.call(e)):{}}ste.exports=_$e});var Ist=H((X$n,cte)=>{var y$e=WB();function v$e(e,t){var r=t?y$e(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}cte.exports=v$e});var hte=H(($$n,ute)=>{var x$e=WB(),b$e=ete(),w$e=nte(),S$e=lte(),M$e=Ist(),E$e="[object Boolean]",T$e="[object Date]",C$e="[object Map]",A$e="[object Number]",P$e="[object RegExp]",I$e="[object Set]",L$e="[object String]",k$e="[object Symbol]",R$e="[object ArrayBuffer]",N$e="[object DataView]",D$e="[object Float32Array]",O$e="[object Float64Array]",z$e="[object Int8Array]",F$e="[object Int16Array]",B$e="[object Int32Array]",H$e="[object Uint8Array]",V$e="[object Uint8ClampedArray]",U$e="[object Uint16Array]",q$e="[object Uint32Array]";function G$e(e,t,r){var n=e.constructor;switch(t){case R$e:return x$e(e);case E$e:case T$e:return new n(+e);case N$e:return b$e(e,r);case D$e:case O$e:case z$e:case F$e:case B$e:case H$e:case V$e:case U$e:case q$e:return M$e(e,r);case C$e:return new n;case A$e:case L$e:return new n(e);case P$e:return w$e(e);case I$e:return new n;case k$e:return S$e(e)}}ute.exports=G$e});var Lst=H((K$n,pte)=>{var W$e=Ml(),fte=Object.create,Y$e=function(){function e(){}return function(t){if(!W$e(t))return{};if(fte)return fte(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();pte.exports=Y$e});var kst=H((Z$n,dte)=>{var j$e=Lst(),X$e=B4(),$$e=z4();function K$e(e){return typeof e.constructor=="function"&&!$$e(e)?j$e(X$e(e)):{}}dte.exports=K$e});var gte=H((J$n,mte)=>{var Z$e=Kv(),J$e=Yu(),Q$e="[object Map]";function tKe(e){return J$e(e)&&Z$e(e)==Q$e}mte.exports=tKe});var xte=H((Q$n,vte)=>{var eKe=gte(),rKe=N4(),_te=VB(),yte=_te&&_te.isMap,nKe=yte?rKe(yte):eKe;vte.exports=nKe});var wte=H((tKn,bte)=>{var iKe=Kv(),oKe=Yu(),aKe="[object Set]";function sKe(e){return oKe(e)&&iKe(e)==aKe}bte.exports=sKe});var Tte=H((eKn,Ete)=>{var lKe=wte(),cKe=N4(),Ste=VB(),Mte=Ste&&Ste.isSet,uKe=Mte?cKe(Mte):lKe;Ete.exports=uKe});var Rst=H((rKn,Ite)=>{var hKe=P4(),fKe=BB(),pKe=L4(),dKe=sQt(),mKe=dQt(),gKe=gst(),_Ke=_st(),yKe=EQt(),vKe=IQt(),xKe=wst(),bKe=NQt(),wKe=Kv(),SKe=KQt(),MKe=hte(),EKe=kst(),TKe=Ti(),CKe=Xv(),AKe=xte(),PKe=Ml(),IKe=Tte(),LKe=Ad(),kKe=c0(),RKe=1,NKe=2,DKe=4,Cte="[object Arguments]",OKe="[object Array]",zKe="[object Boolean]",FKe="[object Date]",BKe="[object Error]",Ate="[object Function]",HKe="[object GeneratorFunction]",VKe="[object Map]",UKe="[object Number]",Pte="[object Object]",qKe="[object RegExp]",GKe="[object Set]",WKe="[object String]",YKe="[object Symbol]",jKe="[object WeakMap]",XKe="[object ArrayBuffer]",$Ke="[object DataView]",KKe="[object Float32Array]",ZKe="[object Float64Array]",JKe="[object Int8Array]",QKe="[object Int16Array]",tZe="[object Int32Array]",eZe="[object Uint8Array]",rZe="[object Uint8ClampedArray]",nZe="[object Uint16Array]",iZe="[object Uint32Array]",Cn={};Cn[Cte]=Cn[OKe]=Cn[XKe]=Cn[$Ke]=Cn[zKe]=Cn[FKe]=Cn[KKe]=Cn[ZKe]=Cn[JKe]=Cn[QKe]=Cn[tZe]=Cn[VKe]=Cn[UKe]=Cn[Pte]=Cn[qKe]=Cn[GKe]=Cn[WKe]=Cn[YKe]=Cn[eZe]=Cn[rZe]=Cn[nZe]=Cn[iZe]=!0;Cn[BKe]=Cn[Ate]=Cn[jKe]=!1;function YB(e,t,r,n,i,o){var a,s=t&RKe,l=t&NKe,c=t&DKe;if(r&&(a=i?r(e,n,i,o):r(e)),a!==void 0)return a;if(!PKe(e))return e;var u=TKe(e);if(u){if(a=SKe(e),!s)return _Ke(e,a)}else{var h=wKe(e),f=h==Ate||h==HKe;if(CKe(e))return gKe(e,s);if(h==Pte||h==Cte||f&&!i){if(a=l||f?{}:EKe(e),!s)return l?vKe(e,mKe(a,e)):yKe(e,dKe(a,e))}else{if(!Cn[h])return i?e:{};a=MKe(e,h,s)}}o||(o=new hKe);var p=o.get(e);if(p)return p;o.set(e,a),IKe(e)?e.forEach(function(_){a.add(YB(_,t,r,_,e,o))}):AKe(e)&&e.forEach(function(_,y){a.set(y,YB(_,t,r,y,e,o))});var d=c?l?bKe:xKe:l?kKe:LKe,g=u?void 0:d(e);return fKe(g||e,function(_,y){g&&(y=_,_=e[y]),pKe(a,y,YB(_,t,r,y,e,o))}),a}Ite.exports=YB});var kte=H((nKn,Lte)=>{var oZe=Rst(),aZe=4;function sZe(e){return oZe(e,aZe)}Lte.exports=sZe});var jB=H((iKn,Rte)=>{function lZe(e){return function(){return e}}Rte.exports=lZe});var Dte=H((oKn,Nte)=>{function cZe(e){return function(t,r,n){for(var i=-1,o=Object(t),a=n(t),s=a.length;s--;){var l=a[e?s:++i];if(r(o[l],l,o)===!1)break}return t}}Nte.exports=cZe});var XB=H((aKn,Ote)=>{var uZe=Dte(),hZe=uZe();Ote.exports=hZe});var $B=H((sKn,zte)=>{var fZe=XB(),pZe=Ad();function dZe(e,t){return e&&fZe(e,t,pZe)}zte.exports=dZe});var Bte=H((lKn,Fte)=>{var mZe=Bf();function gZe(e,t){return function(r,n){if(r==null)return r;if(!mZe(r))return e(r,n);for(var i=r.length,o=t?i:-1,a=Object(r);(t?o--:++o<i)&&n(a[o],o,a)!==!1;);return r}}Fte.exports=gZe});var H4=H((cKn,Hte)=>{var _Ze=$B(),yZe=Bte(),vZe=yZe(_Ze);Hte.exports=vZe});var u0=H((uKn,Vte)=>{function xZe(e){return e}Vte.exports=xZe});var Nst=H((hKn,Ute)=>{var bZe=u0();function wZe(e){return typeof e=="function"?e:bZe}Ute.exports=wZe});var Dst=H((fKn,qte)=>{var SZe=BB(),MZe=H4(),EZe=Nst(),TZe=Ti();function CZe(e,t){var r=TZe(e)?SZe:MZe;return r(e,EZe(t))}qte.exports=CZe});var Ost=H((pKn,Gte)=>{Gte.exports=Dst()});var Yte=H((dKn,Wte)=>{var AZe=H4();function PZe(e,t){var r=[];return AZe(e,function(n,i,o){t(n,i,o)&&r.push(n)}),r}Wte.exports=PZe});var Xte=H((mKn,jte)=>{var IZe="__lodash_hash_undefined__";function LZe(e){return this.__data__.set(e,IZe),this}jte.exports=LZe});var Kte=H((gKn,$te)=>{function kZe(e){return this.__data__.has(e)}$te.exports=kZe});var zst=H((_Kn,Zte)=>{var RZe=FB(),NZe=Xte(),DZe=Kte();function KB(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new RZe;++t<r;)this.add(e[t])}KB.prototype.add=KB.prototype.push=NZe;KB.prototype.has=DZe;Zte.exports=KB});var Qte=H((yKn,Jte)=>{function OZe(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Jte.exports=OZe});var Fst=H((vKn,tee)=>{function zZe(e,t){return e.has(t)}tee.exports=zZe});var Bst=H((xKn,eee)=>{var FZe=zst(),BZe=Qte(),HZe=Fst(),VZe=1,UZe=2;function qZe(e,t,r,n,i,o){var a=r&VZe,s=e.length,l=t.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(e),u=o.get(t);if(c&&u)return c==t&&u==e;var h=-1,f=!0,p=r&UZe?new FZe:void 0;for(o.set(e,t),o.set(t,e);++h<s;){var d=e[h],g=t[h];if(n)var _=a?n(g,d,h,t,e,o):n(d,g,h,e,t,o);if(_!==void 0){if(_)continue;f=!1;break}if(p){if(!BZe(t,function(y,x){if(!HZe(p,x)&&(d===y||i(d,y,r,n,o)))return p.push(x)})){f=!1;break}}else if(!(d===g||i(d,g,r,n,o))){f=!1;break}}return o.delete(e),o.delete(t),f}eee.exports=qZe});var nee=H((bKn,ree)=>{function GZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}ree.exports=GZe});var ZB=H((wKn,iee)=>{function WZe(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}iee.exports=WZe});var cee=H((SKn,lee)=>{var oee=jv(),aee=Pst(),YZe=Yv(),jZe=Bst(),XZe=nee(),$Ze=ZB(),KZe=1,ZZe=2,JZe="[object Boolean]",QZe="[object Date]",tJe="[object Error]",eJe="[object Map]",rJe="[object Number]",nJe="[object RegExp]",iJe="[object Set]",oJe="[object String]",aJe="[object Symbol]",sJe="[object ArrayBuffer]",lJe="[object DataView]",see=oee?oee.prototype:void 0,Hst=see?see.valueOf:void 0;function cJe(e,t,r,n,i,o,a){switch(r){case lJe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sJe:return!(e.byteLength!=t.byteLength||!o(new aee(e),new aee(t)));case JZe:case QZe:case rJe:return YZe(+e,+t);case tJe:return e.name==t.name&&e.message==t.message;case nJe:case oJe:return e==t+"";case eJe:var s=XZe;case iJe:var l=n&KZe;if(s||(s=$Ze),e.size!=t.size&&!l)return!1;var c=a.get(e);if(c)return c==t;n|=ZZe,a.set(e,t);var u=jZe(s(e),s(t),n,i,o,a);return a.delete(e),u;case aJe:if(Hst)return Hst.call(e)==Hst.call(t)}return!1}lee.exports=cJe});var fee=H((MKn,hee)=>{var uee=wst(),uJe=1,hJe=Object.prototype,fJe=hJe.hasOwnProperty;function pJe(e,t,r,n,i,o){var a=r&uJe,s=uee(e),l=s.length,c=uee(t),u=c.length;if(l!=u&&!a)return!1;for(var h=l;h--;){var f=s[h];if(!(a?f in t:fJe.call(t,f)))return!1}var p=o.get(e),d=o.get(t);if(p&&d)return p==t&&d==e;var g=!0;o.set(e,t),o.set(t,e);for(var _=a;++h<l;){f=s[h];var y=e[f],x=t[f];if(n)var b=a?n(x,y,f,t,e,o):n(y,x,f,e,t,o);if(!(b===void 0?y===x||i(y,x,r,n,o):b)){g=!1;break}_||(_=f=="constructor")}if(g&&!_){var S=e.constructor,C=t.constructor;S!=C&&"constructor"in e&&"constructor"in t&&!(typeof S=="function"&&S instanceof S&&typeof C=="function"&&C instanceof C)&&(g=!1)}return o.delete(e),o.delete(t),g}hee.exports=pJe});var xee=H((EKn,vee)=>{var Vst=P4(),dJe=Bst(),mJe=cee(),gJe=fee(),pee=Kv(),dee=Ti(),mee=Xv(),_Je=YS(),yJe=1,gee="[object Arguments]",_ee="[object Array]",JB="[object Object]",vJe=Object.prototype,yee=vJe.hasOwnProperty;function xJe(e,t,r,n,i,o){var a=dee(e),s=dee(t),l=a?_ee:pee(e),c=s?_ee:pee(t);l=l==gee?JB:l,c=c==gee?JB:c;var u=l==JB,h=c==JB,f=l==c;if(f&&mee(e)){if(!mee(t))return!1;a=!0,u=!1}if(f&&!u)return o||(o=new Vst),a||_Je(e)?dJe(e,t,r,n,i,o):mJe(e,t,l,r,n,i,o);if(!(r&yJe)){var p=u&&yee.call(e,"__wrapped__"),d=h&&yee.call(t,"__wrapped__");if(p||d){var g=p?e.value():e,_=d?t.value():t;return o||(o=new Vst),i(g,_,r,n,o)}}return f?(o||(o=new Vst),gJe(e,t,r,n,i,o)):!1}vee.exports=xJe});var Ust=H((TKn,See)=>{var bJe=xee(),bee=Yu();function wee(e,t,r,n,i){return e===t?!0:e==null||t==null||!bee(e)&&!bee(t)?e!==e&&t!==t:bJe(e,t,r,n,wee,i)}See.exports=wee});var Eee=H((CKn,Mee)=>{var wJe=P4(),SJe=Ust(),MJe=1,EJe=2;function TJe(e,t,r,n){var i=r.length,o=i,a=!n;if(e==null)return!o;for(e=Object(e);i--;){var s=r[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){s=r[i];var l=s[0],c=e[l],u=s[1];if(a&&s[2]){if(c===void 0&&!(l in e))return!1}else{var h=new wJe;if(n)var f=n(c,u,l,e,t,h);if(!(f===void 0?SJe(u,c,MJe|EJe,n,h):f))return!1}}return!0}Mee.exports=TJe});var qst=H((AKn,Tee)=>{var CJe=Ml();function AJe(e){return e===e&&!CJe(e)}Tee.exports=AJe});var Aee=H((PKn,Cee)=>{var PJe=qst(),IJe=Ad();function LJe(e){for(var t=IJe(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,PJe(i)]}return t}Cee.exports=LJe});var Gst=H((IKn,Pee)=>{function kJe(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}Pee.exports=kJe});var Lee=H((LKn,Iee)=>{var RJe=Eee(),NJe=Aee(),DJe=Gst();function OJe(e){var t=NJe(e);return t.length==1&&t[0][2]?DJe(t[0][0],t[0][1]):function(r){return r===e||RJe(r,e,t)}}Iee.exports=OJe});var Zv=H((kKn,kee)=>{var zJe=s0(),FJe=Yu(),BJe="[object Symbol]";function HJe(e){return typeof e=="symbol"||FJe(e)&&zJe(e)==BJe}kee.exports=HJe});var QB=H((RKn,Ree)=>{var VJe=Ti(),UJe=Zv(),qJe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,GJe=/^\w*$/;function WJe(e,t){if(VJe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||UJe(e)?!0:GJe.test(e)||!qJe.test(e)||t!=null&&e in Object(t)}Ree.exports=WJe});var Oee=H((NKn,Dee)=>{var Nee=FB(),YJe="Expected a function";function Wst(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(YJe);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(Wst.Cache||Nee),r}Wst.Cache=Nee;Dee.exports=Wst});var Fee=H((DKn,zee)=>{var jJe=Oee(),XJe=500;function $Je(e){var t=jJe(e,function(n){return r.size===XJe&&r.clear(),n}),r=t.cache;return t}zee.exports=$Je});var Hee=H((OKn,Bee)=>{var KJe=Fee(),ZJe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,JJe=/\\(\\)?/g,QJe=KJe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(ZJe,function(r,n,i,o){t.push(i?o.replace(JJe,"$1"):n||r)}),t});Bee.exports=QJe});var V4=H((zKn,Vee)=>{function tQe(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}Vee.exports=tQe});var jee=H((FKn,Yee)=>{var Uee=jv(),eQe=V4(),rQe=Ti(),nQe=Zv(),iQe=1/0,qee=Uee?Uee.prototype:void 0,Gee=qee?qee.toString:void 0;function Wee(e){if(typeof e=="string")return e;if(rQe(e))return eQe(e,Wee)+"";if(nQe(e))return Gee?Gee.call(e):"";var t=e+"";return t=="0"&&1/e==-iQe?"-0":t}Yee.exports=Wee});var Yst=H((BKn,Xee)=>{var oQe=jee();function aQe(e){return e==null?"":oQe(e)}Xee.exports=aQe});var U4=H((HKn,$ee)=>{var sQe=Ti(),lQe=QB(),cQe=Hee(),uQe=Yst();function hQe(e,t){return sQe(e)?e:lQe(e,t)?[e]:cQe(uQe(e))}$ee.exports=hQe});var $S=H((VKn,Kee)=>{var fQe=Zv(),pQe=1/0;function dQe(e){if(typeof e=="string"||fQe(e))return e;var t=e+"";return t=="0"&&1/e==-pQe?"-0":t}Kee.exports=dQe});var q4=H((UKn,Zee)=>{var mQe=U4(),gQe=$S();function _Qe(e,t){t=mQe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[gQe(t[r++])];return r&&r==n?e:void 0}Zee.exports=_Qe});var Qee=H((qKn,Jee)=>{var yQe=q4();function vQe(e,t,r){var n=e==null?void 0:yQe(e,t);return n===void 0?r:n}Jee.exports=vQe});var ere=H((GKn,tre)=>{function xQe(e,t){return e!=null&&t in Object(e)}tre.exports=xQe});var jst=H((WKn,rre)=>{var bQe=U4(),wQe=qS(),SQe=Ti(),MQe=R4(),EQe=HB(),TQe=$S();function CQe(e,t,r){t=bQe(t,e);for(var n=-1,i=t.length,o=!1;++n<i;){var a=TQe(t[n]);if(!(o=e!=null&&r(e,a)))break;e=e[a]}return o||++n!=i?o:(i=e==null?0:e.length,!!i&&EQe(i)&&MQe(a,i)&&(SQe(e)||wQe(e)))}rre.exports=CQe});var Xst=H((YKn,nre)=>{var AQe=ere(),PQe=jst();function IQe(e,t){return e!=null&&PQe(e,t,AQe)}nre.exports=IQe});var ore=H((jKn,ire)=>{var LQe=Ust(),kQe=Qee(),RQe=Xst(),NQe=QB(),DQe=qst(),OQe=Gst(),zQe=$S(),FQe=1,BQe=2;function HQe(e,t){return NQe(e)&&DQe(t)?OQe(zQe(e),t):function(r){var n=kQe(r,e);return n===void 0&&n===t?RQe(r,e):LQe(t,n,FQe|BQe)}}ire.exports=HQe});var $st=H((XKn,are)=>{function VQe(e){return function(t){return t==null?void 0:t[e]}}are.exports=VQe});var lre=H(($Kn,sre)=>{var UQe=q4();function qQe(e){return function(t){return UQe(t,e)}}sre.exports=qQe});var ure=H((KKn,cre)=>{var GQe=$st(),WQe=lre(),YQe=QB(),jQe=$S();function XQe(e){return YQe(e)?GQe(jQe(e)):WQe(e)}cre.exports=XQe});var Hf=H((ZKn,hre)=>{var $Qe=Lee(),KQe=ore(),ZQe=u0(),JQe=Ti(),QQe=ure();function ttr(e){return typeof e=="function"?e:e==null?ZQe:typeof e=="object"?JQe(e)?KQe(e[0],e[1]):$Qe(e):QQe(e)}hre.exports=ttr});var Kst=H((JKn,fre)=>{var etr=yst(),rtr=Yte(),ntr=Hf(),itr=Ti();function otr(e,t){var r=itr(e)?etr:rtr;return r(e,ntr(t,3))}fre.exports=otr});var dre=H((QKn,pre)=>{var atr=Object.prototype,str=atr.hasOwnProperty;function ltr(e,t){return e!=null&&str.call(e,t)}pre.exports=ltr});var Zst=H((tZn,mre)=>{var ctr=dre(),utr=jst();function htr(e,t){return e!=null&&utr(e,t,ctr)}mre.exports=htr});var _re=H((eZn,gre)=>{var ftr=UB(),ptr=Kv(),dtr=qS(),mtr=Ti(),gtr=Bf(),_tr=Xv(),ytr=z4(),vtr=YS(),xtr="[object Map]",btr="[object Set]",wtr=Object.prototype,Str=wtr.hasOwnProperty;function Mtr(e){if(e==null)return!0;if(gtr(e)&&(mtr(e)||typeof e=="string"||typeof e.splice=="function"||_tr(e)||vtr(e)||dtr(e)))return!e.length;var t=ptr(e);if(t==xtr||t==btr)return!e.size;if(ytr(e))return!ftr(e).length;for(var r in e)if(Str.call(e,r))return!1;return!0}gre.exports=Mtr});var Jst=H((rZn,yre)=>{function Etr(e){return e===void 0}yre.exports=Etr});var Qst=H((nZn,vre)=>{var Ttr=H4(),Ctr=Bf();function Atr(e,t){var r=-1,n=Ctr(e)?Array(e.length):[];return Ttr(e,function(i,o,a){n[++r]=t(i,o,a)}),n}vre.exports=Atr});var tlt=H((iZn,xre)=>{var Ptr=V4(),Itr=Hf(),Ltr=Qst(),ktr=Ti();function Rtr(e,t){var r=ktr(e)?Ptr:Ltr;return r(e,Itr(t,3))}xre.exports=Rtr});var wre=H((oZn,bre)=>{function Ntr(e,t,r,n){var i=-1,o=e==null?0:e.length;for(n&&o&&(r=e[++i]);++i<o;)r=t(r,e[i],i,e);return r}bre.exports=Ntr});var Mre=H((aZn,Sre)=>{function Dtr(e,t,r,n,i){return i(e,function(o,a,s){r=n?(n=!1,o):t(r,o,a,s)}),r}Sre.exports=Dtr});var elt=H((sZn,Ere)=>{var Otr=wre(),ztr=H4(),Ftr=Hf(),Btr=Mre(),Htr=Ti();function Vtr(e,t,r){var n=Htr(e)?Otr:Btr,i=arguments.length<3;return n(e,Ftr(t,4),r,i,ztr)}Ere.exports=Vtr});var Cre=H((lZn,Tre)=>{var Utr=s0(),qtr=Ti(),Gtr=Yu(),Wtr="[object String]";function Ytr(e){return typeof e=="string"||!qtr(e)&&Gtr(e)&&Utr(e)==Wtr}Tre.exports=Ytr});var Pre=H((cZn,Are)=>{var jtr=$st(),Xtr=jtr("length");Are.exports=Xtr});var Lre=H((uZn,Ire)=>{var $tr="\\ud800-\\udfff",Ktr="\\u0300-\\u036f",Ztr="\\ufe20-\\ufe2f",Jtr="\\u20d0-\\u20ff",Qtr=Ktr+Ztr+Jtr,ter="\\ufe0e\\ufe0f",eer="\\u200d",rer=RegExp("["+eer+$tr+Qtr+ter+"]");function ner(e){return rer.test(e)}Ire.exports=ner});var Hre=H((hZn,Bre)=>{var Rre="\\ud800-\\udfff",ier="\\u0300-\\u036f",oer="\\ufe20-\\ufe2f",aer="\\u20d0-\\u20ff",ser=ier+oer+aer,ler="\\ufe0e\\ufe0f",cer="["+Rre+"]",rlt="["+ser+"]",nlt="\\ud83c[\\udffb-\\udfff]",uer="(?:"+rlt+"|"+nlt+")",Nre="[^"+Rre+"]",Dre="(?:\\ud83c[\\udde6-\\uddff]){2}",Ore="[\\ud800-\\udbff][\\udc00-\\udfff]",her="\\u200d",zre=uer+"?",Fre="["+ler+"]?",fer="(?:"+her+"(?:"+[Nre,Dre,Ore].join("|")+")"+Fre+zre+")*",per=Fre+zre+fer,der="(?:"+[Nre+rlt+"?",rlt,Dre,Ore,cer].join("|")+")",kre=RegExp(nlt+"(?="+nlt+")|"+der+per,"g");function mer(e){for(var t=kre.lastIndex=0;kre.test(e);)++t;return t}Bre.exports=mer});var Ure=H((fZn,Vre)=>{var ger=Pre(),_er=Lre(),yer=Hre();function ver(e){return _er(e)?yer(e):ger(e)}Vre.exports=ver});var Gre=H((pZn,qre)=>{var xer=UB(),ber=Kv(),wer=Bf(),Ser=Cre(),Mer=Ure(),Eer="[object Map]",Ter="[object Set]";function Cer(e){if(e==null)return 0;if(wer(e))return Ser(e)?Mer(e):e.length;var t=ber(e);return t==Eer||t==Ter?e.size:xer(e).length}qre.exports=Cer});var Yre=H((dZn,Wre)=>{var Aer=BB(),Per=Lst(),Ier=$B(),Ler=Hf(),ker=B4(),Rer=Ti(),Ner=Xv(),Der=FS(),Oer=Ml(),zer=YS();function Fer(e,t,r){var n=Rer(e),i=n||Ner(e)||zer(e);if(t=Ler(t,4),r==null){var o=e&&e.constructor;i?r=n?new o:[]:Oer(e)?r=Der(o)?Per(ker(e)):{}:r={}}return(i?Aer:Ier)(e,function(a,s,l){return t(r,a,s,l)}),r}Wre.exports=Fer});var Kre=H((mZn,$re)=>{var jre=jv(),Ber=qS(),Her=Ti(),Xre=jre?jre.isConcatSpreadable:void 0;function Ver(e){return Her(e)||Ber(e)||!!(Xre&&e&&e[Xre])}$re.exports=Ver});var tH=H((gZn,Jre)=>{var Uer=GB(),qer=Kre();function Zre(e,t,r,n,i){var o=-1,a=e.length;for(r||(r=qer),i||(i=[]);++o<a;){var s=e[o];t>0&&r(s)?t>1?Zre(s,t-1,r,n,i):Uer(i,s):n||(i[i.length]=s)}return i}Jre.exports=Zre});var tne=H((_Zn,Qre)=>{function Ger(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}Qre.exports=Ger});var ilt=H((yZn,rne)=>{var Wer=tne(),ene=Math.max;function Yer(e,t,r){return t=ene(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,o=ene(n.length-t,0),a=Array(o);++i<o;)a[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(a),Wer(e,this,s)}}rne.exports=Yer});var one=H((vZn,ine)=>{var jer=jB(),nne=fst(),Xer=u0(),$er=nne?function(e,t){return nne(e,"toString",{configurable:!0,enumerable:!1,value:jer(t),writable:!0})}:Xer;ine.exports=$er});var sne=H((xZn,ane)=>{var Ker=800,Zer=16,Jer=Date.now;function Qer(e){var t=0,r=0;return function(){var n=Jer(),i=Zer-(n-r);if(r=n,i>0){if(++t>=Ker)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}ane.exports=Qer});var olt=H((bZn,lne)=>{var trr=one(),err=sne(),rrr=err(trr);lne.exports=rrr});var G4=H((wZn,cne)=>{var nrr=u0(),irr=ilt(),orr=olt();function arr(e,t){return orr(irr(e,t,nrr),e+"")}cne.exports=arr});var alt=H((SZn,une)=>{function srr(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}une.exports=srr});var fne=H((MZn,hne)=>{function lrr(e){return e!==e}hne.exports=lrr});var dne=H((EZn,pne)=>{function crr(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}pne.exports=crr});var gne=H((TZn,mne)=>{var urr=alt(),hrr=fne(),frr=dne();function prr(e,t,r){return t===t?frr(e,t,r):urr(e,hrr,r)}mne.exports=prr});var yne=H((CZn,_ne)=>{var drr=gne();function mrr(e,t){var r=e==null?0:e.length;return!!r&&drr(e,t,0)>-1}_ne.exports=mrr});var xne=H((AZn,vne)=>{function grr(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}vne.exports=grr});var wne=H((PZn,bne)=>{function _rr(){}bne.exports=_rr});var Mne=H((IZn,Sne)=>{var slt=Sst(),yrr=wne(),vrr=ZB(),xrr=1/0,brr=slt&&1/vrr(new slt([,-0]))[1]==xrr?function(e){return new slt(e)}:yrr;Sne.exports=brr});var Tne=H((LZn,Ene)=>{var wrr=zst(),Srr=yne(),Mrr=xne(),Err=Fst(),Trr=Mne(),Crr=ZB(),Arr=200;function Prr(e,t,r){var n=-1,i=Srr,o=e.length,a=!0,s=[],l=s;if(r)a=!1,i=Mrr;else if(o>=Arr){var c=t?null:Trr(e);if(c)return Crr(c);a=!1,i=Err,l=new wrr}else l=t?[]:s;t:for(;++n<o;){var u=e[n],h=t?t(u):u;if(u=r||u!==0?u:0,a&&h===h){for(var f=l.length;f--;)if(l[f]===h)continue t;t&&l.push(h),s.push(u)}else i(l,h,r)||(l!==s&&l.push(h),s.push(u))}return s}Ene.exports=Prr});var llt=H((kZn,Cne)=>{var Irr=Bf(),Lrr=Yu();function krr(e){return Lrr(e)&&Irr(e)}Cne.exports=krr});var Pne=H((RZn,Ane)=>{var Rrr=tH(),Nrr=G4(),Drr=Tne(),Orr=llt(),zrr=Nrr(function(e){return Drr(Rrr(e,1,Orr,!0))});Ane.exports=zrr});var Lne=H((NZn,Ine)=>{var Frr=V4();function Brr(e,t){return Frr(t,function(r){return e[r]})}Ine.exports=Brr});var clt=H((DZn,kne)=>{var Hrr=Lne(),Vrr=Ad();function Urr(e){return e==null?[]:Hrr(e,Vrr(e))}kne.exports=Urr});var El=H((OZn,Rne)=>{var eH;if(typeof Ex=="function")try{eH={clone:kte(),constant:jB(),each:Ost(),filter:Kst(),has:Zst(),isArray:Ti(),isEmpty:_re(),isFunction:FS(),isUndefined:Jst(),keys:Ad(),map:tlt(),reduce:elt(),size:Gre(),transform:Yre(),union:Pne(),values:clt()}}catch(e){}eH||(eH=window._);Rne.exports=eH});var rH=H((FZn,zne)=>{"use strict";var je=El();zne.exports=cr;var qrr="\0",Jv="\0",Nne="";function cr(e){this._isDirected=je.has(e,"directed")?e.directed:!0,this._isMultigraph=je.has(e,"multigraph")?e.multigraph:!1,this._isCompound=je.has(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=je.constant(void 0),this._defaultEdgeLabelFn=je.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Jv]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}cr.prototype._nodeCount=0;cr.prototype._edgeCount=0;cr.prototype.isDirected=function(){return this._isDirected};cr.prototype.isMultigraph=function(){return this._isMultigraph};cr.prototype.isCompound=function(){return this._isCompound};cr.prototype.setGraph=function(e){return this._label=e,this};cr.prototype.graph=function(){return this._label};cr.prototype.setDefaultNodeLabel=function(e){return je.isFunction(e)||(e=je.constant(e)),this._defaultNodeLabelFn=e,this};cr.prototype.nodeCount=function(){return this._nodeCount};cr.prototype.nodes=function(){return je.keys(this._nodes)};cr.prototype.sources=function(){var e=this;return je.filter(this.nodes(),function(t){return je.isEmpty(e._in[t])})};cr.prototype.sinks=function(){var e=this;return je.filter(this.nodes(),function(t){return je.isEmpty(e._out[t])})};cr.prototype.setNodes=function(e,t){var r=arguments,n=this;return je.each(e,function(i){r.length>1?n.setNode(i,t):n.setNode(i)}),this};cr.prototype.setNode=function(e,t){return je.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=Jv,this._children[e]={},this._children[Jv][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)};cr.prototype.node=function(e){return this._nodes[e]};cr.prototype.hasNode=function(e){return je.has(this._nodes,e)};cr.prototype.removeNode=function(e){var t=this;if(je.has(this._nodes,e)){var r=function(n){t.removeEdge(t._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],je.each(this.children(e),function(n){t.setParent(n)}),delete this._children[e]),je.each(je.keys(this._in[e]),r),delete this._in[e],delete this._preds[e],je.each(je.keys(this._out[e]),r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this};cr.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(je.isUndefined(t))t=Jv;else{t+="";for(var r=t;!je.isUndefined(r);r=this.parent(r))if(r===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this};cr.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]};cr.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==Jv)return t}};cr.prototype.children=function(e){if(je.isUndefined(e)&&(e=Jv),this._isCompound){var t=this._children[e];if(t)return je.keys(t)}else{if(e===Jv)return this.nodes();if(this.hasNode(e))return[]}};cr.prototype.predecessors=function(e){var t=this._preds[e];if(t)return je.keys(t)};cr.prototype.successors=function(e){var t=this._sucs[e];if(t)return je.keys(t)};cr.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return je.union(t,this.successors(e))};cr.prototype.isLeaf=function(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0};cr.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;je.each(this._nodes,function(o,a){e(a)&&t.setNode(a,o)}),je.each(this._edgeObjs,function(o){t.hasNode(o.v)&&t.hasNode(o.w)&&t.setEdge(o,r.edge(o))});var n={};function i(o){var a=r.parent(o);return a===void 0||t.hasNode(a)?(n[o]=a,a):a in n?n[a]:i(a)}return this._isCompound&&je.each(t.nodes(),function(o){t.setParent(o,i(o))}),t};cr.prototype.setDefaultEdgeLabel=function(e){return je.isFunction(e)||(e=je.constant(e)),this._defaultEdgeLabelFn=e,this};cr.prototype.edgeCount=function(){return this._edgeCount};cr.prototype.edges=function(){return je.values(this._edgeObjs)};cr.prototype.setPath=function(e,t){var r=this,n=arguments;return je.reduce(e,function(i,o){return n.length>1?r.setEdge(i,o,t):r.setEdge(i,o),o}),this};cr.prototype.setEdge=function(){var e,t,r,n,i=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(e=o.v,t=o.w,r=o.name,arguments.length===2&&(n=arguments[1],i=!0)):(e=o,t=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),e=""+e,t=""+t,je.isUndefined(r)||(r=""+r);var a=W4(this._isDirected,e,t,r);if(je.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=n),this;if(!je.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=i?n:this._defaultEdgeLabelFn(e,t,r);var s=Grr(this._isDirected,e,t,r);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[a]=s,Dne(this._preds[t],e),Dne(this._sucs[e],t),this._in[t][a]=s,this._out[e][a]=s,this._edgeCount++,this};cr.prototype.edge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r);return this._edgeLabels[n]};cr.prototype.hasEdge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r);return je.has(this._edgeLabels,n)};cr.prototype.removeEdge=function(e,t,r){var n=arguments.length===1?ult(this._isDirected,arguments[0]):W4(this._isDirected,e,t,r),i=this._edgeObjs[n];return i&&(e=i.v,t=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],One(this._preds[t],e),One(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this};cr.prototype.inEdges=function(e,t){var r=this._in[e];if(r){var n=je.values(r);return t?je.filter(n,function(i){return i.v===t}):n}};cr.prototype.outEdges=function(e,t){var r=this._out[e];if(r){var n=je.values(r);return t?je.filter(n,function(i){return i.w===t}):n}};cr.prototype.nodeEdges=function(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))};function Dne(e,t){e[t]?e[t]++:e[t]=1}function One(e,t){--e[t]||delete e[t]}function W4(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}return i+Nne+o+Nne+(je.isUndefined(n)?qrr:n)}function Grr(e,t,r,n){var i=""+t,o=""+r;if(!e&&i>o){var a=i;i=o,o=a}var s={v:i,w:o};return n&&(s.name=n),s}function ult(e,t){return W4(e,t.v,t.w,t.name)}});var Bne=H((BZn,Fne)=>{Fne.exports="2.1.8"});var Vne=H((HZn,Hne)=>{Hne.exports={Graph:rH(),version:Bne()}});var qne=H((VZn,Une)=>{var Vf=El(),Wrr=rH();Une.exports={write:Yrr,read:$rr};function Yrr(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:jrr(e),edges:Xrr(e)};return Vf.isUndefined(e.graph())||(t.value=Vf.clone(e.graph())),t}function jrr(e){return Vf.map(e.nodes(),function(t){var r=e.node(t),n=e.parent(t),i={v:t};return Vf.isUndefined(r)||(i.value=r),Vf.isUndefined(n)||(i.parent=n),i})}function Xrr(e){return Vf.map(e.edges(),function(t){var r=e.edge(t),n={v:t.v,w:t.w};return Vf.isUndefined(t.name)||(n.name=t.name),Vf.isUndefined(r)||(n.value=r),n})}function $rr(e){var t=new Wrr(e.options).setGraph(e.value);return Vf.each(e.nodes,function(r){t.setNode(r.v,r.value),r.parent&&t.setParent(r.v,r.parent)}),Vf.each(e.edges,function(r){t.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),t}});var Wne=H((UZn,Gne)=>{var nH=El();Gne.exports=Krr;function Krr(e){var t={},r=[],n;function i(o){nH.has(t,o)||(t[o]=!0,n.push(o),nH.each(e.successors(o),i),nH.each(e.predecessors(o),i))}return nH.each(e.nodes(),function(o){n=[],i(o),n.length&&r.push(n)}),r}});var hlt=H((qZn,jne)=>{var Yne=El();jne.exports=Vc;function Vc(){this._arr=[],this._keyIndices={}}Vc.prototype.size=function(){return this._arr.length};Vc.prototype.keys=function(){return this._arr.map(function(e){return e.key})};Vc.prototype.has=function(e){return Yne.has(this._keyIndices,e)};Vc.prototype.priority=function(e){var t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority};Vc.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key};Vc.prototype.add=function(e,t){var r=this._keyIndices;if(e=String(e),!Yne.has(r,e)){var n=this._arr,i=n.length;return r[e]=i,n.push({key:e,priority:t}),this._decrease(i),!0}return!1};Vc.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key};Vc.prototype.decrease=function(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)};Vc.prototype._heapify=function(e){var t=this._arr,r=2*e,n=r+1,i=e;r<t.length&&(i=t[r].priority<t[i].priority?r:i,n<t.length&&(i=t[n].priority<t[i].priority?n:i),i!==e&&(this._swap(e,i),this._heapify(i)))};Vc.prototype._decrease=function(e){for(var t=this._arr,r=t[e].priority,n;e!==0&&(n=e>>1,!(t[n].priority<r));)this._swap(e,n),e=n};Vc.prototype._swap=function(e,t){var r=this._arr,n=this._keyIndices,i=r[e],o=r[t];r[e]=o,r[t]=i,n[o.key]=e,n[i.key]=t}});var flt=H((GZn,Xne)=>{var Zrr=El(),Jrr=hlt();Xne.exports=tnr;var Qrr=Zrr.constant(1);function tnr(e,t,r,n){return enr(e,String(t),r||Qrr,n||function(i){return e.outEdges(i)})}function enr(e,t,r,n){var i={},o=new Jrr,a,s,l=function(c){var u=c.v!==a?c.v:c.w,h=i[u],f=r(c),p=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+c+" Weight: "+f);p<h.distance&&(h.distance=p,h.predecessor=a,o.decrease(u,p))};for(e.nodes().forEach(function(c){var u=c===t?0:Number.POSITIVE_INFINITY;i[c]={distance:u},o.add(c,u)});o.size()>0&&(a=o.removeMin(),s=i[a],s.distance!==Number.POSITIVE_INFINITY);)n(a).forEach(l);return i}});var Kne=H((WZn,$ne)=>{var rnr=flt(),nnr=El();$ne.exports=inr;function inr(e,t,r){return nnr.transform(e.nodes(),function(n,i){n[i]=rnr(e,i,t,r)},{})}});var plt=H((YZn,Jne)=>{var Zne=El();Jne.exports=onr;function onr(e){var t=0,r=[],n={},i=[];function o(a){var s=n[a]={onStack:!0,lowlink:t,index:t++};if(r.push(a),e.successors(a).forEach(function(u){Zne.has(n,u)?n[u].onStack&&(s.lowlink=Math.min(s.lowlink,n[u].index)):(o(u),s.lowlink=Math.min(s.lowlink,n[u].lowlink))}),s.lowlink===s.index){var l=[],c;do c=r.pop(),n[c].onStack=!1,l.push(c);while(a!==c);i.push(l)}}return e.nodes().forEach(function(a){Zne.has(n,a)||o(a)}),i}});var tie=H((jZn,Qne)=>{var anr=El(),snr=plt();Qne.exports=lnr;function lnr(e){return anr.filter(snr(e),function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}});var rie=H((XZn,eie)=>{var cnr=El();eie.exports=hnr;var unr=cnr.constant(1);function hnr(e,t,r){return fnr(e,t||unr,r||function(n){return e.outEdges(n)})}function fnr(e,t,r){var n={},i=e.nodes();return i.forEach(function(o){n[o]={},n[o][o]={distance:0},i.forEach(function(a){o!==a&&(n[o][a]={distance:Number.POSITIVE_INFINITY})}),r(o).forEach(function(a){var s=a.v===o?a.w:a.v,l=t(a);n[o][s]={distance:l,predecessor:o}})}),i.forEach(function(o){var a=n[o];i.forEach(function(s){var l=n[s];i.forEach(function(c){var u=l[o],h=a[c],f=l[c],p=u.distance+h.distance;p<f.distance&&(f.distance=p,f.predecessor=h.predecessor)})})}),n}});var dlt=H(($Zn,iie)=>{var Y4=El();iie.exports=nie;nie.CycleException=iH;function nie(e){var t={},r={},n=[];function i(o){if(Y4.has(r,o))throw new iH;Y4.has(t,o)||(r[o]=!0,t[o]=!0,Y4.each(e.predecessors(o),i),delete r[o],n.push(o))}if(Y4.each(e.sinks(),i),Y4.size(t)!==e.nodeCount())throw new iH;return n}function iH(){}iH.prototype=new Error});var sie=H((KZn,aie)=>{var oie=dlt();aie.exports=pnr;function pnr(e){try{oie(e)}catch(t){if(t instanceof oie.CycleException)return!1;throw t}return!0}});var mlt=H((ZZn,cie)=>{var oH=El();cie.exports=dnr;function dnr(e,t,r){oH.isArray(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],o={};return oH.each(t,function(a){if(!e.hasNode(a))throw new Error("Graph does not have node: "+a);lie(e,a,r==="post",o,n,i)}),i}function lie(e,t,r,n,i,o){oH.has(n,t)||(n[t]=!0,r||o.push(t),oH.each(i(t),function(a){lie(e,a,r,n,i,o)}),r&&o.push(t))}});var hie=H((JZn,uie)=>{var mnr=mlt();uie.exports=gnr;function gnr(e,t){return mnr(e,t,"post")}});var pie=H((QZn,fie)=>{var _nr=mlt();fie.exports=ynr;function ynr(e,t){return _nr(e,t,"pre")}});var gie=H((tJn,mie)=>{var die=El(),vnr=rH(),xnr=hlt();mie.exports=bnr;function bnr(e,t){var r=new vnr,n={},i=new xnr,o;function a(l){var c=l.v===o?l.w:l.v,u=i.priority(c);if(u!==void 0){var h=t(l);h<u&&(n[c]=o,i.decrease(c,h))}}if(e.nodeCount()===0)return r;die.each(e.nodes(),function(l){i.add(l,Number.POSITIVE_INFINITY),r.setNode(l)}),i.decrease(e.nodes()[0],0);for(var s=!1;i.size()>0;){if(o=i.removeMin(),die.has(n,o))r.setEdge(o,n[o]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(o).forEach(a)}return r}});var yie=H((eJn,_ie)=>{_ie.exports={components:Wne(),dijkstra:flt(),dijkstraAll:Kne(),findCycles:tie(),floydWarshall:rie(),isAcyclic:sie(),postorder:hie(),preorder:pie(),prim:gie(),tarjan:plt(),topsort:dlt()}});var bie=H((rJn,xie)=>{var vie=Vne();xie.exports={Graph:vie.Graph,json:qne(),alg:yie(),version:vie.version}});var Uc=H((nJn,wie)=>{var aH;if(typeof Ex=="function")try{aH=bie()}catch(e){}aH||(aH=window.graphlib);wie.exports=aH});var Mie=H((oJn,Sie)=>{var wnr=Rst(),Snr=1,Mnr=4;function Enr(e){return wnr(e,Snr|Mnr)}Sie.exports=Enr});var j4=H((aJn,Eie)=>{var Tnr=Yv(),Cnr=Bf(),Anr=R4(),Pnr=Ml();function Inr(e,t,r){if(!Pnr(r))return!1;var n=typeof t;return(n=="number"?Cnr(r)&&Anr(t,r.length):n=="string"&&t in r)?Tnr(r[t],e):!1}Eie.exports=Inr});var Aie=H((sJn,Cie)=>{var Lnr=G4(),knr=Yv(),Rnr=j4(),Nnr=c0(),Tie=Object.prototype,Dnr=Tie.hasOwnProperty,Onr=Lnr(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&Rnr(t[0],t[1],i)&&(n=1);++r<n;)for(var o=t[r],a=Nnr(o),s=-1,l=a.length;++s<l;){var c=a[s],u=e[c];(u===void 0||knr(u,Tie[c])&&!Dnr.call(e,c))&&(e[c]=o[c])}return e});Cie.exports=Onr});var Iie=H((lJn,Pie)=>{var znr=Hf(),Fnr=Bf(),Bnr=Ad();function Hnr(e){return function(t,r,n){var i=Object(t);if(!Fnr(t)){var o=znr(r,3);t=Bnr(t),r=function(s){return o(i[s],s,i)}}var a=e(t,r,n);return a>-1?i[o?t[a]:a]:void 0}}Pie.exports=Hnr});var kie=H((cJn,Lie)=>{var Vnr=/\s/;function Unr(e){for(var t=e.length;t--&&Vnr.test(e.charAt(t)););return t}Lie.exports=Unr});var Nie=H((uJn,Rie)=>{var qnr=kie(),Gnr=/^\s+/;function Wnr(e){return e&&e.slice(0,qnr(e)+1).replace(Gnr,"")}Rie.exports=Wnr});var Fie=H((hJn,zie)=>{var Ynr=Nie(),Die=Ml(),jnr=Zv(),Oie=0/0,Xnr=/^[-+]0x[0-9a-f]+$/i,$nr=/^0b[01]+$/i,Knr=/^0o[0-7]+$/i,Znr=parseInt;function Jnr(e){if(typeof e=="number")return e;if(jnr(e))return Oie;if(Die(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Die(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Ynr(e);var r=$nr.test(e);return r||Knr.test(e)?Znr(e.slice(2),r?2:8):Xnr.test(e)?Oie:+e}zie.exports=Jnr});var glt=H((fJn,Hie)=>{var Qnr=Fie(),Bie=1/0,tir=17976931348623157e292;function eir(e){if(!e)return e===0?e:0;if(e=Qnr(e),e===Bie||e===-Bie){var t=e<0?-1:1;return t*tir}return e===e?e:0}Hie.exports=eir});var Uie=H((pJn,Vie)=>{var rir=glt();function nir(e){var t=rir(e),r=t%1;return t===t?r?t-r:t:0}Vie.exports=nir});var Gie=H((dJn,qie)=>{var iir=alt(),oir=Hf(),air=Uie(),sir=Math.max;function lir(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:air(r);return i<0&&(i=sir(n+i,0)),iir(e,oir(t,3),i)}qie.exports=lir});var Yie=H((mJn,Wie)=>{var cir=Iie(),uir=Gie(),hir=cir(uir);Wie.exports=hir});var _lt=H((gJn,jie)=>{var fir=tH();function pir(e){var t=e==null?0:e.length;return t?fir(e,1):[]}jie.exports=pir});var $ie=H((_Jn,Xie)=>{var dir=XB(),mir=Nst(),gir=c0();function _ir(e,t){return e==null?e:dir(e,mir(t),gir)}Xie.exports=_ir});var Zie=H((yJn,Kie)=>{function yir(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}Kie.exports=yir});var Qie=H((vJn,Jie)=>{var vir=I4(),xir=$B(),bir=Hf();function wir(e,t){var r={};return t=bir(t,3),xir(e,function(n,i,o){vir(r,i,t(n,i,o))}),r}Jie.exports=wir});var sH=H((xJn,toe)=>{var Sir=Zv();function Mir(e,t,r){for(var n=-1,i=e.length;++n<i;){var o=e[n],a=t(o);if(a!=null&&(s===void 0?a===a&&!Sir(a):r(a,s)))var s=a,l=o}return l}toe.exports=Mir});var roe=H((bJn,eoe)=>{function Eir(e,t){return e>t}eoe.exports=Eir});var ioe=H((wJn,noe)=>{var Tir=sH(),Cir=roe(),Air=u0();function Pir(e){return e&&e.length?Tir(e,Air,Cir):void 0}noe.exports=Pir});var ylt=H((SJn,ooe)=>{var Iir=I4(),Lir=Yv();function kir(e,t,r){(r!==void 0&&!Lir(e[t],r)||r===void 0&&!(t in e))&&Iir(e,t,r)}ooe.exports=kir});var loe=H((MJn,soe)=>{var Rir=s0(),Nir=B4(),Dir=Yu(),Oir="[object Object]",zir=Function.prototype,Fir=Object.prototype,aoe=zir.toString,Bir=Fir.hasOwnProperty,Hir=aoe.call(Object);function Vir(e){if(!Dir(e)||Rir(e)!=Oir)return!1;var t=Nir(e);if(t===null)return!0;var r=Bir.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&aoe.call(r)==Hir}soe.exports=Vir});var vlt=H((EJn,coe)=>{function Uir(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}coe.exports=Uir});var hoe=H((TJn,uoe)=>{var qir=US(),Gir=c0();function Wir(e){return qir(e,Gir(e))}uoe.exports=Wir});var _oe=H((CJn,goe)=>{var foe=ylt(),Yir=gst(),jir=Ist(),Xir=_st(),$ir=kst(),poe=qS(),doe=Ti(),Kir=llt(),Zir=Xv(),Jir=FS(),Qir=Ml(),tor=loe(),eor=YS(),moe=vlt(),ror=hoe();function nor(e,t,r,n,i,o,a){var s=moe(e,r),l=moe(t,r),c=a.get(l);if(c){foe(e,r,c);return}var u=o?o(s,l,r+"",e,t,a):void 0,h=u===void 0;if(h){var f=doe(l),p=!f&&Zir(l),d=!f&&!p&&eor(l);u=l,f||p||d?doe(s)?u=s:Kir(s)?u=Xir(s):p?(h=!1,u=Yir(l,!0)):d?(h=!1,u=jir(l,!0)):u=[]:tor(l)||poe(l)?(u=s,poe(s)?u=ror(s):(!Qir(s)||Jir(s))&&(u=$ir(l))):h=!1}h&&(a.set(l,u),i(u,l,n,o,a),a.delete(l)),foe(e,r,u)}goe.exports=nor});var xoe=H((AJn,voe)=>{var ior=P4(),oor=ylt(),aor=XB(),sor=_oe(),lor=Ml(),cor=c0(),uor=vlt();function yoe(e,t,r,n,i){e!==t&&aor(t,function(o,a){if(i||(i=new ior),lor(o))sor(e,t,a,r,yoe,n,i);else{var s=n?n(uor(e,a),o,a+"",e,t,i):void 0;s===void 0&&(s=o),oor(e,a,s)}},cor)}voe.exports=yoe});var woe=H((PJn,boe)=>{var hor=G4(),por=j4();function dor(e){return hor(function(t,r){var n=-1,i=r.length,o=i>1?r[i-1]:void 0,a=i>2?r[2]:void 0;for(o=e.length>3&&typeof o=="function"?(i--,o):void 0,a&&por(r[0],r[1],a)&&(o=i<3?void 0:o,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,o)}return t})}boe.exports=dor});var Moe=H((IJn,Soe)=>{var mor=xoe(),gor=woe(),_or=gor(function(e,t,r){mor(e,t,r)});Soe.exports=_or});var xlt=H((LJn,Eoe)=>{function yor(e,t){return e<t}Eoe.exports=yor});var Coe=H((kJn,Toe)=>{var vor=sH(),xor=xlt(),bor=u0();function wor(e){return e&&e.length?vor(e,bor,xor):void 0}Toe.exports=wor});var Poe=H((RJn,Aoe)=>{var Sor=sH(),Mor=Hf(),Eor=xlt();function Tor(e,t){return e&&e.length?Sor(e,Mor(t,2),Eor):void 0}Aoe.exports=Tor});var Loe=H((NJn,Ioe)=>{var Cor=Hc(),Aor=function(){return Cor.Date.now()};Ioe.exports=Aor});var Noe=H((DJn,Roe)=>{var Por=L4(),Ior=U4(),Lor=R4(),koe=Ml(),kor=$S();function Ror(e,t,r,n){if(!koe(e))return e;t=Ior(t,e);for(var i=-1,o=t.length,a=o-1,s=e;s!=null&&++i<o;){var l=kor(t[i]),c=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(i!=a){var u=s[l];c=n?n(u,l,s):void 0,c===void 0&&(c=koe(u)?u:Lor(t[i+1])?[]:{})}Por(s,l,c),s=s[l]}return e}Roe.exports=Ror});var Ooe=H((OJn,Doe)=>{var Nor=q4(),Dor=Noe(),Oor=U4();function zor(e,t,r){for(var n=-1,i=t.length,o={};++n<i;){var a=t[n],s=Nor(e,a);r(s,a)&&Dor(o,Oor(a,e),s)}return o}Doe.exports=zor});var Foe=H((zJn,zoe)=>{var For=Ooe(),Bor=Xst();function Hor(e,t){return For(e,t,function(r,n){return Bor(e,n)})}zoe.exports=Hor});var Hoe=H((FJn,Boe)=>{var Vor=_lt(),Uor=ilt(),qor=olt();function Gor(e){return qor(Uor(e,void 0,Vor),e+"")}Boe.exports=Gor});var Uoe=H((BJn,Voe)=>{var Wor=Foe(),Yor=Hoe(),jor=Yor(function(e,t){return e==null?{}:Wor(e,t)});Voe.exports=jor});var Goe=H((HJn,qoe)=>{var Xor=Math.ceil,$or=Math.max;function Kor(e,t,r,n){for(var i=-1,o=$or(Xor((t-e)/(r||1)),0),a=Array(o);o--;)a[n?o:++i]=e,e+=r;return a}qoe.exports=Kor});var Yoe=H((VJn,Woe)=>{var Zor=Goe(),Jor=j4(),blt=glt();function Qor(e){return function(t,r,n){return n&&typeof n!="number"&&Jor(t,r,n)&&(r=n=void 0),t=blt(t),r===void 0?(r=t,t=0):r=blt(r),n=n===void 0?t<r?1:-1:blt(n),Zor(t,r,n,e)}}Woe.exports=Qor});var Xoe=H((UJn,joe)=>{var tar=Yoe(),ear=tar();joe.exports=ear});var Koe=H((qJn,$oe)=>{function rar(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}$oe.exports=rar});var Qoe=H((GJn,Joe)=>{var Zoe=Zv();function nar(e,t){if(e!==t){var r=e!==void 0,n=e===null,i=e===e,o=Zoe(e),a=t!==void 0,s=t===null,l=t===t,c=Zoe(t);if(!s&&!c&&!o&&e>t||o&&a&&l&&!s&&!c||n&&a&&l||!r&&l||!i)return 1;if(!n&&!o&&!c&&e<t||c&&r&&i&&!n&&!o||s&&r&&i||!a&&i||!l)return-1}return 0}Joe.exports=nar});var eae=H((WJn,tae)=>{var iar=Qoe();function oar(e,t,r){for(var n=-1,i=e.criteria,o=t.criteria,a=i.length,s=r.length;++n<a;){var l=iar(i[n],o[n]);if(l){if(n>=s)return l;var c=r[n];return l*(c=="desc"?-1:1)}}return e.index-t.index}tae.exports=oar});var nae=H((YJn,rae)=>{var wlt=V4(),aar=q4(),sar=Hf(),lar=Qst(),car=Koe(),uar=N4(),har=eae(),far=u0(),par=Ti();function dar(e,t,r){t.length?t=wlt(t,function(o){return par(o)?function(a){return aar(a,o.length===1?o[0]:o)}:o}):t=[far];var n=-1;t=wlt(t,uar(sar));var i=lar(e,function(o,a,s){var l=wlt(t,function(c){return c(o)});return{criteria:l,index:++n,value:o}});return car(i,function(o,a){return har(o,a,r)})}rae.exports=dar});var aae=H((jJn,oae)=>{var mar=tH(),gar=nae(),_ar=G4(),iae=j4(),yar=_ar(function(e,t){if(e==null)return[];var r=t.length;return r>1&&iae(e,t[0],t[1])?t=[]:r>2&&iae(t[0],t[1],t[2])&&(t=[t[0]]),gar(e,mar(t,1),[])});oae.exports=yar});var lae=H((XJn,sae)=>{var xar=Yst(),bar=0;function war(e){var t=++bar;return xar(e)+t}sae.exports=war});var uae=H(($Jn,cae)=>{function Sar(e,t,r){for(var n=-1,i=e.length,o=t.length,a={};++n<i;){var s=n<o?t[n]:void 0;r(a,e[n],s)}return a}cae.exports=Sar});var fae=H((KJn,hae)=>{var Mar=L4(),Ear=uae();function Tar(e,t){return Ear(e||[],t||[],Mar)}hae.exports=Tar});var Un=H((ZJn,pae)=>{var lH;if(typeof Ex=="function")try{lH={cloneDeep:Mie(),constant:jB(),defaults:Aie(),each:Ost(),filter:Kst(),find:Yie(),flatten:_lt(),forEach:Dst(),forIn:$ie(),has:Zst(),isUndefined:Jst(),last:Zie(),map:tlt(),mapValues:Qie(),max:ioe(),merge:Moe(),min:Coe(),minBy:Poe(),now:Loe(),pick:Uoe(),range:Xoe(),reduce:elt(),sortBy:aae(),uniqueId:lae(),values:clt(),zipObject:fae()}}catch(e){}lH||(lH=window._);pae.exports=lH});var gae=H((QJn,mae)=>{mae.exports=cH;function cH(){var e={};e._next=e._prev=e,this._sentinel=e}cH.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return dae(t),t};cH.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&dae(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};cH.prototype.toString=function(){for(var e=[],t=this._sentinel,r=t._prev;r!==t;)e.push(JSON.stringify(r,Car)),r=r._prev;return"["+e.join(", ")+"]"};function dae(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Car(e,t){if(e!=="_next"&&e!=="_prev")return t}});var yae=H((tQn,_ae)=>{var Pd=Un(),Aar=Uc().Graph,Par=gae();_ae.exports=Lar;var Iar=Pd.constant(1);function Lar(e,t){if(e.nodeCount()<=1)return[];var r=Rar(e,t||Iar),n=kar(r.graph,r.buckets,r.zeroIdx);return Pd.flatten(Pd.map(n,function(i){return e.outEdges(i.v,i.w)}),!0)}function kar(e,t,r){for(var n=[],i=t[t.length-1],o=t[0],a;e.nodeCount();){for(;a=o.dequeue();)Slt(e,t,r,a);for(;a=i.dequeue();)Slt(e,t,r,a);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(a=t[s].dequeue(),a){n=n.concat(Slt(e,t,r,a,!0));break}}}return n}function Slt(e,t,r,n,i){var o=i?[]:void 0;return Pd.forEach(e.inEdges(n.v),function(a){var s=e.edge(a),l=e.node(a.v);i&&o.push({v:a.v,w:a.w}),l.out-=s,Mlt(t,r,l)}),Pd.forEach(e.outEdges(n.v),function(a){var s=e.edge(a),l=a.w,c=e.node(l);c.in-=s,Mlt(t,r,c)}),e.removeNode(n.v),o}function Rar(e,t){var r=new Aar,n=0,i=0;Pd.forEach(e.nodes(),function(s){r.setNode(s,{v:s,in:0,out:0})}),Pd.forEach(e.edges(),function(s){var l=r.edge(s.v,s.w)||0,c=t(s),u=l+c;r.setEdge(s.v,s.w,u),i=Math.max(i,r.node(s.v).out+=c),n=Math.max(n,r.node(s.w).in+=c)});var o=Pd.range(i+n+3).map(function(){return new Par}),a=n+1;return Pd.forEach(r.nodes(),function(s){Mlt(o,a,r.node(s))}),{graph:r,buckets:o,zeroIdx:a}}function Mlt(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}});var xae=H((eQn,vae)=>{"use strict";var Qv=Un(),Nar=yae();vae.exports={run:Dar,undo:zar};function Dar(e){var t=e.graph().acyclicer==="greedy"?Nar(e,r(e)):Oar(e);Qv.forEach(t,function(n){var i=e.edge(n);e.removeEdge(n),i.forwardName=n.name,i.reversed=!0,e.setEdge(n.w,n.v,i,Qv.uniqueId("rev"))});function r(n){return function(i){return n.edge(i).weight}}}function Oar(e){var t=[],r={},n={};function i(o){Qv.has(n,o)||(n[o]=!0,r[o]=!0,Qv.forEach(e.outEdges(o),function(a){Qv.has(r,a.w)?t.push(a):i(a.w)}),delete r[o])}return Qv.forEach(e.nodes(),i),t}function zar(e){Qv.forEach(e.edges(),function(t){var r=e.edge(t);if(r.reversed){e.removeEdge(t);var n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}});var ns=H((rQn,Mae)=>{"use strict";var Qr=Un(),bae=Uc().Graph;Mae.exports={addDummyNode:wae,simplify:Far,asNonCompoundGraph:Bar,successorWeights:Har,predecessorWeights:Var,intersectRect:Uar,buildLayerMatrix:qar,normalizeRanks:Gar,removeEmptyRanks:War,addBorderNode:Yar,maxRank:Sae,partition:jar,time:Xar,notime:$ar};function wae(e,t,r,n){var i;do i=Qr.uniqueId(n);while(e.hasNode(i));return r.dummy=t,e.setNode(i,r),i}function Far(e){var t=new bae().setGraph(e.graph());return Qr.forEach(e.nodes(),function(r){t.setNode(r,e.node(r))}),Qr.forEach(e.edges(),function(r){var n=t.edge(r.v,r.w)||{weight:0,minlen:1},i=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+i.weight,minlen:Math.max(n.minlen,i.minlen)})}),t}function Bar(e){var t=new bae({multigraph:e.isMultigraph()}).setGraph(e.graph());return Qr.forEach(e.nodes(),function(r){e.children(r).length||t.setNode(r,e.node(r))}),Qr.forEach(e.edges(),function(r){t.setEdge(r,e.edge(r))}),t}function Har(e){var t=Qr.map(e.nodes(),function(r){var n={};return Qr.forEach(e.outEdges(r),function(i){n[i.w]=(n[i.w]||0)+e.edge(i).weight}),n});return Qr.zipObject(e.nodes(),t)}function Var(e){var t=Qr.map(e.nodes(),function(r){var n={};return Qr.forEach(e.inEdges(r),function(i){n[i.v]=(n[i.v]||0)+e.edge(i).weight}),n});return Qr.zipObject(e.nodes(),t)}function Uar(e,t){var r=e.x,n=e.y,i=t.x-r,o=t.y-n,a=e.width/2,s=e.height/2;if(!i&&!o)throw new Error("Not possible to find intersection inside of the rectangle");var l,c;return Math.abs(o)*a>Math.abs(i)*s?(o<0&&(s=-s),l=s*i/o,c=s):(i<0&&(a=-a),l=a,c=a*o/i),{x:r+l,y:n+c}}function qar(e){var t=Qr.map(Qr.range(Sae(e)+1),function(){return[]});return Qr.forEach(e.nodes(),function(r){var n=e.node(r),i=n.rank;Qr.isUndefined(i)||(t[i][n.order]=r)}),t}function Gar(e){var t=Qr.min(Qr.map(e.nodes(),function(r){return e.node(r).rank}));Qr.forEach(e.nodes(),function(r){var n=e.node(r);Qr.has(n,"rank")&&(n.rank-=t)})}function War(e){var t=Qr.min(Qr.map(e.nodes(),function(o){return e.node(o).rank})),r=[];Qr.forEach(e.nodes(),function(o){var a=e.node(o).rank-t;r[a]||(r[a]=[]),r[a].push(o)});var n=0,i=e.graph().nodeRankFactor;Qr.forEach(r,function(o,a){Qr.isUndefined(o)&&a%i!==0?--n:n&&Qr.forEach(o,function(s){e.node(s).rank+=n})})}function Yar(e,t,r,n){var i={width:0,height:0};return arguments.length>=4&&(i.rank=r,i.order=n),wae(e,"border",i,t)}function Sae(e){return Qr.max(Qr.map(e.nodes(),function(t){var r=e.node(t).rank;if(!Qr.isUndefined(r))return r}))}function jar(e,t){var r={lhs:[],rhs:[]};return Qr.forEach(e,function(n){t(n)?r.lhs.push(n):r.rhs.push(n)}),r}function Xar(e,t){var r=Qr.now();try{return t()}finally{console.log(e+" time: "+(Qr.now()-r)+"ms")}}function $ar(e,t){return t()}});var Cae=H((nQn,Tae)=>{"use strict";var Eae=Un(),Kar=ns();Tae.exports={run:Zar,undo:Qar};function Zar(e){e.graph().dummyChains=[],Eae.forEach(e.edges(),function(t){Jar(e,t)})}function Jar(e,t){var r=t.v,n=e.node(r).rank,i=t.w,o=e.node(i).rank,a=t.name,s=e.edge(t),l=s.labelRank;if(o!==n+1){e.removeEdge(t);var c,u,h;for(h=0,++n;n<o;++h,++n)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:n},c=Kar.addDummyNode(e,"edge",u,"_d"),n===l&&(u.width=s.width,u.height=s.height,u.dummy="edge-label",u.labelpos=s.labelpos),e.setEdge(r,c,{weight:s.weight},a),h===0&&e.graph().dummyChains.push(c),r=c;e.setEdge(r,i,{weight:s.weight},a)}}function Qar(e){Eae.forEach(e.graph().dummyChains,function(t){var r=e.node(t),n=r.edgeLabel,i;for(e.setEdge(r.edgeObj,n);r.dummy;)i=e.successors(t)[0],e.removeNode(t),n.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height),t=i,r=e.node(t)})}});var X4=H((iQn,Aae)=>{"use strict";var uH=Un();Aae.exports={longestPath:tsr,slack:esr};function tsr(e){var t={};function r(n){var i=e.node(n);if(uH.has(t,n))return i.rank;t[n]=!0;var o=uH.min(uH.map(e.outEdges(n),function(a){return r(a.w)-e.edge(a).minlen}));return(o===Number.POSITIVE_INFINITY||o===void 0||o===null)&&(o=0),i.rank=o}uH.forEach(e.sources(),r)}function esr(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}});var Elt=H((oQn,Pae)=>{"use strict";var hH=Un(),rsr=Uc().Graph,fH=X4().slack;Pae.exports=nsr;function nsr(e){var t=new rsr({directed:!1}),r=e.nodes()[0],n=e.nodeCount();t.setNode(r,{});for(var i,o;isr(t,e)<n;)i=osr(t,e),o=t.hasNode(i.v)?fH(e,i):-fH(e,i),asr(t,e,o);return t}function isr(e,t){function r(n){hH.forEach(t.nodeEdges(n),function(i){var o=i.v,a=n===o?i.w:o;!e.hasNode(a)&&!fH(t,i)&&(e.setNode(a,{}),e.setEdge(n,a,{}),r(a))})}return hH.forEach(e.nodes(),r),e.nodeCount()}function osr(e,t){return hH.minBy(t.edges(),function(r){if(e.hasNode(r.v)!==e.hasNode(r.w))return fH(t,r)})}function asr(e,t,r){hH.forEach(e.nodes(),function(n){t.node(n).rank+=r})}});var zae=H((aQn,Oae)=>{"use strict";var Id=Un(),ssr=Elt(),lsr=X4().slack,csr=X4().longestPath,usr=Uc().alg.preorder,hsr=Uc().alg.postorder,fsr=ns().simplify;Oae.exports=t1;t1.initLowLimValues=Clt;t1.initCutValues=Tlt;t1.calcCutValue=Lae;t1.leaveEdge=Rae;t1.enterEdge=Nae;t1.exchangeEdges=Dae;function t1(e){e=fsr(e),csr(e);var t=ssr(e);Clt(t),Tlt(t,e);for(var r,n;r=Rae(t);)n=Nae(t,e,r),Dae(t,e,r,n)}function Tlt(e,t){var r=hsr(e,e.nodes());r=r.slice(0,r.length-1),Id.forEach(r,function(n){psr(e,t,n)})}function psr(e,t,r){var n=e.node(r),i=n.parent;e.edge(r,i).cutvalue=Lae(e,t,r)}function Lae(e,t,r){var n=e.node(r),i=n.parent,o=!0,a=t.edge(r,i),s=0;return a||(o=!1,a=t.edge(i,r)),s=a.weight,Id.forEach(t.nodeEdges(r),function(l){var c=l.v===r,u=c?l.w:l.v;if(u!==i){var h=c===o,f=t.edge(l).weight;if(s+=h?f:-f,msr(e,r,u)){var p=e.edge(r,u).cutvalue;s+=h?-p:p}}}),s}function Clt(e,t){arguments.length<2&&(t=e.nodes()[0]),kae(e,{},1,t)}function kae(e,t,r,n,i){var o=r,a=e.node(n);return t[n]=!0,Id.forEach(e.neighbors(n),function(s){Id.has(t,s)||(r=kae(e,t,r,s,n))}),a.low=o,a.lim=r++,i?a.parent=i:delete a.parent,r}function Rae(e){return Id.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Nae(e,t,r){var n=r.v,i=r.w;t.hasEdge(n,i)||(n=r.w,i=r.v);var o=e.node(n),a=e.node(i),s=o,l=!1;o.lim>a.lim&&(s=a,l=!0);var c=Id.filter(t.edges(),function(u){return l===Iae(e,e.node(u.v),s)&&l!==Iae(e,e.node(u.w),s)});return Id.minBy(c,function(u){return lsr(t,u)})}function Dae(e,t,r,n){var i=r.v,o=r.w;e.removeEdge(i,o),e.setEdge(n.v,n.w,{}),Clt(e),Tlt(e,t),dsr(e,t)}function dsr(e,t){var r=Id.find(e.nodes(),function(i){return!t.node(i).parent}),n=usr(e,r);n=n.slice(1),Id.forEach(n,function(i){var o=e.node(i).parent,a=t.edge(i,o),s=!1;a||(a=t.edge(o,i),s=!0),t.node(i).rank=t.node(o).rank+(s?a.minlen:-a.minlen)})}function msr(e,t,r){return e.hasEdge(t,r)}function Iae(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}});var Vae=H((sQn,Hae)=>{"use strict";var gsr=X4(),Bae=gsr.longestPath,_sr=Elt(),ysr=zae();Hae.exports=vsr;function vsr(e){switch(e.graph().ranker){case"network-simplex":Fae(e);break;case"tight-tree":bsr(e);break;case"longest-path":xsr(e);break;default:Fae(e)}}var xsr=Bae;function bsr(e){Bae(e),_sr(e)}function Fae(e){ysr(e)}});var qae=H((lQn,Uae)=>{var Alt=Un();Uae.exports=wsr;function wsr(e){var t=Msr(e);Alt.forEach(e.graph().dummyChains,function(r){for(var n=e.node(r),i=n.edgeObj,o=Ssr(e,t,i.v,i.w),a=o.path,s=o.lca,l=0,c=a[l],u=!0;r!==i.w;){if(n=e.node(r),u){for(;(c=a[l])!==s&&e.node(c).maxRank<n.rank;)l++;c===s&&(u=!1)}if(!u){for(;l<a.length-1&&e.node(c=a[l+1]).minRank<=n.rank;)l++;c=a[l]}e.setParent(r,c),r=e.successors(r)[0]}})}function Ssr(e,t,r,n){var i=[],o=[],a=Math.min(t[r].low,t[n].low),s=Math.max(t[r].lim,t[n].lim),l,c;l=r;do l=e.parent(l),i.push(l);while(l&&(t[l].low>a||s>t[l].lim));for(c=l,l=n;(l=e.parent(l))!==c;)o.push(l);return{path:i.concat(o.reverse()),lca:c}}function Msr(e){var t={},r=0;function n(i){var o=r;Alt.forEach(e.children(i),n),t[i]={low:o,lim:r++}}return Alt.forEach(e.children(),n),t}});var Yae=H((cQn,Wae)=>{var Ld=Un(),Plt=ns();Wae.exports={run:Esr,cleanup:Asr};function Esr(e){var t=Plt.addDummyNode(e,"root",{},"_root"),r=Tsr(e),n=Ld.max(Ld.values(r))-1,i=2*n+1;e.graph().nestingRoot=t,Ld.forEach(e.edges(),function(a){e.edge(a).minlen*=i});var o=Csr(e)+1;Ld.forEach(e.children(),function(a){Gae(e,t,i,o,n,r,a)}),e.graph().nodeRankFactor=i}function Gae(e,t,r,n,i,o,a){var s=e.children(a);if(!s.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:r});return}var l=Plt.addBorderNode(e,"_bt"),c=Plt.addBorderNode(e,"_bb"),u=e.node(a);e.setParent(l,a),u.borderTop=l,e.setParent(c,a),u.borderBottom=c,Ld.forEach(s,function(h){Gae(e,t,r,n,i,o,h);var f=e.node(h),p=f.borderTop?f.borderTop:h,d=f.borderBottom?f.borderBottom:h,g=f.borderTop?n:2*n,_=p!==d?1:i-o[a]+1;e.setEdge(l,p,{weight:g,minlen:_,nestingEdge:!0}),e.setEdge(d,c,{weight:g,minlen:_,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,l,{weight:0,minlen:i+o[a]})}function Tsr(e){var t={};function r(n,i){var o=e.children(n);o&&o.length&&Ld.forEach(o,function(a){r(a,i+1)}),t[n]=i}return Ld.forEach(e.children(),function(n){r(n,1)}),t}function Csr(e){return Ld.reduce(e.edges(),function(t,r){return t+e.edge(r).weight},0)}function Asr(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Ld.forEach(e.edges(),function(r){var n=e.edge(r);n.nestingEdge&&e.removeEdge(r)})}});var $ae=H((uQn,Xae)=>{var Ilt=Un(),Psr=ns();Xae.exports=Isr;function Isr(e){function t(r){var n=e.children(r),i=e.node(r);if(n.length&&Ilt.forEach(n,t),Ilt.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var o=i.minRank,a=i.maxRank+1;o<a;++o)jae(e,"borderLeft","_bl",r,i,o),jae(e,"borderRight","_br",r,i,o)}}Ilt.forEach(e.children(),t)}function jae(e,t,r,n,i,o){var a={width:0,height:0,rank:o,borderType:t},s=i[t][o-1],l=Psr.addDummyNode(e,"border",a,r);i[t][o]=l,e.setParent(l,n),s&&e.setEdge(s,l,{weight:1})}});var Qae=H((hQn,Jae)=>{"use strict";var Uf=Un();Jae.exports={adjust:Lsr,undo:ksr};function Lsr(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&Zae(e)}function ksr(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&Rsr(e),(t==="lr"||t==="rl")&&(Nsr(e),Zae(e))}function Zae(e){Uf.forEach(e.nodes(),function(t){Kae(e.node(t))}),Uf.forEach(e.edges(),function(t){Kae(e.edge(t))})}function Kae(e){var t=e.width;e.width=e.height,e.height=t}function Rsr(e){Uf.forEach(e.nodes(),function(t){Llt(e.node(t))}),Uf.forEach(e.edges(),function(t){var r=e.edge(t);Uf.forEach(r.points,Llt),Uf.has(r,"y")&&Llt(r)})}function Llt(e){e.y=-e.y}function Nsr(e){Uf.forEach(e.nodes(),function(t){klt(e.node(t))}),Uf.forEach(e.edges(),function(t){var r=e.edge(t);Uf.forEach(r.points,klt),Uf.has(r,"x")&&klt(r)})}function klt(e){var t=e.x;e.x=e.y,e.y=t}});var ese=H((fQn,tse)=>{"use strict";var kd=Un();tse.exports=Dsr;function Dsr(e){var t={},r=kd.filter(e.nodes(),function(s){return!e.children(s).length}),n=kd.max(kd.map(r,function(s){return e.node(s).rank})),i=kd.map(kd.range(n+1),function(){return[]});function o(s){if(!kd.has(t,s)){t[s]=!0;var l=e.node(s);i[l.rank].push(s),kd.forEach(e.successors(s),o)}}var a=kd.sortBy(r,function(s){return e.node(s).rank});return kd.forEach(a,o),i}});var nse=H((pQn,rse)=>{"use strict";var h0=Un();rse.exports=Osr;function Osr(e,t){for(var r=0,n=1;n<t.length;++n)r+=zsr(e,t[n-1],t[n]);return r}function zsr(e,t,r){for(var n=h0.zipObject(r,h0.map(r,function(c,u){return u})),i=h0.flatten(h0.map(t,function(c){return h0.sortBy(h0.map(e.outEdges(c),function(u){return{pos:n[u.w],weight:e.edge(u).weight}}),"pos")}),!0),o=1;o<r.length;)o<<=1;var a=2*o-1;o-=1;var s=h0.map(new Array(a),function(){return 0}),l=0;return h0.forEach(i.forEach(function(c){var u=c.pos+o;s[u]+=c.weight;for(var h=0;u>0;)u%2&&(h+=s[u+1]),u=u-1>>1,s[u]+=c.weight;l+=c.weight*h})),l}});var ase=H((dQn,ose)=>{var ise=Un();ose.exports=Fsr;function Fsr(e,t){return ise.map(t,function(r){var n=e.inEdges(r);if(n.length){var i=ise.reduce(n,function(o,a){var s=e.edge(a),l=e.node(a.v);return{sum:o.sum+s.weight*l.order,weight:o.weight+s.weight}},{sum:0,weight:0});return{v:r,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:r}})}});var lse=H((mQn,sse)=>{"use strict";var Tl=Un();sse.exports=Bsr;function Bsr(e,t){var r={};Tl.forEach(e,function(i,o){var a=r[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:o};Tl.isUndefined(i.barycenter)||(a.barycenter=i.barycenter,a.weight=i.weight)}),Tl.forEach(t.edges(),function(i){var o=r[i.v],a=r[i.w];!Tl.isUndefined(o)&&!Tl.isUndefined(a)&&(a.indegree++,o.out.push(r[i.w]))});var n=Tl.filter(r,function(i){return!i.indegree});return Hsr(n)}function Hsr(e){var t=[];function r(o){return function(a){a.merged||(Tl.isUndefined(a.barycenter)||Tl.isUndefined(o.barycenter)||a.barycenter>=o.barycenter)&&Vsr(o,a)}}function n(o){return function(a){a.in.push(o),--a.indegree===0&&e.push(a)}}for(;e.length;){var i=e.pop();t.push(i),Tl.forEach(i.in.reverse(),r(i)),Tl.forEach(i.out,n(i))}return Tl.map(Tl.filter(t,function(o){return!o.merged}),function(o){return Tl.pick(o,["vs","i","barycenter","weight"])})}function Vsr(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}});var hse=H((gQn,use)=>{var $4=Un(),Usr=ns();use.exports=qsr;function qsr(e,t){var r=Usr.partition(e,function(u){return $4.has(u,"barycenter")}),n=r.lhs,i=$4.sortBy(r.rhs,function(u){return-u.i}),o=[],a=0,s=0,l=0;n.sort(Gsr(!!t)),l=cse(o,i,l),$4.forEach(n,function(u){l+=u.vs.length,o.push(u.vs),a+=u.barycenter*u.weight,s+=u.weight,l=cse(o,i,l)});var c={vs:$4.flatten(o,!0)};return s&&(c.barycenter=a/s,c.weight=s),c}function cse(e,t,r){for(var n;t.length&&(n=$4.last(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function Gsr(e){return function(t,r){return t.barycenter<r.barycenter?-1:t.barycenter>r.barycenter?1:e?r.i-t.i:t.i-r.i}}});var dse=H((_Qn,pse)=>{var f0=Un(),Wsr=ase(),Ysr=lse(),jsr=hse();pse.exports=fse;function fse(e,t,r,n){var i=e.children(t),o=e.node(t),a=o?o.borderLeft:void 0,s=o?o.borderRight:void 0,l={};a&&(i=f0.filter(i,function(d){return d!==a&&d!==s}));var c=Wsr(e,i);f0.forEach(c,function(d){if(e.children(d.v).length){var g=fse(e,d.v,r,n);l[d.v]=g,f0.has(g,"barycenter")&&$sr(d,g)}});var u=Ysr(c,r);Xsr(u,l);var h=jsr(u,n);if(a&&(h.vs=f0.flatten([a,h.vs,s],!0),e.predecessors(a).length)){var f=e.node(e.predecessors(a)[0]),p=e.node(e.predecessors(s)[0]);f0.has(h,"barycenter")||(h.barycenter=0,h.weight=0),h.barycenter=(h.barycenter*h.weight+f.order+p.order)/(h.weight+2),h.weight+=2}return h}function Xsr(e,t){f0.forEach(e,function(r){r.vs=f0.flatten(r.vs.map(function(n){return t[n]?t[n].vs:n}),!0)})}function $sr(e,t){f0.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}});var gse=H((yQn,mse)=>{var K4=Un(),Ksr=Uc().Graph;mse.exports=Zsr;function Zsr(e,t,r){var n=Jsr(e),i=new Ksr({compound:!0}).setGraph({root:n}).setDefaultNodeLabel(function(o){return e.node(o)});return K4.forEach(e.nodes(),function(o){var a=e.node(o),s=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(i.setNode(o),i.setParent(o,s||n),K4.forEach(e[r](o),function(l){var c=l.v===o?l.w:l.v,u=i.edge(c,o),h=K4.isUndefined(u)?0:u.weight;i.setEdge(c,o,{weight:e.edge(l).weight+h})}),K4.has(a,"minRank")&&i.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))}),i}function Jsr(e){for(var t;e.hasNode(t=K4.uniqueId("_root")););return t}});var yse=H((vQn,_se)=>{var Qsr=Un();_se.exports=tlr;function tlr(e,t,r){var n={},i;Qsr.forEach(r,function(o){for(var a=e.parent(o),s,l;a;){if(s=e.parent(a),s?(l=n[s],n[s]=a):(l=i,i=a),l&&l!==a){t.setEdge(l,a);return}a=s}})}});var Sse=H((xQn,wse)=>{"use strict";var p0=Un(),elr=ese(),rlr=nse(),nlr=dse(),ilr=gse(),olr=yse(),alr=Uc().Graph,vse=ns();wse.exports=slr;function slr(e){var t=vse.maxRank(e),r=xse(e,p0.range(1,t+1),"inEdges"),n=xse(e,p0.range(t-1,-1,-1),"outEdges"),i=elr(e);bse(e,i);for(var o=Number.POSITIVE_INFINITY,a,s=0,l=0;l<4;++s,++l){llr(s%2?r:n,s%4>=2),i=vse.buildLayerMatrix(e);var c=rlr(e,i);c<o&&(l=0,a=p0.cloneDeep(i),o=c)}bse(e,a)}function xse(e,t,r){return p0.map(t,function(n){return ilr(e,n,r)})}function llr(e,t){var r=new alr;p0.forEach(e,function(n){var i=n.graph().root,o=nlr(n,i,r,t);p0.forEach(o.vs,function(a,s){n.node(a).order=s}),olr(n,r,o.vs)})}function bse(e,t){p0.forEach(t,function(r){p0.forEach(r,function(n,i){e.node(n).order=i})})}});var Rse=H((bQn,kse)=>{"use strict";var Xe=Un(),clr=Uc().Graph,ulr=ns();kse.exports={positionX:plr,findType1Conflicts:Mse,findType2Conflicts:Ese,addConflict:Rlt,hasConflict:Tse,verticalAlignment:Cse,horizontalCompaction:Ase,alignCoordinates:Ise,findSmallestWidthAlignment:Pse,balance:Lse};function Mse(e,t){var r={};function n(i,o){var a=0,s=0,l=i.length,c=Xe.last(o);return Xe.forEach(o,function(u,h){var f=hlr(e,u),p=f?e.node(f).order:l;(f||u===c)&&(Xe.forEach(o.slice(s,h+1),function(d){Xe.forEach(e.predecessors(d),function(g){var _=e.node(g),y=_.order;(y<a||p<y)&&!(_.dummy&&e.node(d).dummy)&&Rlt(r,g,d)})}),s=h+1,a=p)}),o}return Xe.reduce(t,n),r}function Ese(e,t){var r={};function n(o,a,s,l,c){var u;Xe.forEach(Xe.range(a,s),function(h){u=o[h],e.node(u).dummy&&Xe.forEach(e.predecessors(u),function(f){var p=e.node(f);p.dummy&&(p.order<l||p.order>c)&&Rlt(r,f,u)})})}function i(o,a){var s=-1,l,c=0;return Xe.forEach(a,function(u,h){if(e.node(u).dummy==="border"){var f=e.predecessors(u);f.length&&(l=e.node(f[0]).order,n(a,c,h,s,l),c=h,s=l)}n(a,c,a.length,l,o.length)}),a}return Xe.reduce(t,i),r}function hlr(e,t){if(e.node(t).dummy)return Xe.find(e.predecessors(t),function(r){return e.node(r).dummy})}function Rlt(e,t,r){if(t>r){var n=t;t=r,r=n}var i=e[t];i||(e[t]=i={}),i[r]=!0}function Tse(e,t,r){if(t>r){var n=t;t=r,r=n}return Xe.has(e[t],r)}function Cse(e,t,r,n){var i={},o={},a={};return Xe.forEach(t,function(s){Xe.forEach(s,function(l,c){i[l]=l,o[l]=l,a[l]=c})}),Xe.forEach(t,function(s){var l=-1;Xe.forEach(s,function(c){var u=n(c);if(u.length){u=Xe.sortBy(u,function(g){return a[g]});for(var h=(u.length-1)/2,f=Math.floor(h),p=Math.ceil(h);f<=p;++f){var d=u[f];o[c]===c&&l<a[d]&&!Tse(r,c,d)&&(o[d]=c,o[c]=i[c]=i[d],l=a[d])}}})}),{root:i,align:o}}function Ase(e,t,r,n,i){var o={},a=flr(e,t,r,i),s=i?"borderLeft":"borderRight";function l(h,f){for(var p=a.nodes(),d=p.pop(),g={};d;)g[d]?h(d):(g[d]=!0,p.push(d),p=p.concat(f(d))),d=p.pop()}function c(h){o[h]=a.inEdges(h).reduce(function(f,p){return Math.max(f,o[p.v]+a.edge(p))},0)}function u(h){var f=a.outEdges(h).reduce(function(d,g){return Math.min(d,o[g.w]-a.edge(g))},Number.POSITIVE_INFINITY),p=e.node(h);f!==Number.POSITIVE_INFINITY&&p.borderType!==s&&(o[h]=Math.max(o[h],f))}return l(c,a.predecessors.bind(a)),l(u,a.successors.bind(a)),Xe.forEach(n,function(h){o[h]=o[r[h]]}),o}function flr(e,t,r,n){var i=new clr,o=e.graph(),a=dlr(o.nodesep,o.edgesep,n);return Xe.forEach(t,function(s){var l;Xe.forEach(s,function(c){var u=r[c];if(i.setNode(u),l){var h=r[l],f=i.edge(h,u);i.setEdge(h,u,Math.max(a(e,c,l),f||0))}l=c})}),i}function Pse(e,t){return Xe.minBy(Xe.values(t),function(r){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Xe.forIn(r,function(o,a){var s=mlr(e,a)/2;n=Math.max(o+s,n),i=Math.min(o-s,i)}),n-i})}function Ise(e,t){var r=Xe.values(t),n=Xe.min(r),i=Xe.max(r);Xe.forEach(["u","d"],function(o){Xe.forEach(["l","r"],function(a){var s=o+a,l=e[s],c;if(l!==t){var u=Xe.values(l);c=a==="l"?n-Xe.min(u):i-Xe.max(u),c&&(e[s]=Xe.mapValues(l,function(h){return h+c}))}})})}function Lse(e,t){return Xe.mapValues(e.ul,function(r,n){if(t)return e[t.toLowerCase()][n];var i=Xe.sortBy(Xe.map(e,n));return(i[1]+i[2])/2})}function plr(e){var t=ulr.buildLayerMatrix(e),r=Xe.merge(Mse(e,t),Ese(e,t)),n={},i;Xe.forEach(["u","d"],function(a){i=a==="u"?t:Xe.values(t).reverse(),Xe.forEach(["l","r"],function(s){s==="r"&&(i=Xe.map(i,function(h){return Xe.values(h).reverse()}));var l=(a==="u"?e.predecessors:e.successors).bind(e),c=Cse(e,i,r,l),u=Ase(e,i,c.root,c.align,s==="r");s==="r"&&(u=Xe.mapValues(u,function(h){return-h})),n[a+s]=u})});var o=Pse(e,n);return Ise(n,o),Lse(n,e.graph().align)}function dlr(e,t,r){return function(n,i,o){var a=n.node(i),s=n.node(o),l=0,c;if(l+=a.width/2,Xe.has(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":c=-a.width/2;break;case"r":c=a.width/2;break}if(c&&(l+=r?c:-c),c=0,l+=(a.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,Xe.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=s.width/2;break;case"r":c=-s.width/2;break}return c&&(l+=r?c:-c),c=0,l}}function mlr(e,t){return e.node(t).width}});var Ose=H((wQn,Dse)=>{"use strict";var Z4=Un(),Nse=ns(),glr=Rse().positionX;Dse.exports=_lr;function _lr(e){e=Nse.asNonCompoundGraph(e),ylr(e),Z4.forEach(glr(e),function(t,r){e.node(r).x=t})}function ylr(e){var t=Nse.buildLayerMatrix(e),r=e.graph().ranksep,n=0;Z4.forEach(t,function(i){var o=Z4.max(Z4.map(i,function(a){return e.node(a).height}));Z4.forEach(i,function(a){e.node(a).y=n+o/2}),n+=o+r})}});var Use=H((SQn,Vse)=>{"use strict";var ir=Un(),zse=xae(),Fse=Cae(),vlr=Vae(),xlr=ns().normalizeRanks,blr=qae(),wlr=ns().removeEmptyRanks,Bse=Yae(),Slr=$ae(),Hse=Qae(),Mlr=Sse(),Elr=Ose(),d0=ns(),Tlr=Uc().Graph;Vse.exports=Clr;function Clr(e,t){var r=t&&t.debugTiming?d0.time:d0.notime;r("layout",function(){var n=r("  buildLayoutGraph",function(){return Flr(e)});r("  runLayout",function(){Alr(n,r)}),r("  updateInputGraph",function(){Plr(e,n)})})}function Alr(e,t){t("    makeSpaceForEdgeLabels",function(){Blr(e)}),t("    removeSelfEdges",function(){Xlr(e)}),t("    acyclic",function(){zse.run(e)}),t("    nestingGraph.run",function(){Bse.run(e)}),t("    rank",function(){vlr(d0.asNonCompoundGraph(e))}),t("    injectEdgeLabelProxies",function(){Hlr(e)}),t("    removeEmptyRanks",function(){wlr(e)}),t("    nestingGraph.cleanup",function(){Bse.cleanup(e)}),t("    normalizeRanks",function(){xlr(e)}),t("    assignRankMinMax",function(){Vlr(e)}),t("    removeEdgeLabelProxies",function(){Ulr(e)}),t("    normalize.run",function(){Fse.run(e)}),t("    parentDummyChains",function(){blr(e)}),t("    addBorderSegments",function(){Slr(e)}),t("    order",function(){Mlr(e)}),t("    insertSelfEdges",function(){$lr(e)}),t("    adjustCoordinateSystem",function(){Hse.adjust(e)}),t("    position",function(){Elr(e)}),t("    positionSelfEdges",function(){Klr(e)}),t("    removeBorderNodes",function(){jlr(e)}),t("    normalize.undo",function(){Fse.undo(e)}),t("    fixupEdgeLabelCoords",function(){Wlr(e)}),t("    undoCoordinateSystem",function(){Hse.undo(e)}),t("    translateGraph",function(){qlr(e)}),t("    assignNodeIntersects",function(){Glr(e)}),t("    reversePoints",function(){Ylr(e)}),t("    acyclic.undo",function(){zse.undo(e)})}function Plr(e,t){ir.forEach(e.nodes(),function(r){var n=e.node(r),i=t.node(r);n&&(n.x=i.x,n.y=i.y,t.children(r).length&&(n.width=i.width,n.height=i.height))}),ir.forEach(e.edges(),function(r){var n=e.edge(r),i=t.edge(r);n.points=i.points,ir.has(i,"x")&&(n.x=i.x,n.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Ilr=["nodesep","edgesep","ranksep","marginx","marginy"],Llr={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},klr=["acyclicer","ranker","rankdir","align"],Rlr=["width","height"],Nlr={width:0,height:0},Dlr=["minlen","weight","width","height","labeloffset"],Olr={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},zlr=["labelpos"];function Flr(e){var t=new Tlr({multigraph:!0,compound:!0}),r=Dlt(e.graph());return t.setGraph(ir.merge({},Llr,Nlt(r,Ilr),ir.pick(r,klr))),ir.forEach(e.nodes(),function(n){var i=Dlt(e.node(n));t.setNode(n,ir.defaults(Nlt(i,Rlr),Nlr)),t.setParent(n,e.parent(n))}),ir.forEach(e.edges(),function(n){var i=Dlt(e.edge(n));t.setEdge(n,ir.merge({},Olr,Nlt(i,Dlr),ir.pick(i,zlr)))}),t}function Blr(e){var t=e.graph();t.ranksep/=2,ir.forEach(e.edges(),function(r){var n=e.edge(r);n.minlen*=2,n.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?n.width+=n.labeloffset:n.height+=n.labeloffset)})}function Hlr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);if(r.width&&r.height){var n=e.node(t.v),i=e.node(t.w),o={rank:(i.rank-n.rank)/2+n.rank,e:t};d0.addDummyNode(e,"edge-proxy",o,"_ep")}})}function Vlr(e){var t=0;ir.forEach(e.nodes(),function(r){var n=e.node(r);n.borderTop&&(n.minRank=e.node(n.borderTop).rank,n.maxRank=e.node(n.borderBottom).rank,t=ir.max(t,n.maxRank))}),e.graph().maxRank=t}function Ulr(e){ir.forEach(e.nodes(),function(t){var r=e.node(t);r.dummy==="edge-proxy"&&(e.edge(r.e).labelRank=r.rank,e.removeNode(t))})}function qlr(e){var t=Number.POSITIVE_INFINITY,r=0,n=Number.POSITIVE_INFINITY,i=0,o=e.graph(),a=o.marginx||0,s=o.marginy||0;function l(c){var u=c.x,h=c.y,f=c.width,p=c.height;t=Math.min(t,u-f/2),r=Math.max(r,u+f/2),n=Math.min(n,h-p/2),i=Math.max(i,h+p/2)}ir.forEach(e.nodes(),function(c){l(e.node(c))}),ir.forEach(e.edges(),function(c){var u=e.edge(c);ir.has(u,"x")&&l(u)}),t-=a,n-=s,ir.forEach(e.nodes(),function(c){var u=e.node(c);u.x-=t,u.y-=n}),ir.forEach(e.edges(),function(c){var u=e.edge(c);ir.forEach(u.points,function(h){h.x-=t,h.y-=n}),ir.has(u,"x")&&(u.x-=t),ir.has(u,"y")&&(u.y-=n)}),o.width=r-t+a,o.height=i-n+s}function Glr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t),n=e.node(t.v),i=e.node(t.w),o,a;r.points?(o=r.points[0],a=r.points[r.points.length-1]):(r.points=[],o=i,a=n),r.points.unshift(d0.intersectRect(n,o)),r.points.push(d0.intersectRect(i,a))})}function Wlr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);if(ir.has(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function Ylr(e){ir.forEach(e.edges(),function(t){var r=e.edge(t);r.reversed&&r.points.reverse()})}function jlr(e){ir.forEach(e.nodes(),function(t){if(e.children(t).length){var r=e.node(t),n=e.node(r.borderTop),i=e.node(r.borderBottom),o=e.node(ir.last(r.borderLeft)),a=e.node(ir.last(r.borderRight));r.width=Math.abs(a.x-o.x),r.height=Math.abs(i.y-n.y),r.x=o.x+r.width/2,r.y=n.y+r.height/2}}),ir.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function Xlr(e){ir.forEach(e.edges(),function(t){if(t.v===t.w){var r=e.node(t.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function $lr(e){var t=d0.buildLayerMatrix(e);ir.forEach(t,function(r){var n=0;ir.forEach(r,function(i,o){var a=e.node(i);a.order=o+n,ir.forEach(a.selfEdges,function(s){d0.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:a.rank,order:o+ ++n,e:s.e,label:s.label},"_se")}),delete a.selfEdges})})}function Klr(e){ir.forEach(e.nodes(),function(t){var r=e.node(t);if(r.dummy==="selfedge"){var n=e.node(r.e.v),i=n.x+n.width/2,o=n.y,a=r.x-i,s=n.height/2;e.setEdge(r.e,r.label),e.removeNode(t),r.label.points=[{x:i+2*a/3,y:o-s},{x:i+5*a/6,y:o-s},{x:i+a,y:o},{x:i+5*a/6,y:o+s},{x:i+2*a/3,y:o+s}],r.label.x=r.x,r.label.y=r.y}})}function Nlt(e,t){return ir.mapValues(ir.pick(e,t),Number)}function Dlt(e){var t={};return ir.forEach(e,function(r,n){t[n.toLowerCase()]=r}),t}});var Gse=H((MQn,qse)=>{var pH=Un(),Zlr=ns(),Jlr=Uc().Graph;qse.exports={debugOrdering:Qlr};function Qlr(e){var t=Zlr.buildLayerMatrix(e),r=new Jlr({compound:!0,multigraph:!0}).setGraph({});return pH.forEach(e.nodes(),function(n){r.setNode(n,{label:n}),r.setParent(n,"layer"+e.node(n).rank)}),pH.forEach(e.edges(),function(n){r.setEdge(n.v,n.w,{},n.name)}),pH.forEach(t,function(n,i){var o="layer"+i;r.setNode(o,{rank:"same"}),pH.reduce(n,function(a,s){return r.setEdge(a,s,{style:"invis"}),s})}),r}});var Yse=H((EQn,Wse)=>{Wse.exports="0.8.5"});var Olt=H((TQn,jse)=>{jse.exports={graphlib:Uc(),layout:Use(),debug:Gse(),util:{time:ns().time,notime:ns().notime},version:Yse()}});var Vdt=Ee(Hdt(),1),{__extends:d_r,__assign:m_r,__rest:g_r,__decorate:E,__param:__r,__esDecorate:y_r,__runInitializers:v_r,__propKey:x_r,__setFunctionName:b_r,__metadata:w,__awaiter:w_r,__generator:S_r,__exportStar:M_r,__createBinding:E_r,__values:T_r,__read:C_r,__spread:A_r,__spreadArrays:P_r,__spreadArray:I_r,__await:L_r,__asyncGenerator:k_r,__asyncDelegator:R_r,__asyncValues:N_r,__makeTemplateObject:D_r,__importStar:O_r,__importDefault:z_r,__classPrivateFieldGet:F_r,__classPrivateFieldSet:B_r,__classPrivateFieldIn:H_r}=Vdt.default;function yt(e){return t=>{if(e)if(t.hasOwnProperty("is")){if(e!==t.is)throw new Error(`custom element tag names do not match: (${e} !== ${t.is})`)}else Object.defineProperty(t,"is",{value:e});window.customElements.define(t.is,t)}}function Udt(e,t,r){e.constructor.hasOwnProperty("properties")||Object.defineProperty(e.constructor,"properties",{value:{}}),e.constructor.properties[t]=Object.assign({},e.constructor.properties[t],r)}function A(e){return(t,r)=>{Udt(t,r,e)}}function Bt(...e){return(t,r)=>{t.constructor.hasOwnProperty("observers")||Object.defineProperty(t.constructor,"observers",{value:[]}),t.constructor.observers.push(`${r}(${e.join(",")})`)}}function Rt(e,...t){return(r,n,i)=>{let o=`__compute${n}`;Object.defineProperty(r,o,{value:i.get}),i.get=void 0;let a=[e,...t].join(",");Udt(r,n,{computed:`${o}(${a})`})}}var U_r=qdt((e,t)=>e.querySelector(t)),q_r=qdt((e,t)=>e.querySelectorAll(t));function qdt(e){return t=>(r,n)=>{Object.defineProperty(r,n,{get(){return e(this.shadowRoot,t)},enumerable:!0,configurable:!0})}}window.JSCompiler_renameProperty=function(e,t){return e};var Tve=/(url\()([^)]*)(\))/g,Cve=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/,II,Zs;function l_(e,t){if(e&&Cve.test(e)||e==="//")return e;if(II===void 0){II=!1;try{let r=new URL("b","http://a");r.pathname="c%20d",II=r.href==="http://a/c%20d"}catch(r){}}if(t||(t=document.baseURI||window.location.href),II)try{return new URL(e,t).href}catch(r){return e}return Zs||(Zs=document.implementation.createHTMLDocument("temp"),Zs.base=Zs.createElement("base"),Zs.head.appendChild(Zs.base),Zs.anchor=Zs.createElement("a"),Zs.body.appendChild(Zs.anchor)),Zs.base.href=t,Zs.anchor.href=e,Zs.anchor.href||e}function HM(e,t){return e.replace(Tve,function(r,n,i,o){return n+"'"+l_(i.replace(/["']/g,""),t)+"'"+o})}function Cx(e){return e.substring(0,e.lastIndexOf("/")+1)}var c_=!window.ShadyDOM||!window.ShadyDOM.inUse,$_r=Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),K_r=!window.customElements.polyfillWrapFlushCallback,Gdt=c_&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{let e=new CSSStyleSheet;e.replaceSync("");let t=document.createElement("div");return t.attachShadow({mode:"open"}),t.shadowRoot.adoptedStyleSheets=[e],t.shadowRoot.adoptedStyleSheets[0]===e}catch(e){return!1}})(),Wdt=window.Polymer&&window.Polymer.rootPath||Cx(document.baseURI||window.location.href);var VM=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0;var Ydt=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1;var iu=window.Polymer&&window.Polymer.strictTemplatePolicy||!1;var jdt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1;var pp=window.Polymer&&window.Polymer.legacyOptimizations||!1;var LI=window.Polymer&&window.Polymer.legacyWarnings||!1;var Xdt=window.Polymer&&window.Polymer.syncInitialRender||!1;var kI=window.Polymer&&window.Polymer.legacyUndefined||!1;var $dt=window.Polymer&&window.Polymer.orderedComputed||!1;var fG=!0;var pG=window.Polymer&&window.Polymer.removeNestedTemplates||!1;var RI=window.Polymer&&window.Polymer.fastDomIf||!1;var UM=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1;var qM=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1;var Kdt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1;var Ave=0;function Zdt(){}Zdt.prototype.__mixinApplications;Zdt.prototype.__mixinSet;var Rn=function(e){let t=e.__mixinApplications;t||(t=new WeakMap,e.__mixinApplications=t);let r=Ave++;function n(i){let o=i.__mixinSet;if(o&&o[r])return i;let a=t,s=a.get(i);if(!s){s=e(i),a.set(i,s);let l=Object.create(s.__mixinSet||o||null);l[r]=!0,s.__mixinSet=l}return s}return n};var dG={},tmt={};function Jdt(e,t){dG[e]=tmt[e.toLowerCase()]=t}function Qdt(e){return dG[e]||tmt[e.toLowerCase()]}function Pve(e){e.querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var ou=class extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,r){if(t){let n=Qdt(t);return n&&r?n.querySelector(r):n}return null}attributeChangedCallback(t,r,n,i){r!==n&&this.register()}get assetpath(){if(!this.__assetpath){let t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,r=l_(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=Cx(r)}return this.__assetpath}register(t){if(t=t||this.id,t){if(iu&&Qdt(t)!==void 0)throw Jdt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Jdt(t,this),Pve(this)}}};ou.prototype.modules=dG;customElements.define("dom-module",ou);var Ive="link[rel=import][type~=css]",Lve="include",emt="shady-unscoped";function mG(e){return ou.import(e)}function rmt(e){let t=e.body?e.body:e,r=HM(t.textContent,e.baseURI),n=document.createElement("style");return n.textContent=r,n}function kve(e){let t=e.trim().split(/\s+/),r=[];for(let n=0;n<t.length;n++)r.push(...Rve(t[n]));return r}function Rve(e){let t=mG(e);if(!t)return console.warn("Could not find style data in module named",e),[];if(t._styles===void 0){let r=[];r.push(...gG(t));let n=t.querySelector("template");n&&r.push(...NI(n,t.assetpath)),t._styles=r}return t._styles}function NI(e,t){if(!e._styles){let r=[],n=e.content.querySelectorAll("style");for(let i=0;i<n.length;i++){let o=n[i],a=o.getAttribute(Lve);a&&r.push(...kve(a).filter(function(s,l,c){return c.indexOf(s)===l})),t&&(o.textContent=HM(o.textContent,t)),r.push(o)}e._styles=r}return e._styles}function nmt(e){let t=mG(e);return t?gG(t):[]}function gG(e){let t=[],r=e.querySelectorAll(Ive);for(let n=0;n<r.length;n++){let i=r[n];if(i.import){let o=i.import,a=i.hasAttribute(emt);if(a&&!o._unscopedStyle){let s=rmt(o);s.setAttribute(emt,""),o._unscopedStyle=s}else o._style||(o._style=rmt(o));t.push(a?o._unscopedStyle:o._style)}}return t}function imt(e){let t=e.trim().split(/\s+/),r="";for(let n=0;n<t.length;n++)r+=Nve(t[n]);return r}function Nve(e){let t=mG(e);if(t&&t._cssText===void 0){let r=Ove(t),n=t.querySelector("template");n&&(r+=Dve(n,t.assetpath)),t._cssText=r||null}return t||console.warn("Could not find style data in module named",e),t&&t._cssText||""}function Dve(e,t){let r="",n=NI(e,t);for(let i=0;i<n.length;i++){let o=n[i];o.parentNode&&o.parentNode.removeChild(o),r+=o.textContent}return r}function Ove(e){let t="",r=gG(e);for(let n=0;n<r.length;n++)t+=r[n].textContent;return t}var ue=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?e=>ShadyDOM.patch(e):e=>e;function DI(e){return e.indexOf(".")>=0}function au(e){let t=e.indexOf(".");return t===-1?e:e.slice(0,t)}function _G(e,t){return e.indexOf(t+".")===0}function Ax(e,t){return t.indexOf(e+".")===0}function dp(e,t,r){return t+r.slice(e.length)}function OI(e,t){return e===t||_G(e,t)||Ax(e,t)}function Px(e){if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++){let n=e[r].toString().split(".");for(let i=0;i<n.length;i++)t.push(n[i])}return t.join(".")}else return e}function omt(e){return Array.isArray(e)?Px(e).split("."):e.toString().split(".")}function No(e,t,r){let n=e,i=omt(t);for(let o=0;o<i.length;o++){if(!n)return;let a=i[o];n=n[a]}return r&&(r.path=i.join(".")),n}function yG(e,t,r){let n=e,i=omt(t),o=i[i.length-1];if(i.length>1){for(let a=0;a<i.length-1;a++){let s=i[a];if(n=n[s],!n)return}n[o]=r}else n[t]=r;return i.join(".")}var zI={},zve=/-[a-z]/g,Fve=/([A-Z])/g;function wm(e){return zI[e]||(zI[e]=e.indexOf("-")<0?e:e.replace(zve,t=>t[1].toUpperCase()))}function Ix(e){return zI[e]||(zI[e]=e.replace(Fve,"-$1").toLowerCase())}var Bve=0,amt=0,Lx=[],Hve=0,vG=!1,smt=document.createTextNode("");new window.MutationObserver(Vve).observe(smt,{characterData:!0});function Vve(){vG=!1;let e=Lx.length;for(let t=0;t<e;t++){let r=Lx[t];if(r)try{r()}catch(n){setTimeout(()=>{throw n})}}Lx.splice(0,e),amt+=e}var mo={after(e){return{run(t){return window.setTimeout(t,e)},cancel(t){window.clearTimeout(t)}}},run(e,t){return window.setTimeout(e,t)},cancel(e){window.clearTimeout(e)}};var Ni={run(e){return window.requestAnimationFrame(e)},cancel(e){window.cancelAnimationFrame(e)}};var kx={run(e){return window.requestIdleCallback?window.requestIdleCallback(e):window.setTimeout(e,16)},cancel(e){window.cancelIdleCallback?window.cancelIdleCallback(e):window.clearTimeout(e)}};var li={run(e){return vG||(vG=!0,smt.textContent=Hve++),Lx.push(e),Bve++},cancel(e){let t=e-amt;if(t>=0){if(!Lx[t])throw new Error("invalid async handle: "+e);Lx[t]=null}}};var Uve=li,FI=Rn(e=>{class t extends e{static createProperties(n){let i=this.prototype;for(let o in n)o in i||i._createPropertyAccessor(o)}static attributeNameForProperty(n){return n.toLowerCase()}static typeForProperty(n){}_createPropertyAccessor(n,i){this._addPropertyToAttributeMap(n),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[n]||(this.__dataHasAccessor[n]=!0,this._definePropertyAccessor(n,i))}_addPropertyToAttributeMap(n){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let i=this.__dataAttributes[n];return i||(i=this.constructor.attributeNameForProperty(n),this.__dataAttributes[i]=n),i}_definePropertyAccessor(n,i){Object.defineProperty(this,n,{get(){return this.__data[n]},set:i?function(){}:function(o){this._setPendingProperty(n,o,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let n in this.__dataHasAccessor)this.hasOwnProperty(n)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[n]=this[n],delete this[n])}_initializeInstanceProperties(n){Object.assign(this,n)}_setProperty(n,i){this._setPendingProperty(n,i)&&this._invalidateProperties()}_getProperty(n){return this.__data[n]}_setPendingProperty(n,i,o){let a=this.__data[n],s=this._shouldPropertyChange(n,i,a);return s&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(n in this.__dataOld)&&(this.__dataOld[n]=a),this.__data[n]=i,this.__dataPending[n]=i),s}_isPropertyPending(n){return!!(this.__dataPending&&this.__dataPending.hasOwnProperty(n))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,Uve.run(()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())}))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;let n=this.__data,i=this.__dataPending,o=this.__dataOld;this._shouldPropertiesChange(n,i,o)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(n,i,o)),this.__dataCounter--}_shouldPropertiesChange(n,i,o){return Boolean(i)}_propertiesChanged(n,i,o){}_shouldPropertyChange(n,i,o){return o!==i&&(o===o||i===i)}attributeChangedCallback(n,i,o,a){i!==o&&this._attributeToProperty(n,o),super.attributeChangedCallback&&super.attributeChangedCallback(n,i,o,a)}_attributeToProperty(n,i,o){if(!this.__serializing){let a=this.__dataAttributes,s=a&&a[n]||n;this[s]=this._deserializeValue(i,o||this.constructor.typeForProperty(s))}}_propertyToAttribute(n,i,o){this.__serializing=!0,o=arguments.length<3?this[n]:o,this._valueToNodeAttribute(this,o,i||this.constructor.attributeNameForProperty(n)),this.__serializing=!1}_valueToNodeAttribute(n,i,o){let a=this._serializeValue(i);(o==="class"||o==="name"||o==="slot")&&(n=ue(n)),a===void 0?n.removeAttribute(o):n.setAttribute(o,a)}_serializeValue(n){switch(typeof n){case"boolean":return n?"":void 0;default:return n!=null?n.toString():void 0}}_deserializeValue(n,i){switch(i){case Boolean:return n!==null;case Number:return Number(n);default:return n}}}return t});var lmt={},BI=HTMLElement.prototype;for(;BI;){let e=Object.getOwnPropertyNames(BI);for(let t=0;t<e.length;t++)lmt[e[t]]=!0;BI=Object.getPrototypeOf(BI)}function qve(e,t){if(!lmt[t]){let r=e[t];r!==void 0&&(e.__data?e._setPendingProperty(t,r):(e.__dataProto?e.hasOwnProperty(JSCompiler_renameProperty("__dataProto",e))||(e.__dataProto=Object.create(e.__dataProto)):e.__dataProto={},e.__dataProto[t]=r))}}var HI=Rn(e=>{let t=FI(e);class r extends t{static createPropertiesForAttributes(){let i=this.observedAttributes;for(let o=0;o<i.length;o++)this.prototype._createPropertyAccessor(wm(i[o]))}static attributeNameForProperty(i){return Ix(i)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(i){for(let o in i)this._setProperty(o,i[o])}_ensureAttribute(i,o){let a=this;a.hasAttribute(i)||this._valueToNodeAttribute(a,o,i)}_serializeValue(i){switch(typeof i){case"object":if(i instanceof Date)return i.toString();if(i)try{return JSON.stringify(i)}catch(o){return""}default:return super._serializeValue(i)}}_deserializeValue(i,o){let a;switch(o){case Object:try{a=JSON.parse(i)}catch(s){a=i}break;case Array:try{a=JSON.parse(i)}catch(s){a=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${i}`)}break;case Date:a=isNaN(i)?String(i):Number(i),a=new Date(a);break;default:a=super._deserializeValue(i,o);break}return a}_definePropertyAccessor(i,o){qve(this,i),super._definePropertyAccessor(i,o)}_hasAccessor(i){return this.__dataHasAccessor&&this.__dataHasAccessor[i]}_isPropertyPending(i){return Boolean(this.__dataPending&&i in this.__dataPending)}}return r});var Gve={"dom-if":!0,"dom-repeat":!0},cmt=!1,umt=!1;function Wve(){if(!cmt){cmt=!0;let e=document.createElement("textarea");e.placeholder="a",umt=e.placeholder===e.textContent}return umt}function Yve(e){Wve()&&e.localName==="textarea"&&e.placeholder&&e.placeholder===e.textContent&&(e.textContent=null)}function jve(e){let t=e.getAttribute("is");if(t&&Gve[t]){let r=e;for(r.removeAttribute("is"),e=r.ownerDocument.createElement(t),r.parentNode.replaceChild(e,r),e.appendChild(r);r.attributes.length;)e.setAttribute(r.attributes[0].name,r.attributes[0].value),r.removeAttribute(r.attributes[0].name)}return e}function hmt(e,t){let r=t.parentInfo&&hmt(e,t.parentInfo);if(r){for(let n=r.firstChild,i=0;n;n=n.nextSibling)if(t.parentIndex===i++)return n}else return e}function Xve(e,t,r,n){n.id&&(t[n.id]=r)}function $ve(e,t,r){if(r.events&&r.events.length)for(let n=0,i=r.events,o;n<i.length&&(o=i[n]);n++)e._addMethodEventListenerToNode(t,o.name,o.value,e)}function Kve(e,t,r,n){r.templateInfo&&(t._templateInfo=r.templateInfo,t._parentTemplateInfo=n)}function Zve(e,t,r){return e=e._methodHost||e,function(i){e[r]?e[r](i,i.detail):console.warn("listener method `"+r+"` not defined")}}var fmt=Rn(e=>{class t extends e{static _parseTemplate(n,i){if(!n._templateInfo){let o=n._templateInfo={};o.nodeInfoList=[],o.nestedTemplate=Boolean(i),o.stripWhiteSpace=i&&i.stripWhiteSpace||n.hasAttribute("strip-whitespace"),this._parseTemplateContent(n,o,{parent:null})}return n._templateInfo}static _parseTemplateContent(n,i,o){return this._parseTemplateNode(n.content,i,o)}static _parseTemplateNode(n,i,o){let a=!1,s=n;return s.localName=="template"&&!s.hasAttribute("preserve-content")?a=this._parseTemplateNestedTemplate(s,i,o)||a:s.localName==="slot"&&(i.hasInsertionPoint=!0),Yve(s),s.firstChild&&this._parseTemplateChildNodes(s,i,o),s.hasAttributes&&s.hasAttributes()&&(a=this._parseTemplateNodeAttributes(s,i,o)||a),a||o.noted}static _parseTemplateChildNodes(n,i,o){if(!(n.localName==="script"||n.localName==="style"))for(let a=n.firstChild,s=0,l;a;a=l){if(a.localName=="template"&&(a=jve(a)),l=a.nextSibling,a.nodeType===Node.TEXT_NODE){let u=l;for(;u&&u.nodeType===Node.TEXT_NODE;)a.textContent+=u.textContent,l=u.nextSibling,n.removeChild(u),u=l;if(i.stripWhiteSpace&&!a.textContent.trim()){n.removeChild(a);continue}}let c={parentIndex:s,parentInfo:o};this._parseTemplateNode(a,i,c)&&(c.infoIndex=i.nodeInfoList.push(c)-1),a.parentNode&&s++}}static _parseTemplateNestedTemplate(n,i,o){let a=n,s=this._parseTemplate(a,i);return(s.content=a.content.ownerDocument.createDocumentFragment()).appendChild(a.content),o.templateInfo=s,!0}static _parseTemplateNodeAttributes(n,i,o){let a=!1,s=Array.from(n.attributes);for(let l=s.length-1,c;c=s[l];l--)a=this._parseTemplateNodeAttribute(n,i,o,c.name,c.value)||a;return a}static _parseTemplateNodeAttribute(n,i,o,a,s){return a.slice(0,3)==="on-"?(n.removeAttribute(a),o.events=o.events||[],o.events.push({name:a.slice(3),value:s}),!0):a==="id"?(o.id=s,!0):!1}static _contentForTemplate(n){let i=n._templateInfo;return i&&i.content||n.content}_stampTemplate(n,i){n&&!n.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(n),i=i||this.constructor._parseTemplate(n);let o=i.nodeInfoList,a=i.content||n.content,s=document.importNode(a,!0);s.__noInsertionPoint=!i.hasInsertionPoint;let l=s.nodeList=new Array(o.length);s.$={};for(let c=0,u=o.length,h;c<u&&(h=o[c]);c++){let f=l[c]=hmt(s,h);Xve(this,s.$,f,h),Kve(this,f,h,i),$ve(this,f,h)}return s=s,s}_addMethodEventListenerToNode(n,i,o,a){a=a||n;let s=Zve(a,i,o);return this._addEventListenerToNode(n,i,s),s}_addEventListenerToNode(n,i,o){n.addEventListener(i,o)}_removeEventListenerFromNode(n,i,o){n.removeEventListener(i,o)}}return t});var jM=0,XM=[],zr={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},xmt="__computeInfo",Jve=/[A-Z]/;function xG(e,t,r){let n=e[t];if(!n)n=e[t]={};else if(!e.hasOwnProperty(t)&&(n=e[t]=Object.create(e[t]),r))for(let i in n){let o=n[i],a=n[i]=Array(o.length);for(let s=0;s<o.length;s++)a[s]=o[s]}return n}function YM(e,t,r,n,i,o){if(t){let a=!1,s=jM++;for(let l in r){let c=i?au(l):l,u=t[c];if(u)for(let h=0,f=u.length,p;h<f&&(p=u[h]);h++)(!p.info||p.info.lastRun!==s)&&(!i||MG(l,p.trigger))&&(p.info&&(p.info.lastRun=s),p.fn(e,l,r,n,p.info,i,o),a=!0)}return a}return!1}function Qve(e,t,r,n,i,o,a,s){let l=!1,c=a?au(n):n,u=t[c];if(u)for(let h=0,f=u.length,p;h<f&&(p=u[h]);h++)(!p.info||p.info.lastRun!==r)&&(!a||MG(n,p.trigger))&&(p.info&&(p.info.lastRun=r),p.fn(e,n,i,o,p.info,a,s),l=!0);return l}function MG(e,t){if(t){let r=t.name;return r==e||!!(t.structured&&_G(r,e))||!!(t.wildcard&&Ax(r,e))}else return!0}function pmt(e,t,r,n,i){let o=typeof i.method=="string"?e[i.method]:i.method,a=i.property;o?o.call(e,e.__data[a],n[a]):i.dynamicFn||console.warn("observer method `"+i.method+"` not defined")}function t1e(e,t,r,n,i){let o=e[zr.NOTIFY],a,s=jM++;for(let c in t)t[c]&&(o&&Qve(e,o,s,c,r,n,i)||i&&e1e(e,c,r))&&(a=!0);let l;a&&(l=e.__dataHost)&&l._invalidateProperties&&l._invalidateProperties()}function e1e(e,t,r){let n=au(t);if(n!==t){let i=Ix(n)+"-changed";return bmt(e,i,r[t],t),!0}return!1}function bmt(e,t,r,n){let i={value:r,queueProperty:!0};n&&(i.path=n),ue(e).dispatchEvent(new CustomEvent(t,{detail:i}))}function r1e(e,t,r,n,i,o){let s=(o?au(t):t)!=t?t:null,l=s?No(e,s):e.__data[t];s&&l===void 0&&(l=r[t]),bmt(e,i.eventName,l,s)}function n1e(e,t,r,n,i){let o,a=e.detail,s=a&&a.path;s?(n=dp(r,n,s),o=a&&a.value):o=e.currentTarget[r],o=i?!o:o,(!t[zr.READ_ONLY]||!t[zr.READ_ONLY][n])&&t._setPendingPropertyOrPath(n,o,!0,Boolean(s))&&(!a||!a.queueProperty)&&t._invalidateProperties()}function i1e(e,t,r,n,i){let o=e.__data[t];VM&&(o=VM(o,i.attrName,"attribute",e)),e._propertyToAttribute(t,i.attrName,o)}function o1e(e,t,r,n){let i=e[zr.COMPUTE];if(i)if($dt){jM++;let o=s1e(e),a=[];for(let l in t)dmt(l,i,a,o,n);let s;for(;s=a.shift();)wmt(e,"",t,r,s)&&dmt(s.methodInfo,i,a,o,n);Object.assign(r,e.__dataOld),Object.assign(t,e.__dataPending),e.__dataPending=null}else{let o=t;for(;YM(e,i,o,r,n);)Object.assign(r,e.__dataOld),Object.assign(t,e.__dataPending),o=e.__dataPending,e.__dataPending=null}}var a1e=(e,t,r)=>{let n=0,i=t.length-1,o=-1;for(;n<=i;){let a=n+i>>1,s=r.get(t[a].methodInfo)-r.get(e.methodInfo);if(s<0)n=a+1;else if(s>0)i=a-1;else{o=a;break}}o<0&&(o=i+1),t.splice(o,0,e)},dmt=(e,t,r,n,i)=>{let o=i?au(e):e,a=t[o];if(a)for(let s=0;s<a.length;s++){let l=a[s];l.info.lastRun!==jM&&(!i||MG(e,l.trigger))&&(l.info.lastRun=jM,a1e(l.info,r,n))}};function s1e(e){let t=e.constructor.__orderedComputedDeps;if(!t){t=new Map;let r=e[zr.COMPUTE],{counts:n,ready:i,total:o}=l1e(e),a;for(;a=i.shift();){t.set(a,t.size);let s=r[a];s&&s.forEach(l=>{let c=l.info.methodInfo;--o,--n[c]===0&&i.push(c)})}o!==0&&console.warn(`Computed graph for ${e.localName} incomplete; circular?`),e.constructor.__orderedComputedDeps=t}return t}function l1e(e){let t=e[xmt],r={},n=e[zr.COMPUTE],i=[],o=0;for(let a in t){let s=t[a];o+=r[a]=s.args.filter(l=>!l.literal).length+(s.dynamicFn?1:0)}for(let a in n)t[a]||i.push(a);return{counts:r,ready:i,total:o}}function wmt(e,t,r,n,i){let o=SG(e,t,r,n,i);if(o===XM)return!1;let a=i.methodInfo;return e.__dataHasAccessor&&e.__dataHasAccessor[a]?e._setPendingProperty(a,o,!0):(e[a]=o,!1)}function c1e(e,t,r){let n=e.__dataLinkedPaths;if(n){let i;for(let o in n){let a=n[o];Ax(o,t)?(i=dp(o,a,t),e._setPendingPropertyOrPath(i,r,!0,!0)):Ax(a,t)&&(i=dp(a,o,t),e._setPendingPropertyOrPath(i,r,!0,!0))}}}function bG(e,t,r,n,i,o,a){r.bindings=r.bindings||[];let s={kind:n,target:i,parts:o,literal:a,isCompound:o.length!==1};if(r.bindings.push(s),d1e(s)){let{event:c,negate:u}=s.parts[0];s.listenerEvent=c||Ix(i)+"-changed",s.listenerNegate=u}let l=t.nodeInfoList.length;for(let c=0;c<s.parts.length;c++){let u=s.parts[c];u.compoundIndex=c,u1e(e,t,s,u,l)}}function u1e(e,t,r,n,i){if(!n.literal)if(r.kind==="attribute"&&r.target[0]==="-")console.warn("Cannot set attribute "+r.target+' because "-" is not a valid attribute starting character');else{let o=n.dependencies,a={index:i,binding:r,part:n,evaluator:e};for(let s=0;s<o.length;s++){let l=o[s];typeof l=="string"&&(l=Mmt(l),l.wildcard=!0),e._addTemplatePropertyEffect(t,l.rootProperty,{fn:h1e,info:a,trigger:l})}}}function h1e(e,t,r,n,i,o,a){let s=a[i.index],l=i.binding,c=i.part;if(o&&c.source&&t.length>c.source.length&&l.kind=="property"&&!l.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[l.target]){let u=r[t];t=dp(c.source,l.target,t),s._setPendingPropertyOrPath(t,u,!1,!0)&&e._enqueueClient(s)}else{let u=i.evaluator._evaluateBinding(e,c,t,r,n,o);u!==XM&&f1e(e,s,l,c,u)}}function f1e(e,t,r,n,i){if(i=p1e(t,i,r,n),VM&&(i=VM(i,r.target,r.kind,t)),r.kind=="attribute")e._valueToNodeAttribute(t,i,r.target);else{let o=r.target;t.__isPropertyEffectsClient&&t.__dataHasAccessor&&t.__dataHasAccessor[o]?(!t[zr.READ_ONLY]||!t[zr.READ_ONLY][o])&&t._setPendingProperty(o,i)&&e._enqueueClient(t):e._setUnmanagedPropertyToNode(t,o,i)}}function p1e(e,t,r,n){if(r.isCompound){let i=e.__dataCompoundStorage[r.target];i[n.compoundIndex]=t,t=i.join("")}return r.kind!=="attribute"&&(r.target==="textContent"||r.target==="value"&&(e.localName==="input"||e.localName==="textarea"))&&(t=t==null?"":t),t}function d1e(e){return Boolean(e.target)&&e.kind!="attribute"&&e.kind!="text"&&!e.isCompound&&e.parts[0].mode==="{"}function m1e(e,t){let{nodeList:r,nodeInfoList:n}=t;if(n.length)for(let i=0;i<n.length;i++){let o=n[i],a=r[i],s=o.bindings;if(s)for(let l=0;l<s.length;l++){let c=s[l];g1e(a,c),_1e(a,e,c)}a.__dataHost=e}}function g1e(e,t){if(t.isCompound){let r=e.__dataCompoundStorage||(e.__dataCompoundStorage={}),n=t.parts,i=new Array(n.length);for(let a=0;a<n.length;a++)i[a]=n[a].literal;let o=t.target;r[o]=i,t.literal&&t.kind=="property"&&(o==="className"&&(e=ue(e)),e[o]=t.literal)}}function _1e(e,t,r){if(r.listenerEvent){let n=r.parts[0];e.addEventListener(r.listenerEvent,function(i){n1e(i,t,r.target,n.source,n.negate)})}}function mmt(e,t,r,n,i,o){o=t.static||o&&(typeof o!="object"||o[t.methodName]);let a={methodName:t.methodName,args:t.args,methodInfo:i,dynamicFn:o};for(let s=0,l;s<t.args.length&&(l=t.args[s]);s++)l.literal||e._addPropertyEffect(l.rootProperty,r,{fn:n,info:a,trigger:l});return o&&e._addPropertyEffect(t.methodName,r,{fn:n,info:a}),a}function SG(e,t,r,n,i){let o=e._methodHost||e,a=o[i.methodName];if(a){let s=e._marshalArgs(i.args,t,r);return s===XM?XM:a.apply(o,s)}else i.dynamicFn||console.warn("method `"+i.methodName+"` not defined")}var y1e=[],Smt="(?:[a-zA-Z_$][\\w.:$\\-*]*)",v1e="(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)",x1e="(?:'(?:[^'\\\\]|\\\\.)*')",b1e='(?:"(?:[^"\\\\]|\\\\.)*")',w1e="(?:"+x1e+"|"+b1e+")",gmt="(?:("+Smt+"|"+v1e+"|"+w1e+")\\s*)",S1e="(?:"+gmt+"(?:,\\s*"+gmt+")*)",M1e="(?:\\(\\s*(?:"+S1e+"?)\\)\\s*)",E1e="("+Smt+"\\s*"+M1e+"?)",T1e="(\\[\\[|{{)\\s*",C1e="(?:]]|}})",A1e="(?:(!)\\s*)?",P1e=T1e+A1e+E1e+C1e,_mt=new RegExp(P1e,"g");function ymt(e){let t="";for(let r=0;r<e.length;r++)t+=e[r].literal||"";return t}function wG(e){let t=e.match(/([^\s]+?)\(([\s\S]*)\)/);if(t){let n={methodName:t[1],static:!0,args:y1e};if(t[2].trim()){let i=t[2].replace(/\\,/g,"&comma;").split(",");return I1e(i,n)}else return n}return null}function I1e(e,t){return t.args=e.map(function(r){let n=Mmt(r);return n.literal||(t.static=!1),n},this),t}function Mmt(e){let t=e.trim().replace(/&comma;/g,",").replace(/\\(.)/g,"$1"),r={name:t,value:"",literal:!1},n=t[0];switch(n==="-"&&(n=t[1]),n>="0"&&n<="9"&&(n="#"),n){case"'":case'"':r.value=t.slice(1,-1),r.literal=!0;break;case"#":r.value=Number(t),r.literal=!0;break}return r.literal||(r.rootProperty=au(t),r.structured=DI(t),r.structured&&(r.wildcard=t.slice(-2)==".*",r.wildcard&&(r.name=t.slice(0,-2)))),r}function vmt(e,t,r){let n=No(e,r);return n===void 0&&(n=t[r]),n}function Emt(e,t,r,n){let i={indexSplices:n};kI&&!e._overrideLegacyUndefined&&(t.splices=i),e.notifyPath(r+".splices",i),e.notifyPath(r+".length",t.length),kI&&!e._overrideLegacyUndefined&&(i.indexSplices=[])}function GM(e,t,r,n,i,o){Emt(e,t,r,[{index:n,addedCount:i,removed:o,object:t,type:"splice"}])}function L1e(e){return e[0].toUpperCase()+e.substring(1)}var u_=Rn(e=>{let t=fmt(HI(e));class r extends t{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return zr}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(WM.length){let i=WM[WM.length-1];i._enqueueClient(this),this.__dataHost=i}}_initializeProtoProperties(i){this.__data=Object.create(i),this.__dataPending=Object.create(i),this.__dataOld={}}_initializeInstanceProperties(i){let o=this[zr.READ_ONLY];for(let a in i)(!o||!o[a])&&(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[a]=this.__dataPending[a]=i[a])}_addPropertyEffect(i,o,a){this._createPropertyAccessor(i,o==zr.READ_ONLY);let s=xG(this,o,!0)[i];s||(s=this[o][i]=[]),s.push(a)}_removePropertyEffect(i,o,a){let s=xG(this,o,!0)[i],l=s.indexOf(a);l>=0&&s.splice(l,1)}_hasPropertyEffect(i,o){let a=this[o];return Boolean(a&&a[i])}_hasReadOnlyEffect(i){return this._hasPropertyEffect(i,zr.READ_ONLY)}_hasNotifyEffect(i){return this._hasPropertyEffect(i,zr.NOTIFY)}_hasReflectEffect(i){return this._hasPropertyEffect(i,zr.REFLECT)}_hasComputedEffect(i){return this._hasPropertyEffect(i,zr.COMPUTE)}_setPendingPropertyOrPath(i,o,a,s){if(s||au(Array.isArray(i)?i[0]:i)!==i){if(!s){let l=No(this,i);if(i=yG(this,i,o),!i||!super._shouldPropertyChange(i,o,l))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(i,o,a))return c1e(this,i,o),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[i])return this._setPendingProperty(i,o,a);this[i]=o}return!1}_setUnmanagedPropertyToNode(i,o,a){(a!==i[o]||typeof a=="object")&&(o==="className"&&(i=ue(i)),i[o]=a)}_setPendingProperty(i,o,a){let s=this.__dataHasPaths&&DI(i),l=s?this.__dataTemp:this.__data;return this._shouldPropertyChange(i,o,l[i])?(this.__dataPending||(this.__dataPending={},this.__dataOld={}),i in this.__dataOld||(this.__dataOld[i]=this.__data[i]),s?this.__dataTemp[i]=o:this.__data[i]=o,this.__dataPending[i]=o,(s||this[zr.NOTIFY]&&this[zr.NOTIFY][i])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[i]=a),!0):!1}_setProperty(i,o){this._setPendingProperty(i,o,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(i){this.__dataPendingClients=this.__dataPendingClients||[],i!==this&&this.__dataPendingClients.push(i)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let i=this.__dataPendingClients;if(i){this.__dataPendingClients=null;for(let o=0;o<i.length;o++){let a=i[o];a.__dataEnabled?a.__dataPending&&a._flushProperties():a._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(i,o){for(let a in i)(o||!this[zr.READ_ONLY]||!this[zr.READ_ONLY][a])&&this._setPendingPropertyOrPath(a,i[a],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(i,o,a){let s=this.__dataHasPaths;this.__dataHasPaths=!1;let l;o1e(this,o,a,s),l=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(o,a,s),this._flushClients(),YM(this,this[zr.REFLECT],o,a,s),YM(this,this[zr.OBSERVE],o,a,s),l&&t1e(this,l,o,a,s),this.__dataCounter==1&&(this.__dataTemp={})}_propagatePropertyChanges(i,o,a){this[zr.PROPAGATE]&&YM(this,this[zr.PROPAGATE],i,o,a),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,i,o,a)}_runEffectsForTemplate(i,o,a,s){let l=(c,u)=>{YM(this,i.propertyEffects,c,a,u,i.nodeList);for(let h=i.firstChild;h;h=h.nextSibling)this._runEffectsForTemplate(h,c,a,u)};i.runEffects?i.runEffects(l,o,s):l(o,s)}linkPaths(i,o){i=Px(i),o=Px(o),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[i]=o}unlinkPaths(i){i=Px(i),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[i]}notifySplices(i,o){let a={path:""},s=No(this,i,a);Emt(this,s,a.path,o)}get(i,o){return No(o||this,i)}set(i,o,a){a?yG(a,i,o):(!this[zr.READ_ONLY]||!this[zr.READ_ONLY][i])&&this._setPendingPropertyOrPath(i,o,!0)&&this._invalidateProperties()}push(i,...o){let a={path:""},s=No(this,i,a),l=s.length,c=s.push(...o);return o.length&&GM(this,s,a.path,l,o.length,[]),c}pop(i){let o={path:""},a=No(this,i,o),s=Boolean(a.length),l=a.pop();return s&&GM(this,a,o.path,a.length,0,[l]),l}splice(i,o,a,...s){let l={path:""},c=No(this,i,l);o<0?o=c.length-Math.floor(-o):o&&(o=Math.floor(o));let u;return arguments.length===2?u=c.splice(o):u=c.splice(o,a,...s),(s.length||u.length)&&GM(this,c,l.path,o,s.length,u),u}shift(i){let o={path:""},a=No(this,i,o),s=Boolean(a.length),l=a.shift();return s&&GM(this,a,o.path,0,0,[l]),l}unshift(i,...o){let a={path:""},s=No(this,i,a),l=s.unshift(...o);return o.length&&GM(this,s,a.path,0,o.length,[]),l}notifyPath(i,o){let a;if(arguments.length==1){let s={path:""};o=No(this,i,s),a=s.path}else Array.isArray(i)?a=Px(i):a=i;this._setPendingPropertyOrPath(a,o,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(i,o){this._addPropertyEffect(i,zr.READ_ONLY),o&&(this["_set"+L1e(i)]=function(a){this._setProperty(i,a)})}_createPropertyObserver(i,o,a){let s={property:i,method:o,dynamicFn:Boolean(a)};this._addPropertyEffect(i,zr.OBSERVE,{fn:pmt,info:s,trigger:{name:i}}),a&&this._addPropertyEffect(o,zr.OBSERVE,{fn:pmt,info:s,trigger:{name:o}})}_createMethodObserver(i,o){let a=wG(i);if(!a)throw new Error("Malformed observer expression '"+i+"'");mmt(this,a,zr.OBSERVE,SG,null,o)}_createNotifyingProperty(i){this._addPropertyEffect(i,zr.NOTIFY,{fn:r1e,info:{eventName:Ix(i)+"-changed",property:i}})}_createReflectedProperty(i){let o=this.constructor.attributeNameForProperty(i);o[0]==="-"?console.warn("Property "+i+" cannot be reflected to attribute "+o+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(i,zr.REFLECT,{fn:i1e,info:{attrName:o}})}_createComputedProperty(i,o,a){let s=wG(o);if(!s)throw new Error("Malformed computed expression '"+o+"'");let l=mmt(this,s,zr.COMPUTE,wmt,i,a);xG(this,xmt)[i]=l}_marshalArgs(i,o,a){let s=this.__data,l=[];for(let c=0,u=i.length;c<u;c++){let{name:h,structured:f,wildcard:p,value:d,literal:g}=i[c];if(!g)if(p){let _=Ax(h,o),y=vmt(s,a,_?o:h);d={path:_?o:h,value:y,base:_?No(s,h):y}}else d=f?vmt(s,a,h):s[h];if(kI&&!this._overrideLegacyUndefined&&d===void 0&&i.length>1)return XM;l[c]=d}return l}static addPropertyEffect(i,o,a){this.prototype._addPropertyEffect(i,o,a)}static createPropertyObserver(i,o,a){this.prototype._createPropertyObserver(i,o,a)}static createMethodObserver(i,o){this.prototype._createMethodObserver(i,o)}static createNotifyingProperty(i){this.prototype._createNotifyingProperty(i)}static createReadOnlyProperty(i,o){this.prototype._createReadOnlyProperty(i,o)}static createReflectedProperty(i){this.prototype._createReflectedProperty(i)}static createComputedProperty(i,o,a){this.prototype._createComputedProperty(i,o,a)}static bindTemplate(i){return this.prototype._bindTemplate(i)}_bindTemplate(i,o){let a=this.constructor._parseTemplate(i),s=this.__preBoundTemplateInfo==a;if(!s)for(let l in a.propertyEffects)this._createPropertyAccessor(l);if(o)if(a=Object.create(a),a.wasPreBound=s,!this.__templateInfo)this.__templateInfo=a;else{let l=i._parentTemplateInfo||this.__templateInfo,c=l.lastChild;a.parent=l,l.lastChild=a,a.previousSibling=c,c?c.nextSibling=a:l.firstChild=a}else this.__preBoundTemplateInfo=a;return a}static _addTemplatePropertyEffect(i,o,a){let s=i.hostProps=i.hostProps||{};s[o]=!0;let l=i.propertyEffects=i.propertyEffects||{};(l[o]=l[o]||[]).push(a)}_stampTemplate(i,o){o=o||this._bindTemplate(i,!0),WM.push(this);let a=super._stampTemplate(i,o);if(WM.pop(),o.nodeList=a.nodeList,!o.wasPreBound){let s=o.childNodes=[];for(let l=a.firstChild;l;l=l.nextSibling)s.push(l)}return a.templateInfo=o,m1e(this,o),this.__dataClientsReady&&(this._runEffectsForTemplate(o,this.__data,null,!1),this._flushClients()),a}_removeBoundDom(i){let o=i.templateInfo,{previousSibling:a,nextSibling:s,parent:l}=o;a?a.nextSibling=s:l&&(l.firstChild=s),s?s.previousSibling=a:l&&(l.lastChild=a),o.nextSibling=o.previousSibling=null;let c=o.childNodes;for(let u=0;u<c.length;u++){let h=c[u];ue(ue(h).parentNode).removeChild(h)}}static _parseTemplateNode(i,o,a){let s=t._parseTemplateNode.call(this,i,o,a);if(i.nodeType===Node.TEXT_NODE){let l=this._parseBindings(i.textContent,o);l&&(i.textContent=ymt(l)||" ",bG(this,o,a,"text","textContent",l),s=!0)}return s}static _parseTemplateNodeAttribute(i,o,a,s,l){let c=this._parseBindings(l,o);if(c){let u=s,h="property";Jve.test(s)?h="attribute":s[s.length-1]=="$"&&(s=s.slice(0,-1),h="attribute");let f=ymt(c);return f&&h=="attribute"&&(s=="class"&&i.hasAttribute("class")&&(f+=" "+i.getAttribute(s)),i.setAttribute(s,f)),h=="attribute"&&u=="disable-upgrade$"&&i.setAttribute(s,""),i.localName==="input"&&u==="value"&&i.setAttribute(u,""),i.removeAttribute(u),h==="property"&&(s=wm(s)),bG(this,o,a,h,s,c,f),!0}else return t._parseTemplateNodeAttribute.call(this,i,o,a,s,l)}static _parseTemplateNestedTemplate(i,o,a){let s=t._parseTemplateNestedTemplate.call(this,i,o,a),l=i.parentNode,c=a.templateInfo,u=l.localName==="dom-if",h=l.localName==="dom-repeat";pG&&(u||h)&&(l.removeChild(i),a=a.parentInfo,a.templateInfo=c,a.noted=!0,s=!1);let f=c.hostProps;if(RI&&u)f&&(o.hostProps=Object.assign(o.hostProps||{},f),pG||(a.parentInfo.noted=!0));else{let p="{";for(let d in f){let g=[{mode:p,source:d,dependencies:[d],hostProp:!0}];bG(this,o,a,"property","_host_"+d,g)}}return s}static _parseBindings(i,o){let a=[],s=0,l;for(;(l=_mt.exec(i))!==null;){l.index>s&&a.push({literal:i.slice(s,l.index)});let c=l[1][0],u=Boolean(l[2]),h=l[3].trim(),f=!1,p="",d=-1;c=="{"&&(d=h.indexOf("::"))>0&&(p=h.substring(d+2),h=h.substring(0,d),f=!0);let g=wG(h),_=[];if(g){let{args:y,methodName:x}=g;for(let S=0;S<y.length;S++){let C=y[S];C.literal||_.push(C)}let b=o.dynamicFns;(b&&b[x]||g.static)&&(_.push(x),g.dynamicFn=!0)}else _.push(h);a.push({source:h,mode:c,negate:u,customEvent:f,signature:g,dependencies:_,event:p}),s=_mt.lastIndex}if(s&&s<i.length){let c=i.substring(s);c&&a.push({literal:c})}return a.length?a:null}static _evaluateBinding(i,o,a,s,l,c){let u;return o.signature?u=SG(i,a,s,l,o.signature):a!=o.source?u=No(i,o.source):c&&DI(a)?u=No(i,a):u=i.__data[a],o.negate&&(u=!u),u}}return r}),WM=[];var k1e=0;function Tmt(){k1e++}var R1e=[];function VI(e){R1e.push(e)}function N1e(e){let t={};for(let r in e){let n=e[r];t[r]=typeof n=="function"?{type:n}:n}return t}var Cmt=Rn(e=>{let t=FI(e);function r(o){let a=Object.getPrototypeOf(o);return a.prototype instanceof i?a:null}function n(o){if(!o.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",o))){let a=null;if(o.hasOwnProperty(JSCompiler_renameProperty("properties",o))){let s=o.properties;s&&(a=N1e(s))}o.__ownProperties=a}return o.__ownProperties}class i extends t{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){VI(this.prototype);let a=this._properties;this.__observedAttributes=a?Object.keys(a).map(s=>this.prototype._addPropertyToAttributeMap(s)):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){let a=r(this);a&&a.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){let a=n(this);a&&this.createProperties(a)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){let a=r(this);this.__properties=Object.assign({},a&&a._properties,n(this))}return this.__properties}static typeForProperty(a){let s=this._properties[a];return s&&s.type}_initializeProperties(){Tmt(),this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return i});var Amt="3.4.1",UI=window.ShadyCSS&&window.ShadyCSS.cssBuild,Sm=Rn(e=>{let t=Cmt(u_(e));function r(l){if(!l.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",l))){l.__propertyDefaults=null;let c=l._properties;for(let u in c){let h=c[u];"value"in h&&(l.__propertyDefaults=l.__propertyDefaults||{},l.__propertyDefaults[u]=h)}}return l.__propertyDefaults}function n(l){return l.hasOwnProperty(JSCompiler_renameProperty("__ownObservers",l))||(l.__ownObservers=l.hasOwnProperty(JSCompiler_renameProperty("observers",l))?l.observers:null),l.__ownObservers}function i(l,c,u,h){u.computed&&(u.readOnly=!0),u.computed&&(l._hasReadOnlyEffect(c)?console.warn(`Cannot redefine computed property '${c}'.`):l._createComputedProperty(c,u.computed,h)),u.readOnly&&!l._hasReadOnlyEffect(c)?l._createReadOnlyProperty(c,!u.computed):u.readOnly===!1&&l._hasReadOnlyEffect(c)&&console.warn(`Cannot make readOnly property '${c}' non-readOnly.`),u.reflectToAttribute&&!l._hasReflectEffect(c)?l._createReflectedProperty(c):u.reflectToAttribute===!1&&l._hasReflectEffect(c)&&console.warn(`Cannot make reflected property '${c}' non-reflected.`),u.notify&&!l._hasNotifyEffect(c)?l._createNotifyingProperty(c):u.notify===!1&&l._hasNotifyEffect(c)&&console.warn(`Cannot make notify property '${c}' non-notify.`),u.observer&&l._createPropertyObserver(c,u.observer,h[u.observer]),l._addPropertyToAttributeMap(c)}function o(l,c,u,h){if(!UI){let f=c.content.querySelectorAll("style"),p=NI(c),d=nmt(u),g=c.content.firstElementChild;for(let y=0;y<d.length;y++){let x=d[y];x.textContent=l._processStyleText(x.textContent,h),c.content.insertBefore(x,g)}let _=0;for(let y=0;y<p.length;y++){let x=p[y],b=f[_];b!==x?(x=x.cloneNode(!0),b.parentNode.insertBefore(x,b)):_++,x.textContent=l._processStyleText(x.textContent,h)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(c,u),Kdt&&UI&&Gdt){let f=c.content.querySelectorAll("style");if(f){let p="";Array.from(f).forEach(d=>{p+=d.textContent,d.parentNode.removeChild(d)}),l._styleSheet=new CSSStyleSheet,l._styleSheet.replaceSync(p)}}}function a(l){let c=null;if(l&&(!iu||jdt)&&(c=ou.import(l,"template"),iu&&!c))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${l}`);return c}class s extends t{static get polymerElementVersion(){return Amt}static _finalizeClass(){t._finalizeClass.call(this);let c=n(this);c&&this.createObservers(c,this._properties),this._prepareTemplate()}static _prepareTemplate(){let c=this.template;c&&(typeof c=="string"?(console.error("template getter must return HTMLTemplateElement"),c=null):pp||(c=c.cloneNode(!0))),this.prototype._template=c}static createProperties(c){for(let u in c)i(this.prototype,u,c[u],c)}static createObservers(c,u){let h=this.prototype;for(let f=0;f<c.length;f++)h._createMethodObserver(c[f],u)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){let c=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;this._template=c!==void 0?c:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&a(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(c){this._template=c}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){let c=this.importMeta;if(c)this._importPath=Cx(c.url);else{let u=ou.import(this.is);this._importPath=u&&u.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=Wdt,this.importPath=this.constructor.importPath;let c=r(this.constructor);if(!!c)for(let u in c){let h=c[u];if(this._canApplyPropertyDefault(u)){let f=typeof h.value=="function"?h.value.call(this):h.value;this._hasAccessor(u)?this._setPendingProperty(u,f,!0):this[u]=f}}}_canApplyPropertyDefault(c){return!this.hasOwnProperty(c)}static _processStyleText(c,u){return HM(c,u)}static _finalizeTemplate(c){let u=this.prototype._template;if(u&&!u.__polymerFinalized){u.__polymerFinalized=!0;let h=this.importPath,f=h?l_(h):"";o(this,u,c,f),this.prototype._bindTemplate(u)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(c){let u=ue(this);if(u.attachShadow)return c?(u.shadowRoot||(u.attachShadow({mode:"open",shadyUpgradeFragment:c}),u.shadowRoot.appendChild(c),this.constructor._styleSheet&&(u.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),Xdt&&window.ShadyDOM&&window.ShadyDOM.flushInitial(u.shadowRoot),u.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(c){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,c)}resolveUrl(c,u){return!u&&this.importPath&&(u=l_(this.importPath)),l_(c,u)}static _parseTemplateContent(c,u,h){return u.dynamicFns=u.dynamicFns||this._properties,t._parseTemplateContent.call(this,c,u,h)}static _addTemplatePropertyEffect(c,u,h){return LI&&!(u in this._properties)&&!(h.info.part.signature&&h.info.part.signature.static)&&!h.info.part.hostProp&&!c.nestedTemplate&&console.warn(`Property '${u}' used in template but not declared in 'properties'; attribute will not be observed.`),t._addTemplatePropertyEffect.call(this,c,u,h)}}return s});var qI=class{constructor(t){this.value=t.toString()}toString(){return this.value}};function D1e(e){if(e instanceof qI)return e.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${e}`)}function O1e(e){if(e instanceof HTMLTemplateElement)return e.innerHTML;if(e instanceof qI)return D1e(e);throw new Error(`non-template value passed to Polymer's html function: ${e}`)}var Q=function(t,...r){let n=document.createElement("template");return n.innerHTML=r.reduce((i,o,a)=>i+O1e(o)+t[a+1],t[0]),n};var mt=Sm(HTMLElement);var fy=Ee(Oe(),1);var h_=!(window.ShadyDOM&&window.ShadyDOM.inUse),GI;function Pmt(e){e&&e.shimcssproperties?GI=!1:GI=h_||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)"))}var Mm;window.ShadyCSS&&window.ShadyCSS.cssBuild!==void 0&&(Mm=window.ShadyCSS.cssBuild);var WI=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&window.ShadyCSS.nativeCss!==void 0?GI=window.ShadyCSS.nativeCss:window.ShadyCSS?(Pmt(window.ShadyCSS),window.ShadyCSS=void 0):Pmt(window.WebComponents&&window.WebComponents.flags);var Nx=GI;var YI=class{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}};function EG(e){return e=z1e(e),Imt(F1e(e),e)}function z1e(e){return e.replace(gp.comments,"").replace(gp.port,"")}function F1e(e){let t=new YI;t.start=0,t.end=e.length;let r=t;for(let n=0,i=e.length;n<i;n++)if(e[n]===Lmt){r.rules||(r.rules=[]);let o=r,a=o.rules[o.rules.length-1]||null;r=new YI,r.start=n+1,r.parent=o,r.previous=a,o.rules.push(r)}else e[n]===kmt&&(r.end=n+1,r=r.parent||t);return t}function Imt(e,t){let r=t.substring(e.start,e.end-1);if(e.parsedCssText=e.cssText=r.trim(),e.parent){let i=e.previous?e.previous.end:e.parent.start;r=t.substring(i,e.start-1),r=B1e(r),r=r.replace(gp.multipleSpaces," "),r=r.substring(r.lastIndexOf(";")+1);let o=e.parsedSelector=e.selector=r.trim();e.atRule=o.indexOf(W1e)===0,e.atRule?o.indexOf(G1e)===0?e.type=mp.MEDIA_RULE:o.match(gp.keyframesRule)&&(e.type=mp.KEYFRAMES_RULE,e.keyframesName=e.selector.split(gp.multipleSpaces).pop()):o.indexOf(Rmt)===0?e.type=mp.MIXIN_RULE:e.type=mp.STYLE_RULE}let n=e.rules;if(n)for(let i=0,o=n.length,a;i<o&&(a=n[i]);i++)Imt(a,t);return e}function B1e(e){return e.replace(/\\([0-9a-f]{1,6})\s/gi,function(){let t=arguments[1],r=6-t.length;for(;r--;)t="0"+t;return"\\"+t})}function TG(e,t,r=""){let n="";if(e.cssText||e.rules){let i=e.rules;if(i&&!H1e(i))for(let o=0,a=i.length,s;o<a&&(s=i[o]);o++)n=TG(s,t,n);else n=t?e.cssText:V1e(e.cssText),n=n.trim(),n&&(n="  "+n+`
`)}return n&&(e.selector&&(r+=e.selector+" "+Lmt+`
`),r+=n,e.selector&&(r+=kmt+`

`)),r}function H1e(e){let t=e[0];return Boolean(t)&&Boolean(t.selector)&&t.selector.indexOf(Rmt)===0}function V1e(e){return e=U1e(e),q1e(e)}function U1e(e){return e.replace(gp.customProp,"").replace(gp.mixinProp,"")}function q1e(e){return e.replace(gp.mixinApply,"").replace(gp.varApply,"")}var mp={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},Lmt="{",kmt="}",gp={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},Rmt="--",G1e="@media",W1e="@";var KM=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,Dx=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi;var Nmt=/@media\s(.*)/;var Dmt=new Set,Y1e="shady-unscoped";function Omt(e){let t=e.textContent;if(!Dmt.has(t)){Dmt.add(t);let r=document.createElement("style");r.setAttribute("shady-unscoped",""),r.textContent=t,document.head.appendChild(r)}}function zmt(e){return e.hasAttribute(Y1e)}function ZM(e,t){return e?(typeof e=="string"&&(e=EG(e)),t&&Ox(e,t),TG(e,Nx)):""}function CG(e){return!e.__cssRules&&e.textContent&&(e.__cssRules=EG(e.textContent)),e.__cssRules||null}function Ox(e,t,r,n){if(!e)return;let i=!1,o=e.type;if(n&&o===mp.MEDIA_RULE){let s=e.selector.match(Nmt);s&&(window.matchMedia(s[1]).matches||(i=!0))}o===mp.STYLE_RULE?t(e):r&&o===mp.KEYFRAMES_RULE?r(e):o===mp.MIXIN_RULE&&(i=!0);let a=e.rules;if(a&&!i)for(let s=0,l=a.length,c;s<l&&(c=a[s]);s++)Ox(c,t,r,n)}function j1e(e,t){let r=0;for(let n=t,i=e.length;n<i;n++)if(e[n]==="(")r++;else if(e[n]===")"&&--r===0)return n;return-1}function AG(e,t){let r=e.indexOf("var(");if(r===-1)return t(e,"","","");let n=j1e(e,r+3),i=e.substring(r+4,n),o=e.substring(0,r),a=AG(e.substring(n+1),t),s=i.indexOf(",");if(s===-1)return t(o,i.trim(),"",a);let l=i.substring(0,s).trim(),c=i.substring(s+1).trim();return t(o,l,c,a)}var fvr=window.ShadyDOM&&window.ShadyDOM.wrap||(e=>e);function Fmt(e){let t=e.localName,r="",n="";return t?t.indexOf("-")>-1?r=t:(n=t,r=e.getAttribute&&e.getAttribute("is")||""):(r=e.is,n=e.extends),{is:r,typeExtension:n}}function Bmt(e){let t=[],r=e.querySelectorAll("style");for(let n=0;n<r.length;n++){let i=r[n];zmt(i)?h_||(Omt(i),i.parentNode.removeChild(i)):(t.push(i.textContent),i.parentNode.removeChild(i))}return t.join("").trim()}var Hmt="css-build";function X1e(e){if(Mm!==void 0)return Mm;if(e.__cssBuild===void 0){let t=e.getAttribute(Hmt);if(t)e.__cssBuild=t;else{let r=$1e(e);r!==""&&K1e(e),e.__cssBuild=r}}return e.__cssBuild||""}function PG(e){return X1e(e)!==""}function $1e(e){let t=e.localName==="template"?e.content.firstChild:e.firstChild;if(t instanceof Comment){let r=t.textContent.trim().split(":");if(r[0]===Hmt)return r[1]}return""}function K1e(e){let t=e.localName==="template"?e.content.firstChild:e.firstChild;t.parentNode.removeChild(t)}function JM(e,t){for(let r in t)r===null?e.style.removeProperty(r):e.style.setProperty(r,t[r])}function jI(e,t){let r=window.getComputedStyle(e).getPropertyValue(t);return r?r.trim():""}function Vmt(e){let t=Dx.test(e)||KM.test(e);return Dx.lastIndex=0,KM.lastIndex=0,t}var Z1e=/;\s*/m,J1e=/^\s*(initial)|(inherit)\s*$/,Umt=/\s*!important/,IG="_-_";var LG=class{constructor(){this._map={}}set(t,r){t=t.trim(),this._map[t]={properties:r,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}},XI=null,Do=class{constructor(){this._currentElement=null,this._measureElement=null,this._map=new LG}detectMixin(t){return Vmt(t)}gatherStyles(t){let r=Bmt(t.content);if(r){let n=document.createElement("style");return n.textContent=r,t.content.insertBefore(n,t.content.firstChild),n}return null}transformTemplate(t,r){t._gatheredStyle===void 0&&(t._gatheredStyle=this.gatherStyles(t));let n=t._gatheredStyle;return n?this.transformStyle(n,r):null}transformStyle(t,r=""){let n=CG(t);return this.transformRules(n,r),t.textContent=ZM(n),n}transformCustomStyle(t){let r=CG(t);return Ox(r,n=>{n.selector===":root"&&(n.selector="html"),this.transformRule(n)}),t.textContent=ZM(r),r}transformRules(t,r){this._currentElement=r,Ox(t,n=>{this.transformRule(n)}),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),t.selector===":root"&&(t.selector=":host > *")}transformCssText(t,r){return t=t.replace(KM,(n,i,o,a)=>this._produceCssProperties(n,i,o,a,r)),this._consumeCssProperties(t,r)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let r=t;for(;r.parent;)r=r.parent;let n={},i=!1;return Ox(r,o=>{i=i||o===t,!i&&o.selector===t.selector&&Object.assign(n,this._cssTextToMap(o.parsedCssText))}),n}_consumeCssProperties(t,r){let n=null;for(;n=Dx.exec(t);){let i=n[0],o=n[1],a=n.index,s=a+i.indexOf("@apply"),l=a+i.length,c=t.slice(0,s),u=t.slice(l),h=r?this._fallbacksFromPreviousRules(r):{};Object.assign(h,this._cssTextToMap(c));let f=this._atApplyToCssProperties(o,h);t=`${c}${f}${u}`,Dx.lastIndex=a+f.length}return t}_atApplyToCssProperties(t,r){t=t.replace(Z1e,"");let n=[],i=this._map.get(t);if(i||(this._map.set(t,{}),i=this._map.get(t)),i){this._currentElement&&(i.dependants[this._currentElement]=!0);let o,a,s,l=i.properties;for(o in l)s=r&&r[o],a=[o,": var(",t,IG,o],s&&a.push(",",s.replace(Umt,"")),a.push(")"),Umt.test(l[o])&&a.push(" !important"),n.push(a.join(""))}return n.join("; ")}_replaceInitialOrInherit(t,r){let n=J1e.exec(r);return n&&(n[1]?r=this._getInitialValueForProperty(t):r="apply-shim-inherit"),r}_cssTextToMap(t,r=!1){let n=t.split(";"),i,o,a={};for(let s=0,l,c;s<n.length;s++)l=n[s],l&&(c=l.split(":"),c.length>1&&(i=c[0].trim(),o=c.slice(1).join(":"),r&&(o=this._replaceInitialOrInherit(i,o)),a[i]=o));return a}_invalidateMixinEntry(t){if(!!XI)for(let r in t.dependants)r!==this._currentElement&&XI(r)}_produceCssProperties(t,r,n,i,o){if(n&&AG(n,(_,y)=>{y&&this._map.get(y)&&(i=`@apply ${y};`)}),!i)return t;let a=this._consumeCssProperties(""+i,o),s=t.slice(0,t.indexOf("--")),l=this._cssTextToMap(a,!0),c=l,u=this._map.get(r),h=u&&u.properties;h?c=Object.assign(Object.create(h),l):this._map.set(r,c);let f=[],p,d,g=!1;for(p in c)d=l[p],d===void 0&&(d="initial"),h&&!(p in h)&&(g=!0),f.push(`${r}${IG}${p}: ${d}`);return g&&this._invalidateMixinEntry(u),u&&(u.properties=c),n&&(s=`${t};${s}`),`${s}${f.join("; ")};`}};Do.prototype.detectMixin=Do.prototype.detectMixin;Do.prototype.transformStyle=Do.prototype.transformStyle;Do.prototype.transformCustomStyle=Do.prototype.transformCustomStyle;Do.prototype.transformRules=Do.prototype.transformRules;Do.prototype.transformRule=Do.prototype.transformRule;Do.prototype.transformTemplate=Do.prototype.transformTemplate;Do.prototype._separator=IG;Object.defineProperty(Do.prototype,"invalidCallback",{get(){return XI},set(e){XI=e}});var qmt=Do;var Q1e={},QM=Q1e;var $I="_applyShimCurrentVersion",zx="_applyShimNextVersion",KI="_applyShimValidatingVersion",txe=Promise.resolve();function Gmt(e){let t=QM[e];t&&exe(t)}function exe(e){e[$I]=e[$I]||0,e[KI]=e[KI]||0,e[zx]=(e[zx]||0)+1}function kG(e){return e[$I]===e[zx]}function Wmt(e){return!kG(e)&&e[KI]===e[zx]}function Ymt(e){e[KI]=e[zx],e._validating||(e._validating=!0,txe.then(function(){e[$I]=e[zx],e._validating=!1}))}var RG=null,jmt=window.HTMLImports&&window.HTMLImports.whenReady||null,NG;function ZI(e){requestAnimationFrame(function(){jmt?jmt(e):(RG||(RG=new Promise(t=>{NG=t}),document.readyState==="complete"?NG():document.addEventListener("readystatechange",()=>{document.readyState==="complete"&&NG()})),RG.then(function(){e&&e()}))})}var Xmt="__seenByShadyCSS",JI="__shadyCSSCachedStyle",QI=null,tE=null,Zl=class{constructor(){this.customStyles=[],this.enqueued=!1,ZI(()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()})}enqueueDocumentValidation(){this.enqueued||!tE||(this.enqueued=!0,ZI(tE))}addCustomStyle(t){t[Xmt]||(t[Xmt]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[JI])return t[JI];let r;return t.getStyle?r=t.getStyle():r=t,r}processStyles(){let t=this.customStyles;for(let r=0;r<t.length;r++){let n=t[r];if(n[JI])continue;let i=this.getStyleForCustomStyle(n);if(i){let o=i.__appliedElement||i;QI&&QI(o),n[JI]=o}}return t}};Zl.prototype.addCustomStyle=Zl.prototype.addCustomStyle;Zl.prototype.getStyleForCustomStyle=Zl.prototype.getStyleForCustomStyle;Zl.prototype.processStyles=Zl.prototype.processStyles;Object.defineProperties(Zl.prototype,{transformCallback:{get(){return QI},set(e){QI=e}},validateCallback:{get(){return tE},set(e){let t=!1;tE||(t=!0),tE=e,t&&this.enqueueDocumentValidation()}}});var eE=new qmt,DG=class{constructor(){this.customStyleInterface=null,eE.invalidCallback=Gmt}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{eE.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame(()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()})})}prepareTemplate(t,r){if(this.ensure(),PG(t))return;QM[r]=t;let n=eE.transformTemplate(t,r);t._styleAst=n}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(!!this.customStyleInterface.enqueued){for(let r=0;r<t.length;r++){let n=t[r],i=this.customStyleInterface.getStyleForCustomStyle(n);i&&eE.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,r){if(this.ensure(),r&&JM(t,r),t.shadowRoot){this.styleElement(t);let n=t.shadowRoot.children||t.shadowRoot.childNodes;for(let i=0;i<n.length;i++)this.styleSubtree(n[i])}else{let n=t.children||t.childNodes;for(let i=0;i<n.length;i++)this.styleSubtree(n[i])}}styleElement(t){this.ensure();let{is:r}=Fmt(t),n=QM[r];if(!(n&&PG(n))&&n&&!kG(n)){Wmt(n)||(this.prepareTemplate(n,r),Ymt(n));let i=t.shadowRoot;if(i){let o=i.querySelector("style");o&&(o.__cssRules=n._styleAst,o.textContent=ZM(n._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}};if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){let e=new DG,t=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(r,n,i){e.flushCustomStyles(),e.prepareTemplate(r,n)},prepareTemplateStyles(r,n,i){window.ShadyCSS.prepareTemplate(r,n,i)},prepareTemplateDom(r,n){},styleSubtree(r,n){e.flushCustomStyles(),e.styleSubtree(r,n)},styleElement(r){e.flushCustomStyles(),e.styleElement(r)},styleDocument(r){e.flushCustomStyles(),e.styleDocument(r)},getComputedStyleValue(r,n){return jI(r,n)},flushCustomStyles(){e.flushCustomStyles()},nativeCss:Nx,nativeShadow:h_,cssBuild:Mm,disableRuntime:WI},t&&(window.ShadyCSS.CustomStyleInterface=t)}window.ShadyCSS.ApplyShim=eE;var sr=class{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,r){this._asyncModule=t,this._callback=r,this._timer=this._asyncModule.run(()=>{this._timer=null,rE.delete(this),this._callback()})}cancel(){this.isActive()&&(this._cancelAsync(),rE.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return this._timer!=null}static debounce(t,r,n){return t instanceof sr?t._cancelAsync():t=new sr,t.setConfig(r,n),t}},rE=new Set,Jl=function(e){rE.add(e)},$mt=function(){let e=Boolean(rE.size);return rE.forEach(t=>{try{t.flush()}catch(r){setTimeout(()=>{throw r})}}),e};var BG=typeof document.head.style.touchAction=="string",e9="__polymerGestures",t9="__polymerGesturesHandled",zG="__polymerGesturesTouchAction",Kmt=25,Zmt=5,nxe=2,ixe=2500,rgt=["mousedown","mousemove","mouseup","click"],oxe=[0,1,4,2],axe=function(){try{return new MouseEvent("test",{buttons:1}).buttons===1}catch(e){return!1}}();function HG(e){return rgt.indexOf(e)>-1}var VG=!1;(function(){try{let e=Object.defineProperty({},"passive",{get(){VG=!0}});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(e){}})();function ngt(e){if(!(HG(e)||e==="touchend")&&BG&&VG&&Ydt)return{passive:!0}}var igt=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/),FG=[],sxe={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},lxe={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function cxe(e){return sxe[e.localName]||!1}function uxe(e){let t=Array.prototype.slice.call(e.labels||[]);if(!t.length){t=[];let r=e.getRootNode();if(e.id){let n=r.querySelectorAll(`label[for = ${e.id}]`);for(let i=0;i<n.length;i++)t.push(n[i])}}return t}var Jmt=function(e){let t=e.sourceCapabilities;if(!(t&&!t.firesTouchEvents)&&(e[t9]={skip:!0},e.type==="click")){let r=!1,n=n9(e);for(let i=0;i<n.length;i++){if(n[i].nodeType===Node.ELEMENT_NODE){if(n[i].localName==="label")FG.push(n[i]);else if(cxe(n[i])){let o=uxe(n[i]);for(let a=0;a<o.length;a++)r=r||FG.indexOf(o[a])>-1}}if(n[i]===ia.mouse.target)return}if(r)return;e.preventDefault(),e.stopPropagation()}};function Qmt(e){let t=igt?["click"]:rgt;for(let r=0,n;r<t.length;r++)n=t[r],e?(FG.length=0,document.addEventListener(n,Jmt,!0)):document.removeEventListener(n,Jmt,!0)}function hxe(e){if(!fG)return;ia.mouse.mouseIgnoreJob||Qmt(!0);let t=function(){Qmt(),ia.mouse.target=null,ia.mouse.mouseIgnoreJob=null};ia.mouse.target=n9(e)[0],ia.mouse.mouseIgnoreJob=sr.debounce(ia.mouse.mouseIgnoreJob,mo.after(ixe),t)}function p_(e){let t=e.type;if(!HG(t))return!1;if(t==="mousemove"){let r=e.buttons===void 0?1:e.buttons;return e instanceof window.MouseEvent&&!axe&&(r=oxe[e.which]||0),Boolean(r&1)}else return(e.button===void 0?0:e.button)===0}function fxe(e){if(e.type==="click"){if(e.detail===0)return!0;let t=_p(e);if(!t.nodeType||t.nodeType!==Node.ELEMENT_NODE)return!0;let r=t.getBoundingClientRect(),n=e.pageX,i=e.pageY;return!(n>=r.left&&n<=r.right&&i>=r.top&&i<=r.bottom)}return!1}var ia={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function pxe(e){let t="auto",r=n9(e);for(let n=0,i;n<r.length;n++)if(i=r[n],i[zG]){t=i[zG];break}return t}function ogt(e,t,r){e.movefn=t,e.upfn=r,document.addEventListener("mousemove",t),document.addEventListener("mouseup",r)}function Fx(e){document.removeEventListener("mousemove",e.movefn),document.removeEventListener("mouseup",e.upfn),e.movefn=null,e.upfn=null}fG&&document.addEventListener("touchend",hxe,VG?{passive:!0}:!1);var n9=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:e=>e.composedPath&&e.composedPath()||[],iE={},f_=[];function dxe(e,t){let r=document.elementFromPoint(e,t),n=r;for(;n&&n.shadowRoot&&!window.ShadyDOM;){let i=n;if(n=n.shadowRoot.elementFromPoint(e,t),i===n)break;n&&(r=n)}return r}function _p(e){let t=n9(e);return t.length>0?t[0]:e.target}function agt(e){let t,r=e.type,i=e.currentTarget[e9];if(!i)return;let o=i[r];if(!!o){if(!e[t9]&&(e[t9]={},r.slice(0,5)==="touch")){e=e;let a=e.changedTouches[0];if(r==="touchstart"&&e.touches.length===1&&(ia.touch.id=a.identifier),ia.touch.id!==a.identifier)return;BG||(r==="touchstart"||r==="touchmove")&&mxe(e)}if(t=e[t9],!t.skip){for(let a=0,s;a<f_.length;a++)s=f_[a],o[s.name]&&!t[s.name]&&s.flow&&s.flow.start.indexOf(e.type)>-1&&s.reset&&s.reset();for(let a=0,s;a<f_.length;a++)s=f_[a],o[s.name]&&!t[s.name]&&(t[s.name]=!0,s[r](e))}}}function mxe(e){let t=e.changedTouches[0],r=e.type;if(r==="touchstart")ia.touch.x=t.clientX,ia.touch.y=t.clientY,ia.touch.scrollDecided=!1;else if(r==="touchmove"){if(ia.touch.scrollDecided)return;ia.touch.scrollDecided=!0;let n=pxe(e),i=!1,o=Math.abs(ia.touch.x-t.clientX),a=Math.abs(ia.touch.y-t.clientY);e.cancelable&&(n==="none"?i=!0:n==="pan-x"?i=a>o:n==="pan-y"&&(i=o>a)),i?e.preventDefault():r9("track")}}function Em(e,t,r){return iE[t]?(gxe(e,t,r),!0):!1}function sgt(e,t,r){return iE[t]?(_xe(e,t,r),!0):!1}function gxe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[e9];a||(e[e9]=a={});for(let s=0,l,c;s<i.length;s++)l=i[s],!(igt&&HG(l)&&l!=="click")&&(c=a[l],c||(a[l]=c={_count:0}),c._count===0&&e.addEventListener(l,agt,ngt(l)),c[o]=(c[o]||0)+1,c._count=(c._count||0)+1);e.addEventListener(t,r),n.touchAction&&d_(e,n.touchAction)}function _xe(e,t,r){let n=iE[t],i=n.deps,o=n.name,a=e[e9];if(a)for(let s=0,l,c;s<i.length;s++)l=i[s],c=a[l],c&&c[o]&&(c[o]=(c[o]||1)-1,c._count=(c._count||1)-1,c._count===0&&e.removeEventListener(l,agt,ngt(l)));e.removeEventListener(t,r)}function UG(e){f_.push(e);for(let t=0;t<e.emits.length;t++)iE[e.emits[t]]=e}function yxe(e){for(let t=0,r;t<f_.length;t++){r=f_[t];for(let n=0,i;n<r.emits.length;n++)if(i=r.emits[n],i===e)return r}return null}function d_(e,t){BG&&e instanceof HTMLElement&&li.run(()=>{e.style.touchAction=t}),e[zG]=t}function qG(e,t,r){let n=new Event(t,{bubbles:!0,cancelable:!0,composed:!0});if(n.detail=r,ue(e).dispatchEvent(n),n.defaultPrevented){let i=r.preventer||r.sourceEvent;i&&i.preventDefault&&i.preventDefault()}}function r9(e){let t=yxe(e);t.info&&(t.info.prevent=!0)}UG({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Fx(this.info)},mousedown:function(e){if(!p_(e))return;let t=_p(e),r=this,n=function(a){p_(a)||(nE("up",t,a),Fx(r.info))},i=function(a){p_(a)&&nE("up",t,a),Fx(r.info)};ogt(this.info,n,i),nE("down",t,e)},touchstart:function(e){nE("down",_p(e),e.changedTouches[0],e)},touchend:function(e){nE("up",_p(e),e.changedTouches[0],e)}});function nE(e,t,r,n){!t||qG(t,e,{x:r.clientX,y:r.clientY,sourceEvent:r,preventer:n,prevent:function(i){return r9(i)}})}UG({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(e){this.moves.length>nxe&&this.moves.shift(),this.moves.push(e)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Fx(this.info)},mousedown:function(e){if(!p_(e))return;let t=_p(e),r=this,n=function(a){let s=a.clientX,l=a.clientY;tgt(r.info,s,l)&&(r.info.state=r.info.started?a.type==="mouseup"?"end":"track":"start",r.info.state==="start"&&r9("tap"),r.info.addMove({x:s,y:l}),p_(a)||(r.info.state="end",Fx(r.info)),t&&OG(r.info,t,a),r.info.started=!0)},i=function(a){r.info.started&&n(a),Fx(r.info)};ogt(this.info,n,i),this.info.x=e.clientX,this.info.y=e.clientY},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchmove:function(e){let t=_p(e),r=e.changedTouches[0],n=r.clientX,i=r.clientY;tgt(this.info,n,i)&&(this.info.state==="start"&&r9("tap"),this.info.addMove({x:n,y:i}),OG(this.info,t,r),this.info.state="track",this.info.started=!0)},touchend:function(e){let t=_p(e),r=e.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:r.clientX,y:r.clientY}),OG(this.info,t,r))}});function tgt(e,t,r){if(e.prevent)return!1;if(e.started)return!0;let n=Math.abs(e.x-t),i=Math.abs(e.y-r);return n>=Zmt||i>=Zmt}function OG(e,t,r){if(!t)return;let n=e.moves[e.moves.length-2],i=e.moves[e.moves.length-1],o=i.x-e.x,a=i.y-e.y,s,l=0;n&&(s=i.x-n.x,l=i.y-n.y),qG(t,"track",{state:e.state,x:r.clientX,y:r.clientY,dx:o,dy:a,ddx:s,ddy:l,sourceEvent:r,hover:function(){return dxe(r.clientX,r.clientY)}})}UG({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(e){p_(e)&&(this.info.x=e.clientX,this.info.y=e.clientY)},click:function(e){p_(e)&&egt(this.info,e)},touchstart:function(e){let t=e.changedTouches[0];this.info.x=t.clientX,this.info.y=t.clientY},touchend:function(e){egt(this.info,e.changedTouches[0],e)}});function egt(e,t,r){let n=Math.abs(t.clientX-e.x),i=Math.abs(t.clientY-e.y),o=_p(r||t);!o||lxe[o.localName]&&o.hasAttribute("disabled")||(isNaN(n)||isNaN(i)||n<=Kmt&&i<=Kmt||fxe(t))&&(e.prevent||qG(o,"tap",{x:t.clientX,y:t.clientY,sourceEvent:t,preventer:r}))}var lgt=_p;var yh=Rn(e=>{class t extends e{_addEventListenerToNode(n,i,o){Em(n,i,o)||super._addEventListenerToNode(n,i,o)}_removeEventListenerFromNode(n,i,o){sgt(n,i,o)||super._removeEventListenerFromNode(n,i,o)}}return t});var vxe=/:host\(:dir\((ltr|rtl)\)\)/g,xxe=':host([dir="$1"])',bxe=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,wxe=':host([dir="$2"]) $1',Sxe=/:dir\((?:ltr|rtl)\)/,ugt=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),oE=[],aE=null,GG="";function hgt(){GG=document.documentElement.getAttribute("dir")}function fgt(e){e.__autoDirOptOut||e.setAttribute("dir",GG)}function pgt(){hgt(),GG=document.documentElement.getAttribute("dir");for(let e=0;e<oE.length;e++)fgt(oE[e])}function Mxe(){aE&&aE.takeRecords().length&&pgt()}var dgt=Rn(e=>{ugt||aE||(hgt(),aE=new MutationObserver(pgt),aE.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));let t=HI(e);class r extends t{static _processStyleText(i,o){return i=t._processStyleText.call(this,i,o),!ugt&&Sxe.test(i)&&(i=this._replaceDirInCssText(i),this.__activateDir=!0),i}static _replaceDirInCssText(i){let o=i;return o=o.replace(vxe,xxe),o=o.replace(bxe,wxe),o}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){t.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(Mxe(),oE.push(this),fgt(this))}disconnectedCallback(){if(t.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){let i=oE.indexOf(this);i>-1&&oE.splice(i,1)}}}return r.__activateDir=!1,r});var i9=!1,mgt=[],ggt=[];function _gt(){i9=!0,requestAnimationFrame(function(){i9=!1,Exe(mgt),setTimeout(function(){Txe(ggt)})})}function Exe(e){for(;e.length;)ygt(e.shift())}function Txe(e){for(let t=0,r=e.length;t<r;t++)ygt(e.shift())}function ygt(e){let t=e[0],r=e[1],n=e[2];try{r.apply(t,n)}catch(i){setTimeout(()=>{throw i})}}function vgt(e,t,r){i9||_gt(),mgt.push([e,t,r])}function Tm(e,t,r){i9||_gt(),ggt.push([e,t,r])}function xgt(){document.body.removeAttribute("unresolved")}document.readyState==="interactive"||document.readyState==="complete"?xgt():window.addEventListener("DOMContentLoaded",xgt);function sE(e,t,r){return{index:e,removed:t,addedCount:r}}var bgt=0,wgt=1,WG=2,YG=3;function Cxe(e,t,r,n,i,o){let a=o-i+1,s=r-t+1,l=new Array(a);for(let c=0;c<a;c++)l[c]=new Array(s),l[c][0]=c;for(let c=0;c<s;c++)l[0][c]=c;for(let c=1;c<a;c++)for(let u=1;u<s;u++)if(jG(e[t+u-1],n[i+c-1]))l[c][u]=l[c-1][u-1];else{let h=l[c-1][u]+1,f=l[c][u-1]+1;l[c][u]=h<f?h:f}return l}function Axe(e){let t=e.length-1,r=e[0].length-1,n=e[t][r],i=[];for(;t>0||r>0;){if(t==0){i.push(WG),r--;continue}if(r==0){i.push(YG),t--;continue}let o=e[t-1][r-1],a=e[t-1][r],s=e[t][r-1],l;a<s?l=a<o?a:o:l=s<o?s:o,l==o?(o==n?i.push(bgt):(i.push(wgt),n=o),t--,r--):l==a?(i.push(YG),t--,n=a):(i.push(WG),r--,n=s)}return i.reverse(),i}function Pxe(e,t,r,n,i,o){let a=0,s=0,l,c=Math.min(r-t,o-i);if(t==0&&i==0&&(a=Ixe(e,n,c)),r==e.length&&o==n.length&&(s=Lxe(e,n,c-a)),t+=a,i+=a,r-=s,o-=s,r-t==0&&o-i==0)return[];if(t==r){for(l=sE(t,[],0);i<o;)l.removed.push(n[i++]);return[l]}else if(i==o)return[sE(t,[],r-t)];let u=Axe(Cxe(e,t,r,n,i,o));l=void 0;let h=[],f=t,p=i;for(let d=0;d<u.length;d++)switch(u[d]){case bgt:l&&(h.push(l),l=void 0),f++,p++;break;case wgt:l||(l=sE(f,[],0)),l.addedCount++,f++,l.removed.push(n[p]),p++;break;case WG:l||(l=sE(f,[],0)),l.addedCount++,f++;break;case YG:l||(l=sE(f,[],0)),l.removed.push(n[p]),p++;break}return l&&h.push(l),h}function Ixe(e,t,r){for(let n=0;n<r;n++)if(!jG(e[n],t[n]))return n;return r}function Lxe(e,t,r){let n=e.length,i=t.length,o=0;for(;o<r&&jG(e[--n],t[--i]);)o++;return o}function o9(e,t){return Pxe(e,0,e.length,t,0,t.length)}function jG(e,t){return e===t}function Bx(e){return e.localName==="slot"}var vh=class{static getFlattenedNodes(e){let t=ue(e);return Bx(e)?(e=e,t.assignedNodes({flatten:!0})):Array.from(t.childNodes).map(r=>Bx(r)?(r=r,ue(r).assignedNodes({flatten:!0})):[r]).reduce((r,n)=>r.concat(n),[])}constructor(e,t){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=e,this.callback=t,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){Bx(this._target)?this._listenSlots([this._target]):ue(this._target).children&&(this._listenSlots(ue(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,e=>{this._processMutations(e)}):(this._nativeChildrenObserver=new MutationObserver(e=>{this._processMutations(e)}),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){Bx(this._target)?this._unlistenSlots([this._target]):ue(this._target).children&&(this._unlistenSlots(ue(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,li.run(()=>this.flush()))}_processMutations(e){this._processSlotMutations(e),this.flush()}_processSlotMutations(e){if(e)for(let t=0;t<e.length;t++){let r=e[t];r.addedNodes&&this._listenSlots(r.addedNodes),r.removedNodes&&this._unlistenSlots(r.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let e={target:this._target,addedNodes:[],removedNodes:[]},t=this.constructor.getFlattenedNodes(this._target),r=o9(t,this._effectiveNodes);for(let i=0,o;i<r.length&&(o=r[i]);i++)for(let a=0,s;a<o.removed.length&&(s=o.removed[a]);a++)e.removedNodes.push(s);for(let i=0,o;i<r.length&&(o=r[i]);i++)for(let a=o.index;a<o.index+o.addedCount;a++)e.addedNodes.push(t[a]);this._effectiveNodes=t;let n=!1;return(e.addedNodes.length||e.removedNodes.length)&&(n=!0,this.callback.call(this._target,e)),n}_listenSlots(e){for(let t=0;t<e.length;t++){let r=e[t];Bx(r)&&r.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(e){for(let t=0;t<e.length;t++){let r=e[t];Bx(r)&&r.removeEventListener("slotchange",this._boundSchedule)}}};var ci=function(){let e,t;do e=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),t=$mt();while(e||t)};var Hx=Element.prototype,kxe=Hx.matches||Hx.matchesSelector||Hx.mozMatchesSelector||Hx.msMatchesSelector||Hx.oMatchesSelector||Hx.webkitMatchesSelector,$G=function(e,t){return kxe.call(e,t)},Kr=class{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new vh(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if(ue(this.node).contains(t))return!0;let r=t,n=t.ownerDocument;for(;r&&r!==n&&r!==this.node;)r=ue(r).parentNode||ue(r).host;return r===this.node}getOwnerRoot(){return ue(this.node).getRootNode()}getDistributedNodes(){return this.node.localName==="slot"?ue(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],r=ue(this.node).assignedSlot;for(;r;)t.push(r),r=ue(r).assignedSlot;return t}importNode(t,r){let n=this.node instanceof Document?this.node:this.node.ownerDocument;return ue(n).importNode(t,r)}getEffectiveChildNodes(){return vh.getFlattenedNodes(this.node)}queryDistributedElements(t){let r=this.getEffectiveChildNodes(),n=[];for(let i=0,o=r.length,a;i<o&&(a=r[i]);i++)a.nodeType===Node.ELEMENT_NODE&&$G(a,t)&&n.push(a);return n}get activeElement(){let t=this.node;return t._activeElement!==void 0?t._activeElement:t.activeElement}};function Rxe(e,t){for(let r=0;r<t.length;r++){let n=t[r];e[n]=function(){return this.node[n].apply(this.node,arguments)}}}function Sgt(e,t){for(let r=0;r<t.length;r++){let n=t[r];Object.defineProperty(e,n,{get:function(){return this.node[n]},configurable:!0})}}function Nxe(e,t){for(let r=0;r<t.length;r++){let n=t[r];Object.defineProperty(e,n,{get:function(){return this.node[n]},set:function(i){this.node[n]=i},configurable:!0})}}var lE=class{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}};Kr.prototype.cloneNode;Kr.prototype.appendChild;Kr.prototype.insertBefore;Kr.prototype.removeChild;Kr.prototype.replaceChild;Kr.prototype.setAttribute;Kr.prototype.removeAttribute;Kr.prototype.querySelector;Kr.prototype.querySelectorAll;Kr.prototype.parentNode;Kr.prototype.firstChild;Kr.prototype.lastChild;Kr.prototype.nextSibling;Kr.prototype.previousSibling;Kr.prototype.firstElementChild;Kr.prototype.lastElementChild;Kr.prototype.nextElementSibling;Kr.prototype.previousElementSibling;Kr.prototype.childNodes;Kr.prototype.children;Kr.prototype.classList;Kr.prototype.textContent;Kr.prototype.innerHTML;var XG=Kr;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class e extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(Kr.prototype).forEach(t=>{t!="activeElement"&&(e.prototype[t]=Kr.prototype[t])}),Sgt(e.prototype,["classList"]),XG=e,Object.defineProperties(lE.prototype,{localTarget:{get(){let t=this.event.currentTarget,r=t&&zt(t).getOwnerRoot(),n=this.path;for(let i=0;i<n.length;i++){let o=n[i];if(zt(o).getOwnerRoot()===r)return o}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else Rxe(Kr.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),Sgt(Kr.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),Nxe(Kr.prototype,["textContent","innerHTML","className"]);var zt=function(e){if(e=e||document,e instanceof XG||e instanceof lE)return e;let t=e.__domApi;return t||(e instanceof Event?t=new lE(e):t=new XG(e),e.__domApi=t),t};var KG=window.ShadyDOM,Mgt=window.ShadyCSS;function Egt(e,t){return ue(e).getRootNode()===t}function Tgt(e,t=!1){if(!KG||!Mgt||!KG.handlesDynamicScoping)return null;let r=Mgt.ScopingShim;if(!r)return null;let n=r.scopeForNode(e),i=ue(e).getRootNode(),o=a=>{if(!Egt(a,i))return;let s=Array.from(KG.nativeMethods.querySelectorAll.call(a,"*"));s.push(a);for(let l=0;l<s.length;l++){let c=s[l];if(!Egt(c,i))continue;let u=r.currentScopeForNode(c);u!==n&&(u!==""&&r.unscopeNode(c,u),r.scopeNode(c,n))}};if(o(e),t){let a=new MutationObserver(s=>{for(let l=0;l<s.length;l++){let c=s[l];for(let u=0;u<c.addedNodes.length;u++){let h=c.addedNodes[u];h.nodeType===Node.ELEMENT_NODE&&o(h)}}});return a.observe(e,{childList:!0,subtree:!0}),a}else return null}var ZG="disable-upgrade",JG=e=>{for(;e;){let t=Object.getOwnPropertyDescriptor(e,"observedAttributes");if(t)return t.get;e=Object.getPrototypeOf(e.prototype).constructor}return()=>[]},E1r=Rn(e=>{let t=Sm(e),r=JG(t);class n extends t{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return r.call(this).concat(ZG)}_initializeProperties(){this.hasAttribute(ZG)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(o){return super._canApplyPropertyDefault(o)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(o))}attributeChangedCallback(o,a,s,l){o==ZG?this.__isUpgradeDisabled&&s==null&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,ue(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(o,a,s,l)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}return n});var a9="disable-upgrade",Dxe=window.ShadyCSS,Gt=Rn(e=>{let t=yh(Sm(e)),r=UI?t:dgt(t),n=JG(r),i={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class o extends r{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(s,l,c){(this.__dataAttributes&&this.__dataAttributes[s]||s===a9)&&this.attributeChangedCallback(s,l,c,null)}setAttribute(s,l){if(qM&&!this._legacyForceObservedAttributes){let c=this.getAttribute(s);super.setAttribute(s,l),this.__attributeReaction(s,c,String(l))}else super.setAttribute(s,l)}removeAttribute(s){if(qM&&!this._legacyForceObservedAttributes){let l=this.getAttribute(s);super.removeAttribute(s),this.__attributeReaction(s,l,null)}else super.removeAttribute(s)}static get observedAttributes(){return qM&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],VI(this.prototype)),this.__observedAttributes):n.call(this).concat(a9)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(s){return super._canApplyPropertyDefault(s)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(s))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(s,l,c,u){l!==c&&(s==a9?this.__isUpgradeDisabled&&c==null&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,ue(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(s,l,c,u),this.attributeChanged(s,l,c)))}attributeChanged(s,l,c){}_initializeProperties(){if(pp&&this.hasAttribute(a9))this.__isUpgradeDisabled=!0;else{let s=Object.getPrototypeOf(this);s.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",s))||(this._registered(),s.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),qM&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){let s=this.attributes;for(let l=0,c=s.length;l<c;l++){let u=s[l];this.__attributeReaction(u.name,null,u.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(s){return this._serializeValue(s)}deserialize(s,l){return this._deserializeValue(s,l)}reflectPropertyToAttribute(s,l,c){this._propertyToAttribute(s,l,c)}serializeValueToAttribute(s,l,c){this._valueToNodeAttribute(c||this,s,l)}extend(s,l){if(!(s&&l))return s||l;let c=Object.getOwnPropertyNames(l);for(let u=0,h;u<c.length&&(h=c[u]);u++){let f=Object.getOwnPropertyDescriptor(l,h);f&&Object.defineProperty(s,h,f)}return s}mixin(s,l){for(let c in l)s[c]=l[c];return s}chainObject(s,l){return s&&l&&s!==l&&(s.__proto__=l),s}instanceTemplate(s){let l=this.constructor._contentForTemplate(s);return document.importNode(l,!0)}fire(s,l,c){c=c||{},l=l==null?{}:l;let u=new Event(s,{bubbles:c.bubbles===void 0?!0:c.bubbles,cancelable:Boolean(c.cancelable),composed:c.composed===void 0?!0:c.composed});u.detail=l;let h=c.node||this;return ue(h).dispatchEvent(u),u}listen(s,l,c){s=s||this;let u=this.__boundListeners||(this.__boundListeners=new WeakMap),h=u.get(s);h||(h={},u.set(s,h));let f=l+c;h[f]||(h[f]=this._addMethodEventListenerToNode(s,l,c,this))}unlisten(s,l,c){s=s||this;let u=this.__boundListeners&&this.__boundListeners.get(s),h=l+c,f=u&&u[h];f&&(this._removeEventListenerFromNode(s,l,f),u[h]=null)}setScrollDirection(s,l){d_(l||this,i[s]||"auto")}$$(s){return this.root.querySelector(s)}get domHost(){let s=ue(this).getRootNode();return s instanceof DocumentFragment?s.host:s}distributeContent(){let l=zt(this);window.ShadyDOM&&l.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return zt(this).getEffectiveChildNodes()}queryDistributedElements(s){return zt(this).queryDistributedElements(s)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter(function(l){return l.nodeType===Node.ELEMENT_NODE})}getEffectiveTextContent(){let s=this.getEffectiveChildNodes(),l=[];for(let c=0,u;u=s[c];c++)u.nodeType!==Node.COMMENT_NODE&&l.push(u.textContent);return l.join("")}queryEffectiveChildren(s){let l=this.queryDistributedElements(s);return l&&l[0]}queryAllEffectiveChildren(s){return this.queryDistributedElements(s)}getContentChildNodes(s){let l=this.root.querySelector(s||"slot");return l?zt(l).getDistributedNodes():[]}getContentChildren(s){return this.getContentChildNodes(s).filter(function(c){return c.nodeType===Node.ELEMENT_NODE})}isLightDescendant(s){let l=this;return l!==s&&ue(l).contains(s)&&ue(l).getRootNode()===ue(s).getRootNode()}isLocalDescendant(s){return this.root===ue(s).getRootNode()}scopeSubtree(s,l=!1){return Tgt(s,l)}getComputedStyleValue(s){return Dxe.getComputedStyleValue(this,s)}debounce(s,l,c){return this._debouncers=this._debouncers||{},this._debouncers[s]=sr.debounce(this._debouncers[s],c>0?mo.after(c):li,l.bind(this))}isDebouncerActive(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];return!!(l&&l.isActive())}flushDebouncer(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];l&&l.flush()}cancelDebouncer(s){this._debouncers=this._debouncers||{};let l=this._debouncers[s];l&&l.cancel()}async(s,l){return l>0?mo.run(s.bind(this),l):~li.run(s.bind(this))}cancelAsync(s){s<0?li.cancel(~s):mo.cancel(s)}create(s,l){let c=document.createElement(s);if(l)if(c.setProperties)c.setProperties(l);else for(let u in l)c[u]=l[u];return c}elementMatches(s,l){return $G(l||this,s)}toggleAttribute(s,l){let c=this;return arguments.length===3&&(c=arguments[2]),arguments.length==1&&(l=!c.hasAttribute(s)),l?(ue(c).setAttribute(s,""),!0):(ue(c).removeAttribute(s),!1)}toggleClass(s,l,c){c=c||this,arguments.length==1&&(l=!c.classList.contains(s)),l?c.classList.add(s):c.classList.remove(s)}transform(s,l){l=l||this,l.style.webkitTransform=s,l.style.transform=s}translate3d(s,l,c,u){u=u||this,this.transform("translate3d("+s+","+l+","+c+")",u)}arrayDelete(s,l){let c;if(Array.isArray(s)){if(c=s.indexOf(l),c>=0)return s.splice(c,1)}else if(c=No(this,s).indexOf(l),c>=0)return this.splice(s,c,1);return null}_logger(s,l){switch(Array.isArray(l)&&l.length===1&&Array.isArray(l[0])&&(l=l[0]),s){case"log":case"warn":case"error":console[s](...l)}}_log(...s){this._logger("log",s)}_warn(...s){this._logger("warn",s)}_error(...s){this._logger("error",s)}_logf(s,...l){return["[%s::%s]",this.is,s,...l]}}return o.prototype.is="",o});var Cm=Ee(Oe(),1);function xh(e,t){let r=0,n=0;for(;;){if(r===e.length)return n===t.length?0:-1;if(n===t.length)return 1;if(m_(e[r])&&m_(t[n])){let i=r,o=n;r=Cgt(e,r+1),n=Cgt(t,n+1);let a=parseFloat(e.slice(i,r)),s=parseFloat(t.slice(o,n));if(a<s)return-1;if(a>s)return 1;continue}if(QG(e[r])){if(!QG(t[n]))return-1}else{if(QG(t[n]))return 1;if(e[r]<t[n])return-1;if(e[r]>t[n])return 1}r++,n++}}function Cgt(e,t){let r;(function(i){i[i.NATURAL=0]="NATURAL",i[i.REAL=1]="REAL",i[i.EXPONENT_SIGN=2]="EXPONENT_SIGN",i[i.EXPONENT=3]="EXPONENT"})(r||(r={}));let n=r.NATURAL;for(;t<e.length;t++)if(n===r.NATURAL){if(e[t]===".")n=r.REAL;else if(e[t]==="e"||e[t]==="E")n=r.EXPONENT_SIGN;else if(!m_(e[t]))break}else if(n===r.REAL){if(e[t]==="e"||e[t]==="E")n=r.EXPONENT_SIGN;else if(!m_(e[t]))break}else if(n===r.EXPONENT_SIGN)if(m_(e[t])||e[t]==="+"||e[t]==="-")n=r.EXPONENT;else break;else if(n===r.EXPONENT&&!m_(e[t]))break;return t}function m_(e){return"0"<=e&&e<="9"}function QG(e){return e==="/"||e==="_"||m_(e)}var Oxe=[];function zxe(e){return Cm.keys(e).sort(xh)}function $i(e){return Cm.union.apply(null,Cm.values(e)).sort(xh)}function Fxe(e,t){let r=[];return t.forEach(n=>r=r.concat(e[n])),Cm.uniq(r).sort(xh)}var Pgt="X-TensorBoard-Feature-Flags",Igt="tensorBoardFeatureFlags";var tW={};Ks(tW,{getFeatureFlags:()=>Hxe,getFeatureFlagsToSendToServer:()=>cE,initializeFeatureFlags:()=>Lgt,setFeatureFlags:()=>Bxe});var s9,l9;Lgt();function Lgt(){s9=null,l9=null}function Bxe(e,t){s9=e,l9=t}function Hxe(){if(s9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return s9}function cE(){if(l9===null)throw Error("FeatureFlags have not yet been determined by TensorBoard.");return l9}var c9=class extends Error{constructor(){super(...arguments),this.name="RequestCancellationError"}},Vx=class extends Error{constructor(t){super(t),this.name="InvalidRequestOptionsError",Object.setPrototypeOf(this,Vx.prototype)}},uE=class extends Error{constructor(t,r){super(),this.message=`RequestNetworkError: ${t.status} at ${r}`,this.name="RequestNetworkError",this.req=t,this.url=r}},Am;(function(e){e.GET="GET",e.POST="POST"})(Am||(Am={}));var Ux=class{validate(){if(this.methodType===Am.GET&&this.body)throw new Vx("body must be missing for a GET request.")}},Ae=class{constructor(t=1e3,r=3){this._queue=[],this._nActiveRequests=0,this._nSimultaneousRequests=t,this._maxRetries=r}request(t,r){let n=Uxe(r);return this.requestWithOptions(t,n)}requestWithOptions(t,r){return r.validate(),new Promise((i,o)=>{let a={resolve:i,reject:o};this._queue.push(a),this.launchRequests()}).then(()=>this.promiseWithRetries(t,this._maxRetries,r)).then(i=>(this._nActiveRequests--,this.launchRequests(),i),i=>(i.name==="RequestNetworkError"&&(this._nActiveRequests--,this.launchRequests()),Promise.reject(i)))}fetch(t,r){return new Promise((n,i)=>{let o={resolve:n,reject:i};this._queue.push(o),this.launchRequests()}).then(()=>{let n=1;return new Promise(i=>{let o=()=>{fetch(t,r).then(a=>{if(!a.ok&&this._maxRetries>n){n++,o();return}i(a),this._nActiveRequests--,this.launchRequests()})};o()})})}clearQueue(){var t;for(;this._queue.length>0;)(t=this._queue.pop())==null||t.reject(new c9("Request cancelled by clearQueue"))}activeRequests(){return this._nActiveRequests}outstandingRequests(){return this._nActiveRequests+this._queue.length}launchRequests(){for(;this._nActiveRequests<this._nSimultaneousRequests&&this._queue.length>0;)this._nActiveRequests++,this._queue.pop().resolve(void 0)}promiseWithRetries(t,r,n){var i=a=>a,o=a=>r>0?this.promiseWithRetries(t,r-1,n):Promise.reject(a);return this._promiseFromUrl(t,n).then(i,o)}_promiseFromUrl(t,r){return new Promise((n,i)=>{let o=Vxe(r.methodType,t,r.withCredentials,r.contentType);o.setRequestHeader(Pgt,JSON.stringify(cE())),o.onload=function(){o.status===200?n(JSON.parse(o.responseText)):i(new uE(o,t))},o.onerror=function(){i(new uE(o,t))},r.body?o.send(r.body):o.send()})}};function Vxe(e,t,r,n){let i=new XMLHttpRequest;return i.open(e,t),r&&(i.withCredentials=r),n&&i.setRequestHeader("Content-Type",n),i}function Uxe(e){let t=new Ux;return e?(t.methodType=Am.POST,t.body=qxe(e),t):(t.methodType=Am.GET,t)}function qxe(e){let t=new FormData;for(let[r,n]of Object.entries(e)){let i=Array.isArray(n)?n:[n];for(let o of i)t.append(r,o)}return t}var kgt="experimentalPlugin",Gxe=new URLSearchParams(window.location.search),Wxe=Rgt();function Rgt(){return{environment:()=>qx("/environment"),experiments:()=>qx("/experiments"),pluginRoute:(e,t,r)=>qx(`/plugin/${e}${t}`,r),pluginRouteForSrc:(e,t,r=new URLSearchParams)=>{let n=cE();return Object.keys(n).length>0&&r.append(Igt,JSON.stringify(n)),qx(`/plugin/${e}${t}`,r)},pluginsListing:()=>qx("/plugins_listing",Ngt({[kgt]:Gxe.getAll(kgt)})),runs:()=>qx("/runs")}}function _e(){return Wxe}function qx(e,t=new URLSearchParams){let r="data"+e;return String(t)&&(r+=(e.includes("?")?"&":"?")+String(t)),r}function Ngt(e={}){let t=Object.keys(e).sort().filter(n=>e[n]),r=new URLSearchParams;return t.forEach(n=>{let i=e[n];(Array.isArray(i)?i:[i]).forEach(a=>r.append(n,a))}),r}var u9=Ee(Oe(),1);var Na;(function(e){e[e.SEARCH_RESULTS=0]="SEARCH_RESULTS",e[e.PREFIX_GROUP=1]="PREFIX_GROUP"})(Na||(Na={}));function Yxe(e,t){let r=(()=>{try{return new RegExp(t)}catch(n){return null}})();return{name:t,metadata:{type:Na.SEARCH_RESULTS,validRegex:!!r,universalRegex:t===".*"},items:r?e.filter(n=>n.match(r)):[]}}function jxe(e,t="/"){let r=[],n={};return e.forEach(i=>{let o=i.indexOf(t),a=o>=0?i.slice(0,o):i;if(!n[a]){let s={name:a,metadata:{type:Na.PREFIX_GROUP},items:[]};n[a]=s,r.push(s)}n[a].items.push(i)}),r}function Xxe(e,t=""){let r=[Yxe(e,t)],n=jxe(e);return Array().concat(r,n)}function hE(e,t,r){let n=$i(e),i=Xxe(n,r),o=$xe(u9.pick(e,t));return i.map(({name:a,metadata:s,items:l})=>({name:a,metadata:s,items:l.map(c=>({tag:c,runs:(o.get(c)||[]).slice()}))}))}function $xe(e){let t=new Map;return Object.keys(e).forEach(r=>{e[r].forEach(n=>{let i=t.get(n)||[];i.push(r),t.set(n,i)})}),t}function Kxe(e,t){let r=xh(e.tag,t.tag);return r!=0?r:xh(e.run,t.run)}function Ql(e,t,r){let n=hE(e,t,r);function i(o){let a=u9.flatten(o.items.map(({tag:s,runs:l})=>l.map(c=>({tag:s,run:c}))));return a.sort(Kxe),{name:o.name,metadata:o.metadata,items:a}}return n.map(i)}var cW={};Ks(cW,{IronResizableBehavior:()=>Js});var Zxe={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},Fgt={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Jxe=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},Fgt);function Qxe(e,t,r){let n=e._noAccessors,i=Object.getOwnPropertyNames(e);for(let o=0;o<i.length;o++){let a=i[o];if(!(a in r))if(n)t[a]=e[a];else{let s=Object.getOwnPropertyDescriptor(e,a);s&&(s.configurable=!0,Object.defineProperty(t,a,s))}}}function Bgt(e,t){return Ugt({},Gt(t),e)}function tbe(e,t,r){for(let n=0;n<t.length;n++)Hgt(e,t[n],r,Jxe)}function Hgt(e,t,r,n){Qxe(t,e,n);for(let i in Zxe)t[i]&&(r[i]=r[i]||[],r[i].push(t[i]))}function Vgt(e,t,r){t=t||[];for(let n=e.length-1;n>=0;n--){let i=e[n];i?Array.isArray(i)?Vgt(i,t):t.indexOf(i)<0&&(!r||r.indexOf(i)<0)&&t.unshift(i):console.warn("behavior is null, check for missing or 404 import")}return t}function Ogt(e,t){for(let r in t){let n=e[r],i=t[r];!("value"in i)&&n&&"value"in n?e[r]=Object.assign({value:n.value},i):e[r]=i}}var zgt=Gt(HTMLElement);function Ugt(e,t,r){let n,i={};class o extends t{static _finalizeClass(){if(!this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this)))t._finalizeClass.call(this);else{if(n)for(let l=0,c;l<n.length;l++)c=n[l],c.properties&&this.createProperties(c.properties),c.observers&&this.createObservers(c.observers,c.properties);e.properties&&this.createProperties(e.properties),e.observers&&this.createObservers(e.observers,e.properties),this._prepareTemplate()}}static get properties(){let l={};if(n)for(let c=0;c<n.length;c++)Ogt(l,n[c].properties);return Ogt(l,e.properties),l}static get observers(){let l=[];if(n)for(let c=0,u;c<n.length;c++)u=n[c],u.observers&&(l=l.concat(u.observers));return e.observers&&(l=l.concat(e.observers)),l}created(){super.created();let l=i.created;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}_registered(){let l=o.prototype;if(!l.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",l))){l.__hasRegisterFinished=!0,super._registered(),pp&&a(l);let c=Object.getPrototypeOf(this),u=i.beforeRegister;if(u)for(let h=0;h<u.length;h++)u[h].call(c);if(u=i.registered,u)for(let h=0;h<u.length;h++)u[h].call(c)}}_applyListeners(){super._applyListeners();let l=i.listeners;if(l)for(let c=0;c<l.length;c++){let u=l[c];if(u)for(let h in u)this._addMethodEventListenerToNode(this,h,u[h])}}_ensureAttributes(){let l=i.hostAttributes;if(l)for(let c=l.length-1;c>=0;c--){let u=l[c];for(let h in u)this._ensureAttribute(h,u[h])}super._ensureAttributes()}ready(){super.ready();let l=i.ready;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}attached(){super.attached();let l=i.attached;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}detached(){super.detached();let l=i.detached;if(l)for(let c=0;c<l.length;c++)l[c].call(this)}attributeChanged(l,c,u){super.attributeChanged();let h=i.attributeChanged;if(h)for(let f=0;f<h.length;f++)h[f].call(this,l,c,u)}}if(r){Array.isArray(r)||(r=[r]);let s=t.prototype.behaviors;n=Vgt(r,null,s),o.prototype.behaviors=s?s.concat(r):n}let a=s=>{n&&tbe(s,n,i),Hgt(s,e,i,Fgt)};return pp||a(o.prototype),o.generatedFrom=e,o}var h9=function(e,t){e||console.warn("Polymer.Class requires `info` argument");let r=t?t(zgt):zgt;return r=Ugt(e,r,e.behaviors),r.is=r.prototype.is=e.is,r};var Yt=function(e){let t;return typeof e=="function"?t=e:t=Yt.Class(e),e._legacyForceObservedAttributes&&(t.prototype._legacyForceObservedAttributes=e._legacyForceObservedAttributes),customElements.define(t.is,t),t};Yt.Class=h9;function eW(e,t,r,n,i){let o;i&&(o=typeof r=="object"&&r!==null,o&&(n=e.__dataTemp[t]));let a=n!==r&&(n===n||r===r);return o&&a&&(e.__dataTemp[t]=r),a}var Gx=Rn(e=>{class t extends e{_shouldPropertyChange(n,i,o){return eW(this,n,i,o,!0)}}return t}),f9=Rn(e=>{class t extends e{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(n,i,o){return eW(this,n,i,o,this.mutableData)}}return t});Gx._mutablePropertyChange=eW;var rW=null;function nW(){return rW}nW.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:nW,writable:!0}});var Ggt=u_(nW),ebe=Gx(Ggt);function rbe(e,t){rW=e,Object.setPrototypeOf(e,t.prototype),new t,rW=null}var nbe=u_(class{});function iW(e,t){for(let r=0;r<t.length;r++){let n=t[r];if(Boolean(e)!=Boolean(n.__hideTemplateChildren__))if(n.nodeType===Node.TEXT_NODE)e?(n.__polymerTextContent__=n.textContent,n.textContent=""):n.textContent=n.__polymerTextContent__;else if(n.localName==="slot")if(e)n.__polymerReplaced__=document.createComment("hidden-slot"),ue(ue(n).parentNode).replaceChild(n.__polymerReplaced__,n);else{let i=n.__polymerReplaced__;i&&ue(ue(i).parentNode).replaceChild(n,i)}else n.style&&(e?(n.__polymerDisplay__=n.style.display,n.style.display="none"):n.style.display=n.__polymerDisplay__);n.__hideTemplateChildren__=e,n._showHideChildren&&n._showHideChildren(e)}}var bh=class extends nbe{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let r=[];this.children=r;for(let i=this.root.firstChild;i;i=i.nextSibling)r.push(i),i.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let n=this.__templatizeOptions;(t&&n.instanceProps||!n.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let n in this.__hostProps)this._setPendingProperty(n,this.__dataHost["_host_"+n]);for(let n in t)this._setPendingProperty(n,t[n])}forwardHostProp(t,r){this._setPendingPropertyOrPath(t,r,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,r,n){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,r,i=>{i.model=this,n(i)});else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(t,r,n)}}_showHideChildren(t){iW(t,this.children)}_setUnmanagedPropertyToNode(t,r,n){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&r=="textContent"?t.__polymerTextContent__=n:super._setUnmanagedPropertyToNode(t,r,n)}get parentModel(){let t=this.__parentModel;if(!t){let r;t=this;do t=t.__dataHost.__dataHost;while((r=t.__templatizeOptions)&&!r.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}};bh.prototype.__dataHost;bh.prototype.__templatizeOptions;bh.prototype._methodHost;bh.prototype.__templatizeOwner;bh.prototype.__hostProps;var ibe=Gx(bh);function qgt(e){let t=e.__dataHost;return t&&t._methodHost||t}function obe(e,t,r){let n=r.mutableData?ibe:bh;tc.mixin&&(n=tc.mixin(n));let i=class extends n{};return i.prototype.__templatizeOptions=r,i.prototype._bindTemplate(e),lbe(i,e,t,r),i}function abe(e,t,r,n){let i=r.forwardHostProp;if(i&&t.hasHostProps){let o=e.localName=="template",a=t.templatizeTemplateClass;if(!a){if(o){let l=r.mutableData?ebe:Ggt;class c extends l{}a=t.templatizeTemplateClass=c}else{let l=e.constructor;class c extends l{}a=t.templatizeTemplateClass=c}let s=t.hostProps;for(let l in s)a.prototype._addPropertyEffect("_host_"+l,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:sbe(l,i)}),a.prototype._createNotifyingProperty("_host_"+l);LI&&n&&hbe(t,r,n)}if(e.__dataProto&&Object.assign(e.__data,e.__dataProto),o)rbe(e,a),e.__dataTemp={},e.__dataPending=null,e.__dataOld=null,e._enableProperties();else{Object.setPrototypeOf(e,a.prototype);let s=t.hostProps;for(let l in s)if(l="_host_"+l,l in e){let c=e[l];delete e[l],e.__data[l]=c}}}}function sbe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,i.substring(6),o[i])}}function lbe(e,t,r,n){let i=r.hostProps||{};for(let o in n.instanceProps){delete i[o];let a=n.notifyInstanceProp;a&&e.prototype._addPropertyEffect(o,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:cbe(o,a)})}if(n.forwardHostProp&&t.__dataHost)for(let o in i)r.hasHostProps||(r.hasHostProps=!0),e.prototype._addPropertyEffect(o,e.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:ube()})}function cbe(e,t){return function(n,i,o){t.call(n.__templatizeOwner,n,i,o[i])}}function ube(){return function(t,r,n){t.__dataHost._setPendingPropertyOrPath("_host_"+r,n[r],!0,!0)}}function tc(e,t,r){if(iu&&!qgt(e))throw new Error("strictTemplatePolicy: template owner not trusted");if(r=r||{},e.__templatizeOwner)throw new Error("A <template> can only be templatized once");e.__templatizeOwner=t;let i=(t?t.constructor:bh)._parseTemplate(e),o=i.templatizeInstanceClass;o||(o=obe(e,i,r),i.templatizeInstanceClass=o);let a=qgt(e);abe(e,i,r,a);let s=class extends o{};return s.prototype._methodHost=a,s.prototype.__dataHost=e,s.prototype.__templatizeOwner=t,s.prototype.__hostProps=i.hostProps,s=s,s}function hbe(e,t,r){let n=r.constructor._properties,{propertyEffects:i}=e,{instanceProps:o}=t;for(let a in i)if(!n[a]&&!(o&&o[a])){let s=i[a];for(let l=0;l<s.length;l++){let{part:c}=s[l].info;if(!(c.signature&&c.signature.static)){console.warn(`Property '${a}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}function p9(e,t){let r;for(;t;)if(r=t.__dataHost?t:t.__templatizeInstance)if(r.__dataHost!=e)t=r.__dataHost;else return r;else t=ue(t).parentNode;return null}var Wgt={templatize(e,t){this._templatizerTemplate=e,this.ctor=tc(e,this,{mutableData:Boolean(t),parentModel:this._parentModel,instanceProps:this._instanceProps,forwardHostProp:this._forwardHostPropV2,notifyInstanceProp:this._notifyInstancePropV2})},stamp(e){return new this.ctor(e)},modelForElement(e){return p9(this._templatizerTemplate,e)}};var Ygt=!1;function Wx(){if(pp&&!c_){if(!Ygt){Ygt=!0;let e=document.createElement("style");e.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(e)}return!0}return!1}var fbe=yh(f9(u_(HTMLElement))),oW=class extends fbe{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),iu)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,r,n,i){this.mutableData=!0}connectedCallback(){Wx()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){ue(ue(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let r=new MutationObserver(()=>{if(t=this.querySelector("template"),t)r.disconnect(),this.render();else throw new Error("dom-bind requires a <template> child")});r.observe(this,{childList:!0});return}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let r=this.root.firstChild;r;r=r.nextSibling)this.__children[this.__children.length]=r;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}};customElements.define("dom-bind",oW);var pbe=f9(mt),d9=class extends pbe{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!UM,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t)}connectedCallback(){if(super.connectedCallback(),Wx()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=ue(ue(this).parentNode);for(let r=0;r<this.__instances.length;r++)this.__attachInstance(r,t)}}__ensureTemplatized(){if(!this.__ctor){let t=this,r=this.template=t._templateInfo?t:this.querySelector("template");if(!r){let i=new MutationObserver(()=>{if(this.querySelector("template"))i.disconnect(),this.__render();else throw new Error("dom-repeat requires a <template> child")});return i.observe(this,{childList:!0}),!1}let n={};n[this.as]=!0,n[this.indexAs]=!0,n[this.itemsIndexAs]=!0,this.__ctor=tc(r,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:n,forwardHostProp:function(i,o){let a=this.__instances;for(let s=0,l;s<a.length&&(l=a[s]);s++)l.forwardHostProp(i,o)},notifyInstanceProp:function(i,o,a){if(OI(this.as,o)){let s=i[this.itemsIndexAs];o==this.as&&(this.items[s]=a);let l=dp(this.as,`${JSCompiler_renameProperty("items",this)}.${s}`,o);this.notifyPath(l,a)}}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if(typeof t=="string"){let r=t,n=this.__getMethodHost();return function(){return n[r].apply(n,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn){if(!t)this.__debounceRender(this.__render,this.delay);else if(this.__observePaths){let r=this.__observePaths;for(let n=0;n<r.length;n++)t.indexOf(r[n])===0&&this.__debounceRender(this.__render,this.delay)}}}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||(t.path==="items"&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,r=0){this.__renderDebouncer=sr.debounce(this.__renderDebouncer,r>0?mo.after(r):li,t.bind(this)),Jl(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),ci()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[],r=this.__sortAndFilterItems(t),n=this.__calculateLimit(r.length);this.__updateInstances(t,n,r),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame(()=>this.__continueChunking())),this._setRenderedItemCount(this.__instances.length),(!UM||this.notifyDomChange)&&this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let r=new Array(t.length);for(let n=0;n<t.length;n++)r[n]=n;return this.__filterFn&&(r=r.filter((n,i,o)=>this.__filterFn(t[n],i,o))),this.__sortFn&&r.sort((n,i)=>this.__sortFn(t[n],t[i])),r}__calculateLimit(t){let r=t,n=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(r=Math.min(t,this.initialCount),i=Math.max(r-n,0),this.__chunkCount=i||1):(i=Math.min(Math.max(t-n,0),this.__chunkCount),r=Math.min(n+i,t)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=r<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,r}__continueChunking(){if(this.__shouldMeasureChunk){let t=performance.now()-this.__renderStartTime,r=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*r)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,r,n){let i=this.__itemsIdxToInstIdx={},o;for(o=0;o<r;o++){let a=this.__instances[o],s=n[o],l=t[s];i[s]=o,a?(a._setPendingProperty(this.as,l),a._setPendingProperty(this.indexAs,o),a._setPendingProperty(this.itemsIndexAs,s),a._flushProperties()):this.__insertInstance(l,o,s)}for(let a=this.__instances.length-1;a>=o;a--)this.__detachAndRemoveInstance(a)}__detachInstance(t){let r=this.__instances[t],n=ue(r.root);for(let i=0;i<r.children.length;i++){let o=r.children[i];n.appendChild(o)}return r}__attachInstance(t,r){let n=this.__instances[t];r.insertBefore(n.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,r,n){let i={};return i[this.as]=t,i[this.indexAs]=r,i[this.itemsIndexAs]=n,new this.__ctor(i)}__insertInstance(t,r,n){let i=this.__stampInstance(t,r,n),o=this.__instances[r+1],a=o?o.children[0]:this;return ue(ue(this).parentNode).insertBefore(i.root,a),this.__instances[r]=i,i}_showHideChildren(t){for(let r=0;r<this.__instances.length;r++)this.__instances[r]._showHideChildren(t)}__handleItemPath(t,r){let n=t.slice(6),i=n.indexOf("."),o=i<0?n:n.substring(0,i);if(o==parseInt(o,10)){let a=i<0?"":n.substring(i+1);this.__handleObservedPaths(a);let s=this.__itemsIdxToInstIdx[o],l=this.__instances[s];if(l){let c=this.as+(a?"."+a:"");l._setPendingPropertyOrPath(c,r,!1,!0),l._flushProperties()}return!0}}itemForElement(t){let r=this.modelForElement(t);return r&&r[this.as]}indexForElement(t){let r=this.modelForElement(t);return r&&r[this.indexAs]}modelForElement(t){return p9(this.template,t)}};customElements.define(d9.is,d9);var m9=class extends mt{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=sr.debounce(this.__renderDebouncer,li,()=>this.__render()),Jl(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();let t=ue(this).parentNode;(!t||t.nodeType==Node.DOCUMENT_FRAGMENT_NODE&&!ue(t).host)&&this.__teardownInstance()}connectedCallback(){super.connectedCallback(),Wx()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){let t=this,r=t._templateInfo?t:ue(t).querySelector("template");if(!r){let n=new MutationObserver(()=>{if(ue(this).querySelector("template"))n.disconnect(),this.__render();else throw new Error("dom-if requires a <template> child")});return n.observe(this,{childList:!0}),!1}this.__template=r}return!0}__ensureInstance(){let t=ue(this).parentNode;if(this.__hasInstance()){let r=this.__getInstanceNodes();if(r&&r.length&&ue(this).previousSibling!==r[r.length-1])for(let i=0,o;i<r.length&&(o=r[i]);i++)ue(t).insertBefore(o,this)}else{if(!t||!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){ci()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),(!UM||this.notifyDomChange)&&this.if!=this._lastIf&&(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}},aW=class extends m9{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(t){let r=this.__dataHost||this;if(iu&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");let n=r._bindTemplate(this.__template,!0);n.runEffects=(i,o,a)=>{let s=this.__syncInfo;if(this.if)s&&(this.__syncInfo=null,this._showHideChildren(),o=Object.assign(s.changedProps,o)),i(o,a);else if(this.__instance)if(s||(s=this.__syncInfo={runEffects:i,changedProps:{}}),a)for(let l in o){let c=au(l);s.changedProps[c]=this.__dataHost[c]}else Object.assign(s.changedProps,o)},this.__instance=r._stampTemplate(this.__template,n),ue(t).insertBefore(this.__instance,this)}__syncHostProperties(){let t=this.__syncInfo;t&&(this.__syncInfo=null,t.runEffects(t.changedProps,!1))}__teardownInstance(){let t=this.__dataHost||this;this.__instance&&(t._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){let t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,iW(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}},sW=class extends m9{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=tc(this.__template,this,{mutableData:!0,forwardHostProp:function(r,n){this.__instance&&(this.if?this.__instance.forwardHostProp(r,n):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[au(r)]=!0))}})),this.__instance=new this.__ctor,ue(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let r=ue(t[0]).parentNode;if(r){r=ue(r);for(let n=0,i;n<t.length&&(i=t[n]);n++)r.removeChild(i)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let r in t)this.__instance._setPendingProperty(r,this.__dataHost[r]);this.__instance._flushProperties()}}_showHideChildren(){let t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}},jgt=RI?aW:sW;customElements.define(jgt.is,jgt);var dbe=Rn(e=>{let t=Sm(e);class r extends t{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(i,o){let a=o.path;if(a==JSCompiler_renameProperty("items",this)){let s=o.base||[],l=this.__lastItems,c=this.__lastMulti;if(i!==c&&this.clearSelection(),l){let u=o9(s,l);this.__applySplices(u)}this.__lastItems=s,this.__lastMulti=i}else if(o.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(o.value.indexSplices);else{let s=a.slice(`${JSCompiler_renameProperty("items",this)}.`.length),l=parseInt(s,10);s.indexOf(".")<0&&s==l&&this.__deselectChangedIdx(l)}}__applySplices(i){let o=this.__selectedMap;for(let s=0;s<i.length;s++){let l=i[s];o.forEach((c,u)=>{c<l.index||(c>=l.index+l.removed.length?o.set(u,c+l.addedCount-l.removed.length):o.set(u,-1))});for(let c=0;c<l.addedCount;c++){let u=l.index+c;o.has(this.items[u])&&o.set(this.items[u],u)}}this.__updateLinks();let a=0;o.forEach((s,l)=>{s<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),a,1):this.selected=this.selectedItem=null,o.delete(l)):a++})}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let i=0;this.__selectedMap.forEach(o=>{o>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${o}`,`${JSCompiler_renameProperty("selected",this)}.${i++}`)})}else this.__selectedMap.forEach(i=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${i}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${i}`)})}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(i){return this.__selectedMap.has(i)}isIndexSelected(i){return this.isSelected(this.items[i])}__deselectChangedIdx(i){let o=this.__selectedIndexForItemIndex(i);if(o>=0){let a=0;this.__selectedMap.forEach((s,l)=>{o==a++&&this.deselect(l)})}}__selectedIndexForItemIndex(i){let o=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${i}`];if(o)return parseInt(o.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(i){let o=this.__selectedMap.get(i);if(o>=0){this.__selectedMap.delete(i);let a;this.multi&&(a=this.__selectedIndexForItemIndex(o)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),a,1):this.selected=this.selectedItem=null}}deselectIndex(i){this.deselect(this.items[i])}select(i){this.selectIndex(this.items.indexOf(i))}selectIndex(i){let o=this.items[i];this.isSelected(o)?this.toggle&&this.deselectIndex(i):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(o,i),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),o):this.selected=this.selectedItem=o)}}return r});var mbe=dbe(mt),g9=class extends mbe{static get is(){return"array-selector"}static get template(){return null}};customElements.define(g9.is,g9);var _9=new Zl;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(e,t,r){},prepareTemplateDom(e,t){},prepareTemplateStyles(e,t,r){},styleSubtree(e,t){_9.processStyles(),JM(e,t)},styleElement(e){_9.processStyles()},styleDocument(e){_9.processStyles(),JM(document.body,e)},getComputedStyleValue(e,t){return jI(e,t)},flushCustomStyles(){},nativeCss:Nx,nativeShadow:h_,cssBuild:Mm,disableRuntime:WI});window.ShadyCSS.CustomStyleInterface=_9;var Xgt="include",gbe=window.ShadyCSS.CustomStyleInterface,lW=class extends HTMLElement{constructor(){super(),this._style=null,gbe.addCustomStyle(this)}getStyle(){if(this._style)return this._style;let t=this.querySelector("style");if(!t)return null;this._style=t;let r=t.getAttribute(Xgt);return r&&(t.removeAttribute(Xgt),t.textContent=imt(r)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}};window.customElements.define("custom-style",lW);var $gt;$gt=Gx._mutablePropertyChange;var Kgt={properties:{mutableData:Boolean},_shouldPropertyChange(e,t,r){return $gt(this,e,t,r,this.mutableData)}};var Da=Gt(HTMLElement).prototype;var y9=new Set,Js={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(y9.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){!this.isAttached||(this._interestedResizables.forEach(function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)},this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&e._interestedResizables.indexOf(this)===-1&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(e){if(this._notifyingDescendant){e.stopPropagation();return}c_||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var t=zt(e).rootTarget;t!==this&&(t.assignParentResizable(this),this._notifyDescendant(t),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){!this.isAttached||(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(!!this.isAttached)if(document.readyState==="loading"){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",function t(){document.removeEventListener("readystatechange",t),e()})}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach(function(t){t!==this&&t._findParent()},this):(y9.forEach(function(t){t!==this&&t._findParent()},this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?y9.delete(this):y9.add(this)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        transition-duration: var(--iron-collapse-transition-duration, 300ms);
        /* Safari 10 needs this property prefixed to correctly apply the custom property */
        -webkit-transition-duration: var(--iron-collapse-transition-duration, 300ms);
        overflow: visible;
      }

      :host(.iron-collapse-closed) {
        display: none;
      }

      :host(:not(.iron-collapse-opened)) {
        overflow: hidden;
      }
    </style>

    <slot></slot>
`,is:"iron-collapse",behaviors:[Js],properties:{horizontal:{type:Boolean,value:!1,observer:"_horizontalChanged"},opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},transitioning:{type:Boolean,notify:!0,readOnly:!0},noAnimation:{type:Boolean},_desiredSize:{type:String,value:""}},get dimension(){return this.horizontal?"width":"height"},get _dimensionMax(){return this.horizontal?"maxWidth":"maxHeight"},get _dimensionMaxCss(){return this.horizontal?"max-width":"max-height"},hostAttributes:{role:"group","aria-hidden":"true"},listeners:{transitionend:"_onTransitionEnd"},toggle:function(){this.opened=!this.opened},show:function(){this.opened=!0},hide:function(){this.opened=!1},updateSize:function(e,t){e=e==="auto"?"":e;var r=t&&!this.noAnimation&&this.isAttached&&this._desiredSize!==e;if(this._desiredSize=e,this._updateTransition(!1),r){var n=this._calcSize();e===""&&(this.style[this._dimensionMax]="",e=this._calcSize()),this.style[this._dimensionMax]=n,this.scrollTop=this.scrollTop,this._updateTransition(!0),r=e!==n}this.style[this._dimensionMax]=e,r||this._transitionEnd()},enableTransition:function(e){Da._warn("`enableTransition()` is deprecated, use `noAnimation` instead."),this.noAnimation=!e},_updateTransition:function(e){this.style.transitionDuration=e&&!this.noAnimation?"":"0s"},_horizontalChanged:function(){this.style.transitionProperty=this._dimensionMaxCss;var e=this._dimensionMax==="maxWidth"?"maxHeight":"maxWidth";this.style[e]="",this.updateSize(this.opened?"auto":"0px",!1)},_openedChanged:function(){this.setAttribute("aria-hidden",!this.opened),this._setTransitioning(!0),this.toggleClass("iron-collapse-closed",!1),this.toggleClass("iron-collapse-opened",!1),this.updateSize(this.opened?"auto":"0px",!0),this.opened&&this.focus()},_transitionEnd:function(){this.style[this._dimensionMax]=this._desiredSize,this.toggleClass("iron-collapse-closed",!this.opened),this.toggleClass("iron-collapse-opened",this.opened),this._updateTransition(!1),this.notifyResize(),this._setTransitioning(!1)},_onTransitionEnd:function(e){zt(e).rootTarget===this&&this._transitionEnd()},_calcSize:function(){return this.getBoundingClientRect()[this.dimension]+"px"}});var Zgt=Q`
/* Most common used flex styles*/
<dom-module id="iron-flex">
  <template>
    <style>
      .layout.horizontal,
      .layout.vertical {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      }

      .layout.inline {
        display: -ms-inline-flexbox;
        display: -webkit-inline-flex;
        display: inline-flex;
      }

      .layout.horizontal {
        -ms-flex-direction: row;
        -webkit-flex-direction: row;
        flex-direction: row;
      }

      .layout.vertical {
        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
      }

      .layout.wrap {
        -ms-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
      }

      .layout.no-wrap {
        -ms-flex-wrap: nowrap;
        -webkit-flex-wrap: nowrap;
        flex-wrap: nowrap;
      }

      .layout.center,
      .layout.center-center {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .layout.center-justified,
      .layout.center-center {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      }

      .flex {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      }

      .flex-auto {
        -ms-flex: 1 1 auto;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
      }

      .flex-none {
        -ms-flex: none;
        -webkit-flex: none;
        flex: none;
      }
    </style>
  </template>
</dom-module>
/* Basic flexbox reverse styles */
<dom-module id="iron-flex-reverse">
  <template>
    <style>
      .layout.horizontal-reverse,
      .layout.vertical-reverse {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      }

      .layout.horizontal-reverse {
        -ms-flex-direction: row-reverse;
        -webkit-flex-direction: row-reverse;
        flex-direction: row-reverse;
      }

      .layout.vertical-reverse {
        -ms-flex-direction: column-reverse;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse;
      }

      .layout.wrap-reverse {
        -ms-flex-wrap: wrap-reverse;
        -webkit-flex-wrap: wrap-reverse;
        flex-wrap: wrap-reverse;
      }
    </style>
  </template>
</dom-module>
/* Flexbox alignment */
<dom-module id="iron-flex-alignment">
  <template>
    <style>
      /**
       * Alignment in cross axis.
       */
      .layout.start {
        -ms-flex-align: start;
        -webkit-align-items: flex-start;
        align-items: flex-start;
      }

      .layout.center,
      .layout.center-center {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      }

      .layout.end {
        -ms-flex-align: end;
        -webkit-align-items: flex-end;
        align-items: flex-end;
      }

      .layout.baseline {
        -ms-flex-align: baseline;
        -webkit-align-items: baseline;
        align-items: baseline;
      }

      /**
       * Alignment in main axis.
       */
      .layout.start-justified {
        -ms-flex-pack: start;
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
      }

      .layout.center-justified,
      .layout.center-center {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      }

      .layout.end-justified {
        -ms-flex-pack: end;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
      }

      .layout.around-justified {
        -ms-flex-pack: distribute;
        -webkit-justify-content: space-around;
        justify-content: space-around;
      }

      .layout.justified {
        -ms-flex-pack: justify;
        -webkit-justify-content: space-between;
        justify-content: space-between;
      }

      /**
       * Self alignment.
       */
      .self-start {
        -ms-align-self: flex-start;
        -webkit-align-self: flex-start;
        align-self: flex-start;
      }

      .self-center {
        -ms-align-self: center;
        -webkit-align-self: center;
        align-self: center;
      }

      .self-end {
        -ms-align-self: flex-end;
        -webkit-align-self: flex-end;
        align-self: flex-end;
      }

      .self-stretch {
        -ms-align-self: stretch;
        -webkit-align-self: stretch;
        align-self: stretch;
      }

      .self-baseline {
        -ms-align-self: baseline;
        -webkit-align-self: baseline;
        align-self: baseline;
      }

      /**
       * multi-line alignment in main axis.
       */
      .layout.start-aligned {
        -ms-flex-line-pack: start;  /* IE10 */
        -ms-align-content: flex-start;
        -webkit-align-content: flex-start;
        align-content: flex-start;
      }

      .layout.end-aligned {
        -ms-flex-line-pack: end;  /* IE10 */
        -ms-align-content: flex-end;
        -webkit-align-content: flex-end;
        align-content: flex-end;
      }

      .layout.center-aligned {
        -ms-flex-line-pack: center;  /* IE10 */
        -ms-align-content: center;
        -webkit-align-content: center;
        align-content: center;
      }

      .layout.between-aligned {
        -ms-flex-line-pack: justify;  /* IE10 */
        -ms-align-content: space-between;
        -webkit-align-content: space-between;
        align-content: space-between;
      }

      .layout.around-aligned {
        -ms-flex-line-pack: distribute;  /* IE10 */
        -ms-align-content: space-around;
        -webkit-align-content: space-around;
        align-content: space-around;
      }
    </style>
  </template>
</dom-module>
/* Non-flexbox positioning helper styles */
<dom-module id="iron-flex-factors">
  <template>
    <style>
      .flex,
      .flex-1 {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      }

      .flex-2 {
        -ms-flex: 2;
        -webkit-flex: 2;
        flex: 2;
      }

      .flex-3 {
        -ms-flex: 3;
        -webkit-flex: 3;
        flex: 3;
      }

      .flex-4 {
        -ms-flex: 4;
        -webkit-flex: 4;
        flex: 4;
      }

      .flex-5 {
        -ms-flex: 5;
        -webkit-flex: 5;
        flex: 5;
      }

      .flex-6 {
        -ms-flex: 6;
        -webkit-flex: 6;
        flex: 6;
      }

      .flex-7 {
        -ms-flex: 7;
        -webkit-flex: 7;
        flex: 7;
      }

      .flex-8 {
        -ms-flex: 8;
        -webkit-flex: 8;
        flex: 8;
      }

      .flex-9 {
        -ms-flex: 9;
        -webkit-flex: 9;
        flex: 9;
      }

      .flex-10 {
        -ms-flex: 10;
        -webkit-flex: 10;
        flex: 10;
      }

      .flex-11 {
        -ms-flex: 11;
        -webkit-flex: 11;
        flex: 11;
      }

      .flex-12 {
        -ms-flex: 12;
        -webkit-flex: 12;
        flex: 12;
      }
    </style>
  </template>
</dom-module>
<dom-module id="iron-positioning">
  <template>
    <style>
      .block {
        display: block;
      }

      [hidden] {
        display: none !important;
      }

      .invisible {
        visibility: hidden !important;
      }

      .relative {
        position: relative;
      }

      .fit {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      }

      body.fullbleed {
        margin: 0;
        height: 100vh;
      }

      .scroll {
        -webkit-overflow-scrolling: touch;
        overflow: auto;
      }

      /* fixed position */
      .fixed-bottom,
      .fixed-left,
      .fixed-right,
      .fixed-top {
        position: fixed;
      }

      .fixed-top {
        top: 0;
        left: 0;
        right: 0;
      }

      .fixed-right {
        top: 0;
        right: 0;
        bottom: 0;
      }

      .fixed-bottom {
        right: 0;
        bottom: 0;
        left: 0;
      }

      .fixed-left {
        top: 0;
        bottom: 0;
        left: 0;
      }
    </style>
  </template>
</dom-module>
`;Zgt.setAttribute("style","display: none;");document.head.appendChild(Zgt.content);var Jgt=Q`
<custom-style>
  <style is="custom-style">
    [hidden] {
      display: none !important;
    }
  </style>
</custom-style>
<custom-style>
  <style is="custom-style">
    html {

      --layout: {
        display: -ms-flexbox;
        display: -webkit-flex;
        display: flex;
      };

      --layout-inline: {
        display: -ms-inline-flexbox;
        display: -webkit-inline-flex;
        display: inline-flex;
      };

      --layout-horizontal: {
        @apply --layout;

        -ms-flex-direction: row;
        -webkit-flex-direction: row;
        flex-direction: row;
      };

      --layout-horizontal-reverse: {
        @apply --layout;

        -ms-flex-direction: row-reverse;
        -webkit-flex-direction: row-reverse;
        flex-direction: row-reverse;
      };

      --layout-vertical: {
        @apply --layout;

        -ms-flex-direction: column;
        -webkit-flex-direction: column;
        flex-direction: column;
      };

      --layout-vertical-reverse: {
        @apply --layout;

        -ms-flex-direction: column-reverse;
        -webkit-flex-direction: column-reverse;
        flex-direction: column-reverse;
      };

      --layout-wrap: {
        -ms-flex-wrap: wrap;
        -webkit-flex-wrap: wrap;
        flex-wrap: wrap;
      };

      --layout-wrap-reverse: {
        -ms-flex-wrap: wrap-reverse;
        -webkit-flex-wrap: wrap-reverse;
        flex-wrap: wrap-reverse;
      };

      --layout-flex-auto: {
        -ms-flex: 1 1 auto;
        -webkit-flex: 1 1 auto;
        flex: 1 1 auto;
      };

      --layout-flex-none: {
        -ms-flex: none;
        -webkit-flex: none;
        flex: none;
      };

      --layout-flex: {
        -ms-flex: 1 1 0.000000001px;
        -webkit-flex: 1;
        flex: 1;
        -webkit-flex-basis: 0.000000001px;
        flex-basis: 0.000000001px;
      };

      --layout-flex-2: {
        -ms-flex: 2;
        -webkit-flex: 2;
        flex: 2;
      };

      --layout-flex-3: {
        -ms-flex: 3;
        -webkit-flex: 3;
        flex: 3;
      };

      --layout-flex-4: {
        -ms-flex: 4;
        -webkit-flex: 4;
        flex: 4;
      };

      --layout-flex-5: {
        -ms-flex: 5;
        -webkit-flex: 5;
        flex: 5;
      };

      --layout-flex-6: {
        -ms-flex: 6;
        -webkit-flex: 6;
        flex: 6;
      };

      --layout-flex-7: {
        -ms-flex: 7;
        -webkit-flex: 7;
        flex: 7;
      };

      --layout-flex-8: {
        -ms-flex: 8;
        -webkit-flex: 8;
        flex: 8;
      };

      --layout-flex-9: {
        -ms-flex: 9;
        -webkit-flex: 9;
        flex: 9;
      };

      --layout-flex-10: {
        -ms-flex: 10;
        -webkit-flex: 10;
        flex: 10;
      };

      --layout-flex-11: {
        -ms-flex: 11;
        -webkit-flex: 11;
        flex: 11;
      };

      --layout-flex-12: {
        -ms-flex: 12;
        -webkit-flex: 12;
        flex: 12;
      };

      /* alignment in cross axis */

      --layout-start: {
        -ms-flex-align: start;
        -webkit-align-items: flex-start;
        align-items: flex-start;
      };

      --layout-center: {
        -ms-flex-align: center;
        -webkit-align-items: center;
        align-items: center;
      };

      --layout-end: {
        -ms-flex-align: end;
        -webkit-align-items: flex-end;
        align-items: flex-end;
      };

      --layout-baseline: {
        -ms-flex-align: baseline;
        -webkit-align-items: baseline;
        align-items: baseline;
      };

      /* alignment in main axis */

      --layout-start-justified: {
        -ms-flex-pack: start;
        -webkit-justify-content: flex-start;
        justify-content: flex-start;
      };

      --layout-center-justified: {
        -ms-flex-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
      };

      --layout-end-justified: {
        -ms-flex-pack: end;
        -webkit-justify-content: flex-end;
        justify-content: flex-end;
      };

      --layout-around-justified: {
        -ms-flex-pack: distribute;
        -webkit-justify-content: space-around;
        justify-content: space-around;
      };

      --layout-justified: {
        -ms-flex-pack: justify;
        -webkit-justify-content: space-between;
        justify-content: space-between;
      };

      --layout-center-center: {
        @apply --layout-center;
        @apply --layout-center-justified;
      };

      /* self alignment */

      --layout-self-start: {
        -ms-align-self: flex-start;
        -webkit-align-self: flex-start;
        align-self: flex-start;
      };

      --layout-self-center: {
        -ms-align-self: center;
        -webkit-align-self: center;
        align-self: center;
      };

      --layout-self-end: {
        -ms-align-self: flex-end;
        -webkit-align-self: flex-end;
        align-self: flex-end;
      };

      --layout-self-stretch: {
        -ms-align-self: stretch;
        -webkit-align-self: stretch;
        align-self: stretch;
      };

      --layout-self-baseline: {
        -ms-align-self: baseline;
        -webkit-align-self: baseline;
        align-self: baseline;
      };

      /* multi-line alignment in main axis */

      --layout-start-aligned: {
        -ms-flex-line-pack: start;  /* IE10 */
        -ms-align-content: flex-start;
        -webkit-align-content: flex-start;
        align-content: flex-start;
      };

      --layout-end-aligned: {
        -ms-flex-line-pack: end;  /* IE10 */
        -ms-align-content: flex-end;
        -webkit-align-content: flex-end;
        align-content: flex-end;
      };

      --layout-center-aligned: {
        -ms-flex-line-pack: center;  /* IE10 */
        -ms-align-content: center;
        -webkit-align-content: center;
        align-content: center;
      };

      --layout-between-aligned: {
        -ms-flex-line-pack: justify;  /* IE10 */
        -ms-align-content: space-between;
        -webkit-align-content: space-between;
        align-content: space-between;
      };

      --layout-around-aligned: {
        -ms-flex-line-pack: distribute;  /* IE10 */
        -ms-align-content: space-around;
        -webkit-align-content: space-around;
        align-content: space-around;
      };

      /*******************************
                Other Layout
      *******************************/

      --layout-block: {
        display: block;
      };

      --layout-invisible: {
        visibility: hidden !important;
      };

      --layout-relative: {
        position: relative;
      };

      --layout-fit: {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      };

      --layout-scroll: {
        -webkit-overflow-scrolling: touch;
        overflow: auto;
      };

      --layout-fullbleed: {
        margin: 0;
        height: 100vh;
      };

      /* fixed position */

      --layout-fixed-top: {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
      };

      --layout-fixed-right: {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
      };

      --layout-fixed-bottom: {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
      };

      --layout-fixed-left: {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
      };

    }
  </style>
</custom-style>`;Jgt.setAttribute("style","display: none;");document.head.appendChild(Jgt.content);var Qgt=document.createElement("style");Qgt.textContent="[hidden] { display: none !important; }";document.head.appendChild(Qgt);var go=class{constructor(t){go[" "](t),this.type=t&&t.type||"default",this.key=t&&t.key,t&&"value"in t&&(this.value=t.value)}get value(){var t=this.type,r=this.key;if(t&&r)return go.types[t]&&go.types[t][r]}set value(t){var r=this.type,n=this.key;r&&n&&(r=go.types[r]=go.types[r]||{},t==null?delete r[n]:r[n]=t)}get list(){var t=this.type;if(t){var r=go.types[this.type];return r?Object.keys(r).map(function(n){return _be[this.type][n]},this):[]}}byKey(t){return this.key=t,this.value}};go[" "]=function(){};go.types={};var _be=go.types;Yt({is:"iron-meta",properties:{type:{type:String,value:"default"},key:{type:String},value:{type:String,notify:!0},self:{type:Boolean,observer:"_selfChanged"},__meta:{type:Boolean,computed:"__computeMeta(type, key, value)"}},hostAttributes:{hidden:!0},__computeMeta:function(e,t,r){var n=new go({type:e,key:t});return r!==void 0&&r!==n.value?n.value=r:this.value!==n.value&&(this.value=n.value),n},get list(){return this.__meta&&this.__meta.list},_selfChanged:function(e){e&&(this.value=this)},byKey:function(e){return new go({type:this.type,key:e}).value}});Yt({_template:Q`
    <style>
      :host {
        @apply --layout-inline;
        @apply --layout-center-center;
        position: relative;

        vertical-align: middle;

        fill: var(--iron-icon-fill-color, currentcolor);
        stroke: var(--iron-icon-stroke-color, none);

        width: var(--iron-icon-width, 24px);
        height: var(--iron-icon-height, 24px);
        @apply --iron-icon;
      }

      :host([hidden]) {
        display: none;
      }
    </style>
`,is:"iron-icon",properties:{icon:{type:String},theme:{type:String},src:{type:String},_meta:{value:Da.create("iron-meta",{type:"iconset"})}},observers:["_updateIcon(_meta, isAttached)","_updateIcon(theme, isAttached)","_srcChanged(src, isAttached)","_iconChanged(icon, isAttached)"],_DEFAULT_ICONSET:"icons",_iconChanged:function(e){var t=(e||"").split(":");this._iconName=t.pop(),this._iconsetName=t.pop()||this._DEFAULT_ICONSET,this._updateIcon()},_srcChanged:function(e){this._updateIcon()},_usesIconset:function(){return this.icon||!this.src},_updateIcon:function(){this._usesIconset()?(this._img&&this._img.parentNode&&zt(this.root).removeChild(this._img),this._iconName===""?this._iconset&&this._iconset.removeIcon(this):this._iconsetName&&this._meta&&(this._iconset=this._meta.byKey(this._iconsetName),this._iconset?(this._iconset.applyIcon(this,this._iconName,this.theme),this.unlisten(window,"iron-iconset-added","_updateIcon")):this.listen(window,"iron-iconset-added","_updateIcon"))):(this._iconset&&this._iconset.removeIcon(this),this._img||(this._img=document.createElement("img"),this._img.style.width="100%",this._img.style.height="100%",this._img.draggable=!1),this._img.src=this.src,zt(this.root).appendChild(this._img))}});Yt({is:"iron-iconset-svg",properties:{name:{type:String,observer:"_nameChanged"},size:{type:Number,value:24},rtlMirroring:{type:Boolean,value:!1},useGlobalRtlAttribute:{type:Boolean,value:!1}},created:function(){this._meta=new go({type:"iconset",key:null,value:null})},attached:function(){this.style.display="none"},getIconNames:function(){return this._icons=this._createIconMap(),Object.keys(this._icons).map(function(e){return this.name+":"+e},this)},applyIcon:function(e,t){this.removeIcon(e);var r=this._cloneIcon(t,this.rtlMirroring&&this._targetIsRTL(e));if(r){var n=zt(e.root||e);return n.insertBefore(r,n.childNodes[0]),e._svgIcon=r}return null},removeIcon:function(e){e._svgIcon&&(zt(e.root||e).removeChild(e._svgIcon),e._svgIcon=null)},_targetIsRTL:function(e){if(this.__targetIsRTL==null)if(this.useGlobalRtlAttribute){var t=document.body&&document.body.hasAttribute("dir")?document.body:document.documentElement;this.__targetIsRTL=t.getAttribute("dir")==="rtl"}else e&&e.nodeType!==Node.ELEMENT_NODE&&(e=e.host),this.__targetIsRTL=e&&window.getComputedStyle(e).direction==="rtl";return this.__targetIsRTL},_nameChanged:function(){this._meta.value=null,this._meta.key=this.name,this._meta.value=this,this.async(function(){this.fire("iron-iconset-added",this,{node:window})})},_createIconMap:function(){var e=Object.create(null);return zt(this).querySelectorAll("[id]").forEach(function(t){e[t.id]=t}),e},_cloneIcon:function(e,t){return this._icons=this._icons||this._createIconMap(),this._prepareSvgClone(this._icons[e],this.size,t)},_prepareSvgClone:function(e,t,r){if(e){var n=e.cloneNode(!0),i=document.createElementNS("http://www.w3.org/2000/svg","svg"),o=n.getAttribute("viewBox")||"0 0 "+t+" "+t,a="pointer-events: none; display: block; width: 100%; height: 100%;";return r&&n.hasAttribute("mirror-in-rtl")&&(a+="-webkit-transform:scale(-1,1);transform:scale(-1,1);transform-origin:center;"),i.setAttribute("viewBox",o),i.setAttribute("preserveAspectRatio","xMidYMid meet"),i.setAttribute("focusable","false"),i.style.cssText=a,i.appendChild(n).removeAttribute("id"),i}return null}});var ybe=Q`<iron-iconset-svg name="image" size="24">
<svg><defs>
<g id="add-a-photo"><path d="M3 4V1h2v3h3v2H5v3H3V6H0V4h3zm3 6V7h3V4h7l1.83 2H21c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2V10h3zm7 9c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-3.2-5c0 1.77 1.43 3.2 3.2 3.2s3.2-1.43 3.2-3.2-1.43-3.2-3.2-3.2-3.2 1.43-3.2 3.2z"></path></g>
<g id="add-to-photos"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9h-4v4h-2v-4H9V9h4V5h2v4h4v2z"></path></g>
<g id="adjust"><path d="M12 2C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3-8c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3z"></path></g>
<g id="assistant"><path d="M19 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h4l3 3 3-3h4c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-5.12 10.88L12 17l-1.88-4.12L6 11l4.12-1.88L12 5l1.88 4.12L18 11l-4.12 1.88z"></path></g>
<g id="assistant-photo"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"></path></g>
<g id="audiotrack"><path d="M12 3v9.28c-.47-.17-.97-.28-1.5-.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z"></path></g>
<g id="blur-circular"><path d="M10 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM7 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-3-3c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm3-6c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm3 6c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-4c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm2-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-3.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1z"></path></g>
<g id="blur-linear"><path d="M5 17.5c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 13c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zM3 21h18v-2H3v2zM5 9.5c.83 0 1.5-.67 1.5-1.5S5.83 6.5 5 6.5 3.5 7.17 3.5 8 4.17 9.5 5 9.5zm0 4c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5.67 1.5 1.5 1.5zM9 17c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8-.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM3 3v2h18V3H3zm14 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm0 4c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM13 9c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1z"></path></g>
<g id="blur-off"><path d="M14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-.2 4.48l.2.02c.83 0 1.5-.67 1.5-1.5s-.67-1.5-1.5-1.5-1.5.67-1.5 1.5l.02.2c.09.67.61 1.19 1.28 1.28zM14 3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-4 0c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm11 7c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm8 8c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-4c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm-4 13.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM2.5 5.27l3.78 3.78L6 9c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l2.81 2.81c-.71.11-1.25.73-1.25 1.47 0 .83.67 1.5 1.5 1.5.74 0 1.36-.54 1.47-1.25l2.81 2.81c-.09-.03-.18-.06-.28-.06-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1c0-.1-.03-.19-.06-.28l3.78 3.78L20 20.23 3.77 4 2.5 5.27zM10 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm11-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zM3 9.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 11c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3-3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5z"></path></g>
<g id="blur-on"><path d="M6 13c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm-3 .5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM6 5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm15 5.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM14 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0-3.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zm-11 10c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm7 7c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm0-17c.28 0 .5-.22.5-.5s-.22-.5-.5-.5-.5.22-.5.5.22.5.5.5zM10 7c.55 0 1-.45 1-1s-.45-1-1-1-1 .45-1 1 .45 1 1 1zm0 5.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm8 .5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-8c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0-4c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm3 8.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zM14 17c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm0 3.5c-.28 0-.5.22-.5.5s.22.5.5.5.5-.22.5-.5-.22-.5-.5-.5zm-4-12c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0 8.5c-.55 0-1 .45-1 1s.45 1 1 1 1-.45 1-1-.45-1-1-1zm4-4.5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm0-4c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path></g>
<g id="brightness-1"><circle cx="12" cy="12" r="10"></circle></g>
<g id="brightness-2"><path d="M10 2c-1.82 0-3.53.5-5 1.35C7.99 5.08 10 8.3 10 12s-2.01 6.92-5 8.65C6.47 21.5 8.18 22 10 22c5.52 0 10-4.48 10-10S15.52 2 10 2z"></path></g>
<g id="brightness-3"><path d="M9 2c-1.05 0-2.05.16-3 .46 4.06 1.27 7 5.06 7 9.54 0 4.48-2.94 8.27-7 9.54.95.3 1.95.46 3 .46 5.52 0 10-4.48 10-10S14.52 2 9 2z"></path></g>
<g id="brightness-4"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"></path></g>
<g id="brightness-5"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6z"></path></g>
<g id="brightness-6"><path d="M20 15.31L23.31 12 20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69zM12 18V6c3.31 0 6 2.69 6 6s-2.69 6-6 6z"></path></g>
<g id="brightness-7"><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zM12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zm0-10c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"></path></g>
<g id="broken-image"><path d="M21 5v6.59l-3-3.01-4 4.01-4-4-4 4-3-3.01V5c0-1.1.9-2 2-2h14c1.1 0 2 .9 2 2zm-3 6.42l3 3.01V19c0 1.1-.9 2-2 2H5c-1.1 0-2-.9-2-2v-6.58l3 2.99 4-4 4 4 4-3.99z"></path></g>
<g id="brush"><path d="M7 14c-1.66 0-3 1.34-3 3 0 1.31-1.16 2-2 2 .92 1.22 2.49 2 4 2 2.21 0 4-1.79 4-4 0-1.66-1.34-3-3-3zm13.71-9.37l-1.34-1.34c-.39-.39-1.02-.39-1.41 0L9 12.25 11.75 15l8.96-8.96c.39-.39.39-1.02 0-1.41z"></path></g>
<g id="burst-mode"><path d="M1 5h2v14H1zm4 0h2v14H5zm17 0H10c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h12c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zM11 17l2.5-3.15L15.29 16l2.5-3.22L21 17H11z"></path></g>
<g id="camera"><path d="M9.4 10.5l4.77-8.26C13.47 2.09 12.75 2 12 2c-2.4 0-4.6.85-6.32 2.25l3.66 6.35.06-.1zM21.54 9c-.92-2.92-3.15-5.26-6-6.34L11.88 9h9.66zm.26 1h-7.49l.29.5 4.76 8.25C21 16.97 22 14.61 22 12c0-.69-.07-1.35-.2-2zM8.54 12l-3.9-6.75C3.01 7.03 2 9.39 2 12c0 .69.07 1.35.2 2h7.49l-1.15-2zm-6.08 3c.92 2.92 3.15 5.26 6 6.34L12.12 15H2.46zm11.27 0l-3.9 6.76c.7.15 1.42.24 2.17.24 2.4 0 4.6-.85 6.32-2.25l-3.66-6.35-.93 1.6z"></path></g>
<g id="camera-alt"><circle cx="12" cy="12" r="3.2"></circle><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="camera-front"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zM12 8c1.1 0 2-.9 2-2s-.9-2-2-2-1.99.9-1.99 2S10.9 8 12 8zm5-8H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zM7 2h10v10.5c0-1.67-3.33-2.5-5-2.5s-5 .83-5 2.5V2z"></path></g>
<g id="camera-rear"><path d="M10 20H5v2h5v2l3-3-3-3v2zm4 0v2h5v-2h-5zm3-20H7C5.9 0 5 .9 5 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V2c0-1.1-.9-2-2-2zm-5 6c-1.11 0-2-.9-2-2s.89-2 1.99-2 2 .9 2 2C14 5.1 13.1 6 12 6z"></path></g>
<g id="camera-roll"><path d="M14 5c0-1.1-.9-2-2-2h-1V2c0-.55-.45-1-1-1H6c-.55 0-1 .45-1 1v1H4c-1.1 0-2 .9-2 2v15c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2h8V5h-8zm-2 13h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2zm4 9h-2v-2h2v2zm0-9h-2V7h2v2z"></path></g>
<g id="center-focus-strong"><path d="M12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-7 7H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4z"></path></g>
<g id="center-focus-weak"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="collections"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"></path></g>
<g id="collections-bookmark"><path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 10l-2.5-1.5L15 12V4h5v8z"></path></g>
<g id="color-lens"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="colorize"><path d="M20.71 5.63l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"></path></g>
<g id="compare"><path d="M10 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h5v2h2V1h-2v2zm0 15H5l5-6v6zm9-15h-5v2h5v13l-5-6v9h5c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="control-point"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10 10-4.49 10-10S17.51 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="control-point-duplicate"><path d="M16 8h-2v3h-3v2h3v3h2v-3h3v-2h-3zM2 12c0-2.79 1.64-5.2 4.01-6.32V3.52C2.52 4.76 0 8.09 0 12s2.52 7.24 6.01 8.48v-2.16C3.64 17.2 2 14.79 2 12zm13-9c-4.96 0-9 4.04-9 9s4.04 9 9 9 9-4.04 9-9-4.04-9-9-9zm0 16c-3.86 0-7-3.14-7-7s3.14-7 7-7 7 3.14 7 7-3.14 7-7 7z"></path></g>
<g id="crop"><path d="M17 15h2V7c0-1.1-.9-2-2-2H9v2h8v8zM7 17V1H5v4H1v2h4v10c0 1.1.9 2 2 2h10v4h2v-4h4v-2H7z"></path></g>
<g id="crop-16-9"><path d="M19 6H5c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H5V8h14v8z"></path></g>
<g id="crop-3-2"><path d="M19 4H5c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H5V6h14v12z"></path></g>
<g id="crop-5-4"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"></path></g>
<g id="crop-7-5"><path d="M19 7H5c-1.1 0-2 .9-2 2v6c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zm0 8H5V9h14v6z"></path></g>
<g id="crop-din"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="crop-free"><path d="M3 5v4h2V5h4V3H5c-1.1 0-2 .9-2 2zm2 10H3v4c0 1.1.9 2 2 2h4v-2H5v-4zm14 4h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zm0-16h-4v2h4v4h2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="crop-landscape"><path d="M19 5H5c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 12H5V7h14v10z"></path></g>
<g id="crop-original"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zm-5.04-6.71l-2.75 3.54-1.96-2.36L6.5 17h11l-3.54-4.71z"></path></g>
<g id="crop-portrait"><path d="M17 3H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H7V5h10v14z"></path></g>
<g id="crop-rotate"><path d="M7.47 21.49C4.2 19.93 1.86 16.76 1.5 13H0c.51 6.16 5.66 11 11.95 11 .23 0 .44-.02.66-.03L8.8 20.15l-1.33 1.34zM12.05 0c-.23 0-.44.02-.66.04l3.81 3.81 1.33-1.33C19.8 4.07 22.14 7.24 22.5 11H24c-.51-6.16-5.66-11-11.95-11zM16 14h2V8c0-1.11-.9-2-2-2h-6v2h6v6zm-8 2V4H6v2H4v2h2v8c0 1.1.89 2 2 2h8v2h2v-2h2v-2H8z"></path></g>
<g id="crop-square"><path d="M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z"></path></g>
<g id="dehaze"><path d="M2 15.5v2h20v-2H2zm0-5v2h20v-2H2zm0-5v2h20v-2H2z"></path></g>
<g id="details"><path d="M3 4l9 16 9-16H3zm3.38 2h11.25L12 16 6.38 6z"></path></g>
<g id="edit"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></g>
<g id="exposure"><path d="M15 17v2h2v-2h2v-2h-2v-2h-2v2h-2v2h2zm5-15H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM5 5h6v2H5V5zm15 15H4L20 4v16z"></path></g>
<g id="exposure-neg-1"><path d="M4 11v2h8v-2H4zm15 7h-2V7.38L14 8.4V6.7L18.7 5h.3v13z"></path></g>
<g id="exposure-neg-2"><path d="M15.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17s.19-.79.19-1.18c0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H21v-1.71h-5.95zM2 11v2h8v-2H2z"></path></g>
<g id="exposure-plus-1"><path d="M10 7H8v4H4v2h4v4h2v-4h4v-2h-4V7zm10 11h-2V7.38L15 8.4V6.7L19.7 5h.3v13z"></path></g>
<g id="exposure-plus-2"><path d="M16.05 16.29l2.86-3.07c.38-.39.72-.79 1.04-1.18.32-.39.59-.78.82-1.17.23-.39.41-.78.54-1.17.13-.39.19-.79.19-1.18 0-.53-.09-1.02-.27-1.46-.18-.44-.44-.81-.78-1.11-.34-.31-.77-.54-1.26-.71-.51-.16-1.08-.24-1.72-.24-.69 0-1.31.11-1.85.32-.54.21-1 .51-1.36.88-.37.37-.65.8-.84 1.3-.18.47-.27.97-.28 1.5h2.14c.01-.31.05-.6.13-.87.09-.29.23-.54.4-.75.18-.21.41-.37.68-.49.27-.12.6-.18.96-.18.31 0 .58.05.81.15.23.1.43.25.59.43.16.18.28.4.37.65.08.25.13.52.13.81 0 .22-.03.43-.08.65-.06.22-.15.45-.29.7-.14.25-.32.53-.56.83-.23.3-.52.65-.88 1.03l-4.17 4.55V18H22v-1.71h-5.95zM8 7H6v4H2v2h4v4h2v-4h4v-2H8V7z"></path></g>
<g id="exposure-zero"><path d="M16.14 12.5c0 1-.1 1.85-.3 2.55-.2.7-.48 1.27-.83 1.7-.36.44-.79.75-1.3.95-.51.2-1.07.3-1.7.3-.62 0-1.18-.1-1.69-.3-.51-.2-.95-.51-1.31-.95-.36-.44-.65-1.01-.85-1.7-.2-.7-.3-1.55-.3-2.55v-2.04c0-1 .1-1.85.3-2.55.2-.7.48-1.26.84-1.69.36-.43.8-.74 1.31-.93C10.81 5.1 11.38 5 12 5c.63 0 1.19.1 1.7.29.51.19.95.5 1.31.93.36.43.64.99.84 1.69.2.7.3 1.54.3 2.55v2.04zm-2.11-2.36c0-.64-.05-1.18-.13-1.62-.09-.44-.22-.79-.4-1.06-.17-.27-.39-.46-.64-.58-.25-.13-.54-.19-.86-.19-.32 0-.61.06-.86.18s-.47.31-.64.58c-.17.27-.31.62-.4 1.06s-.13.98-.13 1.62v2.67c0 .64.05 1.18.14 1.62.09.45.23.81.4 1.09s.39.48.64.61.54.19.87.19c.33 0 .62-.06.87-.19s.46-.33.63-.61c.17-.28.3-.64.39-1.09.09-.45.13-.99.13-1.62v-2.66z"></path></g>
<g id="filter"><path d="M15.96 10.29l-2.75 3.54-1.96-2.36L8.5 15h11l-3.54-4.71zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-1"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 10h2V5h-4v2h2v8zm7-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-2"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-4-4h-4v-2h2c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2h-4v2h4v2h-2c-1.1 0-2 .89-2 2v4h6v-2z"></path></g>
<g id="filter-3"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-4v2h4v2h-2v2h2v2h-4v2h4c1.1 0 2-.89 2-2z"></path></g>
<g id="filter-4"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm12 10h2V5h-2v4h-2V5h-2v6h4v4zm6-14H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-5"><path d="M21 1H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm14 8v-2c0-1.11-.9-2-2-2h-2V7h4V5h-6v6h4v2h-4v2h4c1.1 0 2-.89 2-2z"></path></g>
<g id="filter-6"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-2c0-1.11-.9-2-2-2h-2V7h4V5h-4c-1.1 0-2 .89-2 2v6c0 1.11.9 2 2 2zm0-4h2v2h-2v-2z"></path></g>
<g id="filter-7"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2l4-8V5h-6v2h4l-4 8h2z"></path></g>
<g id="filter-8"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zm-8-2h2c1.1 0 2-.89 2-2v-1.5c0-.83-.67-1.5-1.5-1.5.83 0 1.5-.67 1.5-1.5V7c0-1.11-.9-2-2-2h-2c-1.1 0-2 .89-2 2v1.5c0 .83.67 1.5 1.5 1.5-.83 0-1.5.67-1.5 1.5V13c0 1.11.9 2 2 2zm0-8h2v2h-2V7zm0 4h2v2h-2v-2z"></path></g>
<g id="filter-9"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14zM15 5h-2c-1.1 0-2 .89-2 2v2c0 1.11.9 2 2 2h2v2h-4v2h4c1.1 0 2-.89 2-2V7c0-1.11-.9-2-2-2zm0 4h-2V7h2v2z"></path></g>
<g id="filter-9-plus"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm11 7V8c0-1.11-.9-2-2-2h-1c-1.1 0-2 .89-2 2v1c0 1.11.9 2 2 2h1v1H9v2h3c1.1 0 2-.89 2-2zm-3-3V8h1v1h-1zm10-8H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 8h-2V7h-2v2h-2v2h2v2h2v-2h2v6H7V3h14v6z"></path></g>
<g id="filter-b-and-w"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16l-7-8v8H5l7-8V5h7v14z"></path></g>
<g id="filter-center-focus"><path d="M5 15H3v4c0 1.1.9 2 2 2h4v-2H5v-4zM5 5h4V3H5c-1.1 0-2 .9-2 2v4h2V5zm14-2h-4v2h4v4h2V5c0-1.1-.9-2-2-2zm0 16h-4v2h4c1.1 0 2-.9 2-2v-4h-2v4zM12 9c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="filter-drama"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.61 5.64 5.36 8.04 2.35 8.36 0 10.9 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4h2c0-2.76-1.86-5.08-4.4-5.78C8.61 6.88 10.2 6 12 6c3.03 0 5.5 2.47 5.5 5.5v.5H19c1.65 0 3 1.35 3 3s-1.35 3-3 3z"></path></g>
<g id="filter-frames"><path d="M20 4h-4l-4-4-4 4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H4V6h4.52l3.52-3.5L15.52 6H20v14zM18 8H6v10h12"></path></g>
<g id="filter-hdr"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"></path></g>
<g id="filter-none"><path d="M3 5H1v16c0 1.1.9 2 2 2h16v-2H3V5zm18-4H7c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm0 16H7V3h14v14z"></path></g>
<g id="filter-tilt-shift"><path d="M11 4.07V2.05c-2.01.2-3.84 1-5.32 2.21L7.1 5.69c1.11-.86 2.44-1.44 3.9-1.62zm7.32.19C16.84 3.05 15.01 2.25 13 2.05v2.02c1.46.18 2.79.76 3.9 1.62l1.42-1.43zM19.93 11h2.02c-.2-2.01-1-3.84-2.21-5.32L18.31 7.1c.86 1.11 1.44 2.44 1.62 3.9zM5.69 7.1L4.26 5.68C3.05 7.16 2.25 8.99 2.05 11h2.02c.18-1.46.76-2.79 1.62-3.9zM4.07 13H2.05c.2 2.01 1 3.84 2.21 5.32l1.43-1.43c-.86-1.1-1.44-2.43-1.62-3.89zM15 12c0-1.66-1.34-3-3-3s-3 1.34-3 3 1.34 3 3 3 3-1.34 3-3zm3.31 4.9l1.43 1.43c1.21-1.48 2.01-3.32 2.21-5.32h-2.02c-.18 1.45-.76 2.78-1.62 3.89zM13 19.93v2.02c2.01-.2 3.84-1 5.32-2.21l-1.43-1.43c-1.1.86-2.43 1.44-3.89 1.62zm-7.32-.19C7.16 20.95 9 21.75 11 21.95v-2.02c-1.46-.18-2.79-.76-3.9-1.62l-1.42 1.43z"></path></g>
<g id="filter-vintage"><path d="M18.7 12.4c-.28-.16-.57-.29-.86-.4.29-.11.58-.24.86-.4 1.92-1.11 2.99-3.12 3-5.19-1.79-1.03-4.07-1.11-6 0-.28.16-.54.35-.78.54.05-.31.08-.63.08-.95 0-2.22-1.21-4.15-3-5.19C10.21 1.85 9 3.78 9 6c0 .32.03.64.08.95-.24-.2-.5-.39-.78-.55-1.92-1.11-4.2-1.03-6 0 0 2.07 1.07 4.08 3 5.19.28.16.57.29.86.4-.29.11-.58.24-.86.4-1.92 1.11-2.99 3.12-3 5.19 1.79 1.03 4.07 1.11 6 0 .28-.16.54-.35.78-.54-.05.32-.08.64-.08.96 0 2.22 1.21 4.15 3 5.19 1.79-1.04 3-2.97 3-5.19 0-.32-.03-.64-.08-.95.24.2.5.38.78.54 1.92 1.11 4.2 1.03 6 0-.01-2.07-1.08-4.08-3-5.19zM12 16c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path></g>
<g id="flare"><path d="M7 11H1v2h6v-2zm2.17-3.24L7.05 5.64 5.64 7.05l2.12 2.12 1.41-1.41zM13 1h-2v6h2V1zm5.36 6.05l-1.41-1.41-2.12 2.12 1.41 1.41 2.12-2.12zM17 11v2h6v-2h-6zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24l2.12 2.12 1.41-1.41-2.12-2.12-1.41 1.41zm-9.19.71l1.41 1.41 2.12-2.12-1.41-1.41-2.12 2.12zM11 23h2v-6h-2v6z"></path></g>
<g id="flash-auto"><path d="M3 2v12h3v9l7-12H9l4-9H3zm16 0h-2l-3.2 9h1.9l.7-2h3.2l.7 2h1.9L19 2zm-2.15 5.65L18 4l1.15 3.65h-2.3z"></path></g>
<g id="flash-off"><path d="M3.27 3L2 4.27l5 5V13h3v9l3.58-6.14L17.73 20 19 18.73 3.27 3zM17 10h-4l4-8H7v2.18l8.46 8.46L17 10z"></path></g>
<g id="flash-on"><path d="M7 2v11h3v9l7-12h-4l4-8z"></path></g>
<g id="flip"><path d="M15 21h2v-2h-2v2zm4-12h2V7h-2v2zM3 5v14c0 1.1.9 2 2 2h4v-2H5V5h4V3H5c-1.1 0-2 .9-2 2zm16-2v2h2c0-1.1-.9-2-2-2zm-8 20h2V1h-2v22zm8-6h2v-2h-2v2zM15 5h2V3h-2v2zm4 8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2z"></path></g>
<g id="gradient"><path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"></path></g>
<g id="grain"><path d="M10 12c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM6 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12-8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-4 8c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-4-4c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="grid-off"><path d="M8 4v1.45l2 2V4h4v4h-3.45l2 2H14v1.45l2 2V10h4v4h-3.45l2 2H20v1.45l2 2V4c0-1.1-.9-2-2-2H4.55l2 2H8zm8 0h4v4h-4V4zM1.27 1.27L0 2.55l2 2V20c0 1.1.9 2 2 2h15.46l2 2 1.27-1.27L1.27 1.27zM10 12.55L11.45 14H10v-1.45zm-6-6L5.45 8H4V6.55zM8 20H4v-4h4v4zm0-6H4v-4h3.45l.55.55V14zm6 6h-4v-4h3.45l.55.54V20zm2 0v-1.46L17.46 20H16z"></path></g>
<g id="grid-on"><path d="M20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 20H4v-4h4v4zm0-6H4v-4h4v4zm0-6H4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4zm6 12h-4v-4h4v4zm0-6h-4v-4h4v4zm0-6h-4V4h4v4z"></path></g>
<g id="hdr-off"><path d="M17.5 15v-2h1.1l.9 2H21l-.9-2.1c.5-.2.9-.8.9-1.4v-1c0-.8-.7-1.5-1.5-1.5H16v4.9l1.1 1.1h.4zm0-4.5h2v1h-2v-1zm-4.5 0v.4l1.5 1.5v-1.9c0-.8-.7-1.5-1.5-1.5h-1.9l1.5 1.5h.4zm-3.5-1l-7-7-1.1 1L6.9 9h-.4v2h-2V9H3v6h1.5v-2.5h2V15H8v-4.9l1.5 1.5V15h3.4l7.6 7.6 1.1-1.1-12.1-12z"></path></g>
<g id="hdr-on"><path d="M21 11.5v-1c0-.8-.7-1.5-1.5-1.5H16v6h1.5v-2h1.1l.9 2H21l-.9-2.1c.5-.3.9-.8.9-1.4zm-1.5 0h-2v-1h2v1zm-13-.5h-2V9H3v6h1.5v-2.5h2V15H8V9H6.5v2zM13 9H9.5v6H13c.8 0 1.5-.7 1.5-1.5v-3c0-.8-.7-1.5-1.5-1.5zm0 4.5h-2v-3h2v3z"></path></g>
<g id="hdr-strong"><path d="M17 6c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zM5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="hdr-weak"><path d="M5 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm12-2c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm0 10c-2.21 0-4-1.79-4-4s1.79-4 4-4 4 1.79 4 4-1.79 4-4 4z"></path></g>
<g id="healing"><path d="M17.73 12.02l3.98-3.98c.39-.39.39-1.02 0-1.41l-4.34-4.34c-.39-.39-1.02-.39-1.41 0l-3.98 3.98L8 2.29C7.8 2.1 7.55 2 7.29 2c-.25 0-.51.1-.7.29L2.25 6.63c-.39.39-.39 1.02 0 1.41l3.98 3.98L2.25 16c-.39.39-.39 1.02 0 1.41l4.34 4.34c.39.39 1.02.39 1.41 0l3.98-3.98 3.98 3.98c.2.2.45.29.71.29.26 0 .51-.1.71-.29l4.34-4.34c.39-.39.39-1.02 0-1.41l-3.99-3.98zM12 9c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-4.71 1.96L3.66 7.34l3.63-3.63 3.62 3.62-3.62 3.63zM10 13c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2 2c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm2-4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2.66 9.34l-3.63-3.62 3.63-3.63 3.62 3.62-3.62 3.63z"></path></g>
<g id="image"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path></g>
<g id="image-aspect-ratio"><path d="M16 10h-2v2h2v-2zm0 4h-2v2h2v-2zm-8-4H6v2h2v-2zm4 0h-2v2h2v-2zm8-6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12z"></path></g>
<g id="iso"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM5.5 7.5h2v-2H9v2h2V9H9v2H7.5V9h-2V7.5zM19 19H5L19 5v14zm-2-2v-1.5h-5V17h5z"></path></g>
<g id="landscape"><path d="M14 6l-3.75 5 2.85 3.8-1.6 1.2C9.81 13.75 7 10 7 10l-6 8h22L14 6z"></path></g>
<g id="leak-add"><path d="M6 3H3v3c1.66 0 3-1.34 3-3zm8 0h-2c0 4.97-4.03 9-9 9v2c6.08 0 11-4.93 11-11zm-4 0H8c0 2.76-2.24 5-5 5v2c3.87 0 7-3.13 7-7zm0 18h2c0-4.97 4.03-9 9-9v-2c-6.07 0-11 4.93-11 11zm8 0h3v-3c-1.66 0-3 1.34-3 3zm-4 0h2c0-2.76 2.24-5 5-5v-2c-3.87 0-7 3.13-7 7z"></path></g>
<g id="leak-remove"><path d="M10 3H8c0 .37-.04.72-.12 1.06l1.59 1.59C9.81 4.84 10 3.94 10 3zM3 4.27l2.84 2.84C5.03 7.67 4.06 8 3 8v2c1.61 0 3.09-.55 4.27-1.46L8.7 9.97C7.14 11.24 5.16 12 3 12v2c2.71 0 5.19-.99 7.11-2.62l2.5 2.5C10.99 15.81 10 18.29 10 21h2c0-2.16.76-4.14 2.03-5.69l1.43 1.43C14.55 17.91 14 19.39 14 21h2c0-1.06.33-2.03.89-2.84L19.73 21 21 19.73 4.27 3 3 4.27zM14 3h-2c0 1.5-.37 2.91-1.02 4.16l1.46 1.46C13.42 6.98 14 5.06 14 3zm5.94 13.12c.34-.08.69-.12 1.06-.12v-2c-.94 0-1.84.19-2.66.52l1.6 1.6zm-4.56-4.56l1.46 1.46C18.09 12.37 19.5 12 21 12v-2c-2.06 0-3.98.58-5.62 1.56z"></path></g>
<g id="lens"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2z"></path></g>
<g id="linked-camera"><circle cx="12" cy="14" r="3.2"></circle><path d="M16 3.33c2.58 0 4.67 2.09 4.67 4.67H22c0-3.31-2.69-6-6-6v1.33M16 6c1.11 0 2 .89 2 2h1.33c0-1.84-1.49-3.33-3.33-3.33V6"></path><path d="M17 9c0-1.11-.89-2-2-2V4H9L7.17 6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9h-5zm-5 10c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="looks"><path d="M12 10c-3.86 0-7 3.14-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.86-3.14-7-7-7zm0-4C5.93 6 1 10.93 1 17h2c0-4.96 4.04-9 9-9s9 4.04 9 9h2c0-6.07-4.93-11-11-11z"></path></g>
<g id="looks-3"><path d="M19.01 3h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 7.5c0 .83-.67 1.5-1.5 1.5.83 0 1.5.67 1.5 1.5V15c0 1.11-.9 2-2 2h-4v-2h4v-2h-2v-2h2V9h-4V7h4c1.1 0 2 .89 2 2v1.5z"></path></g>
<g id="looks-4"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 14h-2v-4H9V7h2v4h2V7h2v10z"></path></g>
<g id="looks-5"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2H9v-2h4v-2H9V7h6v2z"></path></g>
<g id="looks-6"><path d="M11 15h2v-2h-2v2zm8-12H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 6h-4v2h2c1.1 0 2 .89 2 2v2c0 1.11-.9 2-2 2h-2c-1.1 0-2-.89-2-2V9c0-1.11.9-2 2-2h4v2z"></path></g>
<g id="looks-one"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-5 14h-2V9h-2V7h4v10z"></path></g>
<g id="looks-two"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-4 8c0 1.11-.9 2-2 2h-2v2h4v2H9v-4c0-1.11.9-2 2-2h2V9H9V7h4c1.1 0 2 .89 2 2v2z"></path></g>
<g id="loupe"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.49 2 2 6.49 2 12s4.49 10 10 10h8c1.1 0 2-.9 2-2v-8c0-5.51-4.49-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="monochrome-photos"><path d="M20 5h-3.2L15 3H9L7.2 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 14h-8v-1c-2.8 0-5-2.2-5-5s2.2-5 5-5V7h8v12zm-3-6c0-2.8-2.2-5-5-5v1.8c1.8 0 3.2 1.4 3.2 3.2s-1.4 3.2-3.2 3.2V18c2.8 0 5-2.2 5-5zm-8.2 0c0 1.8 1.4 3.2 3.2 3.2V9.8c-1.8 0-3.2 1.4-3.2 3.2z"></path></g>
<g id="movie-creation"><path d="M18 4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4z"></path></g>
<g id="movie-filter"><path d="M18 4l2 3h-3l-2-3h-2l2 3h-3l-2-3H8l2 3H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4h-4zm-6.75 11.25L10 18l-1.25-2.75L6 14l2.75-1.25L10 10l1.25 2.75L14 14l-2.75 1.25zm5.69-3.31L16 14l-.94-2.06L13 11l2.06-.94L16 8l.94 2.06L19 11l-2.06.94z"></path></g>
<g id="music-note"><path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z"></path></g>
<g id="nature"><path d="M13 16.12c3.47-.41 6.17-3.36 6.17-6.95 0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H5v2h14v-2h-6v-3.88z"></path></g>
<g id="nature-people"><path d="M22.17 9.17c0-3.87-3.13-7-7-7s-7 3.13-7 7c0 3.47 2.52 6.34 5.83 6.89V20H6v-3h1v-4c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v4h1v5h16v-2h-3v-3.88c3.47-.41 6.17-3.36 6.17-6.95zM4.5 11c.83 0 1.5-.67 1.5-1.5S5.33 8 4.5 8 3 8.67 3 9.5 3.67 11 4.5 11z"></path></g>
<g id="navigate-before"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="navigate-next"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
<g id="palette"><path d="M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9c.83 0 1.5-.67 1.5-1.5 0-.39-.15-.74-.39-1.01-.23-.26-.38-.61-.38-.99 0-.83.67-1.5 1.5-1.5H16c2.76 0 5-2.24 5-5 0-4.42-4.03-8-9-8zm-5.5 9c-.83 0-1.5-.67-1.5-1.5S5.67 9 6.5 9 8 9.67 8 10.5 7.33 12 6.5 12zm3-4C8.67 8 8 7.33 8 6.5S8.67 5 9.5 5s1.5.67 1.5 1.5S10.33 8 9.5 8zm5 0c-.83 0-1.5-.67-1.5-1.5S13.67 5 14.5 5s1.5.67 1.5 1.5S15.33 8 14.5 8zm3 4c-.83 0-1.5-.67-1.5-1.5S16.67 9 17.5 9s1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="panorama"><path d="M23 18V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zM8.5 12.5l2.5 3.01L14.5 11l4.5 6H5l3.5-4.5z"></path></g>
<g id="panorama-fish-eye"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="panorama-horizontal"><path d="M20 6.54v10.91c-2.6-.77-5.28-1.16-8-1.16-2.72 0-5.4.39-8 1.16V6.54c2.6.77 5.28 1.16 8 1.16 2.72.01 5.4-.38 8-1.16M21.43 4c-.1 0-.2.02-.31.06C18.18 5.16 15.09 5.7 12 5.7c-3.09 0-6.18-.55-9.12-1.64-.11-.04-.22-.06-.31-.06-.34 0-.57.23-.57.63v14.75c0 .39.23.62.57.62.1 0 .2-.02.31-.06 2.94-1.1 6.03-1.64 9.12-1.64 3.09 0 6.18.55 9.12 1.64.11.04.21.06.31.06.33 0 .57-.23.57-.63V4.63c0-.4-.24-.63-.57-.63z"></path></g>
<g id="panorama-vertical"><path d="M19.94 21.12c-1.1-2.94-1.64-6.03-1.64-9.12 0-3.09.55-6.18 1.64-9.12.04-.11.06-.22.06-.31 0-.34-.23-.57-.63-.57H4.63c-.4 0-.63.23-.63.57 0 .1.02.2.06.31C5.16 5.82 5.71 8.91 5.71 12c0 3.09-.55 6.18-1.64 9.12-.05.11-.07.22-.07.31 0 .33.23.57.63.57h14.75c.39 0 .63-.24.63-.57-.01-.1-.03-.2-.07-.31zM6.54 20c.77-2.6 1.16-5.28 1.16-8 0-2.72-.39-5.4-1.16-8h10.91c-.77 2.6-1.16 5.28-1.16 8 0 2.72.39 5.4 1.16 8H6.54z"></path></g>
<g id="panorama-wide-angle"><path d="M12 6c2.45 0 4.71.2 7.29.64.47 1.78.71 3.58.71 5.36 0 1.78-.24 3.58-.71 5.36-2.58.44-4.84.64-7.29.64s-4.71-.2-7.29-.64C4.24 15.58 4 13.78 4 12c0-1.78.24-3.58.71-5.36C7.29 6.2 9.55 6 12 6m0-2c-2.73 0-5.22.24-7.95.72l-.93.16-.25.9C2.29 7.85 2 9.93 2 12s.29 4.15.87 6.22l.25.89.93.16c2.73.49 5.22.73 7.95.73s5.22-.24 7.95-.72l.93-.16.25-.89c.58-2.08.87-4.16.87-6.23s-.29-4.15-.87-6.22l-.25-.89-.93-.16C17.22 4.24 14.73 4 12 4z"></path></g>
<g id="photo"><path d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path></g>
<g id="photo-album"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4zm0 15l3-3.86 2.14 2.58 3-3.86L18 19H6z"></path></g>
<g id="photo-camera"><circle cx="12" cy="12" r="3.2"></circle><path d="M9 2L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5z"></path></g>
<g id="photo-filter"><path d="M19.02 10v9H5V5h9V3H5.02c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2zM17 10l.94-2.06L20 7l-2.06-.94L17 4l-.94 2.06L14 7l2.06.94zm-3.75.75L12 8l-1.25 2.75L8 12l2.75 1.25L12 16l1.25-2.75L16 12z"></path></g>
<g id="photo-library"><path d="M22 16V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2zm-11-4l2.03 2.71L16 11l4 5H8l3-4zM2 6v14c0 1.1.9 2 2 2h14v-2H4V6H2z"></path></g>
<g id="photo-size-select-actual"><path d="M21 3H3C2 3 1 4 1 5v14c0 1.1.9 2 2 2h18c1 0 2-1 2-2V5c0-1-1-2-2-2zM5 17l3.5-4.5 2.5 3.01L14.5 11l4.5 6H5z"></path></g>
<g id="photo-size-select-large"><path d="M21 15h2v2h-2v-2zm0-4h2v2h-2v-2zm2 8h-2v2c1 0 2-1 2-2zM13 3h2v2h-2V3zm8 4h2v2h-2V7zm0-4v2h2c0-1-1-2-2-2zM1 7h2v2H1V7zm16-4h2v2h-2V3zm0 16h2v2h-2v-2zM3 3C2 3 1 4 1 5h2V3zm6 0h2v2H9V3zM5 3h2v2H5V3zm-4 8v8c0 1.1.9 2 2 2h12V11H1zm2 8l2.5-3.21 1.79 2.15 2.5-3.22L13 19H3z"></path></g>
<g id="photo-size-select-small"><path d="M23 15h-2v2h2v-2zm0-4h-2v2h2v-2zm0 8h-2v2c1 0 2-1 2-2zM15 3h-2v2h2V3zm8 4h-2v2h2V7zm-2-4v2h2c0-1-1-2-2-2zM3 21h8v-6H1v4c0 1.1.9 2 2 2zM3 7H1v2h2V7zm12 12h-2v2h2v-2zm4-16h-2v2h2V3zm0 16h-2v2h2v-2zM3 3C2 3 1 4 1 5h2V3zm0 8H1v2h2v-2zm8-8H9v2h2V3zM7 3H5v2h2V3z"></path></g>
<g id="picture-as-pdf"><path d="M20 2H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-8.5 7.5c0 .83-.67 1.5-1.5 1.5H9v2H7.5V7H10c.83 0 1.5.67 1.5 1.5v1zm5 2c0 .83-.67 1.5-1.5 1.5h-2.5V7H15c.83 0 1.5.67 1.5 1.5v3zm4-3H19v1h1.5V11H19v2h-1.5V7h3v1.5zM9 9.5h1v-1H9v1zM4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm10 5.5h1v-3h-1v3z"></path></g>
<g id="portrait"><path d="M12 12.25c1.24 0 2.25-1.01 2.25-2.25S13.24 7.75 12 7.75 9.75 8.76 9.75 10s1.01 2.25 2.25 2.25zm4.5 4c0-1.5-3-2.25-4.5-2.25s-4.5.75-4.5 2.25V17h9v-.75zM19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="remove-red-eye"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="rotate-90-degrees-ccw"><path d="M7.34 6.41L.86 12.9l6.49 6.48 6.49-6.48-6.5-6.49zM3.69 12.9l3.66-3.66L11 12.9l-3.66 3.66-3.65-3.66zm15.67-6.26C17.61 4.88 15.3 4 13 4V.76L8.76 5 13 9.24V6c1.79 0 3.58.68 4.95 2.05 2.73 2.73 2.73 7.17 0 9.9C16.58 19.32 14.79 20 13 20c-.97 0-1.94-.21-2.84-.61l-1.49 1.49C10.02 21.62 11.51 22 13 22c2.3 0 4.61-.88 6.36-2.64 3.52-3.51 3.52-9.21 0-12.72z"></path></g>
<g id="rotate-left"><path d="M7.11 8.53L5.7 7.11C4.8 8.27 4.24 9.61 4.07 11h2.02c.14-.87.49-1.72 1.02-2.47zM6.09 13H4.07c.17 1.39.72 2.73 1.62 3.89l1.41-1.42c-.52-.75-.87-1.59-1.01-2.47zm1.01 5.32c1.16.9 2.51 1.44 3.9 1.61V17.9c-.87-.15-1.71-.49-2.46-1.03L7.1 18.32zM13 4.07V1L8.45 5.55 13 10V6.09c2.84.48 5 2.94 5 5.91s-2.16 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93s-3.05-7.44-7-7.93z"></path></g>
<g id="rotate-right"><path d="M15.55 5.55L11 1v3.07C7.06 4.56 4 7.92 4 12s3.05 7.44 7 7.93v-2.02c-2.84-.48-5-2.94-5-5.91s2.16-5.43 5-5.91V10l4.55-4.45zM19.93 11c-.17-1.39-.72-2.73-1.62-3.89l-1.42 1.42c.54.75.88 1.6 1.02 2.47h2.02zM13 17.9v2.02c1.39-.17 2.74-.71 3.9-1.61l-1.44-1.44c-.75.54-1.59.89-2.46 1.03zm3.89-2.42l1.42 1.41c.9-1.16 1.45-2.5 1.62-3.89h-2.02c-.14.87-.48 1.72-1.02 2.48z"></path></g>
<g id="slideshow"><path d="M10 8v8l5-4-5-4zm9-5H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14z"></path></g>
<g id="straighten"><path d="M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z"></path></g>
<g id="style"><path d="M2.53 19.65l1.34.56v-9.03l-2.43 5.86c-.41 1.02.08 2.19 1.09 2.61zm19.5-3.7L17.07 3.98c-.31-.75-1.04-1.21-1.81-1.23-.26 0-.53.04-.79.15L7.1 5.95c-.75.31-1.21 1.03-1.23 1.8-.01.27.04.54.15.8l4.96 11.97c.31.76 1.05 1.22 1.83 1.23.26 0 .52-.05.77-.15l7.36-3.05c1.02-.42 1.51-1.59 1.09-2.6zM7.88 8.75c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-2 11c0 1.1.9 2 2 2h1.45l-3.45-8.34v6.34z"></path></g>
<g id="switch-camera"><path d="M20 4h-3.17L15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 11.5V13H9v2.5L5.5 12 9 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"></path></g>
<g id="switch-video"><path d="M18 9.5V6c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h14c.55 0 1-.45 1-1v-3.5l4 4v-13l-4 4zm-5 6V13H7v2.5L3.5 12 7 8.5V11h6V8.5l3.5 3.5-3.5 3.5z"></path></g>
<g id="tag-faces"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm3.5-9c.83 0 1.5-.67 1.5-1.5S16.33 8 15.5 8 14 8.67 14 9.5s.67 1.5 1.5 1.5zm-7 0c.83 0 1.5-.67 1.5-1.5S9.33 8 8.5 8 7 8.67 7 9.5 7.67 11 8.5 11zm3.5 6.5c2.33 0 4.31-1.46 5.11-3.5H6.89c.8 2.04 2.78 3.5 5.11 3.5z"></path></g>
<g id="texture"><path d="M19.51 3.08L3.08 19.51c.09.34.27.65.51.9.25.24.56.42.9.51L20.93 4.49c-.19-.69-.73-1.23-1.42-1.41zM11.88 3L3 11.88v2.83L14.71 3h-2.83zM5 3c-1.1 0-2 .9-2 2v2l4-4H5zm14 18c.55 0 1.05-.22 1.41-.59.37-.36.59-.86.59-1.41v-2l-4 4h2zm-9.71 0h2.83L21 12.12V9.29L9.29 21z"></path></g>
<g id="timelapse"><path d="M16.24 7.76C15.07 6.59 13.54 6 12 6v6l-4.24 4.24c2.34 2.34 6.14 2.34 8.49 0 2.34-2.34 2.34-6.14-.01-8.48zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="timer"><path d="M15 1H9v2h6V1zm-4 13h2V8h-2v6zm8.03-6.61l1.42-1.42c-.43-.51-.9-.99-1.41-1.41l-1.42 1.42C16.07 4.74 14.12 4 12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9 9-4.03 9-9c0-2.12-.74-4.07-1.97-5.61zM12 20c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g>
<g id="timer-10"><path d="M0 7.72V9.4l3-1V18h2V6h-.25L0 7.72zm23.78 6.65c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39 0-.14.03-.28.09-.41.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59C21.49 9.07 21 9 20.46 9c-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.69.23.96c.15.28.36.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02zm-9.96-7.32c-.34-.4-.75-.7-1.23-.88-.47-.18-1.01-.27-1.59-.27-.58 0-1.11.09-1.59.27-.48.18-.89.47-1.23.88-.34.41-.6.93-.79 1.59-.18.65-.28 1.45-.28 2.39v1.92c0 .94.09 1.74.28 2.39.19.66.45 1.19.8 1.6.34.41.75.71 1.23.89.48.18 1.01.28 1.59.28.59 0 1.12-.09 1.59-.28.48-.18.88-.48 1.22-.89.34-.41.6-.94.78-1.6.18-.65.28-1.45.28-2.39v-1.92c0-.94-.09-1.74-.28-2.39-.18-.66-.44-1.19-.78-1.59zm-.92 6.17c0 .6-.04 1.11-.12 1.53-.08.42-.2.76-.36 1.02-.16.26-.36.45-.59.57-.23.12-.51.18-.82.18-.3 0-.58-.06-.82-.18s-.44-.31-.6-.57c-.16-.26-.29-.6-.38-1.02-.09-.42-.13-.93-.13-1.53v-2.5c0-.6.04-1.11.13-1.52.09-.41.21-.74.38-1 .16-.25.36-.43.6-.55.24-.11.51-.17.81-.17.31 0 .58.06.81.17.24.11.44.29.6.55.16.25.29.58.37.99.08.41.13.92.13 1.52v2.51z"></path></g>
<g id="timer-3"><path d="M11.61 12.97c-.16-.24-.36-.46-.62-.65-.25-.19-.56-.35-.93-.48.3-.14.57-.3.8-.5.23-.2.42-.41.57-.64.15-.23.27-.46.34-.71.08-.24.11-.49.11-.73 0-.55-.09-1.04-.28-1.46-.18-.42-.44-.77-.78-1.06-.33-.28-.73-.5-1.2-.64-.45-.13-.97-.2-1.53-.2-.55 0-1.06.08-1.52.24-.47.17-.87.4-1.2.69-.33.29-.6.63-.78 1.03-.2.39-.29.83-.29 1.29h1.98c0-.26.05-.49.14-.69.09-.2.22-.38.38-.52.17-.14.36-.25.58-.33.22-.08.46-.12.73-.12.61 0 1.06.16 1.36.47.3.31.44.75.44 1.32 0 .27-.04.52-.12.74-.08.22-.21.41-.38.57-.17.16-.38.28-.63.37-.25.09-.55.13-.89.13H6.72v1.57H7.9c.34 0 .64.04.91.11.27.08.5.19.69.35.19.16.34.36.44.61.1.24.16.54.16.87 0 .62-.18 1.09-.53 1.42-.35.33-.84.49-1.45.49-.29 0-.56-.04-.8-.13-.24-.08-.44-.2-.61-.36-.17-.16-.3-.34-.39-.56-.09-.22-.14-.46-.14-.72H4.19c0 .55.11 1.03.32 1.45.21.42.5.77.86 1.05s.77.49 1.24.63.96.21 1.48.21c.57 0 1.09-.08 1.58-.23.49-.15.91-.38 1.26-.68.36-.3.64-.66.84-1.1.2-.43.3-.93.3-1.48 0-.29-.04-.58-.11-.86-.08-.25-.19-.51-.35-.76zm9.26 1.4c-.14-.28-.35-.53-.63-.74-.28-.21-.61-.39-1.01-.53s-.85-.27-1.35-.38c-.35-.07-.64-.15-.87-.23-.23-.08-.41-.16-.55-.25-.14-.09-.23-.19-.28-.3-.05-.11-.08-.24-.08-.39s.03-.28.09-.41c.06-.13.15-.25.27-.34.12-.1.27-.18.45-.24s.4-.09.64-.09c.25 0 .47.04.66.11.19.07.35.17.48.29.13.12.22.26.29.42.06.16.1.32.1.49h1.95c0-.39-.08-.75-.24-1.09-.16-.34-.39-.63-.69-.88-.3-.25-.66-.44-1.09-.59-.43-.15-.92-.22-1.46-.22-.51 0-.98.07-1.39.21-.41.14-.77.33-1.06.57-.29.24-.51.52-.67.84-.16.32-.23.65-.23 1.01s.08.68.23.96c.15.28.37.52.64.73.27.21.6.38.98.53.38.14.81.26 1.27.36.39.08.71.17.95.26s.43.19.57.29c.13.1.22.22.27.34.05.12.07.25.07.39 0 .32-.13.57-.4.77-.27.2-.66.29-1.17.29-.22 0-.43-.02-.64-.08-.21-.05-.4-.13-.56-.24-.17-.11-.3-.26-.41-.44-.11-.18-.17-.41-.18-.67h-1.89c0 .36.08.71.24 1.05.16.34.39.65.7.93.31.27.69.49 1.15.66.46.17.98.25 1.58.25.53 0 1.01-.06 1.44-.19.43-.13.8-.31 1.11-.54.31-.23.54-.51.71-.83.17-.32.25-.67.25-1.06-.02-.4-.09-.74-.24-1.02z"></path></g>
<g id="timer-off"><path d="M19.04 4.55l-1.42 1.42C16.07 4.74 14.12 4 12 4c-1.83 0-3.53.55-4.95 1.48l1.46 1.46C9.53 6.35 10.73 6 12 6c3.87 0 7 3.13 7 7 0 1.27-.35 2.47-.94 3.49l1.45 1.45C20.45 16.53 21 14.83 21 13c0-2.12-.74-4.07-1.97-5.61l1.42-1.42-1.41-1.42zM15 1H9v2h6V1zm-4 8.44l2 2V8h-2v1.44zM3.02 4L1.75 5.27 4.5 8.03C3.55 9.45 3 11.16 3 13c0 4.97 4.02 9 9 9 1.84 0 3.55-.55 4.98-1.5l2.5 2.5 1.27-1.27-7.71-7.71L3.02 4zM12 20c-3.87 0-7-3.13-7-7 0-1.28.35-2.48.95-3.52l9.56 9.56c-1.03.61-2.23.96-3.51.96z"></path></g>
<g id="tonality"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.94-.49-7-3.85-7-7.93s3.05-7.44 7-7.93v15.86zm2-15.86c1.03.13 2 .45 2.87.93H13v-.93zM13 7h5.24c.25.31.48.65.68 1H13V7zm0 3h6.74c.08.33.15.66.19 1H13v-1zm0 9.93V19h2.87c-.87.48-1.84.8-2.87.93zM18.24 17H13v-1h5.92c-.2.35-.43.69-.68 1zm1.5-3H13v-1h6.93c-.04.34-.11.67-.19 1z"></path></g>
<g id="transform"><path d="M22 18v-2H8V4h2L7 1 4 4h2v2H2v2h4v8c0 1.1.9 2 2 2h8v2h-2l3 3 3-3h-2v-2h4zM10 8h6v6h2V8c0-1.1-.9-2-2-2h-6v2z"></path></g>
<g id="tune"><path d="M3 17v2h6v-2H3zM3 5v2h10V5H3zm10 16v-2h8v-2h-8v-2h-2v6h2zM7 9v2H3v2h4v2h2V9H7zm14 4v-2H11v2h10zm-6-4h2V7h4V5h-4V3h-2v6z"></path></g>
<g id="view-comfy"><path d="M3 9h4V5H3v4zm0 5h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zM8 9h4V5H8v4zm5-4v4h4V5h-4zm5 9h4v-4h-4v4zM3 19h4v-4H3v4zm5 0h4v-4H8v4zm5 0h4v-4h-4v4zm5 0h4v-4h-4v4zm0-14v4h4V5h-4z"></path></g>
<g id="view-compact"><path d="M3 19h6v-7H3v7zm7 0h12v-7H10v7zM3 5v6h19V5H3z"></path></g>
<g id="vignette"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-9 15c-4.42 0-8-2.69-8-6s3.58-6 8-6 8 2.69 8 6-3.58 6-8 6z"></path></g>
<g id="wb-auto"><path d="M6.85 12.65h2.3L8 9l-1.15 3.65zM22 7l-1.2 6.29L19.3 7h-1.6l-1.49 6.29L15 7h-.76C12.77 5.17 10.53 4 8 4c-4.42 0-8 3.58-8 8s3.58 8 8 8c3.13 0 5.84-1.81 7.15-4.43l.1.43H17l1.5-6.1L20 16h1.75l2.05-9H22zm-11.7 9l-.7-2H6.4l-.7 2H3.8L7 7h2l3.2 9h-1.9z"></path></g>
<g id="wb-cloudy"><path d="M19.36 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.64-4.96z"></path></g>
<g id="wb-incandescent"><path d="M3.55 18.54l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8zM11 22.45h2V19.5h-2v2.95zM4 10.5H1v2h3v-2zm11-4.19V1.5H9v4.81C7.21 7.35 6 9.28 6 11.5c0 3.31 2.69 6 6 6s6-2.69 6-6c0-2.22-1.21-4.15-3-5.19zm5 4.19v2h3v-2h-3zm-2.76 7.66l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4z"></path></g>
<g id="wb-iridescent"><path d="M5 14.5h14v-6H5v6zM11 .55V3.5h2V.55h-2zm8.04 2.5l-1.79 1.79 1.41 1.41 1.8-1.79-1.42-1.41zM13 22.45V19.5h-2v2.95h2zm7.45-3.91l-1.8-1.79-1.41 1.41 1.79 1.8 1.42-1.42zM3.55 4.46l1.79 1.79 1.41-1.41-1.79-1.79-1.41 1.41zm1.41 15.49l1.79-1.8-1.41-1.41-1.79 1.79 1.41 1.42z"></path></g>
<g id="wb-sunny"><path d="M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(ybe.content);var vbe=Q`<iron-iconset-svg name="icons" size="24">
<svg><defs>
<g id="3d-rotation"><path d="M7.52 21.48C4.25 19.94 1.91 16.76 1.55 13H.05C.56 19.16 5.71 24 12 24l.66-.03-3.81-3.81-1.33 1.32zm.89-6.52c-.19 0-.37-.03-.52-.08-.16-.06-.29-.13-.4-.24-.11-.1-.2-.22-.26-.37-.06-.14-.09-.3-.09-.47h-1.3c0 .36.07.68.21.95.14.27.33.5.56.69.24.18.51.32.82.41.3.1.62.15.96.15.37 0 .72-.05 1.03-.15.32-.1.6-.25.83-.44s.42-.43.55-.72c.13-.29.2-.61.2-.97 0-.19-.02-.38-.07-.56-.05-.18-.12-.35-.23-.51-.1-.16-.24-.3-.4-.43-.17-.13-.37-.23-.61-.31.2-.09.37-.2.52-.33.15-.13.27-.27.37-.42.1-.15.17-.3.22-.46.05-.16.07-.32.07-.48 0-.36-.06-.68-.18-.96-.12-.28-.29-.51-.51-.69-.2-.19-.47-.33-.77-.43C9.1 8.05 8.76 8 8.39 8c-.36 0-.69.05-1 .16-.3.11-.57.26-.79.45-.21.19-.38.41-.51.67-.12.26-.18.54-.18.85h1.3c0-.17.03-.32.09-.45s.14-.25.25-.34c.11-.09.23-.17.38-.22.15-.05.3-.08.48-.08.4 0 .7.1.89.31.19.2.29.49.29.86 0 .18-.03.34-.08.49-.05.15-.14.27-.25.37-.11.1-.25.18-.41.24-.16.06-.36.09-.58.09H7.5v1.03h.77c.22 0 .42.02.6.07s.33.13.45.23c.12.11.22.24.29.4.07.16.1.35.1.57 0 .41-.12.72-.35.93-.23.23-.55.33-.95.33zm8.55-5.92c-.32-.33-.7-.59-1.14-.77-.43-.18-.92-.27-1.46-.27H12v8h2.3c.55 0 1.06-.09 1.51-.27.45-.18.84-.43 1.16-.76.32-.33.57-.73.74-1.19.17-.47.26-.99.26-1.57v-.4c0-.58-.09-1.1-.26-1.57-.18-.47-.43-.87-.75-1.2zm-.39 3.16c0 .42-.05.79-.14 1.13-.1.33-.24.62-.43.85-.19.23-.43.41-.71.53-.29.12-.62.18-.99.18h-.91V9.12h.97c.72 0 1.27.23 1.64.69.38.46.57 1.12.57 1.99v.4zM12 0l-.66.03 3.81 3.81 1.33-1.33c3.27 1.55 5.61 4.72 5.96 8.48h1.5C23.44 4.84 18.29 0 12 0z"></path></g>
<g id="accessibility"><path d="M12 2c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm9 7h-6v13h-2v-6h-2v6H9V9H3V7h18v2z"></path></g>
<g id="accessible"><circle cx="12" cy="4" r="2"></circle><path d="M19 13v-2c-1.54.02-3.09-.75-4.07-1.83l-1.29-1.43c-.17-.19-.38-.34-.61-.45-.01 0-.01-.01-.02-.01H13c-.35-.2-.75-.3-1.19-.26C10.76 7.11 10 8.04 10 9.09V15c0 1.1.9 2 2 2h5v5h2v-5.5c0-1.1-.9-2-2-2h-3v-3.45c1.29 1.07 3.25 1.94 5 1.95zm-6.17 5c-.41 1.16-1.52 2-2.83 2-1.66 0-3-1.34-3-3 0-1.31.84-2.41 2-2.83V12.1c-2.28.46-4 2.48-4 4.9 0 2.76 2.24 5 5 5 2.42 0 4.44-1.72 4.9-4h-2.07z"></path></g>
<g id="account-balance"><path d="M4 10v7h3v-7H4zm6 0v7h3v-7h-3zM2 22h19v-3H2v3zm14-12v7h3v-7h-3zm-4.5-9L2 6v2h19V6l-9.5-5z"></path></g>
<g id="account-balance-wallet"><path d="M21 18v1c0 1.1-.9 2-2 2H5c-1.11 0-2-.9-2-2V5c0-1.1.89-2 2-2h14c1.1 0 2 .9 2 2v1h-9c-1.11 0-2 .9-2 2v8c0 1.1.89 2 2 2h9zm-9-2h10V8H12v8zm4-2.5c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="account-box"><path d="M3 5v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.11 0-2 .9-2 2zm12 4c0 1.66-1.34 3-3 3s-3-1.34-3-3 1.34-3 3-3 3 1.34 3 3zm-9 8c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1H6v-1z"></path></g>
<g id="account-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"></path></g>
<g id="add"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></g>
<g id="add-alert"><path d="M10.01 21.01c0 1.1.89 1.99 1.99 1.99s1.99-.89 1.99-1.99h-3.98zm8.87-4.19V11c0-3.25-2.25-5.97-5.29-6.69v-.72C13.59 2.71 12.88 2 12 2s-1.59.71-1.59 1.59v.72C7.37 5.03 5.12 7.75 5.12 11v5.82L3 18.94V20h18v-1.06l-2.12-2.12zM16 13.01h-3v3h-2v-3H8V11h3V8h2v3h3v2.01z"></path></g>
<g id="add-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g>
<g id="add-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z"></path></g>
<g id="add-circle-outline"><path d="M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="add-shopping-cart"><path d="M11 9h2V6h3V4h-3V1h-2v3H8v2h3v3zm-4 9c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2zm-9.83-3.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.86-7.01L19.42 4h-.01l-1.1 2-2.76 5H8.53l-.13-.27L6.16 6l-.95-2-.94-2H1v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.13 0-.25-.11-.25-.25z"></path></g>
<g id="alarm"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12.5 8H11v6l4.75 2.85.75-1.23-4-2.37V8zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7z"></path></g>
<g id="alarm-add"><path d="M7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm1-11h-2v3H8v2h3v3h2v-3h3v-2h-3V9z"></path></g>
<g id="alarm-off"><path d="M12 6c3.87 0 7 3.13 7 7 0 .84-.16 1.65-.43 2.4l1.52 1.52c.58-1.19.91-2.51.91-3.92 0-4.97-4.03-9-9-9-1.41 0-2.73.33-3.92.91L9.6 6.43C10.35 6.16 11.16 6 12 6zm10-.28l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM2.92 2.29L1.65 3.57 2.98 4.9l-1.11.93 1.42 1.42 1.11-.94.8.8C3.83 8.69 3 10.75 3 13c0 4.97 4.02 9 9 9 2.25 0 4.31-.83 5.89-2.2l2.2 2.2 1.27-1.27L3.89 3.27l-.97-.98zm13.55 16.1C15.26 19.39 13.7 20 12 20c-3.87 0-7-3.13-7-7 0-1.7.61-3.26 1.61-4.47l9.86 9.86zM8.02 3.28L6.6 1.86l-.86.71 1.42 1.42.86-.71z"></path></g>
<g id="alarm-on"><path d="M22 5.72l-4.6-3.86-1.29 1.53 4.6 3.86L22 5.72zM7.88 3.39L6.6 1.86 2 5.71l1.29 1.53 4.59-3.85zM12 4c-4.97 0-9 4.03-9 9s4.02 9 9 9c4.97 0 9-4.03 9-9s-4.03-9-9-9zm0 16c-3.87 0-7-3.13-7-7s3.13-7 7-7 7 3.13 7 7-3.13 7-7 7zm-1.46-5.47L8.41 12.4l-1.06 1.06 3.18 3.18 6-6-1.06-1.06-4.93 4.95z"></path></g>
<g id="all-out"><path d="M16.21 4.16l4 4v-4zm4 12l-4 4h4zm-12 4l-4-4v4zm-4-12l4-4h-4zm12.95-.95c-2.73-2.73-7.17-2.73-9.9 0s-2.73 7.17 0 9.9 7.17 2.73 9.9 0 2.73-7.16 0-9.9zm-1.1 8.8c-2.13 2.13-5.57 2.13-7.7 0s-2.13-5.57 0-7.7 5.57-2.13 7.7 0 2.13 5.57 0 7.7z"></path></g>
<g id="android"><path d="M6 18c0 .55.45 1 1 1h1v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h2v3.5c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5V19h1c.55 0 1-.45 1-1V8H6v10zM3.5 8C2.67 8 2 8.67 2 9.5v7c0 .83.67 1.5 1.5 1.5S5 17.33 5 16.5v-7C5 8.67 4.33 8 3.5 8zm17 0c-.83 0-1.5.67-1.5 1.5v7c0 .83.67 1.5 1.5 1.5s1.5-.67 1.5-1.5v-7c0-.83-.67-1.5-1.5-1.5zm-4.97-5.84l1.3-1.3c.2-.2.2-.51 0-.71-.2-.2-.51-.2-.71 0l-1.48 1.48C13.85 1.23 12.95 1 12 1c-.96 0-1.86.23-2.66.63L7.85.15c-.2-.2-.51-.2-.71 0-.2.2-.2.51 0 .71l1.31 1.31C6.97 3.26 6 5.01 6 7h12c0-1.99-.97-3.75-2.47-4.84zM10 5H9V4h1v1zm5 0h-1V4h1v1z"></path></g>
<g id="announcement"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 9h-2V5h2v6zm0 4h-2v-2h2v2z"></path></g>
<g id="apps"><path d="M4 8h4V4H4v4zm6 12h4v-4h-4v4zm-6 0h4v-4H4v4zm0-6h4v-4H4v4zm6 0h4v-4h-4v4zm6-10v4h4V4h-4zm-6 4h4V4h-4v4zm6 6h4v-4h-4v4zm0 6h4v-4h-4v4z"></path></g>
<g id="archive"><path d="M20.54 5.23l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27zM12 17.5L6.5 12H10v-2h4v2h3.5L12 17.5zM5.12 5l.81-1h12l.94 1H5.12z"></path></g>
<g id="arrow-back"><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"></path></g>
<g id="arrow-downward"><path d="M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z"></path></g>
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>
<g id="arrow-drop-down-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 12l-4-4h8l-4 4z"></path></g>
<g id="arrow-drop-up"><path d="M7 14l5-5 5 5z"></path></g>
<g id="arrow-forward"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"></path></g>
<g id="arrow-upward"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"></path></g>
<g id="aspect-ratio"><path d="M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g>
<g id="assessment"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"></path></g>
<g id="assignment"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm2 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"></path></g>
<g id="assignment-ind"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></g>
<g id="assignment-late"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-6 15h-2v-2h2v2zm0-4h-2V8h2v6zm-1-9c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1z"></path></g>
<g id="assignment-return"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm4 12h-4v3l-5-5 5-5v3h4v4z"></path></g>
<g id="assignment-returned"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 15l-5-5h3V9h4v4h3l-5 5z"></path></g>
<g id="assignment-turned-in"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm-2 14l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g>
<g id="attachment"><path d="M2 12.5C2 9.46 4.46 7 7.5 7H18c2.21 0 4 1.79 4 4s-1.79 4-4 4H9.5C8.12 15 7 13.88 7 12.5S8.12 10 9.5 10H17v2H9.41c-.55 0-.55 1 0 1H18c1.1 0 2-.9 2-2s-.9-2-2-2H7.5C5.57 9 4 10.57 4 12.5S5.57 16 7.5 16H17v2H7.5C4.46 18 2 15.54 2 12.5z"></path></g>
<g id="autorenew"><path d="M12 6v3l4-4-4-4v3c-4.42 0-8 3.58-8 8 0 1.57.46 3.03 1.24 4.26L6.7 14.8c-.45-.83-.7-1.79-.7-2.8 0-3.31 2.69-6 6-6zm6.76 1.74L17.3 9.2c.44.84.7 1.79.7 2.8 0 3.31-2.69 6-6 6v-3l-4 4 4 4v-3c4.42 0 8-3.58 8-8 0-1.57-.46-3.03-1.24-4.26z"></path></g>
<g id="backspace"><path d="M22 3H7c-.69 0-1.23.35-1.59.88L0 12l5.41 8.11c.36.53.9.89 1.59.89h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-3 12.59L17.59 17 14 13.41 10.41 17 9 15.59 12.59 12 9 8.41 10.41 7 14 10.59 17.59 7 19 8.41 15.41 12 19 15.59z"></path></g>
<g id="backup"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g>
<g id="block"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM4 12c0-4.42 3.58-8 8-8 1.85 0 3.55.63 4.9 1.69L5.69 16.9C4.63 15.55 4 13.85 4 12zm8 8c-1.85 0-3.55-.63-4.9-1.69L18.31 7.1C19.37 8.45 20 10.15 20 12c0 4.42-3.58 8-8 8z"></path></g>
<g id="book"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g>
<g id="bookmark"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g>
<g id="bookmark-border"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g>
<g id="bug-report"><path d="M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5c-.49 0-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20V8zm-6 8h-4v-2h4v2zm0-4h-4v-2h4v2z"></path></g>
<g id="build"><path d="M22.7 19l-9.1-9.1c.9-2.3.4-5-1.5-6.9-2-2-5-2.4-7.4-1.3L9 6 6 9 1.6 4.7C.4 7.1.9 10.1 2.9 12.1c1.9 1.9 4.6 2.4 6.9 1.5l9.1 9.1c.4.4 1 .4 1.4 0l2.3-2.3c.5-.4.5-1.1.1-1.4z"></path></g>
<g id="cached"><path d="M19 8l-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3l-4-4zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4H6z"></path></g>
<g id="camera-enhance"><path d="M9 3L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2h-3.17L15 3H9zm3 15c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-1l1.25-2.75L16 13l-2.75-1.25L12 9l-1.25 2.75L8 13l2.75 1.25z"></path></g>
<g id="cancel"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"></path></g>
<g id="card-giftcard"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g>
<g id="card-membership"><path d="M20 2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h4v5l4-2 4 2v-5h4c1.11 0 2-.89 2-2V4c0-1.11-.89-2-2-2zm0 13H4v-2h16v2zm0-5H4V4h16v6z"></path></g>
<g id="card-travel"><path d="M20 6h-3V4c0-1.11-.89-2-2-2H9c-1.11 0-2 .89-2 2v2H4c-1.11 0-2 .89-2 2v11c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zM9 4h6v2H9V4zm11 15H4v-2h16v2zm0-5H4V8h3v2h2V8h6v2h2V8h3v6z"></path></g>
<g id="change-history"><path d="M12 7.77L18.39 18H5.61L12 7.77M12 4L2 20h20L12 4z"></path></g>
<g id="check"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"></path></g>
<g id="check-box"><path d="M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g>
<g id="check-box-outline-blank"><path d="M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="check-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"></path></g>
<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
<g id="chrome-reader-mode"><path d="M13 12h7v1.5h-7zm0-2.5h7V11h-7zm0 5h7V16h-7zM21 4H3c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 15h-9V6h9v13z"></path></g>
<g id="class"><path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"></path></g>
<g id="clear"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g>
<g id="close"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"></path></g>
<g id="cloud"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96z"></path></g>
<g id="cloud-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.5 14H8c-1.66 0-3-1.34-3-3s1.34-3 3-3l.14.01C8.58 8.28 10.13 7 12 7c2.21 0 4 1.79 4 4h.5c1.38 0 2.5 1.12 2.5 2.5S17.88 16 16.5 16z"></path></g>
<g id="cloud-done"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM10 17l-3.5-3.5 1.41-1.41L10 14.17 15.18 9l1.41 1.41L10 17z"></path></g>
<g id="cloud-download"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM17 13l-5 5-5-5h3V9h4v4h3z"></path></g>
<g id="cloud-off"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4c-1.48 0-2.85.43-4.01 1.17l1.46 1.46C10.21 6.23 11.08 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3 0 1.13-.64 2.11-1.56 2.62l1.45 1.45C23.16 18.16 24 16.68 24 15c0-2.64-2.05-4.78-4.65-4.96zM3 5.27l2.75 2.74C2.56 8.15 0 10.77 0 14c0 3.31 2.69 6 6 6h11.73l2 2L21 20.73 4.27 4 3 5.27zM7.73 10l8 8H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h1.73z"></path></g>
<g id="cloud-queue"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM19 18H6c-2.21 0-4-1.79-4-4s1.79-4 4-4h.71C7.37 7.69 9.48 6 12 6c3.04 0 5.5 2.46 5.5 5.5v.5H19c1.66 0 3 1.34 3 3s-1.34 3-3 3z"></path></g>
<g id="cloud-upload"><path d="M19.35 10.04C18.67 6.59 15.64 4 12 4 9.11 4 6.6 5.64 5.35 8.04 2.34 8.36 0 10.91 0 14c0 3.31 2.69 6 6 6h13c2.76 0 5-2.24 5-5 0-2.64-2.05-4.78-4.65-4.96zM14 13v4h-4v-4H7l5-5 5 5h-3z"></path></g>
<g id="code"><path d="M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z"></path></g>
<g id="compare-arrows"><path d="M9.01 14H2v2h7.01v3L13 15l-3.99-4v3zm5.98-1v-3H22V8h-7.01V5L11 9l3.99 4z"></path></g>
<g id="content-copy"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"></path></g>
<g id="content-cut"><path d="M9.64 7.64c.23-.5.36-1.05.36-1.64 0-2.21-1.79-4-4-4S2 3.79 2 6s1.79 4 4 4c.59 0 1.14-.13 1.64-.36L10 12l-2.36 2.36C7.14 14.13 6.59 14 6 14c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4c0-.59-.13-1.14-.36-1.64L12 14l7 7h3v-1L9.64 7.64zM6 8c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm0 12c-1.1 0-2-.89-2-2s.9-2 2-2 2 .89 2 2-.9 2-2 2zm6-7.5c-.28 0-.5-.22-.5-.5s.22-.5.5-.5.5.22.5.5-.22.5-.5.5zM19 3l-6 6 2 2 7-7V3z"></path></g>
<g id="content-paste"><path d="M19 2h-4.18C14.4.84 13.3 0 12 0c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm7 18H5V4h2v3h10V4h2v16z"></path></g>
<g id="copyright"><path d="M10.08 10.86c.05-.33.16-.62.3-.87s.34-.46.59-.62c.24-.15.54-.22.91-.23.23.01.44.05.63.13.2.09.38.21.52.36s.25.33.34.53.13.42.14.64h1.79c-.02-.47-.11-.9-.28-1.29s-.4-.73-.7-1.01-.66-.5-1.08-.66-.88-.23-1.39-.23c-.65 0-1.22.11-1.7.34s-.88.53-1.2.92-.56.84-.71 1.36S8 11.29 8 11.87v.27c0 .58.08 1.12.23 1.64s.39.97.71 1.35.72.69 1.2.91 1.05.34 1.7.34c.47 0 .91-.08 1.32-.23s.77-.36 1.08-.63.56-.58.74-.94.29-.74.3-1.15h-1.79c-.01.21-.06.4-.15.58s-.21.33-.36.46-.32.23-.52.3c-.19.07-.39.09-.6.1-.36-.01-.66-.08-.89-.23-.25-.16-.45-.37-.59-.62s-.25-.55-.3-.88-.08-.67-.08-1v-.27c0-.35.03-.68.08-1.01zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="create"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></g>
<g id="create-new-folder"><path d="M20 6h-8l-2-2H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-1 8h-3v3h-2v-3h-3v-2h3V9h2v3h3v2z"></path></g>
<g id="credit-card"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g>
<g id="dashboard"><path d="M3 13h8V3H3v10zm0 8h8v-6H3v6zm10 0h8V11h-8v10zm0-18v6h8V3h-8z"></path></g>
<g id="date-range"><path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"></path></g>
<g id="delete"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"></path></g>
<g id="delete-forever"><path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zm2.46-7.12l1.41-1.41L12 12.59l2.12-2.12 1.41 1.41L13.41 14l2.12 2.12-1.41 1.41L12 15.41l-2.12 2.12-1.41-1.41L10.59 14l-2.13-2.12zM15.5 4l-1-1h-5l-1 1H5v2h14V4z"></path></g>
<g id="delete-sweep"><path d="M15 16h4v2h-4zm0-8h7v2h-7zm0 4h6v2h-6zM3 18c0 1.1.9 2 2 2h6c1.1 0 2-.9 2-2V8H3v10zM14 5h-3l-1-1H6L5 5H2v2h12z"></path></g>
<g id="description"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"></path></g>
<g id="dns"><path d="M20 13H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zM7 19c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM20 3H4c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h16c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1zM7 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="done"><path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z"></path></g>
<g id="done-all"><path d="M18 7l-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41L6 19l1.41-1.41L1.83 12 .41 13.41z"></path></g>
<g id="donut-large"><path d="M11 5.08V2c-5 .5-9 4.81-9 10s4 9.5 9 10v-3.08c-3-.48-6-3.4-6-6.92s3-6.44 6-6.92zM18.97 11H22c-.47-5-4-8.53-9-9v3.08C16 5.51 18.54 8 18.97 11zM13 18.92V22c5-.47 8.53-4 9-9h-3.03c-.43 3-2.97 5.49-5.97 5.92z"></path></g>
<g id="donut-small"><path d="M11 9.16V2c-5 .5-9 4.79-9 10s4 9.5 9 10v-7.16c-1-.41-2-1.52-2-2.84s1-2.43 2-2.84zM14.86 11H22c-.48-4.75-4-8.53-9-9v7.16c1 .3 1.52.98 1.86 1.84zM13 14.84V22c5-.47 8.52-4.25 9-9h-7.14c-.34.86-.86 1.54-1.86 1.84z"></path></g>
<g id="drafts"><path d="M21.99 8c0-.72-.37-1.35-.94-1.7L12 1 2.95 6.3C2.38 6.65 2 7.28 2 8v10c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2l-.01-10zM12 13L3.74 7.84 12 3l8.26 4.84L12 13z"></path></g>
<g id="eject"><path d="M5 17h14v2H5zm7-12L5.33 15h13.34z"></path></g>
<g id="error"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"></path></g>
<g id="error-outline"><path d="M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="euro-symbol"><path d="M15 18.5c-2.51 0-4.68-1.42-5.76-3.5H15v-2H8.58c-.05-.33-.08-.66-.08-1s.03-.67.08-1H15V9H9.24C10.32 6.92 12.5 5.5 15 5.5c1.61 0 3.09.59 4.23 1.57L21 5.3C19.41 3.87 17.3 3 15 3c-3.92 0-7.24 2.51-8.48 6H3v2h3.06c-.04.33-.06.66-.06 1 0 .34.02.67.06 1H3v2h3.52c1.24 3.49 4.56 6 8.48 6 2.31 0 4.41-.87 6-2.3l-1.78-1.77c-1.13.98-2.6 1.57-4.22 1.57z"></path></g>
<g id="event"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"></path></g>
<g id="event-seat"><path d="M4 18v3h3v-3h10v3h3v-6H4zm15-8h3v3h-3zM2 10h3v3H2zm15 3H7V5c0-1.1.9-2 2-2h6c1.1 0 2 .9 2 2v8z"></path></g>
<g id="exit-to-app"><path d="M10.09 15.59L11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"></path></g>
<g id="expand-less"><path d="M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"></path></g>
<g id="expand-more"><path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"></path></g>
<g id="explore"><path d="M12 10.9c-.61 0-1.1.49-1.1 1.1s.49 1.1 1.1 1.1c.61 0 1.1-.49 1.1-1.1s-.49-1.1-1.1-1.1zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm2.19 12.19L6 18l3.81-8.19L18 6l-3.81 8.19z"></path></g>
<g id="extension"><path d="M20.5 11H19V7c0-1.1-.9-2-2-2h-4V3.5C13 2.12 11.88 1 10.5 1S8 2.12 8 3.5V5H4c-1.1 0-1.99.9-1.99 2v3.8H3.5c1.49 0 2.7 1.21 2.7 2.7s-1.21 2.7-2.7 2.7H2V20c0 1.1.9 2 2 2h3.8v-1.5c0-1.49 1.21-2.7 2.7-2.7 1.49 0 2.7 1.21 2.7 2.7V22H17c1.1 0 2-.9 2-2v-4h1.5c1.38 0 2.5-1.12 2.5-2.5S21.88 11 20.5 11z"></path></g>
<g id="face"><path d="M9 11.75c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zm6 0c-.69 0-1.25.56-1.25 1.25s.56 1.25 1.25 1.25 1.25-.56 1.25-1.25-.56-1.25-1.25-1.25zM12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8 0-.29.02-.58.05-.86 2.36-1.05 4.23-2.98 5.21-5.37C11.07 8.33 14.05 10 17.42 10c.78 0 1.53-.09 2.25-.26.21.71.33 1.47.33 2.26 0 4.41-3.59 8-8 8z"></path></g>
<g id="favorite"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"></path></g>
<g id="favorite-border"><path d="M16.5 3c-1.74 0-3.41.81-4.5 2.09C10.91 3.81 9.24 3 7.5 3 4.42 3 2 5.42 2 8.5c0 3.78 3.4 6.86 8.55 11.54L12 21.35l1.45-1.32C18.6 15.36 22 12.28 22 8.5 22 5.42 19.58 3 16.5 3zm-4.4 15.55l-.1.1-.1-.1C7.14 14.24 4 11.39 4 8.5 4 6.5 5.5 5 7.5 5c1.54 0 3.04.99 3.57 2.36h1.87C13.46 5.99 14.96 5 16.5 5c2 0 3.5 1.5 3.5 3.5 0 2.89-3.14 5.74-7.9 10.05z"></path></g>
<g id="feedback"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"></path></g>
<g id="file-download"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g>
<g id="file-upload"><path d="M9 16h6v-6h4l-7-7-7 7h4zm-4 2h14v2H5z"></path></g>
<g id="filter-list"><path d="M10 18h4v-2h-4v2zM3 6v2h18V6H3zm3 7h12v-2H6v2z"></path></g>
<g id="find-in-page"><path d="M20 19.59V8l-6-6H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c.45 0 .85-.15 1.19-.4l-4.43-4.43c-.8.52-1.74.83-2.76.83-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5c0 1.02-.31 1.96-.83 2.75L20 19.59zM9 13c0 1.66 1.34 3 3 3s3-1.34 3-3-1.34-3-3-3-3 1.34-3 3z"></path></g>
<g id="find-replace"><path d="M11 6c1.38 0 2.63.56 3.54 1.46L12 10h6V4l-2.05 2.05C14.68 4.78 12.93 4 11 4c-3.53 0-6.43 2.61-6.92 6H6.1c.46-2.28 2.48-4 4.9-4zm5.64 9.14c.66-.9 1.12-1.97 1.28-3.14H15.9c-.46 2.28-2.48 4-4.9 4-1.38 0-2.63-.56-3.54-1.46L10 12H4v6l2.05-2.05C7.32 17.22 9.07 18 11 18c1.55 0 2.98-.51 4.14-1.36L20 21.49 21.49 20l-4.85-4.86z"></path></g>
<g id="fingerprint"><path d="M17.81 4.47c-.08 0-.16-.02-.23-.06C15.66 3.42 14 3 12.01 3c-1.98 0-3.86.47-5.57 1.41-.24.13-.54.04-.68-.2-.13-.24-.04-.55.2-.68C7.82 2.52 9.86 2 12.01 2c2.13 0 3.99.47 6.03 1.52.25.13.34.43.21.67-.09.18-.26.28-.44.28zM3.5 9.72c-.1 0-.2-.03-.29-.09-.23-.16-.28-.47-.12-.7.99-1.4 2.25-2.5 3.75-3.27C9.98 4.04 14 4.03 17.15 5.65c1.5.77 2.76 1.86 3.75 3.25.16.22.11.54-.12.7-.23.16-.54.11-.7-.12-.9-1.26-2.04-2.25-3.39-2.94-2.87-1.47-6.54-1.47-9.4.01-1.36.7-2.5 1.7-3.4 2.96-.08.14-.23.21-.39.21zm6.25 12.07c-.13 0-.26-.05-.35-.15-.87-.87-1.34-1.43-2.01-2.64-.69-1.23-1.05-2.73-1.05-4.34 0-2.97 2.54-5.39 5.66-5.39s5.66 2.42 5.66 5.39c0 .28-.22.5-.5.5s-.5-.22-.5-.5c0-2.42-2.09-4.39-4.66-4.39-2.57 0-4.66 1.97-4.66 4.39 0 1.44.32 2.77.93 3.85.64 1.15 1.08 1.64 1.85 2.42.19.2.19.51 0 .71-.11.1-.24.15-.37.15zm7.17-1.85c-1.19 0-2.24-.3-3.1-.89-1.49-1.01-2.38-2.65-2.38-4.39 0-.28.22-.5.5-.5s.5.22.5.5c0 1.41.72 2.74 1.94 3.56.71.48 1.54.71 2.54.71.24 0 .64-.03 1.04-.1.27-.05.53.13.58.41.05.27-.13.53-.41.58-.57.11-1.07.12-1.21.12zM14.91 22c-.04 0-.09-.01-.13-.02-1.59-.44-2.63-1.03-3.72-2.1-1.4-1.39-2.17-3.24-2.17-5.22 0-1.62 1.38-2.94 3.08-2.94 1.7 0 3.08 1.32 3.08 2.94 0 1.07.93 1.94 2.08 1.94s2.08-.87 2.08-1.94c0-3.77-3.25-6.83-7.25-6.83-2.84 0-5.44 1.58-6.61 4.03-.39.81-.59 1.76-.59 2.8 0 .78.07 2.01.67 3.61.1.26-.03.55-.29.64-.26.1-.55-.04-.64-.29-.49-1.31-.73-2.61-.73-3.96 0-1.2.23-2.29.68-3.24 1.33-2.79 4.28-4.6 7.51-4.6 4.55 0 8.25 3.51 8.25 7.83 0 1.62-1.38 2.94-3.08 2.94s-3.08-1.32-3.08-2.94c0-1.07-.93-1.94-2.08-1.94s-2.08.87-2.08 1.94c0 1.71.66 3.31 1.87 4.51.95.94 1.86 1.46 3.27 1.85.27.07.42.35.35.61-.05.23-.26.38-.47.38z"></path></g>
<g id="first-page"><path d="M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"></path></g>
<g id="flag"><path d="M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6z"></path></g>
<g id="flight-land"><path d="M2.5 19h19v2h-19zm7.18-5.73l4.35 1.16 5.31 1.42c.8.21 1.62-.26 1.84-1.06.21-.8-.26-1.62-1.06-1.84l-5.31-1.42-2.76-9.02L10.12 2v8.28L5.15 8.95l-.93-2.32-1.45-.39v5.17l1.6.43 5.31 1.43z"></path></g>
<g id="flight-takeoff"><path d="M2.5 19h19v2h-19zm19.57-9.36c-.21-.8-1.04-1.28-1.84-1.06L14.92 10l-6.9-6.43-1.93.51 4.14 7.17-4.97 1.33-1.97-1.54-1.45.39 1.82 3.16.77 1.33 1.6-.43 5.31-1.42 4.35-1.16L21 11.49c.81-.23 1.28-1.05 1.07-1.85z"></path></g>
<g id="flip-to-back"><path d="M9 7H7v2h2V7zm0 4H7v2h2v-2zm0-8c-1.11 0-2 .9-2 2h2V3zm4 12h-2v2h2v-2zm6-12v2h2c0-1.1-.9-2-2-2zm-6 0h-2v2h2V3zM9 17v-2H7c0 1.1.89 2 2 2zm10-4h2v-2h-2v2zm0-4h2V7h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zM5 7H3v12c0 1.1.89 2 2 2h12v-2H5V7zm10-2h2V3h-2v2zm0 12h2v-2h-2v2z"></path></g>
<g id="flip-to-front"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm2 4v-2H3c0 1.1.89 2 2 2zM3 9h2V7H3v2zm12 12h2v-2h-2v2zm4-18H9c-1.11 0-2 .9-2 2v10c0 1.1.89 2 2 2h10c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12H9V5h10v10zm-8 6h2v-2h-2v2zm-4 0h2v-2H7v2z"></path></g>
<g id="folder"><path d="M10 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2h-8l-2-2z"></path></g>
<g id="folder-open"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z"></path></g>
<g id="folder-shared"><path d="M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm-5 3c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm4 8h-8v-1c0-1.33 2.67-2 4-2s4 .67 4 2v1z"></path></g>
<g id="font-download"><path d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"></path></g>
<g id="forward"><path d="M12 8V4l8 8-8 8v-4H4V8z"></path></g>
<g id="fullscreen"><path d="M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"></path></g>
<g id="fullscreen-exit"><path d="M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"></path></g>
<g id="g-translate"><path d="M20 5h-9.12L10 2H4c-1.1 0-2 .9-2 2v13c0 1.1.9 2 2 2h7l1 3h8c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zM7.17 14.59c-2.25 0-4.09-1.83-4.09-4.09s1.83-4.09 4.09-4.09c1.04 0 1.99.37 2.74 1.07l.07.06-1.23 1.18-.06-.05c-.29-.27-.78-.59-1.52-.59-1.31 0-2.38 1.09-2.38 2.42s1.07 2.42 2.38 2.42c1.37 0 1.96-.87 2.12-1.46H7.08V9.91h3.95l.01.07c.04.21.05.4.05.61 0 2.35-1.61 4-3.92 4zm6.03-1.71c.33.6.74 1.18 1.19 1.7l-.54.53-.65-2.23zm.77-.76h-.99l-.31-1.04h3.99s-.34 1.31-1.56 2.74c-.52-.62-.89-1.23-1.13-1.7zM21 20c0 .55-.45 1-1 1h-7l2-2-.81-2.77.92-.92L17.79 18l.73-.73-2.71-2.68c.9-1.03 1.6-2.25 1.92-3.51H19v-1.04h-3.64V9h-1.04v1.04h-1.96L11.18 6H20c.55 0 1 .45 1 1v13z"></path></g>
<g id="gavel"><path d="M1 21h12v2H1zM5.245 8.07l2.83-2.827 14.14 14.142-2.828 2.828zM12.317 1l5.657 5.656-2.83 2.83-5.654-5.66zM3.825 9.485l5.657 5.657-2.828 2.828-5.657-5.657z"></path></g>
<g id="gesture"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"></path></g>
<g id="get-app"><path d="M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z"></path></g>
<g id="gif"><path d="M11.5 9H13v6h-1.5zM9 9H6c-.6 0-1 .5-1 1v4c0 .5.4 1 1 1h3c.6 0 1-.5 1-1v-2H8.5v1.5h-2v-3H10V10c0-.5-.4-1-1-1zm10 1.5V9h-4.5v6H16v-2h2v-1.5h-2v-1z"></path></g>
<g id="grade"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g>
<g id="group-work"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM8 17.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5zM9.5 8c0-1.38 1.12-2.5 2.5-2.5s2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5S9.5 9.38 9.5 8zm6.5 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g>
<g id="help"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 17h-2v-2h2v2zm2.07-7.75l-.9.92C13.45 12.9 13 13.5 13 15h-2v-.5c0-1.1.45-2.1 1.17-2.83l1.24-1.26c.37-.36.59-.86.59-1.41 0-1.1-.9-2-2-2s-2 .9-2 2H8c0-2.21 1.79-4 4-4s4 1.79 4 4c0 .88-.36 1.68-.93 2.25z"></path></g>
<g id="help-outline"><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"></path></g>
<g id="highlight-off"><path d="M14.59 8L12 10.59 9.41 8 8 9.41 10.59 12 8 14.59 9.41 16 12 13.41 14.59 16 16 14.59 13.41 12 16 9.41 14.59 8zM12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="history"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g>
<g id="home"><path d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"></path></g>
<g id="hourglass-empty"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6zm10 14.5V20H8v-3.5l4-4 4 4zm-4-5l-4-4V4h8v3.5l-4 4z"></path></g>
<g id="hourglass-full"><path d="M6 2v6h.01L6 8.01 10 12l-4 4 .01.01H6V22h12v-5.99h-.01L18 16l-4-4 4-3.99-.01-.01H18V2H6z"></path></g>
<g id="http"><path d="M4.5 11h-2V9H1v6h1.5v-2.5h2V15H6V9H4.5v2zm2.5-.5h1.5V15H10v-4.5h1.5V9H7v1.5zm5.5 0H14V15h1.5v-4.5H17V9h-4.5v1.5zm9-1.5H18v6h1.5v-2h2c.8 0 1.5-.7 1.5-1.5v-1c0-.8-.7-1.5-1.5-1.5zm0 2.5h-2v-1h2v1z"></path></g>
<g id="https"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g>
<g id="important-devices"><path d="M23 11.01L18 11c-.55 0-1 .45-1 1v9c0 .55.45 1 1 1h5c.55 0 1-.45 1-1v-9c0-.55-.45-.99-1-.99zM23 20h-5v-7h5v7zM20 2H2C.89 2 0 2.89 0 4v12c0 1.1.89 2 2 2h7v2H7v2h8v-2h-2v-2h2v-2H2V4h18v5h2V4c0-1.11-.9-2-2-2zm-8.03 7L11 6l-.97 3H7l2.47 1.76-.94 2.91 2.47-1.8 2.47 1.8-.94-2.91L15 9h-3.03z"></path></g>
<g id="inbox"><path d="M19 3H4.99c-1.11 0-1.98.89-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.11-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10z"></path></g>
<g id="indeterminate-check-box"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"></path></g>
<g id="info"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"></path></g>
<g id="info-outline"><path d="M11 17h2v-6h-2v6zm1-15C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zM11 9h2V7h-2v2z"></path></g>
<g id="input"><path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"></path></g>
<g id="invert-colors"><path d="M17.66 7.93L12 2.27 6.34 7.93c-3.12 3.12-3.12 8.19 0 11.31C7.9 20.8 9.95 21.58 12 21.58c2.05 0 4.1-.78 5.66-2.34 3.12-3.12 3.12-8.19 0-11.31zM12 19.59c-1.6 0-3.11-.62-4.24-1.76C6.62 16.69 6 15.19 6 13.59s.62-3.11 1.76-4.24L12 5.1v14.49z"></path></g>
<g id="label"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16z"></path></g>
<g id="label-outline"><path d="M17.63 5.84C17.27 5.33 16.67 5 16 5L5 5.01C3.9 5.01 3 5.9 3 7v10c0 1.1.9 1.99 2 1.99L16 19c.67 0 1.27-.33 1.63-.84L22 12l-4.37-6.16zM16 17H5V7h11l3.55 5L16 17z"></path></g>
<g id="language"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2 0 .68.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2 0-.68.07-1.35.16-2h4.68c.09.65.16 1.32.16 2 0 .68-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2 0-.68-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"></path></g>
<g id="last-page"><path d="M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"></path></g>
<g id="launch"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g>
<g id="lightbulb-outline"><path d="M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1l-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"></path></g>
<g id="line-style"><path d="M3 16h5v-2H3v2zm6.5 0h5v-2h-5v2zm6.5 0h5v-2h-5v2zM3 20h2v-2H3v2zm4 0h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM3 12h8v-2H3v2zm10 0h8v-2h-8v2zM3 4v4h18V4H3z"></path></g>
<g id="line-weight"><path d="M3 17h18v-2H3v2zm0 3h18v-1H3v1zm0-7h18v-3H3v3zm0-9v4h18V4H3z"></path></g>
<g id="link"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"></path></g>
<g id="list"><path d="M3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm4 4h14v-2H7v2zm0 4h14v-2H7v2zM7 7v2h14V7H7z"></path></g>
<g id="lock"><path d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"></path></g>
<g id="lock-open"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6h1.9c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm0 12H6V10h12v10z"></path></g>
<g id="lock-outline"><path d="M12 17c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm6-9h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM8.9 6c0-1.71 1.39-3.1 3.1-3.1s3.1 1.39 3.1 3.1v2H8.9V6zM18 20H6V10h12v10z"></path></g>
<g id="low-priority"><path d="M14 5h8v2h-8zm0 5.5h8v2h-8zm0 5.5h8v2h-8zM2 11.5C2 15.08 4.92 18 8.5 18H9v2l3-3-3-3v2h-.5C6.02 16 4 13.98 4 11.5S6.02 7 8.5 7H12V5H8.5C4.92 5 2 7.92 2 11.5z"></path></g>
<g id="loyalty"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7zm11.77 8.27L13 19.54l-4.27-4.27C8.28 14.81 8 14.19 8 13.5c0-1.38 1.12-2.5 2.5-2.5.69 0 1.32.28 1.77.74l.73.72.73-.73c.45-.45 1.08-.73 1.77-.73 1.38 0 2.5 1.12 2.5 2.5 0 .69-.28 1.32-.73 1.77z"></path></g>
<g id="mail"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g>
<g id="markunread"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"></path></g>
<g id="markunread-mailbox"><path d="M20 6H10v6H8V4h6V0H6v6H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2z"></path></g>
<g id="menu"><path d="M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"></path></g>
<g id="more-horiz"><path d="M6 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm12 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-6 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="more-vert"><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="motorcycle"><path d="M19.44 9.03L15.41 5H11v2h3.59l2 2H5c-2.8 0-5 2.2-5 5s2.2 5 5 5c2.46 0 4.45-1.69 4.9-4h1.65l2.77-2.77c-.21.54-.32 1.14-.32 1.77 0 2.8 2.2 5 5 5s5-2.2 5-5c0-2.65-1.97-4.77-4.56-4.97zM7.82 15C7.4 16.15 6.28 17 5 17c-1.63 0-3-1.37-3-3s1.37-3 3-3c1.28 0 2.4.85 2.82 2H5v2h2.82zM19 17c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3z"></path></g>
<g id="move-to-inbox"><path d="M19 3H4.99c-1.11 0-1.98.9-1.98 2L3 19c0 1.1.88 2 1.99 2H19c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 12h-4c0 1.66-1.35 3-3 3s-3-1.34-3-3H4.99V5H19v10zm-3-5h-2V7h-4v3H8l4 4 4-4z"></path></g>
<g id="next-week"><path d="M20 7h-4V5c0-.55-.22-1.05-.59-1.41C15.05 3.22 14.55 3 14 3h-4c-1.1 0-2 .9-2 2v2H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2zM10 5h4v2h-4V5zm1 13.5l-1-1 3-3-3-3 1-1 4 4-4 4z"></path></g>
<g id="note-add"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z"></path></g>
<g id="offline-pin"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm5 16H7v-2h10v2zm-6.7-4L7 10.7l1.4-1.4 1.9 1.9 5.3-5.3L17 7.3 10.3 14z"></path></g>
<g id="opacity"><path d="M17.66 8L12 2.35 6.34 8C4.78 9.56 4 11.64 4 13.64s.78 4.11 2.34 5.67 3.61 2.35 5.66 2.35 4.1-.79 5.66-2.35S20 15.64 20 13.64 19.22 9.56 17.66 8zM6 14c.01-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 17.99 12 18 14H6z"></path></g>
<g id="open-in-browser"><path d="M19 4H5c-1.11 0-2 .9-2 2v12c0 1.1.89 2 2 2h4v-2H5V8h14v10h-4v2h4c1.1 0 2-.9 2-2V6c0-1.1-.89-2-2-2zm-7 6l-4 4h3v6h2v-6h3l-4-4z"></path></g>
<g id="open-in-new"><path d="M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"></path></g>
<g id="open-with"><path d="M10 9h4V6h3l-5-5-5 5h3v3zm-1 1H6V7l-5 5 5 5v-3h3v-4zm14 2l-5-5v3h-3v4h3v3l5-5zm-9 3h-4v3H7l5 5 5-5h-3v-3z"></path></g>
<g id="pageview"><path d="M11.5 9C10.12 9 9 10.12 9 11.5s1.12 2.5 2.5 2.5 2.5-1.12 2.5-2.5S12.88 9 11.5 9zM20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-3.21 14.21l-2.91-2.91c-.69.44-1.51.7-2.39.7C9.01 16 7 13.99 7 11.5S9.01 7 11.5 7 16 9.01 16 11.5c0 .88-.26 1.69-.7 2.39l2.91 2.9-1.42 1.42z"></path></g>
<g id="pan-tool"><path d="M23 5.5V20c0 2.2-1.8 4-4 4h-7.3c-1.08 0-2.1-.43-2.85-1.19L1 14.83s1.26-1.23 1.3-1.25c.22-.19.49-.29.79-.29.22 0 .42.06.6.16.04.01 4.31 2.46 4.31 2.46V4c0-.83.67-1.5 1.5-1.5S11 3.17 11 4v7h1V1.5c0-.83.67-1.5 1.5-1.5S15 .67 15 1.5V11h1V2.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5V11h1V5.5c0-.83.67-1.5 1.5-1.5s1.5.67 1.5 1.5z"></path></g>
<g id="payment"><path d="M20 4H4c-1.11 0-1.99.89-1.99 2L2 18c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6c0-1.11-.89-2-2-2zm0 14H4v-6h16v6zm0-10H4V6h16v2z"></path></g>
<g id="perm-camera-mic"><path d="M20 5h-3.17L15 3H9L7.17 5H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v-2.09c-2.83-.48-5-2.94-5-5.91h2c0 2.21 1.79 4 4 4s4-1.79 4-4h2c0 2.97-2.17 5.43-5 5.91V21h7c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-6 8c0 1.1-.9 2-2 2s-2-.9-2-2V9c0-1.1.9-2 2-2s2 .9 2 2v4z"></path></g>
<g id="perm-contact-calendar"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1z"></path></g>
<g id="perm-data-setting"><path d="M18.99 11.5c.34 0 .67.03 1 .07L20 0 0 20h11.56c-.04-.33-.07-.66-.07-1 0-4.14 3.36-7.5 7.5-7.5zm3.71 7.99c.02-.16.04-.32.04-.49 0-.17-.01-.33-.04-.49l1.06-.83c.09-.08.12-.21.06-.32l-1-1.73c-.06-.11-.19-.15-.31-.11l-1.24.5c-.26-.2-.54-.37-.85-.49l-.19-1.32c-.01-.12-.12-.21-.24-.21h-2c-.12 0-.23.09-.25.21l-.19 1.32c-.3.13-.59.29-.85.49l-1.24-.5c-.11-.04-.24 0-.31.11l-1 1.73c-.06.11-.04.24.06.32l1.06.83c-.02.16-.03.32-.03.49 0 .17.01.33.03.49l-1.06.83c-.09.08-.12.21-.06.32l1 1.73c.06.11.19.15.31.11l1.24-.5c.26.2.54.37.85.49l.19 1.32c.02.12.12.21.25.21h2c.12 0 .23-.09.25-.21l.19-1.32c.3-.13.59-.29.84-.49l1.25.5c.11.04.24 0 .31-.11l1-1.73c.06-.11.03-.24-.06-.32l-1.07-.83zm-3.71 1.01c-.83 0-1.5-.67-1.5-1.5s.67-1.5 1.5-1.5 1.5.67 1.5 1.5-.67 1.5-1.5 1.5z"></path></g>
<g id="perm-device-information"><path d="M13 7h-2v2h2V7zm0 4h-2v6h2v-6zm4-9.99L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"></path></g>
<g id="perm-identity"><path d="M12 5.9c1.16 0 2.1.94 2.1 2.1s-.94 2.1-2.1 2.1S9.9 9.16 9.9 8s.94-2.1 2.1-2.1m0 9c2.97 0 6.1 1.46 6.1 2.1v1.1H5.9V17c0-.64 3.13-2.1 6.1-2.1M12 4C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 9c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4z"></path></g>
<g id="perm-media"><path d="M2 6H0v5h.01L0 20c0 1.1.9 2 2 2h18v-2H2V6zm20-2h-8l-2-2H6c-1.1 0-1.99.9-1.99 2L4 16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM7 15l4.5-6 3.5 4.51 2.5-3.01L21 15H7z"></path></g>
<g id="perm-phone-msg"><path d="M20 15.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM12 3v10l3-3h6V3h-9z"></path></g>
<g id="perm-scan-wifi"><path d="M12 3C6.95 3 3.15 4.85 0 7.23L12 22 24 7.25C20.85 4.87 17.05 3 12 3zm1 13h-2v-6h2v6zm-2-8V6h2v2h-2z"></path></g>
<g id="pets"><circle cx="4.5" cy="9.5" r="2.5"></circle><circle cx="9" cy="5.5" r="2.5"></circle><circle cx="15" cy="5.5" r="2.5"></circle><circle cx="19.5" cy="9.5" r="2.5"></circle><path d="M17.34 14.86c-.87-1.02-1.6-1.89-2.48-2.91-.46-.54-1.05-1.08-1.75-1.32-.11-.04-.22-.07-.33-.09-.25-.04-.52-.04-.78-.04s-.53 0-.79.05c-.11.02-.22.05-.33.09-.7.24-1.28.78-1.75 1.32-.87 1.02-1.6 1.89-2.48 2.91-1.31 1.31-2.92 2.76-2.62 4.79.29 1.02 1.02 2.03 2.33 2.32.73.15 3.06-.44 5.54-.44h.18c2.48 0 4.81.58 5.54.44 1.31-.29 2.04-1.31 2.33-2.32.31-2.04-1.3-3.49-2.61-4.8z"></path></g>
<g id="picture-in-picture"><path d="M19 7h-8v6h8V7zm2-4H3c-1.1 0-2 .9-2 2v14c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98V5c0-1.1-.9-2-2-2zm0 16.01H3V4.98h18v14.03z"></path></g>
<g id="picture-in-picture-alt"><path d="M19 11h-8v6h8v-6zm4 8V4.98C23 3.88 22.1 3 21 3H3c-1.1 0-2 .88-2 1.98V19c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2zm-2 .02H3V4.97h18v14.05z"></path></g>
<g id="play-for-work"><path d="M11 5v5.59H7.5l4.5 4.5 4.5-4.5H13V5h-2zm-5 9c0 3.31 2.69 6 6 6s6-2.69 6-6h-2c0 2.21-1.79 4-4 4s-4-1.79-4-4H6z"></path></g>
<g id="polymer"><path d="M19 4h-4L7.11 16.63 4.5 12 9 4H5L.5 12 5 20h4l7.89-12.63L19.5 12 15 20h4l4.5-8z"></path></g>
<g id="power-settings-new"><path d="M13 3h-2v10h2V3zm4.83 2.17l-1.42 1.42C17.99 7.86 19 9.81 19 12c0 3.87-3.13 7-7 7s-7-3.13-7-7c0-2.19 1.01-4.14 2.58-5.42L6.17 5.17C4.23 6.82 3 9.26 3 12c0 4.97 4.03 9 9 9s9-4.03 9-9c0-2.74-1.23-5.18-3.17-6.83z"></path></g>
<g id="pregnant-woman"><path d="M9 4c0-1.11.89-2 2-2s2 .89 2 2-.89 2-2 2-2-.89-2-2zm7 9c-.01-1.34-.83-2.51-2-3 0-1.66-1.34-3-3-3s-3 1.34-3 3v7h2v5h3v-5h3v-4z"></path></g>
<g id="print"><path d="M19 8H5c-1.66 0-3 1.34-3 3v6h4v4h12v-4h4v-6c0-1.66-1.34-3-3-3zm-3 11H8v-5h8v5zm3-7c-.55 0-1-.45-1-1s.45-1 1-1 1 .45 1 1-.45 1-1 1zm-1-9H6v4h12V3z"></path></g>
<g id="query-builder"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g>
<g id="question-answer"><path d="M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1zm-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1z"></path></g>
<g id="radio-button-checked"><path d="M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zm0-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="radio-button-unchecked"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"></path></g>
<g id="receipt"><path d="M18 17H6v-2h12v2zm0-4H6v-2h12v2zm0-4H6V7h12v2zM3 22l1.5-1.5L6 22l1.5-1.5L9 22l1.5-1.5L12 22l1.5-1.5L15 22l1.5-1.5L18 22l1.5-1.5L21 22V2l-1.5 1.5L18 2l-1.5 1.5L15 2l-1.5 1.5L12 2l-1.5 1.5L9 2 7.5 3.5 6 2 4.5 3.5 3 2v20z"></path></g>
<g id="record-voice-over"><circle cx="9" cy="9" r="4"></circle><path d="M9 15c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4zm7.76-9.64l-1.68 1.69c.84 1.18.84 2.71 0 3.89l1.68 1.69c2.02-2.02 2.02-5.07 0-7.27zM20.07 2l-1.63 1.63c2.77 3.02 2.77 7.56 0 10.74L20.07 16c3.9-3.89 3.91-9.95 0-14z"></path></g>
<g id="redeem"><path d="M20 6h-2.18c.11-.31.18-.65.18-1 0-1.66-1.34-3-3-3-1.05 0-1.96.54-2.5 1.35l-.5.67-.5-.68C10.96 2.54 10.05 2 9 2 7.34 2 6 3.34 6 5c0 .35.07.69.18 1H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-5-2c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zM9 4c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm11 15H4v-2h16v2zm0-5H4V8h5.08L7 10.83 8.62 12 11 8.76l1-1.36 1 1.36L15.38 12 17 10.83 14.92 8H20v6z"></path></g>
<g id="redo"><path d="M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"></path></g>
<g id="refresh"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"></path></g>
<g id="remove"><path d="M19 13H5v-2h14v2z"></path></g>
<g id="remove-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11H7v-2h10v2z"></path></g>
<g id="remove-circle-outline"><path d="M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z"></path></g>
<g id="remove-shopping-cart"><path d="M22.73 22.73L2.77 2.77 2 2l-.73-.73L0 2.54l4.39 4.39 2.21 4.66-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h7.46l1.38 1.38c-.5.36-.83.95-.83 1.62 0 1.1.89 2 1.99 2 .67 0 1.26-.33 1.62-.84L21.46 24l1.27-1.27zM7.42 15c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h2.36l2 2H7.42zm8.13-2c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H6.54l9.01 9zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2z"></path></g>
<g id="reorder"><path d="M3 15h18v-2H3v2zm0 4h18v-2H3v2zm0-8h18V9H3v2zm0-6v2h18V5H3z"></path></g>
<g id="reply"><path d="M10 9V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g>
<g id="reply-all"><path d="M7 8V5l-7 7 7 7v-3l-4-4 4-4zm6 1V5l-7 7 7 7v-4.1c5 0 8.5 1.6 11 5.1-1-5-4-10-11-11z"></path></g>
<g id="report"><path d="M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM12 17.3c-.72 0-1.3-.58-1.3-1.3 0-.72.58-1.3 1.3-1.3.72 0 1.3.58 1.3 1.3 0 .72-.58 1.3-1.3 1.3zm1-4.3h-2V7h2v6z"></path></g>
<g id="report-problem"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g>
<g id="restore"><path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9zm-1 5v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"></path></g>
<g id="restore-page"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm-2 16c-2.05 0-3.81-1.24-4.58-3h1.71c.63.9 1.68 1.5 2.87 1.5 1.93 0 3.5-1.57 3.5-3.5S13.93 9.5 12 9.5c-1.35 0-2.52.78-3.1 1.9l1.6 1.6h-4V9l1.3 1.3C8.69 8.92 10.23 8 12 8c2.76 0 5 2.24 5 5s-2.24 5-5 5z"></path></g>
<g id="room"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></g>
<g id="rounded-corner"><path d="M19 19h2v2h-2v-2zm0-2h2v-2h-2v2zM3 13h2v-2H3v2zm0 4h2v-2H3v2zm0-8h2V7H3v2zm0-4h2V3H3v2zm4 0h2V3H7v2zm8 16h2v-2h-2v2zm-4 0h2v-2h-2v2zm4 0h2v-2h-2v2zm-8 0h2v-2H7v2zm-4 0h2v-2H3v2zM21 8c0-2.76-2.24-5-5-5h-5v2h5c1.65 0 3 1.35 3 3v5h2V8z"></path></g>
<g id="rowing"><path d="M8.5 14.5L4 19l1.5 1.5L9 17h2l-2.5-2.5zM15 1c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm6 20.01L18 24l-2.99-3.01V19.5l-7.1-7.09c-.31.05-.61.07-.91.07v-2.16c1.66.03 3.61-.87 4.67-2.04l1.4-1.55c.19-.21.43-.38.69-.5.29-.14.62-.23.96-.23h.03C15.99 6.01 17 7.02 17 8.26v5.75c0 .84-.35 1.61-.92 2.16l-3.58-3.58v-2.27c-.63.52-1.43 1.02-2.29 1.39L16.5 18H18l3 3.01z"></path></g>
<g id="save"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"></path></g>
<g id="schedule"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z"></path></g>
<g id="search"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"></path></g>
<g id="select-all"><path d="M3 5h2V3c-1.1 0-2 .9-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2c0-1.1-.9-2-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8c1.1 0 2-.9 2-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z"></path></g>
<g id="send"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"></path></g>
<g id="settings"><path d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"></path></g>
<g id="settings-applications"><path d="M12 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-7H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-1.75 9c0 .23-.02.46-.05.68l1.48 1.16c.13.11.17.3.08.45l-1.4 2.42c-.09.15-.27.21-.43.15l-1.74-.7c-.36.28-.76.51-1.18.69l-.26 1.85c-.03.17-.18.3-.35.3h-2.8c-.17 0-.32-.13-.35-.29l-.26-1.85c-.43-.18-.82-.41-1.18-.69l-1.74.7c-.16.06-.34 0-.43-.15l-1.4-2.42c-.09-.15-.05-.34.08-.45l1.48-1.16c-.03-.23-.05-.46-.05-.69 0-.23.02-.46.05-.68l-1.48-1.16c-.13-.11-.17-.3-.08-.45l1.4-2.42c.09-.15.27-.21.43-.15l1.74.7c.36-.28.76-.51 1.18-.69l.26-1.85c.03-.17.18-.3.35-.3h2.8c.17 0 .32.13.35.29l.26 1.85c.43.18.82.41 1.18.69l1.74-.7c.16-.06.34 0 .43.15l1.4 2.42c.09.15.05.34-.08.45l-1.48 1.16c.03.23.05.46.05.69z"></path></g>
<g id="settings-backup-restore"><path d="M14 12c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2zm-2-9c-4.97 0-9 4.03-9 9H0l4 4 4-4H5c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.51 0-2.91-.49-4.06-1.3l-1.42 1.44C8.04 20.3 9.94 21 12 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"></path></g>
<g id="settings-bluetooth"><path d="M11 24h2v-2h-2v2zm-4 0h2v-2H7v2zm8 0h2v-2h-2v2zm2.71-18.29L12 0h-1v7.59L6.41 3 5 4.41 10.59 10 5 15.59 6.41 17 11 12.41V20h1l5.71-5.71-4.3-4.29 4.3-4.29zM13 3.83l1.88 1.88L13 7.59V3.83zm1.88 10.46L13 16.17v-3.76l1.88 1.88z"></path></g>
<g id="settings-brightness"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02zM8 16h2.5l1.5 1.5 1.5-1.5H16v-2.5l1.5-1.5-1.5-1.5V8h-2.5L12 6.5 10.5 8H8v2.5L6.5 12 8 13.5V16zm4-7c1.66 0 3 1.34 3 3s-1.34 3-3 3V9z"></path></g>
<g id="settings-cell"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm4 0h2v-2h-2v2zM16 .01L8 0C6.9 0 6 .9 6 2v16c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V2c0-1.1-.9-1.99-2-1.99zM16 16H8V4h8v12z"></path></g>
<g id="settings-ethernet"><path d="M7.77 6.76L6.23 5.48.82 12l5.41 6.52 1.54-1.28L3.42 12l4.35-5.24zM7 13h2v-2H7v2zm10-2h-2v2h2v-2zm-6 2h2v-2h-2v2zm6.77-7.52l-1.54 1.28L20.58 12l-4.35 5.24 1.54 1.28L23.18 12l-5.41-6.52z"></path></g>
<g id="settings-input-antenna"><path d="M12 5c-3.87 0-7 3.13-7 7h2c0-2.76 2.24-5 5-5s5 2.24 5 5h2c0-3.87-3.13-7-7-7zm1 9.29c.88-.39 1.5-1.26 1.5-2.29 0-1.38-1.12-2.5-2.5-2.5S9.5 10.62 9.5 12c0 1.02.62 1.9 1.5 2.29v3.3L7.59 21 9 22.41l3-3 3 3L16.41 21 13 17.59v-3.3zM12 1C5.93 1 1 5.93 1 12h2c0-4.97 4.03-9 9-9s9 4.03 9 9h2c0-6.07-4.93-11-11-11z"></path></g>
<g id="settings-input-component"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g>
<g id="settings-input-composite"><path d="M5 2c0-.55-.45-1-1-1s-1 .45-1 1v4H1v6h6V6H5V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2H9v2zm-8 0c0 1.3.84 2.4 2 2.82V23h2v-4.18C6.16 18.4 7 17.3 7 16v-2H1v2zM21 6V2c0-.55-.45-1-1-1s-1 .45-1 1v4h-2v6h6V6h-2zm-8-4c0-.55-.45-1-1-1s-1 .45-1 1v4H9v6h6V6h-2V2zm4 14c0 1.3.84 2.4 2 2.82V23h2v-4.18c1.16-.41 2-1.51 2-2.82v-2h-6v2z"></path></g>
<g id="settings-input-hdmi"><path d="M18 7V4c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v3H5v6l3 6v3h8v-3l3-6V7h-1zM8 4h8v3h-2V5h-1v2h-2V5h-1v2H8V4z"></path></g>
<g id="settings-input-svideo"><path d="M8 11.5c0-.83-.67-1.5-1.5-1.5S5 10.67 5 11.5 5.67 13 6.5 13 8 12.33 8 11.5zm7-5c0-.83-.67-1.5-1.5-1.5h-3C9.67 5 9 5.67 9 6.5S9.67 8 10.5 8h3c.83 0 1.5-.67 1.5-1.5zM8.5 15c-.83 0-1.5.67-1.5 1.5S7.67 18 8.5 18s1.5-.67 1.5-1.5S9.33 15 8.5 15zM12 1C5.93 1 1 5.93 1 12s4.93 11 11 11 11-4.93 11-11S18.07 1 12 1zm0 20c-4.96 0-9-4.04-9-9s4.04-9 9-9 9 4.04 9 9-4.04 9-9 9zm5.5-11c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5zm-2 5c-.83 0-1.5.67-1.5 1.5s.67 1.5 1.5 1.5 1.5-.67 1.5-1.5-.67-1.5-1.5-1.5z"></path></g>
<g id="settings-overscan"><path d="M12.01 5.5L10 8h4l-1.99-2.5zM18 10v4l2.5-1.99L18 10zM6 10l-2.5 2.01L6 14v-4zm8 6h-4l2.01 2.5L14 16zm7-13H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z"></path></g>
<g id="settings-phone"><path d="M13 9h-2v2h2V9zm4 0h-2v2h2V9zm3 6.5c-1.25 0-2.45-.2-3.57-.57-.35-.11-.74-.03-1.02.24l-2.2 2.2c-2.83-1.44-5.15-3.75-6.59-6.58l2.2-2.21c.28-.27.36-.66.25-1.01C8.7 6.45 8.5 5.25 8.5 4c0-.55-.45-1-1-1H4c-.55 0-1 .45-1 1 0 9.39 7.61 17 17 17 .55 0 1-.45 1-1v-3.5c0-.55-.45-1-1-1zM19 9v2h2V9h-2z"></path></g>
<g id="settings-power"><path d="M7 24h2v-2H7v2zm4 0h2v-2h-2v2zm2-22h-2v10h2V2zm3.56 2.44l-1.45 1.45C16.84 6.94 18 8.83 18 11c0 3.31-2.69 6-6 6s-6-2.69-6-6c0-2.17 1.16-4.06 2.88-5.12L7.44 4.44C5.36 5.88 4 8.28 4 11c0 4.42 3.58 8 8 8s8-3.58 8-8c0-2.72-1.36-5.12-3.44-6.56zM15 24h2v-2h-2v2z"></path></g>
<g id="settings-remote"><path d="M15 9H9c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V10c0-.55-.45-1-1-1zm-3 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zM7.05 6.05l1.41 1.41C9.37 6.56 10.62 6 12 6s2.63.56 3.54 1.46l1.41-1.41C15.68 4.78 13.93 4 12 4s-3.68.78-4.95 2.05zM12 0C8.96 0 6.21 1.23 4.22 3.22l1.41 1.41C7.26 3.01 9.51 2 12 2s4.74 1.01 6.36 2.64l1.41-1.41C17.79 1.23 15.04 0 12 0z"></path></g>
<g id="settings-voice"><path d="M7 24h2v-2H7v2zm5-11c1.66 0 2.99-1.34 2.99-3L15 4c0-1.66-1.34-3-3-3S9 2.34 9 4v6c0 1.66 1.34 3 3 3zm-1 11h2v-2h-2v2zm4 0h2v-2h-2v2zm4-14h-1.7c0 3-2.54 5.1-5.3 5.1S6.7 13 6.7 10H5c0 3.41 2.72 6.23 6 6.72V20h2v-3.28c3.28-.49 6-3.31 6-6.72z"></path></g>
<g id="shop"><path d="M16 6V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H2v13c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V6h-6zm-6-2h4v2h-4V4zM9 18V9l7.5 4L9 18z"></path></g>
<g id="shop-two"><path d="M3 9H1v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2H3V9zm15-4V3c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H5v11c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5h-5zm-6-2h4v2h-4V3zm0 12V8l5.5 3-5.5 4z"></path></g>
<g id="shopping-basket"><path d="M17.21 9l-4.38-6.56c-.19-.28-.51-.42-.83-.42-.32 0-.64.14-.83.43L6.79 9H2c-.55 0-1 .45-1 1 0 .09.01.18.04.27l2.54 9.27c.23.84 1 1.46 1.92 1.46h13c.92 0 1.69-.62 1.93-1.46l2.54-9.27L23 10c0-.55-.45-1-1-1h-4.79zM9 9l3-4.4L15 9H9zm3 8c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"></path></g>
<g id="shopping-cart"><path d="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"></path></g>
<g id="sort"><path d="M3 18h6v-2H3v2zM3 6v2h18V6H3zm0 7h12v-2H3v2z"></path></g>
<g id="speaker-notes"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM8 14H6v-2h2v2zm0-3H6V9h2v2zm0-3H6V6h2v2zm7 6h-5v-2h5v2zm3-3h-8V9h8v2zm0-3h-8V6h8v2z"></path></g>
<g id="speaker-notes-off"><path d="M10.54 11l-.54-.54L7.54 8 6 6.46 2.38 2.84 1.27 1.73 0 3l2.01 2.01L2 22l4-4h9l5.73 5.73L22 22.46 17.54 18l-7-7zM8 14H6v-2h2v2zm-2-3V9l2 2H6zm14-9H4.08L10 7.92V6h8v2h-7.92l1 1H18v2h-4.92l6.99 6.99C21.14 17.95 22 17.08 22 16V4c0-1.1-.9-2-2-2z"></path></g>
<g id="spellcheck"><path d="M12.45 16h2.09L9.43 3H7.57L2.46 16h2.09l1.12-3h5.64l1.14 3zm-6.02-5L8.5 5.48 10.57 11H6.43zm15.16.59l-8.09 8.09L9.83 16l-1.41 1.41 5.09 5.09L23 13l-1.41-1.41z"></path></g>
<g id="star"><path d="M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"></path></g>
<g id="star-border"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4l-3.76 2.27 1-4.28-3.32-2.88 4.38-.38L12 6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"></path></g>
<g id="star-half"><path d="M22 9.24l-7.19-.62L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21 12 17.27 18.18 21l-1.63-7.03L22 9.24zM12 15.4V6.1l1.71 4.04 4.38.38-3.32 2.88 1 4.28L12 15.4z"></path></g>
<g id="stars"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm4.24 16L12 15.45 7.77 18l1.12-4.81-3.73-3.23 4.92-.42L12 5l1.92 4.53 4.92.42-3.73 3.23L16.23 18z"></path></g>
<g id="store"><path d="M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z"></path></g>
<g id="subdirectory-arrow-left"><path d="M11 9l1.42 1.42L8.83 14H18V4h2v12H8.83l3.59 3.58L11 21l-6-6 6-6z"></path></g>
<g id="subdirectory-arrow-right"><path d="M19 15l-6 6-1.42-1.42L15.17 16H4V4h2v10h9.17l-3.59-3.58L13 9l6 6z"></path></g>
<g id="subject"><path d="M14 17H4v2h10v-2zm6-8H4v2h16V9zM4 15h16v-2H4v2zM4 5v2h16V5H4z"></path></g>
<g id="supervisor-account"><path d="M16.5 12c1.38 0 2.49-1.12 2.49-2.5S17.88 7 16.5 7C15.12 7 14 8.12 14 9.5s1.12 2.5 2.5 2.5zM9 11c1.66 0 2.99-1.34 2.99-3S10.66 5 9 5C7.34 5 6 6.34 6 8s1.34 3 3 3zm7.5 3c-1.83 0-5.5.92-5.5 2.75V19h11v-2.25c0-1.83-3.67-2.75-5.5-2.75zM9 13c-2.33 0-7 1.17-7 3.5V19h7v-2.25c0-.85.33-2.34 2.37-3.47C10.5 13.1 9.66 13 9 13z"></path></g>
<g id="swap-horiz"><path d="M6.99 11L3 15l3.99 4v-3H14v-2H6.99v-3zM21 9l-3.99-4v3H10v2h7.01v3L21 9z"></path></g>
<g id="swap-vert"><path d="M16 17.01V10h-2v7.01h-3L15 21l4-3.99h-3zM9 3L5 6.99h3V14h2V6.99h3L9 3z"></path></g>
<g id="swap-vertical-circle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM6.5 9L10 5.5 13.5 9H11v4H9V9H6.5zm11 6L14 18.5 10.5 15H13v-4h2v4h2.5z"></path></g>
<g id="system-update-alt"><path d="M12 16.5l4-4h-3v-9h-2v9H8l4 4zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2z"></path></g>
<g id="tab"><path d="M21 3H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H3V5h10v4h8v10z"></path></g>
<g id="tab-unselected"><path d="M1 9h2V7H1v2zm0 4h2v-2H1v2zm0-8h2V3c-1.1 0-2 .9-2 2zm8 16h2v-2H9v2zm-8-4h2v-2H1v2zm2 4v-2H1c0 1.1.9 2 2 2zM21 3h-8v6h10V5c0-1.1-.9-2-2-2zm0 14h2v-2h-2v2zM9 5h2V3H9v2zM5 21h2v-2H5v2zM5 5h2V3H5v2zm16 16c1.1 0 2-.9 2-2h-2v2zm0-8h2v-2h-2v2zm-8 8h2v-2h-2v2zm4 0h2v-2h-2v2z"></path></g>
<g id="text-format"><path d="M5 17v2h14v-2H5zm4.5-4.2h5l.9 2.2h2.1L12.75 4h-1.5L6.5 15h2.1l.9-2.2zM12 5.98L13.87 11h-3.74L12 5.98z"></path></g>
<g id="theaters"><path d="M18 3v2h-2V3H8v2H6V3H4v18h2v-2h2v2h8v-2h2v2h2V3h-2zM8 17H6v-2h2v2zm0-4H6v-2h2v2zm0-4H6V7h2v2zm10 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2z"></path></g>
<g id="thumb-down"><path d="M15 3H6c-.83 0-1.54.5-1.84 1.22l-3.02 7.05c-.09.23-.14.47-.14.73v1.91l.01.01L1 14c0 1.1.9 2 2 2h6.31l-.95 4.57-.03.32c0 .41.17.79.44 1.06L9.83 23l6.59-6.59c.36-.36.58-.86.58-1.41V5c0-1.1-.9-2-2-2zm4 0v12h4V3h-4z"></path></g>
<g id="thumb-up"><path d="M1 21h4V9H1v12zm22-11c0-1.1-.9-2-2-2h-6.31l.95-4.57.03-.32c0-.41-.17-.79-.44-1.06L14.17 1 7.59 7.59C7.22 7.95 7 8.45 7 9v10c0 1.1.9 2 2 2h9c.83 0 1.54-.5 1.84-1.22l3.02-7.05c.09-.23.14-.47.14-.73v-1.91l-.01-.01L23 10z"></path></g>
<g id="thumbs-up-down"><path d="M12 6c0-.55-.45-1-1-1H5.82l.66-3.18.02-.23c0-.31-.13-.59-.33-.8L5.38 0 .44 4.94C.17 5.21 0 5.59 0 6v6.5c0 .83.67 1.5 1.5 1.5h6.75c.62 0 1.15-.38 1.38-.91l2.26-5.29c.07-.17.11-.36.11-.55V6zm10.5 4h-6.75c-.62 0-1.15.38-1.38.91l-2.26 5.29c-.07.17-.11.36-.11.55V18c0 .55.45 1 1 1h5.18l-.66 3.18-.02.24c0 .31.13.59.33.8l.79.78 4.94-4.94c.27-.27.44-.65.44-1.06v-6.5c0-.83-.67-1.5-1.5-1.5z"></path></g>
<g id="timeline"><path d="M23 8c0 1.1-.9 2-2 2-.18 0-.35-.02-.51-.07l-3.56 3.55c.05.16.07.34.07.52 0 1.1-.9 2-2 2s-2-.9-2-2c0-.18.02-.36.07-.52l-2.55-2.55c-.16.05-.34.07-.52.07s-.36-.02-.52-.07l-4.55 4.56c.05.16.07.33.07.51 0 1.1-.9 2-2 2s-2-.9-2-2 .9-2 2-2c.18 0 .35.02.51.07l4.56-4.55C8.02 9.36 8 9.18 8 9c0-1.1.9-2 2-2s2 .9 2 2c0 .18-.02.36-.07.52l2.55 2.55c.16-.05.34-.07.52-.07s.36.02.52.07l3.55-3.56C19.02 8.35 19 8.18 19 8c0-1.1.9-2 2-2s2 .9 2 2z"></path></g>
<g id="toc"><path d="M3 9h14V7H3v2zm0 4h14v-2H3v2zm0 4h14v-2H3v2zm16 0h2v-2h-2v2zm0-10v2h2V7h-2zm0 6h2v-2h-2v2z"></path></g>
<g id="today"><path d="M19 3h-1V1h-2v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V8h14v11zM7 10h5v5H7z"></path></g>
<g id="toll"><path d="M15 4c-4.42 0-8 3.58-8 8s3.58 8 8 8 8-3.58 8-8-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6s2.69-6 6-6 6 2.69 6 6-2.69 6-6 6zM3 12c0-2.61 1.67-4.83 4-5.65V4.26C3.55 5.15 1 8.27 1 12s2.55 6.85 6 7.74v-2.09c-2.33-.82-4-3.04-4-5.65z"></path></g>
<g id="touch-app"><path d="M9 11.24V7.5C9 6.12 10.12 5 11.5 5S14 6.12 14 7.5v3.74c1.21-.81 2-2.18 2-3.74C16 5.01 13.99 3 11.5 3S7 5.01 7 7.5c0 1.56.79 2.93 2 3.74zm9.84 4.63l-4.54-2.26c-.17-.07-.35-.11-.54-.11H13v-6c0-.83-.67-1.5-1.5-1.5S10 6.67 10 7.5v10.74l-3.43-.72c-.08-.01-.15-.03-.24-.03-.31 0-.59.13-.79.33l-.79.8 4.94 4.94c.27.27.65.44 1.06.44h6.79c.75 0 1.33-.55 1.44-1.28l.75-5.27c.01-.07.02-.14.02-.2 0-.62-.38-1.16-.91-1.38z"></path></g>
<g id="track-changes"><path d="M19.07 4.93l-1.41 1.41C19.1 7.79 20 9.79 20 12c0 4.42-3.58 8-8 8s-8-3.58-8-8c0-4.08 3.05-7.44 7-7.93v2.02C8.16 6.57 6 9.03 6 12c0 3.31 2.69 6 6 6s6-2.69 6-6c0-1.66-.67-3.16-1.76-4.24l-1.41 1.41C15.55 9.9 16 10.9 16 12c0 2.21-1.79 4-4 4s-4-1.79-4-4c0-1.86 1.28-3.41 3-3.86v2.14c-.6.35-1 .98-1 1.72 0 1.1.9 2 2 2s2-.9 2-2c0-.74-.4-1.38-1-1.72V2h-1C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10c0-2.76-1.12-5.26-2.93-7.07z"></path></g>
<g id="translate"><path d="M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"></path></g>
<g id="trending-down"><path d="M16 18l2.29-2.29-4.88-4.88-4 4L2 7.41 3.41 6l6 6 4-4 6.3 6.29L22 12v6z"></path></g>
<g id="trending-flat"><path d="M22 12l-4-4v3H3v2h15v3z"></path></g>
<g id="trending-up"><path d="M16 6l2.29 2.29-4.88 4.88-4-4L2 16.59 3.41 18l6-6 4 4 6.3-6.29L22 12V6z"></path></g>
<g id="turned-in"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2z"></path></g>
<g id="turned-in-not"><path d="M17 3H7c-1.1 0-1.99.9-1.99 2L5 21l7-3 7 3V5c0-1.1-.9-2-2-2zm0 15l-5-2.18L7 18V5h10v13z"></path></g>
<g id="unarchive"><path d="M20.55 5.22l-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.49-.17-.93-.45-1.28zM12 9.5l5.5 5.5H14v2h-4v-2H6.5L12 9.5zM5.12 5l.82-1h12l.93 1H5.12z"></path></g>
<g id="undo"><path d="M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"></path></g>
<g id="unfold-less"><path d="M7.41 18.59L8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"></path></g>
<g id="unfold-more"><path d="M12 5.83L15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"></path></g>
<g id="update"><path d="M21 10.12h-6.78l2.74-2.82c-2.73-2.7-7.15-2.8-9.88-.1-2.73 2.71-2.73 7.08 0 9.79 2.73 2.71 7.15 2.71 9.88 0C18.32 15.65 19 14.08 19 12.1h2c0 1.98-.88 4.55-2.64 6.29-3.51 3.48-9.21 3.48-12.72 0-3.5-3.47-3.53-9.11-.02-12.58 3.51-3.47 9.14-3.47 12.65 0L21 3v7.12zM12.5 8v4.25l3.5 2.08-.72 1.21L11 13V8h1.5z"></path></g>
<g id="verified-user"><path d="M12 1L3 5v6c0 5.55 3.84 10.74 9 12 5.16-1.26 9-6.45 9-12V5l-9-4zm-2 16l-4-4 1.41-1.41L10 14.17l6.59-6.59L18 9l-8 8z"></path></g>
<g id="view-agenda"><path d="M20 13H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1v-6c0-.55-.45-1-1-1zm0-10H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V4c0-.55-.45-1-1-1z"></path></g>
<g id="view-array"><path d="M4 18h3V5H4v13zM18 5v13h3V5h-3zM8 18h9V5H8v13z"></path></g>
<g id="view-carousel"><path d="M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"></path></g>
<g id="view-column"><path d="M10 18h5V5h-5v13zm-6 0h5V5H4v13zM16 5v13h5V5h-5z"></path></g>
<g id="view-day"><path d="M2 21h19v-3H2v3zM20 8H3c-.55 0-1 .45-1 1v6c0 .55.45 1 1 1h17c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zM2 3v3h19V3H2z"></path></g>
<g id="view-headline"><path d="M4 15h16v-2H4v2zm0 4h16v-2H4v2zm0-8h16V9H4v2zm0-6v2h16V5H4z"></path></g>
<g id="view-list"><path d="M4 14h4v-4H4v4zm0 5h4v-4H4v4zM4 9h4V5H4v4zm5 5h12v-4H9v4zm0 5h12v-4H9v4zM9 5v4h12V5H9z"></path></g>
<g id="view-module"><path d="M4 11h5V5H4v6zm0 7h5v-6H4v6zm6 0h5v-6h-5v6zm6 0h5v-6h-5v6zm-6-7h5V5h-5v6zm6-6v6h5V5h-5z"></path></g>
<g id="view-quilt"><path d="M10 18h5v-6h-5v6zm-6 0h5V5H4v13zm12 0h5v-6h-5v6zM10 5v6h11V5H10z"></path></g>
<g id="view-stream"><path d="M4 18h17v-6H4v6zM4 5v6h17V5H4z"></path></g>
<g id="view-week"><path d="M6 5H3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm14 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1zm-7 0h-3c-.55 0-1 .45-1 1v12c0 .55.45 1 1 1h3c.55 0 1-.45 1-1V6c0-.55-.45-1-1-1z"></path></g>
<g id="visibility"><path d="M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"></path></g>
<g id="visibility-off"><path d="M12 7c2.76 0 5 2.24 5 5 0 .65-.13 1.26-.36 1.83l2.92 2.92c1.51-1.26 2.7-2.89 3.43-4.75-1.73-4.39-6-7.5-11-7.5-1.4 0-2.74.25-3.98.7l2.16 2.16C10.74 7.13 11.35 7 12 7zM2 4.27l2.28 2.28.46.46C3.08 8.3 1.78 10.02 1 12c1.73 4.39 6 7.5 11 7.5 1.55 0 3.03-.3 4.38-.84l.42.42L19.73 22 21 20.73 3.27 3 2 4.27zM7.53 9.8l1.55 1.55c-.05.21-.08.43-.08.65 0 1.66 1.34 3 3 3 .22 0 .44-.03.65-.08l1.55 1.55c-.67.33-1.41.53-2.2.53-2.76 0-5-2.24-5-5 0-.79.2-1.53.53-2.2zm4.31-.78l3.15 3.15.02-.16c0-1.66-1.34-3-3-3l-.17.01z"></path></g>
<g id="warning"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"></path></g>
<g id="watch-later"><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2zm4.2 14.2L11 13V7h1.5v5.2l4.5 2.7-.8 1.3z"></path></g>
<g id="weekend"><path d="M21 10c-1.1 0-2 .9-2 2v3H5v-3c0-1.1-.9-2-2-2s-2 .9-2 2v5c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-5c0-1.1-.9-2-2-2zm-3-5H6c-1.1 0-2 .9-2 2v2.15c1.16.41 2 1.51 2 2.82V14h12v-2.03c0-1.3.84-2.4 2-2.82V7c0-1.1-.9-2-2-2z"></path></g>
<g id="work"><path d="M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2zm-6 0h-4V4h4v2z"></path></g>
<g id="youtube-searched-for"><path d="M17.01 14h-.8l-.27-.27c.98-1.14 1.57-2.61 1.57-4.23 0-3.59-2.91-6.5-6.5-6.5s-6.5 3-6.5 6.5H2l3.84 4 4.16-4H6.51C6.51 7 8.53 5 11.01 5s4.5 2.01 4.5 4.5c0 2.48-2.02 4.5-4.5 4.5-.65 0-1.26-.14-1.82-.38L7.71 15.1c.97.57 2.09.9 3.3.9 1.61 0 3.08-.59 4.22-1.57l.27.27v.79l5.01 4.99L22 19l-4.99-5z"></path></g>
<g id="zoom-in"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"></path></g>
<g id="zoom-out"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zM7 9h5v1H7z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(vbe.content);var t0t={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},xbe={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},e0t={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},bbe=/[a-z0-9*]/,wbe=/U\+/,Sbe=/^arrow/,Mbe=/^space(bar)?/,Ebe=/^escape$/;function r0t(e,t){var r="";if(e){var n=e.toLowerCase();n===" "||Mbe.test(n)?r="space":Ebe.test(n)?r="esc":n.length==1?(!t||bbe.test(n))&&(r=n):Sbe.test(n)?r=n.replace("arrow",""):n=="multiply"?r="*":r=n}return r}function Tbe(e){var t="";return e&&(e in t0t?t=t0t[e]:wbe.test(e)?(e=parseInt(e.replace("U+","0x"),16),t=String.fromCharCode(e).toLowerCase()):t=e.toLowerCase()),t}function Cbe(e){var t="";return Number(e)&&(e>=65&&e<=90?t=String.fromCharCode(32+e):e>=112&&e<=123?t="f"+(e-112+1):e>=48&&e<=57?t=String(e-48):e>=96&&e<=105?t=String(e-96):t=xbe[e]),t}function Abe(e,t){return e.key?r0t(e.key,t):e.detail&&e.detail.key?r0t(e.detail.key,t):Tbe(e.keyIdentifier)||Cbe(e.keyCode)||""}function n0t(e,t){var r=Abe(t,e.hasModifiers);return r===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function Pbe(e){return e.length===1?{combo:e,key:e,event:"keydown"}:e.split("+").reduce(function(t,r){var n=r.split(":"),i=n[0],o=n[1];return i in e0t?(t[e0t[i]]=!0,t.hasModifiers=!0):(t.key=i,t.event=o||"keydown"),t},{combo:e.split(":").shift()})}function i0t(e){return e.trim().split(" ").map(function(t){return Pbe(t)})}var Oo={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var r=i0t(t),n=0;n<r.length;++n)if(n0t(r[n],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map(function(t){return t.keyBindings});return e.indexOf(this.keyBindings)===-1&&e.push(this.keyBindings),e},_prepKeyBindings:function(){this._keyBindings={},this._collectKeyBindings().forEach(function(r){for(var n in r)this._addKeyBinding(n,r[n])},this);for(var e in this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort(function(r,n){var i=r[0].hasModifiers,o=n[0].hasModifiers;return i===o?0:i?-1:1})},_addKeyBinding:function(e,t){i0t(e).forEach(function(r){this._keyBindings[r.event]=this._keyBindings[r.event]||[],this._keyBindings[r.event].push([r,t])},this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){!this.keyEventTarget||Object.keys(this._keyBindings).forEach(function(e){var t=this._keyBindings[e],r=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,r]),this.keyEventTarget.addEventListener(e,r)},this)},_unlistenKeyEventListeners:function(){for(var e,t,r,n;this._boundKeyHandlers.length;)e=this._boundKeyHandlers.pop(),t=e[0],r=e[1],n=e[2],t.removeEventListener(r,n)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var r=0;r<e.length;r++){var n=e[r][0],i=e[r][1];if(n0t(n,t)&&(this._triggerKeyHandler(n,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,r){var n=Object.create(e);n.keyboardEvent=r;var i=new CustomEvent(e.event,{detail:n,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&r.preventDefault()}};var v9={properties:{scrollTarget:{type:HTMLElement,value:function(){return this._defaultScrollTarget}}},observers:["_scrollTargetChanged(scrollTarget, isAttached)"],_shouldHaveListener:!0,_scrollTargetChanged:function(e,t){var r;if(this._oldScrollTarget&&(this._toggleScrollListener(!1,this._oldScrollTarget),this._oldScrollTarget=null),!!t)if(e==="document")this.scrollTarget=this._doc;else if(typeof e=="string"){var n=this.domHost;this.scrollTarget=n&&n.$?n.$[e]:zt(this.ownerDocument).querySelector("#"+e)}else this._isValidScrollTarget()&&(this._oldScrollTarget=e,this._toggleScrollListener(this._shouldHaveListener,e))},_scrollHandler:function(){},get _defaultScrollTarget(){return this._doc},get _doc(){return this.ownerDocument.documentElement},get _scrollTop(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageYOffset:this.scrollTarget.scrollTop:0},get _scrollLeft(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.pageXOffset:this.scrollTarget.scrollLeft:0},set _scrollTop(e){this.scrollTarget===this._doc?window.scrollTo(window.pageXOffset,e):this._isValidScrollTarget()&&(this.scrollTarget.scrollTop=e)},set _scrollLeft(e){this.scrollTarget===this._doc?window.scrollTo(e,window.pageYOffset):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=e)},scroll:function(e,t){var r;typeof e=="object"?(r=e.left,t=e.top):r=e,r=r||0,t=t||0,this.scrollTarget===this._doc?window.scrollTo(r,t):this._isValidScrollTarget()&&(this.scrollTarget.scrollLeft=r,this.scrollTarget.scrollTop=t)},get _scrollTargetWidth(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerWidth:this.scrollTarget.offsetWidth:0},get _scrollTargetHeight(){return this._isValidScrollTarget()?this.scrollTarget===this._doc?window.innerHeight:this.scrollTarget.offsetHeight:0},_isValidScrollTarget:function(){return this.scrollTarget instanceof HTMLElement},_toggleScrollListener:function(e,t){var r=t===this._doc?window:t;e?this._boundScrollHandler||(this._boundScrollHandler=this._scrollHandler.bind(this),r.addEventListener("scroll",this._boundScrollHandler)):this._boundScrollHandler&&(r.removeEventListener("scroll",this._boundScrollHandler),this._boundScrollHandler=null)},toggleScrollListener:function(e){this._shouldHaveListener=e,this._toggleScrollListener(e,this.scrollTarget)}};var o0t=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),Ibe=o0t&&o0t[1]>=8,a0t=3,s0t="-10000px",fE=-100;Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      @media only screen and (-webkit-max-device-pixel-ratio: 1) {
        :host {
          will-change: transform;
        }
      }

      #items {
        @apply --iron-list-items-container;
        position: relative;
      }

      :host(:not([grid])) #items > ::slotted(*) {
        width: 100%;
      }

      #items > ::slotted(*) {
        box-sizing: border-box;
        margin: 0;
        position: absolute;
        top: 0;
        will-change: transform;
      }
    </style>

    <array-selector id="selector" items="{{items}}" selected="{{selectedItems}}" selected-item="{{selectedItem}}"></array-selector>

    <div id="items">
      <slot></slot>
    </div>
`,is:"iron-list",properties:{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},selectedAs:{type:String,value:"selected"},grid:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_gridChanged"},selectionEnabled:{type:Boolean,value:!1},selectedItem:{type:Object,notify:!0},selectedItems:{type:Object,notify:!0},multiSelection:{type:Boolean,value:!1},scrollOffset:{type:Number,value:0}},observers:["_itemsChanged(items.*)","_selectionEnabledChanged(selectionEnabled)","_multiSelectionChanged(multiSelection)","_setOverflow(scrollTarget, scrollOffset)"],behaviors:[Wgt,Js,v9,Kgt],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedItem:null,_focusedVirtualIndex:-1,_focusedPhysicalIndex:-1,_offscreenFocusedItem:null,_focusBackfillItem:null,_itemsPerRow:1,_itemWidth:0,_rowHeight:0,_templateCost:0,_parentModel:!0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){var e=this.grid?this._physicalRows*this._rowHeight:this._physicalSize;return e-this._viewportHeight},get _itemsParent(){return zt(zt(this._userTemplate).parentNode)},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){var e=this._convertIndexToCompleteRow(this._virtualCount);return Math.max(0,e-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this.grid&&(e=e-e%this._itemsPerRow),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){e=e%this._physicalCount,e<0&&(e=this._physicalCount+e),this.grid&&(e=e-e%this._itemsPerRow),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){var e=this._firstVisibleIndexVal;if(e==null){var t=this._physicalTop+this._scrollOffset;e=this._iterateItems(function(r,n){if(t+=this._getPhysicalSizeIncrement(r),t>this._scrollPosition)return this.grid?n-n%this._itemsPerRow:n;if(this.grid&&this._virtualCount-1===n)return n-n%this._itemsPerRow})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){var e=this._lastVisibleIndexVal;if(e==null){if(this.grid)e=Math.min(this._virtualCount,this.firstVisibleIndex+this._estRowsInView*this._itemsPerRow-1);else{var t=this._physicalTop+this._scrollOffset;this._iterateItems(function(r,n){t<this._scrollBottom&&(e=n),t+=this._getPhysicalSizeIncrement(r)})}this._lastVisibleIndexVal=e}return e},get _defaultScrollTarget(){return this},get _virtualRowCount(){return Math.ceil(this._virtualCount/this._itemsPerRow)},get _estRowsInView(){return Math.ceil(this._viewportHeight/this._rowHeight)},get _physicalRows(){return Math.ceil(this._physicalCount/this._itemsPerRow)},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},ready:function(){this.addEventListener("focus",this._didFocus.bind(this),!0)},attached:function(){this._debounce("_render",this._render,Ni),this.listen(this,"iron-resize","_resizeHandler"),this.listen(this,"keydown","_keydownHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler"),this.unlisten(this,"keydown","_keydownHandler")},_setOverflow:function(e){this.style.webkitOverflowScrolling=e===this?"touch":"",this.style.overflowY=e===this?"auto":"",this._lastVisibleIndexVal=null,this._firstVisibleIndexVal=null,this._debounce("_render",this._render,Ni)},updateViewportBoundaries:function(){var e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean(e.direction==="rtl"),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight,this.grid&&this._updateGridMetrics()},_scrollHandler:function(){var e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,r=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t=t-this._scrollOffset;var n=Math.round(t/this._physicalAverage)*this._itemsPerRow;this._virtualStart=this._virtualStart+n,this._physicalStart=this._physicalStart+n,this._physicalTop=Math.min(Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){var i=this._getReusables(r);r?(this._physicalTop=i.physicalTop,this._virtualStart=this._virtualStart+i.indexes.length,this._physicalStart=this._physicalStart+i.indexes.length):(this._virtualStart=this._virtualStart-i.indexes.length,this._physicalStart=this._physicalStart-i.indexes.length),this._update(i.indexes,r?null:i.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),li)}},_getReusables:function(e){var t,r,n,i,o=[],a=this._hiddenContentSize*this._ratio,s=this._virtualStart,l=this._virtualEnd,c=this._physicalCount,u=this._physicalTop+this._scrollOffset,h=this._physicalBottom+this._scrollOffset,f=this._scrollPosition,p=this._scrollBottom;for(e?(t=this._physicalStart,r=this._physicalEnd,n=f-u):(t=this._physicalEnd,r=this._physicalStart,n=h-p);i=this._getPhysicalSizeIncrement(t),n=n-i,!(o.length>=c||n<=a);)if(e){if(l+o.length+1>=this._virtualCount||u+i>=f-this._scrollOffset)break;o.push(t),u=u+i,t=(t+1)%c}else{if(s-o.length<=0||u+this._physicalSize-i<=p)break;o.push(t),u=u-i,t=t===0?c-1:t-1}return{indexes:o,physicalTop:u-this._scrollOffset}},_update:function(e,t){if(!(e&&e.length===0||this._physicalCount===0)){if(this._manageFocus(),this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){var r=t.pop();this._physicalTop-=this._getPhysicalSizeIncrement(r)}this._positionItems(),this._updateScrollerSize()}},_createPool:function(e){this._ensureTemplatized();var t,r,n=new Array(e);for(t=0;t<e;t++)r=this.stamp(null),n[t]=r.root.querySelector("*"),this._itemsParent.appendChild(r.root);return n},_isClientFull:function(){return this._scrollBottom!=0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){var t=this._clamp(this._physicalCount+e,a0t,this._virtualCount-this._virtualStart);if(t=this._convertIndexToCompleteRow(t),this.grid){var r=t%this._itemsPerRow;r&&t-r<=this._physicalCount&&(t+=this._itemsPerRow),t-=r}var n=t-this._physicalCount,i=Math.round(this._physicalCount*.5);if(!(n<0)){if(n>0){var o=window.performance.now();[].push.apply(this._physicalItems,this._createPool(n));for(var a=0;a<n;a++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+n,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+n),this._update(),this._templateCost=(window.performance.now()-o)/n,i=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||i===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),kx):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),li))}},_render:function(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){var e=this._getReusables(!0);this._physicalTop=e.physicalTop,this._virtualStart=this._virtualStart+e.indexes.length,this._physicalStart=this._physicalStart+e.indexes.length,this._update(e.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(a0t))},_ensureTemplatized:function(){if(!this.ctor){this._userTemplate=this.queryEffectiveChildren("template"),this._userTemplate||console.warn("iron-list requires a template to be provided in light-dom");var e={};e.__key__=!0,e[this.as]=!0,e[this.indexAs]=!0,e[this.selectedAs]=!0,e.tabIndex=!0,this._instanceProps=e,this.templatize(this._userTemplate,this.mutableData)}},_gridChanged:function(e,t){typeof t!="undefined"&&(this.notifyResize(),ci(),e&&this._updateGridMetrics())},_itemsChanged:function(e){if(e.path==="items")this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._removeFocusedItem(),this._debounce("_render",this._render,Ni);else if(e.path==="items.splices"){this._adjustVirtualIndex(e.value.indexSplices),this._virtualCount=this.items?this.items.length:0;var t=e.value.indexSplices.some(function(i){return i.addedCount>0||i.removed.length>0});if(t){var r=this._getActiveElement();this.contains(r)&&r.blur()}var n=e.value.indexSplices.some(function(i){return i.index+i.addedCount>=this._virtualStart&&i.index<=this._virtualEnd},this);(!this._isClientFull()||n)&&this._debounce("_render",this._render,Ni)}else e.path!=="items.length"&&this._forwardItemPath(e.path,e.value)},_forwardItemPath:function(e,t){e=e.slice(6);var r=e.indexOf(".");r===-1&&(r=e.length);var n,i,o,a=this.modelForElement(this._offscreenFocusedItem),s=parseInt(e.substring(0,r),10);n=this._isIndexRendered(s),n?(i=this._getPhysicalIndex(s),o=this.modelForElement(this._physicalItems[i])):a&&(o=a),!(!o||o[this.indexAs]!==s)&&(e=e.substring(r+1),e=this.as+(e?"."+e:""),o._setPendingPropertyOrPath(e,t,!1,!0),o._flushProperties&&o._flushProperties(),n&&(this._updateMetrics([i]),this._positionItems(),this._updateScrollerSize()))},_adjustVirtualIndex:function(e){e.forEach(function(t){if(t.removed.forEach(this._removeItem,this),t.index<this._virtualStart){var r=Math.max(t.addedCount-t.removed.length,t.index-this._virtualStart);this._virtualStart=this._virtualStart+r,this._focusedVirtualIndex>=0&&(this._focusedVirtualIndex=this._focusedVirtualIndex+r)}},this)},_removeItem:function(e){this.$.selector.deselect(e),this._focusedItem&&this.modelForElement(this._focusedItem)[this.as]===e&&this._removeFocusedItem()},_iterateItems:function(e,t){var r,n,i,o;if(arguments.length===2&&t){for(o=0;o<t.length;o++)if(r=t[o],n=this._computeVidx(r),(i=e.call(this,r,n))!=null)return i}else{for(r=this._physicalStart,n=this._virtualStart;r<this._physicalCount;r++,n++)if((i=e.call(this,r,n))!=null)return i;for(r=0;r<this._physicalStart;r++,n++)if((i=e.call(this,r,n))!=null)return i}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_assignModels:function(e){this._iterateItems(function(t,r){var n=this._physicalItems[t],i=this.items&&this.items[r];if(i!=null){var o=this.modelForElement(n);o.__key__=null,this._forwardProperty(o,this.as,i),this._forwardProperty(o,this.selectedAs,this.$.selector.isSelected(i)),this._forwardProperty(o,this.indexAs,r),this._forwardProperty(o,"tabIndex",this._focusedVirtualIndex===r?0:-1),this._physicalIndexForKey[o.__key__]=t,o._flushProperties&&o._flushProperties(!0),n.removeAttribute("hidden")}else n.setAttribute("hidden","")},e)},_updateMetrics:function(e){ci();var t=0,r=0,n=this._physicalAverageCount,i=this._physicalAverage;this._iterateItems(function(o,a){r+=this._physicalSizes[o],this._physicalSizes[o]=this._physicalItems[o].offsetHeight,t+=this._physicalSizes[o],this._physicalAverageCount+=this._physicalSizes[o]?1:0},e),this.grid?(this._updateGridMetrics(),this._physicalSize=Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight):(r=this._itemsPerRow===1?r:Math.ceil(this._physicalCount/this._itemsPerRow)*this._rowHeight,this._physicalSize=this._physicalSize+t-r,this._itemsPerRow=1),this._physicalAverageCount!==n&&(this._physicalAverage=Math.round((i*n+t)/this._physicalAverageCount))},_updateGridMetrics:function(){this._itemWidth=this._physicalCount>0?this._physicalItems[0].getBoundingClientRect().width:200,this._rowHeight=this._physicalCount>0?this._physicalItems[0].offsetHeight:200,this._itemsPerRow=this._itemWidth?Math.floor(this._viewportWidth/this._itemWidth):this._itemsPerRow},_positionItems:function(){this._adjustScrollPosition();var e=this._physicalTop;if(this.grid){var t=this._itemsPerRow*this._itemWidth,r=(this._viewportWidth-t)/2;this._iterateItems(function(n,i){var o=i%this._itemsPerRow,a=Math.floor(o*this._itemWidth+r);this._isRTL&&(a=a*-1),this.translate3d(a+"px",e+"px",0,this._physicalItems[n]),this._shouldRenderNextRow(i)&&(e+=this._rowHeight)})}else{let n=[];this._iterateItems(function(i,o){let a=this._physicalItems[i];this.translate3d(0,e+"px",0,a),e+=this._physicalSizes[i];let s=a.id;s&&n.push(s)}),n.length&&this.setAttribute("aria-owns",n.join(" "))}},_getPhysicalSizeIncrement:function(e){return this.grid?this._computeVidx(e)%this._itemsPerRow!==this._itemsPerRow-1?0:this._rowHeight:this._physicalSizes[e]},_shouldRenderNextRow:function(e){return e%this._itemsPerRow===this._itemsPerRow-1},_adjustScrollPosition:function(){var e=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(e!==0){this._physicalTop=this._physicalTop-e;var t=this._scrollPosition;!Ibe&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this.grid?this._estScrollHeight=this._virtualRowCount*this._rowHeight:this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,e=e||this._scrollHeight===0,e=e||this._scrollPosition>=this._estScrollHeight-this._physicalSize,e=e||this.grid&&this.$.items.style.height<this._estScrollHeight,(e||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToItem:function(e){return this.scrollToIndex(this.items.indexOf(e))},scrollToIndex:function(e){if(!(typeof e!="number"||e<0||e>this.items.length-1)&&(ci(),this._physicalCount!==0)){e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=this.grid?e-this._itemsPerRow*2:e-1),this._manageFocus(),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart/this._itemsPerRow)*this._physicalAverage;for(var t=this._physicalStart,r=this._virtualStart,n=0,i=this._hiddenContentSize;r<e&&n<=i;)n=n+this._getPhysicalSizeIncrement(t),t=(t+1)%this._physicalCount,r++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+n),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null}},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Ni)},selectItem:function(e){return this.selectIndex(this.items.indexOf(e))},selectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(!this.multiSelection&&this.selectedItem&&this.clearSelection(),this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t&&(t[this.selectedAs]=!0),this.updateSizeForIndex(e)}this.$.selector.selectIndex(e)}},deselectItem:function(e){return this.deselectIndex(this.items.indexOf(e))},deselectIndex:function(e){if(!(e<0||e>=this._virtualCount)){if(this._isIndexRendered(e)){var t=this.modelForElement(this._physicalItems[this._getPhysicalIndex(e)]);t[this.selectedAs]=!1,this.updateSizeForIndex(e)}this.$.selector.deselectIndex(e)}},toggleSelectionForItem:function(e){return this.toggleSelectionForIndex(this.items.indexOf(e))},toggleSelectionForIndex:function(e){var t=this.$.selector.isIndexSelected?this.$.selector.isIndexSelected(e):this.$.selector.isSelected(this.items[e]);t?this.deselectIndex(e):this.selectIndex(e)},clearSelection:function(){this._iterateItems(function(e,t){this.modelForElement(this._physicalItems[e])[this.selectedAs]=!1}),this.$.selector.clearSelection()},_selectionEnabledChanged:function(e){var t=e?this.listen:this.unlisten;t.call(this,this,"tap","_selectionHandler")},_selectionHandler:function(e){var t=this.modelForElement(e.target);if(!!t){var r,n,i=zt(e).path[0],o=this._getActiveElement(),a=this._physicalItems[this._getPhysicalIndex(t[this.indexAs])];i.localName==="input"||i.localName==="button"||i.localName==="select"||(r=t.tabIndex,t.tabIndex=fE,n=o?o.tabIndex:-1,t.tabIndex=r,!(o&&a!==o&&a.contains(o)&&n!==fE)&&this.toggleSelectionForItem(t[this.as]))}},_multiSelectionChanged:function(e){this.clearSelection(),this.$.selector.multi=e},updateSizeForItem:function(e){return this.updateSizeForIndex(this.items.indexOf(e))},updateSizeForIndex:function(e){return this._isIndexRendered(e)&&(this._updateMetrics([this._getPhysicalIndex(e)]),this._positionItems()),null},_manageFocus:function(){var e=this._focusedVirtualIndex;e>=0&&e<this._virtualCount?this._isIndexRendered(e)?this._restoreFocusedItem():this._createFocusBackfillItem():this._virtualCount>0&&this._physicalCount>0&&(this._focusedPhysicalIndex=this._physicalStart,this._focusedVirtualIndex=this._virtualStart,this._focusedItem=this._physicalItems[this._physicalStart])},_convertIndexToCompleteRow:function(e){return this._itemsPerRow=this._itemsPerRow||1,this.grid?Math.ceil(e/this._itemsPerRow)*this._itemsPerRow:e},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_isIndexVisible:function(e){return e>=this.firstVisibleIndex&&e<=this.lastVisibleIndex},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},focusItem:function(e){this._focusPhysicalItem(e)},_focusPhysicalItem:function(e){if(!(e<0||e>=this._virtualCount)){this._restoreFocusedItem(),this._isIndexRendered(e)||this.scrollToIndex(e);var t=this._physicalItems[this._getPhysicalIndex(e)],r=this.modelForElement(t),n;r.tabIndex=fE,t.tabIndex===fE&&(n=t),n||(n=zt(t).querySelector('[tabindex="'+fE+'"]')),r.tabIndex=0,this._focusedVirtualIndex=e,n&&n.focus()}},_removeFocusedItem:function(){this._offscreenFocusedItem&&this._itemsParent.removeChild(this._offscreenFocusedItem),this._offscreenFocusedItem=null,this._focusBackfillItem=null,this._focusedItem=null,this._focusedVirtualIndex=-1,this._focusedPhysicalIndex=-1},_createFocusBackfillItem:function(){var e=this._focusedPhysicalIndex;if(!(this._offscreenFocusedItem||this._focusedVirtualIndex<0)){if(!this._focusBackfillItem){var t=this.stamp(null);this._focusBackfillItem=t.root.querySelector("*"),this._itemsParent.appendChild(t.root)}this._offscreenFocusedItem=this._physicalItems[e],this.modelForElement(this._offscreenFocusedItem).tabIndex=0,this._physicalItems[e]=this._focusBackfillItem,this._focusedPhysicalIndex=e,this.translate3d(0,s0t,0,this._offscreenFocusedItem)}},_restoreFocusedItem:function(){if(!(!this._offscreenFocusedItem||this._focusedVirtualIndex<0)){this._assignModels();var e=this._focusedPhysicalIndex=this._getPhysicalIndex(this._focusedVirtualIndex),t=this._physicalItems[e];if(!!t){var r=this.modelForElement(t),n=this.modelForElement(this._offscreenFocusedItem);r[this.as]===n[this.as]?(this._focusBackfillItem=t,r.tabIndex=-1,this._physicalItems[e]=this._offscreenFocusedItem,this.translate3d(0,s0t,0,this._focusBackfillItem)):(this._removeFocusedItem(),this._focusBackfillItem=null),this._offscreenFocusedItem=null}}},_didFocus:function(e){var t=this.modelForElement(e.target),r=this.modelForElement(this._focusedItem),n=this._offscreenFocusedItem!==null,i=this._focusedVirtualIndex;!t||(r===t?this._isIndexVisible(i)||this.scrollToIndex(i):(this._restoreFocusedItem(),r&&(r.tabIndex=-1),t.tabIndex=0,i=t[this.indexAs],this._focusedVirtualIndex=i,this._focusedPhysicalIndex=this._getPhysicalIndex(i),this._focusedItem=this._physicalItems[this._focusedPhysicalIndex],n&&!this._offscreenFocusedItem&&this._update()))},_keydownHandler:function(e){switch(e.keyCode){case 40:this._focusedVirtualIndex<this._virtualCount-1&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex+(this.grid?this._itemsPerRow:1));break;case 39:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?-1:1));break;case 38:this._focusedVirtualIndex>0&&e.preventDefault(),this._focusPhysicalItem(this._focusedVirtualIndex-(this.grid?this._itemsPerRow:1));break;case 37:this.grid&&this._focusPhysicalItem(this._focusedVirtualIndex+(this._isRTL?1:-1));break;case 13:this._focusPhysicalItem(this._focusedVirtualIndex),this.selectionEnabled&&this._selectionHandler(e);break}},_clamp:function(e,t,r){return Math.min(r,Math.max(t,e))},_debounce:function(e,t,r){this._debouncers=this._debouncers||{},this._debouncers[e]=sr.debounce(this._debouncers[e],r,t.bind(this)),Jl(this._debouncers[e])},_forwardProperty:function(e,t,r){e._setPendingProperty(t,r)},_forwardHostPropV2:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&this.modelForElement(r).forwardHostProp(e,t)},this)},_notifyInstancePropV2:function(e,t,r){if(OI(this.as,t)){var n=e[this.indexAs];t==this.as&&(this.items[n]=r),this.notifyPath(dp(this.as,"items."+n,t),r)}},_getStampedChildren:function(){return this._physicalItems},_forwardInstancePath:function(e,t,r){t.indexOf(this.as+".")===0&&this.notifyPath("items."+e.__key__+"."+t.slice(this.as.length+1),r)},_forwardParentPath:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&this.modelForElement(r).notifyPath(e,t)},this)},_forwardParentProp:function(e,t){(this._physicalItems||[]).concat([this._offscreenFocusedItem,this._focusBackfillItem]).forEach(function(r){r&&(this.modelForElement(r)[e]=t)},this)},_getActiveElement:function(){var e=this._itemsParent.node.domHost;return zt(e?e.root:document).activeElement}});var x9=class{constructor(t){this.selection=[],this.selectCallback=t}get(){return this.multi?this.selection.slice():this.selection[0]}clear(t){this.selection.slice().forEach(function(r){(!t||t.indexOf(r)<0)&&this.setItemSelected(r,!1)},this)}isSelected(t){return this.selection.indexOf(t)>=0}setItemSelected(t,r){if(t!=null&&r!==this.isSelected(t)){if(r)this.selection.push(t);else{var n=this.selection.indexOf(t);n>=0&&this.selection.splice(n,1)}this.selectCallback&&this.selectCallback(t,r)}}select(t){this.multi?this.toggle(t):this.get()!==t&&(this.setItemSelected(this.get(),!1),this.setItemSelected(t,!0))}toggle(t){this.setItemSelected(t,!this.isSelected(t))}};var wh={properties:{attrForSelected:{type:String,value:null},selected:{type:String,notify:!0},selectedItem:{type:Object,readOnly:!0,notify:!0},activateEvent:{type:String,value:"tap",observer:"_activateEventChanged"},selectable:String,selectedClass:{type:String,value:"iron-selected"},selectedAttribute:{type:String,value:null},fallbackSelection:{type:String,value:null},items:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}},_excludedLocalNames:{type:Object,value:function(){return{template:1,"dom-bind":1,"dom-if":1,"dom-repeat":1}}}},observers:["_updateAttrForSelected(attrForSelected)","_updateSelected(selected)","_checkFallback(fallbackSelection)"],created:function(){this._bindFilterItem=this._filterItem.bind(this),this._selection=new x9(this._applySelection.bind(this))},attached:function(){this._observer=this._observeItems(this),this._addListener(this.activateEvent)},detached:function(){this._observer&&zt(this).unobserveNodes(this._observer),this._removeListener(this.activateEvent)},indexOf:function(e){return this.items?this.items.indexOf(e):-1},select:function(e){this.selected=e},selectPrevious:function(){var e=this.items.length,t=e-1;this.selected!==void 0&&(t=(Number(this._valueToIndex(this.selected))-1+e)%e),this.selected=this._indexToValue(t)},selectNext:function(){var e=0;this.selected!==void 0&&(e=(Number(this._valueToIndex(this.selected))+1)%this.items.length),this.selected=this._indexToValue(e)},selectIndex:function(e){this.select(this._indexToValue(e))},forceSynchronousItemUpdate:function(){this._observer&&typeof this._observer.flush=="function"?this._observer.flush():this._updateItems()},get _shouldUpdateSelection(){return this.selected!=null},_checkFallback:function(){this._updateSelected()},_addListener:function(e){this.listen(this,e,"_activateHandler")},_removeListener:function(e){this.unlisten(this,e,"_activateHandler")},_activateEventChanged:function(e,t){this._removeListener(t),this._addListener(e)},_updateItems:function(){var e=zt(this).queryDistributedElements(this.selectable||"*");e=Array.prototype.filter.call(e,this._bindFilterItem),this._setItems(e)},_updateAttrForSelected:function(){this.selectedItem&&(this.selected=this._valueForItem(this.selectedItem))},_updateSelected:function(){this._selectSelected(this.selected)},_selectSelected:function(e){if(!!this.items){var t=this._valueToItem(this.selected);t?this._selection.select(t):this._selection.clear(),this.fallbackSelection&&this.items.length&&this._selection.get()===void 0&&(this.selected=this.fallbackSelection)}},_filterItem:function(e){return!this._excludedLocalNames[e.localName]},_valueToItem:function(e){return e==null?null:this.items[this._valueToIndex(e)]},_valueToIndex:function(e){if(this.attrForSelected){for(var t=0,r;r=this.items[t];t++)if(this._valueForItem(r)==e)return t}else return Number(e)},_indexToValue:function(e){if(this.attrForSelected){var t=this.items[e];if(t)return this._valueForItem(t)}else return e},_valueForItem:function(e){if(!e)return null;if(!this.attrForSelected){var t=this.indexOf(e);return t===-1?null:t}var r=e[wm(this.attrForSelected)];return r!=null?r:e.getAttribute(this.attrForSelected)},_applySelection:function(e,t){this.selectedClass&&this.toggleClass(this.selectedClass,t,e),this.selectedAttribute&&this.toggleAttribute(this.selectedAttribute,t,e),this._selectionChange(),this.fire("iron-"+(t?"select":"deselect"),{item:e})},_selectionChange:function(){this._setSelectedItem(this._selection.get())},_observeItems:function(e){return zt(e).observeNodes(function(t){this._updateItems(),this._updateSelected(),this.fire("iron-items-changed",t,{bubbles:!1,cancelable:!1})})},_activateHandler:function(e){for(var t=e.target,r=this.items;t&&t!=this;){var n=r.indexOf(t);if(n>=0){var i=this._indexToValue(n);this._itemActivate(i,t);return}t=t.parentNode}},_itemActivate:function(e,t){this.fire("iron-activate",{selected:e,item:t},{cancelable:!0}).defaultPrevented||this.select(e)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      :host > ::slotted(:not(slot):not(.iron-selected)) {
        display: none !important;
      }
    </style>

    <slot></slot>
`,is:"iron-pages",behaviors:[Js,wh],properties:{activateEvent:{type:String,value:null}},observers:["_selectedPageChanged(selected)"],_selectedPageChanged:function(e,t){this.async(this.notifyResize)}});var l0t=Q`
<custom-style>
  <style is="custom-style">
    html {

      --shadow-transition: {
        transition: box-shadow 0.28s cubic-bezier(0.4, 0, 0.2, 1);
      };

      --shadow-none: {
        box-shadow: none;
      };

      /* from http://codepen.io/shyndman/pen/c5394ddf2e8b2a5c9185904b57421cdb */

      --shadow-elevation-2dp: {
        box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
                    0 1px 5px 0 rgba(0, 0, 0, 0.12),
                    0 3px 1px -2px rgba(0, 0, 0, 0.2);
      };

      --shadow-elevation-3dp: {
        box-shadow: 0 3px 4px 0 rgba(0, 0, 0, 0.14),
                    0 1px 8px 0 rgba(0, 0, 0, 0.12),
                    0 3px 3px -2px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-4dp: {
        box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14),
                    0 1px 10px 0 rgba(0, 0, 0, 0.12),
                    0 2px 4px -1px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-6dp: {
        box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14),
                    0 1px 18px 0 rgba(0, 0, 0, 0.12),
                    0 3px 5px -1px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-8dp: {
        box-shadow: 0 8px 10px 1px rgba(0, 0, 0, 0.14),
                    0 3px 14px 2px rgba(0, 0, 0, 0.12),
                    0 5px 5px -3px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-12dp: {
        box-shadow: 0 12px 16px 1px rgba(0, 0, 0, 0.14),
                    0 4px 22px 3px rgba(0, 0, 0, 0.12),
                    0 6px 7px -4px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-16dp: {
        box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
                    0  6px 30px 5px rgba(0, 0, 0, 0.12),
                    0  8px 10px -5px rgba(0, 0, 0, 0.4);
      };

      --shadow-elevation-24dp: {
        box-shadow: 0 24px 38px 3px rgba(0, 0, 0, 0.14),
                    0 9px 46px 8px rgba(0, 0, 0, 0.12),
                    0 11px 15px -7px rgba(0, 0, 0, 0.4);
      };
    }
  </style>
</custom-style>`;l0t.setAttribute("style","display: none;");document.head.appendChild(l0t.content);var c0t=Q`
<dom-module id="paper-material-styles">
  <template>
    <style>
      html {
        --paper-material: {
          display: block;
          position: relative;
        };
        --paper-material-elevation-1: {
          @apply --shadow-elevation-2dp;
        };
        --paper-material-elevation-2: {
          @apply --shadow-elevation-4dp;
        };
        --paper-material-elevation-3: {
          @apply --shadow-elevation-6dp;
        };
        --paper-material-elevation-4: {
          @apply --shadow-elevation-8dp;
        };
        --paper-material-elevation-5: {
          @apply --shadow-elevation-16dp;
        };
      }
      .paper-material {
        @apply --paper-material;
      }
      .paper-material[elevation="1"] {
        @apply --paper-material-elevation-1;
      }
      .paper-material[elevation="2"] {
        @apply --paper-material-elevation-2;
      }
      .paper-material[elevation="3"] {
        @apply --paper-material-elevation-3;
      }
      .paper-material[elevation="4"] {
        @apply --paper-material-elevation-4;
      }
      .paper-material[elevation="5"] {
        @apply --paper-material-elevation-5;
      }

      /* Duplicate the styles because of https://github.com/webcomponents/shadycss/issues/193 */
      :host {
        --paper-material: {
          display: block;
          position: relative;
        };
        --paper-material-elevation-1: {
          @apply --shadow-elevation-2dp;
        };
        --paper-material-elevation-2: {
          @apply --shadow-elevation-4dp;
        };
        --paper-material-elevation-3: {
          @apply --shadow-elevation-6dp;
        };
        --paper-material-elevation-4: {
          @apply --shadow-elevation-8dp;
        };
        --paper-material-elevation-5: {
          @apply --shadow-elevation-16dp;
        };
      }
      :host(.paper-material) {
        @apply --paper-material;
      }
      :host(.paper-material[elevation="1"]) {
        @apply --paper-material-elevation-1;
      }
      :host(.paper-material[elevation="2"]) {
        @apply --paper-material-elevation-2;
      }
      :host(.paper-material[elevation="3"]) {
        @apply --paper-material-elevation-3;
      }
      :host(.paper-material[elevation="4"]) {
        @apply --paper-material-elevation-4;
      }
      :host(.paper-material[elevation="5"]) {
        @apply --paper-material-elevation-5;
      }
    </style>
  </template>
</dom-module>`;c0t.setAttribute("style","display: none;");document.head.appendChild(c0t.content);var Di={properties:{focused:{type:Boolean,value:!1,notify:!0,readOnly:!0,reflectToAttribute:!0},disabled:{type:Boolean,value:!1,notify:!0,observer:"_disabledChanged",reflectToAttribute:!0},_oldTabIndex:{type:String},_boundFocusBlurHandler:{type:Function,value:function(){return this._focusBlurHandler.bind(this)}}},observers:["_changedControlState(focused, disabled)"],ready:function(){this.addEventListener("focus",this._boundFocusBlurHandler,!0),this.addEventListener("blur",this._boundFocusBlurHandler,!0)},_focusBlurHandler:function(e){this._setFocused(e.type==="focus")},_disabledChanged:function(e,t){this.setAttribute("aria-disabled",e?"true":"false"),this.style.pointerEvents=e?"none":"",e?(this._oldTabIndex=this.getAttribute("tabindex"),this._setFocused(!1),this.tabIndex=-1,this.blur()):this._oldTabIndex!==void 0&&(this._oldTabIndex===null?this.removeAttribute("tabindex"):this.setAttribute("tabindex",this._oldTabIndex))},_changedControlState:function(){this._controlStateChanged&&this._controlStateChanged()}};var Yx={properties:{pressed:{type:Boolean,readOnly:!0,value:!1,reflectToAttribute:!0,observer:"_pressedChanged"},toggles:{type:Boolean,value:!1,reflectToAttribute:!0},active:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0},pointerDown:{type:Boolean,readOnly:!0,value:!1},receivedFocusFromKeyboard:{type:Boolean,readOnly:!0},ariaActiveAttribute:{type:String,value:"aria-pressed",observer:"_ariaActiveAttributeChanged"}},listeners:{down:"_downHandler",up:"_upHandler",tap:"_tapHandler"},observers:["_focusChanged(focused)","_activeChanged(active, ariaActiveAttribute)"],keyBindings:{"enter:keydown":"_asyncClick","space:keydown":"_spaceKeyDownHandler","space:keyup":"_spaceKeyUpHandler"},_mouseEventRe:/^mouse/,_tapHandler:function(){this.toggles?this._userActivate(!this.active):this.active=!1},_focusChanged:function(e){this._detectKeyboardFocus(e),e||this._setPressed(!1)},_detectKeyboardFocus:function(e){this._setReceivedFocusFromKeyboard(!this.pointerDown&&e)},_userActivate:function(e){this.active!==e&&(this.active=e,this.fire("change"))},_downHandler:function(e){this._setPointerDown(!0),this._setPressed(!0),this._setReceivedFocusFromKeyboard(!1)},_upHandler:function(){this._setPointerDown(!1),this._setPressed(!1)},_spaceKeyDownHandler:function(e){var t=e.detail.keyboardEvent,r=zt(t).localTarget;this.isLightDescendant(r)||(t.preventDefault(),t.stopImmediatePropagation(),this._setPressed(!0))},_spaceKeyUpHandler:function(e){var t=e.detail.keyboardEvent,r=zt(t).localTarget;this.isLightDescendant(r)||(this.pressed&&this._asyncClick(),this._setPressed(!1))},_asyncClick:function(){this.async(function(){this.click()},1)},_pressedChanged:function(e){this._changedButtonState()},_ariaActiveAttributeChanged:function(e,t){t&&t!=e&&this.hasAttribute(t)&&this.removeAttribute(t)},_activeChanged:function(e,t){this.toggles?this.setAttribute(this.ariaActiveAttribute,e?"true":"false"):this.removeAttribute(this.ariaActiveAttribute),this._changedButtonState()},_controlStateChanged:function(){this.disabled?this._setPressed(!1):this._changedButtonState()},_changedButtonState:function(){this._buttonStateChanged&&this._buttonStateChanged()}},Sh=[Oo,Yx];var Mh={distance:function(e,t,r,n){var i=e-r,o=t-n;return Math.sqrt(i*i+o*o)},now:window.performance&&window.performance.now?window.performance.now.bind(window.performance):Date.now};function u0t(e){this.element=e,this.width=this.boundingRect.width,this.height=this.boundingRect.height,this.size=Math.max(this.width,this.height)}u0t.prototype={get boundingRect(){return this.element.getBoundingClientRect()},furthestCornerDistanceFrom:function(e,t){var r=Mh.distance(e,t,0,0),n=Mh.distance(e,t,this.width,0),i=Mh.distance(e,t,0,this.height),o=Mh.distance(e,t,this.width,this.height);return Math.max(r,n,i,o)}};function g_(e){this.element=e,this.color=window.getComputedStyle(e).color,this.wave=document.createElement("div"),this.waveContainer=document.createElement("div"),this.wave.style.backgroundColor=this.color,this.wave.classList.add("wave"),this.waveContainer.classList.add("wave-container"),zt(this.waveContainer).appendChild(this.wave),this.resetInteractionState()}g_.MAX_RADIUS=300;g_.prototype={get recenters(){return this.element.recenters},get center(){return this.element.center},get mouseDownElapsed(){var e;return this.mouseDownStart?(e=Mh.now()-this.mouseDownStart,this.mouseUpStart&&(e-=this.mouseUpElapsed),e):0},get mouseUpElapsed(){return this.mouseUpStart?Mh.now()-this.mouseUpStart:0},get mouseDownElapsedSeconds(){return this.mouseDownElapsed/1e3},get mouseUpElapsedSeconds(){return this.mouseUpElapsed/1e3},get mouseInteractionSeconds(){return this.mouseDownElapsedSeconds+this.mouseUpElapsedSeconds},get initialOpacity(){return this.element.initialOpacity},get opacityDecayVelocity(){return this.element.opacityDecayVelocity},get radius(){var e=this.containerMetrics.width*this.containerMetrics.width,t=this.containerMetrics.height*this.containerMetrics.height,r=Math.min(Math.sqrt(e+t),g_.MAX_RADIUS)*1.1+5,n=1.1-.2*(r/g_.MAX_RADIUS),i=this.mouseInteractionSeconds/n,o=r*(1-Math.pow(80,-i));return Math.abs(o)},get opacity(){return this.mouseUpStart?Math.max(0,this.initialOpacity-this.mouseUpElapsedSeconds*this.opacityDecayVelocity):this.initialOpacity},get outerOpacity(){var e=this.mouseUpElapsedSeconds*.3,t=this.opacity;return Math.max(0,Math.min(e,t))},get isOpacityFullyDecayed(){return this.opacity<.01&&this.radius>=Math.min(this.maxRadius,g_.MAX_RADIUS)},get isRestingAtMaxRadius(){return this.opacity>=this.initialOpacity&&this.radius>=Math.min(this.maxRadius,g_.MAX_RADIUS)},get isAnimationComplete(){return this.mouseUpStart?this.isOpacityFullyDecayed:this.isRestingAtMaxRadius},get translationFraction(){return Math.min(1,this.radius/this.containerMetrics.size*2/Math.sqrt(2))},get xNow(){return this.xEnd?this.xStart+this.translationFraction*(this.xEnd-this.xStart):this.xStart},get yNow(){return this.yEnd?this.yStart+this.translationFraction*(this.yEnd-this.yStart):this.yStart},get isMouseDown(){return this.mouseDownStart&&!this.mouseUpStart},resetInteractionState:function(){this.maxRadius=0,this.mouseDownStart=0,this.mouseUpStart=0,this.xStart=0,this.yStart=0,this.xEnd=0,this.yEnd=0,this.slideDistance=0,this.containerMetrics=new u0t(this.element)},draw:function(){var e,t,r;this.wave.style.opacity=this.opacity,e=this.radius/(this.containerMetrics.size/2),t=this.xNow-this.containerMetrics.width/2,r=this.yNow-this.containerMetrics.height/2,this.waveContainer.style.webkitTransform="translate("+t+"px, "+r+"px)",this.waveContainer.style.transform="translate3d("+t+"px, "+r+"px, 0)",this.wave.style.webkitTransform="scale("+e+","+e+")",this.wave.style.transform="scale3d("+e+","+e+",1)"},downAction:function(e){var t=this.containerMetrics.width/2,r=this.containerMetrics.height/2;this.resetInteractionState(),this.mouseDownStart=Mh.now(),this.center?(this.xStart=t,this.yStart=r,this.slideDistance=Mh.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)):(this.xStart=e?e.detail.x-this.containerMetrics.boundingRect.left:this.containerMetrics.width/2,this.yStart=e?e.detail.y-this.containerMetrics.boundingRect.top:this.containerMetrics.height/2),this.recenters&&(this.xEnd=t,this.yEnd=r,this.slideDistance=Mh.distance(this.xStart,this.yStart,this.xEnd,this.yEnd)),this.maxRadius=this.containerMetrics.furthestCornerDistanceFrom(this.xStart,this.yStart),this.waveContainer.style.top=(this.containerMetrics.height-this.containerMetrics.size)/2+"px",this.waveContainer.style.left=(this.containerMetrics.width-this.containerMetrics.size)/2+"px",this.waveContainer.style.width=this.containerMetrics.size+"px",this.waveContainer.style.height=this.containerMetrics.size+"px"},upAction:function(e){!this.isMouseDown||(this.mouseUpStart=Mh.now())},remove:function(){zt(zt(this.waveContainer).parentNode).removeChild(this.waveContainer)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: absolute;
        border-radius: inherit;
        overflow: hidden;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;

        /* See PolymerElements/paper-behaviors/issues/34. On non-Chrome browsers,
         * creating a node (with a position:absolute) in the middle of an event
         * handler "interrupts" that event handler (which happens when the
         * ripple is created on demand) */
        pointer-events: none;
      }

      :host([animating]) {
        /* This resolves a rendering issue in Chrome (as of 40) where the
           ripple is not properly clipped by its parent (which may have
           rounded corners). See: http://jsbin.com/temexa/4

           Note: We only apply this style conditionally. Otherwise, the browser
           will create a new compositing layer for every ripple element on the
           page, and that would be bad. */
        -webkit-transform: translate(0, 0);
        transform: translate3d(0, 0, 0);
      }

      #background,
      #waves,
      .wave-container,
      .wave {
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
      }

      #background,
      .wave {
        opacity: 0;
      }

      #waves,
      .wave {
        overflow: hidden;
      }

      .wave-container,
      .wave {
        border-radius: 50%;
      }

      :host(.circle) #background,
      :host(.circle) #waves {
        border-radius: 50%;
      }

      :host(.circle) .wave-container {
        overflow: hidden;
      }
    </style>

    <div id="background"></div>
    <div id="waves"></div>
`,is:"paper-ripple",behaviors:[Oo],properties:{initialOpacity:{type:Number,value:.25},opacityDecayVelocity:{type:Number,value:.8},recenters:{type:Boolean,value:!1},center:{type:Boolean,value:!1},ripples:{type:Array,value:function(){return[]}},animating:{type:Boolean,readOnly:!0,reflectToAttribute:!0,value:!1},holdDown:{type:Boolean,value:!1,observer:"_holdDownChanged"},noink:{type:Boolean,value:!1},_animating:{type:Boolean},_boundAnimate:{type:Function,value:function(){return this.animate.bind(this)}}},get target(){return this.keyEventTarget},keyBindings:{"enter:keydown":"_onEnterKeydown","space:keydown":"_onSpaceKeydown","space:keyup":"_onSpaceKeyup"},attached:function(){zt(this).parentNode.nodeType==11?this.keyEventTarget=zt(this).getOwnerRoot().host:this.keyEventTarget=zt(this).parentNode;var e=this.keyEventTarget;this.listen(e,"up","uiUpAction"),this.listen(e,"down","uiDownAction")},detached:function(){this.unlisten(this.keyEventTarget,"up","uiUpAction"),this.unlisten(this.keyEventTarget,"down","uiDownAction"),this.keyEventTarget=null},get shouldKeepAnimating(){for(var e=0;e<this.ripples.length;++e)if(!this.ripples[e].isAnimationComplete)return!0;return!1},simulatedRipple:function(){this.downAction(null),this.async(function(){this.upAction()},1)},uiDownAction:function(e){this.noink||this.downAction(e)},downAction:function(e){if(!(this.holdDown&&this.ripples.length>0)){var t=this.addRipple();t.downAction(e),this._animating||(this._animating=!0,this.animate())}},uiUpAction:function(e){this.noink||this.upAction(e)},upAction:function(e){this.holdDown||(this.ripples.forEach(function(t){t.upAction(e)}),this._animating=!0,this.animate())},onAnimationComplete:function(){this._animating=!1,this.$.background.style.backgroundColor="",this.fire("transitionend")},addRipple:function(){var e=new g_(this);return zt(this.$.waves).appendChild(e.waveContainer),this.$.background.style.backgroundColor=e.color,this.ripples.push(e),this._setAnimating(!0),e},removeRipple:function(e){var t=this.ripples.indexOf(e);t<0||(this.ripples.splice(t,1),e.remove(),this.ripples.length||this._setAnimating(!1))},animate:function(){if(!!this._animating){var e,t;for(e=0;e<this.ripples.length;++e)t=this.ripples[e],t.draw(),this.$.background.style.opacity=t.outerOpacity,t.isOpacityFullyDecayed&&!t.isRestingAtMaxRadius&&this.removeRipple(t);!this.shouldKeepAnimating&&this.ripples.length===0?this.onAnimationComplete():window.requestAnimationFrame(this._boundAnimate)}},animateRipple:function(){return this.animate()},_onEnterKeydown:function(){this.uiDownAction(),this.async(this.uiUpAction,1)},_onSpaceKeydown:function(){this.uiDownAction()},_onSpaceKeyup:function(){this.uiUpAction()},_holdDownChanged:function(e,t){t!==void 0&&(e?this.downAction():this.upAction())}});var su={properties:{noink:{type:Boolean,observer:"_noinkChanged"},_rippleContainer:{type:Object}},_buttonStateChanged:function(){this.focused&&this.ensureRipple()},_downHandler:function(e){Yx._downHandler.call(this,e),this.pressed&&this.ensureRipple(e)},ensureRipple:function(e){if(!this.hasRipple()){this._ripple=this._createRipple(),this._ripple.noink=this.noink;var t=this._rippleContainer||this.root;if(t&&zt(t).appendChild(this._ripple),e){var r=zt(this._rippleContainer||this),n=zt(e).rootTarget;r.deepContains(n)&&this._ripple.uiDownAction(e)}}},getRipple:function(){return this.ensureRipple(),this._ripple},hasRipple:function(){return Boolean(this._ripple)},_createRipple:function(){var e=document.createElement("paper-ripple");return e},_noinkChanged:function(e){this.hasRipple()&&(this._ripple.noink=e)}};var uW={properties:{elevation:{type:Number,reflectToAttribute:!0,readOnly:!0}},observers:["_calculateElevation(focused, disabled, active, pressed, receivedFocusFromKeyboard)","_computeKeyboardClass(receivedFocusFromKeyboard)"],hostAttributes:{role:"button",tabindex:"0",animated:!0},_calculateElevation:function(){var e=1;this.disabled?e=0:this.active||this.pressed?e=4:this.receivedFocusFromKeyboard&&(e=3),this._setElevation(e)},_computeKeyboardClass:function(e){this.toggleClass("keyboard-focus",e)},_spaceKeyDownHandler:function(e){Yx._spaceKeyDownHandler.call(this,e),this.hasRipple()&&this.getRipple().ripples.length<1&&this._ripple.uiDownAction()},_spaceKeyUpHandler:function(e){Yx._spaceKeyUpHandler.call(this,e),this.hasRipple()&&this._ripple.uiUpAction()}},h0t=[Sh,Di,su,uW];var f0t=Q`
  <style include="paper-material-styles">
    /* Need to specify the same specificity as the styles imported from paper-material. */
    :host {
      @apply --layout-inline;
      @apply --layout-center-center;
      position: relative;
      box-sizing: border-box;
      min-width: 5.14em;
      margin: 0 0.29em;
      background: transparent;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      -webkit-tap-highlight-color: transparent;
      font: inherit;
      text-transform: uppercase;
      outline-width: 0;
      border-radius: 3px;
      -moz-user-select: none;
      -ms-user-select: none;
      -webkit-user-select: none;
      user-select: none;
      cursor: pointer;
      z-index: 0;
      padding: 0.7em 0.57em;

      @apply --paper-font-common-base;
      @apply --paper-button;
    }

    :host([elevation="1"]) {
      @apply --paper-material-elevation-1;
    }

    :host([elevation="2"]) {
      @apply --paper-material-elevation-2;
    }

    :host([elevation="3"]) {
      @apply --paper-material-elevation-3;
    }

    :host([elevation="4"]) {
      @apply --paper-material-elevation-4;
    }

    :host([elevation="5"]) {
      @apply --paper-material-elevation-5;
    }

    :host([hidden]) {
      display: none !important;
    }

    :host([raised].keyboard-focus) {
      font-weight: bold;
      @apply --paper-button-raised-keyboard-focus;
    }

    :host(:not([raised]).keyboard-focus) {
      font-weight: bold;
      @apply --paper-button-flat-keyboard-focus;
    }

    :host([disabled]) {
      background: none;
      color: #a8a8a8;
      cursor: auto;
      pointer-events: none;

      @apply --paper-button-disabled;
    }

    :host([disabled][raised]) {
      background: #eaeaea;
    }


    :host([animated]) {
      @apply --shadow-transition;
    }

    paper-ripple {
      color: var(--paper-button-ink-color);
    }
  </style>

  <slot></slot>`;f0t.setAttribute("strip-whitespace","");Yt({_template:f0t,is:"paper-button",behaviors:[h0t],properties:{raised:{type:Boolean,reflectToAttribute:!0,value:!1,observer:"_calculateElevation"}},_calculateElevation:function(){this.raised?uW._calculateElevation.apply(this):this._setElevation(0)}});var p0t=Q`
<custom-style>
  <style is="custom-style">
    html {

      /* Material Design color palette for Google products */

      --google-red-100: #f4c7c3;
      --google-red-300: #e67c73;
      --google-red-500: #db4437;
      --google-red-700: #c53929;

      --google-blue-100: #c6dafc;
      --google-blue-300: #7baaf7;
      --google-blue-500: #4285f4;
      --google-blue-700: #3367d6;

      --google-green-100: #b7e1cd;
      --google-green-300: #57bb8a;
      --google-green-500: #0f9d58;
      --google-green-700: #0b8043;

      --google-yellow-100: #fce8b2;
      --google-yellow-300: #f7cb4d;
      --google-yellow-500: #f4b400;
      --google-yellow-700: #f09300;

      --google-grey-100: #f5f5f5;
      --google-grey-300: #e0e0e0;
      --google-grey-500: #9e9e9e;
      --google-grey-700: #616161;

      /* Material Design color palette from online spec document */

      --paper-red-50: #ffebee;
      --paper-red-100: #ffcdd2;
      --paper-red-200: #ef9a9a;
      --paper-red-300: #e57373;
      --paper-red-400: #ef5350;
      --paper-red-500: #f44336;
      --paper-red-600: #e53935;
      --paper-red-700: #d32f2f;
      --paper-red-800: #c62828;
      --paper-red-900: #b71c1c;
      --paper-red-a100: #ff8a80;
      --paper-red-a200: #ff5252;
      --paper-red-a400: #ff1744;
      --paper-red-a700: #d50000;

      --paper-pink-50: #fce4ec;
      --paper-pink-100: #f8bbd0;
      --paper-pink-200: #f48fb1;
      --paper-pink-300: #f06292;
      --paper-pink-400: #ec407a;
      --paper-pink-500: #e91e63;
      --paper-pink-600: #d81b60;
      --paper-pink-700: #c2185b;
      --paper-pink-800: #ad1457;
      --paper-pink-900: #880e4f;
      --paper-pink-a100: #ff80ab;
      --paper-pink-a200: #ff4081;
      --paper-pink-a400: #f50057;
      --paper-pink-a700: #c51162;

      --paper-purple-50: #f3e5f5;
      --paper-purple-100: #e1bee7;
      --paper-purple-200: #ce93d8;
      --paper-purple-300: #ba68c8;
      --paper-purple-400: #ab47bc;
      --paper-purple-500: #9c27b0;
      --paper-purple-600: #8e24aa;
      --paper-purple-700: #7b1fa2;
      --paper-purple-800: #6a1b9a;
      --paper-purple-900: #4a148c;
      --paper-purple-a100: #ea80fc;
      --paper-purple-a200: #e040fb;
      --paper-purple-a400: #d500f9;
      --paper-purple-a700: #aa00ff;

      --paper-deep-purple-50: #ede7f6;
      --paper-deep-purple-100: #d1c4e9;
      --paper-deep-purple-200: #b39ddb;
      --paper-deep-purple-300: #9575cd;
      --paper-deep-purple-400: #7e57c2;
      --paper-deep-purple-500: #673ab7;
      --paper-deep-purple-600: #5e35b1;
      --paper-deep-purple-700: #512da8;
      --paper-deep-purple-800: #4527a0;
      --paper-deep-purple-900: #311b92;
      --paper-deep-purple-a100: #b388ff;
      --paper-deep-purple-a200: #7c4dff;
      --paper-deep-purple-a400: #651fff;
      --paper-deep-purple-a700: #6200ea;

      --paper-indigo-50: #e8eaf6;
      --paper-indigo-100: #c5cae9;
      --paper-indigo-200: #9fa8da;
      --paper-indigo-300: #7986cb;
      --paper-indigo-400: #5c6bc0;
      --paper-indigo-500: #3f51b5;
      --paper-indigo-600: #3949ab;
      --paper-indigo-700: #303f9f;
      --paper-indigo-800: #283593;
      --paper-indigo-900: #1a237e;
      --paper-indigo-a100: #8c9eff;
      --paper-indigo-a200: #536dfe;
      --paper-indigo-a400: #3d5afe;
      --paper-indigo-a700: #304ffe;

      --paper-blue-50: #e3f2fd;
      --paper-blue-100: #bbdefb;
      --paper-blue-200: #90caf9;
      --paper-blue-300: #64b5f6;
      --paper-blue-400: #42a5f5;
      --paper-blue-500: #2196f3;
      --paper-blue-600: #1e88e5;
      --paper-blue-700: #1976d2;
      --paper-blue-800: #1565c0;
      --paper-blue-900: #0d47a1;
      --paper-blue-a100: #82b1ff;
      --paper-blue-a200: #448aff;
      --paper-blue-a400: #2979ff;
      --paper-blue-a700: #2962ff;

      --paper-light-blue-50: #e1f5fe;
      --paper-light-blue-100: #b3e5fc;
      --paper-light-blue-200: #81d4fa;
      --paper-light-blue-300: #4fc3f7;
      --paper-light-blue-400: #29b6f6;
      --paper-light-blue-500: #03a9f4;
      --paper-light-blue-600: #039be5;
      --paper-light-blue-700: #0288d1;
      --paper-light-blue-800: #0277bd;
      --paper-light-blue-900: #01579b;
      --paper-light-blue-a100: #80d8ff;
      --paper-light-blue-a200: #40c4ff;
      --paper-light-blue-a400: #00b0ff;
      --paper-light-blue-a700: #0091ea;

      --paper-cyan-50: #e0f7fa;
      --paper-cyan-100: #b2ebf2;
      --paper-cyan-200: #80deea;
      --paper-cyan-300: #4dd0e1;
      --paper-cyan-400: #26c6da;
      --paper-cyan-500: #00bcd4;
      --paper-cyan-600: #00acc1;
      --paper-cyan-700: #0097a7;
      --paper-cyan-800: #00838f;
      --paper-cyan-900: #006064;
      --paper-cyan-a100: #84ffff;
      --paper-cyan-a200: #18ffff;
      --paper-cyan-a400: #00e5ff;
      --paper-cyan-a700: #00b8d4;

      --paper-teal-50: #e0f2f1;
      --paper-teal-100: #b2dfdb;
      --paper-teal-200: #80cbc4;
      --paper-teal-300: #4db6ac;
      --paper-teal-400: #26a69a;
      --paper-teal-500: #009688;
      --paper-teal-600: #00897b;
      --paper-teal-700: #00796b;
      --paper-teal-800: #00695c;
      --paper-teal-900: #004d40;
      --paper-teal-a100: #a7ffeb;
      --paper-teal-a200: #64ffda;
      --paper-teal-a400: #1de9b6;
      --paper-teal-a700: #00bfa5;

      --paper-green-50: #e8f5e9;
      --paper-green-100: #c8e6c9;
      --paper-green-200: #a5d6a7;
      --paper-green-300: #81c784;
      --paper-green-400: #66bb6a;
      --paper-green-500: #4caf50;
      --paper-green-600: #43a047;
      --paper-green-700: #388e3c;
      --paper-green-800: #2e7d32;
      --paper-green-900: #1b5e20;
      --paper-green-a100: #b9f6ca;
      --paper-green-a200: #69f0ae;
      --paper-green-a400: #00e676;
      --paper-green-a700: #00c853;

      --paper-light-green-50: #f1f8e9;
      --paper-light-green-100: #dcedc8;
      --paper-light-green-200: #c5e1a5;
      --paper-light-green-300: #aed581;
      --paper-light-green-400: #9ccc65;
      --paper-light-green-500: #8bc34a;
      --paper-light-green-600: #7cb342;
      --paper-light-green-700: #689f38;
      --paper-light-green-800: #558b2f;
      --paper-light-green-900: #33691e;
      --paper-light-green-a100: #ccff90;
      --paper-light-green-a200: #b2ff59;
      --paper-light-green-a400: #76ff03;
      --paper-light-green-a700: #64dd17;

      --paper-lime-50: #f9fbe7;
      --paper-lime-100: #f0f4c3;
      --paper-lime-200: #e6ee9c;
      --paper-lime-300: #dce775;
      --paper-lime-400: #d4e157;
      --paper-lime-500: #cddc39;
      --paper-lime-600: #c0ca33;
      --paper-lime-700: #afb42b;
      --paper-lime-800: #9e9d24;
      --paper-lime-900: #827717;
      --paper-lime-a100: #f4ff81;
      --paper-lime-a200: #eeff41;
      --paper-lime-a400: #c6ff00;
      --paper-lime-a700: #aeea00;

      --paper-yellow-50: #fffde7;
      --paper-yellow-100: #fff9c4;
      --paper-yellow-200: #fff59d;
      --paper-yellow-300: #fff176;
      --paper-yellow-400: #ffee58;
      --paper-yellow-500: #ffeb3b;
      --paper-yellow-600: #fdd835;
      --paper-yellow-700: #fbc02d;
      --paper-yellow-800: #f9a825;
      --paper-yellow-900: #f57f17;
      --paper-yellow-a100: #ffff8d;
      --paper-yellow-a200: #ffff00;
      --paper-yellow-a400: #ffea00;
      --paper-yellow-a700: #ffd600;

      --paper-amber-50: #fff8e1;
      --paper-amber-100: #ffecb3;
      --paper-amber-200: #ffe082;
      --paper-amber-300: #ffd54f;
      --paper-amber-400: #ffca28;
      --paper-amber-500: #ffc107;
      --paper-amber-600: #ffb300;
      --paper-amber-700: #ffa000;
      --paper-amber-800: #ff8f00;
      --paper-amber-900: #ff6f00;
      --paper-amber-a100: #ffe57f;
      --paper-amber-a200: #ffd740;
      --paper-amber-a400: #ffc400;
      --paper-amber-a700: #ffab00;

      --paper-orange-50: #fff3e0;
      --paper-orange-100: #ffe0b2;
      --paper-orange-200: #ffcc80;
      --paper-orange-300: #ffb74d;
      --paper-orange-400: #ffa726;
      --paper-orange-500: #ff9800;
      --paper-orange-600: #fb8c00;
      --paper-orange-700: #f57c00;
      --paper-orange-800: #ef6c00;
      --paper-orange-900: #e65100;
      --paper-orange-a100: #ffd180;
      --paper-orange-a200: #ffab40;
      --paper-orange-a400: #ff9100;
      --paper-orange-a700: #ff6500;

      --paper-deep-orange-50: #fbe9e7;
      --paper-deep-orange-100: #ffccbc;
      --paper-deep-orange-200: #ffab91;
      --paper-deep-orange-300: #ff8a65;
      --paper-deep-orange-400: #ff7043;
      --paper-deep-orange-500: #ff5722;
      --paper-deep-orange-600: #f4511e;
      --paper-deep-orange-700: #e64a19;
      --paper-deep-orange-800: #d84315;
      --paper-deep-orange-900: #bf360c;
      --paper-deep-orange-a100: #ff9e80;
      --paper-deep-orange-a200: #ff6e40;
      --paper-deep-orange-a400: #ff3d00;
      --paper-deep-orange-a700: #dd2c00;

      --paper-brown-50: #efebe9;
      --paper-brown-100: #d7ccc8;
      --paper-brown-200: #bcaaa4;
      --paper-brown-300: #a1887f;
      --paper-brown-400: #8d6e63;
      --paper-brown-500: #795548;
      --paper-brown-600: #6d4c41;
      --paper-brown-700: #5d4037;
      --paper-brown-800: #4e342e;
      --paper-brown-900: #3e2723;

      --paper-grey-50: #fafafa;
      --paper-grey-100: #f5f5f5;
      --paper-grey-200: #eeeeee;
      --paper-grey-300: #e0e0e0;
      --paper-grey-400: #bdbdbd;
      --paper-grey-500: #9e9e9e;
      --paper-grey-600: #757575;
      --paper-grey-700: #616161;
      --paper-grey-800: #424242;
      --paper-grey-900: #212121;

      --paper-blue-grey-50: #eceff1;
      --paper-blue-grey-100: #cfd8dc;
      --paper-blue-grey-200: #b0bec5;
      --paper-blue-grey-300: #90a4ae;
      --paper-blue-grey-400: #78909c;
      --paper-blue-grey-500: #607d8b;
      --paper-blue-grey-600: #546e7a;
      --paper-blue-grey-700: #455a64;
      --paper-blue-grey-800: #37474f;
      --paper-blue-grey-900: #263238;

      /* opacity for dark text on a light background */
      --dark-divider-opacity: 0.12;
      --dark-disabled-opacity: 0.38; /* or hint text or icon */
      --dark-secondary-opacity: 0.54;
      --dark-primary-opacity: 0.87;

      /* opacity for light text on a dark background */
      --light-divider-opacity: 0.12;
      --light-disabled-opacity: 0.3; /* or hint text or icon */
      --light-secondary-opacity: 0.7;
      --light-primary-opacity: 1.0;

    }

  </style>
</custom-style>
`;p0t.setAttribute("style","display: none;");document.head.appendChild(p0t.content);var d0t=Q`
<custom-style>
  <style is="custom-style">
    html {
      /*
       * You can use these generic variables in your elements for easy theming.
       * For example, if all your elements use \`--primary-text-color\` as its main
       * color, then switching from a light to a dark theme is just a matter of
       * changing the value of \`--primary-text-color\` in your application.
       */
      --primary-text-color: var(--light-theme-text-color);
      --primary-background-color: var(--light-theme-background-color);
      --secondary-text-color: var(--light-theme-secondary-color);
      --disabled-text-color: var(--light-theme-disabled-color);
      --divider-color: var(--light-theme-divider-color);
      --error-color: var(--paper-deep-orange-a700);

      /*
       * Primary and accent colors. Also see color.js for more colors.
       */
      --primary-color: var(--paper-indigo-500);
      --light-primary-color: var(--paper-indigo-100);
      --dark-primary-color: var(--paper-indigo-700);

      --accent-color: var(--paper-pink-a200);
      --light-accent-color: var(--paper-pink-a100);
      --dark-accent-color: var(--paper-pink-a400);


      /*
       * Material Design Light background theme
       */
      --light-theme-background-color: #ffffff;
      --light-theme-base-color: #000000;
      --light-theme-text-color: var(--paper-grey-900);
      --light-theme-secondary-color: #737373;  /* for secondary text and icons */
      --light-theme-disabled-color: #9b9b9b;  /* disabled/hint text */
      --light-theme-divider-color: #dbdbdb;

      /*
       * Material Design Dark background theme
       */
      --dark-theme-background-color: var(--paper-grey-900);
      --dark-theme-base-color: #ffffff;
      --dark-theme-text-color: #ffffff;
      --dark-theme-secondary-color: #bcbcbc;  /* for secondary text and icons */
      --dark-theme-disabled-color: #646464;  /* disabled/hint text */
      --dark-theme-divider-color: #3c3c3c;

      /*
       * Deprecated values because of their confusing names.
       */
      --text-primary-color: var(--dark-theme-text-color);
      --default-primary-color: var(--primary-color);
    }
  </style>
</custom-style>`;d0t.setAttribute("style","display: none;");document.head.appendChild(d0t.content);var Eh={properties:{name:{type:String},value:{notify:!0,type:String},required:{type:Boolean,value:!1}},attached:function(){},detached:function(){}};var hW=null,Th={properties:{validator:{type:String},invalid:{notify:!0,reflectToAttribute:!0,type:Boolean,value:!1,observer:"_invalidChanged"}},registered:function(){hW=new go({type:"validator"})},_invalidChanged:function(){this.invalid?this.setAttribute("aria-invalid","true"):this.removeAttribute("aria-invalid")},get _validator(){return hW&&hW.byKey(this.validator)},hasValidator:function(){return this._validator!=null},validate:function(e){return e===void 0&&this.value!==void 0?this.invalid=!this._getValidity(this.value):this.invalid=!this._getValidity(e),!this.invalid},_getValidity:function(e){return this.hasValidator()?this._validator.validate(e):!0}};var fW={properties:{checked:{type:Boolean,value:!1,reflectToAttribute:!0,notify:!0,observer:"_checkedChanged"},toggles:{type:Boolean,value:!0,reflectToAttribute:!0},value:{type:String,value:"on",observer:"_valueChanged"}},observers:["_requiredChanged(required)"],created:function(){this._hasIronCheckedElementBehavior=!0},_getValidity:function(e){return this.disabled||!this.required||this.checked},_requiredChanged:function(){this.required?this.setAttribute("aria-required","true"):this.removeAttribute("aria-required")},_checkedChanged:function(){this.active=this.checked,this.fire("iron-change")},_valueChanged:function(){(this.value===void 0||this.value===null)&&(this.value="on")}},m0t=[Eh,Th,fW];var pE={observers:["_focusedChanged(receivedFocusFromKeyboard)"],_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(this._ripple.holdDown=e)},_createRipple:function(){var e=su._createRipple();return e.id="ink",e.setAttribute("center",""),e.classList.add("circle"),e}},jx=[Sh,Di,su,pE];var Lbe={_checkedChanged:function(){fW._checkedChanged.call(this),this.hasRipple()&&(this.checked?this._ripple.setAttribute("checked",""):this._ripple.removeAttribute("checked"))},_buttonStateChanged:function(){su._buttonStateChanged.call(this),!this.disabled&&this.isAttached&&(this.checked=this.active)}},Xx=[jx,m0t,Lbe];var g0t=Q`<style>
  :host {
    display: inline-block;
    white-space: nowrap;
    cursor: pointer;
    --calculated-paper-checkbox-size: var(--paper-checkbox-size, 18px);
    /* -1px is a sentinel for the default and is replaced in \`attached\`. */
    --calculated-paper-checkbox-ink-size: var(--paper-checkbox-ink-size, -1px);
    @apply --paper-font-common-base;
    line-height: 0;
    -webkit-tap-highlight-color: transparent;
  }

  :host([hidden]) {
    display: none !important;
  }

  :host(:focus) {
    outline: none;
  }

  .hidden {
    display: none;
  }

  #checkboxContainer {
    display: inline-block;
    position: relative;
    width: var(--calculated-paper-checkbox-size);
    height: var(--calculated-paper-checkbox-size);
    min-width: var(--calculated-paper-checkbox-size);
    margin: var(--paper-checkbox-margin, initial);
    vertical-align: var(--paper-checkbox-vertical-align, middle);
    background-color: var(--paper-checkbox-unchecked-background-color, transparent);
  }

  #ink {
    position: absolute;

    /* Center the ripple in the checkbox by negative offsetting it by
     * (inkWidth - rippleWidth) / 2 */
    top: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    left: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    width: var(--calculated-paper-checkbox-ink-size);
    height: var(--calculated-paper-checkbox-ink-size);
    color: var(--paper-checkbox-unchecked-ink-color, var(--primary-text-color));
    opacity: 0.6;
    pointer-events: none;
  }

  #ink:dir(rtl) {
    right: calc(0px - (var(--calculated-paper-checkbox-ink-size) - var(--calculated-paper-checkbox-size)) / 2);
    left: auto;
  }

  #ink[checked] {
    color: var(--paper-checkbox-checked-ink-color, var(--primary-color));
  }

  #checkbox {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    border: solid 2px;
    border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
    border-radius: 2px;
    pointer-events: none;
    -webkit-transition: background-color 140ms, border-color 140ms;
    transition: background-color 140ms, border-color 140ms;

    -webkit-transition-duration: var(--paper-checkbox-animation-duration, 140ms);
    transition-duration: var(--paper-checkbox-animation-duration, 140ms);
  }

  /* checkbox checked animations */
  #checkbox.checked #checkmark {
    -webkit-animation: checkmark-expand 140ms ease-out forwards;
    animation: checkmark-expand 140ms ease-out forwards;

    -webkit-animation-duration: var(--paper-checkbox-animation-duration, 140ms);
    animation-duration: var(--paper-checkbox-animation-duration, 140ms);
  }

  @-webkit-keyframes checkmark-expand {
    0% {
      -webkit-transform: scale(0, 0) rotate(45deg);
    }
    100% {
      -webkit-transform: scale(1, 1) rotate(45deg);
    }
  }

  @keyframes checkmark-expand {
    0% {
      transform: scale(0, 0) rotate(45deg);
    }
    100% {
      transform: scale(1, 1) rotate(45deg);
    }
  }

  #checkbox.checked {
    background-color: var(--paper-checkbox-checked-color, var(--primary-color));
    border-color: var(--paper-checkbox-checked-color, var(--primary-color));
  }

  #checkmark {
    position: absolute;
    width: 36%;
    height: 70%;
    border-style: solid;
    border-top: none;
    border-left: none;
    border-right-width: calc(2/15 * var(--calculated-paper-checkbox-size));
    border-bottom-width: calc(2/15 * var(--calculated-paper-checkbox-size));
    border-color: var(--paper-checkbox-checkmark-color, white);
    -webkit-transform-origin: 97% 86%;
    transform-origin: 97% 86%;
    box-sizing: content-box; /* protect against page-level box-sizing */
  }

  #checkmark:dir(rtl) {
    -webkit-transform-origin: 50% 14%;
    transform-origin: 50% 14%;
  }

  /* label */
  #checkboxLabel {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    padding-left: var(--paper-checkbox-label-spacing, 8px);
    white-space: normal;
    line-height: normal;
    color: var(--paper-checkbox-label-color, var(--primary-text-color));
    @apply --paper-checkbox-label;
  }

  :host([checked]) #checkboxLabel {
    color: var(--paper-checkbox-label-checked-color, var(--paper-checkbox-label-color, var(--primary-text-color)));
    @apply --paper-checkbox-label-checked;
  }

  #checkboxLabel:dir(rtl) {
    padding-right: var(--paper-checkbox-label-spacing, 8px);
    padding-left: 0;
  }

  #checkboxLabel[hidden] {
    display: none;
  }

  /* disabled state */

  :host([disabled]) #checkbox {
    opacity: 0.5;
    border-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
  }

  :host([disabled][checked]) #checkbox {
    background-color: var(--paper-checkbox-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled]) #checkboxLabel  {
    opacity: 0.65;
  }

  /* invalid state */
  #checkbox.invalid:not(.checked) {
    border-color: var(--paper-checkbox-error-color, var(--error-color));
  }
</style>

<div id="checkboxContainer">
  <div id="checkbox" class$="[[_computeCheckboxClass(checked, invalid)]]">
    <div id="checkmark" class$="[[_computeCheckmarkClass(checked)]]"></div>
  </div>
</div>

<div id="checkboxLabel"><slot></slot></div>`;g0t.setAttribute("strip-whitespace","");Yt({_template:g0t,is:"paper-checkbox",behaviors:[Xx],hostAttributes:{role:"checkbox","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},attached:function(){Tm(this,function(){var e=this.getComputedStyleValue("--calculated-paper-checkbox-ink-size").trim();if(e==="-1px"){var t=this.getComputedStyleValue("--calculated-paper-checkbox-size").trim(),r="px",n=t.match(/[A-Za-z]+$/);n!==null&&(r=n[0]);var i=parseFloat(t),o=8/3*i;r==="px"&&(o=Math.floor(o),o%2!==i%2&&o++),this.updateStyles({"--paper-checkbox-ink-size":o+r})}})},_computeCheckboxClass:function(e,t){var r="";return e&&(r+="checked "),t&&(r+="invalid"),r},_computeCheckmarkClass:function(e){return e?"":"hidden"},_createRipple:function(){return this._rippleContainer=this.$.checkboxContainer,pE._createRipple.call(this)}});if(!window.polymerSkipLoadingFontRoboto){let e=document.createElement("link");e.rel="stylesheet",e.type="text/css",e.crossOrigin="anonymous",e.href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,700|Roboto:400,300,300italic,400italic,500,500italic,700,700italic",document.head.appendChild(e)}var _0t=Q`<custom-style>
  <style is="custom-style">
    html {

      /* Shared Styles */
      --paper-font-common-base: {
        font-family: 'Roboto', 'Noto', sans-serif;
        -webkit-font-smoothing: antialiased;
      };

      --paper-font-common-code: {
        font-family: 'Roboto Mono', 'Consolas', 'Menlo', monospace;
        -webkit-font-smoothing: antialiased;
      };

      --paper-font-common-expensive-kerning: {
        text-rendering: optimizeLegibility;
      };

      --paper-font-common-nowrap: {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      };

      /* Material Font Styles */

      --paper-font-display4: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 112px;
        font-weight: 300;
        letter-spacing: -.044em;
        line-height: 120px;
      };

      --paper-font-display3: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 56px;
        font-weight: 400;
        letter-spacing: -.026em;
        line-height: 60px;
      };

      --paper-font-display2: {
        @apply --paper-font-common-base;

        font-size: 45px;
        font-weight: 400;
        letter-spacing: -.018em;
        line-height: 48px;
      };

      --paper-font-display1: {
        @apply --paper-font-common-base;

        font-size: 34px;
        font-weight: 400;
        letter-spacing: -.01em;
        line-height: 40px;
      };

      --paper-font-headline: {
        @apply --paper-font-common-base;

        font-size: 24px;
        font-weight: 400;
        letter-spacing: -.012em;
        line-height: 32px;
      };

      --paper-font-title: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 20px;
        font-weight: 500;
        line-height: 28px;
      };

      --paper-font-subhead: {
        @apply --paper-font-common-base;

        font-size: 16px;
        font-weight: 400;
        line-height: 24px;
      };

      --paper-font-body2: {
        @apply --paper-font-common-base;

        font-size: 14px;
        font-weight: 500;
        line-height: 24px;
      };

      --paper-font-body1: {
        @apply --paper-font-common-base;

        font-size: 14px;
        font-weight: 400;
        line-height: 20px;
      };

      --paper-font-caption: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 12px;
        font-weight: 400;
        letter-spacing: 0.011em;
        line-height: 20px;
      };

      --paper-font-menu: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 13px;
        font-weight: 500;
        line-height: 24px;
      };

      --paper-font-button: {
        @apply --paper-font-common-base;
        @apply --paper-font-common-nowrap;

        font-size: 14px;
        font-weight: 500;
        letter-spacing: 0.018em;
        line-height: 24px;
        text-transform: uppercase;
      };

      --paper-font-code2: {
        @apply --paper-font-common-code;

        font-size: 14px;
        font-weight: 700;
        line-height: 20px;
      };

      --paper-font-code1: {
        @apply --paper-font-common-code;

        font-size: 14px;
        font-weight: 500;
        line-height: 20px;
      };

    }

  </style>
</custom-style>`;_0t.setAttribute("style","display: none;");document.head.appendChild(_0t.content);var pW=document.createElement("template");pW.setAttribute("style","display: none;");pW.innerHTML=`<dom-module id="paper-dialog-shared-styles">
  <template>
    <style>
      :host {
        display: block;
        margin: 24px 40px;

        background: var(--paper-dialog-background-color, var(--primary-background-color));
        color: var(--paper-dialog-color, var(--primary-text-color));

        @apply --paper-font-body1;
        @apply --shadow-elevation-16dp;
        @apply --paper-dialog;
      }

      :host > ::slotted(*) {
        margin-top: 20px;
        padding: 0 24px;
      }

      :host > ::slotted(.no-padding) {
        padding: 0;
      }

      
      :host > ::slotted(*:first-child) {
        margin-top: 24px;
      }

      :host > ::slotted(*:last-child) {
        margin-bottom: 24px;
      }

      /* In 1.x, this selector was \`:host > ::content h2\`. In 2.x <slot> allows
      to select direct children only, which increases the weight of this
      selector, so we have to re-define first-child/last-child margins below. */
      :host > ::slotted(h2) {
        position: relative;
        margin: 0;

        @apply --paper-font-title;
        @apply --paper-dialog-title;
      }

      /* Apply mixin again, in case it sets margin-top. */
      :host > ::slotted(h2:first-child) {
        margin-top: 24px;
        @apply --paper-dialog-title;
      }

      /* Apply mixin again, in case it sets margin-bottom. */
      :host > ::slotted(h2:last-child) {
        margin-bottom: 24px;
        @apply --paper-dialog-title;
      }

      :host > ::slotted(.paper-dialog-buttons),
      :host > ::slotted(.buttons) {
        position: relative;
        padding: 8px 8px 8px 24px;
        margin: 0;

        color: var(--paper-dialog-button-color, var(--primary-color));

        @apply --layout-horizontal;
        @apply --layout-end-justified;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(pW.content);var y0t={properties:{animationConfig:{type:Object},entryAnimation:{observer:"_entryAnimationChanged",type:String},exitAnimation:{observer:"_exitAnimationChanged",type:String}},_entryAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.entry=[{name:this.entryAnimation,node:this}]},_exitAnimationChanged:function(){this.animationConfig=this.animationConfig||{},this.animationConfig.exit=[{name:this.exitAnimation,node:this}]},_copyProperties:function(e,t){for(var r in t)e[r]=t[r]},_cloneConfig:function(e){var t={isClone:!0};return this._copyProperties(t,e),t},_getAnimationConfigRecursive:function(e,t,r){if(!!this.animationConfig){if(this.animationConfig.value&&typeof this.animationConfig.value=="function"){this._warn(this._logf("playAnimation","Please put 'animationConfig' inside of your components 'properties' object instead of outside of it."));return}var n;if(e?n=this.animationConfig[e]:n=this.animationConfig,Array.isArray(n)||(n=[n]),n)for(var i,o=0;i=n[o];o++)if(i.animatable)i.animatable._getAnimationConfigRecursive(i.type||e,t,r);else if(i.id){var a=t[i.id];a?(a.isClone||(t[i.id]=this._cloneConfig(a),a=t[i.id]),this._copyProperties(a,i)):t[i.id]=i}else r.push(i)}},getAnimationConfig:function(e){var t={},r=[];this._getAnimationConfigRecursive(e,t,r);for(var n in t)r.push(t[n]);return r}};var kbe={_configureAnimations:function(e){var t=[],r=[];if(e.length>0)for(let i,o=0;i=e[o];o++){let a=document.createElement(i.name);if(a.isNeonAnimation){let s=null;a.configure||(a.configure=function(l){return null}),s=a.configure(i),r.push({result:s,config:i,neonAnimation:a})}else console.warn(this.is+":",i.name,"not found!")}for(var n=0;n<r.length;n++){let i=r[n].result,o=r[n].config,a=r[n].neonAnimation;try{typeof i.cancel!="function"&&(i=document.timeline.play(i))}catch(s){i=null,console.warn("Couldnt play","(",o.name,").",s)}i&&t.push({neonAnimation:a,config:o,animation:i})}return t},_shouldComplete:function(e){for(var t=!0,r=0;r<e.length;r++)if(e[r].animation.playState!="finished"){t=!1;break}return t},_complete:function(e){for(var t=0;t<e.length;t++)e[t].neonAnimation.complete(e[t].config);for(var t=0;t<e.length;t++)e[t].animation.cancel()},playAnimation:function(e,t){var r=this.getAnimationConfig(e);if(!!r){this._active=this._active||{},this._active[e]&&(this._complete(this._active[e]),delete this._active[e]);var n=this._configureAnimations(r);if(n.length==0){this.fire("neon-animation-finish",t,{bubbles:!1});return}this._active[e]=n;for(var i=0;i<n.length;i++)n[i].animation.onfinish=function(){this._shouldComplete(n)&&(this._complete(n),delete this._active[e],this.fire("neon-animation-finish",t,{bubbles:!1}))}.bind(this)}},cancelAnimation:function(){for(var e in this._active){var t=this._active[e];for(var r in t)t[r].animation.cancel()}this._active={}}},b9=[y0t,kbe];var w9,Rbe=()=>{if(w9!==void 0)return w9;let e=document.createElement("div");Object.assign(e.style,{overflow:"auto",position:"fixed",left:"0px",top:"0px",maxWidth:"100px",maxHeight:"100px"});let t=document.createElement("div");return t.style.width="200px",t.style.height="200px",e.appendChild(t),document.body.appendChild(e),w9=Math.abs(e.offsetWidth-100)>1?e.offsetWidth-e.clientWidth:0,document.body.removeChild(e),w9},v0t={properties:{sizingTarget:{type:Object,value:function(){return this}},fitInto:{type:Object,value:window},noOverlap:{type:Boolean},positionTarget:{type:Element},horizontalAlign:{type:String},verticalAlign:{type:String},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},autoFitOnAttach:{type:Boolean,value:!1},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_fitInfo:{type:Object}},get _fitWidth(){var e;return this.fitInto===window?e=this.fitInto.innerWidth:e=this.fitInto.getBoundingClientRect().width,e},get _fitHeight(){var e;return this.fitInto===window?e=this.fitInto.innerHeight:e=this.fitInto.getBoundingClientRect().height,e},get _fitLeft(){var e;return this.fitInto===window?e=0:e=this.fitInto.getBoundingClientRect().left,e},get _fitTop(){var e;return this.fitInto===window?e=0:e=this.fitInto.getBoundingClientRect().top,e},get _defaultPositionTarget(){var e=zt(this).parentNode;return e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&(e=e.host),e},get _localeHorizontalAlign(){if(this._isRTL){if(this.horizontalAlign==="right")return"left";if(this.horizontalAlign==="left")return"right"}return this.horizontalAlign},get __shouldPosition(){return(this.horizontalAlign||this.verticalAlign)&&this.positionTarget},get _isRTL(){return typeof this._memoizedIsRTL=="undefined"&&(this._memoizedIsRTL=window.getComputedStyle(this).direction=="rtl"),this._memoizedIsRTL},attached:function(){this.positionTarget=this.positionTarget||this._defaultPositionTarget,this.autoFitOnAttach&&(window.getComputedStyle(this).display==="none"?setTimeout(function(){this.fit()}.bind(this)):(window.ShadyDOM&&ShadyDOM.flush(),this.fit()))},detached:function(){this.__deferredFit&&(clearTimeout(this.__deferredFit),this.__deferredFit=null)},fit:function(){this.position(),this.constrain(),this.center()},_discoverInfo:function(){if(!this._fitInfo){var e=window.getComputedStyle(this),t=window.getComputedStyle(this.sizingTarget);this._fitInfo={inlineStyle:{top:this.style.top||"",left:this.style.left||"",position:this.style.position||""},sizerInlineStyle:{maxWidth:this.sizingTarget.style.maxWidth||"",maxHeight:this.sizingTarget.style.maxHeight||"",boxSizing:this.sizingTarget.style.boxSizing||""},positionedBy:{vertically:e.top!=="auto"?"top":e.bottom!=="auto"?"bottom":null,horizontally:e.left!=="auto"?"left":e.right!=="auto"?"right":null},sizedBy:{height:t.maxHeight!=="none",width:t.maxWidth!=="none",minWidth:parseInt(t.minWidth,10)||0,minHeight:parseInt(t.minHeight,10)||0},margin:{top:parseInt(e.marginTop,10)||0,right:parseInt(e.marginRight,10)||0,bottom:parseInt(e.marginBottom,10)||0,left:parseInt(e.marginLeft,10)||0}}}},resetFit:function(){var e=this._fitInfo||{};for(var t in e.sizerInlineStyle)this.sizingTarget.style[t]=e.sizerInlineStyle[t];for(var t in e.inlineStyle)this.style[t]=e.inlineStyle[t];this._fitInfo=null},refit:function(){var e=this.sizingTarget.scrollLeft,t=this.sizingTarget.scrollTop;this.resetFit(),this.fit(),this.sizingTarget.scrollLeft=e,this.sizingTarget.scrollTop=t},position:function(){if(!this.__shouldPosition)return;this._discoverInfo(),window.ShadyDOM&&window.ShadyDOM.flush(),this.style.position="fixed",this.sizingTarget.style.boxSizing="border-box",this.style.left="0px",this.style.top="0px";var e=this.getBoundingClientRect(),t=this.__getNormalizedRect(this.positionTarget),r=this.__getNormalizedRect(this.fitInto);let n,i,o,a;this.expandSizingTargetForScrollbars&&(n=this.sizingTarget.offsetWidth,i=this.sizingTarget.offsetHeight,o=this.sizingTarget.clientWidth,a=this.sizingTarget.clientHeight);var s=this._fitInfo.margin,l={width:e.width+s.left+s.right,height:e.height+s.top+s.bottom},c=this.__getPosition(this._localeHorizontalAlign,this.verticalAlign,l,e,t,r),u=c.left+s.left,h=c.top+s.top,f=Math.min(r.right-s.right,u+e.width),p=Math.min(r.bottom-s.bottom,h+e.height);u=Math.max(r.left+s.left,Math.min(u,f-this._fitInfo.sizedBy.minWidth)),h=Math.max(r.top+s.top,Math.min(h,p-this._fitInfo.sizedBy.minHeight));let d=Math.max(f-u,this._fitInfo.sizedBy.minWidth),g=Math.max(p-h,this._fitInfo.sizedBy.minHeight);this.sizingTarget.style.maxWidth=d+"px",this.sizingTarget.style.maxHeight=g+"px";let _=u-e.left,y=h-e.top;if(this.style.left=`${_}px`,this.style.top=`${y}px`,this.expandSizingTargetForScrollbars){let x=this.sizingTarget.offsetHeight,b=this.sizingTarget.clientHeight,S=i-a,P=x-b-S;if(P>0){let L=r.height-s.top-s.bottom,R=Math.min(L,g+P);this.sizingTarget.style.maxHeight=`${R}px`;let F=this.sizingTarget.offsetHeight,z=F-x,U;c.verticalAlign==="top"?U=y:c.verticalAlign==="middle"?U=y-z/2:c.verticalAlign==="bottom"&&(U=y-z),U=Math.max(r.top+s.top,Math.min(U,r.bottom-s.bottom-F)),this.style.top=`${U}px`}let k=this.sizingTarget.offsetWidth,O=this.sizingTarget.clientWidth,D=n-o,I=k-O-D;if(I>0){let L=Rbe(),R=r.width-s.left-s.right,F=Math.min(R,d+I-L);this.sizingTarget.style.maxWidth=`${F}px`;let z=this.sizingTarget.offsetWidth+L,U=z-k,W;c.horizontalAlign==="left"?W=_:c.horizontalAlign==="center"?W=_-U/2:c.horizontalAlign==="right"&&(W=_-U),W=Math.max(r.left+s.left,Math.min(W,r.right-s.right-z)),this.style.left=`${W}px`}}},constrain:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo;e.positionedBy.vertically||(this.style.position="fixed",this.style.top="0px"),e.positionedBy.horizontally||(this.style.position="fixed",this.style.left="0px"),this.sizingTarget.style.boxSizing="border-box";var t=this.getBoundingClientRect();e.sizedBy.height||this.__sizeDimension(t,e.positionedBy.vertically,"top","bottom","Height"),e.sizedBy.width||this.__sizeDimension(t,e.positionedBy.horizontally,"left","right","Width")}},_sizeDimension:function(e,t,r,n,i){this.__sizeDimension(e,t,r,n,i)},__sizeDimension:function(e,t,r,n,i){var o=this._fitInfo,a=this.__getNormalizedRect(this.fitInto),s=i==="Width"?a.width:a.height,l=t===n,c=l?s-e[n]:e[r],u=o.margin[l?r:n],h="offset"+i,f=this[h]-this.sizingTarget[h];this.sizingTarget.style["max"+i]=s-u-c-f+"px"},center:function(){if(!this.__shouldPosition){this._discoverInfo();var e=this._fitInfo.positionedBy;if(!(e.vertically&&e.horizontally)){this.style.position="fixed",e.vertically||(this.style.top="0px"),e.horizontally||(this.style.left="0px");var t=this.getBoundingClientRect(),r=this.__getNormalizedRect(this.fitInto);if(!e.vertically){var n=r.top-t.top+(r.height-t.height)/2;this.style.top=n+"px"}if(!e.horizontally){var i=r.left-t.left+(r.width-t.width)/2;this.style.left=i+"px"}}}},__getNormalizedRect:function(e){return e===document.documentElement||e===window?{top:0,left:0,width:window.innerWidth,height:window.innerHeight,right:window.innerWidth,bottom:window.innerHeight}:e.getBoundingClientRect()},__getOffscreenArea:function(e,t,r){var n=Math.min(0,e.top)+Math.min(0,r.bottom-(e.top+t.height)),i=Math.min(0,e.left)+Math.min(0,r.right-(e.left+t.width));return Math.abs(n)*t.width+Math.abs(i)*t.height},__getPosition:function(e,t,r,n,i,o){var a=[{verticalAlign:"top",horizontalAlign:"left",top:i.top+this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"top",horizontalAlign:"right",top:i.top+this.verticalOffset,left:i.right-r.width-this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"left",top:i.bottom-r.height-this.verticalOffset,left:i.left+this.horizontalOffset},{verticalAlign:"bottom",horizontalAlign:"right",top:i.bottom-r.height-this.verticalOffset,left:i.right-r.width-this.horizontalOffset}];if(this.noOverlap){for(var s=0,l=a.length;s<l;s++){var c={};for(var u in a[s])c[u]=a[s][u];a.push(c)}a[0].top=a[1].top+=i.height,a[2].top=a[3].top-=i.height,a[4].left=a[6].left+=i.width,a[5].left=a[7].left-=i.width}t=t==="auto"?null:t,e=e==="auto"?null:e,(!e||e==="center")&&(a.push({verticalAlign:"top",horizontalAlign:"center",top:i.top+this.verticalOffset+(this.noOverlap?i.height:0),left:i.left-n.width/2+i.width/2+this.horizontalOffset}),a.push({verticalAlign:"bottom",horizontalAlign:"center",top:i.bottom-r.height-this.verticalOffset-(this.noOverlap?i.height:0),left:i.left-n.width/2+i.width/2+this.horizontalOffset})),(!t||t==="middle")&&(a.push({verticalAlign:"middle",horizontalAlign:"left",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.left+this.horizontalOffset+(this.noOverlap?i.width:0)}),a.push({verticalAlign:"middle",horizontalAlign:"right",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.right-r.width-this.horizontalOffset-(this.noOverlap?i.width:0)})),t==="middle"&&e==="center"&&a.push({verticalAlign:"middle",horizontalAlign:"center",top:i.top-n.height/2+i.height/2+this.verticalOffset,left:i.left-n.width/2+i.width/2+this.horizontalOffset});for(var h,s=0;s<a.length;s++){var f=a[s],p=f.verticalAlign===t,d=f.horizontalAlign===e;if(!this.dynamicAlign&&!this.noOverlap&&p&&d){h=f;break}var g=(!t||p)&&(!e||d);if(!(!this.dynamicAlign&&!g)){if(f.offscreenArea=this.__getOffscreenArea(f,r,o),f.offscreenArea===0&&g){h=f;break}h=h||f;var _=f.offscreenArea-h.offscreenArea;(_<0||_===0&&(p||d))&&(h=f)}}return h}};var $x=Element.prototype,S9=$x.matches||$x.matchesSelector||$x.mozMatchesSelector||$x.msMatchesSelector||$x.oMatchesSelector||$x.webkitMatchesSelector,dW=class{getTabbableNodes(t){var r=[],n=this._collectTabbableNodes(t,r);return n?this._sortByTabIndex(r):r}isFocusable(t){return S9.call(t,"input, select, textarea, button, object")?S9.call(t,":not([disabled])"):S9.call(t,"a[href], area[href], iframe, [tabindex], [contentEditable]")}isTabbable(t){return this.isFocusable(t)&&S9.call(t,':not([tabindex="-1"])')&&this._isVisible(t)}_normalizedTabIndex(t){if(this.isFocusable(t)){var r=t.getAttribute("tabindex")||0;return Number(r)}return-1}_collectTabbableNodes(t,r){if(t.nodeType!==Node.ELEMENT_NODE)return!1;var n=t;if(!this._isVisible(n))return!1;var i=this._normalizedTabIndex(n),o=i>0;i>=0&&r.push(n);var a;n.localName==="content"||n.localName==="slot"?a=zt(n).getDistributedNodes():a=zt(n.root||n).children;for(var s=0;s<a.length;s++)o=this._collectTabbableNodes(a[s],r)||o;return o}_isVisible(t){var r=t.style;return r.visibility!=="hidden"&&r.display!=="none"?(r=window.getComputedStyle(t),r.visibility!=="hidden"&&r.display!=="none"):!1}_sortByTabIndex(t){var r=t.length;if(r<2)return t;var n=Math.ceil(r/2),i=this._sortByTabIndex(t.slice(0,n)),o=this._sortByTabIndex(t.slice(n));return this._mergeSortByTabIndex(i,o)}_mergeSortByTabIndex(t,r){for(var n=[];t.length>0&&r.length>0;)this._hasLowerTabOrder(t[0],r[0])?n.push(r.shift()):n.push(t.shift());return n.concat(t,r)}_hasLowerTabOrder(t,r){var n=Math.max(t.tabIndex,0),i=Math.max(r.tabIndex,0);return n===0||i===0?i>n:n>i}},x0t=new dW;Yt({_template:Q`
    <style>
      :host {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--iron-overlay-backdrop-background-color, #000);
        opacity: 0;
        transition: opacity 0.2s;
        pointer-events: none;
        @apply --iron-overlay-backdrop;
      }

      :host(.opened) {
        opacity: var(--iron-overlay-backdrop-opacity, 0.6);
        pointer-events: auto;
        @apply --iron-overlay-backdrop-opened;
      }
    </style>

    <slot></slot>
`,is:"iron-overlay-backdrop",properties:{opened:{reflectToAttribute:!0,type:Boolean,value:!1,observer:"_openedChanged"}},listeners:{transitionend:"_onTransitionend"},created:function(){this.__openedRaf=null},attached:function(){this.opened&&this._openedChanged(this.opened)},prepare:function(){this.opened&&!this.parentNode&&zt(document.body).appendChild(this)},open:function(){this.opened=!0},close:function(){this.opened=!1},complete:function(){!this.opened&&this.parentNode===document.body&&zt(this.parentNode).removeChild(this)},_onTransitionend:function(e){e&&e.target===this&&this.complete()},_openedChanged:function(e){if(e)this.prepare();else{var t=window.getComputedStyle(this);(t.transitionDuration==="0s"||t.opacity==0)&&this.complete()}!this.isAttached||(this.__openedRaf&&(window.cancelAnimationFrame(this.__openedRaf),this.__openedRaf=null),this.scrollTop=this.scrollTop,this.__openedRaf=window.requestAnimationFrame(function(){this.__openedRaf=null,this.toggleClass("opened",this.opened)}.bind(this)))}});var mW=class{constructor(){this._overlays=[],this._minimumZ=101,this._backdropElement=null,Em(document.documentElement,"tap",function(){}),document.addEventListener("tap",this._onCaptureClick.bind(this),!0),document.addEventListener("focus",this._onCaptureFocus.bind(this),!0),document.addEventListener("keydown",this._onCaptureKeyDown.bind(this),!0)}get backdropElement(){return this._backdropElement||(this._backdropElement=document.createElement("iron-overlay-backdrop")),this._backdropElement}get deepActiveElement(){var t=document.activeElement;for((!t||!(t instanceof Element))&&(t=document.body);t.root&&zt(t.root).activeElement;)t=zt(t.root).activeElement;return t}_bringOverlayAtIndexToFront(t){var r=this._overlays[t];if(!!r){var n=this._overlays.length-1,i=this._overlays[n];if(i&&this._shouldBeBehindOverlay(r,i)&&n--,!(t>=n)){var o=Math.max(this.currentOverlayZ(),this._minimumZ);for(this._getZ(r)<=o&&this._applyOverlayZ(r,o);t<n;)this._overlays[t]=this._overlays[t+1],t++;this._overlays[n]=r}}}addOrRemoveOverlay(t){t.opened?this.addOverlay(t):this.removeOverlay(t)}addOverlay(t){var r=this._overlays.indexOf(t);if(r>=0){this._bringOverlayAtIndexToFront(r),this.trackBackdrop();return}var n=this._overlays.length,i=this._overlays[n-1],o=Math.max(this._getZ(i),this._minimumZ),a=this._getZ(t);if(i&&this._shouldBeBehindOverlay(t,i)){this._applyOverlayZ(i,o),n--;var s=this._overlays[n-1];o=Math.max(this._getZ(s),this._minimumZ)}a<=o&&this._applyOverlayZ(t,o),this._overlays.splice(n,0,t),this.trackBackdrop()}removeOverlay(t){var r=this._overlays.indexOf(t);r!==-1&&(this._overlays.splice(r,1),this.trackBackdrop())}currentOverlay(){var t=this._overlays.length-1;return this._overlays[t]}currentOverlayZ(){return this._getZ(this.currentOverlay())}ensureMinimumZ(t){this._minimumZ=Math.max(this._minimumZ,t)}focusOverlay(){var t=this.currentOverlay();t&&t._applyFocus()}trackBackdrop(){var t=this._overlayWithBackdrop();!t&&!this._backdropElement||(this.backdropElement.style.zIndex=this._getZ(t)-1,this.backdropElement.opened=!!t,this.backdropElement.prepare())}getBackdrops(){for(var t=[],r=0;r<this._overlays.length;r++)this._overlays[r].withBackdrop&&t.push(this._overlays[r]);return t}backdropZ(){return this._getZ(this._overlayWithBackdrop())-1}_overlayWithBackdrop(){for(var t=this._overlays.length-1;t>=0;t--)if(this._overlays[t].withBackdrop)return this._overlays[t]}_getZ(t){var r=this._minimumZ;if(t){var n=Number(t.style.zIndex||window.getComputedStyle(t).zIndex);n===n&&(r=n)}return r}_setZ(t,r){t.style.zIndex=r}_applyOverlayZ(t,r){this._setZ(t,r+2)}_overlayInPath(t){t=t||[];for(var r=0;r<t.length;r++)if(t[r]._manager===this)return t[r]}_onCaptureClick(t){var r=this._overlays.length-1;if(r!==-1)for(var n=zt(t).path,i;(i=this._overlays[r])&&this._overlayInPath(n)!==i&&(i._onCaptureClick(t),i.allowClickThrough);)r--}_onCaptureFocus(t){var r=this.currentOverlay();r&&r._onCaptureFocus(t)}_onCaptureKeyDown(t){var r=this.currentOverlay();r&&(Oo.keyboardEventMatchesKeys(t,"esc")?r._onCaptureEsc(t):Oo.keyboardEventMatchesKeys(t,"tab")&&r._onCaptureTab(t))}_shouldBeBehindOverlay(t,r){return!t.alwaysOnTop&&r.alwaysOnTop}},b0t=new mW;var E9={pageX:0,pageY:0},w0t=null,gW=[],T9=["wheel","mousewheel","DOMMouseScroll","touchstart","touchmove"],M9,_W;function S0t(e){Ch.indexOf(e)>=0||(Ch.length===0&&Dbe(),Ch.push(e),_W=Ch[Ch.length-1],E0t=[],T0t=[])}function M0t(e){var t=Ch.indexOf(e);t!==-1&&(Ch.splice(t,1),_W=Ch[Ch.length-1],E0t=[],T0t=[],Ch.length===0&&Obe())}var Ch=[],E0t=null,T0t=null;function Nbe(e){if(e.cancelable&&zbe(e)&&e.preventDefault(),e.targetTouches){var t=e.targetTouches[0];E9.pageX=t.pageX,E9.pageY=t.pageY}}function Dbe(){M9=M9||Nbe.bind(void 0);for(var e=0,t=T9.length;e<t;e++)document.addEventListener(T9[e],M9,{capture:!0,passive:!1})}function Obe(){for(var e=0,t=T9.length;e<t;e++)document.removeEventListener(T9[e],M9,{capture:!0,passive:!1})}function zbe(e){var t=zt(e).rootTarget;if(e.type!=="touchmove"&&w0t!==t&&(w0t=t,gW=Fbe(zt(e).path)),!gW.length)return!0;if(e.type==="touchstart")return!1;var r=Hbe(e);return!Bbe(gW,r.deltaX,r.deltaY)}function Fbe(e){for(var t=[],r=e.indexOf(_W),n=0;n<=r;n++)if(e[n].nodeType===Node.ELEMENT_NODE){var i=e[n],o=i.style;o.overflow!=="scroll"&&o.overflow!=="auto"&&(o=window.getComputedStyle(i)),(o.overflow==="scroll"||o.overflow==="auto")&&t.push(i)}return t}function Bbe(e,t,r){if(!(!t&&!r))for(var n=Math.abs(r)>=Math.abs(t),i=0;i<e.length;i++){var o=e[i],a=!1;if(n?a=r<0?o.scrollTop>0:o.scrollTop<o.scrollHeight-o.clientHeight:a=t<0?o.scrollLeft>0:o.scrollLeft<o.scrollWidth-o.clientWidth,a)return o}}function Hbe(e){var t={deltaX:e.deltaX,deltaY:e.deltaY};if(!("deltaX"in e)){if("wheelDeltaX"in e&&"wheelDeltaY"in e)t.deltaX=-e.wheelDeltaX,t.deltaY=-e.wheelDeltaY;else if("wheelDelta"in e)t.deltaX=0,t.deltaY=-e.wheelDelta;else if("axis"in e)t.deltaX=e.axis===1?e.detail:0,t.deltaY=e.axis===2?e.detail:0;else if(e.targetTouches){var r=e.targetTouches[0];t.deltaX=E9.pageX-r.pageX,t.deltaY=E9.pageY-r.pageY}}return t}var Pm={properties:{opened:{observer:"_openedChanged",type:Boolean,value:!1,notify:!0},canceled:{observer:"_canceledChanged",readOnly:!0,type:Boolean,value:!1},withBackdrop:{observer:"_withBackdropChanged",type:Boolean},noAutoFocus:{type:Boolean,value:!1},noCancelOnEscKey:{type:Boolean,value:!1},noCancelOnOutsideClick:{type:Boolean,value:!1},closingReason:{type:Object},restoreFocusOnClose:{type:Boolean,value:!1},allowClickThrough:{type:Boolean},alwaysOnTop:{type:Boolean},scrollAction:{type:String},_manager:{type:Object,value:b0t},_focusedChild:{type:Object}},listeners:{"iron-resize":"_onIronResize"},observers:["__updateScrollObservers(isAttached, opened, scrollAction)"],get backdropElement(){return this._manager.backdropElement},get _focusNode(){return this._focusedChild||zt(this).querySelector("[autofocus]")||this},get _focusableNodes(){return x0t.getTabbableNodes(this)},ready:function(){this.__isAnimating=!1,this.__shouldRemoveTabIndex=!1,this.__firstFocusableNode=this.__lastFocusableNode=null,this.__rafs={},this.__restoreFocusNode=null,this.__scrollTop=this.__scrollLeft=null,this.__onCaptureScroll=this.__onCaptureScroll.bind(this),this.__rootNodes=null,this._ensureSetup()},attached:function(){this.opened&&this._openedChanged(this.opened),this._observer=zt(this).observeNodes(this._onNodesChange)},detached:function(){this._observer&&zt(this).unobserveNodes(this._observer),this._observer=null;for(var e in this.__rafs)this.__rafs[e]!==null&&cancelAnimationFrame(this.__rafs[e]);this.__rafs={},this._manager.removeOverlay(this),this.__isAnimating&&(this.opened?this._finishRenderOpened():(this._applyFocus(),this._finishRenderClosed()))},toggle:function(){this._setCanceled(!1),this.opened=!this.opened},open:function(){this._setCanceled(!1),this.opened=!0},close:function(){this._setCanceled(!1),this.opened=!1},cancel:function(e){var t=this.fire("iron-overlay-canceled",e,{cancelable:!0});t.defaultPrevented||(this._setCanceled(!0),this.opened=!1)},invalidateTabbables:function(){this.__firstFocusableNode=this.__lastFocusableNode=null},_ensureSetup:function(){this._overlaySetup||(this._overlaySetup=!0,this.style.outline="none",this.style.display="none")},_openedChanged:function(e){e?this.removeAttribute("aria-hidden"):this.setAttribute("aria-hidden","true"),this.isAttached&&(this.__isAnimating=!0,this.__deraf("__openedChanged",this.__openedChanged))},_canceledChanged:function(){this.closingReason=this.closingReason||{},this.closingReason.canceled=this.canceled},_withBackdropChanged:function(){this.withBackdrop&&!this.hasAttribute("tabindex")?(this.setAttribute("tabindex","-1"),this.__shouldRemoveTabIndex=!0):this.__shouldRemoveTabIndex&&(this.removeAttribute("tabindex"),this.__shouldRemoveTabIndex=!1),this.opened&&this.isAttached&&this._manager.trackBackdrop()},_prepareRenderOpened:function(){this.__restoreFocusNode=this._manager.deepActiveElement,this._preparePositioning(),this.refit(),this._finishPositioning(),this.noAutoFocus&&document.activeElement===this._focusNode&&(this._focusNode.blur(),this.__restoreFocusNode.focus())},_renderOpened:function(){this._finishRenderOpened()},_renderClosed:function(){this._finishRenderClosed()},_finishRenderOpened:function(){this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-opened")},_finishRenderClosed:function(){this.style.display="none",this.style.zIndex="",this.notifyResize(),this.__isAnimating=!1,this.fire("iron-overlay-closed",this.closingReason)},_preparePositioning:function(){this.style.transition=this.style.webkitTransition="none",this.style.transform=this.style.webkitTransform="none",this.style.display=""},_finishPositioning:function(){this.style.display="none",this.scrollTop=this.scrollTop,this.style.transition=this.style.webkitTransition="",this.style.transform=this.style.webkitTransform="",this.style.display="",this.scrollTop=this.scrollTop},_applyFocus:function(){if(this.opened)this.noAutoFocus||this._focusNode.focus();else{if(this.restoreFocusOnClose&&this.__restoreFocusNode){var e=this._manager.deepActiveElement;(e===document.body||Ube(this,e))&&this.__restoreFocusNode.focus()}this.__restoreFocusNode=null,this._focusNode.blur(),this._focusedChild=null}},_onCaptureClick:function(e){this.noCancelOnOutsideClick||this.cancel(e)},_onCaptureFocus:function(e){if(!!this.withBackdrop){var t=zt(e).path;t.indexOf(this)===-1?(e.stopPropagation(),this._applyFocus()):this._focusedChild=t[0]}},_onCaptureEsc:function(e){this.noCancelOnEscKey||this.cancel(e)},_onCaptureTab:function(e){if(!!this.withBackdrop){this.__ensureFirstLastFocusables();var t=e.shiftKey,r=t?this.__firstFocusableNode:this.__lastFocusableNode,n=t?this.__lastFocusableNode:this.__firstFocusableNode,i=!1;if(r===n)i=!0;else{var o=this._manager.deepActiveElement;i=o===r||o===this}i&&(e.preventDefault(),this._focusedChild=n,this._applyFocus())}},_onIronResize:function(){this.opened&&!this.__isAnimating&&this.__deraf("refit",this.refit)},_onNodesChange:function(){this.opened&&!this.__isAnimating&&(this.invalidateTabbables(),this.notifyResize())},__ensureFirstLastFocusables:function(){var e=this._focusableNodes;this.__firstFocusableNode=e[0],this.__lastFocusableNode=e[e.length-1]},__openedChanged:function(){this.opened?(this._prepareRenderOpened(),this._manager.addOverlay(this),this._applyFocus(),this._renderOpened()):(this._manager.removeOverlay(this),this._applyFocus(),this._renderClosed())},__deraf:function(e,t){var r=this.__rafs;r[e]!==null&&cancelAnimationFrame(r[e]),r[e]=requestAnimationFrame(function(){r[e]=null,t.call(this)}.bind(this))},__updateScrollObservers:function(e,t,r){!e||!t||!this.__isValidScrollAction(r)?(M0t(this),this.__removeScrollListeners()):(r==="lock"&&(this.__saveScrollPosition(),S0t(this)),this.__addScrollListeners())},__addScrollListeners:function(){if(!this.__rootNodes){if(this.__rootNodes=[],c_)for(var e=this;e;)e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host&&this.__rootNodes.push(e),e=e.host||e.assignedSlot||e.parentNode;this.__rootNodes.push(document)}this.__rootNodes.forEach(function(t){t.addEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this)},__removeScrollListeners:function(){this.__rootNodes&&this.__rootNodes.forEach(function(e){e.removeEventListener("scroll",this.__onCaptureScroll,{capture:!0,passive:!0})},this),this.isAttached||(this.__rootNodes=null)},__isValidScrollAction:function(e){return e==="lock"||e==="refit"||e==="cancel"},__onCaptureScroll:function(e){if(!this.__isAnimating&&!(zt(e).path.indexOf(this)>=0))switch(this.scrollAction){case"lock":this.__restoreScrollPosition();break;case"refit":this.__deraf("refit",this.refit);break;case"cancel":this.cancel(e);break}},__saveScrollPosition:function(){document.scrollingElement?(this.__scrollTop=document.scrollingElement.scrollTop,this.__scrollLeft=document.scrollingElement.scrollLeft):(this.__scrollTop=Math.max(document.documentElement.scrollTop,document.body.scrollTop),this.__scrollLeft=Math.max(document.documentElement.scrollLeft,document.body.scrollLeft))},__restoreScrollPosition:function(){document.scrollingElement?(document.scrollingElement.scrollTop=this.__scrollTop,document.scrollingElement.scrollLeft=this.__scrollLeft):(document.documentElement.scrollTop=document.body.scrollTop=this.__scrollTop,document.documentElement.scrollLeft=document.body.scrollLeft=this.__scrollLeft)}},Vbe=e=>e.assignedSlot||e.parentNode||e.host,Ube=(e,t)=>{for(let r=t;r;r=Vbe(r))if(r===e)return!0;return!1},Kx=[v0t,Js,Pm];var yW={hostAttributes:{role:"dialog",tabindex:"-1"},properties:{modal:{type:Boolean,value:!1},__readied:{type:Boolean,value:!1}},observers:["_modalChanged(modal, __readied)"],listeners:{tap:"_onDialogClick"},ready:function(){this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.__readied=!0},_modalChanged:function(e,t){!t||(e?(this.__prevNoCancelOnOutsideClick=this.noCancelOnOutsideClick,this.__prevNoCancelOnEscKey=this.noCancelOnEscKey,this.__prevWithBackdrop=this.withBackdrop,this.noCancelOnOutsideClick=!0,this.noCancelOnEscKey=!0,this.withBackdrop=!0):(this.noCancelOnOutsideClick=this.noCancelOnOutsideClick&&this.__prevNoCancelOnOutsideClick,this.noCancelOnEscKey=this.noCancelOnEscKey&&this.__prevNoCancelOnEscKey,this.withBackdrop=this.withBackdrop&&this.__prevWithBackdrop))},_updateClosingReasonConfirmed:function(e){this.closingReason=this.closingReason||{},this.closingReason.confirmed=e},_onDialogClick:function(e){for(var t=zt(e).path,r=0,n=t.indexOf(this);r<n;r++){var i=t[r];if(i.hasAttribute&&(i.hasAttribute("dialog-dismiss")||i.hasAttribute("dialog-confirm"))){this._updateClosingReasonConfirmed(i.hasAttribute("dialog-confirm")),this.close(),e.stopPropagation();break}}}},C0t=[Kx,yW];Yt({_template:Q`
    <style include="paper-dialog-shared-styles"></style>
    <slot></slot>
`,is:"paper-dialog",behaviors:[C0t,b9],listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},_renderOpened:function(){this.cancelAnimation(),this.playAnimation("entry")},_renderClosed:function(){this.cancelAnimation(),this.playAnimation("exit")},_onNeonAnimationFinish:function(){this.opened?this._finishRenderOpened():this._finishRenderClosed()}});Yt({_template:Q`
    <style>

      :host {
        display: block;
        @apply --layout-relative;
      }

      :host(.is-scrolled:not(:first-child))::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--divider-color);
      }

      :host(.can-scroll:not(.scrolled-to-bottom):not(:last-child))::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 1px;
        background: var(--divider-color);
      }

      .scrollable {
        padding: 0 24px;

        @apply --layout-scroll;
        @apply --paper-dialog-scrollable;
      }

      .fit {
        @apply --layout-fit;
      }
    </style>

    <div id="scrollable" class="scrollable" on-scroll="updateScrollState">
      <slot></slot>
    </div>
`,is:"paper-dialog-scrollable",properties:{dialogElement:{type:Object}},get scrollTarget(){return this.$.scrollable},ready:function(){this._ensureTarget(),this.classList.add("no-padding")},attached:function(){this._ensureTarget(),requestAnimationFrame(this.updateScrollState.bind(this))},updateScrollState:function(){this.toggleClass("is-scrolled",this.scrollTarget.scrollTop>0),this.toggleClass("can-scroll",this.scrollTarget.offsetHeight<this.scrollTarget.scrollHeight),this.toggleClass("scrolled-to-bottom",this.scrollTarget.scrollTop+this.scrollTarget.offsetHeight>=this.scrollTarget.scrollHeight)},_ensureTarget:function(){this.dialogElement=this.dialogElement||this.parentElement,this.dialogElement&&this.dialogElement.behaviors&&this.dialogElement.behaviors.indexOf(yW)>=0?(this.dialogElement.sizingTarget=this.scrollTarget,this.scrollTarget.classList.remove("fit")):this.dialogElement&&this.scrollTarget.classList.add("fit")}});var ec=Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: fixed;
        clip: rect(0px,0px,0px,0px);
      }
    </style>
    <div aria-live$="[[mode]]">[[_text]]</div>
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){ec.instance||(ec.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async(function(){this._text=e},this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});ec.instance=null;ec.requestAvailability=function(){ec.instance||(ec.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(ec.instance):document.addEventListener("load",function(){document.body.appendChild(ec.instance)})};Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
      }
    </style>
    <slot id="content"></slot>
`,is:"iron-input",behaviors:[Th],properties:{bindValue:{type:String,value:""},value:{type:String,computed:"_computeValue(bindValue)"},allowedPattern:{type:String},autoValidate:{type:Boolean,value:!1},_inputElement:Object},observers:["_bindValueChanged(bindValue, _inputElement)"],listeners:{input:"_onInput",keypress:"_onKeypress"},created:function(){ec.requestAvailability(),this._previousValidInput="",this._patternAlreadyChecked=!1},attached:function(){this._observer=zt(this).observeNodes(function(e){this._initSlottedInput()}.bind(this))},detached:function(){this._observer&&(zt(this).unobserveNodes(this._observer),this._observer=null)},get inputElement(){return this._inputElement},_initSlottedInput:function(){this._inputElement=this.getEffectiveChildren()[0],this.inputElement&&this.inputElement.value&&(this.bindValue=this.inputElement.value),this.fire("iron-input-ready")},get _patternRegExp(){var e;if(this.allowedPattern)e=new RegExp(this.allowedPattern);else switch(this.inputElement.type){case"number":e=/[0-9.,e-]/;break}return e},_bindValueChanged:function(e,t){!t||(e===void 0?t.value=null:e!==t.value&&(this.inputElement.value=e),this.autoValidate&&this.validate(),this.fire("bind-value-changed",{value:e}))},_onInput:function(){if(this.allowedPattern&&!this._patternAlreadyChecked){var e=this._checkPatternValidity();e||(this._announceInvalidCharacter("Invalid string of characters not entered."),this.inputElement.value=this._previousValidInput)}this.bindValue=this._previousValidInput=this.inputElement.value,this._patternAlreadyChecked=!1},_isPrintable:function(e){var t=e.keyCode==8||e.keyCode==9||e.keyCode==13||e.keyCode==27,r=e.keyCode==19||e.keyCode==20||e.keyCode==45||e.keyCode==46||e.keyCode==144||e.keyCode==145||e.keyCode>32&&e.keyCode<41||e.keyCode>111&&e.keyCode<124;return!t&&!(e.charCode==0&&r)},_onKeypress:function(e){if(!(!this.allowedPattern&&this.inputElement.type!=="number")){var t=this._patternRegExp;if(!!t&&!(e.metaKey||e.ctrlKey||e.altKey)){this._patternAlreadyChecked=!0;var r=String.fromCharCode(e.charCode);this._isPrintable(e)&&!t.test(r)&&(e.preventDefault(),this._announceInvalidCharacter("Invalid character "+r+" not entered."))}}},_checkPatternValidity:function(){var e=this._patternRegExp;if(!e)return!0;for(var t=0;t<this.inputElement.value.length;t++)if(!e.test(this.inputElement.value[t]))return!1;return!0},validate:function(){if(!this.inputElement)return this.invalid=!1,!0;var e=this.inputElement.checkValidity();return e&&(this.required&&this.bindValue===""?e=!1:this.hasValidator()&&(e=Th.validate.call(this,this.bindValue))),this.invalid=!e,this.fire("iron-input-validate"),e},_announceInvalidCharacter:function(e){this.fire("iron-announce",{text:e})},_computeValue:function(e){return e}});var C9={attached:function(){this.fire("addon-attached")},update:function(e){}};Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        float: right;

        @apply --paper-font-caption;
        @apply --paper-input-char-counter;
      }

      :host([hidden]) {
        display: none !important;
      }

      :host(:dir(rtl)) {
        float: left;
      }
    </style>

    <span>[[_charCounterStr]]</span>
`,is:"paper-input-char-counter",behaviors:[C9],properties:{_charCounterStr:{type:String,value:"0"}},update:function(e){if(!!e.inputElement){e.value=e.value||"";var t=e.value.toString().length.toString();e.inputElement.hasAttribute("maxlength")&&(t+="/"+e.inputElement.getAttribute("maxlength")),this._charCounterStr=t}}});var A0t=Q`
<custom-style>
  <style is="custom-style">
    html {
      --paper-input-container-shared-input-style: {
        position: relative; /* to make a stacking context */
        outline: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
        max-width: 100%;
        background: transparent;
        border: none;
        color: var(--paper-input-container-input-color, var(--primary-text-color));
        -webkit-appearance: none;
        text-align: inherit;
        vertical-align: var(--paper-input-container-input-align, bottom);

        @apply --paper-font-subhead;
      };
    }
  </style>
</custom-style>
`;A0t.setAttribute("style","display: none;");document.head.appendChild(A0t.content);Yt({_template:Q`
    <style>
      :host {
        display: block;
        padding: 8px 0;
        @apply --paper-input-container;
      }

      :host([inline]) {
        display: inline-block;
      }

      :host([disabled]) {
        pointer-events: none;
        opacity: 0.33;

        @apply --paper-input-container-disabled;
      }

      :host([hidden]) {
        display: none !important;
      }

      [hidden] {
        display: none !important;
      }

      .floated-label-placeholder {
        @apply --paper-font-caption;
      }

      .underline {
        height: 2px;
        position: relative;
      }

      .focused-line {
        @apply --layout-fit;
        border-bottom: 2px solid var(--paper-input-container-focus-color, var(--primary-color));

        -webkit-transform-origin: center center;
        transform-origin: center center;
        -webkit-transform: scale3d(0,1,1);
        transform: scale3d(0,1,1);

        @apply --paper-input-container-underline-focus;
      }

      .underline.is-highlighted .focused-line {
        -webkit-transform: none;
        transform: none;
        -webkit-transition: -webkit-transform 0.25s;
        transition: transform 0.25s;

        @apply --paper-transition-easing;
      }

      .underline.is-invalid .focused-line {
        border-color: var(--paper-input-container-invalid-color, var(--error-color));
        -webkit-transform: none;
        transform: none;
        -webkit-transition: -webkit-transform 0.25s;
        transition: transform 0.25s;

        @apply --paper-transition-easing;
      }

      .unfocused-line {
        @apply --layout-fit;
        border-bottom: 1px solid var(--paper-input-container-color, var(--secondary-text-color));
        @apply --paper-input-container-underline;
      }

      :host([disabled]) .unfocused-line {
        border-bottom: 1px dashed;
        border-color: var(--paper-input-container-color, var(--secondary-text-color));
        @apply --paper-input-container-underline-disabled;
      }

      .input-wrapper {
        @apply --layout-horizontal;
        @apply --layout-center;
        position: relative;
      }

      .input-content {
        @apply --layout-flex-auto;
        @apply --layout-relative;
        max-width: 100%;
      }

      .input-content ::slotted(label),
      .input-content ::slotted(.paper-input-label) {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        font: inherit;
        color: var(--paper-input-container-color, var(--secondary-text-color));
        -webkit-transition: -webkit-transform 0.25s, width 0.25s;
        transition: transform 0.25s, width 0.25s;
        -webkit-transform-origin: left top;
        transform-origin: left top;
        /* Fix for safari not focusing 0-height date/time inputs with -webkit-apperance: none; */
        min-height: 1px;

        @apply --paper-font-common-nowrap;
        @apply --paper-font-subhead;
        @apply --paper-input-container-label;
        @apply --paper-transition-easing;
      }


      .input-content ::slotted(label):before,
      .input-content ::slotted(.paper-input-label):before {
        @apply --paper-input-container-label-before;
      }

      .input-content ::slotted(label):after,
      .input-content ::slotted(.paper-input-label):after {
        @apply --paper-input-container-label-after;
      }

      .input-content.label-is-floating ::slotted(label),
      .input-content.label-is-floating ::slotted(.paper-input-label) {
        -webkit-transform: translateY(-75%) scale(0.75);
        transform: translateY(-75%) scale(0.75);

        /* Since we scale to 75/100 of the size, we actually have 100/75 of the
        original space now available */
        width: 133%;

        @apply --paper-input-container-label-floating;
      }

      :host(:dir(rtl)) .input-content.label-is-floating ::slotted(label),
      :host(:dir(rtl)) .input-content.label-is-floating ::slotted(.paper-input-label) {
        right: 0;
        left: auto;
        -webkit-transform-origin: right top;
        transform-origin: right top;
      }

      .input-content.label-is-highlighted ::slotted(label),
      .input-content.label-is-highlighted ::slotted(.paper-input-label) {
        color: var(--paper-input-container-focus-color, var(--primary-color));

        @apply --paper-input-container-label-focus;
      }

      .input-content.is-invalid ::slotted(label),
      .input-content.is-invalid ::slotted(.paper-input-label) {
        color: var(--paper-input-container-invalid-color, var(--error-color));
      }

      .input-content.label-is-hidden ::slotted(label),
      .input-content.label-is-hidden ::slotted(.paper-input-label) {
        visibility: hidden;
      }

      .input-content ::slotted(input),
      .input-content ::slotted(iron-input),
      .input-content ::slotted(textarea),
      .input-content ::slotted(iron-autogrow-textarea),
      .input-content ::slotted(.paper-input-input) {
        @apply --paper-input-container-shared-input-style;
        /* The apply shim doesn't apply the nested color custom property,
          so we have to re-apply it here. */
        color: var(--paper-input-container-input-color, var(--primary-text-color));
        @apply --paper-input-container-input;
      }

      .input-content ::slotted(input)::-webkit-outer-spin-button,
      .input-content ::slotted(input)::-webkit-inner-spin-button {
        @apply --paper-input-container-input-webkit-spinner;
      }

      .input-content.focused ::slotted(input),
      .input-content.focused ::slotted(iron-input),
      .input-content.focused ::slotted(textarea),
      .input-content.focused ::slotted(iron-autogrow-textarea),
      .input-content.focused ::slotted(.paper-input-input) {
        @apply --paper-input-container-input-focus;
      }

      .input-content.is-invalid ::slotted(input),
      .input-content.is-invalid ::slotted(iron-input),
      .input-content.is-invalid ::slotted(textarea),
      .input-content.is-invalid ::slotted(iron-autogrow-textarea),
      .input-content.is-invalid ::slotted(.paper-input-input) {
        @apply --paper-input-container-input-invalid;
      }

      .prefix ::slotted(*) {
        display: inline-block;
        @apply --paper-font-subhead;
        @apply --layout-flex-none;
        @apply --paper-input-prefix;
      }

      .suffix ::slotted(*) {
        display: inline-block;
        @apply --paper-font-subhead;
        @apply --layout-flex-none;

        @apply --paper-input-suffix;
      }

      /* Firefox sets a min-width on the input, which can cause layout issues */
      .input-content ::slotted(input) {
        min-width: 0;
      }

      .input-content ::slotted(textarea) {
        resize: none;
      }

      .add-on-content {
        position: relative;
      }

      .add-on-content.is-invalid ::slotted(*) {
        color: var(--paper-input-container-invalid-color, var(--error-color));
      }

      .add-on-content.is-highlighted ::slotted(*) {
        color: var(--paper-input-container-focus-color, var(--primary-color));
      }
    </style>

    <div class="floated-label-placeholder" aria-hidden="true" hidden="[[noLabelFloat]]">&nbsp;</div>

    <div class="input-wrapper">
      <span class="prefix"><slot name="prefix"></slot></span>

      <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]" id="labelAndInputContainer">
        <slot name="label"></slot>
        <slot name="input"></slot>
      </div>

      <span class="suffix"><slot name="suffix"></slot></span>
    </div>

    <div class$="[[_computeUnderlineClass(focused,invalid)]]">
      <div class="unfocused-line"></div>
      <div class="focused-line"></div>
    </div>

    <div class$="[[_computeAddOnContentClass(focused,invalid)]]">
      <slot name="add-on"></slot>
    </div>
`,is:"paper-input-container",properties:{noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},attrForValue:{type:String,value:"bind-value"},autoValidate:{type:Boolean,value:!1},invalid:{observer:"_invalidChanged",type:Boolean,value:!1},focused:{readOnly:!0,type:Boolean,value:!1,notify:!0},_addons:{type:Array},_inputHasContent:{type:Boolean,value:!1},_inputSelector:{type:String,value:"input,iron-input,textarea,.paper-input-input"},_boundOnFocus:{type:Function,value:function(){return this._onFocus.bind(this)}},_boundOnBlur:{type:Function,value:function(){return this._onBlur.bind(this)}},_boundOnInput:{type:Function,value:function(){return this._onInput.bind(this)}},_boundValueChanged:{type:Function,value:function(){return this._onValueChanged.bind(this)}}},listeners:{"addon-attached":"_onAddonAttached","iron-input-validate":"_onIronInputValidate"},get _valueChangedEvent(){return this.attrForValue+"-changed"},get _propertyForValue(){return wm(this.attrForValue)},get _inputElement(){return zt(this).querySelector(this._inputSelector)},get _inputElementValue(){return this._inputElement[this._propertyForValue]||this._inputElement.value},ready:function(){this.__isFirstValueUpdate=!0,this._addons||(this._addons=[]),this.addEventListener("focus",this._boundOnFocus,!0),this.addEventListener("blur",this._boundOnBlur,!0)},attached:function(){this.attrForValue?this._inputElement.addEventListener(this._valueChangedEvent,this._boundValueChanged):this.addEventListener("input",this._onInput),this._inputElementValue&&this._inputElementValue!=""?this._handleValueAndAutoValidate(this._inputElement):this._handleValue(this._inputElement)},_onAddonAttached:function(e){this._addons||(this._addons=[]);var t=e.target;this._addons.indexOf(t)===-1&&(this._addons.push(t),this.isAttached&&this._handleValue(this._inputElement))},_onFocus:function(){this._setFocused(!0)},_onBlur:function(){this._setFocused(!1),this._handleValueAndAutoValidate(this._inputElement)},_onInput:function(e){this._handleValueAndAutoValidate(e.target)},_onValueChanged:function(e){var t=e.target;this.__isFirstValueUpdate&&(this.__isFirstValueUpdate=!1,t.value===void 0||t.value==="")||this._handleValueAndAutoValidate(e.target)},_handleValue:function(e){var t=this._inputElementValue;t||t===0||e.type==="number"&&!e.checkValidity()?this._inputHasContent=!0:this._inputHasContent=!1,this.updateAddons({inputElement:e,value:t,invalid:this.invalid})},_handleValueAndAutoValidate:function(e){if(this.autoValidate&&e){var t;e.validate?t=e.validate(this._inputElementValue):t=e.checkValidity(),this.invalid=!t}this._handleValue(e)},_onIronInputValidate:function(e){this.invalid=this._inputElement.invalid},_invalidChanged:function(){this._addons&&this.updateAddons({invalid:this.invalid})},updateAddons:function(e){for(var t,r=0;t=this._addons[r];r++)t.update(e)},_computeInputContentClass:function(e,t,r,n,i){var o="input-content";if(e)i&&(o+=" label-is-hidden"),n&&(o+=" is-invalid");else{var a=this.querySelector("label");t||i?(o+=" label-is-floating",this.$.labelAndInputContainer.style.position="static",n?o+=" is-invalid":r&&(o+=" label-is-highlighted")):(a&&(this.$.labelAndInputContainer.style.position="relative"),n&&(o+=" is-invalid"))}return r&&(o+=" focused"),o},_computeUnderlineClass:function(e,t){var r="underline";return t?r+=" is-invalid":e&&(r+=" is-highlighted"),r},_computeAddOnContentClass:function(e,t){var r="add-on-content";return t?r+=" is-invalid":e&&(r+=" is-highlighted"),r}});Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        visibility: hidden;

        color: var(--paper-input-container-invalid-color, var(--error-color));

        @apply --paper-font-caption;
        @apply --paper-input-error;
        position: absolute;
        left:0;
        right:0;
      }

      :host([invalid]) {
        visibility: visible;
      }

      #a11yWrapper {
        visibility: hidden;
      }

      :host([invalid]) #a11yWrapper {
        visibility: visible;
      }
    </style>

    <!--
    If the paper-input-error element is directly referenced by an
    \`aria-describedby\` attribute, such as when used as a paper-input add-on,
    then applying \`visibility: hidden;\` to the paper-input-error element itself
    does not hide the error.

    For more information, see:
    https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
    -->
    <div id="a11yWrapper">
      <slot></slot>
    </div>
`,is:"paper-input-error",behaviors:[C9],properties:{invalid:{readOnly:!0,reflectToAttribute:!0,type:Boolean}},update:function(e){this._setInvalid(e.invalid)}});var Zx={};Zx.NextLabelID=1;Zx.NextAddonID=1;Zx.NextInputID=1;var qbe={properties:{label:{type:String},value:{notify:!0,type:String},disabled:{type:Boolean,value:!1},invalid:{type:Boolean,value:!1,notify:!0},allowedPattern:{type:String},type:{type:String},list:{type:String},pattern:{type:String},required:{type:Boolean,value:!1},errorMessage:{type:String},charCounter:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1},alwaysFloatLabel:{type:Boolean,value:!1},autoValidate:{type:Boolean,value:!1},validator:{type:String},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,observer:"_autofocusChanged"},inputmode:{type:String},minlength:{type:Number},maxlength:{type:Number},min:{type:String},max:{type:String},step:{type:String},name:{type:String},placeholder:{type:String,value:""},readonly:{type:Boolean,value:!1},size:{type:Number},autocapitalize:{type:String,value:"none"},autocorrect:{type:String,value:"off"},autosave:{type:String},results:{type:Number},accept:{type:String},multiple:{type:Boolean},_ariaDescribedBy:{type:String,value:""},_ariaLabelledBy:{type:String,value:""},_inputId:{type:String,value:""}},listeners:{"addon-attached":"_onAddonAttached"},keyBindings:{"shift+tab:keydown":"_onShiftTabDown"},hostAttributes:{tabindex:0},get inputElement(){return this.$||(this.$={}),this.$.input||(this._generateInputId(),this.$.input=this.$$("#"+this._inputId)),this.$.input},get _focusableElement(){return this.inputElement},created:function(){this._typesThatHaveText=["date","datetime","datetime-local","month","time","week","file"]},attached:function(){this._updateAriaLabelledBy(),!mt&&this.inputElement&&this._typesThatHaveText.indexOf(this.inputElement.type)!==-1&&(this.alwaysFloatLabel=!0)},_appendStringWithSpace:function(e,t){return e?e=e+" "+t:e=t,e},_onAddonAttached:function(e){var t=zt(e).rootTarget;if(t.id)this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,t.id);else{var r="paper-input-add-on-"+Zx.NextAddonID++;t.id=r,this._ariaDescribedBy=this._appendStringWithSpace(this._ariaDescribedBy,r)}},validate:function(){return this.inputElement.validate()},_focusBlurHandler:function(e){Di._focusBlurHandler.call(this,e),this.focused&&!this._shiftTabPressed&&this._focusableElement&&this._focusableElement.focus()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");this._shiftTabPressed=!0,this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),this._shiftTabPressed=!1},1)},_handleAutoValidate:function(){this.autoValidate&&this.validate()},updateValueAndPreserveCaret:function(e){try{var t=this.inputElement.selectionStart;this.value=e,this.inputElement.selectionStart=t,this.inputElement.selectionEnd=t}catch(r){this.value=e}},_computeAlwaysFloatLabel:function(e,t){return t||e},_updateAriaLabelledBy:function(){var e=zt(this.root).querySelector("label");if(!e){this._ariaLabelledBy="";return}var t;e.id?t=e.id:(t="paper-input-label-"+Zx.NextLabelID++,e.id=t),this._ariaLabelledBy=t},_generateInputId:function(){(!this._inputId||this._inputId==="")&&(this._inputId="input-"+Zx.NextInputID++)},_onChange:function(e){this.shadowRoot&&this.fire(e.type,{sourceEvent:e},{node:this,bubbles:e.bubbles,cancelable:e.cancelable})},_autofocusChanged:function(){if(this.autofocus&&this._focusableElement){var e=document.activeElement,t=e instanceof HTMLElement,r=t&&e!==document.body&&e!==document.documentElement;r||this._focusableElement.focus()}}},A9=[Di,Oo,qbe];Yt({is:"paper-input",_template:Q`
    <style>
      :host {
        display: block;
      }

      :host([focused]) {
        outline: none;
      }

      :host([hidden]) {
        display: none !important;
      }

      input {
        /* Firefox sets a min-width on the input, which can cause layout issues */
        min-width: 0;
      }

      /* In 1.x, the <input> is distributed to paper-input-container, which styles it.
      In 2.x the <iron-input> is distributed to paper-input-container, which styles
      it, but in order for this to work correctly, we need to reset some
      of the native input's properties to inherit (from the iron-input) */
      iron-input > input {
        @apply --paper-input-container-shared-input-style;
        font-family: inherit;
        font-weight: inherit;
        font-size: inherit;
        letter-spacing: inherit;
        word-spacing: inherit;
        line-height: inherit;
        text-shadow: inherit;
        color: inherit;
        cursor: inherit;
      }

      input:disabled {
        @apply --paper-input-container-input-disabled;
      }

      input::-webkit-outer-spin-button,
      input::-webkit-inner-spin-button {
        @apply --paper-input-container-input-webkit-spinner;
      }

      input::-webkit-clear-button {
        @apply --paper-input-container-input-webkit-clear;
      }

      input::-webkit-calendar-picker-indicator {
        @apply --paper-input-container-input-webkit-calendar-picker-indicator;
      }

      input::-webkit-input-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input:-moz-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input::-moz-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      input::-ms-clear {
        @apply --paper-input-container-ms-clear;
      }

      input::-ms-reveal {
        @apply --paper-input-container-ms-reveal;
      }

      input:-ms-input-placeholder {
        color: var(--paper-input-container-color, var(--secondary-text-color));
      }

      label {
        pointer-events: none;
      }
    </style>

    <paper-input-container id="container" no-label-float="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">

      <slot name="prefix" slot="prefix"></slot>

      <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>

      <!-- Need to bind maxlength so that the paper-input-char-counter works correctly -->
      <iron-input bind-value="{{value}}" slot="input" class="input-element" id$="[[_inputId]]" maxlength$="[[maxlength]]" allowed-pattern="[[allowedPattern]]" invalid="{{invalid}}" validator="[[validator]]">
        <input aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" title$="[[title]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]" on-change="_onChange" tabindex$="[[tabIndex]]" autosave$="[[autosave]]" results$="[[results]]" accept$="[[accept]]" multiple$="[[multiple]]" role$="[[inputRole]]" aria-haspopup$="[[inputAriaHaspopup]]">
      </iron-input>

      <slot name="suffix" slot="suffix"></slot>

      <template is="dom-if" if="[[errorMessage]]">
        <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>
      </template>

      <template is="dom-if" if="[[charCounter]]">
        <paper-input-char-counter slot="add-on"></paper-input-char-counter>
      </template>

    </paper-input-container>
  `,behaviors:[A9,Eh],properties:{value:{type:String},inputRole:{type:String,value:void 0},inputAriaHaspopup:{type:String,value:void 0}},get _focusableElement(){return this.inputElement._inputElement},listeners:{"iron-input-ready":"_onIronInputReady"},_onIronInputReady:function(){this.$.nativeInput||(this.$.nativeInput=this.$$("input")),this.inputElement&&this._typesThatHaveText.indexOf(this.$.nativeInput.type)!==-1&&(this.alwaysFloatLabel=!0),this.inputElement.bindValue&&this.$.container._handleValueAndAutoValidate(this.inputElement)}});Yt({_template:Q`
    <style>
      :host {
        position: fixed;
      }

      #contentWrapper ::slotted(*) {
        overflow: auto;
      }

      #contentWrapper.animating ::slotted(*) {
        overflow: hidden;
        pointer-events: none;
      }
    </style>

    <div id="contentWrapper">
      <slot id="content" name="dropdown-content"></slot>
    </div>
`,is:"iron-dropdown",behaviors:[Di,Oo,Kx,b9],properties:{horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},openAnimationConfig:{type:Object},closeAnimationConfig:{type:Object},focusTarget:{type:Object},noAnimations:{type:Boolean,value:!1},allowOutsideScroll:{type:Boolean,value:!1,observer:"_allowOutsideScrollChanged"}},listeners:{"neon-animation-finish":"_onNeonAnimationFinish"},observers:["_updateOverlayPosition(positionTarget, verticalAlign, horizontalAlign, verticalOffset, horizontalOffset)"],get containedElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},ready:function(){this.scrollAction||(this.scrollAction=this.allowOutsideScroll?"refit":"lock"),this._readied=!0},attached:function(){(!this.sizingTarget||this.sizingTarget===this)&&(this.sizingTarget=this.containedElement||this)},detached:function(){this.cancelAnimation()},_openedChanged:function(){this.opened&&this.disabled?this.cancel():(this.cancelAnimation(),this._updateAnimationConfig(),Pm._openedChanged.apply(this,arguments))},_renderOpened:function(){!this.noAnimations&&this.animationConfig.open?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("open")):Pm._renderOpened.apply(this,arguments)},_renderClosed:function(){!this.noAnimations&&this.animationConfig.close?(this.$.contentWrapper.classList.add("animating"),this.playAnimation("close")):Pm._renderClosed.apply(this,arguments)},_onNeonAnimationFinish:function(){this.$.contentWrapper.classList.remove("animating"),this.opened?this._finishRenderOpened():this._finishRenderClosed()},_updateAnimationConfig:function(){for(var e=this.containedElement,t=[].concat(this.openAnimationConfig||[]).concat(this.closeAnimationConfig||[]),r=0;r<t.length;r++)t[r].node=e;this.animationConfig={open:this.openAnimationConfig,close:this.closeAnimationConfig}},_updateOverlayPosition:function(){this.isAttached&&this.notifyResize()},_allowOutsideScrollChanged:function(e){!this._readied||(e?(!this.scrollAction||this.scrollAction==="lock")&&(this.scrollAction="refit"):this.scrollAction="lock")},_applyFocus:function(){var e=this.focusTarget||this.containedElement;e&&this.opened&&!this.noAutoFocus?e.focus():Pm._applyFocus.apply(this,arguments)}});var yp={properties:{animationTiming:{type:Object,value:function(){return{duration:500,easing:"cubic-bezier(0.4, 0, 0.2, 1)",fill:"both"}}}},isNeonAnimation:!0,created:function(){document.body.animate||console.warn("No web animations detected. This element will not function without a web animations polyfill.")},timingFromConfig:function(e){if(e.timing)for(var t in e.timing)this.animationTiming[t]=e.timing[t];return this.animationTiming},setPrefixedProperty:function(e,t,r){for(var n={transform:["webkitTransform"],transformOrigin:["mozTransformOrigin","webkitTransformOrigin"]},i=n[t],o,a=0;o=i[a];a++)e.style[o]=r;e.style[t]=r},complete:function(e){}};Yt({is:"fade-in-animation",behaviors:[yp],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"0"},{opacity:"1"}],this.timingFromConfig(e)),this._effect}});Yt({is:"fade-out-animation",behaviors:[yp],configure:function(e){var t=e.node;return this._effect=new KeyframeEffect(t,[{opacity:"1"},{opacity:"0"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-grow-height-animation",_template:null,behaviors:[yp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.height;return this._effect=new KeyframeEffect(t,[{height:n/2+"px"},{height:n+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-grow-width-animation",_template:null,behaviors:[yp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.width;return this._effect=new KeyframeEffect(t,[{width:n/2+"px"},{width:n+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-shrink-width-animation",_template:null,behaviors:[yp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.width;return this._effect=new KeyframeEffect(t,[{width:n+"px"},{width:n-n/20+"px"}],this.timingFromConfig(e)),this._effect}});Yt({is:"paper-menu-shrink-height-animation",_template:null,behaviors:[yp],configure:function(e){var t=e.node,r=t.getBoundingClientRect(),n=r.height;return this.setPrefixedProperty(t,"transformOrigin","0 0"),this._effect=new KeyframeEffect(t,[{height:n+"px",transform:"translateY(0)"},{height:n/2+"px",transform:"translateY(-20px)"}],this.timingFromConfig(e)),this._effect}});var dE={ANIMATION_CUBIC_BEZIER:"cubic-bezier(.3,.95,.5,1)",MAX_ANIMATION_TIME_MS:400},Gbe=Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        padding: 8px;
        outline: none;

        @apply --paper-menu-button;
      }

      :host([disabled]) {
        cursor: auto;
        color: var(--disabled-text-color);

        @apply --paper-menu-button-disabled;
      }

      iron-dropdown {
        @apply --paper-menu-button-dropdown;
      }

      .dropdown-content {
        @apply --shadow-elevation-2dp;

        position: relative;
        border-radius: 2px;
        background-color: var(--paper-menu-button-dropdown-background, var(--primary-background-color));

        @apply --paper-menu-button-content;
      }

      :host([vertical-align="top"]) .dropdown-content {
        margin-bottom: 20px;
        margin-top: -10px;
        top: 10px;
      }

      :host([vertical-align="bottom"]) .dropdown-content {
        bottom: 10px;
        margin-bottom: -10px;
        margin-top: 20px;
      }

      #trigger {
        cursor: pointer;
      }
    </style>

    <div id="trigger" on-tap="toggle">
      <slot name="dropdown-trigger"></slot>
    </div>

    <iron-dropdown id="dropdown" opened="{{opened}}" horizontal-align="[[horizontalAlign]]" vertical-align="[[verticalAlign]]" dynamic-align="[[dynamicAlign]]" horizontal-offset="[[horizontalOffset]]" vertical-offset="[[verticalOffset]]" no-overlap="[[noOverlap]]" open-animation-config="[[openAnimationConfig]]" close-animation-config="[[closeAnimationConfig]]" no-animations="[[noAnimations]]" focus-target="[[_dropdownContent]]" allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" on-iron-overlay-canceled="__onIronOverlayCanceled" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
      <div slot="dropdown-content" class="dropdown-content">
        <slot id="content" name="dropdown-content"></slot>
      </div>
    </iron-dropdown>
`,is:"paper-menu-button",behaviors:[Oo,Di],properties:{opened:{type:Boolean,value:!1,notify:!0,observer:"_openedChanged"},horizontalAlign:{type:String,value:"left",reflectToAttribute:!0},verticalAlign:{type:String,value:"top",reflectToAttribute:!0},dynamicAlign:{type:Boolean},horizontalOffset:{type:Number,value:0,notify:!0},verticalOffset:{type:Number,value:0,notify:!0},noOverlap:{type:Boolean},noAnimations:{type:Boolean,value:!1},ignoreSelect:{type:Boolean,value:!1},closeOnActivate:{type:Boolean,value:!1},openAnimationConfig:{type:Object,value:function(){return[{name:"fade-in-animation",timing:{delay:100,duration:200}},{name:"paper-menu-grow-width-animation",timing:{delay:100,duration:150,easing:dE.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-grow-height-animation",timing:{delay:100,duration:275,easing:dE.ANIMATION_CUBIC_BEZIER}}]}},closeAnimationConfig:{type:Object,value:function(){return[{name:"fade-out-animation",timing:{duration:150}},{name:"paper-menu-shrink-width-animation",timing:{delay:100,duration:50,easing:dE.ANIMATION_CUBIC_BEZIER}},{name:"paper-menu-shrink-height-animation",timing:{duration:200,easing:"ease-in"}}]}},allowOutsideScroll:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1},_dropdownContent:{type:Object}},hostAttributes:{role:"group","aria-haspopup":"true"},listeners:{"iron-activate":"_onIronActivate","iron-select":"_onIronSelect"},get contentElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},toggle:function(){this.opened?this.close():this.open()},open:function(){this.disabled||this.$.dropdown.open()},close:function(){this.$.dropdown.close()},_onIronSelect:function(e){this.ignoreSelect||this.close()},_onIronActivate:function(e){this.closeOnActivate&&this.close()},_openedChanged:function(e,t){e?(this._dropdownContent=this.contentElement,this.fire("paper-dropdown-open")):t!=null&&this.fire("paper-dropdown-close")},_disabledChanged:function(e){Di._disabledChanged.apply(this,arguments),e&&this.opened&&this.close()},__onIronOverlayCanceled:function(e){var t=e.detail,r=this.$.trigger,n=zt(t).path;n.indexOf(r)>-1&&e.preventDefault()}});Object.keys(dE).forEach(function(e){Gbe[e]=dE[e]});var vW=document.createElement("template");vW.setAttribute("style","display: none;");vW.innerHTML=`<iron-iconset-svg name="paper-dropdown-menu" size="24">
<svg><defs>
<g id="arrow-drop-down"><path d="M7 10l5 5 5-5z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(vW.content);var xW=document.createElement("template");xW.setAttribute("style","display: none;");xW.innerHTML=`<dom-module id="paper-dropdown-menu-shared-styles">
  <template>
    <style>
      :host {
        display: inline-block;
        position: relative;
        text-align: left;

        /* NOTE(cdata): Both values are needed, since some phones require the
         * value to be \`transparent\`.
         */
        -webkit-tap-highlight-color: rgba(0,0,0,0);
        -webkit-tap-highlight-color: transparent;

        --paper-input-container-input: {
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
          max-width: 100%;
          box-sizing: border-box;
          cursor: pointer;
        };

        @apply --paper-dropdown-menu;
      }

      /* paper-dropdown-menu and paper-dropdown-menu-light both delegate focus
       * to other internal elements which manage focus styling. */
      :host(:focus) {
        outline: none;
      }

      :host(:dir(rtl)) {
        text-align: right;

        @apply(--paper-dropdown-menu);
      }

      :host([disabled]) {
        @apply --paper-dropdown-menu-disabled;
      }

      :host([noink]) paper-ripple {
        display: none;
      }

      :host([no-label-float]) paper-ripple {
        top: 8px;
      }

      paper-ripple {
        top: 12px;
        left: 0px;
        bottom: 8px;
        right: 0px;

        @apply --paper-dropdown-menu-ripple;
      }

      paper-menu-button {
        display: block;
        padding: 0;

        @apply --paper-dropdown-menu-button;
      }

      paper-input {
        @apply --paper-dropdown-menu-input;
      }

      iron-icon {
        color: var(--disabled-text-color);

        @apply --paper-dropdown-menu-icon;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(xW.content);var Wbe=Gt(HTMLElement);Yt({_template:Q`
    <style include="paper-dropdown-menu-shared-styles"></style>

    <paper-menu-button id="menuButton" vertical-align="[[verticalAlign]]" horizontal-align="[[horizontalAlign]]" dynamic-align="[[dynamicAlign]]" vertical-offset="[[_computeMenuVerticalOffset(noLabelFloat, verticalOffset)]]" disabled="[[disabled]]" no-animations="[[noAnimations]]" on-iron-select="_onIronSelect" on-iron-deselect="_onIronDeselect" opened="{{opened}}" close-on-activate allow-outside-scroll="[[allowOutsideScroll]]" restore-focus-on-close="[[restoreFocusOnClose]]" expand-sizing-target-for-scrollbars="[[expandSizingTargetForScrollbars]]">
      <!-- support hybrid mode: user might be using paper-menu-button 1.x which distributes via <content> -->
      <div class="dropdown-trigger" slot="dropdown-trigger">
        <paper-ripple></paper-ripple>
        <!-- paper-input has type="text" for a11y, do not remove -->
        <paper-input id="input" type="text" invalid="[[invalid]]" readonly disabled="[[disabled]]" value="[[value]]" placeholder="[[placeholder]]" error-message="[[errorMessage]]" always-float-label="[[alwaysFloatLabel]]" no-label-float="[[noLabelFloat]]" label="[[label]]" input-role="button" input-aria-haspopup="listbox" autocomplete="off">
          <!-- support hybrid mode: user might be using paper-input 1.x which distributes via <content> -->
          <iron-icon icon="paper-dropdown-menu:arrow-drop-down" suffix slot="suffix"></iron-icon>
        </paper-input>
      </div>
      <slot id="content" name="dropdown-content" slot="dropdown-content"></slot>
    </paper-menu-button>
`,is:"paper-dropdown-menu",behaviors:[Sh,Di,Eh,Th],properties:{selectedItemLabel:{type:String,notify:!0,readOnly:!0},selectedItem:{type:Object,notify:!0,readOnly:!0},value:{type:String,notify:!0},label:{type:String},placeholder:{type:String},errorMessage:{type:String},opened:{type:Boolean,notify:!0,value:!1,observer:"_openedChanged"},allowOutsideScroll:{type:Boolean,value:!1},noLabelFloat:{type:Boolean,value:!1,reflectToAttribute:!0},alwaysFloatLabel:{type:Boolean,value:!1},noAnimations:{type:Boolean,value:!1},horizontalAlign:{type:String,value:"right"},verticalAlign:{type:String,value:"top"},verticalOffset:Number,dynamicAlign:{type:Boolean},restoreFocusOnClose:{type:Boolean,value:!0},expandSizingTargetForScrollbars:{type:Boolean,value:!1}},listeners:{tap:"_onTap"},keyBindings:{"up down":"open",esc:"close"},observers:["_selectedItemChanged(selectedItem)"],_attachDom(e){let t=ue(this);return t.attachShadow({mode:"open",delegatesFocus:!0,shadyUpgradeFragment:e}),t.shadowRoot.appendChild(e),Wbe.prototype._attachDom.call(this,e)},focus(){this.$.input._focusableElement.focus()},attached:function(){var e=this.contentElement;e&&e.selectedItem&&this._setSelectedItem(e.selectedItem)},get contentElement(){for(var e=zt(this.$.content).getDistributedNodes(),t=0,r=e.length;t<r;t++)if(e[t].nodeType===Node.ELEMENT_NODE)return e[t]},open:function(){this.$.menuButton.open()},close:function(){this.$.menuButton.close()},_onIronSelect:function(e){this._setSelectedItem(e.detail.item)},_onIronDeselect:function(e){this._setSelectedItem(null)},_onTap:function(e){lgt(e)===this&&this.open()},_selectedItemChanged:function(e){var t="";e?t=e.label||e.getAttribute("label")||e.textContent.trim():t="",this.value=t,this._setSelectedItemLabel(t)},_computeMenuVerticalOffset:function(e,t){return t||(e?-4:8)},_getValidity:function(e){return this.disabled||!this.required||this.required&&!!this.value},_openedChanged:function(){var e=this.opened?"true":"false",t=this.contentElement;t&&t.setAttribute("aria-expanded",e)}});var bW=1,P0t=2,P9={outerScroll:{scroll:!0},shadowMode:{standard:P0t,waterfall:bW,"waterfall-tall":bW},tallMode:{"waterfall-tall":!0}};Yt({_template:Q`
    <style>
      :host {
        @apply --layout-vertical;
        position: relative;
        height: 100%;
        @apply --paper-header-panel;
      }

      #mainContainer {
        @apply --layout-flex;
        position: relative;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
      }

      #mainPanel {
        @apply --layout-vertical;
        @apply --layout-flex;
        position: relative;
        min-height: 0;
        @apply --paper-header-panel-body;
      }

      #mainContainer {
        @apply --paper-header-panel-container;
      }

      /*
       * mode: scroll
       */
      :host([mode=scroll]) #mainContainer {
        @apply --paper-header-panel-scroll-container;
        overflow: visible;
      }

      :host([mode=scroll]) {
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
      }

      /*
       * mode: cover
       */
      :host([mode=cover]) #mainContainer {
        @apply --paper-header-panel-cover-container;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
      }

      :host([mode=cover]) #mainPanel {
        position: static;
      }

      /*
       * mode: standard
       */
      :host([mode=standard]) #mainContainer {
        @apply --paper-header-panel-standard-container;
      }

      /*
       * mode: seamed
       */
      :host([mode=seamed]) #mainContainer {
        @apply --paper-header-panel-seamed-container;
      }


      /*
       * mode: waterfall
       */
      :host([mode=waterfall]) #mainContainer {
        @apply --paper-header-panel-waterfall-container;
      }

      /*
       * mode: waterfall-tall
       */
      :host([mode=waterfall-tall]) #mainContainer {
        @apply --paper-header-panel-waterfall-tall-container;
      }

      #dropShadow {
        transition: opacity 0.5s;
        height: 6px;
        box-shadow: inset 0px 5px 6px -3px rgba(0, 0, 0, 0.4);
        @apply --paper-header-panel-shadow;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        opacity: 0;
        pointer-events: none;
      }

      #dropShadow.has-shadow {
        opacity: 1;
      }

      #mainContainer > ::slotted(.fit) {
        @apply --layout-fit;
      }

    </style>

    <slot id="headerSlot" name="header"></slot>

    <div id="mainPanel">
      <div id="mainContainer" class\$="[[_computeMainContainerClass(mode)]]">
        <slot></slot>
      </div>
      <div id="dropShadow"></div>
    </div>
`,is:"paper-header-panel",properties:{mode:{type:String,value:"standard",observer:"_modeChanged",reflectToAttribute:!0},shadow:{type:Boolean,value:!1},tallClass:{type:String,value:"tall"},atTop:{type:Boolean,value:!0,notify:!0,readOnly:!0,reflectToAttribute:!0}},observers:["_computeDropShadowHidden(atTop, mode, shadow)"],attached:function(){this._addListener(),this._keepScrollingState()},detached:function(){this._removeListener()},ready:function(){this.scrollHandler=this._scroll.bind(this),console.warn(this.is,"is deprecated. Please use app-layout instead!")},get header(){return zt(this.$.headerSlot).getDistributedNodes()[0]},get scroller(){return this._getScrollerForMode(this.mode)},get visibleShadow(){return this.$.dropShadow.classList.contains("has-shadow")},_computeDropShadowHidden:function(e,t,r){var n=P9.shadowMode[t];this.shadow?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===P0t?this.toggleClass("has-shadow",!0,this.$.dropShadow):n===bW&&!e?this.toggleClass("has-shadow",!0,this.$.dropShadow):this.toggleClass("has-shadow",!1,this.$.dropShadow)},_computeMainContainerClass:function(e){var t={};return t.flex=e!=="cover",Object.keys(t).filter(function(r){return t[r]}).join(" ")},_addListener:function(){this.scroller.addEventListener("scroll",this.scrollHandler)},_removeListener:function(){this.scroller.removeEventListener("scroll",this.scrollHandler)},_modeChanged:function(e,t){var r=P9,n=this.header,i=200;n&&(r.tallMode[t]&&!r.tallMode[e]?(n.classList.remove(this.tallClass),this.async(function(){n.classList.remove("animate")},i)):this.toggleClass("animate",r.tallMode[e],n)),this._keepScrollingState()},_keepScrollingState:function(){var e=this.scroller,t=this.header;this._setAtTop(e.scrollTop===0),t&&this.tallClass&&P9.tallMode[this.mode]&&this.toggleClass(this.tallClass,this.atTop||t.classList.contains(this.tallClass)&&e.scrollHeight<this.offsetHeight,t)},_scroll:function(){this._keepScrollingState(),this.fire("content-scroll",{target:this.scroller},{bubbles:!1})},_getScrollerForMode:function(e){return P9.outerScroll[e]?this:this.$.mainContainer}});Yt({is:"paper-icon-button",_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        padding: 8px;
        outline: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        cursor: pointer;
        z-index: 0;
        line-height: 1;

        width: 40px;
        height: 40px;

        /*
          NOTE: Both values are needed, since some phones require the value to
          be \`transparent\`.
        */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-tap-highlight-color: transparent;

        /* Because of polymer/2558, this style has lower specificity than * */
        box-sizing: border-box !important;

        @apply --paper-icon-button;
      }

      :host #ink {
        color: var(--paper-icon-button-ink-color, var(--primary-text-color));
        opacity: 0.6;
      }

      :host([disabled]) {
        color: var(--paper-icon-button-disabled-text, var(--disabled-text-color));
        pointer-events: none;
        cursor: auto;

        @apply --paper-icon-button-disabled;
      }

      :host([hidden]) {
        display: none !important;
      }

      :host(:hover) {
        @apply --paper-icon-button-hover;
      }

      iron-icon {
        --iron-icon-width: 100%;
        --iron-icon-height: 100%;
      }
    </style>

    <iron-icon id="icon" src="[[src]]" icon="[[icon]]"
               alt$="[[alt]]"></iron-icon>
  `,hostAttributes:{role:"button",tabindex:"0"},behaviors:[jx],registered:function(){this._template.setAttribute("strip-whitespace","")},properties:{src:{type:String},icon:{type:String},alt:{type:String,observer:"_altChanged"}},_altChanged:function(e,t){var r=this.getAttribute("aria-label");(!r||t==r)&&this.setAttribute("aria-label",e)}});Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
        position: relative;
        width: 400px;
        border: 1px solid;
        padding: 2px;
        -moz-appearance: textarea;
        -webkit-appearance: textarea;
        overflow: hidden;
      }

      .mirror-text {
        visibility: hidden;
        word-wrap: break-word;
        @apply --iron-autogrow-textarea;
      }

      .fit {
        @apply --layout-fit;
      }

      textarea {
        position: relative;
        outline: none;
        border: none;
        resize: none;
        background: inherit;
        color: inherit;
        /* see comments in template */
        width: 100%;
        height: 100%;
        font-size: inherit;
        font-family: inherit;
        line-height: inherit;
        text-align: inherit;
        @apply --iron-autogrow-textarea;
      }

      textarea::-webkit-input-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea:-moz-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea::-moz-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }

      textarea:-ms-input-placeholder {
        @apply --iron-autogrow-textarea-placeholder;
      }
    </style>

    <!-- the mirror sizes the input/textarea so it grows with typing -->
    <!-- use &#160; instead &nbsp; of to allow this element to be used in XHTML -->
    <div id="mirror" class="mirror-text" aria-hidden="true">&nbsp;</div>

    <!-- size the input/textarea with a div, because the textarea has intrinsic size in ff -->
    <div class="textarea-container fit">
      <textarea id="textarea" name$="[[name]]" aria-label$="[[label]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" autocapitalize$="[[autocapitalize]]" inputmode$="[[inputmode]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" disabled$="[[disabled]]" rows$="[[rows]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]"></textarea>
    </div>
`,is:"iron-autogrow-textarea",behaviors:[Th,Di],properties:{value:{observer:"_valueChanged",type:String,notify:!0},bindValue:{observer:"_bindValueChanged",type:String,notify:!0},rows:{type:Number,value:1,observer:"_updateCached"},maxRows:{type:Number,value:0,observer:"_updateCached"},autocomplete:{type:String,value:"off"},autofocus:{type:Boolean,value:!1},autocapitalize:{type:String,value:"none"},inputmode:{type:String},placeholder:{type:String},readonly:{type:String},required:{type:Boolean},minlength:{type:Number},maxlength:{type:Number},label:{type:String}},listeners:{input:"_onInput"},get textarea(){return this.$.textarea},get selectionStart(){return this.$.textarea.selectionStart},get selectionEnd(){return this.$.textarea.selectionEnd},set selectionStart(e){this.$.textarea.selectionStart=e},set selectionEnd(e){this.$.textarea.selectionEnd=e},attached:function(){var e=navigator.userAgent.match(/iP(?:[oa]d|hone)/)&&!navigator.userAgent.match(/OS 1[3456789]/);e&&(this.$.textarea.style.marginLeft="-3px")},validate:function(){var e=this.$.textarea.validity.valid;return e&&(this.required&&this.value===""?e=!1:this.hasValidator()&&(e=Th.validate.call(this,this.value))),this.invalid=!e,this.fire("iron-input-validate"),e},_bindValueChanged:function(e){this.value=e},_valueChanged:function(e){var t=this.textarea;!t||(t.value!==e&&(t.value=e||e===0?e:""),this.bindValue=e,this.$.mirror.innerHTML=this._valueForMirror(),this.fire("bind-value-changed",{value:this.bindValue}))},_onInput:function(e){var t=zt(e).path;this.value=t?t[0].value:e.target.value},_constrain:function(e){var t;for(e=e||[""],this.maxRows>0&&e.length>this.maxRows?t=e.slice(0,this.maxRows):t=e.slice(0);this.rows>0&&t.length<this.rows;)t.push("");return t.join("<br/>")+"&#160;"},_valueForMirror:function(){var e=this.textarea;if(!!e)return this.tokens=e&&e.value?e.value.replace(/&/gm,"&amp;").replace(/"/gm,"&quot;").replace(/'/gm,"&#39;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;").split(`
`):[""],this._constrain(this.tokens)},_updateCached:function(){this.$.mirror.innerHTML=this._constrain(this.tokens)}});Yt({_template:Q`
    <style>
      :host {
        display: block;
      }

      :host([hidden]) {
        display: none !important;
      }

      label {
        pointer-events: none;
      }
    </style>

    <paper-input-container no-label-float$="[[noLabelFloat]]" always-float-label="[[_computeAlwaysFloatLabel(alwaysFloatLabel,placeholder)]]" auto-validate$="[[autoValidate]]" disabled$="[[disabled]]" invalid="[[invalid]]">

      <label hidden$="[[!label]]" aria-hidden="true" for$="[[_inputId]]" slot="label">[[label]]</label>

      <iron-autogrow-textarea class="paper-input-input" slot="input" id$="[[_inputId]]" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" bind-value="{{value}}" invalid="{{invalid}}" validator$="[[validator]]" disabled$="[[disabled]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" required$="[[required]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" autocapitalize$="[[autocapitalize]]" rows$="[[rows]]" max-rows$="[[maxRows]]" on-change="_onChange"></iron-autogrow-textarea>

      <template is="dom-if" if="[[errorMessage]]">
        <paper-input-error aria-live="assertive" slot="add-on">[[errorMessage]]</paper-input-error>
      </template>

      <template is="dom-if" if="[[charCounter]]">
        <paper-input-char-counter slot="add-on"></paper-input-char-counter>
      </template>

    </paper-input-container>
`,is:"paper-textarea",behaviors:[A9,Eh],properties:{_ariaLabelledBy:{observer:"_ariaLabelledByChanged",type:String},_ariaDescribedBy:{observer:"_ariaDescribedByChanged",type:String},value:{type:String},rows:{type:Number,value:1},maxRows:{type:Number,value:0}},get selectionStart(){return this.$.input.textarea.selectionStart},set selectionStart(e){this.$.input.textarea.selectionStart=e},get selectionEnd(){return this.$.input.textarea.selectionEnd},set selectionEnd(e){this.$.input.textarea.selectionEnd=e},_ariaLabelledByChanged:function(e){this._focusableElement.setAttribute("aria-labelledby",e)},_ariaDescribedByChanged:function(e){this._focusableElement.setAttribute("aria-describedby",e)},get _focusableElement(){return this.inputElement.textarea}});var wW=document.createElement("template");wW.setAttribute("style","display: none;");wW.innerHTML=`<dom-module id="paper-item-shared-styles">
  <template>
    <style>
      :host, .paper-item {
        display: block;
        position: relative;
        min-height: var(--paper-item-min-height, 48px);
        padding: 0px 16px;
      }

      .paper-item {
        @apply --paper-font-subhead;
        border:none;
        outline: none;
        background: white;
        width: 100%;
        text-align: left;
      }

      :host([hidden]), .paper-item[hidden] {
        display: none !important;
      }

      :host(.iron-selected), .paper-item.iron-selected {
        font-weight: var(--paper-item-selected-weight, bold);

        @apply --paper-item-selected;
      }

      :host([disabled]), .paper-item[disabled] {
        color: var(--paper-item-disabled-color, var(--disabled-text-color));

        @apply --paper-item-disabled;
      }

      :host(:focus), .paper-item:focus {
        position: relative;
        outline: 0;

        @apply --paper-item-focused;
      }

      :host(:focus):before, .paper-item:focus:before {
        @apply --layout-fit;

        background: currentColor;
        content: '';
        opacity: var(--dark-divider-opacity);
        pointer-events: none;

        @apply --paper-item-focused-before;
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(wW.content);var Ybe={hostAttributes:{role:"option",tabindex:"0"}},I9=[Sh,Di,Ybe];Yt({_template:Q`
    <style include="paper-item-shared-styles">
      :host {
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-subhead;

        @apply --paper-item;
      }
    </style>
    <slot></slot>
`,is:"paper-item",behaviors:[I9]});Yt({_template:Q`
    <style>
      :host {
        overflow: hidden; /* needed for text-overflow: ellipsis to work on ff */
        @apply --layout-vertical;
        @apply --layout-center-justified;
        @apply --layout-flex;
      }

      :host([two-line]) {
        min-height: var(--paper-item-body-two-line-min-height, 72px);
      }

      :host([three-line]) {
        min-height: var(--paper-item-body-three-line-min-height, 88px);
      }

      :host > ::slotted(*) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      :host > ::slotted([secondary]) {
        @apply --paper-font-body1;

        color: var(--paper-item-body-secondary-color, var(--secondary-text-color));

        @apply --paper-item-body-secondary;
      }
    </style>

    <slot></slot>
`,is:"paper-item-body"});Yt({_template:Q`
    <style include="paper-item-shared-styles"></style>
    <style>
      :host {
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-subhead;

        @apply --paper-item;
        @apply --paper-icon-item;
      }

      .content-icon {
        @apply --layout-horizontal;
        @apply --layout-center;

        width: var(--paper-item-icon-width, 56px);
        @apply --paper-item-icon;
      }
    </style>

    <div id="contentIcon" class="content-icon">
      <slot name="item-icon"></slot>
    </div>
    <slot></slot>
`,is:"paper-icon-item",behaviors:[I9]});var SW={properties:{multi:{type:Boolean,value:!1,observer:"multiChanged"},selectedValues:{type:Array,notify:!0,value:function(){return[]}},selectedItems:{type:Array,readOnly:!0,notify:!0,value:function(){return[]}}},observers:["_updateSelected(selectedValues.splices)"],select:function(e){this.multi?this._toggleSelected(e):this.selected=e},multiChanged:function(e){this._selection.multi=e,this._updateSelected()},get _shouldUpdateSelection(){return this.selected!=null||this.selectedValues!=null&&this.selectedValues.length},_updateAttrForSelected:function(){this.multi?this.selectedItems&&this.selectedItems.length>0&&(this.selectedValues=this.selectedItems.map(function(e){return this._indexToValue(this.indexOf(e))},this).filter(function(e){return e!=null},this)):wh._updateAttrForSelected.apply(this)},_updateSelected:function(){this.multi?this._selectMulti(this.selectedValues):this._selectSelected(this.selected)},_selectMulti:function(e){e=e||[];var t=(this._valuesToItems(e)||[]).filter(function(i){return i!=null});this._selection.clear(t);for(var r=0;r<t.length;r++)this._selection.setItemSelected(t[r],!0);if(this.fallbackSelection&&!this._selection.get().length){var n=this._valueToItem(this.fallbackSelection);n&&this.select(this.fallbackSelection)}},_selectionChange:function(){var e=this._selection.get();this.multi?(this._setSelectedItems(e),this._setSelectedItem(e.length?e[0]:null)):e!=null?(this._setSelectedItems([e]),this._setSelectedItem(e)):(this._setSelectedItems([]),this._setSelectedItem(null))},_toggleSelected:function(e){var t=this.selectedValues.indexOf(e),r=t<0;r?this.push("selectedValues",e):this.splice("selectedValues",t,1)},_valuesToItems:function(e){return e==null?null:e.map(function(t){return this._valueToItem(t)},this)}},I0t=[wh,SW];var __={properties:{focusedItem:{observer:"_focusedItemChanged",readOnly:!0,type:Object},attrForItemTitle:{type:String},disabled:{type:Boolean,value:!1,observer:"_disabledChanged"}},_MODIFIER_KEYS:["Alt","AltGraph","CapsLock","Control","Fn","FnLock","Hyper","Meta","NumLock","OS","ScrollLock","Shift","Super","Symbol","SymbolLock"],_SEARCH_RESET_TIMEOUT_MS:1e3,_previousTabIndex:0,hostAttributes:{role:"menu"},observers:["_updateMultiselectable(multi)"],listeners:{focus:"_onFocus",keydown:"_onKeydown","iron-items-changed":"_onIronItemsChanged"},keyBindings:{up:"_onUpKey",down:"_onDownKey",esc:"_onEscKey","shift+tab:keydown":"_onShiftTabDown"},attached:function(){this._resetTabindices()},select:function(e){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null);var t=this._valueToItem(e);t&&t.hasAttribute("disabled")||(this._setFocusedItem(t),SW.select.apply(this,arguments))},_resetTabindices:function(){var e=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this.items.forEach(function(t){t.setAttribute("tabindex",t===e?"0":"-1"),t.setAttribute("aria-selected",this._selection.isSelected(t))},this)},_updateMultiselectable:function(e){e?this.setAttribute("aria-multiselectable","true"):this.removeAttribute("aria-multiselectable")},_focusWithKeyboardEvent:function(e){if(this._MODIFIER_KEYS.indexOf(e.key)===-1){this.cancelDebouncer("_clearSearchText");var t=this._searchText||"",r=e.key&&e.key.length==1?e.key:String.fromCharCode(e.keyCode);t+=r.toLocaleLowerCase();for(var n=t.length,i=0,o;o=this.items[i];i++)if(!o.hasAttribute("disabled")){var a=this.attrForItemTitle||"textContent",s=(o[a]||o.getAttribute(a)||"").trim();if(!(s.length<n)&&s.slice(0,n).toLocaleLowerCase()==t){this._setFocusedItem(o);break}}this._searchText=t,this.debounce("_clearSearchText",this._clearSearchText,this._SEARCH_RESET_TIMEOUT_MS)}},_clearSearchText:function(){this._searchText=""},_focusPrevious:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),r=1;r<e+1;r++){var n=this.items[(t-r+e)%e];if(!n.hasAttribute("disabled")){var i=zt(n).getOwnerRoot()||document;if(this._setFocusedItem(n),zt(i).activeElement==n)return}}},_focusNext:function(){for(var e=this.items.length,t=Number(this.indexOf(this.focusedItem)),r=1;r<e+1;r++){var n=this.items[(t+r)%e];if(!n.hasAttribute("disabled")){var i=zt(n).getOwnerRoot()||document;if(this._setFocusedItem(n),zt(i).activeElement==n)return}}},_applySelection:function(e,t){t?e.setAttribute("aria-selected","true"):e.setAttribute("aria-selected","false"),wh._applySelection.apply(this,arguments)},_focusedItemChanged:function(e,t){t&&t.setAttribute("tabindex","-1"),e&&!e.hasAttribute("disabled")&&!this.disabled&&(e.setAttribute("tabindex","0"),e.focus())},_onIronItemsChanged:function(e){e.detail.addedNodes.length&&this._resetTabindices()},_onShiftTabDown:function(e){var t=this.getAttribute("tabindex");__._shiftTabPressed=!0,this._setFocusedItem(null),this.setAttribute("tabindex","-1"),this.async(function(){this.setAttribute("tabindex",t),__._shiftTabPressed=!1},1)},_onFocus:function(e){if(!__._shiftTabPressed){var t=zt(e).rootTarget;t!==this&&typeof t.tabIndex!="undefined"&&!this.isLightDescendant(t)||(this._defaultFocusAsync=this.async(function(){var r=this.multi?this.selectedItems&&this.selectedItems[0]:this.selectedItem;this._setFocusedItem(null),r?this._setFocusedItem(r):this.items[0]&&this._focusNext()}))}},_onUpKey:function(e){this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onEscKey:function(e){var t=this.focusedItem;t&&t.blur()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down esc")||this._focusWithKeyboardEvent(e),e.stopPropagation()},_activateHandler:function(e){wh._activateHandler.call(this,e),e.stopPropagation()},_disabledChanged:function(e){e?(this._previousTabIndex=this.hasAttribute("tabindex")?this.tabIndex:0,this.removeAttribute("tabindex")):this.hasAttribute("tabindex")||this.setAttribute("tabindex",this._previousTabIndex)}};__._shiftTabPressed=!1;var L9=[I0t,Oo,__];Yt({_template:Q`
    <style>
      :host {
        display: block;
        padding: 8px 0;

        background: var(--paper-listbox-background-color, var(--primary-background-color));
        color: var(--paper-listbox-color, var(--primary-text-color));

        @apply --paper-listbox;
      }
    </style>

    <slot></slot>
`,is:"paper-listbox",behaviors:[L9],hostAttributes:{role:"listbox"}});var L0t=Q`
<dom-module id="paper-material-shared-styles">
  <template>
    <style>
      :host {
        display: block;
        position: relative;
      }

      :host([elevation="1"]) {
        @apply --shadow-elevation-2dp;
      }

      :host([elevation="2"]) {
        @apply --shadow-elevation-4dp;
      }

      :host([elevation="3"]) {
        @apply --shadow-elevation-6dp;
      }

      :host([elevation="4"]) {
        @apply --shadow-elevation-8dp;
      }

      :host([elevation="5"]) {
        @apply --shadow-elevation-16dp;
      }
    </style>
  </template>
</dom-module>
`;L0t.setAttribute("style","display: none;");document.body.appendChild(L0t.content);Yt({_template:Q`
    <style include="paper-material-shared-styles"></style>
    <style>
      :host([animated]) {
        @apply --shadow-transition;
      }
      :host {
        @apply --paper-material;
      }
    </style>

    <slot></slot>
`,is:"paper-material",properties:{elevation:{type:Number,reflectToAttribute:!0,value:1},animated:{type:Boolean,reflectToAttribute:!0,value:!1}}});var k9={properties:{value:{type:Number,value:0,notify:!0,reflectToAttribute:!0},min:{type:Number,value:0,notify:!0},max:{type:Number,value:100,notify:!0},step:{type:Number,value:1,notify:!0},ratio:{type:Number,value:0,readOnly:!0,notify:!0}},observers:["_update(value, min, max, step)"],_calcRatio:function(e){return(this._clampValue(e)-this.min)/(this.max-this.min)},_clampValue:function(e){return Math.min(this.max,Math.max(this.min,this._calcStep(e)))},_calcStep:function(e){if(e=parseFloat(e),!this.step)return e;var t=Math.round((e-this.min)/this.step);return this.step<1?t/(1/this.step)+this.min:t*this.step+this.min},_validateValue:function(){var e=this._clampValue(this.value);return this.value=this.oldValue=isNaN(e)?this.oldValue:e,this.value!==e},_update:function(){this._validateValue(),this._setRatio(this._calcRatio(this.value)*100)}};Yt({_template:Q`
    <style>
      :host {
        display: block;
        width: 200px;
        position: relative;
        overflow: hidden;
      }

      :host([hidden]), [hidden] {
        display: none !important;
      }

      #progressContainer {
        @apply --paper-progress-container;
        position: relative;
      }

      #progressContainer,
      /* the stripe for the indeterminate animation*/
      .indeterminate::after {
        height: var(--paper-progress-height, 4px);
      }

      #primaryProgress,
      #secondaryProgress,
      .indeterminate::after {
        @apply --layout-fit;
      }

      #progressContainer,
      .indeterminate::after {
        background: var(--paper-progress-container-color, var(--google-grey-300));
      }

      :host(.transiting) #primaryProgress,
      :host(.transiting) #secondaryProgress {
        -webkit-transition-property: -webkit-transform;
        transition-property: transform;

        /* Duration */
        -webkit-transition-duration: var(--paper-progress-transition-duration, 0.08s);
        transition-duration: var(--paper-progress-transition-duration, 0.08s);

        /* Timing function */
        -webkit-transition-timing-function: var(--paper-progress-transition-timing-function, ease);
        transition-timing-function: var(--paper-progress-transition-timing-function, ease);

        /* Delay */
        -webkit-transition-delay: var(--paper-progress-transition-delay, 0s);
        transition-delay: var(--paper-progress-transition-delay, 0s);
      }

      #primaryProgress,
      #secondaryProgress {
        @apply --layout-fit;
        -webkit-transform-origin: left center;
        transform-origin: left center;
        -webkit-transform: scaleX(0);
        transform: scaleX(0);
        will-change: transform;
      }

      #primaryProgress {
        background: var(--paper-progress-active-color, var(--google-green-500));
      }

      #secondaryProgress {
        background: var(--paper-progress-secondary-color, var(--google-green-100));
      }

      :host([disabled]) #primaryProgress {
        background: var(--paper-progress-disabled-active-color, var(--google-grey-500));
      }

      :host([disabled]) #secondaryProgress {
        background: var(--paper-progress-disabled-secondary-color, var(--google-grey-300));
      }

      :host(:not([disabled])) #primaryProgress.indeterminate {
        -webkit-transform-origin: right center;
        transform-origin: right center;
        -webkit-animation: indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
        animation: indeterminate-bar var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
      }

      :host(:not([disabled])) #primaryProgress.indeterminate::after {
        content: "";
        -webkit-transform-origin: center center;
        transform-origin: center center;

        -webkit-animation: indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
        animation: indeterminate-splitter var(--paper-progress-indeterminate-cycle-duration, 2s) linear infinite;
      }

      @-webkit-keyframes indeterminate-bar {
        0% {
          -webkit-transform: scaleX(1) translateX(-100%);
        }
        50% {
          -webkit-transform: scaleX(1) translateX(0%);
        }
        75% {
          -webkit-transform: scaleX(1) translateX(0%);
          -webkit-animation-timing-function: cubic-bezier(.28,.62,.37,.91);
        }
        100% {
          -webkit-transform: scaleX(0) translateX(0%);
        }
      }

      @-webkit-keyframes indeterminate-splitter {
        0% {
          -webkit-transform: scaleX(.75) translateX(-125%);
        }
        30% {
          -webkit-transform: scaleX(.75) translateX(-125%);
          -webkit-animation-timing-function: cubic-bezier(.42,0,.6,.8);
        }
        90% {
          -webkit-transform: scaleX(.75) translateX(125%);
        }
        100% {
          -webkit-transform: scaleX(.75) translateX(125%);
        }
      }

      @keyframes indeterminate-bar {
        0% {
          transform: scaleX(1) translateX(-100%);
        }
        50% {
          transform: scaleX(1) translateX(0%);
        }
        75% {
          transform: scaleX(1) translateX(0%);
          animation-timing-function: cubic-bezier(.28,.62,.37,.91);
        }
        100% {
          transform: scaleX(0) translateX(0%);
        }
      }

      @keyframes indeterminate-splitter {
        0% {
          transform: scaleX(.75) translateX(-125%);
        }
        30% {
          transform: scaleX(.75) translateX(-125%);
          animation-timing-function: cubic-bezier(.42,0,.6,.8);
        }
        90% {
          transform: scaleX(.75) translateX(125%);
        }
        100% {
          transform: scaleX(.75) translateX(125%);
        }
      }
    </style>

    <div id="progressContainer">
      <div id="secondaryProgress" hidden\$="[[_hideSecondaryProgress(secondaryRatio)]]"></div>
      <div id="primaryProgress"></div>
    </div>
`,is:"paper-progress",behaviors:[k9],properties:{secondaryProgress:{type:Number,value:0},secondaryRatio:{type:Number,value:0,readOnly:!0},indeterminate:{type:Boolean,value:!1,observer:"_toggleIndeterminate"},disabled:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_disabledChanged"}},observers:["_progressChanged(secondaryProgress, value, min, max, indeterminate)"],hostAttributes:{role:"progressbar"},_toggleIndeterminate:function(e){this.toggleClass("indeterminate",e,this.$.primaryProgress)},_transformProgress:function(e,t){var r="scaleX("+t/100+")";e.style.transform=e.style.webkitTransform=r},_mainRatioChanged:function(e){this._transformProgress(this.$.primaryProgress,e)},_progressChanged:function(e,t,r,n,i){e=this._clampValue(e),t=this._clampValue(t);var o=this._calcRatio(e)*100,a=this._calcRatio(t)*100;this._setSecondaryRatio(o),this._transformProgress(this.$.secondaryProgress,o),this._transformProgress(this.$.primaryProgress,a),this.secondaryProgress=e,i?this.removeAttribute("aria-valuenow"):this.setAttribute("aria-valuenow",t),this.setAttribute("aria-valuemin",r),this.setAttribute("aria-valuemax",n)},_disabledChanged:function(e){this.setAttribute("aria-disabled",e?"true":"false")},_hideSecondaryProgress:function(e){return e===0}});var k0t=Q`
<style>
  :host {
    display: inline-block;
    line-height: 0;
    white-space: nowrap;
    cursor: pointer;
    @apply --paper-font-common-base;
    --calculated-paper-radio-button-size: var(--paper-radio-button-size, 16px);
    /* -1px is a sentinel for the default and is replace in \`attached\`. */
    --calculated-paper-radio-button-ink-size: var(--paper-radio-button-ink-size, -1px);
  }

  :host(:focus) {
    outline: none;
  }

  #radioContainer {
    @apply --layout-inline;
    @apply --layout-center-center;
    position: relative;
    width: var(--calculated-paper-radio-button-size);
    height: var(--calculated-paper-radio-button-size);
    vertical-align: middle;

    @apply --paper-radio-button-radio-container;
  }

  #ink {
    position: absolute;
    top: 50%;
    left: 50%;
    right: auto;
    width: var(--calculated-paper-radio-button-ink-size);
    height: var(--calculated-paper-radio-button-ink-size);
    color: var(--paper-radio-button-unchecked-ink-color, var(--primary-text-color));
    opacity: 0.6;
    pointer-events: none;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
  }

  #ink[checked] {
    color: var(--paper-radio-button-checked-ink-color, var(--primary-color));
  }

  #offRadio, #onRadio {
    position: absolute;
    box-sizing: border-box;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
  }

  #offRadio {
    border: 2px solid var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    background-color: var(--paper-radio-button-unchecked-background-color, transparent);
    transition: border-color 0.28s;
  }

  #onRadio {
    background-color: var(--paper-radio-button-checked-color, var(--primary-color));
    -webkit-transform: scale(0);
    transform: scale(0);
    transition: -webkit-transform ease 0.28s;
    transition: transform ease 0.28s;
    will-change: transform;
  }

  :host([checked]) #offRadio {
    border-color: var(--paper-radio-button-checked-color, var(--primary-color));
  }

  :host([checked]) #onRadio {
    -webkit-transform: scale(0.5);
    transform: scale(0.5);
  }

  #radioLabel {
    line-height: normal;
    position: relative;
    display: inline-block;
    vertical-align: middle;
    margin-left: var(--paper-radio-button-label-spacing, 10px);
    white-space: normal;
    color: var(--paper-radio-button-label-color, var(--primary-text-color));

    @apply --paper-radio-button-label;
  }

  :host([checked]) #radioLabel {
    @apply --paper-radio-button-label-checked;
  }

  #radioLabel:dir(rtl) {
    margin-left: 0;
    margin-right: var(--paper-radio-button-label-spacing, 10px);
  }

  #radioLabel[hidden] {
    display: none;
  }

  /* disabled state */

  :host([disabled]) #offRadio {
    border-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled][checked]) #onRadio {
    background-color: var(--paper-radio-button-unchecked-color, var(--primary-text-color));
    opacity: 0.5;
  }

  :host([disabled]) #radioLabel {
    /* slightly darker than the button, so that it's readable */
    opacity: 0.65;
  }
</style>

<div id="radioContainer">
  <div id="offRadio"></div>
  <div id="onRadio"></div>
</div>

<div id="radioLabel"><slot></slot></div>`;k0t.setAttribute("strip-whitespace","");Yt({_template:k0t,is:"paper-radio-button",behaviors:[Xx],hostAttributes:{role:"radio","aria-checked":!1,tabindex:0},properties:{ariaActiveAttribute:{type:String,value:"aria-checked"}},ready:function(){this._rippleContainer=this.$.radioContainer},attached:function(){Tm(this,function(){var e=this.getComputedStyleValue("--calculated-paper-radio-button-ink-size").trim();if(e==="-1px"){var t=parseFloat(this.getComputedStyleValue("--calculated-paper-radio-button-size").trim()),r=Math.floor(3*t);r%2!==t%2&&r++,this.updateStyles({"--paper-radio-button-ink-size":r+"px"})}})}});var R9={hostAttributes:{role:"menubar"},keyBindings:{left:"_onLeftKey",right:"_onRightKey"},_onUpKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},_onDownKey:function(e){this.focusedItem.click(),e.detail.keyboardEvent.preventDefault()},get _isRTL(){return window.getComputedStyle(this).direction==="rtl"},_onLeftKey:function(e){this._isRTL?this._focusNext():this._focusPrevious(),e.detail.keyboardEvent.preventDefault()},_onRightKey:function(e){this._isRTL?this._focusPrevious():this._focusNext(),e.detail.keyboardEvent.preventDefault()},_onKeydown:function(e){this.keyboardEventMatchesKeys(e,"up down left right esc")||this._focusWithKeyboardEvent(e)}},N9=[L9,R9];Yt({_template:Q`
    <style>
      :host {
        display: inline-block;
      }

      :host ::slotted(*) {
        padding: var(--paper-radio-group-item-padding, 12px);
      }
    </style>

    <slot></slot>
`,is:"paper-radio-group",behaviors:[N9],hostAttributes:{role:"radiogroup"},properties:{attrForSelected:{type:String,value:"name"},selectedAttribute:{type:String,value:"checked"},selectable:{type:String,value:"paper-radio-button"},allowEmptySelection:{type:Boolean,value:!1}},select:function(e){var t=this._valueToItem(e);if(!(t&&t.hasAttribute("disabled"))){if(this.selected){var r=this._valueToItem(this.selected);if(this.selected==e)if(this.allowEmptySelection)e="";else{r&&(r.checked=!0);return}r&&(r.checked=!1)}wh.select.apply(this,[e]),this.fire("paper-radio-group-changed")}},_activateFocusedItem:function(){this._itemActivate(this._valueForItem(this.focusedItem),this.focusedItem)},_onUpKey:function(e){this._focusPrevious(),e.preventDefault(),this._activateFocusedItem()},_onDownKey:function(e){this._focusNext(),e.preventDefault(),this._activateFocusedItem()},_onLeftKey:function(e){R9._onLeftKey.apply(this,arguments),this._activateFocusedItem()},_onRightKey:function(e){R9._onRightKey.apply(this,arguments),this._activateFocusedItem()}});var R0t=Q`
  <style>
    :host {
      @apply --layout;
      @apply --layout-justified;
      @apply --layout-center;
      width: 200px;
      cursor: default;
      -webkit-user-select: none;
      -moz-user-select: none;
      -ms-user-select: none;
      user-select: none;
      -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
      --paper-progress-active-color: var(--paper-slider-active-color, var(--google-blue-700));
      --paper-progress-secondary-color: var(--paper-slider-secondary-color, var(--google-blue-300));
      --paper-progress-disabled-active-color: var(--paper-slider-disabled-active-color, var(--paper-grey-400));
      --paper-progress-disabled-secondary-color: var(--paper-slider-disabled-secondary-color, var(--paper-grey-400));
      --calculated-paper-slider-height: var(--paper-slider-height, 2px);
    }

    /* focus shows the ripple */
    :host(:focus) {
      outline: none;
    }

    /**
      * NOTE(keanulee): Though :host-context is not universally supported, some pages
      * still rely on paper-slider being flipped when dir="rtl" is set on body. For full
      * compatibility, dir="rtl" must be explicitly set on paper-slider.
      */
    :dir(rtl) #sliderContainer {
      -webkit-transform: scaleX(-1);
      transform: scaleX(-1);
    }

    /**
      * NOTE(keanulee): This is separate from the rule above because :host-context may
      * not be recognized.
      */
    :host([dir="rtl"]) #sliderContainer {
      -webkit-transform: scaleX(-1);
      transform: scaleX(-1);
    }

    /**
      * NOTE(keanulee): Needed to override the :host-context rule (where supported)
      * to support LTR sliders in RTL pages.
      */
    :host([dir="ltr"]) #sliderContainer {
      -webkit-transform: scaleX(1);
      transform: scaleX(1);
    }

    #sliderContainer {
      position: relative;
      width: 100%;
      height: calc(30px + var(--calculated-paper-slider-height));
      margin-left: calc(15px + var(--calculated-paper-slider-height)/2);
      margin-right: calc(15px + var(--calculated-paper-slider-height)/2);
    }

    #sliderContainer:focus {
      outline: 0;
    }

    #sliderContainer.editable {
      margin-top: 12px;
      margin-bottom: 12px;
    }

    .bar-container {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      overflow: hidden;
    }

    .ring > .bar-container {
      left: calc(5px + var(--calculated-paper-slider-height)/2);
      transition: left 0.18s ease;
    }

    .ring.expand.dragging > .bar-container {
      transition: none;
    }

    .ring.expand:not(.pin) > .bar-container {
      left: calc(8px + var(--calculated-paper-slider-height)/2);
    }

    #sliderBar {
      padding: 15px 0;
      width: 100%;
      background-color: var(--paper-slider-bar-color, transparent);
      --paper-progress-container-color: var(--paper-slider-container-color, var(--paper-grey-400));
      --paper-progress-height: var(--calculated-paper-slider-height);
    }

    .slider-markers {
      position: absolute;
      /* slider-knob is 30px + the slider-height so that the markers should start at a offset of 15px*/
      top: 15px;
      height: var(--calculated-paper-slider-height);
      left: 0;
      right: -1px;
      box-sizing: border-box;
      pointer-events: none;
      @apply --layout-horizontal;
    }

    .slider-marker {
      @apply --layout-flex;
    }
    .slider-markers::after,
    .slider-marker::after {
      content: "";
      display: block;
      margin-left: -1px;
      width: 2px;
      height: var(--calculated-paper-slider-height);
      border-radius: 50%;
      background-color: var(--paper-slider-markers-color, #000);
    }

    .slider-knob {
      position: absolute;
      left: 0;
      top: 0;
      margin-left: calc(-15px - var(--calculated-paper-slider-height)/2);
      width: calc(30px + var(--calculated-paper-slider-height));
      height: calc(30px + var(--calculated-paper-slider-height));
    }

    .transiting > .slider-knob {
      transition: left 0.08s ease;
    }

    .slider-knob:focus {
      outline: none;
    }

    .slider-knob.dragging {
      transition: none;
    }

    .snaps > .slider-knob.dragging {
      transition: -webkit-transform 0.08s ease;
      transition: transform 0.08s ease;
    }

    .slider-knob-inner {
      margin: 10px;
      width: calc(100% - 20px);
      height: calc(100% - 20px);
      background-color: var(--paper-slider-knob-color, var(--google-blue-700));
      border: 2px solid var(--paper-slider-knob-color, var(--google-blue-700));
      border-radius: 50%;

      -moz-box-sizing: border-box;
      box-sizing: border-box;

      transition-property: -webkit-transform, background-color, border;
      transition-property: transform, background-color, border;
      transition-duration: 0.18s;
      transition-timing-function: ease;
    }

    .expand:not(.pin) > .slider-knob > .slider-knob-inner {
      -webkit-transform: scale(1.5);
      transform: scale(1.5);
    }

    .ring > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-knob-start-color, transparent);
      border: 2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));
    }

    .slider-knob-inner::before {
      background-color: var(--paper-slider-pin-color, var(--google-blue-700));
    }

    .pin > .slider-knob > .slider-knob-inner::before {
      content: "";
      position: absolute;
      top: 0;
      left: 50%;
      margin-left: -13px;
      width: 26px;
      height: 26px;
      border-radius: 50% 50% 50% 0;

      -webkit-transform: rotate(-45deg) scale(0) translate(0);
      transform: rotate(-45deg) scale(0) translate(0);
    }

    .slider-knob-inner::before,
    .slider-knob-inner::after {
      transition: -webkit-transform .18s ease, background-color .18s ease;
      transition: transform .18s ease, background-color .18s ease;
    }

    .pin.ring > .slider-knob > .slider-knob-inner::before {
      background-color: var(--paper-slider-pin-start-color, var(--paper-grey-400));
    }

    .pin.expand > .slider-knob > .slider-knob-inner::before {
      -webkit-transform: rotate(-45deg) scale(1) translate(17px, -17px);
      transform: rotate(-45deg) scale(1) translate(17px, -17px);
    }

    .pin > .slider-knob > .slider-knob-inner::after {
      content: attr(value);
      position: absolute;
      top: 0;
      left: 50%;
      margin-left: -16px;
      width: 32px;
      height: 26px;
      text-align: center;
      color: var(--paper-slider-font-color, #fff);
      font-size: 10px;

      -webkit-transform: scale(0) translate(0);
      transform: scale(0) translate(0);
    }

    .pin.expand > .slider-knob > .slider-knob-inner::after {
      -webkit-transform: scale(1) translate(0, -17px);
      transform: scale(1) translate(0, -17px);
    }

    /* paper-input */
    .slider-input {
      width: 50px;
      overflow: hidden;
      --paper-input-container-input: {
        text-align: center;
        @apply --paper-slider-input-container-input;
      };
      @apply --paper-slider-input;
    }

    /* disabled state */
    #sliderContainer.disabled {
      pointer-events: none;
    }

    .disabled > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-disabled-knob-color, var(--paper-grey-400));
      border: 2px solid var(--paper-slider-disabled-knob-color, var(--paper-grey-400));
      -webkit-transform: scale3d(0.75, 0.75, 1);
      transform: scale3d(0.75, 0.75, 1);
    }

    .disabled.ring > .slider-knob > .slider-knob-inner {
      background-color: var(--paper-slider-knob-start-color, transparent);
      border: 2px solid var(--paper-slider-knob-start-border-color, var(--paper-grey-400));
    }

    paper-ripple {
      color: var(--paper-slider-knob-color, var(--google-blue-700));
    }
  </style>

  <div id="sliderContainer" class\$="[[_getClassNames(disabled, pin, snaps, immediateValue, min, expand, dragging, transiting, editable)]]">
    <div class="bar-container">
      <paper-progress disabled\$="[[disabled]]" id="sliderBar" aria-hidden="true" min="[[min]]" max="[[max]]" step="[[step]]" value="[[immediateValue]]" secondary-progress="[[secondaryProgress]]" on-down="_bardown" on-up="_resetKnob" on-track="_bartrack" on-tap="_barclick">
      </paper-progress>
    </div>

    <template is="dom-if" if="[[snaps]]">
      <div class="slider-markers">
        <template is="dom-repeat" items="[[markers]]">
          <div class="slider-marker"></div>
        </template>
      </div>
    </template>

    <div id="sliderKnob" class="slider-knob" on-down="_knobdown" on-up="_resetKnob" on-track="_onTrack" on-transitionend="_knobTransitionEnd">
        <div class="slider-knob-inner" value\$="[[immediateValue]]"></div>
    </div>
  </div>

  <template is="dom-if" if="[[editable]]">
    <paper-input id="input" type="number" step="[[step]]" min="[[min]]" max="[[max]]" class="slider-input" disabled\$="[[disabled]]" value="[[immediateValue]]" on-change="_changeValue" on-keydown="_inputKeyDown" no-label-float>
    </paper-input>
  </template>
`;R0t.setAttribute("strip-whitespace","");Yt({_template:R0t,is:"paper-slider",behaviors:[Oo,Eh,jx,k9],properties:{value:{type:Number,value:0},snaps:{type:Boolean,value:!1,notify:!0},pin:{type:Boolean,value:!1,notify:!0},secondaryProgress:{type:Number,value:0,notify:!0,observer:"_secondaryProgressChanged"},editable:{type:Boolean,value:!1},immediateValue:{type:Number,value:0,readOnly:!0,notify:!0},maxMarkers:{type:Number,value:0,notify:!0},expand:{type:Boolean,value:!1,readOnly:!0},ignoreBarTouch:{type:Boolean,value:!1},dragging:{type:Boolean,value:!1,readOnly:!0,notify:!0},transiting:{type:Boolean,value:!1,readOnly:!0},markers:{type:Array,readOnly:!0,value:function(){return[]}}},observers:["_updateKnob(value, min, max, snaps, step)","_valueChanged(value)","_immediateValueChanged(immediateValue)","_updateMarkers(maxMarkers, min, max, snaps)"],hostAttributes:{role:"slider",tabindex:0},keyBindings:{left:"_leftKey",right:"_rightKey","down pagedown home":"_decrementKey","up pageup end":"_incrementKey"},ready:function(){this.ignoreBarTouch&&d_(this.$.sliderBar,"auto")},increment:function(){this.value=this._clampValue(this.value+this.step)},decrement:function(){this.value=this._clampValue(this.value-this.step)},_updateKnob:function(e,t,r,n,i){this.setAttribute("aria-valuemin",t),this.setAttribute("aria-valuemax",r),this.setAttribute("aria-valuenow",e),this._positionKnob(this._calcRatio(e)*100)},_valueChanged:function(){this.fire("value-change",{composed:!0})},_immediateValueChanged:function(){this.dragging?this.fire("immediate-value-change",{composed:!0}):this.value=this.immediateValue},_secondaryProgressChanged:function(){this.secondaryProgress=this._clampValue(this.secondaryProgress)},_expandKnob:function(){this._setExpand(!0)},_resetKnob:function(){this.cancelDebouncer("expandKnob"),this._setExpand(!1)},_positionKnob:function(e){this._setImmediateValue(this._calcStep(this._calcKnobPosition(e))),this._setRatio(this._calcRatio(this.immediateValue)*100),this.$.sliderKnob.style.left=this.ratio+"%",this.dragging&&(this._knobstartx=this.ratio*this._w/100,this.translate3d(0,0,0,this.$.sliderKnob))},_calcKnobPosition:function(e){return(this.max-this.min)*e/100+this.min},_onTrack:function(e){switch(e.stopPropagation(),e.detail.state){case"start":this._trackStart(e);break;case"track":this._trackX(e);break;case"end":this._trackEnd();break}},_trackStart:function(e){this._setTransiting(!1),this._w=this.$.sliderBar.offsetWidth,this._x=this.ratio*this._w/100,this._startx=this._x,this._knobstartx=this._startx,this._minx=-this._startx,this._maxx=this._w-this._startx,this.$.sliderKnob.classList.add("dragging"),this._setDragging(!0)},_trackX:function(e){this.dragging||this._trackStart(e);var t=this._isRTL?-1:1,r=Math.min(this._maxx,Math.max(this._minx,e.detail.dx*t));this._x=this._startx+r;var n=this._calcStep(this._calcKnobPosition(this._x/this._w*100));this._setImmediateValue(n);var i=this._calcRatio(this.immediateValue)*this._w-this._knobstartx;this.translate3d(i+"px",0,0,this.$.sliderKnob)},_trackEnd:function(){var e=this.$.sliderKnob.style;this.$.sliderKnob.classList.remove("dragging"),this._setDragging(!1),this._resetKnob(),this.value=this.immediateValue,e.transform=e.webkitTransform="",this.fire("change",{composed:!0})},_knobdown:function(e){this._expandKnob(),e.preventDefault(),this.focus()},_bartrack:function(e){this._allowBarEvent(e)&&this._onTrack(e)},_barclick:function(e){this._w=this.$.sliderBar.offsetWidth;var t=this.$.sliderBar.getBoundingClientRect(),r=(e.detail.x-t.left)/this._w*100;this._isRTL&&(r=100-r);var n=this.ratio;this._setTransiting(!0),this._positionKnob(r),n===this.ratio&&this._setTransiting(!1),this.async(function(){this.fire("change",{composed:!0})}),e.preventDefault(),this.focus()},_bardown:function(e){this._allowBarEvent(e)&&(this.debounce("expandKnob",this._expandKnob,60),this._barclick(e))},_knobTransitionEnd:function(e){e.target===this.$.sliderKnob&&this._setTransiting(!1)},_updateMarkers:function(e,t,r,n){n||this._setMarkers([]);var i=Math.round((r-t)/this.step);i>e&&(i=e),(i<0||!isFinite(i))&&(i=0),this._setMarkers(new Array(i))},_mergeClasses:function(e){return Object.keys(e).filter(function(t){return e[t]}).join(" ")},_getClassNames:function(){return this._mergeClasses({disabled:this.disabled,pin:this.pin,snaps:this.snaps,ring:this.immediateValue<=this.min,expand:this.expand,dragging:this.dragging,transiting:this.transiting,editable:this.editable})},_allowBarEvent:function(e){return!this.ignoreBarTouch||e.detail.sourceEvent instanceof MouseEvent},get _isRTL(){return this.__isRTL===void 0&&(this.__isRTL=window.getComputedStyle(this).direction==="rtl"),this.__isRTL},_leftKey:function(e){this._isRTL?this._incrementKey(e):this._decrementKey(e)},_rightKey:function(e){this._isRTL?this._decrementKey(e):this._incrementKey(e)},_incrementKey:function(e){this.disabled||(e.detail.key==="end"?this.value=this.max:this.increment(),this.fire("change"),e.preventDefault())},_decrementKey:function(e){this.disabled||(e.detail.key==="home"?this.value=this.min:this.decrement(),this.fire("change"),e.preventDefault())},_changeValue:function(e){this.value=e.target.value,this.fire("change",{composed:!0})},_inputKeyDown:function(e){e.stopPropagation()},_createRipple:function(){return this._rippleContainer=this.$.sliderKnob,pE._createRipple.call(this)},_focusedChanged:function(e){e&&this.ensureRipple(),this.hasRipple()&&(e?this._ripple.style.display="":this._ripple.style.display="none",this._ripple.holdDown=e)}});var MW=document.createElement("template");MW.setAttribute("style","display: none;");MW.innerHTML=`<dom-module id="paper-spinner-styles">
  <template>
    <style>
      /*
      /**************************/
      /* STYLES FOR THE SPINNER */
      /**************************/

      /*
       * Constants:
       *      ARCSIZE     = 270 degrees (amount of circle the arc takes up)
       *      ARCTIME     = 1333ms (time it takes to expand and contract arc)
       *      ARCSTARTROT = 216 degrees (how much the start location of the arc
       *                                should rotate each time, 216 gives us a
       *                                5 pointed star shape (it's 360/5 * 3).
       *                                For a 7 pointed star, we might do
       *                                360/7 * 3 = 154.286)
       *      SHRINK_TIME = 400ms
       */

      :host {
        display: inline-block;
        position: relative;
        width: 28px;
        height: 28px;

        /* 360 * ARCTIME / (ARCSTARTROT + (360-ARCSIZE)) */
        --paper-spinner-container-rotation-duration: 1568ms;

        /* ARCTIME */
        --paper-spinner-expand-contract-duration: 1333ms;

        /* 4 * ARCTIME */
        --paper-spinner-full-cycle-duration: 5332ms;

        /* SHRINK_TIME */
        --paper-spinner-cooldown-duration: 400ms;
      }

      #spinnerContainer {
        width: 100%;
        height: 100%;

        /* The spinner does not have any contents that would have to be
         * flipped if the direction changes. Always use ltr so that the
         * style works out correctly in both cases. */
        direction: ltr;
      }

      #spinnerContainer.active {
        -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
        animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite;
      }

      @-webkit-keyframes container-rotate {
        to { -webkit-transform: rotate(360deg) }
      }

      @keyframes container-rotate {
        to { transform: rotate(360deg) }
      }

      .spinner-layer {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        white-space: nowrap;
        color: var(--paper-spinner-color, var(--google-blue-500));
      }

      .layer-1 {
        color: var(--paper-spinner-layer-1-color, var(--google-blue-500));
      }

      .layer-2 {
        color: var(--paper-spinner-layer-2-color, var(--google-red-500));
      }

      .layer-3 {
        color: var(--paper-spinner-layer-3-color, var(--google-yellow-500));
      }

      .layer-4 {
        color: var(--paper-spinner-layer-4-color, var(--google-green-500));
      }

      /**
       * IMPORTANT NOTE ABOUT CSS ANIMATION PROPERTIES (keanulee):
       *
       * iOS Safari (tested on iOS 8.1) does not handle animation-delay very well - it doesn't
       * guarantee that the animation will start _exactly_ after that value. So we avoid using
       * animation-delay and instead set custom keyframes for each color (as layer-2undant as it
       * seems).
       */
      .active .spinner-layer {
        -webkit-animation-name: fill-unfill-rotate;
        -webkit-animation-duration: var(--paper-spinner-full-cycle-duration);
        -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        -webkit-animation-iteration-count: infinite;
        animation-name: fill-unfill-rotate;
        animation-duration: var(--paper-spinner-full-cycle-duration);
        animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        animation-iteration-count: infinite;
        opacity: 1;
      }

      .active .spinner-layer.layer-1 {
        -webkit-animation-name: fill-unfill-rotate, layer-1-fade-in-out;
        animation-name: fill-unfill-rotate, layer-1-fade-in-out;
      }

      .active .spinner-layer.layer-2 {
        -webkit-animation-name: fill-unfill-rotate, layer-2-fade-in-out;
        animation-name: fill-unfill-rotate, layer-2-fade-in-out;
      }

      .active .spinner-layer.layer-3 {
        -webkit-animation-name: fill-unfill-rotate, layer-3-fade-in-out;
        animation-name: fill-unfill-rotate, layer-3-fade-in-out;
      }

      .active .spinner-layer.layer-4 {
        -webkit-animation-name: fill-unfill-rotate, layer-4-fade-in-out;
        animation-name: fill-unfill-rotate, layer-4-fade-in-out;
      }

      @-webkit-keyframes fill-unfill-rotate {
        12.5% { -webkit-transform: rotate(135deg) } /* 0.5 * ARCSIZE */
        25%   { -webkit-transform: rotate(270deg) } /* 1   * ARCSIZE */
        37.5% { -webkit-transform: rotate(405deg) } /* 1.5 * ARCSIZE */
        50%   { -webkit-transform: rotate(540deg) } /* 2   * ARCSIZE */
        62.5% { -webkit-transform: rotate(675deg) } /* 2.5 * ARCSIZE */
        75%   { -webkit-transform: rotate(810deg) } /* 3   * ARCSIZE */
        87.5% { -webkit-transform: rotate(945deg) } /* 3.5 * ARCSIZE */
        to    { -webkit-transform: rotate(1080deg) } /* 4   * ARCSIZE */
      }

      @keyframes fill-unfill-rotate {
        12.5% { transform: rotate(135deg) } /* 0.5 * ARCSIZE */
        25%   { transform: rotate(270deg) } /* 1   * ARCSIZE */
        37.5% { transform: rotate(405deg) } /* 1.5 * ARCSIZE */
        50%   { transform: rotate(540deg) } /* 2   * ARCSIZE */
        62.5% { transform: rotate(675deg) } /* 2.5 * ARCSIZE */
        75%   { transform: rotate(810deg) } /* 3   * ARCSIZE */
        87.5% { transform: rotate(945deg) } /* 3.5 * ARCSIZE */
        to    { transform: rotate(1080deg) } /* 4   * ARCSIZE */
      }

      @-webkit-keyframes layer-1-fade-in-out {
        0% { opacity: 1 }
        25% { opacity: 1 }
        26% { opacity: 0 }
        89% { opacity: 0 }
        90% { opacity: 1 }
        to { opacity: 1 }
      }

      @keyframes layer-1-fade-in-out {
        0% { opacity: 1 }
        25% { opacity: 1 }
        26% { opacity: 0 }
        89% { opacity: 0 }
        90% { opacity: 1 }
        to { opacity: 1 }
      }

      @-webkit-keyframes layer-2-fade-in-out {
        0% { opacity: 0 }
        15% { opacity: 0 }
        25% { opacity: 1 }
        50% { opacity: 1 }
        51% { opacity: 0 }
        to { opacity: 0 }
      }

      @keyframes layer-2-fade-in-out {
        0% { opacity: 0 }
        15% { opacity: 0 }
        25% { opacity: 1 }
        50% { opacity: 1 }
        51% { opacity: 0 }
        to { opacity: 0 }
      }

      @-webkit-keyframes layer-3-fade-in-out {
        0% { opacity: 0 }
        40% { opacity: 0 }
        50% { opacity: 1 }
        75% { opacity: 1 }
        76% { opacity: 0 }
        to { opacity: 0 }
      }

      @keyframes layer-3-fade-in-out {
        0% { opacity: 0 }
        40% { opacity: 0 }
        50% { opacity: 1 }
        75% { opacity: 1 }
        76% { opacity: 0 }
        to { opacity: 0 }
      }

      @-webkit-keyframes layer-4-fade-in-out {
        0% { opacity: 0 }
        65% { opacity: 0 }
        75% { opacity: 1 }
        90% { opacity: 1 }
        to { opacity: 0 }
      }

      @keyframes layer-4-fade-in-out {
        0% { opacity: 0 }
        65% { opacity: 0 }
        75% { opacity: 1 }
        90% { opacity: 1 }
        to { opacity: 0 }
      }

      .circle-clipper {
        display: inline-block;
        position: relative;
        width: 50%;
        height: 100%;
        overflow: hidden;
      }

      /**
       * Patch the gap that appear between the two adjacent div.circle-clipper while the
       * spinner is rotating (appears on Chrome 50, Safari 9.1.1, and Edge).
       */
      .spinner-layer::after {
        content: '';
        left: 45%;
        width: 10%;
        border-top-style: solid;
      }

      .spinner-layer::after,
      .circle-clipper .circle {
        box-sizing: border-box;
        position: absolute;
        top: 0;
        border-width: var(--paper-spinner-stroke-width, 3px);
        border-radius: 50%;
      }

      .circle-clipper .circle {
        bottom: 0;
        width: 200%;
        border-style: solid;
        border-bottom-color: transparent !important;
      }

      .circle-clipper.left .circle {
        left: 0;
        border-right-color: transparent !important;
        -webkit-transform: rotate(129deg);
        transform: rotate(129deg);
      }

      .circle-clipper.right .circle {
        left: -100%;
        border-left-color: transparent !important;
        -webkit-transform: rotate(-129deg);
        transform: rotate(-129deg);
      }

      .active .gap-patch::after,
      .active .circle-clipper .circle {
        -webkit-animation-duration: var(--paper-spinner-expand-contract-duration);
        -webkit-animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        -webkit-animation-iteration-count: infinite;
        animation-duration: var(--paper-spinner-expand-contract-duration);
        animation-timing-function: cubic-bezier(0.4, 0.0, 0.2, 1);
        animation-iteration-count: infinite;
      }

      .active .circle-clipper.left .circle {
        -webkit-animation-name: left-spin;
        animation-name: left-spin;
      }

      .active .circle-clipper.right .circle {
        -webkit-animation-name: right-spin;
        animation-name: right-spin;
      }

      @-webkit-keyframes left-spin {
        0% { -webkit-transform: rotate(130deg) }
        50% { -webkit-transform: rotate(-5deg) }
        to { -webkit-transform: rotate(130deg) }
      }

      @keyframes left-spin {
        0% { transform: rotate(130deg) }
        50% { transform: rotate(-5deg) }
        to { transform: rotate(130deg) }
      }

      @-webkit-keyframes right-spin {
        0% { -webkit-transform: rotate(-130deg) }
        50% { -webkit-transform: rotate(5deg) }
        to { -webkit-transform: rotate(-130deg) }
      }

      @keyframes right-spin {
        0% { transform: rotate(-130deg) }
        50% { transform: rotate(5deg) }
        to { transform: rotate(-130deg) }
      }

      #spinnerContainer.cooldown {
        -webkit-animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
        animation: container-rotate var(--paper-spinner-container-rotation-duration) linear infinite, fade-out var(--paper-spinner-cooldown-duration) cubic-bezier(0.4, 0.0, 0.2, 1);
      }

      @-webkit-keyframes fade-out {
        0% { opacity: 1 }
        to { opacity: 0 }
      }

      @keyframes fade-out {
        0% { opacity: 1 }
        to { opacity: 0 }
      }
    </style>
  </template>
</dom-module>`;document.head.appendChild(MW.content);var D9={properties:{active:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"__activeChanged"},alt:{type:String,value:"loading",observer:"__altChanged"},__coolingDown:{type:Boolean,value:!1}},__computeContainerClasses:function(e,t){return[e||t?"active":"",t?"cooldown":""].join(" ")},__activeChanged:function(e,t){this.__setAriaHidden(!e),this.__coolingDown=!e&&t},__altChanged:function(e){e==="loading"?this.alt=this.getAttribute("aria-label")||e:(this.__setAriaHidden(e===""),this.setAttribute("aria-label",e))},__setAriaHidden:function(e){var t="aria-hidden";e?this.setAttribute(t,"true"):this.removeAttribute(t)},__reset:function(){this.active=!1,this.__coolingDown=!1}};var N0t=Q`
  <style include="paper-spinner-styles"></style>

  <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]" on-animationend="__reset" on-webkit-animation-end="__reset">
    <div class="spinner-layer layer-1">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-2">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-3">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>

    <div class="spinner-layer layer-4">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>
  </div>
`;N0t.setAttribute("strip-whitespace","");Yt({_template:N0t,is:"paper-spinner",behaviors:[D9]});var D0t=Q`
  <style include="paper-spinner-styles"></style>

  <div id="spinnerContainer" class-name="[[__computeContainerClasses(active, __coolingDown)]]" on-animationend="__reset" on-webkit-animation-end="__reset">
    <div class="spinner-layer">
      <div class="circle-clipper left">
        <div class="circle"></div>
      </div>
      <div class="circle-clipper right">
        <div class="circle"></div>
      </div>
    </div>
  </div>
`;D0t.setAttribute("strip-whitespace","");Yt({_template:D0t,is:"paper-spinner-lite",behaviors:[D9]});var jbe=Q`<iron-iconset-svg name="paper-tabs" size="24">
<svg><defs>
<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"></path></g>
<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"></path></g>
</defs></svg>
</iron-iconset-svg>`;document.head.appendChild(jbe.content);Yt({_template:Q`
    <style>
      :host {
        @apply --layout-inline;
        @apply --layout-center;
        @apply --layout-center-justified;
        @apply --layout-flex-auto;

        position: relative;
        padding: 0 12px;
        overflow: hidden;
        cursor: pointer;
        vertical-align: middle;

        @apply --paper-font-common-base;
        @apply --paper-tab;
      }

      :host(:focus) {
        outline: none;
      }

      :host([link]) {
        padding: 0;
      }

      .tab-content {
        height: 100%;
        transform: translateZ(0);
          -webkit-transform: translateZ(0);
        transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);
        @apply --layout-horizontal;
        @apply --layout-center-center;
        @apply --layout-flex-auto;
        @apply --paper-tab-content;
      }

      :host(:not(.iron-selected)) > .tab-content {
        opacity: 0.8;

        @apply --paper-tab-content-unselected;
      }

      :host(:focus) .tab-content {
        opacity: 1;
        font-weight: 700;

        @apply --paper-tab-content-focused;
      }

      paper-ripple {
        color: var(--paper-tab-ink, var(--paper-yellow-a100));
      }

      .tab-content > ::slotted(a) {
        @apply --layout-flex-auto;

        height: 100%;
      }
    </style>

    <div class="tab-content">
      <slot></slot>
    </div>
`,is:"paper-tab",behaviors:[Di,Sh,su],properties:{link:{type:Boolean,value:!1,reflectToAttribute:!0}},hostAttributes:{role:"tab"},listeners:{down:"_updateNoink",tap:"_onTap"},attached:function(){this._updateNoink()},get _parentNoink(){var e=zt(this).parentNode;return!!e&&!!e.noink},_updateNoink:function(){this.noink=!!this.noink||!!this._parentNoink},_onTap:function(e){if(this.link){var t=this.queryEffectiveChildren("a");if(!t||e.target===t)return;t.click()}}});Yt({_template:Q`
    <style>
      :host {
        @apply --layout;
        @apply --layout-center;

        height: 48px;
        font-size: 14px;
        font-weight: 500;
        overflow: hidden;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;

        /* NOTE: Both values are needed, since some phones require the value to be \`transparent\`. */
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
        -webkit-tap-highlight-color: transparent;

        @apply --paper-tabs;
      }

      :host(:dir(rtl)) {
        @apply --layout-horizontal-reverse;
      }

      #tabsContainer {
        position: relative;
        height: 100%;
        white-space: nowrap;
        overflow: hidden;
        @apply --layout-flex-auto;
        @apply --paper-tabs-container;
      }

      #tabsContent {
        height: 100%;
        -moz-flex-basis: auto;
        -ms-flex-basis: auto;
        flex-basis: auto;
        @apply --paper-tabs-content;
      }

      #tabsContent.scrollable {
        position: absolute;
        white-space: nowrap;
      }

      #tabsContent:not(.scrollable),
      #tabsContent.scrollable.fit-container {
        @apply --layout-horizontal;
      }

      #tabsContent.scrollable.fit-container {
        min-width: 100%;
      }

      #tabsContent.scrollable.fit-container > ::slotted(*) {
        /* IE - prevent tabs from compressing when they should scroll. */
        -ms-flex: 1 0 auto;
        -webkit-flex: 1 0 auto;
        flex: 1 0 auto;
      }

      .hidden {
        display: none;
      }

      .not-visible {
        opacity: 0;
        cursor: default;
      }

      paper-icon-button {
        width: 48px;
        height: 48px;
        padding: 12px;
        margin: 0 4px;
      }

      #selectionBar {
        position: absolute;
        height: 0;
        bottom: 0;
        left: 0;
        right: 0;
        border-bottom: 2px solid var(--paper-tabs-selection-bar-color, var(--paper-yellow-a100));
          -webkit-transform: scale(0);
        transform: scale(0);
          -webkit-transform-origin: left center;
        transform-origin: left center;
          transition: -webkit-transform;
        transition: transform;

        @apply --paper-tabs-selection-bar;
      }

      #selectionBar.align-bottom {
        top: 0;
        bottom: auto;
      }

      #selectionBar.expand {
        transition-duration: 0.15s;
        transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
      }

      #selectionBar.contract {
        transition-duration: 0.18s;
        transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
      }

      #tabsContent > ::slotted(:not(#selectionBar)) {
        height: 100%;
      }
    </style>

    <paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>

    <div id="tabsContainer" on-track="_scroll" on-down="_down">
      <div id="tabsContent" class$="[[_computeTabsContentClass(scrollable, fitContainer)]]">
        <div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div>
        <slot></slot>
      </div>
    </div>

    <paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
`,is:"paper-tabs",behaviors:[Js,N9],properties:{noink:{type:Boolean,value:!1,observer:"_noinkChanged"},noBar:{type:Boolean,value:!1},noSlide:{type:Boolean,value:!1},scrollable:{type:Boolean,value:!1},fitContainer:{type:Boolean,value:!1},disableDrag:{type:Boolean,value:!1},hideScrollButtons:{type:Boolean,value:!1},alignBottom:{type:Boolean,value:!1},selectable:{type:String,value:"paper-tab"},autoselect:{type:Boolean,value:!1},autoselectDelay:{type:Number,value:0},_step:{type:Number,value:10},_holdDelay:{type:Number,value:1},_leftHidden:{type:Boolean,value:!1},_rightHidden:{type:Boolean,value:!1},_previousTab:{type:Object}},hostAttributes:{role:"tablist"},listeners:{"iron-resize":"_onTabSizingChanged","iron-items-changed":"_onTabSizingChanged","iron-select":"_onIronSelect","iron-deselect":"_onIronDeselect"},keyBindings:{"left:keyup right:keyup":"_onArrowKeyup"},created:function(){this._holdJob=null,this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,this._bindDelayedActivationHandler=this._delayedActivationHandler.bind(this),this.addEventListener("blur",this._onBlurCapture.bind(this),!0)},ready:function(){this.setScrollDirection("y",this.$.tabsContainer)},detached:function(){this._cancelPendingActivation()},_noinkChanged:function(e){var t=zt(this).querySelectorAll("paper-tab");t.forEach(e?this._setNoinkAttribute:this._removeNoinkAttribute)},_setNoinkAttribute:function(e){e.setAttribute("noink","")},_removeNoinkAttribute:function(e){e.removeAttribute("noink")},_computeScrollButtonClass:function(e,t,r){return!t||r?"hidden":e?"not-visible":""},_computeTabsContentClass:function(e,t){return e?"scrollable"+(t?" fit-container":""):" fit-container"},_computeSelectionBarClass:function(e,t){return e?"hidden":t?"align-bottom":""},_onTabSizingChanged:function(){this.debounce("_onTabSizingChanged",function(){this._scroll(),this._tabChanged(this.selectedItem)},10)},_onIronSelect:function(e){this._tabChanged(e.detail.item,this._previousTab),this._previousTab=e.detail.item,this.cancelDebouncer("tab-changed")},_onIronDeselect:function(e){this.debounce("tab-changed",function(){this._tabChanged(null,this._previousTab),this._previousTab=null},1)},_activateHandler:function(){this._cancelPendingActivation(),__._activateHandler.apply(this,arguments)},_scheduleActivation:function(e,t){this._pendingActivationItem=e,this._pendingActivationTimeout=this.async(this._bindDelayedActivationHandler,t)},_delayedActivationHandler:function(){var e=this._pendingActivationItem;this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0,e.fire(this.activateEvent,null,{bubbles:!0,cancelable:!0})},_cancelPendingActivation:function(){this._pendingActivationTimeout!==void 0&&(this.cancelAsync(this._pendingActivationTimeout),this._pendingActivationItem=void 0,this._pendingActivationTimeout=void 0)},_onArrowKeyup:function(e){this.autoselect&&this._scheduleActivation(this.focusedItem,this.autoselectDelay)},_onBlurCapture:function(e){e.target===this._pendingActivationItem&&this._cancelPendingActivation()},get _tabContainerScrollSize(){return Math.max(0,this.$.tabsContainer.scrollWidth-this.$.tabsContainer.offsetWidth)},_scroll:function(e,t){if(!!this.scrollable){var r=t&&-t.ddx||0;this._affectScroll(r)}},_down:function(e){this.async(function(){this._defaultFocusAsync&&(this.cancelAsync(this._defaultFocusAsync),this._defaultFocusAsync=null)},1)},_affectScroll:function(e){this.$.tabsContainer.scrollLeft+=e;var t=this.$.tabsContainer.scrollLeft;this._leftHidden=t===0,this._rightHidden=t===this._tabContainerScrollSize},_onLeftScrollButtonDown:function(){this._scrollToLeft(),this._holdJob=setInterval(this._scrollToLeft.bind(this),this._holdDelay)},_onRightScrollButtonDown:function(){this._scrollToRight(),this._holdJob=setInterval(this._scrollToRight.bind(this),this._holdDelay)},_onScrollButtonUp:function(){clearInterval(this._holdJob),this._holdJob=null},_scrollToLeft:function(){this._affectScroll(-this._step)},_scrollToRight:function(){this._affectScroll(this._step)},_tabChanged:function(e,t){if(!e){this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(0,0);return}var r=this.$.tabsContent.getBoundingClientRect(),n=r.width,i=e.getBoundingClientRect(),o=i.left-r.left;if(this._pos={width:this._calcPercent(i.width,n),left:this._calcPercent(o,n)},this.noSlide||t==null){this.$.selectionBar.classList.remove("expand"),this.$.selectionBar.classList.remove("contract"),this._positionBar(this._pos.width,this._pos.left);return}var a=t.getBoundingClientRect(),s=this.items.indexOf(t),l=this.items.indexOf(e),c=5;this.$.selectionBar.classList.add("expand");var u=s<l,h=this._isRTL;h&&(u=!u),u?this._positionBar(this._calcPercent(i.left+i.width-a.left,n)-c,this._left):this._positionBar(this._calcPercent(a.left+a.width-i.left,n)-c,this._calcPercent(o,n)+c),this.scrollable&&this._scrollToSelectedIfNeeded(i.width,o)},_scrollToSelectedIfNeeded:function(e,t){var r=t-this.$.tabsContainer.scrollLeft;r<0?this.$.tabsContainer.scrollLeft+=r:(r+=e-this.$.tabsContainer.offsetWidth,r>0&&(this.$.tabsContainer.scrollLeft+=r))},_calcPercent:function(e,t){return 100*e/t},_positionBar:function(e,t){e=e||0,t=t||0,this._width=e,this._left=t,this.transform("translateX("+t+"%) scaleX("+e/100+")",this.$.selectionBar)},_onBarTransitionEnd:function(e){var t=this.$.selectionBar.classList;t.contains("expand")?(t.remove("expand"),t.add("contract"),this._positionBar(this._pos.width,this._pos.left)):t.contains("contract")&&t.remove("contract")}});var Jx=null;Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: fixed;
        background-color: var(--paper-toast-background-color, #323232);
        color: var(--paper-toast-color, #f1f1f1);
        min-height: 48px;
        min-width: 288px;
        padding: 16px 24px;
        box-sizing: border-box;
        box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);
        border-radius: 2px;
        margin: 12px;
        font-size: 14px;
        cursor: default;
        -webkit-transition: -webkit-transform 0.3s, opacity 0.3s;
        transition: transform 0.3s, opacity 0.3s;
        opacity: 0;
        -webkit-transform: translateY(100px);
        transform: translateY(100px);
        @apply --paper-font-common-base;
      }

      :host(.capsule) {
        border-radius: 24px;
      }

      :host(.fit-bottom) {
        width: 100%;
        min-width: 0;
        border-radius: 0;
        margin: 0;
      }

      :host(.paper-toast-open) {
        opacity: 1;
        -webkit-transform: translateY(0px);
        transform: translateY(0px);
      }
    </style>

    <span id="label">{{text}}</span>
    <slot></slot>
`,is:"paper-toast",behaviors:[Kx],properties:{fitInto:{type:Object,value:window,observer:"_onFitIntoChanged"},horizontalAlign:{type:String,value:"left"},verticalAlign:{type:String,value:"bottom"},duration:{type:Number,value:3e3},text:{type:String,value:""},noCancelOnOutsideClick:{type:Boolean,value:!0},noAutoFocus:{type:Boolean,value:!0}},listeners:{transitionend:"__onTransitionEnd"},get visible(){return Da._warn("`visible` is deprecated, use `opened` instead"),this.opened},get _canAutoClose(){return this.duration>0&&this.duration!==1/0},created:function(){this._autoClose=null,ec.requestAvailability()},show:function(e){typeof e=="string"&&(e={text:e});for(var t in e)t.indexOf("_")===0?Da._warn('The property "'+t+'" is private and was not set.'):t in this?this[t]=e[t]:Da._warn('The property "'+t+'" is not valid.');this.open()},hide:function(){this.close()},__onTransitionEnd:function(e){e&&e.target===this&&e.propertyName==="opacity"&&(this.opened?this._finishRenderOpened():this._finishRenderClosed())},_openedChanged:function(){this._autoClose!==null&&(this.cancelAsync(this._autoClose),this._autoClose=null),this.opened?(Jx&&Jx!==this&&Jx.close(),Jx=this,this.fire("iron-announce",{text:this.text}),this._canAutoClose&&(this._autoClose=this.async(this.close,this.duration))):Jx===this&&(Jx=null),Pm._openedChanged.apply(this,arguments)},_renderOpened:function(){this.classList.add("paper-toast-open")},_renderClosed:function(){this.classList.remove("paper-toast-open")},_onFitIntoChanged:function(e){this.positionTarget=e}});var O0t=Q`

    <style>
      :host {
        display: inline-block;
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-font-common-base;
      }

      :host([disabled]) {
        pointer-events: none;
      }

      :host(:focus) {
        outline:none;
      }

      .toggle-bar {
        position: absolute;
        height: 100%;
        width: 100%;
        border-radius: 8px;
        pointer-events: none;
        opacity: 0.4;
        transition: background-color linear .08s;
        background-color: var(--paper-toggle-button-unchecked-bar-color, #000000);

        @apply --paper-toggle-button-unchecked-bar;
      }

      .toggle-button {
        position: absolute;
        top: -3px;
        left: 0;
        height: 20px;
        width: 20px;
        border-radius: 50%;
        box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);
        transition: -webkit-transform linear .08s, background-color linear .08s;
        transition: transform linear .08s, background-color linear .08s;
        will-change: transform;
        background-color: var(--paper-toggle-button-unchecked-button-color, var(--paper-grey-50));

        @apply --paper-toggle-button-unchecked-button;
      }

      .toggle-button.dragging {
        -webkit-transition: none;
        transition: none;
      }

      :host([checked]:not([disabled])) .toggle-bar {
        opacity: 0.5;
        background-color: var(--paper-toggle-button-checked-bar-color, var(--primary-color));

        @apply --paper-toggle-button-checked-bar;
      }

      :host([disabled]) .toggle-bar {
        background-color: #000;
        opacity: 0.12;
      }

      :host([checked]) .toggle-button {
        -webkit-transform: translate(16px, 0);
        transform: translate(16px, 0);
      }

      :host([checked]:not([disabled])) .toggle-button {
        background-color: var(--paper-toggle-button-checked-button-color, var(--primary-color));

        @apply --paper-toggle-button-checked-button;
      }

      :host([disabled]) .toggle-button {
        background-color: #bdbdbd;
        opacity: 1;
      }

      .toggle-ink {
        position: absolute;
        top: -14px;
        left: -14px;
        right: auto;
        bottom: auto;
        width: 48px;
        height: 48px;
        opacity: 0.5;
        pointer-events: none;
        color: var(--paper-toggle-button-unchecked-ink-color, var(--primary-text-color));

        @apply --paper-toggle-button-unchecked-ink;
      }

      :host([checked]) .toggle-ink {
        color: var(--paper-toggle-button-checked-ink-color, var(--primary-color));

        @apply --paper-toggle-button-checked-ink;
      }

      .toggle-container {
        display: inline-block;
        position: relative;
        width: 36px;
        height: 14px;
        /* The toggle button has an absolute position of -3px; The extra 1px
        /* accounts for the toggle button shadow box. */
        margin: 4px 1px;
      }

      .toggle-label {
        position: relative;
        display: inline-block;
        vertical-align: middle;
        padding-left: var(--paper-toggle-button-label-spacing, 8px);
        pointer-events: none;
        color: var(--paper-toggle-button-label-color, var(--primary-text-color));
      }

      /* invalid state */
      :host([invalid]) .toggle-bar {
        background-color: var(--paper-toggle-button-invalid-bar-color, var(--error-color));
      }

      :host([invalid]) .toggle-button {
        background-color: var(--paper-toggle-button-invalid-button-color, var(--error-color));
      }

      :host([invalid]) .toggle-ink {
        color: var(--paper-toggle-button-invalid-ink-color, var(--error-color));
      }
    </style>

    <div class="toggle-container">
      <div id="toggleBar" class="toggle-bar"></div>
      <div id="toggleButton" class="toggle-button"></div>
    </div>

    <div class="toggle-label"><slot></slot></div>

  `;O0t.setAttribute("strip-whitespace","");Yt({_template:O0t,is:"paper-toggle-button",behaviors:[Xx],hostAttributes:{role:"button","aria-pressed":"false",tabindex:0},properties:{},listeners:{track:"_ontrack"},attached:function(){Tm(this,function(){d_(this,"pan-y")})},_ontrack:function(e){var t=e.detail;t.state==="start"?this._trackStart(t):t.state==="track"?this._trackMove(t):t.state==="end"&&this._trackEnd(t)},_trackStart:function(e){this._width=this.$.toggleBar.offsetWidth/2,this._trackChecked=this.checked,this.$.toggleButton.classList.add("dragging")},_trackMove:function(e){var t=e.dx;this._x=Math.min(this._width,Math.max(0,this._trackChecked?this._width+t:t)),this.translate3d(this._x+"px",0,0,this.$.toggleButton),this._userActivate(this._x>this._width/2)},_trackEnd:function(e){this.$.toggleButton.classList.remove("dragging"),this.transform("",this.$.toggleButton)},_createRipple:function(){this._rippleContainer=this.$.toggleButton;var e=su._createRipple();return e.id="ink",e.setAttribute("recenters",""),e.classList.add("circle","toggle-ink"),e}});Yt({_template:Q`
    <style>
      :host {
        --calculated-paper-toolbar-height: var(--paper-toolbar-height, 64px);
        --calculated-paper-toolbar-sm-height: var(--paper-toolbar-sm-height, 56px);
        display: block;
        position: relative;
        box-sizing: border-box;
        -moz-box-sizing: border-box;
        height: var(--calculated-paper-toolbar-height);
        background: var(--paper-toolbar-background, var(--primary-color));
        color: var(--paper-toolbar-color, var(--dark-theme-text-color));
        @apply --paper-toolbar;
      }

      :host(.animate) {
        transition: var(--paper-toolbar-transition, height 0.18s ease-in);
      }

      :host(.medium-tall) {
        height: calc(var(--calculated-paper-toolbar-height) * 2);
        @apply --paper-toolbar-medium;
      }

      :host(.tall) {
        height: calc(var(--calculated-paper-toolbar-height) * 3);
        @apply --paper-toolbar-tall;
      }

      .toolbar-tools {
        position: relative;
        height: var(--calculated-paper-toolbar-height);
        padding: 0 16px;
        pointer-events: none;
        @apply --layout-horizontal;
        @apply --layout-center;
        @apply --paper-toolbar-content;
      }

      /*
       * TODO: Where should media query breakpoints live so they can be shared between elements?
       */

      @media (max-width: 600px) {
        :host {
          height: var(--calculated-paper-toolbar-sm-height);
        }

        :host(.medium-tall) {
          height: calc(var(--calculated-paper-toolbar-sm-height) * 2);
        }

        :host(.tall) {
          height: calc(var(--calculated-paper-toolbar-sm-height) * 3);
        }

        .toolbar-tools {
          height: var(--calculated-paper-toolbar-sm-height);
        }
      }

      #topBar {
        position: relative;
      }

      /* middle bar */
      #middleBar {
        position: absolute;
        top: 0;
        right: 0;
        left: 0;
      }

      :host(.tall) #middleBar,
      :host(.medium-tall) #middleBar {
        -webkit-transform: translateY(100%);
        transform: translateY(100%);
      }

      /* bottom bar */
      #bottomBar {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
      }

      /*
       * make elements (e.g. buttons) respond to mouse/touch events
       *
       * \`.toolbar-tools\` disables touch events so multiple toolbars can stack and not
       * absorb events. All children must have pointer events re-enabled to work as
       * expected.
       */
      .toolbar-tools > ::slotted(*:not([disabled])) {
        pointer-events: auto;
      }

      .toolbar-tools > ::slotted(.title) {
        @apply --paper-font-common-base;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 20px;
        font-weight: 400;
        line-height: 1;
        pointer-events: none;
        @apply --layout-flex;
      }

      .toolbar-tools > ::slotted(.title) {
        margin-left: 56px;
      }

      .toolbar-tools > ::slotted(paper-icon-button + .title) {
        margin-left: 0;
      }

      /**
       * The --paper-toolbar-title mixin is applied here instead of above to
       * fix the issue with margin-left being ignored due to css ordering.
       */
      .toolbar-tools > ::slotted(.title) {
        @apply --paper-toolbar-title;
      }

      .toolbar-tools > ::slotted(paper-icon-button[icon=menu]) {
        margin-right: 24px;
      }

      .toolbar-tools > ::slotted(.fit) {
        position: absolute;
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        margin: 0;
      }

      /* TODO(noms): Until we have a better solution for classes that don't use
       * /deep/ create our own.
       */
      .start-justified {
        @apply --layout-start-justified;
      }

      .center-justified {
        @apply --layout-center-justified;
      }

      .end-justified {
        @apply --layout-end-justified;
      }

      .around-justified {
        @apply --layout-around-justified;
      }

      .justified {
        @apply --layout-justified;
      }
    </style>

    <div id="topBar" class\$="toolbar-tools [[_computeBarExtraClasses(justify)]]">
      <slot name="top"></slot>
    </div>

    <div id="middleBar" class\$="toolbar-tools [[_computeBarExtraClasses(middleJustify)]]">
      <slot name="middle"></slot>
    </div>

    <div id="bottomBar" class\$="toolbar-tools [[_computeBarExtraClasses(bottomJustify)]]">
      <slot name="bottom"></slot>
    </div>
`,is:"paper-toolbar",hostAttributes:{role:"toolbar"},properties:{bottomJustify:{type:String,value:""},justify:{type:String,value:""},middleJustify:{type:String,value:""}},ready:function(){console.warn(this.is,"is deprecated. Please use app-layout instead!")},attached:function(){this._observer=this._observe(this),this._updateAriaLabelledBy()},detached:function(){this._observer&&this._observer.disconnect()},_observe:function(e){var t=new MutationObserver(function(){this._updateAriaLabelledBy()}.bind(this));return t.observe(e,{childList:!0,subtree:!0}),t},_updateAriaLabelledBy:function(){ci();for(var e=[],t=Array.prototype.slice.call(zt(this.root).querySelectorAll("slot")).concat(Array.prototype.slice.call(zt(this.root).querySelectorAll("content"))),r,n=0;r=t[n];n++)for(var i=zt(r).getDistributedNodes(),o,a=0;o=i[a];a++)if(o.classList&&o.classList.contains("title"))if(o.id)e.push(o.id);else{var s="paper-toolbar-label-"+Math.floor(Math.random()*1e4);o.id=s,e.push(s)}e.length>0&&this.setAttribute("aria-labelledby",e.join(" "))},_computeBarExtraClasses:function(e){return e?e+(e==="justified"?"":"-justified"):""}});Yt({_template:Q`
    <style>
      :host {
        display: block;
        position: absolute;
        outline: none;
        z-index: 1002;
        -moz-user-select: none;
        -ms-user-select: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: default;
      }

      #tooltip {
        display: block;
        outline: none;
        @apply --paper-font-common-base;
        font-size: 10px;
        line-height: 1;
        background-color: var(--paper-tooltip-background, #616161);
        color: var(--paper-tooltip-text-color, white);
        padding: 8px;
        border-radius: 2px;
        @apply --paper-tooltip;
      }

      @keyframes keyFrameScaleUp {
        0% {
          transform: scale(0.0);
        }
        100% {
          transform: scale(1.0);
        }
      }

      @keyframes keyFrameScaleDown {
        0% {
          transform: scale(1.0);
        }
        100% {
          transform: scale(0.0);
        }
      }

      @keyframes keyFrameFadeInOpacity {
        0% {
          opacity: 0;
        }
        100% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameFadeOutOpacity {
        0% {
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        100% {
          opacity: 0;
        }
      }

      @keyframes keyFrameSlideDownIn {
        0% {
          transform: translateY(-2000px);
          opacity: 0;
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
      }

      @keyframes keyFrameSlideDownOut {
        0% {
          transform: translateY(0);
          opacity: var(--paper-tooltip-opacity, 0.9);
        }
        10% {
          opacity: 0.2;
        }
        100% {
          transform: translateY(-2000px);
          opacity: 0;
        }
      }

      .fade-in-animation {
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameFadeInOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .fade-out-animation {
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 0ms);
        animation-name: keyFrameFadeOutOpacity;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-up-animation {
        transform: scale(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-in, 500ms);
        animation-name: keyFrameScaleUp;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-in, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .scale-down-animation {
        transform: scale(1);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameScaleDown;
        animation-iteration-count: 1;
        animation-timing-function: ease-in;
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation {
        transform: translateY(-2000px);
        opacity: 0;
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownIn;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .slide-down-animation-out {
        transform: translateY(0);
        opacity: var(--paper-tooltip-opacity, 0.9);
        animation-delay: var(--paper-tooltip-delay-out, 500ms);
        animation-name: keyFrameSlideDownOut;
        animation-iteration-count: 1;
        animation-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
        animation-duration: var(--paper-tooltip-duration-out, 500ms);
        animation-fill-mode: forwards;
        @apply --paper-tooltip-animation;
      }

      .cancel-animation {
        animation-delay: -30s !important;
      }

      /* Thanks IE 10. */

      .hidden {
        display: none !important;
      }
    </style>

    <div id="tooltip" class="hidden">
      <slot></slot>
    </div>
`,is:"paper-tooltip",hostAttributes:{role:"tooltip",tabindex:-1},properties:{for:{type:String,observer:"_findTarget"},manualMode:{type:Boolean,value:!1,observer:"_manualModeChanged"},position:{type:String,value:"bottom"},fitToVisibleBounds:{type:Boolean,value:!1},offset:{type:Number,value:14},marginTop:{type:Number,value:14},animationDelay:{type:Number,value:500,observer:"_delayChange"},animationEntry:{type:String,value:""},animationExit:{type:String,value:""},animationConfig:{type:Object,value:function(){return{entry:[{name:"fade-in-animation",node:this,timing:{delay:0}}],exit:[{name:"fade-out-animation",node:this}]}}},_showing:{type:Boolean,value:!1}},listeners:{webkitAnimationEnd:"_onAnimationEnd"},get target(){var e=zt(this).parentNode,t=zt(this).getOwnerRoot(),r;return this.for?r=zt(t).querySelector("#"+this.for):r=e.nodeType==Node.DOCUMENT_FRAGMENT_NODE?t.host:e,r},attached:function(){this._findTarget()},detached:function(){this.manualMode||this._removeListeners()},playAnimation:function(e){e==="entry"?this.show():e==="exit"&&this.hide()},cancelAnimation:function(){this.$.tooltip.classList.add("cancel-animation")},show:function(){if(!this._showing){if(zt(this).textContent.trim()===""){for(var e=!0,t=zt(this).getEffectiveChildNodes(),r=0;r<t.length;r++)if(t[r].textContent.trim()!==""){e=!1;break}if(e)return}this._showing=!0,this.$.tooltip.classList.remove("hidden"),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.updatePosition(),this._animationPlaying=!0,this.$.tooltip.classList.add(this._getAnimationType("entry"))}},hide:function(){if(!!this._showing){if(this._animationPlaying){this._showing=!1,this._cancelAnimation();return}else this._onAnimationFinish();this._showing=!1,this._animationPlaying=!0}},updatePosition:function(){if(!(!this._target||!this.offsetParent)){var e=this.offset;this.marginTop!=14&&this.offset==14&&(e=this.marginTop);var t=this.offsetParent.getBoundingClientRect(),r=this._target.getBoundingClientRect(),n=this.getBoundingClientRect(),i=(r.width-n.width)/2,o=(r.height-n.height)/2,a=r.left-t.left,s=r.top-t.top,l,c;switch(this.position){case"top":l=a+i,c=s-n.height-e;break;case"bottom":l=a+i,c=s+r.height+e;break;case"left":l=a-n.width-e,c=s+o;break;case"right":l=a+r.width+e,c=s+o;break}this.fitToVisibleBounds?(t.left+l+n.width>window.innerWidth?(this.style.right="0px",this.style.left="auto"):(this.style.left=Math.max(0,l)+"px",this.style.right="auto"),t.top+c+n.height>window.innerHeight?(this.style.bottom=t.height-s+e+"px",this.style.top="auto"):(this.style.top=Math.max(-t.top,c)+"px",this.style.bottom="auto")):(this.style.left=l+"px",this.style.top=c+"px")}},_addListeners:function(){this._target&&(this.listen(this._target,"mouseenter","show"),this.listen(this._target,"focus","show"),this.listen(this._target,"mouseleave","hide"),this.listen(this._target,"blur","hide"),this.listen(this._target,"tap","hide")),this.listen(this.$.tooltip,"animationend","_onAnimationEnd"),this.listen(this,"mouseenter","hide")},_findTarget:function(){this.manualMode||this._removeListeners(),this._target=this.target,this.manualMode||this._addListeners()},_delayChange:function(e){e!==500&&this.updateStyles({"--paper-tooltip-delay-in":e+"ms"})},_manualModeChanged:function(){this.manualMode?this._removeListeners():this._addListeners()},_cancelAnimation:function(){this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add("hidden")},_onAnimationFinish:function(){this._showing&&(this.$.tooltip.classList.remove(this._getAnimationType("entry")),this.$.tooltip.classList.remove("cancel-animation"),this.$.tooltip.classList.add(this._getAnimationType("exit")))},_onAnimationEnd:function(){this._animationPlaying=!1,this._showing||(this.$.tooltip.classList.remove(this._getAnimationType("exit")),this.$.tooltip.classList.add("hidden"))},_getAnimationType:function(e){if(e==="entry"&&this.animationEntry!=="")return this.animationEntry;if(e==="exit"&&this.animationExit!=="")return this.animationExit;if(this.animationConfig[e]&&typeof this.animationConfig[e][0].name=="string"){if(this.animationConfig[e][0].timing&&this.animationConfig[e][0].timing.delay&&this.animationConfig[e][0].timing.delay!==0){var t=this.animationConfig[e][0].timing.delay;e==="entry"?this.updateStyles({"--paper-tooltip-delay-in":t+"ms"}):e==="exit"&&this.updateStyles({"--paper-tooltip-delay-out":t+"ms"})}return this.animationConfig[e][0].name}},_removeListeners:function(){this._target&&(this.unlisten(this._target,"mouseenter","show"),this.unlisten(this._target,"focus","show"),this.unlisten(this._target,"mouseleave","hide"),this.unlisten(this._target,"blur","hide"),this.unlisten(this._target,"tap","hide")),this.unlisten(this.$.tooltip,"animationend","_onAnimationEnd"),this.unlisten(this,"mouseenter","hide")}});var rb=Ee(Oe(),1);var mE=class{constructor(t){this.listener=t}},EW=new Set,O9=new Set;window.addEventListener("hashchange",()=>{EW.forEach(e=>e.listener())});window.addEventListener("storage",()=>{O9.forEach(e=>e.listener())});function gE(e){let t=new mE(e);return EW.add(t),t}function TW(e){let t=new mE(e);return O9.add(t),t}function CW(){O9.forEach(e=>e.listener())}function AW(e){EW.delete(e)}function PW(e){O9.delete(e)}var kW={};Ks(kW,{getFakeHash:()=>LW,setFakeHash:()=>IW,setUseHash:()=>Xbe,useHash:()=>z9});var z0t=!1;function Xbe(e){z0t=e}function z9(){return z0t}var F0t="";function IW(e){F0t=e}function LW(){return F0t}var Qx="__tab__",RW={};function B0t(){return RW}function H0t(e){RW=e}gE(()=>{RW=eb(tb())});function tb(){return z9()?window.location.hash.slice(1):LW()}function eb(e){let t={};return e.split("&").forEach(n=>{let i=n.split("=");i.length===1?t[Qx]=i[0]:i.length===2&&(t[decodeURIComponent(i[0])]=decodeURIComponent(i[1]))}),t}function F9(e,t=!1){if(z9())if(t){let r=new URL(window.location.href);r.hash=e,window.history.replaceState(window.history.state,"",r.toString())}else window.location.hash=e;else IW(e)}function B9(e){let t="";e[Qx]!==void 0&&(t+=e[Qx]);let r=Object.keys(e).map(n=>[n,e[n]]).filter(n=>n[0]!==Qx).map(n=>encodeURIComponent(n[0])+"="+encodeURIComponent(n[1])).join("&");return r.length>0?t+"&"+r:t}function V0t(e,t=!1){let r=eb(tb());delete r[e],F9(B9(r),t)}var q0t="disambiguator",{get:$be,set:Kbe,getInitializer:y_,getObserver:v_,disposeBinding:Zbe}=vE(e=>e,e=>e),{get:Jbe,set:Qbe,getInitializer:vp,getObserver:xp,disposeBinding:t2e}=vE(e=>e==="true"?!0:e==="false"?!1:void 0,e=>e.toString()),{get:NW,set:DW,getInitializer:_E,getObserver:yE,disposeBinding:e2e}=vE(e=>+e,e=>e.toString()),{get:r2e,set:n2e,getInitializer:OW,getObserver:zW,disposeBinding:i2e}=vE(e=>JSON.parse(atob(e)),e=>btoa(JSON.stringify(e)));function vE(e,t){let r=[],n=[];function i(c,u={}){let{defaultValue:h,useLocalStorage:f=!1}=u,p=f?window.localStorage.getItem(c):eb(tb())[c];return p==null?rb.cloneDeep(h):e(p)}function o(c,u,h={}){let{defaultValue:f,useLocalStorage:p=!1,useLocationReplace:d=!1}=h,g=t(u);if(p)window.localStorage.setItem(c,g),CW();else if(!rb.isEqual(u,i(c,{useLocalStorage:p})))if(rb.isEqual(u,f))V0t(c,d);else{let _=eb(tb());_[c]=g,F9(B9(_),d)}}function a(c,u){let h=Kl({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=U0t(this,c),p=()=>{let _=i(f,h),y=this[h.polymerProperty];rb.isEqual(_,y)||(this[h.polymerProperty]=_)},g=(h.useLocalStorage?TW:gE)(()=>p());return h.useLocalStorage?n.push(g):r.push(g),p(),this[h.polymerProperty]}}function s(){r.forEach(c=>AW(c)),n.forEach(c=>PW(c))}function l(c,u){let h=Kl({defaultValue:u.defaultValue,polymerProperty:c,useLocalStorage:!1},u);return function(){let f=U0t(this,c),p=this[h.polymerProperty];o(f,p,h)}}return{get:i,set:o,getInitializer:a,getObserver:l,disposeBinding:s}}function o2e(){let e=new Set(["examplesPath","hideModelPane2","modelName1","modelName2","inferenceAddress1","inferenceAddress2","modelType","modelVersion1","modelVersion2","modelSignature1","modelSignature2","maxExamples","labelVocabPath","multiClass","sequenceExamples","maxClassesToDisplay","samplingOdds","usePredictApi","predictInputTensor","predictOutputTensor"]),t=eb(tb());if(t[Qx]==="whatif"){for(let r of e)if(r in t){let n=t[r];t[`p.whatif.${r}`]=n}}F9(B9(t)),H0t(t)}function U0t(e,t){let r=e[q0t];return(r==null?[t]:[r,t]).join(".")}var xE=class extends mt{constructor(){super(...arguments),this._tagFilter=y_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"}).call(this),this._tagFilterObserver=v_("tagFilter",{defaultValue:"",useLocalStorage:!1,polymerProperty:"_tagFilter"})}_computeTagFilter(){return this._tagFilter}};xE.template=Q`
    <paper-input
      no-label-float=""
      label="Filter tags (regular expressions supported)"
      value="{{_tagFilter}}"
      class="search-input"
    >
      <iron-icon prefix="" icon="search" slot="prefix"></iron-icon>
    </paper-input>
    <style>
      :host {
        display: block;
        margin: 10px 5px 10px 10px;
      }
    </style>
  `;E([A({type:String,notify:!0,computed:"_computeTagFilter(_tagFilter)"}),w("design:type",String)],xE.prototype,"tagFilter",void 0);E([A({type:String,observer:"_tagFilterObserver"}),w("design:type",String)],xE.prototype,"_tagFilter",void 0);xE=E([yt("tf-tag-filterer")],xE);function _s(e){let{moduleName:t,styleContent:r}=e,n=document.createElement("dom-module"),i=document.createElement("template"),o=[];e.styleDependencies&&e.styleDependencies.forEach(s=>{let l=document.createElement("style");l.setAttribute("include",s),o.push(l)});let a=document.createElement("style");Object.assign(a,{textContent:r}),o.forEach(s=>{i.content.appendChild(s)}),i.content.appendChild(a),n.appendChild(i),n.register(t)}_s({moduleName:"dashboard-style",styleDependencies:["iron-flex"],styleContent:`
      :host {
        --sidebar-vertical-padding: 15px;
        --sidebar-left-padding: 30px;
      }

      [slot='sidebar'] {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        height: 100%;
        margin-right: 10px;
        overflow-x: hidden;
        padding: 5px 0;
        text-overflow: ellipsis;
      }

      .settings {
        min-height: 50px;
        overflow-x: hidden;
        overflow-y: auto;
        will-change: transform;
      }

      .runs-selector {
        display: flex;
        flex-grow: 1;
        min-height: 200px;
      }

      tf-runs-selector {
        flex-grow: 1;
        flex-shrink: 1;
        left: var(--sidebar-left-padding);
        max-height: calc(100% - var(--sidebar-vertical-padding) * 2);
        overflow: hidden;
        position: absolute;
        right: 0;
      }

      .search-input {
        margin: 10px 5px 0 10px;
      }

      .sidebar-section {
        border-top: solid 1px var(--tb-ui-border);
        margin-right: 10px;
        padding: var(--sidebar-vertical-padding) 0
          var(--sidebar-vertical-padding) var(--sidebar-left-padding);
        position: relative;
        overflow: hidden;
      }

      .sidebar-section:first-of-type {
        border: none;
      }

      .sidebar-section paper-button {
        margin: 5px;
      }

      .sidebar-section paper-button:first-of-type {
        margin-left: 0 !important;
      }

      .sidebar-section paper-button:last-of-type {
        margin-right: 0 !important;
      }

      .sidebar-section > :first-child {
        margin-top: 0;
        padding-top: 0;
      }

      .sidebar-section > :last-child {
        margin-bottom: 0;
        padding-bottom: 0;
      }

      .sidebar-section h3 {
        color: var(--tb-secondary-text-color);
        display: block;
        font-size: 14px;
        font-weight: normal;
        margin: 10px 0 5px;
        pointer-events: none;
      }

      paper-checkbox {
        --paper-checkbox-checked-color: var(--tb-ui-dark-accent);
        --paper-checkbox-unchecked-color: var(--tb-ui-dark-accent);
        font-size: 15px;
        margin-top: 5px;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
  `});function _o(e){return class extends e{connectedCallback(){super.connectedCallback(),this._maybeSetDarkMode(),this.observer=new MutationObserver(r=>{r.some(i=>i.attributeName==="class")&&this._maybeSetDarkMode()}),this.observer.observe(document.body,{attributes:!0})}disconnectedCallback(){var r;super.disconnectedCallback(),(r=this.observer)==null||r.disconnect()}_maybeSetDarkMode(){this.classList.toggle("dark-mode",document.body.classList.contains("dark-mode"))}}}_s({moduleName:"scrollbar-style",styleContent:`
    .scrollbar::-webkit-scrollbar-track {
      visibility: hidden;
    }

    .scrollbar::-webkit-scrollbar {
      width: 10px;
    }

    .scrollbar::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.3);
      background-color: var(--paper-grey-500);
      color: var(--paper-grey-900);
    }
    .scrollbar {
      box-sizing: border-box;
    }
  `});var BW=document.createElement("style");BW.setAttribute("is","custom-style");BW.textContent=`
  :root {
    --tb-orange-weak: #ffa726;
    --tb-orange-strong: #f57c00;
    --tb-orange-dark: #dc7320;
    --tb-grey-darker: #e2e2e2;
    --tb-grey-lighter: #f3f3f3;
    --tb-ui-dark-accent: #757575;
    --tb-ui-light-accent: #e0e0e0;
    --tb-ui-border: var(--paper-grey-300);
    --tb-graph-faded: #e0d4b3;
    --tb-secondary-text-color: var(--paper-grey-800);
    --tb-raised-button-shadow-color: rgba(0, 0, 0, 0.2);
    --primary-background-color: #fff;
    --secondary-background-color: #e9e9e9;
    --tb-layout-background-color: #f5f5f5;
    --tb-link: #1976d2; /* material blue 700. */
    --tb-link-visited: #7b1fa2; /* material purple 700. */
  }

  :root .dark-mode {
    --tb-ui-border: var(--paper-grey-700);
    --tb-ui-dark-accent: var(--paper-grey-400);
    --tb-ui-light-accent: var(--paper-grey-600);
    --tb-secondary-text-color: var(--paper-grey-400);
    --tb-raised-button-shadow-color: rgba(255, 255, 255, 0.5);
    --primary-text-color: #fff;
    --secondary-text-color: var(--paper-grey-400);
    --primary-background-color: #303030;  /* material grey A400. */
    --secondary-background-color: #3a3a3a;
    --tb-layout-background-color: #3a3a3a;
    --tb-link: #42a5f5; /* material blue 400. */
    --tb-link-visited: #ba68c8; /* material purple 300. */
    /* Overrides paper-material */
    --shadow-elevation-2dp_-_box-shadow: 0 2px 2px 0 rgba(255, 255, 255, 0.14),
      0 1px 5px 0 rgba(255, 255, 255, 0.12),
      0 3px 1px -2px rgba(255, 255, 255, 0.2);
  }
`;document.head.appendChild(BW);var HW=class extends _o(mt){};HW.template=Q`
    <div id="sidebar">
      <slot name="sidebar"></slot>
    </div>

    <div id="center">
      <slot name="center" class="scollbar"></slot>
    </div>
    <style include="scrollbar-style"></style>
    <style>
      :host {
        background-color: #f5f5f5;
        display: flex;
        flex-direction: row;
        height: 100%;
      }

      :host(.dark-mode) {
        background-color: var(--secondary-background-color);
      }

      #sidebar {
        flex: 0 0 var(--tf-dashboard-layout-sidebar-basis, 25%);
        height: 100%;
        max-width: var(--tf-dashboard-layout-sidebar-max-width, 350px);
        min-width: var(--tf-dashboard-layout-sidebar-min-width, 270px);
        overflow-y: auto;
        text-overflow: ellipsis;
      }

      #center {
        flex-grow: 1;
        flex-shrink: 1;
        height: 100%;
        overflow: hidden;
      }

      ::slotted([slot='center']) {
        contain: strict;
        height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
        width: 100%;
        will-change: transform;
      }

      .tf-graph-dashboard #center {
        background: #fff;
      }
    </style>
  `;HW=E([yt("tf-dashboard-layout")],HW);var G0t="TF.TensorBoard.PaginatedView.limit",a2e=12,Ah=null,VW=new Set;function UW(e){VW.add(e)}function qW(e){VW.delete(e)}function GW(){return Ah==null&&(Ah=NW(G0t,{useLocalStorage:!0}),(Ah==null||!isFinite(Ah)||Ah<=0)&&(Ah=a2e)),Ah}function s2e(e){if(e!==Math.floor(e))throw new Error(`limit must be an integer, but got: ${e}`);if(e<=0)throw new Error(`limit must be positive, but got: ${e}`);e!==Ah&&(Ah=e,DW(G0t,Ah,{useLocalStorage:!0}),VW.forEach(t=>{t()}))}var nb=class extends mt{updateArrayProp(t,r,n){let i=this.get(t),o=r;if(!Array.isArray(o))throw RangeError(`Expected new value to '${t}' to be an array.`);Array.isArray(i)||(i=[],this.set(t,i));let a=new Set(o.map((c,u)=>n(c,u))),s=0,l=0;for(;s<i.length&&l<o.length;){if(a.has(n(i[s],s)))n(i[s],s)==n(o[l],l)?this.set(`${t}.${s}`,o[l]):this.splice(t,s,0,o[l]);else{this.splice(t,s,1);continue}l++,s++}s<i.length&&this.splice(t,s),l<o.length&&this.push(t,...o.slice(l))}};var Oi=class extends nb{constructor(){super(...arguments),this.as="item",this._contentActive=!0,this._domBootstrapped=!1,this._ctor=null,this._renderedItems=[],this._renderedTemplateInst=new Map,this._lruCachedItems=new Map,this._cacheSize=10,this._getItemKey=t=>JSON.stringify(t),this._isConnected=!1}connectedCallback(){super.connectedCallback(),this._isConnected=!0}setCacheSize(t){this._cacheSize=t}setGetItemKey(t){this._getItemKey=t}updateDom(t){this.updateArrayProp("_renderedItems",t,this._getItemKey)}_ensureTemplatized(){if(!this.isConnected)return!1;if(!this._ctor){let t=this.querySelector("template");this._ctor=tc(t,this,{parentModel:!0,instanceProps:{[this.as]:!0,active:this._contentActive},forwardHostProp:function(r,n){this._renderedTemplateInst.forEach(i=>{i.forwardHostProp(r,n)})}})}return!0}_bootstrapDom(){if(!this._ensureTemplatized()||this._domBootstrapped)return;new MutationObserver(r=>{for(let n of r)if(n.type==="childList")for(let i of Array.from(n.addedNodes))i instanceof Element&&i.setAttribute("slot","items")}).observe(this,{childList:!0}),Array.from(this.children).forEach(r=>{this.removeChild(r)}),this._lruCachedItems.clear(),this._renderedItems.forEach((r,n)=>this._insertItem(r,n)),this._domBootstrapped=!0}_updateActive(){!this._domBootstrapped||Array.from(this._renderedTemplateInst.values()).forEach(t=>{t.notifyPath("active",this._contentActive)})}_updateDom(t){if(!!this._domBootstrapped&&!(t.path=="_renderedItems"||t.path=="_renderedItems.length"))if(t.path==="_renderedItems.splices")t.value.indexSplices.forEach(n=>{let{index:i,addedCount:o,object:a,removed:s}=n;s.forEach(l=>{this._removeItem(l,this.children[i])}),a.slice(i,i+o).forEach((l,c)=>this._insertItem(l,i+c)),this._trimCache()});else{let r=this._getItemKey(t.value);this._renderedTemplateInst.has(r)?this._renderedTemplateInst.get(r).notifyPath(this.as,t.value):console.warn(`Expected '${r}' to exist in the DOM but could not find one.`)}}_insertItem(t,r){if(!this._ensureTemplatized())throw new Error("Expected templatized before inserting an item");let n,i=this._getItemKey(t);if(this._lruCachedItems.has(i))n=this._lruCachedItems.get(i),this._lruCachedItems.delete(i),this._renderedTemplateInst.get(i).notifyPath("active",this._contentActive);else{let o={[this.as]:t,active:this._contentActive},a=new this._ctor(o);n=a.root,this._renderedTemplateInst.set(i,a)}this.children[r]?this.insertBefore(n,this.children[r]):((n.nodeType==Node.DOCUMENT_FRAGMENT_NODE?Array.from(n.children):[n]).forEach(a=>a.setAttribute("slot","items")),this.appendChild(n))}_removeItem(t,r){r.parentNode&&r.parentNode.removeChild(r);let n=this._getItemKey(t);this._lruCachedItems.set(n,r),this._renderedTemplateInst.get(n).notifyPath("active",!1)}_trimCache(){for(;this._lruCachedItems.size>this._cacheSize;){let[t]=this._lruCachedItems.keys();this._lruCachedItems.delete(t),this._renderedTemplateInst.delete(t)}}};E([A({type:String}),w("design:type",Object)],Oi.prototype,"as",void 0);E([A({type:Array}),w("design:type",Array)],Oi.prototype,"items",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Oi.prototype,"_contentActive",void 0);E([A({type:Boolean}),w("design:type",Object)],Oi.prototype,"_domBootstrapped",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_ctor",void 0);E([A({type:Array}),w("design:type",Array)],Oi.prototype,"_renderedItems",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_renderedTemplateInst",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_lruCachedItems",void 0);E([A({type:Number}),w("design:type",Object)],Oi.prototype,"_cacheSize",void 0);E([A({type:Object}),w("design:type",Object)],Oi.prototype,"_getItemKey",void 0);E([A({type:Boolean}),w("design:type",Object)],Oi.prototype,"_isConnected",void 0);E([Bt("_isConnected"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_bootstrapDom",null);E([Bt("_contentActive"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_updateActive",null);E([Bt("_renderedItems.*","_domBootstrapped"),w("design:type",Function),w("design:paramtypes",[Object]),w("design:returntype",void 0)],Oi.prototype,"_updateDom",null);E([Bt("_cacheSize"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Oi.prototype,"_trimCache",null);var hn=class extends Oi{constructor(){super(...arguments),this.disablePagination=!1,this.getCategoryItemKey=t=>JSON.stringify(t),this._limit=12,this._activeIndex=0,this._pageInputRawValue="",this._pageInputFocused=!1}_computeCount(){return this.category.items.length}get _hasMultiple(){return this._count>1}_togglePane(){this.opened=!this.opened}_changeContentActive(t){this._contentActive=t}_onPaneRenderedChanged(t,r){t&&t!==r&&this.$.ifRendered.render()}_computePaneRendered(t){return!(t.metadata.type===Na.SEARCH_RESULTS&&t.name==="")}get _itemsRendered(){return this._paneRendered&&this.opened}_computeIsSearchResults(t){return t===Na.SEARCH_RESULTS}_computeIsInvalidSearchResults(t){return t.type===Na.SEARCH_RESULTS&&!t.validRegex}_computeIsUniversalSearchQuery(t){return t.type===Na.SEARCH_RESULTS&&t.universalRegex}_isCompositeSearch(){let{type:t,compositeSearch:r}=this.category.metadata;return r&&t===Na.SEARCH_RESULTS}ready(){super.ready(),this.opened=this.initialOpened==null?!0:this.initialOpened,this._limitListener=()=>{this.set("_limit",GW())},UW(this._limitListener),this._limitListener()}detached(){qW(this._limitListener)}_updateRenderedItems(){var t=this._itemsRendered,r=this._limit,n=this._activeIndex,i=this.disablePagination;if(!t)return;let o=Math.floor(n/r),a=this.category.items||[],s=i?a:a.slice(o*r,(o+1)*r);this.updateDom(s)}_limitChanged(t){this.setCacheSize(t*2)}_getCategoryItemKeyChanged(){this.setGetItemKey(this.getCategoryItemKey)}get _currentPage(){var t=this._limit,r=this._activeIndex;return Math.floor(r/t)+1}_computePageCount(t,r){return this.category?Math.ceil(this.category.items.length/r):0}get _multiplePagesExist(){var t=this._pageCount,r=this.disablePagination;return!r&&t>1}get _hasPreviousPage(){var t=this._currentPage;return t>1}get _hasNextPage(){var t=this._currentPage,r=this._pageCount;return t<r}_computeInputWidth(t){return`calc(${t.toString().length}em + 20px)`}_setActiveIndex(t){let r=(this.category.items||[]).length-1;t>r&&(t=r),t<0&&(t=0),this.set("_activeIndex",t)}_clampActiveIndex(){this._setActiveIndex(this._activeIndex)}_performPreviousPage(){this._setActiveIndex(this._activeIndex-this._limit)}_performNextPage(){this._setActiveIndex(this._activeIndex+this._limit)}_computePageInputValue(t,r,n){return t?r:n.toString()}_handlePageInputEvent(t){this.set("_pageInputRawValue",t.target.value);let r=Number(t.target.value||NaN);if(isNaN(r))return;let n=Math.max(1,Math.min(r,this._pageCount))-1;this._setActiveIndex(this._limit*n)}_handlePageChangeEvent(){this.set("_pageInputRawValue",this._currentPage.toString())}_handlePageFocusEvent(){this.set("_pageInputRawValue",this._pageInputValue),this.set("_pageInputFocused",!0)}_handlePageBlurEvent(){this.set("_pageInputFocused",!1)}_updatePageInputValue(t){var n;let r=(n=this.shadowRoot)==null?void 0:n.querySelector("#page-input input");r&&(r.value=t)}_updateInputWidth(){this.updateStyles({"--tf-category-paginated-view-page-input-width":this._inputWidth})}};hn.template=Q`
    <template is="dom-if" if="[[_paneRendered]]" id="ifRendered">
      <button class="heading" on-tap="_togglePane" open-button$="[[opened]]">
        <span class="name">
          <template is="dom-if" if="[[_isSearchResults]]">
            <template is="dom-if" if="[[_isCompositeSearch(category)]]">
              <span>Tags matching multiple experiments</span>
              <template is="dom-if" if="[[_isInvalidSearchResults]]">
                <span
                  >&nbsp;<strong>(malformed regular expression)</strong></span
                >
              </template>
            </template>
            <template is="dom-if" if="[[!_isCompositeSearch(category)]]">
              <span class="light">Tags matching /</span>
              <span class="category-name" title$="[[category.name]]"
                >[[category.name]]</span
              >
              <span class="light">/</span>
              <template is="dom-if" if="[[_isUniversalSearchQuery]]">
                <span> (all tags)</span>
              </template>
              <template is="dom-if" if="[[_isInvalidSearchResults]]">
                <span> <strong>(malformed regular expression)</strong></span>
              </template>
            </template>
          </template>
          <template is="dom-if" if="[[!_isSearchResults]]">
            <span class="category-name" title$="[[category.name]]"
              >[[category.name]]</span
            >
          </template>
        </span>
        <span class="count">
          <template is="dom-if" if="[[_hasMultiple]]">
            <span>[[_count]]</span>
          </template>
          <iron-icon icon="expand-more" class="expand-arrow"></iron-icon>
        </span>
      </button>
      <!-- TODO(stephanwlee): investigate further. For some reason,
        transitionend that the iron-collapse relies on sometimes does not
        trigger when rendering a chart with a spinner. A toy example cannot
        reproduce this bug. -->
      <iron-collapse opened="[[opened]]" no-animation="">
        <div class="content">
          <span id="top-of-container"></span>
          <template is="dom-if" if="[[_multiplePagesExist]]">
            <div class="big-page-buttons" style="margin-bottom: 10px;">
              <paper-button
                on-tap="_performPreviousPage"
                disabled$="[[!_hasPreviousPage]]"
                >Previous page</paper-button
              >
              <paper-button
                on-tap="_performNextPage"
                disabled$="[[!_hasNextPage]]"
                >Next page</paper-button
              >
            </div>
          </template>

          <div id="items">
            <slot name="items"></slot>
          </div>
          <template is="dom-if" if="[[_multiplePagesExist]]">
            <div id="controls-container">
              <div style="display: inline-block; padding: 0 5px">
                Page
                <paper-input
                  id="page-input"
                  type="number"
                  no-label-float=""
                  min="1"
                  max="[[_pageCount]]"
                  value="[[_pageInputValue]]"
                  on-input="_handlePageInputEvent"
                  on-change="_handlePageChangeEvent"
                  on-focus="_handlePageFocusEvent"
                  on-blur="_handlePageBlurEvent"
                ></paper-input>
                of [[_pageCount]]
              </div>
            </div>

            <div class="big-page-buttons" style="margin-top: 10px;">
              <paper-button
                on-tap="_performPreviousPage"
                disabled$="[[!_hasPreviousPage]]"
                >Previous page</paper-button
              >
              <paper-button
                on-tap="_performNextPage"
                disabled$="[[!_hasNextPage]]"
                >Next page</paper-button
              >
            </div>
          </template>
        </div>
      </iron-collapse>
    </template>
    <style>
      :host {
        display: block;
        margin: 0 5px 1px 10px;
      }

      :host(:first-of-type) {
        margin-top: 10px;
      }

      :host(:last-of-type) {
        margin-bottom: 20px;
      }

      .heading {
        background-color: var(--primary-background-color);
        border: none;
        color: inherit;
        cursor: pointer;
        width: 100%;
        font-size: 15px;
        line-height: 1;
        box-shadow: 0 1px 5px var(--tb-raised-button-shadow-color);
        padding: 10px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .heading::-moz-focus-inner {
        padding: 10px 15px;
      }

      [open-button] {
        border-bottom-left-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
      }

      [open-button] .expand-arrow {
        transform: rotateZ(180deg);
      }

      .name {
        display: inline-flex;
        overflow: hidden;
      }

      .light {
        color: var(--paper-grey-500);
      }

      .category-name {
        white-space: pre;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 2px 0;
      }

      .count {
        margin: 0 5px;
        font-size: 12px;
        color: var(--paper-grey-500);
        display: flex;
        align-items: center;
        flex: none;
      }

      .heading::-moz-focus-inner {
        padding: 10px 15px;
      }

      .content {
        display: flex;
        flex-direction: column;
        background-color: var(--primary-background-color);
        border-bottom-left-radius: 2px;
        border-bottom-right-radius: 2px;
        border-top: none;
        border: 1px solid #dedede;
        padding: 15px;
      }

      .light {
        color: var(--paper-grey-500);
      }

      #controls-container {
        justify-content: center;
        display: flex;
        flex-direction: row;
        flex-grow: 0;
        flex-shrink: 0;
        width: 100%;
      }

      #controls-container paper-button {
        display: inline-block;
      }

      .big-page-buttons {
        display: flex;
      }

      .big-page-buttons paper-button {
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
        display: inline-block;
        flex-basis: 0;
        flex-grow: 1;
        flex-shrink: 1;
        font-size: 13px;
      }

      .big-page-buttons paper-button[disabled] {
        background: none;
      }

      slot {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
      }

      ::slotted([slot='items']) {
        /* Tooltip for descriptions and others break with more strict ones. */
        contain: style;
      }

      #page-input {
        display: inline-block;
        width: var(--tf-category-paginated-view-page-input-width, 100%);
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],hn.prototype,"category",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"initialOpened",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],hn.prototype,"opened",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"disablePagination",void 0);E([A({type:Number,computed:"_computeCount(category.items.*)"}),w("design:type",Number)],hn.prototype,"_count",void 0);E([A({type:Boolean,computed:"_computePaneRendered(category)",observer:"_onPaneRenderedChanged"}),w("design:type",Boolean)],hn.prototype,"_paneRendered",void 0);E([A({type:Boolean,computed:"_computeIsSearchResults(category.metadata.type)"}),w("design:type",Boolean)],hn.prototype,"_isSearchResults",void 0);E([A({type:Boolean,computed:"_computeIsInvalidSearchResults(category.metadata)"}),w("design:type",Boolean)],hn.prototype,"_isInvalidSearchResults",void 0);E([A({type:Boolean,computed:"_computeIsUniversalSearchQuery(category.metadata)"}),w("design:type",Boolean)],hn.prototype,"_isUniversalSearchQuery",void 0);E([A({type:Object,observer:"_getCategoryItemKeyChanged"}),w("design:type",Object)],hn.prototype,"getCategoryItemKey",void 0);E([A({type:Number,observer:"_limitChanged"}),w("design:type",Number)],hn.prototype,"_limit",void 0);E([A({type:Number}),w("design:type",Number)],hn.prototype,"_activeIndex",void 0);E([A({type:Number,computed:"_computePageCount(category.items.*, _limit)"}),w("design:type",Number)],hn.prototype,"_pageCount",void 0);E([A({type:String,computed:"_computeInputWidth(_pageCount)",observer:"_updateInputWidth"}),w("design:type",String)],hn.prototype,"_inputWidth",void 0);E([A({type:String,computed:"_computePageInputValue(_pageInputFocused, _pageInputRawValue, _currentPage)",observer:"_updatePageInputValue"}),w("design:type",String)],hn.prototype,"_pageInputValue",void 0);E([A({type:String}),w("design:type",String)],hn.prototype,"_pageInputRawValue",void 0);E([A({type:Boolean}),w("design:type",Boolean)],hn.prototype,"_pageInputFocused",void 0);E([Rt("_count"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasMultiple",null);E([Bt("opened"),w("design:type",Function),w("design:paramtypes",[Boolean]),w("design:returntype",void 0)],hn.prototype,"_changeContentActive",null);E([Rt("opened","_paneRendered"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_itemsRendered",null);E([Bt("_itemsRendered","category.items.*","_limit","_activeIndex","_pageCount","disablePagination"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],hn.prototype,"_updateRenderedItems",null);E([Rt("_limit","_activeIndex"),w("design:type",Number),w("design:paramtypes",[])],hn.prototype,"_currentPage",null);E([Rt("_pageCount","disablePagination"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_multiplePagesExist",null);E([Rt("_currentPage"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasPreviousPage",null);E([Rt("_currentPage","_pageCount"),w("design:type",Boolean),w("design:paramtypes",[])],hn.prototype,"_hasNextPage",null);E([Bt("category.items.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],hn.prototype,"_clampActiveIndex",null);hn=E([yt("tf-category-paginated-view")],hn);var W0t=Ee(Oe(),1);var H9=class{constructor(t){this.listener=t}},bp=class{constructor(){this.requestManager=new Ae(1),this._listeners=new Set,this.initialized=!1}refresh(){return this.load().then(()=>{this.initialized=!0})}addListener(t){let r=new H9(t);return this._listeners.add(r),r}removeListenerByKey(t){this._listeners.delete(t)}emitChange(){this._listeners.forEach(t=>{try{t.listener()}catch(r){}})}};var V9=class extends bp{load(){let t=_e().environment();return this.requestManager.request(t).then(r=>{let n={dataLocation:r.data_location,windowTitle:r.window_title};r.experiment_name!==void 0&&(n.experimentName=r.experiment_name),r.experiment_description!==void 0&&(n.experimentDescription=r.experiment_description),r.creation_time!==void 0&&(n.creationTime=r.creation_time),!W0t.isEqual(this.environment,n)&&(this.environment=n,this.emitChange())})}getDataLocation(){return this.environment?this.environment.dataLocation:""}getWindowTitle(){return this.environment?this.environment.windowTitle:""}getExperimentName(){return this.environment?this.environment.experimentName:""}getExperimentDescription(){return this.environment?this.environment.experimentDescription:""}getCreationTime(){return this.environment?this.environment.creationTime:null}},ib=new V9;var Y0t=Ee(Oe(),1);var U9=class extends bp{constructor(){super(...arguments),this._runs=[]}load(){let t=_e().runs();return this.requestManager.request(t).then(r=>{Y0t.isEqual(this._runs,r)||(this._runs=r,this.emitChange())})}getRuns(){return this._runs.slice()}},wp=new U9;var Vr={};Ks(Vr,{FormatSpecifier:()=>GE,active:()=>Vvt,arc:()=>BSt,area:()=>z8,areaRadial:()=>o$,ascending:()=>oa,autoType:()=>ij,axisBottom:()=>Z9,axisLeft:()=>lb,axisRight:()=>m_t,axisTop:()=>d_t,bisect:()=>ys,bisectLeft:()=>$0t,bisectRight:()=>WW,bisector:()=>ob,blob:()=>D1t,brush:()=>GL,brushSelection:()=>UL,brushX:()=>jvt,brushY:()=>qL,buffer:()=>O1t,chord:()=>$vt,clientPoint:()=>Dm,cluster:()=>Wbt,color:()=>rc,contourDensity:()=>g1t,contours:()=>ZL,create:()=>syt,creator:()=>Rm,cross:()=>q9,csv:()=>F1t,csvFormat:()=>b1t,csvFormatBody:()=>w1t,csvFormatRow:()=>M1t,csvFormatRows:()=>S1t,csvFormatValue:()=>E1t,csvParse:()=>Cb,csvParseRows:()=>x1t,cubehelix:()=>la,curveBasis:()=>W8,curveBasisClosed:()=>QSt,curveBasisOpen:()=>e3t,curveBundle:()=>n3t,curveCardinal:()=>i3t,curveCardinalClosed:()=>o3t,curveCardinalOpen:()=>a3t,curveCatmullRom:()=>l3t,curveCatmullRomClosed:()=>u3t,curveCatmullRomOpen:()=>f3t,curveLinear:()=>Yh,curveLinearClosed:()=>d3t,curveMonotoneX:()=>x3t,curveMonotoneY:()=>b3t,curveNatural:()=>M3t,curveStep:()=>E3t,curveStepAfter:()=>C3t,curveStepBefore:()=>T3t,customEvent:()=>Mp,descending:()=>Z0t,deviation:()=>W9,dispatch:()=>vs,drag:()=>pb,dragDisable:()=>zm,dragEnable:()=>Fm,dsv:()=>oj,dsvFormat:()=>Wm,easeBack:()=>OL,easeBackIn:()=>OY,easeBackInOut:()=>OL,easeBackOut:()=>zY,easeBounce:()=>P_,easeBounceIn:()=>RY,easeBounceInOut:()=>NY,easeBounceOut:()=>P_,easeCircle:()=>NL,easeCircleIn:()=>IY,easeCircleInOut:()=>NL,easeCircleOut:()=>LY,easeCubic:()=>xs,easeCubicIn:()=>xY,easeCubicInOut:()=>xs,easeCubicOut:()=>bY,easeElastic:()=>zL,easeElasticIn:()=>HY,easeElasticInOut:()=>VY,easeElasticOut:()=>zL,easeExp:()=>RL,easeExpIn:()=>AY,easeExpInOut:()=>RL,easeExpOut:()=>PY,easeLinear:()=>_Y,easePoly:()=>LL,easePolyIn:()=>SY,easePolyInOut:()=>LL,easePolyOut:()=>MY,easeQuad:()=>IL,easeQuadIn:()=>yY,easeQuadInOut:()=>IL,easeQuadOut:()=>vY,easeSin:()=>kL,easeSinIn:()=>EY,easeSinInOut:()=>kL,easeSinOut:()=>TY,entries:()=>u1t,event:()=>qt,extent:()=>aa,forceCenter:()=>W1t,forceCollide:()=>uxt,forceLink:()=>fxt,forceManyBody:()=>gxt,forceRadial:()=>_xt,forceSimulation:()=>mxt,forceX:()=>yxt,forceY:()=>vxt,format:()=>xn,formatDefaultLocale:()=>nk,formatLocale:()=>ek,formatPrefix:()=>WE,formatSpecifier:()=>Lp,geoAlbers:()=>Uk,geoAlbersUsa:()=>Lbt,geoArea:()=>Nxt,geoAzimuthalEqualArea:()=>kbt,geoAzimuthalEqualAreaRaw:()=>Gk,geoAzimuthalEquidistant:()=>Rbt,geoAzimuthalEquidistantRaw:()=>Wk,geoBounds:()=>Uxt,geoCentroid:()=>Xxt,geoCircle:()=>Qxt,geoClipAntimeridian:()=>e5,geoClipCircle:()=>Ak,geoClipExtent:()=>rbt,geoClipRectangle:()=>Dp,geoConicConformal:()=>Dbt,geoConicConformalRaw:()=>jj,geoConicEqualArea:()=>W_,geoConicEqualAreaRaw:()=>Wj,geoConicEquidistant:()=>zbt,geoConicEquidistantRaw:()=>Xj,geoContains:()=>cbt,geoDistance:()=>Nb,geoEqualEarth:()=>Fbt,geoEqualEarthRaw:()=>Xk,geoEquirectangular:()=>Obt,geoEquirectangularRaw:()=>j_,geoGnomonic:()=>Bbt,geoGnomonicRaw:()=>$k,geoGraticule:()=>Nk,geoGraticule10:()=>fbt,geoIdentity:()=>Hbt,geoInterpolate:()=>pbt,geoLength:()=>kk,geoMercator:()=>Nbt,geoMercatorRaw:()=>Y_,geoNaturalEarth1:()=>Vbt,geoNaturalEarth1Raw:()=>Kk,geoOrthographic:()=>Ubt,geoOrthographicRaw:()=>Zk,geoPath:()=>Tbt,geoProjection:()=>Si,geoProjectionMutator:()=>l5,geoRotation:()=>wk,geoStereographic:()=>qbt,geoStereographicRaw:()=>Jk,geoStream:()=>vo,geoTransform:()=>Cbt,geoTransverseMercator:()=>Gbt,geoTransverseMercatorRaw:()=>Qk,gray:()=>Syt,hcl:()=>gb,hierarchy:()=>p5,histogram:()=>r_t,hsl:()=>Vm,html:()=>q1t,image:()=>H1t,interpolate:()=>nc,interpolateArray:()=>Dyt,interpolateBasis:()=>lL,interpolateBasisClosed:()=>cL,interpolateBlues:()=>xSt,interpolateBrBG:()=>Qwt,interpolateBuGn:()=>lSt,interpolateBuPu:()=>cSt,interpolateCividis:()=>TSt,interpolateCool:()=>PSt,interpolateCubehelix:()=>Jyt,interpolateCubehelixDefault:()=>CSt,interpolateCubehelixLong:()=>E_,interpolateDate:()=>fL,interpolateDiscrete:()=>Oyt,interpolateGnBu:()=>uSt,interpolateGreens:()=>bSt,interpolateGreys:()=>wSt,interpolateHcl:()=>$yt,interpolateHclLong:()=>Kyt,interpolateHsl:()=>Yyt,interpolateHslLong:()=>jyt,interpolateHue:()=>zyt,interpolateInferno:()=>DSt,interpolateLab:()=>M_,interpolateMagma:()=>NSt,interpolateNumber:()=>zi,interpolateNumberArray:()=>yb,interpolateObject:()=>pL,interpolateOrRd:()=>hSt,interpolateOranges:()=>ESt,interpolatePRGn:()=>tSt,interpolatePiYG:()=>eSt,interpolatePlasma:()=>OSt,interpolatePuBu:()=>pSt,interpolatePuBuGn:()=>fSt,interpolatePuOr:()=>rSt,interpolatePuRd:()=>dSt,interpolatePurples:()=>SSt,interpolateRainbow:()=>ISt,interpolateRdBu:()=>nSt,interpolateRdGy:()=>iSt,interpolateRdPu:()=>mSt,interpolateRdYlBu:()=>oSt,interpolateRdYlGn:()=>aSt,interpolateReds:()=>MSt,interpolateRgb:()=>qm,interpolateRgbBasis:()=>uL,interpolateRgbBasisClosed:()=>Nyt,interpolateRound:()=>dL,interpolateSinebow:()=>LSt,interpolateSpectral:()=>sSt,interpolateString:()=>vb,interpolateTransformCss:()=>_L,interpolateTransformSvg:()=>yL,interpolateTurbo:()=>kSt,interpolateViridis:()=>RSt,interpolateWarm:()=>ASt,interpolateYlGn:()=>_St,interpolateYlGnBu:()=>gSt,interpolateYlOrBr:()=>ySt,interpolateYlOrRd:()=>vSt,interpolateZoom:()=>vL,interrupt:()=>hu,interval:()=>nvt,isoFormat:()=>Fwt,isoParse:()=>Bwt,json:()=>V1t,keys:()=>$L,lab:()=>w_,lch:()=>Eyt,line:()=>vu,lineRadial:()=>i$,linkHorizontal:()=>WSt,linkRadial:()=>jSt,linkVertical:()=>YSt,local:()=>eL,map:()=>Ji,matcher:()=>ub,max:()=>lu,mean:()=>o_t,median:()=>a_t,merge:()=>Im,min:()=>Lm,mouse:()=>zo,namespace:()=>Ph,namespaces:()=>SE,nest:()=>r1t,now:()=>Ap,pack:()=>d2t,packEnclose:()=>e8,packSiblings:()=>u2t,pairs:()=>K0t,partition:()=>m2t,path:()=>bs,permute:()=>s_t,pie:()=>qSt,piecewise:()=>dY,pointRadial:()=>ly,polygonArea:()=>M2t,polygonCentroid:()=>E2t,polygonContains:()=>P2t,polygonHull:()=>A2t,polygonLength:()=>I2t,precisionFixed:()=>ik,precisionPrefix:()=>ok,precisionRound:()=>ak,quadtree:()=>zh,quantile:()=>sa,quantize:()=>Qyt,radialArea:()=>o$,radialLine:()=>i$,randomBates:()=>R2t,randomExponential:()=>N2t,randomIrwinHall:()=>s8,randomLogNormal:()=>k2t,randomNormal:()=>a8,randomUniform:()=>L2t,range:()=>Ir,rgb:()=>cu,ribbon:()=>Jvt,scaleBand:()=>Qm,scaleDiverging:()=>I8,scaleDivergingLog:()=>CX,scaleDivergingPow:()=>L8,scaleDivergingSqrt:()=>qwt,scaleDivergingSymlog:()=>AX,scaleIdentity:()=>u8,scaleImplicit:()=>l8,scaleLinear:()=>On,scaleLog:()=>cc,scaleOrdinal:()=>gu,scalePoint:()=>tg,scalePow:()=>K_,scaleQuantile:()=>eg,scaleQuantize:()=>qb,scaleSequential:()=>T8,scaleSequentialLog:()=>EX,scaleSequentialPow:()=>C8,scaleSequentialQuantile:()=>A8,scaleSequentialSqrt:()=>Uwt,scaleSequentialSymlog:()=>TX,scaleSqrt:()=>Y2t,scaleSymlog:()=>f8,scaleThreshold:()=>p8,scaleTime:()=>Yb,scaleUtc:()=>Vwt,scan:()=>l_t,schemeAccent:()=>Gwt,schemeBlues:()=>KX,schemeBrBG:()=>PX,schemeBuGn:()=>FX,schemeBuPu:()=>BX,schemeCategory10:()=>jb,schemeDark2:()=>Wwt,schemeGnBu:()=>HX,schemeGreens:()=>ZX,schemeGreys:()=>JX,schemeOrRd:()=>VX,schemeOranges:()=>e$,schemePRGn:()=>IX,schemePaired:()=>Ywt,schemePastel1:()=>jwt,schemePastel2:()=>Xwt,schemePiYG:()=>LX,schemePuBu:()=>qX,schemePuBuGn:()=>UX,schemePuOr:()=>kX,schemePuRd:()=>GX,schemePurples:()=>QX,schemeRdBu:()=>RX,schemeRdGy:()=>NX,schemeRdPu:()=>WX,schemeRdYlBu:()=>DX,schemeRdYlGn:()=>OX,schemeReds:()=>t$,schemeSet1:()=>$wt,schemeSet2:()=>Kwt,schemeSet3:()=>Zwt,schemeSpectral:()=>zX,schemeTableau10:()=>Jwt,schemeYlGn:()=>jX,schemeYlGnBu:()=>YX,schemeYlOrBr:()=>XX,schemeYlOrRd:()=>$X,select:()=>Ht,selectAll:()=>Ep,selection:()=>Ih,selector:()=>Nm,selectorAll:()=>cb,set:()=>o1t,shuffle:()=>c_t,stack:()=>A3t,stackOffsetDiverging:()=>I3t,stackOffsetExpand:()=>P3t,stackOffsetNone:()=>xu,stackOffsetSilhouette:()=>L3t,stackOffsetWiggle:()=>k3t,stackOrderAppearance:()=>Z8,stackOrderAscending:()=>J8,stackOrderDescending:()=>R3t,stackOrderInsideOut:()=>N3t,stackOrderNone:()=>bu,stackOrderReverse:()=>D3t,stratify:()=>y2t,style:()=>Sp,sum:()=>u_t,svg:()=>G1t,symbol:()=>ZSt,symbolCircle:()=>k5,symbolCross:()=>B8,symbolDiamond:()=>H8,symbolSquare:()=>U8,symbolStar:()=>V8,symbolTriangle:()=>q8,symbolWye:()=>G8,symbols:()=>KSt,text:()=>D_,thresholdFreedmanDiaconis:()=>n_t,thresholdScott:()=>i_t,thresholdSturges:()=>sb,tickFormat:()=>c8,tickIncrement:()=>x_,tickStep:()=>tl,ticks:()=>ab,timeDay:()=>ty,timeDays:()=>Q2t,timeFormat:()=>M5,timeFormatDefaultLocale:()=>S8,timeFormatLocale:()=>S5,timeFriday:()=>uX,timeFridays:()=>iwt,timeHour:()=>y8,timeHours:()=>Z2t,timeInterval:()=>br,timeMillisecond:()=>Z_,timeMilliseconds:()=>aX,timeMinute:()=>_8,timeMinutes:()=>$2t,timeMonday:()=>ry,timeMondays:()=>twt,timeMonth:()=>v8,timeMonths:()=>swt,timeParse:()=>wX,timeSaturday:()=>hX,timeSaturdays:()=>owt,timeSecond:()=>Q_,timeSeconds:()=>sX,timeSunday:()=>rg,timeSundays:()=>fX,timeThursday:()=>zp,timeThursdays:()=>nwt,timeTuesday:()=>lX,timeTuesdays:()=>ewt,timeWednesday:()=>cX,timeWednesdays:()=>rwt,timeWeek:()=>rg,timeWeeks:()=>fX,timeYear:()=>Gh,timeYears:()=>lwt,timeout:()=>zE,timer:()=>A_,timerFlush:()=>gY,touch:()=>Tp,touches:()=>lyt,transition:()=>PL,transpose:()=>Y9,tree:()=>v2t,treemap:()=>x2t,treemapBinary:()=>b2t,treemapDice:()=>Uh,treemapResquarify:()=>S2t,treemapSlice:()=>Jm,treemapSliceDice:()=>w2t,treemapSquarify:()=>o8,tsv:()=>B1t,tsvFormat:()=>A1t,tsvFormatBody:()=>P1t,tsvFormatRow:()=>L1t,tsvFormatRows:()=>I1t,tsvFormatValue:()=>k1t,tsvParse:()=>Ab,tsvParseRows:()=>C1t,utcDay:()=>ny,utcDays:()=>dwt,utcFormat:()=>ay,utcFriday:()=>gX,utcFridays:()=>vwt,utcHour:()=>b8,utcHours:()=>fwt,utcMillisecond:()=>Z_,utcMilliseconds:()=>aX,utcMinute:()=>x8,utcMinutes:()=>uwt,utcMonday:()=>oy,utcMondays:()=>mwt,utcMonth:()=>w8,utcMonths:()=>wwt,utcParse:()=>E5,utcSaturday:()=>_X,utcSaturdays:()=>xwt,utcSecond:()=>Q_,utcSeconds:()=>sX,utcSunday:()=>ng,utcSundays:()=>yX,utcThursday:()=>Fp,utcThursdays:()=>ywt,utcTuesday:()=>dX,utcTuesdays:()=>gwt,utcWednesday:()=>mX,utcWednesdays:()=>_wt,utcWeek:()=>ng,utcWeeks:()=>yX,utcYear:()=>Wh,utcYears:()=>Swt,values:()=>l1t,variance:()=>G9,version:()=>j0t,voronoi:()=>K3t,window:()=>hb,xml:()=>U1t,zip:()=>h_t,zoom:()=>eR,zoomIdentity:()=>Xh,zoomTransform:()=>i2});var j0t="5.7.0";function oa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function ob(e){return e.length===1&&(e=l2e(e)),{left:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)<0?n=o+1:i=o}return n},right:function(t,r,n,i){for(n==null&&(n=0),i==null&&(i=t.length);n<i;){var o=n+i>>>1;e(t[o],r)>0?i=o:n=o+1}return n}}}function l2e(e){return function(t,r){return oa(e(t),r)}}var X0t=ob(oa),WW=X0t.right,$0t=X0t.left,ys=WW;function K0t(e,t){t==null&&(t=YW);for(var r=0,n=e.length-1,i=e[0],o=new Array(n<0?0:n);r<n;)o[r]=t(i,i=e[++r]);return o}function YW(e,t){return[e,t]}function q9(e,t,r){var n=e.length,i=t.length,o=new Array(n*i),a,s,l,c;for(r==null&&(r=YW),a=l=0;a<n;++a)for(c=e[a],s=0;s<i;++s,++l)o[l]=r(c,t[s]);return o}function Z0t(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function Qs(e){return e===null?NaN:+e}function G9(e,t){var r=e.length,n=0,i=-1,o=0,a,s,l=0;if(t==null)for(;++i<r;)isNaN(a=Qs(e[i]))||(s=a-o,o+=s/++n,l+=s*(a-o));else for(;++i<r;)isNaN(a=Qs(t(e[i],i,e)))||(s=a-o,o+=s/++n,l+=s*(a-o));if(n>1)return l/(n-1)}function W9(e,t){var r=G9(e,t);return r&&Math.sqrt(r)}function aa(e,t){var r=e.length,n=-1,i,o,a;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=a=i;++n<r;)(i=e[n])!=null&&(o>i&&(o=i),a<i&&(a=i))}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=a=i;++n<r;)(i=t(e[n],n,e))!=null&&(o>i&&(o=i),a<i&&(a=i));return[o,a]}var J0t=Array.prototype,Q0t=J0t.slice,t_t=J0t.map;function bE(e){return function(){return e}}function e_t(e){return e}function Ir(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,o=new Array(i);++n<i;)o[n]=e+n*r;return o}var jW=Math.sqrt(50),XW=Math.sqrt(10),$W=Math.sqrt(2);function ab(e,t,r){var n,i=-1,o,a,s;if(t=+t,e=+e,r=+r,e===t&&r>0)return[e];if((n=t<e)&&(o=e,e=t,t=o),(s=x_(e,t,r))===0||!isFinite(s))return[];if(s>0)for(e=Math.ceil(e/s),t=Math.floor(t/s),a=new Array(o=Math.ceil(t-e+1));++i<o;)a[i]=(e+i)*s;else for(e=Math.floor(e*s),t=Math.ceil(t*s),a=new Array(o=Math.ceil(e-t+1));++i<o;)a[i]=(e-i)/s;return n&&a.reverse(),a}function x_(e,t,r){var n=(t-e)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),o=n/Math.pow(10,i);return i>=0?(o>=jW?10:o>=XW?5:o>=$W?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=jW?10:o>=XW?5:o>=$W?2:1)}function tl(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),o=n/i;return o>=jW?i*=10:o>=XW?i*=5:o>=$W&&(i*=2),t<e?-i:i}function sb(e){return Math.ceil(Math.log(e.length)/Math.LN2)+1}function r_t(){var e=e_t,t=aa,r=sb;function n(i){var o,a=i.length,s,l=new Array(a);for(o=0;o<a;++o)l[o]=e(i[o],o,i);var c=t(l),u=c[0],h=c[1],f=r(l,u,h);Array.isArray(f)||(f=tl(u,h,f),f=Ir(Math.ceil(u/f)*f,h,f));for(var p=f.length;f[0]<=u;)f.shift(),--p;for(;f[p-1]>h;)f.pop(),--p;var d=new Array(p+1),g;for(o=0;o<=p;++o)g=d[o]=[],g.x0=o>0?f[o-1]:u,g.x1=o<p?f[o]:h;for(o=0;o<a;++o)s=l[o],u<=s&&s<=h&&d[ys(f,s,0,p)].push(i[o]);return d}return n.value=function(i){return arguments.length?(e=typeof i=="function"?i:bE(i),n):e},n.domain=function(i){return arguments.length?(t=typeof i=="function"?i:bE([i[0],i[1]]),n):t},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?bE(Q0t.call(i)):bE(i),n):r},n}function sa(e,t,r){if(r==null&&(r=Qs),!!(n=e.length)){if((t=+t)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,o=Math.floor(i),a=+r(e[o],o,e),s=+r(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function n_t(e,t,r){return e=t_t.call(e,Qs).sort(oa),Math.ceil((r-t)/(2*(sa(e,.75)-sa(e,.25))*Math.pow(e.length,-1/3)))}function i_t(e,t,r){return Math.ceil((r-t)/(3.5*W9(e)*Math.pow(e.length,-1/3)))}function lu(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&i>o&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&i>o&&(o=i);return o}function o_t(e,t){var r=e.length,n=r,i=-1,o,a=0;if(t==null)for(;++i<r;)isNaN(o=Qs(e[i]))?--n:a+=o;else for(;++i<r;)isNaN(o=Qs(t(e[i],i,e)))?--n:a+=o;if(n)return a/n}function a_t(e,t){var r=e.length,n=-1,i,o=[];if(t==null)for(;++n<r;)isNaN(i=Qs(e[n]))||o.push(i);else for(;++n<r;)isNaN(i=Qs(t(e[n],n,e)))||o.push(i);return sa(o.sort(oa),.5)}function Im(e){for(var t=e.length,r,n=-1,i=0,o,a;++n<t;)i+=e[n].length;for(o=new Array(i);--t>=0;)for(a=e[t],r=a.length;--r>=0;)o[--i]=a[r];return o}function Lm(e,t){var r=e.length,n=-1,i,o;if(t==null){for(;++n<r;)if((i=e[n])!=null&&i>=i)for(o=i;++n<r;)(i=e[n])!=null&&o>i&&(o=i)}else for(;++n<r;)if((i=t(e[n],n,e))!=null&&i>=i)for(o=i;++n<r;)(i=t(e[n],n,e))!=null&&o>i&&(o=i);return o}function s_t(e,t){for(var r=t.length,n=new Array(r);r--;)n[r]=e[t[r]];return n}function l_t(e,t){if(!!(r=e.length)){var r,n=0,i=0,o,a=e[i];for(t==null&&(t=oa);++n<r;)(t(o=e[n],a)<0||t(a,a)!==0)&&(a=o,i=n);if(t(a,a)===0)return i}}function c_t(e,t,r){for(var n=(r==null?e.length:r)-(t=t==null?0:+t),i,o;n;)o=Math.random()*n--|0,i=e[n+t],e[n+t]=e[o+t],e[o+t]=i;return e}function u_t(e,t){var r=e.length,n=-1,i,o=0;if(t==null)for(;++n<r;)(i=+e[n])&&(o+=i);else for(;++n<r;)(i=+t(e[n],n,e))&&(o+=i);return o}function Y9(e){if(!(o=e.length))return[];for(var t=-1,r=Lm(e,c2e),n=new Array(r);++t<r;)for(var i=-1,o,a=n[t]=new Array(o);++i<o;)a[i]=e[i][t];return n}function c2e(e){return e.length}function h_t(){return Y9(arguments)}var j9=Array.prototype.slice;function f_t(e){return e}var X9=1,$9=2,KW=3,wE=4,p_t=1e-6;function u2e(e){return"translate("+(e+.5)+",0)"}function h2e(e){return"translate(0,"+(e+.5)+")"}function f2e(e){return function(t){return+e(t)}}function p2e(e){var t=Math.max(0,e.bandwidth()-1)/2;return e.round()&&(t=Math.round(t)),function(r){return+e(r)+t}}function d2e(){return!this.__axis}function K9(e,t){var r=[],n=null,i=null,o=6,a=6,s=3,l=e===X9||e===wE?-1:1,c=e===wE||e===$9?"x":"y",u=e===X9||e===KW?u2e:h2e;function h(f){var p=n==null?t.ticks?t.ticks.apply(t,r):t.domain():n,d=i==null?t.tickFormat?t.tickFormat.apply(t,r):f_t:i,g=Math.max(o,0)+s,_=t.range(),y=+_[0]+.5,x=+_[_.length-1]+.5,b=(t.bandwidth?p2e:f2e)(t.copy()),S=f.selection?f.selection():f,C=S.selectAll(".domain").data([null]),P=S.selectAll(".tick").data(p,t).order(),k=P.exit(),O=P.enter().append("g").attr("class","tick"),D=P.select("line"),B=P.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(O),D=D.merge(O.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),B=B.merge(O.append("text").attr("fill","currentColor").attr(c,l*g).attr("dy",e===X9?"0em":e===KW?"0.71em":"0.32em")),f!==S&&(C=C.transition(f),P=P.transition(f),D=D.transition(f),B=B.transition(f),k=k.transition(f).attr("opacity",p_t).attr("transform",function(I){return isFinite(I=b(I))?u(I):this.getAttribute("transform")}),O.attr("opacity",p_t).attr("transform",function(I){var L=this.parentNode.__axis;return u(L&&isFinite(L=L(I))?L:b(I))})),k.remove(),C.attr("d",e===wE||e==$9?a?"M"+l*a+","+y+"H0.5V"+x+"H"+l*a:"M0.5,"+y+"V"+x:a?"M"+y+","+l*a+"V0.5H"+x+"V"+l*a:"M"+y+",0.5H"+x),P.attr("opacity",1).attr("transform",function(I){return u(b(I))}),D.attr(c+"2",l*o),B.attr(c,l*g).text(d),S.filter(d2e).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===$9?"start":e===wE?"end":"middle"),S.each(function(){this.__axis=b})}return h.scale=function(f){return arguments.length?(t=f,h):t},h.ticks=function(){return r=j9.call(arguments),h},h.tickArguments=function(f){return arguments.length?(r=f==null?[]:j9.call(f),h):r.slice()},h.tickValues=function(f){return arguments.length?(n=f==null?null:j9.call(f),h):n&&n.slice()},h.tickFormat=function(f){return arguments.length?(i=f,h):i},h.tickSize=function(f){return arguments.length?(o=a=+f,h):o},h.tickSizeInner=function(f){return arguments.length?(o=+f,h):o},h.tickSizeOuter=function(f){return arguments.length?(a=+f,h):a},h.tickPadding=function(f){return arguments.length?(s=+f,h):s},h}function d_t(e){return K9(X9,e)}function m_t(e){return K9($9,e)}function Z9(e){return K9(KW,e)}function lb(e){return K9(wE,e)}km();km();var Q9="http://www.w3.org/1999/xhtml",SE={svg:"http://www.w3.org/2000/svg",xhtml:Q9,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ph(e){var t=e+="",r=t.indexOf(":");return r>=0&&(t=e.slice(0,r))!=="xmlns"&&(e=e.slice(r+1)),SE.hasOwnProperty(t)?{space:SE[t],local:e}:e}function y2e(e){return function(){var t=this.ownerDocument,r=this.namespaceURI;return r===Q9&&t.documentElement.namespaceURI===Q9?t.createElement(e):t.createElementNS(r,e)}}function v2e(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Rm(e){var t=Ph(e);return(t.local?v2e:y2e)(t)}function x2e(){}function Nm(e){return e==null?x2e:function(){return this.querySelector(e)}}function v_t(e){typeof e!="function"&&(e=Nm(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=new Array(a),l,c,u=0;u<a;++u)(l=o[u])&&(c=e.call(l,l.__data__,u,o))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Nn(n,this._parents)}function b2e(){return[]}function cb(e){return e==null?b2e:function(){return this.querySelectorAll(e)}}function x_t(e){typeof e!="function"&&(e=cb(e));for(var t=this._groups,r=t.length,n=[],i=[],o=0;o<r;++o)for(var a=t[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&(n.push(e.call(l,l.__data__,c,a)),i.push(l));return new Nn(n,i)}function ub(e){return function(){return this.matches(e)}}function b_t(e){typeof e!="function"&&(e=ub(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Nn(n,this._parents)}function tL(e){return new Array(e.length)}function w_t(){return new Nn(this._enter||this._groups.map(tL),this._parents)}function ME(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ME.prototype={constructor:ME,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function S_t(e){return function(){return e}}var M_t="$";function w2e(e,t,r,n,i,o){for(var a=0,s,l=t.length,c=o.length;a<c;++a)(s=t[a])?(s.__data__=o[a],n[a]=s):r[a]=new ME(e,o[a]);for(;a<l;++a)(s=t[a])&&(i[a]=s)}function S2e(e,t,r,n,i,o,a){var s,l,c={},u=t.length,h=o.length,f=new Array(u),p;for(s=0;s<u;++s)(l=t[s])&&(f[s]=p=M_t+a.call(l,l.__data__,s,t),p in c?i[s]=l:c[p]=l);for(s=0;s<h;++s)p=M_t+a.call(e,o[s],s,o),(l=c[p])?(n[s]=l,l.__data__=o[s],c[p]=null):r[s]=new ME(e,o[s]);for(s=0;s<u;++s)(l=t[s])&&c[f[s]]===l&&(i[s]=l)}function E_t(e,t){if(!e)return p=new Array(this.size()),c=-1,this.each(function(P){p[++c]=P}),p;var r=t?S2e:w2e,n=this._parents,i=this._groups;typeof e!="function"&&(e=S_t(e));for(var o=i.length,a=new Array(o),s=new Array(o),l=new Array(o),c=0;c<o;++c){var u=n[c],h=i[c],f=h.length,p=e.call(u,u&&u.__data__,c,n),d=p.length,g=s[c]=new Array(d),_=a[c]=new Array(d),y=l[c]=new Array(f);r(u,h,g,_,y,p,t);for(var x=0,b=0,S,C;x<d;++x)if(S=g[x]){for(x>=b&&(b=x+1);!(C=_[b])&&++b<d;);S._next=C||null}}return a=new Nn(a,n),a._enter=s,a._exit=l,a}function T_t(){return new Nn(this._exit||this._groups.map(tL),this._parents)}function C_t(e,t,r){var n=this.enter(),i=this,o=this.exit();return n=typeof e=="function"?e(n):n.append(e+""),t!=null&&(i=t(i)),r==null?o.remove():r(o),n&&i?n.merge(i).order():i}function A_t(e){for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Nn(a,this._parents)}function P_t(){for(var e=this._groups,t=-1,r=e.length;++t<r;)for(var n=e[t],i=n.length-1,o=n[i],a;--i>=0;)(a=n[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function I_t(e){e||(e=M2e);function t(h,f){return h&&f?e(h.__data__,f.__data__):!h-!f}for(var r=this._groups,n=r.length,i=new Array(n),o=0;o<n;++o){for(var a=r[o],s=a.length,l=i[o]=new Array(s),c,u=0;u<s;++u)(c=a[u])&&(l[u]=c);l.sort(t)}return new Nn(i,this._parents).order()}function M2e(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function L_t(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function k_t(){var e=new Array(this.size()),t=-1;return this.each(function(){e[++t]=this}),e}function R_t(){for(var e=this._groups,t=0,r=e.length;t<r;++t)for(var n=e[t],i=0,o=n.length;i<o;++i){var a=n[i];if(a)return a}return null}function N_t(){var e=0;return this.each(function(){++e}),e}function D_t(){return!this.node()}function O_t(e){for(var t=this._groups,r=0,n=t.length;r<n;++r)for(var i=t[r],o=0,a=i.length,s;o<a;++o)(s=i[o])&&e.call(s,s.__data__,o,i);return this}function E2e(e){return function(){this.removeAttribute(e)}}function T2e(e){return function(){this.removeAttributeNS(e.space,e.local)}}function C2e(e,t){return function(){this.setAttribute(e,t)}}function A2e(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function P2e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttribute(e):this.setAttribute(e,r)}}function I2e(e,t){return function(){var r=t.apply(this,arguments);r==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,r)}}function z_t(e,t){var r=Ph(e);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((t==null?r.local?T2e:E2e:typeof t=="function"?r.local?I2e:P2e:r.local?A2e:C2e)(r,t))}function hb(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function L2e(e){return function(){this.style.removeProperty(e)}}function k2e(e,t,r){return function(){this.style.setProperty(e,t,r)}}function R2e(e,t,r){return function(){var n=t.apply(this,arguments);n==null?this.style.removeProperty(e):this.style.setProperty(e,n,r)}}function F_t(e,t,r){return arguments.length>1?this.each((t==null?L2e:typeof t=="function"?R2e:k2e)(e,t,r==null?"":r)):Sp(this.node(),e)}function Sp(e,t){return e.style.getPropertyValue(t)||hb(e).getComputedStyle(e,null).getPropertyValue(t)}function N2e(e){return function(){delete this[e]}}function D2e(e,t){return function(){this[e]=t}}function O2e(e,t){return function(){var r=t.apply(this,arguments);r==null?delete this[e]:this[e]=r}}function B_t(e,t){return arguments.length>1?this.each((t==null?N2e:typeof t=="function"?O2e:D2e)(e,t)):this.node()[e]}function H_t(e){return e.trim().split(/^|\s+/)}function ZW(e){return e.classList||new V_t(e)}function V_t(e){this._node=e,this._names=H_t(e.getAttribute("class")||"")}V_t.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function U_t(e,t){for(var r=ZW(e),n=-1,i=t.length;++n<i;)r.add(t[n])}function q_t(e,t){for(var r=ZW(e),n=-1,i=t.length;++n<i;)r.remove(t[n])}function z2e(e){return function(){U_t(this,e)}}function F2e(e){return function(){q_t(this,e)}}function B2e(e,t){return function(){(t.apply(this,arguments)?U_t:q_t)(this,e)}}function G_t(e,t){var r=H_t(e+"");if(arguments.length<2){for(var n=ZW(this.node()),i=-1,o=r.length;++i<o;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof t=="function"?B2e:t?z2e:F2e)(r,t))}function H2e(){this.textContent=""}function V2e(e){return function(){this.textContent=e}}function U2e(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function W_t(e){return arguments.length?this.each(e==null?H2e:(typeof e=="function"?U2e:V2e)(e)):this.node().textContent}function q2e(){this.innerHTML=""}function G2e(e){return function(){this.innerHTML=e}}function W2e(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function Y_t(e){return arguments.length?this.each(e==null?q2e:(typeof e=="function"?W2e:G2e)(e)):this.node().innerHTML}function Y2e(){this.nextSibling&&this.parentNode.appendChild(this)}function j_t(){return this.each(Y2e)}function j2e(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function X_t(){return this.each(j2e)}function $_t(e){var t=typeof e=="function"?e:Rm(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function X2e(){return null}function K_t(e,t){var r=typeof e=="function"?e:Rm(e),n=t==null?X2e:typeof t=="function"?t:Nm(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function $2e(){var e=this.parentNode;e&&e.removeChild(this)}function Z_t(){return this.each($2e)}function K2e(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Z2e(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function J_t(e){return this.select(e?Z2e:K2e)}function Q_t(e){return arguments.length?this.property("__data__",e):this.node().__data__}var eyt={},qt=null;typeof document!="undefined"&&(tyt=document.documentElement,"onmouseenter"in tyt||(eyt={mouseenter:"mouseover",mouseleave:"mouseout"}));var tyt;function J2e(e,t,r){return e=ryt(e,t,r),function(n){var i=n.relatedTarget;(!i||i!==this&&!(i.compareDocumentPosition(this)&8))&&e.call(this,n)}}function ryt(e,t,r){return function(n){var i=qt;qt=n;try{e.call(this,this.__data__,t,r)}finally{qt=i}}}function Q2e(e){return e.trim().split(/^|\s+/).map(function(t){var r="",n=t.indexOf(".");return n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),{type:t,name:r}})}function twe(e){return function(){var t=this.__on;if(!!t){for(var r=0,n=-1,i=t.length,o;r<i;++r)o=t[r],(!e.type||o.type===e.type)&&o.name===e.name?this.removeEventListener(o.type,o.listener,o.capture):t[++n]=o;++n?t.length=n:delete this.__on}}}function ewe(e,t,r){var n=eyt.hasOwnProperty(e.type)?J2e:ryt;return function(i,o,a){var s=this.__on,l,c=n(t,o,a);if(s){for(var u=0,h=s.length;u<h;++u)if((l=s[u]).type===e.type&&l.name===e.name){this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=r),l.value=t;return}}this.addEventListener(e.type,c,r),l={type:e.type,name:e.name,value:t,listener:c,capture:r},s?s.push(l):this.__on=[l]}}function nyt(e,t,r){var n=Q2e(e+""),i,o=n.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(i=0,u=s[l];i<o;++i)if((a=n[i]).type===u.type&&a.name===u.name)return u.value}return}for(s=t?ewe:twe,r==null&&(r=!1),i=0;i<o;++i)this.each(s(n[i],t,r));return this}function Mp(e,t,r,n){var i=qt;e.sourceEvent=qt,qt=e;try{return t.apply(r,n)}finally{qt=i}}function iyt(e,t,r){var n=hb(e),i=n.CustomEvent;typeof i=="function"?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function rwe(e,t){return function(){return iyt(this,e,t)}}function nwe(e,t){return function(){return iyt(this,e,t.apply(this,arguments))}}function oyt(e,t){return this.each((typeof t=="function"?nwe:rwe)(e,t))}var EE=[null];function Nn(e,t){this._groups=e,this._parents=t}function ayt(){return new Nn([[document.documentElement]],EE)}Nn.prototype=ayt.prototype={constructor:Nn,select:v_t,selectAll:x_t,filter:b_t,data:E_t,enter:w_t,exit:T_t,join:C_t,merge:A_t,order:P_t,sort:I_t,call:L_t,nodes:k_t,node:R_t,size:N_t,empty:D_t,each:O_t,attr:z_t,style:F_t,property:B_t,classed:G_t,text:W_t,html:Y_t,raise:j_t,lower:X_t,append:$_t,insert:K_t,remove:Z_t,clone:J_t,datum:Q_t,on:nyt,dispatch:oyt};var Ih=ayt;function Ht(e){return typeof e=="string"?new Nn([[document.querySelector(e)]],[document.documentElement]):new Nn([[e]],EE)}function syt(e){return Ht(Rm(e).call(document.documentElement))}var iwe=0;function eL(){return new JW}function JW(){this._="@"+(++iwe).toString(36)}JW.prototype=eL.prototype={constructor:JW,get:function(e){for(var t=this._;!(t in e);)if(!(e=e.parentNode))return;return e[t]},set:function(e,t){return e[this._]=t},remove:function(e){return this._ in e&&delete e[this._]},toString:function(){return this._}};function fb(){for(var e=qt,t;t=e.sourceEvent;)e=t;return e}function Dm(e,t){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}function zo(e){var t=fb();return t.changedTouches&&(t=t.changedTouches[0]),Dm(e,t)}function Ep(e){return typeof e=="string"?new Nn([document.querySelectorAll(e)],[document.documentElement]):new Nn([e==null?[]:e],EE)}function Tp(e,t,r){arguments.length<3&&(r=t,t=fb().changedTouches);for(var n=0,i=t?t.length:0,o;n<i;++n)if((o=t[n]).identifier===r)return Dm(e,o);return null}function lyt(e,t){t==null&&(t=fb().touches);for(var r=0,n=t?t.length:0,i=new Array(n);r<n;++r)i[r]=Dm(e,t[r]);return i}function rL(){qt.stopImmediatePropagation()}function Om(){qt.preventDefault(),qt.stopImmediatePropagation()}function zm(e){var t=e.document.documentElement,r=Ht(e).on("dragstart.drag",Om,!0);"onselectstart"in t?r.on("selectstart.drag",Om,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Fm(e,t){var r=e.document.documentElement,n=Ht(e).on("dragstart.drag",null);t&&(n.on("click.drag",Om,!0),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function TE(e){return function(){return e}}function CE(e,t,r,n,i,o,a,s,l,c){this.target=e,this.type=t,this.subject=r,this.identifier=n,this.active=i,this.x=o,this.y=a,this.dx=s,this.dy=l,this._=c}CE.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function owe(){return!qt.ctrlKey&&!qt.button}function awe(){return this.parentNode}function swe(e){return e==null?{x:qt.x,y:qt.y}:e}function lwe(){return navigator.maxTouchPoints||"ontouchstart"in this}function pb(){var e=owe,t=awe,r=swe,n=lwe,i={},o=vs("start","drag","end"),a=0,s,l,c,u,h=0;function f(S){S.on("mousedown.drag",p).filter(n).on("touchstart.drag",_).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!(u||!e.apply(this,arguments))){var S=b("mouse",t.apply(this,arguments),zo,this,arguments);!S||(Ht(qt.view).on("mousemove.drag",d,!0).on("mouseup.drag",g,!0),zm(qt.view),rL(),c=!1,s=qt.clientX,l=qt.clientY,S("start"))}}function d(){if(Om(),!c){var S=qt.clientX-s,C=qt.clientY-l;c=S*S+C*C>h}i.mouse("drag")}function g(){Ht(qt.view).on("mousemove.drag mouseup.drag",null),Fm(qt.view,c),Om(),i.mouse("end")}function _(){if(!!e.apply(this,arguments)){var S=qt.changedTouches,C=t.apply(this,arguments),P=S.length,k,O;for(k=0;k<P;++k)(O=b(S[k].identifier,C,Tp,this,arguments))&&(rL(),O("start"))}}function y(){var S=qt.changedTouches,C=S.length,P,k;for(P=0;P<C;++P)(k=i[S[P].identifier])&&(Om(),k("drag"))}function x(){var S=qt.changedTouches,C=S.length,P,k;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),P=0;P<C;++P)(k=i[S[P].identifier])&&(rL(),k("end"))}function b(S,C,P,k,O){var D=P(C,S),B,I,L,R=o.copy();if(!!Mp(new CE(f,"beforestart",B,S,a,D[0],D[1],0,0,R),function(){return(qt.subject=B=r.apply(k,O))==null?!1:(I=B.x-D[0]||0,L=B.y-D[1]||0,!0)}))return function F(z){var U=D,W;switch(z){case"start":i[S]=F,W=a++;break;case"end":delete i[S],--a;case"drag":D=P(C,S),W=a;break}Mp(new CE(f,z,B,S,W,D[0]+I,D[1]+L,D[0]-U[0],D[1]-U[1],R),R.apply,R,[z,k,O])}}return f.filter=function(S){return arguments.length?(e=typeof S=="function"?S:TE(!!S),f):e},f.container=function(S){return arguments.length?(t=typeof S=="function"?S:TE(S),f):t},f.subject=function(S){return arguments.length?(r=typeof S=="function"?S:TE(S),f):r},f.touchable=function(S){return arguments.length?(n=typeof S=="function"?S:TE(!!S),f):n},f.on=function(){var S=o.on.apply(o,arguments);return S===o?f:S},f.clickDistance=function(S){return arguments.length?(h=(S=+S)*S,f):Math.sqrt(h)},f}function Cp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Bm(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Rh(){}var Hm=.7,b_=1/Hm,db="\\s*([+-]?\\d+)\\s*",AE="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",kh="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",cwe=/^#([0-9a-f]{3,8})$/,uwe=new RegExp("^rgb\\("+[db,db,db]+"\\)$"),hwe=new RegExp("^rgb\\("+[kh,kh,kh]+"\\)$"),fwe=new RegExp("^rgba\\("+[db,db,db,AE]+"\\)$"),pwe=new RegExp("^rgba\\("+[kh,kh,kh,AE]+"\\)$"),dwe=new RegExp("^hsl\\("+[AE,kh,kh]+"\\)$"),mwe=new RegExp("^hsla\\("+[AE,kh,kh,AE]+"\\)$"),cyt={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};Cp(Rh,rc,{copy:function(e){return Object.assign(new this.constructor,this,e)},displayable:function(){return this.rgb().displayable()},hex:uyt,formatHex:uyt,formatHsl:gwe,formatRgb:hyt,toString:hyt});function uyt(){return this.rgb().formatHex()}function gwe(){return gyt(this).formatHsl()}function hyt(){return this.rgb().formatRgb()}function rc(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=cwe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?fyt(t):r===3?new Ki(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?nL(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?nL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=uwe.exec(e))?new Ki(t[1],t[2],t[3],1):(t=hwe.exec(e))?new Ki(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fwe.exec(e))?nL(t[1],t[2],t[3],t[4]):(t=pwe.exec(e))?nL(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=dwe.exec(e))?myt(t[1],t[2]/100,t[3]/100,1):(t=mwe.exec(e))?myt(t[1],t[2]/100,t[3]/100,t[4]):cyt.hasOwnProperty(e)?fyt(cyt[e]):e==="transparent"?new Ki(NaN,NaN,NaN,0):null}function fyt(e){return new Ki(e>>16&255,e>>8&255,e&255,1)}function nL(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ki(e,t,r,n)}function PE(e){return e instanceof Rh||(e=rc(e)),e?(e=e.rgb(),new Ki(e.r,e.g,e.b,e.opacity)):new Ki}function cu(e,t,r,n){return arguments.length===1?PE(e):new Ki(e,t,r,n==null?1:n)}function Ki(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}Cp(Ki,cu,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new Ki(this.r*e,this.g*e,this.b*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,e),new Ki(this.r*e,this.g*e,this.b*e,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pyt,formatHex:pyt,formatRgb:dyt,toString:dyt}));function pyt(){return"#"+QW(this.r)+QW(this.g)+QW(this.b)}function dyt(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(e===1?")":", "+e+")")}function QW(e){return e=Math.max(0,Math.min(255,Math.round(e)||0)),(e<16?"0":"")+e.toString(16)}function myt(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Lh(e,t,r,n)}function gyt(e){if(e instanceof Lh)return new Lh(e.h,e.s,e.l,e.opacity);if(e instanceof Rh||(e=rc(e)),!e)return new Lh;if(e instanceof Lh)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),o=Math.max(t,r,n),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(r-n)/s+(r<n)*6:r===o?a=(n-t)/s+2:a=(t-r)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Lh(a,s,l,e.opacity)}function Vm(e,t,r,n){return arguments.length===1?gyt(e):new Lh(e,t,r,n==null?1:n)}function Lh(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cp(Lh,Vm,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new Lh(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,e),new Lh(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new Ki(tY(e>=240?e-240:e+120,i,n),tY(e,i,n),tY(e<120?e+240:e-120,i,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var e=this.opacity;return e=isNaN(e)?1:Math.max(0,Math.min(1,e)),(e===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(e===1?")":", "+e+")")}}));function tY(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var iL=Math.PI/180,oL=180/Math.PI;var aL=18,_yt=.96422,yyt=1,vyt=.82521,xyt=4/29,mb=6/29,byt=3*mb*mb,_we=mb*mb*mb;function wyt(e){if(e instanceof uu)return new uu(e.l,e.a,e.b,e.opacity);if(e instanceof Nh)return Tyt(e);e instanceof Ki||(e=PE(e));var t=iY(e.r),r=iY(e.g),n=iY(e.b),i=eY((.2225045*t+.7168786*r+.0606169*n)/yyt),o,a;return t===r&&r===n?o=a=i:(o=eY((.4360747*t+.3850649*r+.1430804*n)/_yt),a=eY((.0139322*t+.0971045*r+.7141733*n)/vyt)),new uu(116*i-16,500*(o-i),200*(i-a),e.opacity)}function Syt(e,t){return new uu(e,0,0,t==null?1:t)}function w_(e,t,r,n){return arguments.length===1?wyt(e):new uu(e,t,r,n==null?1:n)}function uu(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}Cp(uu,w_,Bm(Rh,{brighter:function(e){return new uu(this.l+aL*(e==null?1:e),this.a,this.b,this.opacity)},darker:function(e){return new uu(this.l-aL*(e==null?1:e),this.a,this.b,this.opacity)},rgb:function(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=_yt*rY(t),e=yyt*rY(e),r=vyt*rY(r),new Ki(nY(3.1338561*t-1.6168667*e-.4906146*r),nY(-.9787684*t+1.9161415*e+.033454*r),nY(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));function eY(e){return e>_we?Math.pow(e,1/3):e/byt+xyt}function rY(e){return e>mb?e*e*e:byt*(e-xyt)}function nY(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function iY(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Myt(e){if(e instanceof Nh)return new Nh(e.h,e.c,e.l,e.opacity);if(e instanceof uu||(e=wyt(e)),e.a===0&&e.b===0)return new Nh(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*oL;return new Nh(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function Eyt(e,t,r,n){return arguments.length===1?Myt(e):new Nh(r,t,e,n==null?1:n)}function gb(e,t,r,n){return arguments.length===1?Myt(e):new Nh(e,t,r,n==null?1:n)}function Nh(e,t,r,n){this.h=+e,this.c=+t,this.l=+r,this.opacity=+n}function Tyt(e){if(isNaN(e.h))return new uu(e.l,0,0,e.opacity);var t=e.h*iL;return new uu(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}Cp(Nh,gb,Bm(Rh,{brighter:function(e){return new Nh(this.h,this.c,this.l+aL*(e==null?1:e),this.opacity)},darker:function(e){return new Nh(this.h,this.c,this.l-aL*(e==null?1:e),this.opacity)},rgb:function(){return Tyt(this).rgb()}}));var Iyt=-.14861,oY=1.78277,aY=-.29227,sL=-.90649,IE=1.97294,Cyt=IE*sL,Ayt=IE*oY,Pyt=oY*aY-sL*Iyt;function ywe(e){if(e instanceof S_)return new S_(e.h,e.s,e.l,e.opacity);e instanceof Ki||(e=PE(e));var t=e.r/255,r=e.g/255,n=e.b/255,i=(Pyt*n+Cyt*t-Ayt*r)/(Pyt+Cyt-Ayt),o=n-i,a=(IE*(r-i)-aY*o)/sL,s=Math.sqrt(a*a+o*o)/(IE*i*(1-i)),l=s?Math.atan2(a,o)*oL-120:NaN;return new S_(l<0?l+360:l,s,i,e.opacity)}function la(e,t,r,n){return arguments.length===1?ywe(e):new S_(e,t,r,n==null?1:n)}function S_(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}Cp(S_,la,Bm(Rh,{brighter:function(e){return e=e==null?b_:Math.pow(b_,e),new S_(this.h,this.s,this.l*e,this.opacity)},darker:function(e){return e=e==null?Hm:Math.pow(Hm,e),new S_(this.h,this.s,this.l*e,this.opacity)},rgb:function(){var e=isNaN(this.h)?0:(this.h+120)*iL,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),i=Math.sin(e);return new Ki(255*(t+r*(Iyt*n+oY*i)),255*(t+r*(aY*n+sL*i)),255*(t+r*(IE*n)),this.opacity)}}));function sY(e,t,r,n,i){var o=e*e,a=o*e;return((1-3*e+3*o-a)*t+(4-6*o+3*a)*r+(1+3*e+3*o-3*a)*n+a*i)/6}function lL(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),i=e[n],o=e[n+1],a=n>0?e[n-1]:2*i-o,s=n<t-1?e[n+2]:2*o-i;return sY((r-n/t)*t,a,i,o,s)}}function cL(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),i=e[(n+t-1)%t],o=e[n%t],a=e[(n+1)%t],s=e[(n+2)%t];return sY((r-n/t)*t,i,o,a,s)}}function _b(e){return function(){return e}}function Lyt(e,t){return function(r){return e+r*t}}function vwe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Um(e,t){var r=t-e;return r?Lyt(e,r>180||r<-180?r-360*Math.round(r/360):r):_b(isNaN(e)?t:e)}function kyt(e){return(e=+e)==1?Kn:function(t,r){return r-t?vwe(t,r,e):_b(isNaN(t)?r:t)}}function Kn(e,t){var r=t-e;return r?Lyt(e,r):_b(isNaN(e)?t:e)}var qm=function e(t){var r=kyt(t);function n(i,o){var a=r((i=cu(i)).r,(o=cu(o)).r),s=r(i.g,o.g),l=r(i.b,o.b),c=Kn(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n}(1);function Ryt(e){return function(t){var r=t.length,n=new Array(r),i=new Array(r),o=new Array(r),a,s;for(a=0;a<r;++a)s=cu(t[a]),n[a]=s.r||0,i[a]=s.g||0,o[a]=s.b||0;return n=e(n),i=e(i),o=e(o),s.opacity=1,function(l){return s.r=n(l),s.g=i(l),s.b=o(l),s+""}}}var uL=Ryt(lL),Nyt=Ryt(cL);function yb(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(o){for(i=0;i<r;++i)n[i]=e[i]*(1-o)+t[i]*o;return n}}function hL(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dyt(e,t){return(hL(t)?yb:lY)(e,t)}function lY(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),o=new Array(r),a;for(a=0;a<n;++a)i[a]=nc(e[a],t[a]);for(;a<r;++a)o[a]=t[a];return function(s){for(a=0;a<n;++a)o[a]=i[a](s);return o}}function fL(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function zi(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function pL(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=nc(e[i],t[i]):n[i]=t[i];return function(o){for(i in r)n[i]=r[i](o);return n}}var uY=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,cY=new RegExp(uY.source,"g");function xwe(e){return function(){return e}}function bwe(e){return function(t){return e(t)+""}}function vb(e,t){var r=uY.lastIndex=cY.lastIndex=0,n,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(n=uY.exec(e))&&(i=cY.exec(t));)(o=i.index)>r&&(o=t.slice(r,o),s[a]?s[a]+=o:s[++a]=o),(n=n[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:zi(n,i)})),r=cY.lastIndex;return r<t.length&&(o=t.slice(r),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?bwe(l[0].x):xwe(t):(t=l.length,function(c){for(var u=0,h;u<t;++u)s[(h=l[u]).i]=h.x(c);return s.join("")})}function nc(e,t){var r=typeof t,n;return t==null||r==="boolean"?_b(t):(r==="number"?zi:r==="string"?(n=rc(t))?(t=n,qm):vb:t instanceof rc?qm:t instanceof Date?fL:hL(t)?yb:Array.isArray(t)?lY:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?pL:zi)(e,t)}function Oyt(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}function zyt(e,t){var r=Um(+e,+t);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}function dL(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var Fyt=180/Math.PI,mL={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function hY(e,t,r,n,i,o){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n<t*r&&(e=-e,t=-t,l=-l,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(t,e)*Fyt,skewX:Math.atan(l)*Fyt,scaleX:a,scaleY:s}}var LE,fY,Byt,gL;function Hyt(e){return e==="none"?mL:(LE||(LE=document.createElement("DIV"),fY=document.documentElement,Byt=document.defaultView),LE.style.transform=e,e=Byt.getComputedStyle(fY.appendChild(LE),null).getPropertyValue("transform"),fY.removeChild(LE),e=e.slice(7,-1).split(","),hY(+e[0],+e[1],+e[2],+e[3],+e[4],+e[5]))}function Vyt(e){return e==null?mL:(gL||(gL=document.createElementNS("http://www.w3.org/2000/svg","g")),gL.setAttribute("transform",e),(e=gL.transform.baseVal.consolidate())?(e=e.matrix,hY(e.a,e.b,e.c,e.d,e.e,e.f)):mL)}function Uyt(e,t,r,n){function i(c){return c.length?c.pop()+" ":""}function o(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push("translate(",null,t,null,r);d.push({i:g-4,x:zi(c,h)},{i:g-2,x:zi(u,f)})}else(h||f)&&p.push("translate("+h+t+f+r)}function a(c,u,h,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:zi(c,u)})):u&&h.push(i(h)+"rotate("+u+n)}function s(c,u,h,f){c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:zi(c,u)}):u&&h.push(i(h)+"skewX("+u+n)}function l(c,u,h,f,p,d){if(c!==h||u!==f){var g=p.push(i(p)+"scale(",null,",",null,")");d.push({i:g-4,x:zi(c,h)},{i:g-2,x:zi(u,f)})}else(h!==1||f!==1)&&p.push(i(p)+"scale("+h+","+f+")")}return function(c,u){var h=[],f=[];return c=e(c),u=e(u),o(c.translateX,c.translateY,u.translateX,u.translateY,h,f),a(c.rotate,u.rotate,h,f),s(c.skewX,u.skewX,h,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,h,f),c=u=null,function(p){for(var d=-1,g=f.length,_;++d<g;)h[(_=f[d]).i]=_.x(p);return h.join("")}}}var _L=Uyt(Hyt,"px, ","px)","deg)"),yL=Uyt(Vyt,", ",")",")");var kE=Math.SQRT2,pY=2,qyt=4,wwe=1e-12;function Gyt(e){return((e=Math.exp(e))+1/e)/2}function Swe(e){return((e=Math.exp(e))-1/e)/2}function Mwe(e){return((e=Math.exp(2*e))-1)/(e+1)}function vL(e,t){var r=e[0],n=e[1],i=e[2],o=t[0],a=t[1],s=t[2],l=o-r,c=a-n,u=l*l+c*c,h,f;if(u<wwe)f=Math.log(s/i)/kE,h=function(x){return[r+x*l,n+x*c,i*Math.exp(kE*x*f)]};else{var p=Math.sqrt(u),d=(s*s-i*i+qyt*u)/(2*i*pY*p),g=(s*s-i*i-qyt*u)/(2*s*pY*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);f=(y-_)/kE,h=function(x){var b=x*f,S=Gyt(_),C=i/(pY*p)*(S*Mwe(kE*b+_)-Swe(_));return[r+C*l,n+C*c,i*S/Gyt(kE*b+_)]}}return h.duration=f*1e3,h}function Wyt(e){return function(t,r){var n=e((t=Vm(t)).h,(r=Vm(r)).h),i=Kn(t.s,r.s),o=Kn(t.l,r.l),a=Kn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.s=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var Yyt=Wyt(Um),jyt=Wyt(Kn);function M_(e,t){var r=Kn((e=w_(e)).l,(t=w_(t)).l),n=Kn(e.a,t.a),i=Kn(e.b,t.b),o=Kn(e.opacity,t.opacity);return function(a){return e.l=r(a),e.a=n(a),e.b=i(a),e.opacity=o(a),e+""}}function Xyt(e){return function(t,r){var n=e((t=gb(t)).h,(r=gb(r)).h),i=Kn(t.c,r.c),o=Kn(t.l,r.l),a=Kn(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=i(s),t.l=o(s),t.opacity=a(s),t+""}}}var $yt=Xyt(Um),Kyt=Xyt(Kn);function Zyt(e){return function t(r){r=+r;function n(i,o){var a=e((i=la(i)).h,(o=la(o)).h),s=Kn(i.s,o.s),l=Kn(i.l,o.l),c=Kn(i.opacity,o.opacity);return function(u){return i.h=a(u),i.s=s(u),i.l=l(Math.pow(u,r)),i.opacity=c(u),i+""}}return n.gamma=t,n}(1)}var Jyt=Zyt(Um),E_=Zyt(Kn);function dY(e,t){for(var r=0,n=t.length-1,i=t[0],o=new Array(n<0?0:n);r<n;)o[r]=e(i,i=t[++r]);return function(a){var s=Math.max(0,Math.min(n-1,Math.floor(a*=n)));return o[s](a-s)}}function Qyt(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e(n/(t-1));return r}km();var xb=0,NE=0,RE=0,evt=1e3,xL,DE,bL=0,T_=0,wL=0,OE=typeof performance=="object"&&performance.now?performance:Date,rvt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Ap(){return T_||(rvt(Ewe),T_=OE.now()+wL)}function Ewe(){T_=0}function C_(){this._call=this._time=this._next=null}C_.prototype=A_.prototype={constructor:C_,restart:function(e,t,r){if(typeof e!="function")throw new TypeError("callback is not a function");r=(r==null?Ap():+r)+(t==null?0:+t),!this._next&&DE!==this&&(DE?DE._next=this:xL=this,DE=this),this._call=e,this._time=r,mY()},stop:function(){this._call&&(this._call=null,this._time=1/0,mY())}};function A_(e,t,r){var n=new C_;return n.restart(e,t,r),n}function gY(){Ap(),++xb;for(var e=xL,t;e;)(t=T_-e._time)>=0&&e._call.call(null,t),e=e._next;--xb}function tvt(){T_=(bL=OE.now())+wL,xb=NE=0;try{gY()}finally{xb=0,Cwe(),T_=0}}function Twe(){var e=OE.now(),t=e-bL;t>evt&&(wL-=t,bL=e)}function Cwe(){for(var e,t=xL,r,n=1/0;t;)t._call?(n>t._time&&(n=t._time),e=t,t=t._next):(r=t._next,t._next=null,t=e?e._next=r:xL=r);DE=e,mY(n)}function mY(e){if(!xb){NE&&(NE=clearTimeout(NE));var t=e-T_;t>24?(e<1/0&&(NE=setTimeout(tvt,e-OE.now()-wL)),RE&&(RE=clearInterval(RE))):(RE||(bL=OE.now(),RE=setInterval(Twe,evt)),xb=1,rvt(tvt))}}function zE(e,t,r){var n=new C_;return t=t==null?0:+t,n.restart(function(i){n.stop(),e(i+t)},t,r),n}function nvt(e,t,r){var n=new C_,i=t;return t==null?(n.restart(e,t,r),n):(t=+t,r=r==null?Ap():+r,n.restart(function o(a){a+=i,n.restart(o,i+=t,r),e(a)},t,r),n)}var Awe=vs("start","end","cancel","interrupt"),Pwe=[],ovt=0,ML=1,EL=2,SL=3,ivt=4,TL=5,FE=6;function Gm(e,t,r,n,i,o){var a=e.__transition;if(!a)e.__transition={};else if(r in a)return;Iwe(e,r,{name:t,index:n,group:i,on:Awe,tween:Pwe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:ovt})}function BE(e,t){var r=Zi(e,t);if(r.state>ovt)throw new Error("too late; already scheduled");return r}function Oa(e,t){var r=Zi(e,t);if(r.state>SL)throw new Error("too late; already running");return r}function Zi(e,t){var r=e.__transition;if(!r||!(r=r[t]))throw new Error("transition not found");return r}function Iwe(e,t,r){var n=e.__transition,i;n[t]=r,r.timer=A_(o,0,r.time);function o(c){r.state=ML,r.timer.restart(a,r.delay,r.time),r.delay<=c&&a(c-r.delay)}function a(c){var u,h,f,p;if(r.state!==ML)return l();for(u in n)if(p=n[u],p.name===r.name){if(p.state===SL)return zE(a);p.state===ivt?(p.state=FE,p.timer.stop(),p.on.call("interrupt",e,e.__data__,p.index,p.group),delete n[u]):+u<t&&(p.state=FE,p.timer.stop(),p.on.call("cancel",e,e.__data__,p.index,p.group),delete n[u])}if(zE(function(){r.state===SL&&(r.state=ivt,r.timer.restart(s,r.delay,r.time),s(c))}),r.state=EL,r.on.call("start",e,e.__data__,r.index,r.group),r.state===EL){for(r.state=SL,i=new Array(f=r.tween.length),u=0,h=-1;u<f;++u)(p=r.tween[u].value.call(e,e.__data__,r.index,r.group))&&(i[++h]=p);i.length=h+1}}function s(c){for(var u=c<r.duration?r.ease.call(null,c/r.duration):(r.timer.restart(l),r.state=TL,1),h=-1,f=i.length;++h<f;)i[h].call(e,u);r.state===TL&&(r.on.call("end",e,e.__data__,r.index,r.group),l())}function l(){r.state=FE,r.timer.stop(),delete n[t];for(var c in n)return;delete e.__transition}}function hu(e,t){var r=e.__transition,n,i,o=!0,a;if(!!r){t=t==null?null:t+"";for(a in r){if((n=r[a]).name!==t){o=!1;continue}i=n.state>EL&&n.state<TL,n.state=FE,n.timer.stop(),n.on.call(i?"interrupt":"cancel",e,e.__data__,n.index,n.group),delete r[a]}o&&delete e.__transition}}function avt(e){return this.each(function(){hu(this,e)})}function Lwe(e,t){var r,n;return function(){var i=Oa(this,e),o=i.tween;if(o!==r){n=r=o;for(var a=0,s=n.length;a<s;++a)if(n[a].name===t){n=n.slice(),n.splice(a,1);break}}i.tween=n}}function kwe(e,t,r){var n,i;if(typeof r!="function")throw new Error;return function(){var o=Oa(this,e),a=o.tween;if(a!==n){i=(n=a).slice();for(var s={name:t,value:r},l=0,c=i.length;l<c;++l)if(i[l].name===t){i[l]=s;break}l===c&&i.push(s)}o.tween=i}}function svt(e,t){var r=this._id;if(e+="",arguments.length<2){for(var n=Zi(this.node(),r).tween,i=0,o=n.length,a;i<o;++i)if((a=n[i]).name===e)return a.value;return null}return this.each((t==null?Lwe:kwe)(r,e,t))}function bb(e,t,r){var n=e._id;return e.each(function(){var i=Oa(this,n);(i.value||(i.value={}))[t]=r.apply(this,arguments)}),function(i){return Zi(i,n).value[t]}}function CL(e,t){var r;return(typeof t=="number"?zi:t instanceof rc?qm:(r=rc(t))?(t=r,qm):vb)(e,t)}function Rwe(e){return function(){this.removeAttribute(e)}}function Nwe(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Dwe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttribute(e);return a===i?null:a===n?o:o=t(n=a,r)}}function Owe(e,t,r){var n,i=r+"",o;return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===n?o:o=t(n=a,r)}}function zwe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function Fwe(e,t,r){var n,i,o;return function(){var a,s=r(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s)))}}function lvt(e,t){var r=Ph(e),n=r==="transform"?yL:CL;return this.attrTween(e,typeof t=="function"?(r.local?Fwe:zwe)(r,n,bb(this,"attr."+e,t)):t==null?(r.local?Nwe:Rwe)(r):(r.local?Owe:Dwe)(r,n,t))}function Bwe(e,t){return function(r){this.setAttribute(e,t.call(this,r))}}function Hwe(e,t){return function(r){this.setAttributeNS(e.space,e.local,t.call(this,r))}}function Vwe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Hwe(e,o)),r}return i._value=t,i}function Uwe(e,t){var r,n;function i(){var o=t.apply(this,arguments);return o!==n&&(r=(n=o)&&Bwe(e,o)),r}return i._value=t,i}function cvt(e,t){var r="attr."+e;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;var n=Ph(e);return this.tween(r,(n.local?Vwe:Uwe)(n,t))}function qwe(e,t){return function(){BE(this,e).delay=+t.apply(this,arguments)}}function Gwe(e,t){return t=+t,function(){BE(this,e).delay=t}}function uvt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?qwe:Gwe)(t,e)):Zi(this.node(),t).delay}function Wwe(e,t){return function(){Oa(this,e).duration=+t.apply(this,arguments)}}function Ywe(e,t){return t=+t,function(){Oa(this,e).duration=t}}function hvt(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wwe:Ywe)(t,e)):Zi(this.node(),t).duration}function jwe(e,t){if(typeof t!="function")throw new Error;return function(){Oa(this,e).ease=t}}function fvt(e){var t=this._id;return arguments.length?this.each(jwe(t,e)):Zi(this.node(),t).ease}function pvt(e){typeof e!="function"&&(e=ub(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i<r;++i)for(var o=t[i],a=o.length,s=n[i]=[],l,c=0;c<a;++c)(l=o[c])&&e.call(l,l.__data__,c,o)&&s.push(l);return new Fo(n,this._parents,this._name,this._id)}function dvt(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,i=r.length,o=Math.min(n,i),a=new Array(n),s=0;s<o;++s)for(var l=t[s],c=r[s],u=l.length,h=a[s]=new Array(u),f,p=0;p<u;++p)(f=l[p]||c[p])&&(h[p]=f);for(;s<n;++s)a[s]=t[s];return new Fo(a,this._parents,this._name,this._id)}function Xwe(e){return(e+"").trim().split(/^|\s+/).every(function(t){var r=t.indexOf(".");return r>=0&&(t=t.slice(0,r)),!t||t==="start"})}function $we(e,t,r){var n,i,o=Xwe(t)?BE:Oa;return function(){var a=o(this,e),s=a.on;s!==n&&(i=(n=s).copy()).on(t,r),a.on=i}}function mvt(e,t){var r=this._id;return arguments.length<2?Zi(this.node(),r).on.on(e):this.each($we(r,e,t))}function Kwe(e){return function(){var t=this.parentNode;for(var r in this.__transition)if(+r!==e)return;t&&t.removeChild(this)}}function gvt(){return this.on("end.remove",Kwe(this._id))}function _vt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=Nm(e));for(var n=this._groups,i=n.length,o=new Array(i),a=0;a<i;++a)for(var s=n[a],l=s.length,c=o[a]=new Array(l),u,h,f=0;f<l;++f)(u=s[f])&&(h=e.call(u,u.__data__,f,s))&&("__data__"in u&&(h.__data__=u.__data__),c[f]=h,Gm(c[f],t,r,f,c,Zi(u,r)));return new Fo(o,this._parents,t,r)}function yvt(e){var t=this._name,r=this._id;typeof e!="function"&&(e=cb(e));for(var n=this._groups,i=n.length,o=[],a=[],s=0;s<i;++s)for(var l=n[s],c=l.length,u,h=0;h<c;++h)if(u=l[h]){for(var f=e.call(u,u.__data__,h,l),p,d=Zi(u,r),g=0,_=f.length;g<_;++g)(p=f[g])&&Gm(p,t,r,g,f,d);o.push(f),a.push(u)}return new Fo(o,a,t,r)}var Zwe=Ih.prototype.constructor;function vvt(){return new Zwe(this._groups,this._parents)}function Jwe(e,t){var r,n,i;return function(){var o=Sp(this,e),a=(this.style.removeProperty(e),Sp(this,e));return o===a?null:o===r&&a===n?i:i=t(r=o,n=a)}}function xvt(e){return function(){this.style.removeProperty(e)}}function Qwe(e,t,r){var n,i=r+"",o;return function(){var a=Sp(this,e);return a===i?null:a===n?o:o=t(n=a,r)}}function tSe(e,t,r){var n,i,o;return function(){var a=Sp(this,e),s=r(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),Sp(this,e))),a===l?null:a===n&&l===i?o:(i=l,o=t(n=a,s))}}function eSe(e,t){var r,n,i,o="style."+t,a="end."+o,s;return function(){var l=Oa(this,e),c=l.on,u=l.value[o]==null?s||(s=xvt(t)):void 0;(c!==r||i!==u)&&(n=(r=c).copy()).on(a,i=u),l.on=n}}function bvt(e,t,r){var n=(e+="")=="transform"?_L:CL;return t==null?this.styleTween(e,Jwe(e,n)).on("end.style."+e,xvt(e)):typeof t=="function"?this.styleTween(e,tSe(e,n,bb(this,"style."+e,t))).each(eSe(this._id,e)):this.styleTween(e,Qwe(e,n,t),r).on("end.style."+e,null)}function rSe(e,t,r){return function(n){this.style.setProperty(e,t.call(this,n),r)}}function nSe(e,t,r){var n,i;function o(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&rSe(e,a,r)),n}return o._value=t,o}function wvt(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,nSe(e,t,r==null?"":r))}function iSe(e){return function(){this.textContent=e}}function oSe(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Svt(e){return this.tween("text",typeof e=="function"?oSe(bb(this,"text",e)):iSe(e==null?"":e+""))}function aSe(e){return function(t){this.textContent=e.call(this,t)}}function sSe(e){var t,r;function n(){var i=e.apply(this,arguments);return i!==r&&(t=(r=i)&&aSe(i)),t}return n._value=e,n}function Mvt(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,sSe(e))}function Evt(){for(var e=this._name,t=this._id,r=AL(),n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)if(l=a[c]){var u=Zi(l,t);Gm(l,e,r,c,a,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Fo(n,this._parents,e,r)}function Tvt(){var e,t,r=this,n=r._id,i=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){--i===0&&o()}};r.each(function(){var c=Oa(this,n),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t})})}var lSe=0;function Fo(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function PL(e){return Ih().transition(e)}function AL(){return++lSe}var wb=Ih.prototype;Fo.prototype=PL.prototype={constructor:Fo,select:_vt,selectAll:yvt,filter:pvt,merge:dvt,selection:vvt,transition:Evt,call:wb.call,nodes:wb.nodes,node:wb.node,size:wb.size,empty:wb.empty,each:wb.each,on:mvt,attr:lvt,attrTween:cvt,style:bvt,styleTween:wvt,text:Svt,textTween:Mvt,remove:gvt,tween:svt,delay:uvt,duration:hvt,ease:fvt,end:Tvt};I_();var UY={time:null,delay:0,duration:250,ease:xs};function _Se(e,t){for(var r;!(r=e.__transition)||!(r=r[t]);)if(!(e=e.parentNode))return UY.time=Ap(),UY;return r}function Hvt(e){var t,r;e instanceof Fo?(t=e._id,e=e._name):(t=AL(),(r=UY).time=Ap(),e=e==null?null:e+"");for(var n=this._groups,i=n.length,o=0;o<i;++o)for(var a=n[o],s=a.length,l,c=0;c<s;++c)(l=a[c])&&Gm(l,e,t,c,a,r||_Se(l,t));return new Fo(n,this._parents,e,t)}Ih.prototype.interrupt=avt;Ih.prototype.transition=Hvt;var ySe=[null];function Vvt(e,t){var r=e.__transition,n,i;if(r){t=t==null?null:t+"";for(i in r)if((n=r[i]).state>ML&&n.name===t)return new Fo([[e]],ySe,t,+i)}return null}function FL(e){return function(){return e}}function Uvt(e,t,r){this.target=e,this.type=t,this.selection=r}function qY(){qt.stopImmediatePropagation()}function BL(){qt.preventDefault(),qt.stopImmediatePropagation()}var qvt={name:"drag"},GY={name:"space"},Mb={name:"handle"},Eb={name:"center"};function Gvt(e){return[+e[0],+e[1]]}function YY(e){return[Gvt(e[0]),Gvt(e[1])]}function vSe(e){return function(t){return Tp(t,qt.touches,e)}}var HL={name:"x",handles:["w","e"].map(HE),input:function(e,t){return e==null?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},VL={name:"y",handles:["n","s"].map(HE),input:function(e,t){return e==null?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},xSe={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(HE),input:function(e){return e==null?null:YY(e)},output:function(e){return e}},Pp={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wvt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Yvt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bSe={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},wSe={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function HE(e){return{type:e}}function SSe(){return!qt.ctrlKey&&!qt.button}function MSe(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function ESe(){return navigator.maxTouchPoints||"ontouchstart"in this}function WY(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function TSe(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}function UL(e){var t=e.__brush;return t?t.dim.output(t.selection):null}function jvt(){return jY(HL)}function qL(){return jY(VL)}function GL(){return jY(xSe)}function jY(e){var t=MSe,r=SSe,n=ESe,i=!0,o=vs("start","brush","end"),a=6,s;function l(_){var y=_.property("__brush",g).selectAll(".overlay").data([HE("overlay")]);y.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pp.overlay).merge(y).each(function(){var b=WY(this).extent;Ht(this).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1])}),_.selectAll(".selection").data([HE("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pp.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=_.selectAll(".handle").data(e.handles,function(b){return b.type});x.exit().remove(),x.enter().append("rect").attr("class",function(b){return"handle handle--"+b.type}).attr("cursor",function(b){return Pp[b.type]}),_.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(n).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",d).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(_,y){_.selection?_.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var x=this,b=x.__brush,S=u(x,arguments),C=b.selection,P=e.input(typeof y=="function"?y.apply(this,arguments):y,b.extent),k=nc(C,P);function O(D){b.selection=D===1&&P===null?null:k(D),c.call(x),S.brush()}return C!==null&&P!==null?O:O(1)}):_.each(function(){var x=this,b=arguments,S=x.__brush,C=e.input(typeof y=="function"?y.apply(x,b):y,S.extent),P=u(x,b).beforestart();hu(x),S.selection=C===null?null:C,c.call(x),P.start().brush().end()})},l.clear=function(_){l.move(_,null)};function c(){var _=Ht(this),y=WY(this).selection;y?(_.selectAll(".selection").style("display",null).attr("x",y[0][0]).attr("y",y[0][1]).attr("width",y[1][0]-y[0][0]).attr("height",y[1][1]-y[0][1]),_.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?y[1][0]-a/2:y[0][0]-a/2}).attr("y",function(x){return x.type[0]==="s"?y[1][1]-a/2:y[0][1]-a/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?y[1][0]-y[0][0]+a:a}).attr("height",function(x){return x.type==="e"||x.type==="w"?y[1][1]-y[0][1]+a:a})):_.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(_,y,x){var b=_.__brush.emitter;return b&&(!x||!b.clean)?b:new h(_,y,x)}function h(_,y,x){this.that=_,this.args=y,this.state=_.__brush,this.active=0,this.clean=x}h.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(_){Mp(new Uvt(l,_,e.output(this.state.selection)),o.apply,o,[_,this.that,this.args])}};function f(){if(s&&!qt.touches||!r.apply(this,arguments))return;var _=this,y=qt.target.__data__.type,x=(i&&qt.metaKey?y="overlay":y)==="selection"?qvt:i&&qt.altKey?Eb:Mb,b=e===VL?null:bSe[y],S=e===HL?null:wSe[y],C=WY(_),P=C.extent,k=C.selection,O=P[0][0],D,B,I=P[0][1],L,R,F=P[1][0],z,U,W=P[1][1],Z,rt,ot=0,st=0,St,bt=b&&S&&i&&qt.shiftKey,Mt,lt,Kt=qt.touches?vSe(qt.changedTouches[0].identifier):zo,_t=Kt(_),ct=_t,X=u(_,arguments,!0).beforestart();y==="overlay"?(k&&(St=!0),C.selection=k=[[D=e===VL?O:_t[0],L=e===HL?I:_t[1]],[z=e===VL?F:D,Z=e===HL?W:L]]):(D=k[0][0],L=k[0][1],z=k[1][0],Z=k[1][1]),B=D,R=L,U=z,rt=Z;var et=Ht(_).attr("pointer-events","none"),dt=et.selectAll(".overlay").attr("cursor",Pp[y]);if(qt.touches)X.moved=pt,X.ended=wt;else{var q=Ht(qt.view).on("mousemove.brush",pt,!0).on("mouseup.brush",wt,!0);i&&q.on("keydown.brush",kt,!0).on("keyup.brush",ie,!0),zm(qt.view)}qY(),hu(_),c.call(_),X.start();function pt(){var ee=Kt(_);bt&&!Mt&&!lt&&(Math.abs(ee[0]-ct[0])>Math.abs(ee[1]-ct[1])?lt=!0:Mt=!0),ct=ee,St=!0,BL(),ht()}function ht(){var ee;switch(ot=ct[0]-_t[0],st=ct[1]-_t[1],x){case GY:case qvt:{b&&(ot=Math.max(O-D,Math.min(F-z,ot)),B=D+ot,U=z+ot),S&&(st=Math.max(I-L,Math.min(W-Z,st)),R=L+st,rt=Z+st);break}case Mb:{b<0?(ot=Math.max(O-D,Math.min(F-D,ot)),B=D+ot,U=z):b>0&&(ot=Math.max(O-z,Math.min(F-z,ot)),B=D,U=z+ot),S<0?(st=Math.max(I-L,Math.min(W-L,st)),R=L+st,rt=Z):S>0&&(st=Math.max(I-Z,Math.min(W-Z,st)),R=L,rt=Z+st);break}case Eb:{b&&(B=Math.max(O,Math.min(F,D-ot*b)),U=Math.max(O,Math.min(F,z+ot*b))),S&&(R=Math.max(I,Math.min(W,L-st*S)),rt=Math.max(I,Math.min(W,Z+st*S)));break}}U<B&&(b*=-1,ee=D,D=z,z=ee,ee=B,B=U,U=ee,y in Wvt&&dt.attr("cursor",Pp[y=Wvt[y]])),rt<R&&(S*=-1,ee=L,L=Z,Z=ee,ee=R,R=rt,rt=ee,y in Yvt&&dt.attr("cursor",Pp[y=Yvt[y]])),C.selection&&(k=C.selection),Mt&&(B=k[0][0],U=k[1][0]),lt&&(R=k[0][1],rt=k[1][1]),(k[0][0]!==B||k[0][1]!==R||k[1][0]!==U||k[1][1]!==rt)&&(C.selection=[[B,R],[U,rt]],c.call(_),X.brush())}function wt(){if(qY(),qt.touches){if(qt.touches.length)return;s&&clearTimeout(s),s=setTimeout(function(){s=null},500)}else Fm(qt.view,St),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);et.attr("pointer-events","all"),dt.attr("cursor",Pp.overlay),C.selection&&(k=C.selection),TSe(k)&&(C.selection=null,c.call(_)),X.end()}function kt(){switch(qt.keyCode){case 16:{bt=b&&S;break}case 18:{x===Mb&&(b&&(z=U-ot*b,D=B+ot*b),S&&(Z=rt-st*S,L=R+st*S),x=Eb,ht());break}case 32:{(x===Mb||x===Eb)&&(b<0?z=U-ot:b>0&&(D=B-ot),S<0?Z=rt-st:S>0&&(L=R-st),x=GY,dt.attr("cursor",Pp.selection),ht());break}default:return}BL()}function ie(){switch(qt.keyCode){case 16:{bt&&(Mt=lt=bt=!1,ht());break}case 18:{x===Eb&&(b<0?z=U:b>0&&(D=B),S<0?Z=rt:S>0&&(L=R),x=Mb,ht());break}case 32:{x===GY&&(qt.altKey?(b&&(z=U-ot*b,D=B+ot*b),S&&(Z=rt-st*S,L=R+st*S),x=Eb):(b<0?z=U:b>0&&(D=B),S<0?Z=rt:S>0&&(L=R),x=Mb),dt.attr("cursor",Pp[y]),ht());break}default:return}BL()}}function p(){u(this,arguments).moved()}function d(){u(this,arguments).ended()}function g(){var _=this.__brush||{selection:null};return _.extent=YY(t.apply(this,arguments)),_.dim=e,_}return l.extent=function(_){return arguments.length?(t=typeof _=="function"?_:FL(YY(_)),l):t},l.filter=function(_){return arguments.length?(r=typeof _=="function"?_:FL(!!_),l):r},l.touchable=function(_){return arguments.length?(n=typeof _=="function"?_:FL(!!_),l):n},l.handleSize=function(_){return arguments.length?(a=+_,l):a},l.keyModifiers=function(_){return arguments.length?(i=!!_,l):i},l.on=function(){var _=o.on.apply(o,arguments);return _===o?l:_},l}var XY=Math.cos,$Y=Math.sin,Xvt=Math.PI,VE=Xvt/2,KY=Xvt*2,ZY=Math.max;function CSe(e){return function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)}}function $vt(){var e=0,t=null,r=null,n=null;function i(o){var a=o.length,s=[],l=Ir(a),c=[],u=[],h=u.groups=new Array(a),f=new Array(a*a),p,d,g,_,y,x;for(p=0,y=-1;++y<a;){for(d=0,x=-1;++x<a;)d+=o[y][x];s.push(d),c.push(Ir(a)),p+=d}for(t&&l.sort(function(B,I){return t(s[B],s[I])}),r&&c.forEach(function(B,I){B.sort(function(L,R){return r(o[I][L],o[I][R])})}),p=ZY(0,KY-e*a)/p,_=p?e:KY/a,d=0,y=-1;++y<a;){for(g=d,x=-1;++x<a;){var b=l[y],S=c[b][x],C=o[b][S],P=d,k=d+=C*p;f[S*a+b]={index:b,subindex:S,startAngle:P,endAngle:k,value:C}}h[b]={index:b,startAngle:g,endAngle:d,value:s[b]},d+=_}for(y=-1;++y<a;)for(x=y-1;++x<a;){var O=f[x*a+y],D=f[y*a+x];(O.value||D.value)&&u.push(O.value<D.value?{source:D,target:O}:{source:O,target:D})}return n?u.sort(n):u}return i.padAngle=function(o){return arguments.length?(e=ZY(0,o),i):e},i.sortGroups=function(o){return arguments.length?(t=o,i):t},i.sortSubgroups=function(o){return arguments.length?(r=o,i):r},i.sortChords=function(o){return arguments.length?(o==null?n=null:(n=CSe(o))._=o,i):n&&n._},i}var Kvt=Array.prototype.slice;function WL(e){return function(){return e}}var JY=Math.PI,QY=2*JY,L_=1e-6,ASe=QY-L_;function tj(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Zvt(){return new tj}tj.prototype=Zvt.prototype={constructor:tj,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,o){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(e,t,r,n,i){e=+e,t=+t,r=+r,n=+n,i=+i;var o=this._x1,a=this._y1,s=r-e,l=n-t,c=o-e,u=a-t,h=c*c+u*u;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(h>L_)if(!(Math.abs(u*s-l*c)>L_)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=r-o,p=n-a,d=s*s+l*l,g=f*f+p*p,_=Math.sqrt(d),y=Math.sqrt(h),x=i*Math.tan((JY-Math.acos((d+h-g)/(2*_*y)))/2),b=x/y,S=x/_;Math.abs(b-1)>L_&&(this._+="L"+(e+b*c)+","+(t+b*u)),this._+="A"+i+","+i+",0,0,"+ +(u*f>c*p)+","+(this._x1=e+S*s)+","+(this._y1=t+S*l)}},arc:function(e,t,r,n,i,o){e=+e,t=+t,r=+r,o=!!o;var a=r*Math.cos(n),s=r*Math.sin(n),l=e+a,c=t+s,u=1^o,h=o?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>L_||Math.abs(this._y1-c)>L_)&&(this._+="L"+l+","+c),r&&(h<0&&(h=h%QY+QY),h>ASe?this._+="A"+r+","+r+",0,1,"+u+","+(e-a)+","+(t-s)+"A"+r+","+r+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>L_&&(this._+="A"+r+","+r+",0,"+ +(h>=JY)+","+u+","+(this._x1=e+r*Math.cos(i))+","+(this._y1=t+r*Math.sin(i))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var bs=Zvt;function PSe(e){return e.source}function ISe(e){return e.target}function LSe(e){return e.radius}function kSe(e){return e.startAngle}function RSe(e){return e.endAngle}function Jvt(){var e=PSe,t=ISe,r=LSe,n=kSe,i=RSe,o=null;function a(){var s,l=Kvt.call(arguments),c=e.apply(this,l),u=t.apply(this,l),h=+r.apply(this,(l[0]=c,l)),f=n.apply(this,l)-VE,p=i.apply(this,l)-VE,d=h*XY(f),g=h*$Y(f),_=+r.apply(this,(l[0]=u,l)),y=n.apply(this,l)-VE,x=i.apply(this,l)-VE;if(o||(o=s=bs()),o.moveTo(d,g),o.arc(0,0,h,f,p),(f!==y||p!==x)&&(o.quadraticCurveTo(0,0,_*XY(y),_*$Y(y)),o.arc(0,0,_,y,x)),o.quadraticCurveTo(0,0,d,g),o.closePath(),s)return o=null,s+""||null}return a.radius=function(s){return arguments.length?(r=typeof s=="function"?s:WL(+s),a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:WL(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:WL(+s),a):i},a.source=function(s){return arguments.length?(e=s,a):e},a.target=function(s){return arguments.length?(t=s,a):t},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}Tb();var OSe=Array.prototype,KL=OSe.slice;function f1t(e,t){return e-t}function p1t(e){for(var t=0,r=e.length,n=e[r-1][1]*e[0][0]-e[r-1][0]*e[0][1];++t<r;)n+=e[t-1][1]*e[t][0]-e[t-1][0]*e[t][1];return n}function Oh(e){return function(){return e}}function d1t(e,t){for(var r=-1,n=t.length,i;++r<n;)if(i=zSe(e,t[r]))return i;return 0}function zSe(e,t){for(var r=t[0],n=t[1],i=-1,o=0,a=e.length,s=a-1;o<a;s=o++){var l=e[o],c=l[0],u=l[1],h=e[s],f=h[0],p=h[1];if(FSe(l,h,t))return 0;u>n!=p>n&&r<(f-c)*(n-u)/(p-u)+c&&(i=-i)}return i}function FSe(e,t,r){var n;return BSe(e,t,r)&&HSe(e[n=+(e[0]===t[0])],r[n],t[n])}function BSe(e,t,r){return(t[0]-e[0])*(r[1]-e[1])===(r[0]-e[0])*(t[1]-e[1])}function HSe(e,t,r){return e<=t&&t<=r||r<=t&&t<=e}function m1t(){}var Ip=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ZL(){var e=1,t=1,r=sb,n=l;function i(c){var u=r(c);if(Array.isArray(u))u=u.slice().sort(f1t);else{var h=aa(c),f=h[0],p=h[1];u=tl(f,p,u),u=Ir(Math.floor(f/u)*u,Math.floor(p/u)*u,u)}return u.map(function(d){return o(c,d)})}function o(c,u){var h=[],f=[];return a(c,u,function(p){n(p,c,u),p1t(p)>0?h.push([p]):f.push(p)}),f.forEach(function(p){for(var d=0,g=h.length,_;d<g;++d)if(d1t((_=h[d])[0],p)!==-1){_.push(p);return}}),{type:"MultiPolygon",value:u,coordinates:h}}function a(c,u,h){var f=new Array,p=new Array,d,g,_,y,x,b;for(d=g=-1,y=c[0]>=u,Ip[y<<1].forEach(S);++d<e-1;)_=y,y=c[d+1]>=u,Ip[_|y<<1].forEach(S);for(Ip[y<<0].forEach(S);++g<t-1;){for(d=-1,y=c[g*e+e]>=u,x=c[g*e]>=u,Ip[y<<1|x<<2].forEach(S);++d<e-1;)_=y,y=c[g*e+e+d+1]>=u,b=x,x=c[g*e+d+1]>=u,Ip[_|y<<1|x<<2|b<<3].forEach(S);Ip[y|x<<3].forEach(S)}for(d=-1,x=c[g*e]>=u,Ip[x<<2].forEach(S);++d<e-1;)b=x,x=c[g*e+d+1]>=u,Ip[x<<2|b<<3].forEach(S);Ip[x<<3].forEach(S);function S(C){var P=[C[0][0]+d,C[0][1]+g],k=[C[1][0]+d,C[1][1]+g],O=s(P),D=s(k),B,I;(B=p[O])?(I=f[D])?(delete p[B.end],delete f[I.start],B===I?(B.ring.push(k),h(B.ring)):f[B.start]=p[I.end]={start:B.start,end:I.end,ring:B.ring.concat(I.ring)}):(delete p[B.end],B.ring.push(k),p[B.end=D]=B):(B=f[D])?(I=p[O])?(delete f[B.start],delete p[I.end],B===I?(B.ring.push(k),h(B.ring)):f[I.start]=p[B.end]={start:I.start,end:B.end,ring:I.ring.concat(B.ring)}):(delete f[B.start],B.ring.unshift(P),f[B.start=O]=B):f[O]=p[D]={start:O,end:D,ring:[P,k]}}}function s(c){return c[0]*2+c[1]*(e+1)*4}function l(c,u,h){c.forEach(function(f){var p=f[0],d=f[1],g=p|0,_=d|0,y,x=u[_*e+g];p>0&&p<e&&g===p&&(y=u[_*e+g-1],f[0]=p+(h-y)/(x-y)-.5),d>0&&d<t&&_===d&&(y=u[(_-1)*e+g],f[1]=d+(h-y)/(x-y)-.5)})}return i.contour=o,i.size=function(c){if(!arguments.length)return[e,t];var u=Math.ceil(c[0]),h=Math.ceil(c[1]);if(!(u>0)||!(h>0))throw new Error("invalid size");return e=u,t=h,i},i.thresholds=function(c){return arguments.length?(r=typeof c=="function"?c:Array.isArray(c)?Oh(KL.call(c)):Oh(c),i):r},i.smooth=function(c){return arguments.length?(n=c?l:m1t,i):n===l},i}function JL(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,a=0;a<i;++a)for(var s=0,l=0;s<n+r;++s)s<n&&(l+=e.data[s+a*n]),s>=r&&(s>=o&&(l-=e.data[s-o+a*n]),t.data[s-r+a*n]=l/Math.min(s+1,n-1+o-s,o))}function QL(e,t,r){for(var n=e.width,i=e.height,o=(r<<1)+1,a=0;a<n;++a)for(var s=0,l=0;s<i+r;++s)s<i&&(l+=e.data[a+s*n]),s>=r&&(s>=o&&(l-=e.data[a+(s-o)*n]),t.data[a+(s-r)*n]=l/Math.min(s+1,i-1+o-s,o))}function VSe(e){return e[0]}function USe(e){return e[1]}function qSe(){return 1}function g1t(){var e=VSe,t=USe,r=qSe,n=960,i=500,o=20,a=2,s=o*3,l=n+s*2>>a,c=i+s*2>>a,u=Oh(20);function h(y){var x=new Float32Array(l*c),b=new Float32Array(l*c);y.forEach(function(P,k,O){var D=+e(P,k,O)+s>>a,B=+t(P,k,O)+s>>a,I=+r(P,k,O);D>=0&&D<l&&B>=0&&B<c&&(x[D+B*l]+=I)}),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a),JL({width:l,height:c,data:x},{width:l,height:c,data:b},o>>a),QL({width:l,height:c,data:b},{width:l,height:c,data:x},o>>a);var S=u(x);if(!Array.isArray(S)){var C=lu(x);S=tl(0,C,S),S=Ir(0,Math.floor(C/S)*S,S),S.shift()}return ZL().thresholds(S).size([l,c])(x).map(f)}function f(y){return y.value*=Math.pow(2,-2*a),y.coordinates.forEach(p),y}function p(y){y.forEach(d)}function d(y){y.forEach(g)}function g(y){y[0]=y[0]*Math.pow(2,a)-s,y[1]=y[1]*Math.pow(2,a)-s}function _(){return s=o*3,l=n+s*2>>a,c=i+s*2>>a,h}return h.x=function(y){return arguments.length?(e=typeof y=="function"?y:Oh(+y),h):e},h.y=function(y){return arguments.length?(t=typeof y=="function"?y:Oh(+y),h):t},h.weight=function(y){return arguments.length?(r=typeof y=="function"?y:Oh(+y),h):r},h.size=function(y){if(!arguments.length)return[n,i];var x=Math.ceil(y[0]),b=Math.ceil(y[1]);if(!(x>=0)&&!(x>=0))throw new Error("invalid size");return n=x,i=b,_()},h.cellSize=function(y){if(!arguments.length)return 1<<a;if(!((y=+y)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(y)/Math.LN2),_()},h.thresholds=function(y){return arguments.length?(u=typeof y=="function"?y:Array.isArray(y)?Oh(KL.call(y)):Oh(y),h):u},h.bandwidth=function(y){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((y=+y)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*y*y+1)-1)/2),_()},h}km();qE();I_();function XSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.blob()}function D1t(e,t){return fetch(e,t).then(XSe)}function $Se(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.arrayBuffer()}function O1t(e,t){return fetch(e,t).then($Se)}qE();function KSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);return e.text()}function D_(e,t){return fetch(e,t).then(KSe)}function z1t(e){return function(t,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),D_(t,r).then(function(i){return e(i,n)})}}function oj(e,t,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=Wm(e);return D_(t,r).then(function(o){return i.parse(o,n)})}var F1t=z1t(Cb),B1t=z1t(Ab);function H1t(e,t){return new Promise(function(r,n){var i=new Image;for(var o in t)i[o]=t[o];i.onerror=n,i.onload=function(){r(i)},i.src=e})}function ZSe(e){if(!e.ok)throw new Error(e.status+" "+e.statusText);if(!(e.status===204||e.status===205))return e.json()}function V1t(e,t){return fetch(e,t).then(ZSe)}function aj(e){return function(t,r){return D_(t,r).then(function(n){return new DOMParser().parseFromString(n,e)})}}var U1t=aj("application/xml"),q1t=aj("text/html"),G1t=aj("image/svg+xml");function W1t(e,t){var r;e==null&&(e=0),t==null&&(t=0);function n(){var i,o=r.length,a,s=0,l=0;for(i=0;i<o;++i)a=r[i],s+=a.x,l+=a.y;for(s=s/o-e,l=l/o-t,i=0;i<o;++i)a=r[i],a.x-=s,a.y-=l}return n.initialize=function(i){r=i},n.x=function(i){return arguments.length?(e=+i,n):e},n.y=function(i){return arguments.length?(t=+i,n):t},n}function Dn(e){return function(){return e}}function fu(){return(Math.random()-.5)*1e-6}function Y1t(e){var t=+this._x.call(null,e),r=+this._y.call(null,e);return j1t(this.cover(t,r),t,r,e)}function j1t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,o=e._root,a={data:n},s=e._x0,l=e._y0,c=e._x1,u=e._y1,h,f,p,d,g,_,y,x;if(!o)return e._root=a,e;for(;o.length;)if((g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f,i=o,!(o=o[y=_<<1|g]))return i[y]=a,e;if(p=+e._x.call(null,o.data),d=+e._y.call(null,o.data),t===p&&r===d)return a.next=o,i?i[y]=a:e._root=a,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(g=t>=(h=(s+c)/2))?s=h:c=h,(_=r>=(f=(l+u)/2))?l=f:u=f;while((y=_<<1|g)===(x=(d>=f)<<1|p>=h));return i[x]=o,i[y]=a,e}function X1t(e){var t,r,n=e.length,i,o,a=new Array(n),s=new Array(n),l=1/0,c=1/0,u=-1/0,h=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,t=e[r]))||isNaN(o=+this._y.call(null,t))||(a[r]=i,s[r]=o,i<l&&(l=i),i>u&&(u=i),o<c&&(c=o),o>h&&(h=o));if(l>u||c>h)return this;for(this.cover(l,c).cover(u,h),r=0;r<n;++r)j1t(this,a[r],s[r],e[r]);return this}function $1t(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,n=this._y0,i=this._x1,o=this._y1;if(isNaN(r))i=(r=Math.floor(e))+1,o=(n=Math.floor(t))+1;else{for(var a=i-r,s=this._root,l,c;r>e||e>=i||n>t||t>=o;)switch(c=(t<n)<<1|e<r,l=new Array(4),l[c]=s,s=l,a*=2,c){case 0:i=r+a,o=n+a;break;case 1:r=i-a,o=n+a;break;case 2:i=r+a,n=o-a;break;case 3:r=i-a,n=o-a;break}this._root&&this._root.length&&(this._root=s)}return this._x0=r,this._y0=n,this._x1=i,this._y1=o,this}function K1t(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function Z1t(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function yo(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function J1t(e,t,r){var n,i=this._x0,o=this._y0,a,s,l,c,u=this._x1,h=this._y1,f=[],p=this._root,d,g;for(p&&f.push(new yo(p,i,o,u,h)),r==null?r=1/0:(i=e-r,o=t-r,u=e+r,h=t+r,r*=r);d=f.pop();)if(!(!(p=d.node)||(a=d.x0)>u||(s=d.y0)>h||(l=d.x1)<i||(c=d.y1)<o))if(p.length){var _=(a+l)/2,y=(s+c)/2;f.push(new yo(p[3],_,y,l,c),new yo(p[2],a,y,_,c),new yo(p[1],_,s,l,y),new yo(p[0],a,s,_,y)),(g=(t>=y)<<1|e>=_)&&(d=f[f.length-1],f[f.length-1]=f[f.length-1-g],f[f.length-1-g]=d)}else{var x=e-+this._x.call(null,p.data),b=t-+this._y.call(null,p.data),S=x*x+b*b;if(S<r){var C=Math.sqrt(r=S);i=e-C,o=t-C,u=e+C,h=t+C,n=p.data}}return n}function Q1t(e){if(isNaN(u=+this._x.call(null,e))||isNaN(h=+this._y.call(null,e)))return this;var t,r=this._root,n,i,o,a=this._x0,s=this._y0,l=this._x1,c=this._y1,u,h,f,p,d,g,_,y;if(!r)return this;if(r.length)for(;;){if((d=u>=(f=(a+l)/2))?a=f:l=f,(g=h>=(p=(s+c)/2))?s=p:c=p,t=r,!(r=r[_=g<<1|d]))return this;if(!r.length)break;(t[_+1&3]||t[_+2&3]||t[_+3&3])&&(n=t,y=_)}for(;r.data!==e;)if(i=r,!(r=r.next))return this;return(o=r.next)&&delete r.next,i?(o?i.next=o:delete i.next,this):t?(o?t[_]=o:delete t[_],(r=t[0]||t[1]||t[2]||t[3])&&r===(t[3]||t[2]||t[1]||t[0])&&!r.length&&(n?n[y]=r:this._root=r),this):(this._root=o,this)}function txt(e){for(var t=0,r=e.length;t<r;++t)this.remove(e[t]);return this}function ext(){return this._root}function rxt(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function nxt(e){var t=[],r,n=this._root,i,o,a,s,l;for(n&&t.push(new yo(n,this._x0,this._y0,this._x1,this._y1));r=t.pop();)if(!e(n=r.node,o=r.x0,a=r.y0,s=r.x1,l=r.y1)&&n.length){var c=(o+s)/2,u=(a+l)/2;(i=n[3])&&t.push(new yo(i,c,u,s,l)),(i=n[2])&&t.push(new yo(i,o,u,c,l)),(i=n[1])&&t.push(new yo(i,c,a,s,u)),(i=n[0])&&t.push(new yo(i,o,a,c,u))}return this}function ixt(e){var t=[],r=[],n;for(this._root&&t.push(new yo(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var o,a=n.x0,s=n.y0,l=n.x1,c=n.y1,u=(a+l)/2,h=(s+c)/2;(o=i[0])&&t.push(new yo(o,a,s,u,h)),(o=i[1])&&t.push(new yo(o,u,s,l,h)),(o=i[2])&&t.push(new yo(o,a,h,u,c)),(o=i[3])&&t.push(new yo(o,u,h,l,c))}r.push(n)}for(;n=r.pop();)e(n.node,n.x0,n.y0,n.x1,n.y1);return this}function oxt(e){return e[0]}function axt(e){return arguments.length?(this._x=e,this):this._x}function sxt(e){return e[1]}function lxt(e){return arguments.length?(this._y=e,this):this._y}function zh(e,t,r){var n=new sj(t==null?oxt:t,r==null?sxt:r,NaN,NaN,NaN,NaN);return e==null?n:n.addAll(e)}function sj(e,t,r,n,i,o){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=o,this._root=void 0}function cxt(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var za=zh.prototype=sj.prototype;za.copy=function(){var e=new sj(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,r,n;if(!t)return e;if(!t.length)return e._root=cxt(t),e;for(r=[{source:t,target:e._root=new Array(4)}];t=r.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?r.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=cxt(n));return e};za.add=Y1t;za.addAll=X1t;za.cover=$1t;za.data=K1t;za.extent=Z1t;za.find=J1t;za.remove=Q1t;za.removeAll=txt;za.root=ext;za.size=rxt;za.visit=nxt;za.visitAfter=ixt;za.x=axt;za.y=lxt;function JSe(e){return e.x+e.vx}function QSe(e){return e.y+e.vy}function uxt(e){var t,r,n=1,i=1;typeof e!="function"&&(e=Dn(e==null?1:+e));function o(){for(var l,c=t.length,u,h,f,p,d,g,_=0;_<i;++_)for(u=zh(t,JSe,QSe).visitAfter(a),l=0;l<c;++l)h=t[l],d=r[h.index],g=d*d,f=h.x+h.vx,p=h.y+h.vy,u.visit(y);function y(x,b,S,C,P){var k=x.data,O=x.r,D=d+O;if(k){if(k.index>h.index){var B=f-k.x-k.vx,I=p-k.y-k.vy,L=B*B+I*I;L<D*D&&(B===0&&(B=fu(),L+=B*B),I===0&&(I=fu(),L+=I*I),L=(D-(L=Math.sqrt(L)))/L*n,h.vx+=(B*=L)*(D=(O*=O)/(g+O)),h.vy+=(I*=L)*D,k.vx-=B*(D=1-D),k.vy-=I*D)}return}return b>f+D||C<f-D||S>p+D||P<p-D}}function a(l){if(l.data)return l.r=r[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function s(){if(!!t){var l,c=t.length,u;for(r=new Array(c),l=0;l<c;++l)u=t[l],r[u.index]=+e(u,l,t)}}return o.initialize=function(l){t=l,s()},o.iterations=function(l){return arguments.length?(i=+l,o):i},o.strength=function(l){return arguments.length?(n=+l,o):n},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Dn(+l),s(),o):e},o}Tb();function t3e(e){return e.index}function hxt(e,t){var r=e.get(t);if(!r)throw new Error("missing: "+t);return r}function fxt(e){var t=t3e,r=u,n,i=Dn(30),o,a,s,l,c=1;e==null&&(e=[]);function u(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function h(g){for(var _=0,y=e.length;_<c;++_)for(var x=0,b,S,C,P,k,O,D;x<y;++x)b=e[x],S=b.source,C=b.target,P=C.x+C.vx-S.x-S.vx||fu(),k=C.y+C.vy-S.y-S.vy||fu(),O=Math.sqrt(P*P+k*k),O=(O-o[x])/O*g*n[x],P*=O,k*=O,C.vx-=P*(D=l[x]),C.vy-=k*D,S.vx+=P*(D=1-D),S.vy+=k*D}function f(){if(!!a){var g,_=a.length,y=e.length,x=Ji(a,t),b;for(g=0,s=new Array(_);g<y;++g)b=e[g],b.index=g,typeof b.source!="object"&&(b.source=hxt(x,b.source)),typeof b.target!="object"&&(b.target=hxt(x,b.target)),s[b.source.index]=(s[b.source.index]||0)+1,s[b.target.index]=(s[b.target.index]||0)+1;for(g=0,l=new Array(y);g<y;++g)b=e[g],l[g]=s[b.source.index]/(s[b.source.index]+s[b.target.index]);n=new Array(y),p(),o=new Array(y),d()}}function p(){if(!!a)for(var g=0,_=e.length;g<_;++g)n[g]=+r(e[g],g,e)}function d(){if(!!a)for(var g=0,_=e.length;g<_;++g)o[g]=+i(e[g],g,e)}return h.initialize=function(g){a=g,f()},h.links=function(g){return arguments.length?(e=g,f(),h):e},h.id=function(g){return arguments.length?(t=g,h):t},h.iterations=function(g){return arguments.length?(c=+g,h):c},h.strength=function(g){return arguments.length?(r=typeof g=="function"?g:Dn(+g),p(),h):r},h.distance=function(g){return arguments.length?(i=typeof g=="function"?g:Dn(+g),d(),h):i},h}km();Tb();function pxt(e){return e.x}function dxt(e){return e.y}var e3e=10,r3e=Math.PI*(3-Math.sqrt(5));function mxt(e){var t,r=1,n=.001,i=1-Math.pow(n,1/300),o=0,a=.6,s=Ji(),l=A_(u),c=vs("tick","end");e==null&&(e=[]);function u(){h(),c.call("tick",t),r<n&&(l.stop(),c.call("end",t))}function h(d){var g,_=e.length,y;d===void 0&&(d=1);for(var x=0;x<d;++x)for(r+=(o-r)*i,s.each(function(b){b(r)}),g=0;g<_;++g)y=e[g],y.fx==null?y.x+=y.vx*=a:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=a:(y.y=y.fy,y.vy=0);return t}function f(){for(var d=0,g=e.length,_;d<g;++d){if(_=e[d],_.index=d,_.fx!=null&&(_.x=_.fx),_.fy!=null&&(_.y=_.fy),isNaN(_.x)||isNaN(_.y)){var y=e3e*Math.sqrt(d),x=d*r3e;_.x=y*Math.cos(x),_.y=y*Math.sin(x)}(isNaN(_.vx)||isNaN(_.vy))&&(_.vx=_.vy=0)}}function p(d){return d.initialize&&d.initialize(e),d}return f(),t={tick:h,restart:function(){return l.restart(u),t},stop:function(){return l.stop(),t},nodes:function(d){return arguments.length?(e=d,f(),s.each(p),t):e},alpha:function(d){return arguments.length?(r=+d,t):r},alphaMin:function(d){return arguments.length?(n=+d,t):n},alphaDecay:function(d){return arguments.length?(i=+d,t):+i},alphaTarget:function(d){return arguments.length?(o=+d,t):o},velocityDecay:function(d){return arguments.length?(a=1-d,t):1-a},force:function(d,g){return arguments.length>1?(g==null?s.remove(d):s.set(d,p(g)),t):s.get(d)},find:function(d,g,_){var y=0,x=e.length,b,S,C,P,k;for(_==null?_=1/0:_*=_,y=0;y<x;++y)P=e[y],b=d-P.x,S=g-P.y,C=b*b+S*S,C<_&&(k=P,_=C);return k},on:function(d,g){return arguments.length>1?(c.on(d,g),t):c.on(d)}}}function gxt(){var e,t,r,n=Dn(-30),i,o=1,a=1/0,s=.81;function l(f){var p,d=e.length,g=zh(e,pxt,dxt).visitAfter(u);for(r=f,p=0;p<d;++p)t=e[p],g.visit(h)}function c(){if(!!e){var f,p=e.length,d;for(i=new Array(p),f=0;f<p;++f)d=e[f],i[d.index]=+n(d,f,e)}}function u(f){var p=0,d,g,_=0,y,x,b;if(f.length){for(y=x=b=0;b<4;++b)(d=f[b])&&(g=Math.abs(d.value))&&(p+=d.value,_+=g,y+=g*d.x,x+=g*d.y);f.x=y/_,f.y=x/_}else{d=f,d.x=d.data.x,d.y=d.data.y;do p+=i[d.data.index];while(d=d.next)}f.value=p}function h(f,p,d,g){if(!f.value)return!0;var _=f.x-t.x,y=f.y-t.y,x=g-p,b=_*_+y*y;if(x*x/s<b)return b<a&&(_===0&&(_=fu(),b+=_*_),y===0&&(y=fu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)),t.vx+=_*f.value*r/b,t.vy+=y*f.value*r/b),!0;if(f.length||b>=a)return;(f.data!==t||f.next)&&(_===0&&(_=fu(),b+=_*_),y===0&&(y=fu(),b+=y*y),b<o&&(b=Math.sqrt(o*b)));do f.data!==t&&(x=i[f.data.index]*r/b,t.vx+=_*x,t.vy+=y*x);while(f=f.next)}return l.initialize=function(f){e=f,c()},l.strength=function(f){return arguments.length?(n=typeof f=="function"?f:Dn(+f),c(),l):n},l.distanceMin=function(f){return arguments.length?(o=f*f,l):Math.sqrt(o)},l.distanceMax=function(f){return arguments.length?(a=f*f,l):Math.sqrt(a)},l.theta=function(f){return arguments.length?(s=f*f,l):Math.sqrt(s)},l}function _xt(e,t,r){var n,i=Dn(.1),o,a;typeof e!="function"&&(e=Dn(+e)),t==null&&(t=0),r==null&&(r=0);function s(c){for(var u=0,h=n.length;u<h;++u){var f=n[u],p=f.x-t||1e-6,d=f.y-r||1e-6,g=Math.sqrt(p*p+d*d),_=(a[u]-g)*o[u]*c/g;f.vx+=p*_,f.vy+=d*_}}function l(){if(!!n){var c,u=n.length;for(o=new Array(u),a=new Array(u),c=0;c<u;++c)a[c]=+e(n[c],c,n),o[c]=isNaN(a[c])?0:+i(n[c],c,n)}}return s.initialize=function(c){n=c,l()},s.strength=function(c){return arguments.length?(i=typeof c=="function"?c:Dn(+c),l(),s):i},s.radius=function(c){return arguments.length?(e=typeof c=="function"?c:Dn(+c),l(),s):e},s.x=function(c){return arguments.length?(t=+c,s):t},s.y=function(c){return arguments.length?(r=+c,s):r},s}function yxt(e){var t=Dn(.1),r,n,i;typeof e!="function"&&(e=Dn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vx+=(i[l]-u.x)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Dn(+s),a(),o):t},o.x=function(s){return arguments.length?(e=typeof s=="function"?s:Dn(+s),a(),o):e},o}function vxt(e){var t=Dn(.1),r,n,i;typeof e!="function"&&(e=Dn(e==null?0:+e));function o(s){for(var l=0,c=r.length,u;l<c;++l)u=r[l],u.vy+=(i[l]-u.y)*n[l]*s}function a(){if(!!r){var s,l=r.length;for(n=new Array(l),i=new Array(l),s=0;s<l;++s)n[s]=isNaN(i[s]=+e(r[s],s,r))?0:+t(r[s],s,r)}}return o.initialize=function(s){r=s,a()},o.strength=function(s){return arguments.length?(t=typeof s=="function"?s:Dn(+s),a(),o):t},o.y=function(s){return arguments.length?(e=typeof s=="function"?s:Dn(+s),a(),o):e},o}function xxt(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function O_(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function Fh(e){return e=O_(Math.abs(e)),e?e[1]:NaN}function bxt(e,t){return function(r,n){for(var i=r.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),o.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function wxt(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var n3e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Lp(e){if(!(t=n3e.exec(e)))throw new Error("invalid format: "+e);var t;return new GE({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Lp.prototype=GE.prototype;function GE(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}GE.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Sxt(e){t:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break t;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var lj;function Mxt(e,t){var r=O_(e,t);if(!r)return e+"";var n=r[0],i=r[1],o=i-(lj=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=n.length;return o===a?n:o>a?n+new Array(o-a+1).join("0"):o>0?n.slice(0,o)+"."+n.slice(o):"0."+new Array(1-o).join("0")+O_(e,Math.max(0,t+o-1))[0]}function cj(e,t){var r=O_(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}var uj={"%":function(e,t){return(e*100).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:xxt,e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return cj(e*100,t)},r:cj,s:Mxt,X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function hj(e){return e}var Ext=Array.prototype.map,Txt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ek(e){var t=e.grouping===void 0||e.thousands===void 0?hj:bxt(Ext.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?hj:wxt(Ext.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"-":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(h){h=Lp(h);var f=h.fill,p=h.align,d=h.sign,g=h.symbol,_=h.zero,y=h.width,x=h.comma,b=h.precision,S=h.trim,C=h.type;C==="n"?(x=!0,C="g"):uj[C]||(b===void 0&&(b=12),S=!0,C="g"),(_||f==="0"&&p==="=")&&(_=!0,f="0",p="=");var P=g==="$"?r:g==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",k=g==="$"?n:/[%p]/.test(C)?a:"",O=uj[C],D=/[defgprs%]/.test(C);b=b===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function B(I){var L=P,R=k,F,z,U;if(C==="c")R=O(I)+R,I="";else{I=+I;var W=I<0||1/I<0;if(I=isNaN(I)?l:O(Math.abs(I),b),S&&(I=Sxt(I)),W&&+I==0&&d!=="+"&&(W=!1),L=(W?d==="("?d:s:d==="-"||d==="("?"":d)+L,R=(C==="s"?Txt[8+lj/3]:"")+R+(W&&d==="("?")":""),D){for(F=-1,z=I.length;++F<z;)if(U=I.charCodeAt(F),48>U||U>57){R=(U===46?i+I.slice(F+1):I.slice(F))+R,I=I.slice(0,F);break}}}x&&!_&&(I=t(I,1/0));var Z=L.length+I.length+R.length,rt=Z<y?new Array(y-Z+1).join(f):"";switch(x&&_&&(I=t(rt+I,rt.length?y-R.length:1/0),rt=""),p){case"<":I=L+I+R+rt;break;case"=":I=L+rt+I+R;break;case"^":I=rt.slice(0,Z=rt.length>>1)+L+I+R+rt.slice(Z);break;default:I=rt+L+I+R;break}return o(I)}return B.toString=function(){return h+""},B}function u(h,f){var p=c((h=Lp(h),h.type="f",h)),d=Math.max(-8,Math.min(8,Math.floor(Fh(f)/3)))*3,g=Math.pow(10,-d),_=Txt[8+d/3];return function(y){return p(g*y)+_}}return{format:c,formatPrefix:u}}var rk,xn,WE;nk({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function nk(e){return rk=ek(e),xn=rk.format,WE=rk.formatPrefix,rk}function ik(e){return Math.max(0,-Fh(Math.abs(e)))}function ok(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Fh(t)/3)))*3-Fh(Math.abs(e)))}function ak(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Fh(t)-Fh(e))+1}function Ss(){return new lk}function lk(){this.reset()}lk.prototype={constructor:lk,reset:function(){this.s=this.t=0},add:function(e){Cxt(sk,e,this.t),Cxt(this,sk.s,this.s),this.s?this.t+=sk.t:this.s=sk.t},valueOf:function(){return this.s}};var sk=new lk;function Cxt(e,t,r){var n=e.s=t+r,i=n-t,o=n-i;e.t=t-o+(r-i)}var le=1e-6,z_=1e-12,Be=Math.PI,mn=Be/2,Pb=Be/4,wi=Be*2,vr=180/Be,ye=Be/180,Re=Math.abs,ic=Math.atan,bn=Math.atan2,Zt=Math.cos,YE=Math.ceil,ck=Math.exp;var F_=Math.log,uk=Math.pow,Xt=Math.sin,ca=Math.sign||function(e){return e>0?1:e<0?-1:0},xr=Math.sqrt,Ib=Math.tan;function hk(e){return e>1?0:e<-1?Be:Math.acos(e)}function wn(e){return e>1?mn:e<-1?-mn:Math.asin(e)}function fj(e){return(e=Xt(e/2))*e}function Fr(){}function fk(e,t){e&&Pxt.hasOwnProperty(e.type)&&Pxt[e.type](e,t)}var Axt={Feature:function(e,t){fk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)fk(r[n].geometry,t)}},Pxt={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)e=r[n],t.point(e[0],e[1],e[2])},LineString:function(e,t){pj(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)pj(r[n],t,0)},Polygon:function(e,t){Ixt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)Ixt(r[n],t)},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)fk(r[n],t)}};function pj(e,t,r){var n=-1,i=e.length-r,o;for(t.lineStart();++n<i;)o=e[n],t.point(o[0],o[1],o[2]);t.lineEnd()}function Ixt(e,t){var r=-1,n=e.length;for(t.polygonStart();++r<n;)pj(e[r],t,1);t.polygonEnd()}function vo(e,t){e&&Axt.hasOwnProperty(e.type)?Axt[e.type](e,t):fk(e,t)}var jE=Ss(),pk=Ss(),Lxt,kxt,dj,mj,gj,pu={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){jE.reset(),pu.lineStart=i3e,pu.lineEnd=o3e},polygonEnd:function(){var e=+jE;pk.add(e<0?wi+e:e),this.lineStart=this.lineEnd=this.point=Fr},sphere:function(){pk.add(wi)}};function i3e(){pu.point=a3e}function o3e(){Rxt(Lxt,kxt)}function a3e(e,t){pu.point=Rxt,Lxt=e,kxt=t,e*=ye,t*=ye,dj=e,mj=Zt(t=t/2+Pb),gj=Xt(t)}function Rxt(e,t){e*=ye,t*=ye,t=t/2+Pb;var r=e-dj,n=r>=0?1:-1,i=n*r,o=Zt(t),a=Xt(t),s=gj*a,l=mj*o+s*Zt(i),c=s*n*Xt(i);jE.add(bn(c,l)),dj=e,mj=o,gj=a}function Nxt(e){return pk.reset(),vo(e,pu),pk*2}function B_(e){return[bn(e[1],e[0]),wn(e[2])]}function oc(e){var t=e[0],r=e[1],n=Zt(r);return[n*Zt(t),n*Xt(t),Xt(r)]}function XE(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function kp(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function dk(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function $E(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function H_(e){var t=xr(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var ri,Ms,ui,nl,V_,Fxt,Bxt,Lb,KE=Ss(),Ym,Np,Rp={point:_j,lineStart:Dxt,lineEnd:Oxt,polygonStart:function(){Rp.point=Vxt,Rp.lineStart=s3e,Rp.lineEnd=l3e,KE.reset(),pu.polygonStart()},polygonEnd:function(){pu.polygonEnd(),Rp.point=_j,Rp.lineStart=Dxt,Rp.lineEnd=Oxt,jE<0?(ri=-(ui=180),Ms=-(nl=90)):KE>le?nl=90:KE<-le&&(Ms=-90),Np[0]=ri,Np[1]=ui},sphere:function(){ri=-(ui=180),Ms=-(nl=90)}};function _j(e,t){Ym.push(Np=[ri=e,ui=e]),t<Ms&&(Ms=t),t>nl&&(nl=t)}function Hxt(e,t){var r=oc([e*ye,t*ye]);if(Lb){var n=kp(Lb,r),i=[n[1],-n[0],0],o=kp(i,n);H_(o),o=B_(o);var a=e-V_,s=a>0?1:-1,l=o[0]*vr*s,c,u=Re(a)>180;u^(s*V_<l&&l<s*e)?(c=o[1]*vr,c>nl&&(nl=c)):(l=(l+360)%360-180,u^(s*V_<l&&l<s*e)?(c=-o[1]*vr,c<Ms&&(Ms=c)):(t<Ms&&(Ms=t),t>nl&&(nl=t))),u?e<V_?rl(ri,e)>rl(ri,ui)&&(ui=e):rl(e,ui)>rl(ri,ui)&&(ri=e):ui>=ri?(e<ri&&(ri=e),e>ui&&(ui=e)):e>V_?rl(ri,e)>rl(ri,ui)&&(ui=e):rl(e,ui)>rl(ri,ui)&&(ri=e)}else Ym.push(Np=[ri=e,ui=e]);t<Ms&&(Ms=t),t>nl&&(nl=t),Lb=r,V_=e}function Dxt(){Rp.point=Hxt}function Oxt(){Np[0]=ri,Np[1]=ui,Rp.point=_j,Lb=null}function Vxt(e,t){if(Lb){var r=e-V_;KE.add(Re(r)>180?r+(r>0?360:-360):r)}else Fxt=e,Bxt=t;pu.point(e,t),Hxt(e,t)}function s3e(){pu.lineStart()}function l3e(){Vxt(Fxt,Bxt),pu.lineEnd(),Re(KE)>le&&(ri=-(ui=180)),Np[0]=ri,Np[1]=ui,Lb=null}function rl(e,t){return(t-=e)<0?t+360:t}function c3e(e,t){return e[0]-t[0]}function zxt(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:t<e[0]||e[1]<t}function Uxt(e){var t,r,n,i,o,a,s;if(nl=ui=-(ri=Ms=1/0),Ym=[],vo(e,Rp),r=Ym.length){for(Ym.sort(c3e),t=1,n=Ym[0],o=[n];t<r;++t)i=Ym[t],zxt(n,i[0])||zxt(n,i[1])?(rl(n[0],i[1])>rl(n[0],n[1])&&(n[1]=i[1]),rl(i[0],n[1])>rl(n[0],n[1])&&(n[0]=i[0])):o.push(n=i);for(a=-1/0,r=o.length-1,t=0,n=o[r];t<=r;n=i,++t)i=o[t],(s=rl(n[1],i[0]))>a&&(a=s,ri=i[0],ui=n[1])}return Ym=Np=null,ri===1/0||Ms===1/0?[[NaN,NaN],[NaN,NaN]]:[[ri,Ms],[ui,nl]]}var ZE,mk,gk,_k,yk,vk,xk,bk,yj,vj,xj,Wxt,Yxt,Fa,Ba,Ha,du={sphere:Fr,point:bj,lineStart:qxt,lineEnd:Gxt,polygonStart:function(){du.lineStart=f3e,du.lineEnd=p3e},polygonEnd:function(){du.lineStart=qxt,du.lineEnd=Gxt}};function bj(e,t){e*=ye,t*=ye;var r=Zt(t);JE(r*Zt(e),r*Xt(e),Xt(t))}function JE(e,t,r){++ZE,gk+=(e-gk)/ZE,_k+=(t-_k)/ZE,yk+=(r-yk)/ZE}function qxt(){du.point=u3e}function u3e(e,t){e*=ye,t*=ye;var r=Zt(t);Fa=r*Zt(e),Ba=r*Xt(e),Ha=Xt(t),du.point=h3e,JE(Fa,Ba,Ha)}function h3e(e,t){e*=ye,t*=ye;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=bn(xr((a=Ba*o-Ha*i)*a+(a=Ha*n-Fa*o)*a+(a=Fa*i-Ba*n)*a),Fa*n+Ba*i+Ha*o);mk+=a,vk+=a*(Fa+(Fa=n)),xk+=a*(Ba+(Ba=i)),bk+=a*(Ha+(Ha=o)),JE(Fa,Ba,Ha)}function Gxt(){du.point=bj}function f3e(){du.point=d3e}function p3e(){jxt(Wxt,Yxt),du.point=bj}function d3e(e,t){Wxt=e,Yxt=t,e*=ye,t*=ye,du.point=jxt;var r=Zt(t);Fa=r*Zt(e),Ba=r*Xt(e),Ha=Xt(t),JE(Fa,Ba,Ha)}function jxt(e,t){e*=ye,t*=ye;var r=Zt(t),n=r*Zt(e),i=r*Xt(e),o=Xt(t),a=Ba*o-Ha*i,s=Ha*n-Fa*o,l=Fa*i-Ba*n,c=xr(a*a+s*s+l*l),u=wn(c),h=c&&-u/c;yj+=h*a,vj+=h*s,xj+=h*l,mk+=u,vk+=u*(Fa+(Fa=n)),xk+=u*(Ba+(Ba=i)),bk+=u*(Ha+(Ha=o)),JE(Fa,Ba,Ha)}function Xxt(e){ZE=mk=gk=_k=yk=vk=xk=bk=yj=vj=xj=0,vo(e,du);var t=yj,r=vj,n=xj,i=t*t+r*r+n*n;return i<z_&&(t=vk,r=xk,n=bk,mk<le&&(t=gk,r=_k,n=yk),i=t*t+r*r+n*n,i<z_)?[NaN,NaN]:[bn(r,t)*vr,wn(n/xr(i))*vr]}function U_(e){return function(){return e}}function QE(e,t){function r(n,i){return n=e(n,i),t(n[0],n[1])}return e.invert&&t.invert&&(r.invert=function(n,i){return n=t.invert(n,i),n&&e.invert(n[0],n[1])}),r}function wj(e,t){return[Re(e)>Be?e+Math.round(-e/wi)*wi:e,t]}wj.invert=wj;function t5(e,t,r){return(e%=wi)?t||r?QE(Kxt(e),Zxt(t,r)):Kxt(e):t||r?Zxt(t,r):wj}function $xt(e){return function(t,r){return t+=e,[t>Be?t-wi:t<-Be?t+wi:t,r]}}function Kxt(e){var t=$xt(e);return t.invert=$xt(-e),t}function Zxt(e,t){var r=Zt(e),n=Xt(e),i=Zt(t),o=Xt(t);function a(s,l){var c=Zt(l),u=Zt(s)*c,h=Xt(s)*c,f=Xt(l),p=f*r+u*n;return[bn(h*i-p*o,u*r-f*n),wn(p*i+h*o)]}return a.invert=function(s,l){var c=Zt(l),u=Zt(s)*c,h=Xt(s)*c,f=Xt(l),p=f*i-h*o;return[bn(h*i+f*o,u*r+p*n),wn(p*r-u*n)]},a}function wk(e){e=t5(e[0]*ye,e[1]*ye,e.length>2?e[2]*ye:0);function t(r){return r=e(r[0]*ye,r[1]*ye),r[0]*=vr,r[1]*=vr,r}return t.invert=function(r){return r=e.invert(r[0]*ye,r[1]*ye),r[0]*=vr,r[1]*=vr,r},t}function Sj(e,t,r,n,i,o){if(!!r){var a=Zt(t),s=Xt(t),l=n*r;i==null?(i=t+n*wi,o=t-l/2):(i=Jxt(a,i),o=Jxt(a,o),(n>0?i<o:i>o)&&(i+=n*wi));for(var c,u=i;n>0?u>o:u<o;u-=l)c=B_([a,-s*Zt(u),-s*Xt(u)]),e.point(c[0],c[1])}}function Jxt(e,t){t=oc(t),t[0]-=e,H_(t);var r=hk(-t[1]);return((-t[2]<0?-r:r)+wi-le)%wi}function Qxt(){var e=U_([0,0]),t=U_(90),r=U_(6),n,i,o={point:a};function a(l,c){n.push(l=i(l,c)),l[0]*=vr,l[1]*=vr}function s(){var l=e.apply(this,arguments),c=t.apply(this,arguments)*ye,u=r.apply(this,arguments)*ye;return n=[],i=t5(-l[0]*ye,-l[1]*ye,0).invert,Sj(o,c,u,1),l={type:"Polygon",coordinates:[n]},n=i=null,l}return s.center=function(l){return arguments.length?(e=typeof l=="function"?l:U_([+l[0],+l[1]]),s):e},s.radius=function(l){return arguments.length?(t=typeof l=="function"?l:U_(+l),s):t},s.precision=function(l){return arguments.length?(r=typeof l=="function"?l:U_(+l),s):r},s}function Sk(){var e=[],t;return{point:function(r,n,i){t.push([r,n,i])},lineStart:function(){e.push(t=[])},lineEnd:Fr,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function kb(e,t){return Re(e[0]-t[0])<le&&Re(e[1]-t[1])<le}function Mk(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function Ek(e,t,r,n,i){var o=[],a=[],s,l;if(e.forEach(function(d){if(!((g=d.length-1)<=0)){var g,_=d[0],y=d[g],x;if(kb(_,y)){if(!_[2]&&!y[2]){for(i.lineStart(),s=0;s<g;++s)i.point((_=d[s])[0],_[1]);i.lineEnd();return}y[0]+=2*le}o.push(x=new Mk(_,d,null,!0)),a.push(x.o=new Mk(_,null,x,!1)),o.push(x=new Mk(y,d,null,!1)),a.push(x.o=new Mk(y,null,x,!0))}}),!!o.length){for(a.sort(t),tbt(o),tbt(a),s=0,l=a.length;s<l;++s)a[s].e=r=!r;for(var c=o[0],u,h;;){for(var f=c,p=!0;f.v;)if((f=f.n)===c)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(s=0,l=u.length;s<l;++s)i.point((h=u[s])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(u=f.p.z,s=u.length-1;s>=0;--s)i.point((h=u[s])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,u=f.z,p=!p}while(!f.v);i.lineEnd()}}}function tbt(e){if(!!(t=e.length)){for(var t,r=0,n=e[0],i;++r<t;)n.n=i=e[r],i.p=n,n=i;n.n=i=e[0],i.p=n}}var Mj=Ss();function Ej(e){return Re(e[0])<=Be?e[0]:ca(e[0])*((Re(e[0])+Be)%wi-Be)}function Tk(e,t){var r=Ej(t),n=t[1],i=Xt(n),o=[Xt(r),-Zt(r),0],a=0,s=0;Mj.reset(),i===1?n=mn+le:i===-1&&(n=-mn-le);for(var l=0,c=e.length;l<c;++l)if(!!(h=(u=e[l]).length))for(var u,h,f=u[h-1],p=Ej(f),d=f[1]/2+Pb,g=Xt(d),_=Zt(d),y=0;y<h;++y,p=b,g=C,_=P,f=x){var x=u[y],b=Ej(x),S=x[1]/2+Pb,C=Xt(S),P=Zt(S),k=b-p,O=k>=0?1:-1,D=O*k,B=D>Be,I=g*C;if(Mj.add(bn(I*O*Xt(D),_*P+I*Zt(D))),a+=B?k+O*wi:k,B^p>=r^b>=r){var L=kp(oc(f),oc(x));H_(L);var R=kp(o,L);H_(R);var F=(B^k>=0?-1:1)*wn(R[2]);(n>F||n===F&&(L[0]||L[1]))&&(s+=B^k>=0?1:-1)}}return(a<-le||a<le&&Mj<-le)^s&1}function Ck(e,t,r,n){return function(i){var o=t(i),a=Sk(),s=t(a),l=!1,c,u,h,f={point:p,lineStart:g,lineEnd:_,polygonStart:function(){f.point=y,f.lineStart=x,f.lineEnd=b,u=[],c=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=_,u=Im(u);var S=Tk(c,n);u.length?(l||(i.polygonStart(),l=!0),Ek(u,g3e,S,r,i)):S&&(l||(i.polygonStart(),l=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=c=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(S,C){e(S,C)&&i.point(S,C)}function d(S,C){o.point(S,C)}function g(){f.point=d,o.lineStart()}function _(){f.point=p,o.lineEnd()}function y(S,C){h.push([S,C]),s.point(S,C)}function x(){s.lineStart(),h=[]}function b(){y(h[0][0],h[0][1]),s.lineEnd();var S=s.clean(),C=a.result(),P,k=C.length,O,D,B;if(h.pop(),c.push(h),h=null,!!k){if(S&1){if(D=C[0],(O=D.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),P=0;P<O;++P)i.point((B=D[P])[0],B[1]);i.lineEnd()}return}k>1&&S&2&&C.push(C.pop().concat(C.shift())),u.push(C.filter(m3e))}}return f}}function m3e(e){return e.length>1}function g3e(e,t){return((e=e.x)[0]<0?e[1]-mn-le:mn-e[1])-((t=t.x)[0]<0?t[1]-mn-le:mn-t[1])}var e5=Ck(function(){return!0},_3e,v3e,[-Be,-mn]);function _3e(e){var t=NaN,r=NaN,n=NaN,i;return{lineStart:function(){e.lineStart(),i=1},point:function(o,a){var s=o>0?Be:-Be,l=Re(o-t);Re(l-Be)<le?(e.point(t,r=(r+a)/2>0?mn:-mn),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),i=0):n!==s&&l>=Be&&(Re(t-n)<le&&(t-=n*le),Re(o-s)<le&&(o-=s*le),r=y3e(t,r,o,a),e.point(n,r),e.lineEnd(),e.lineStart(),e.point(s,r),i=0),e.point(t=o,r=a),n=s},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-i}}}function y3e(e,t,r,n){var i,o,a=Xt(e-r);return Re(a)>le?ic((Xt(t)*(o=Zt(n))*Xt(r)-Xt(n)*(i=Zt(t))*Xt(e))/(i*o*a)):(t+n)/2}function v3e(e,t,r,n){var i;if(e==null)i=r*mn,n.point(-Be,i),n.point(0,i),n.point(Be,i),n.point(Be,0),n.point(Be,-i),n.point(0,-i),n.point(-Be,-i),n.point(-Be,0),n.point(-Be,i);else if(Re(e[0]-t[0])>le){var o=e[0]<t[0]?Be:-Be;i=r*o/2,n.point(-o,i),n.point(0,i),n.point(o,i)}else n.point(t[0],t[1])}function Ak(e){var t=Zt(e),r=6*ye,n=t>0,i=Re(t)>le;function o(u,h,f,p){Sj(p,e,r,f,u,h)}function a(u,h){return Zt(u)*Zt(h)>t}function s(u){var h,f,p,d,g;return{lineStart:function(){d=p=!1,g=1},point:function(_,y){var x=[_,y],b,S=a(_,y),C=n?S?0:c(_,y):S?c(_+(_<0?Be:-Be),y):0;if(!h&&(d=p=S)&&u.lineStart(),S!==p&&(b=l(h,x),(!b||kb(h,b)||kb(x,b))&&(x[2]=1)),S!==p)g=0,S?(u.lineStart(),b=l(x,h),u.point(b[0],b[1])):(b=l(h,x),u.point(b[0],b[1],2),u.lineEnd()),h=b;else if(i&&h&&n^S){var P;!(C&f)&&(P=l(x,h,!0))&&(g=0,n?(u.lineStart(),u.point(P[0][0],P[0][1]),u.point(P[1][0],P[1][1]),u.lineEnd()):(u.point(P[1][0],P[1][1]),u.lineEnd(),u.lineStart(),u.point(P[0][0],P[0][1],3)))}S&&(!h||!kb(h,x))&&u.point(x[0],x[1]),h=x,p=S,f=C},lineEnd:function(){p&&u.lineEnd(),h=null},clean:function(){return g|(d&&p)<<1}}}function l(u,h,f){var p=oc(u),d=oc(h),g=[1,0,0],_=kp(p,d),y=XE(_,_),x=_[0],b=y-x*x;if(!b)return!f&&u;var S=t*y/b,C=-t*x/b,P=kp(g,_),k=$E(g,S),O=$E(_,C);dk(k,O);var D=P,B=XE(k,D),I=XE(D,D),L=B*B-I*(XE(k,k)-1);if(!(L<0)){var R=xr(L),F=$E(D,(-B-R)/I);if(dk(F,k),F=B_(F),!f)return F;var z=u[0],U=h[0],W=u[1],Z=h[1],rt;U<z&&(rt=z,z=U,U=rt);var ot=U-z,st=Re(ot-Be)<le,St=st||ot<le;if(!st&&Z<W&&(rt=W,W=Z,Z=rt),St?st?W+Z>0^F[1]<(Re(F[0]-z)<le?W:Z):W<=F[1]&&F[1]<=Z:ot>Be^(z<=F[0]&&F[0]<=U)){var bt=$E(D,(-B+R)/I);return dk(bt,k),[F,B_(bt)]}}}function c(u,h){var f=n?e:Be-e,p=0;return u<-f?p|=1:u>f&&(p|=2),h<-f?p|=4:h>f&&(p|=8),p}return Ck(a,s,o,n?[0,-e]:[-Be,e-Be])}function ebt(e,t,r,n,i,o){var a=e[0],s=e[1],l=t[0],c=t[1],u=0,h=1,f=l-a,p=c-s,d;if(d=r-a,!(!f&&d>0)){if(d/=f,f<0){if(d<u)return;d<h&&(h=d)}else if(f>0){if(d>h)return;d>u&&(u=d)}if(d=i-a,!(!f&&d<0)){if(d/=f,f<0){if(d>h)return;d>u&&(u=d)}else if(f>0){if(d<u)return;d<h&&(h=d)}if(d=n-s,!(!p&&d>0)){if(d/=p,p<0){if(d<u)return;d<h&&(h=d)}else if(p>0){if(d>h)return;d>u&&(u=d)}if(d=o-s,!(!p&&d<0)){if(d/=p,p<0){if(d>h)return;d>u&&(u=d)}else if(p>0){if(d<u)return;d<h&&(h=d)}return u>0&&(e[0]=a+u*f,e[1]=s+u*p),h<1&&(t[0]=a+h*f,t[1]=s+h*p),!0}}}}}var r5=1e9,Pk=-r5;function Dp(e,t,r,n){function i(c,u){return e<=c&&c<=r&&t<=u&&u<=n}function o(c,u,h,f){var p=0,d=0;if(c==null||(p=a(c,h))!==(d=a(u,h))||l(c,u)<0^h>0)do f.point(p===0||p===3?e:r,p>1?n:t);while((p=(p+h+4)%4)!==d);else f.point(u[0],u[1])}function a(c,u){return Re(c[0]-e)<le?u>0?0:3:Re(c[0]-r)<le?u>0?2:1:Re(c[1]-t)<le?u>0?1:0:u>0?3:2}function s(c,u){return l(c.x,u.x)}function l(c,u){var h=a(c,1),f=a(u,1);return h!==f?h-f:h===0?u[1]-c[1]:h===1?c[0]-u[0]:h===2?c[1]-u[1]:u[0]-c[0]}return function(c){var u=c,h=Sk(),f,p,d,g,_,y,x,b,S,C,P,k={point:O,lineStart:L,lineEnd:R,polygonStart:B,polygonEnd:I};function O(z,U){i(z,U)&&u.point(z,U)}function D(){for(var z=0,U=0,W=p.length;U<W;++U)for(var Z=p[U],rt=1,ot=Z.length,st=Z[0],St,bt,Mt=st[0],lt=st[1];rt<ot;++rt)St=Mt,bt=lt,st=Z[rt],Mt=st[0],lt=st[1],bt<=n?lt>n&&(Mt-St)*(n-bt)>(lt-bt)*(e-St)&&++z:lt<=n&&(Mt-St)*(n-bt)<(lt-bt)*(e-St)&&--z;return z}function B(){u=h,f=[],p=[],P=!0}function I(){var z=D(),U=P&&z,W=(f=Im(f)).length;(U||W)&&(c.polygonStart(),U&&(c.lineStart(),o(null,null,1,c),c.lineEnd()),W&&Ek(f,s,z,o,c),c.polygonEnd()),u=c,f=p=d=null}function L(){k.point=F,p&&p.push(d=[]),C=!0,S=!1,x=b=NaN}function R(){f&&(F(g,_),y&&S&&h.rejoin(),f.push(h.result())),k.point=O,S&&u.lineEnd()}function F(z,U){var W=i(z,U);if(p&&d.push([z,U]),C)g=z,_=U,y=W,C=!1,W&&(u.lineStart(),u.point(z,U));else if(W&&S)u.point(z,U);else{var Z=[x=Math.max(Pk,Math.min(r5,x)),b=Math.max(Pk,Math.min(r5,b))],rt=[z=Math.max(Pk,Math.min(r5,z)),U=Math.max(Pk,Math.min(r5,U))];ebt(Z,rt,e,t,r,n)?(S||(u.lineStart(),u.point(Z[0],Z[1])),u.point(rt[0],rt[1]),W||u.lineEnd(),P=!1):W&&(u.lineStart(),u.point(z,U),P=!1)}x=z,b=U,S=W}return k}}function rbt(){var e=0,t=0,r=960,n=500,i,o,a;return a={stream:function(s){return i&&o===s?i:i=Dp(e,t,r,n)(o=s)},extent:function(s){return arguments.length?(e=+s[0][0],t=+s[0][1],r=+s[1][0],n=+s[1][1],i=o=null,a):[[e,t],[r,n]]}}}var Tj=Ss(),Cj,Ik,Lk,Rb={sphere:Fr,point:Fr,lineStart:x3e,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr};function x3e(){Rb.point=w3e,Rb.lineEnd=b3e}function b3e(){Rb.point=Rb.lineEnd=Fr}function w3e(e,t){e*=ye,t*=ye,Cj=e,Ik=Xt(t),Lk=Zt(t),Rb.point=S3e}function S3e(e,t){e*=ye,t*=ye;var r=Xt(t),n=Zt(t),i=Re(e-Cj),o=Zt(i),a=Xt(i),s=n*a,l=Lk*r-Ik*n*o,c=Ik*r+Lk*n*o;Tj.add(bn(xr(s*s+l*l),c)),Cj=e,Ik=r,Lk=n}function kk(e){return Tj.reset(),vo(e,Rb),+Tj}var Aj=[null,null],M3e={type:"LineString",coordinates:Aj};function Nb(e,t){return Aj[0]=e,Aj[1]=t,kk(M3e)}var nbt={Feature:function(e,t){return Rk(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n<i;)if(Rk(r[n].geometry,t))return!0;return!1}},ibt={Sphere:function(){return!0},Point:function(e,t){return obt(e.coordinates,t)},MultiPoint:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(obt(r[n],t))return!0;return!1},LineString:function(e,t){return abt(e.coordinates,t)},MultiLineString:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(abt(r[n],t))return!0;return!1},Polygon:function(e,t){return sbt(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,n=-1,i=r.length;++n<i;)if(sbt(r[n],t))return!0;return!1},GeometryCollection:function(e,t){for(var r=e.geometries,n=-1,i=r.length;++n<i;)if(Rk(r[n],t))return!0;return!1}};function Rk(e,t){return e&&ibt.hasOwnProperty(e.type)?ibt[e.type](e,t):!1}function obt(e,t){return Nb(e,t)===0}function abt(e,t){for(var r,n,i,o=0,a=e.length;o<a;o++){if(n=Nb(e[o],t),n===0||o>0&&(i=Nb(e[o],e[o-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<z_*i))return!0;r=n}return!1}function sbt(e,t){return!!Tk(e.map(E3e),lbt(t))}function E3e(e){return e=e.map(lbt),e.pop(),e}function lbt(e){return[e[0]*ye,e[1]*ye]}function cbt(e,t){return(e&&nbt.hasOwnProperty(e.type)?nbt[e.type]:Rk)(e,t)}function ubt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[i,o]})}}function hbt(e,t,r){var n=Ir(e,t-le,r).concat(t);return function(i){return n.map(function(o){return[o,i]})}}function Nk(){var e,t,r,n,i,o,a,s,l=10,c=l,u=90,h=360,f,p,d,g,_=2.5;function y(){return{type:"MultiLineString",coordinates:x()}}function x(){return Ir(YE(n/u)*u,r,u).map(d).concat(Ir(YE(s/h)*h,a,h).map(g)).concat(Ir(YE(t/l)*l,e,l).filter(function(b){return Re(b%u)>le}).map(f)).concat(Ir(YE(o/c)*c,i,c).filter(function(b){return Re(b%h)>le}).map(p))}return y.lines=function(){return x().map(function(b){return{type:"LineString",coordinates:b}})},y.outline=function(){return{type:"Polygon",coordinates:[d(n).concat(g(a).slice(1),d(r).reverse().slice(1),g(s).reverse().slice(1))]}},y.extent=function(b){return arguments.length?y.extentMajor(b).extentMinor(b):y.extentMinor()},y.extentMajor=function(b){return arguments.length?(n=+b[0][0],r=+b[1][0],s=+b[0][1],a=+b[1][1],n>r&&(b=n,n=r,r=b),s>a&&(b=s,s=a,a=b),y.precision(_)):[[n,s],[r,a]]},y.extentMinor=function(b){return arguments.length?(t=+b[0][0],e=+b[1][0],o=+b[0][1],i=+b[1][1],t>e&&(b=t,t=e,e=b),o>i&&(b=o,o=i,i=b),y.precision(_)):[[t,o],[e,i]]},y.step=function(b){return arguments.length?y.stepMajor(b).stepMinor(b):y.stepMinor()},y.stepMajor=function(b){return arguments.length?(u=+b[0],h=+b[1],y):[u,h]},y.stepMinor=function(b){return arguments.length?(l=+b[0],c=+b[1],y):[l,c]},y.precision=function(b){return arguments.length?(_=+b,f=ubt(o,i,90),p=hbt(t,e,_),d=ubt(s,a,90),g=hbt(n,r,_),y):_},y.extentMajor([[-180,-90+le],[180,90-le]]).extentMinor([[-180,-80-le],[180,80+le]])}function fbt(){return Nk()()}function pbt(e,t){var r=e[0]*ye,n=e[1]*ye,i=t[0]*ye,o=t[1]*ye,a=Zt(n),s=Xt(n),l=Zt(o),c=Xt(o),u=a*Zt(r),h=a*Xt(r),f=l*Zt(i),p=l*Xt(i),d=2*wn(xr(fj(o-n)+a*l*fj(i-r))),g=Xt(d),_=d?function(y){var x=Xt(y*=d)/g,b=Xt(d-y)/g,S=b*u+x*f,C=b*h+x*p,P=b*s+x*c;return[bn(C,S)*vr,bn(P,xr(S*S+C*C))*vr]}:function(){return[r*vr,n*vr]};return _.distance=d,_}function jm(e){return e}var Pj=Ss(),Ij=Ss(),dbt,mbt,Lj,kj,Xm={point:Fr,lineStart:Fr,lineEnd:Fr,polygonStart:function(){Xm.lineStart=T3e,Xm.lineEnd=A3e},polygonEnd:function(){Xm.lineStart=Xm.lineEnd=Xm.point=Fr,Pj.add(Re(Ij)),Ij.reset()},result:function(){var e=Pj/2;return Pj.reset(),e}};function T3e(){Xm.point=C3e}function C3e(e,t){Xm.point=gbt,dbt=Lj=e,mbt=kj=t}function gbt(e,t){Ij.add(kj*e-Lj*t),Lj=e,kj=t}function A3e(){gbt(dbt,mbt)}var Rj=Xm;var Db=1/0,Dk=Db,n5=-Db,Ok=n5,P3e={point:I3e,lineStart:Fr,lineEnd:Fr,polygonStart:Fr,polygonEnd:Fr,result:function(){var e=[[Db,Dk],[n5,Ok]];return n5=Ok=-(Dk=Db=1/0),e}};function I3e(e,t){e<Db&&(Db=e),e>n5&&(n5=e),t<Dk&&(Dk=t),t>Ok&&(Ok=t)}var Ob=P3e;var Nj=0,Dj=0,i5=0,zk=0,Fk=0,zb=0,Oj=0,zj=0,o5=0,vbt,xbt,Bh,Hh,mu={point:q_,lineStart:_bt,lineEnd:ybt,polygonStart:function(){mu.lineStart=R3e,mu.lineEnd=N3e},polygonEnd:function(){mu.point=q_,mu.lineStart=_bt,mu.lineEnd=ybt},result:function(){var e=o5?[Oj/o5,zj/o5]:zb?[zk/zb,Fk/zb]:i5?[Nj/i5,Dj/i5]:[NaN,NaN];return Nj=Dj=i5=zk=Fk=zb=Oj=zj=o5=0,e}};function q_(e,t){Nj+=e,Dj+=t,++i5}function _bt(){mu.point=L3e}function L3e(e,t){mu.point=k3e,q_(Bh=e,Hh=t)}function k3e(e,t){var r=e-Bh,n=t-Hh,i=xr(r*r+n*n);zk+=i*(Bh+e)/2,Fk+=i*(Hh+t)/2,zb+=i,q_(Bh=e,Hh=t)}function ybt(){mu.point=q_}function R3e(){mu.point=D3e}function N3e(){bbt(vbt,xbt)}function D3e(e,t){mu.point=bbt,q_(vbt=Bh=e,xbt=Hh=t)}function bbt(e,t){var r=e-Bh,n=t-Hh,i=xr(r*r+n*n);zk+=i*(Bh+e)/2,Fk+=i*(Hh+t)/2,zb+=i,i=Hh*e-Bh*t,Oj+=i*(Bh+e),zj+=i*(Hh+t),o5+=i*3,q_(Bh=e,Hh=t)}var Fj=mu;function Bk(e){this._context=e}Bk.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._context.moveTo(e,t),this._point=1;break}case 1:{this._context.lineTo(e,t);break}default:{this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,wi);break}}},result:Fr};var Hj=Ss(),Bj,wbt,Sbt,a5,s5,Hk={point:Fr,lineStart:function(){Hk.point=O3e},lineEnd:function(){Bj&&Mbt(wbt,Sbt),Hk.point=Fr},polygonStart:function(){Bj=!0},polygonEnd:function(){Bj=null},result:function(){var e=+Hj;return Hj.reset(),e}};function O3e(e,t){Hk.point=Mbt,wbt=a5=e,Sbt=s5=t}function Mbt(e,t){a5-=e,s5-=t,Hj.add(xr(a5*a5+s5*s5)),a5=e,s5=t}var Vj=Hk;function Vk(){this._string=[]}Vk.prototype={_radius:4.5,_circle:Ebt(4.5),pointRadius:function(e){return(e=+e)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:{this._string.push("M",e,",",t),this._point=1;break}case 1:{this._string.push("L",e,",",t);break}default:{this._circle==null&&(this._circle=Ebt(this._radius)),this._string.push("M",e,",",t,this._circle);break}}},result:function(){if(this._string.length){var e=this._string.join("");return this._string=[],e}else return null}};function Ebt(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function Tbt(e,t){var r=4.5,n,i;function o(a){return a&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),vo(a,n(i))),i.result()}return o.area=function(a){return vo(a,n(Rj)),Rj.result()},o.measure=function(a){return vo(a,n(Vj)),Vj.result()},o.bounds=function(a){return vo(a,n(Ob)),Ob.result()},o.centroid=function(a){return vo(a,n(Fj)),Fj.result()},o.projection=function(a){return arguments.length?(n=a==null?(e=null,jm):(e=a).stream,o):e},o.context=function(a){return arguments.length?(i=a==null?(t=null,new Vk):new Bk(t=a),typeof r!="function"&&i.pointRadius(r),o):t},o.pointRadius=function(a){return arguments.length?(r=typeof a=="function"?a:(i.pointRadius(+a),+a),o):r},o.projection(e).context(t)}function Cbt(e){return{stream:$m(e)}}function $m(e){return function(t){var r=new Uj;for(var n in e)r[n]=e[n];return r.stream=t,r}}function Uj(){}Uj.prototype={constructor:Uj,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function qj(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),n!=null&&e.clipExtent(null),vo(r,e.stream(Ob)),t(Ob.result()),n!=null&&e.clipExtent(n),e}function G_(e,t,r){return qj(e,function(n){var i=t[1][0]-t[0][0],o=t[1][1]-t[0][1],a=Math.min(i/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),s=+t[0][0]+(i-a*(n[1][0]+n[0][0]))/2,l=+t[0][1]+(o-a*(n[1][1]+n[0][1]))/2;e.scale(150*a).translate([s,l])},r)}function Fb(e,t,r){return G_(e,[[0,0],t],r)}function Bb(e,t,r){return qj(e,function(n){var i=+t,o=i/(n[1][0]-n[0][0]),a=(i-o*(n[1][0]+n[0][0]))/2,s=-o*n[0][1];e.scale(150*o).translate([a,s])},r)}function Hb(e,t,r){return qj(e,function(n){var i=+t,o=i/(n[1][1]-n[0][1]),a=-o*n[0][0],s=(i-o*(n[1][1]+n[0][1]))/2;e.scale(150*o).translate([a,s])},r)}var Abt=16,z3e=Zt(30*ye);function Gj(e,t){return+t?B3e(e,t):F3e(e)}function F3e(e){return $m({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function B3e(e,t){function r(n,i,o,a,s,l,c,u,h,f,p,d,g,_){var y=c-n,x=u-i,b=y*y+x*x;if(b>4*t&&g--){var S=a+f,C=s+p,P=l+d,k=xr(S*S+C*C+P*P),O=wn(P/=k),D=Re(Re(P)-1)<le||Re(o-h)<le?(o+h)/2:bn(C,S),B=e(D,O),I=B[0],L=B[1],R=I-n,F=L-i,z=x*R-y*F;(z*z/b>t||Re((y*R+x*F)/b-.5)>.3||a*f+s*p+l*d<z3e)&&(r(n,i,o,a,s,l,I,L,D,S/=k,C/=k,P,g,_),_.point(I,L),r(I,L,D,S,C,P,c,u,h,f,p,d,g,_))}}return function(n){var i,o,a,s,l,c,u,h,f,p,d,g,_={point:y,lineStart:x,lineEnd:S,polygonStart:function(){n.polygonStart(),_.lineStart=C},polygonEnd:function(){n.polygonEnd(),_.lineStart=x}};function y(O,D){O=e(O,D),n.point(O[0],O[1])}function x(){h=NaN,_.point=b,n.lineStart()}function b(O,D){var B=oc([O,D]),I=e(O,D);r(h,f,u,p,d,g,h=I[0],f=I[1],u=O,p=B[0],d=B[1],g=B[2],Abt,n),n.point(h,f)}function S(){_.point=y,n.lineEnd()}function C(){x(),_.point=P,_.lineEnd=k}function P(O,D){b(i=O,D),o=h,a=f,s=p,l=d,c=g,_.point=b}function k(){r(h,f,u,p,d,g,o,a,i,s,l,c,Abt,n),_.lineEnd=S,S()}return _}}var H3e=$m({point:function(e,t){this.stream.point(e*ye,t*ye)}});function V3e(e){return $m({point:function(t,r){var n=e(t,r);return this.stream.point(n[0],n[1])}})}function U3e(e,t,r,n,i){function o(a,s){return a*=n,s*=i,[t+e*a,r-e*s]}return o.invert=function(a,s){return[(a-t)/e*n,(r-s)/e*i]},o}function Pbt(e,t,r,n,i,o){var a=Zt(o),s=Xt(o),l=a*e,c=s*e,u=a/e,h=s/e,f=(s*r-a*t)/e,p=(s*t+a*r)/e;function d(g,_){return g*=n,_*=i,[l*g-c*_+t,r-c*g-l*_]}return d.invert=function(g,_){return[n*(u*g-h*_+f),i*(p-h*g-u*_)]},d}function Si(e){return l5(function(){return e})()}function l5(e){var t,r=150,n=480,i=250,o=0,a=0,s=0,l=0,c=0,u,h=0,f=1,p=1,d=null,g=e5,_=null,y,x,b,S=jm,C=.5,P,k,O,D,B;function I(z){return O(z[0]*ye,z[1]*ye)}function L(z){return z=O.invert(z[0],z[1]),z&&[z[0]*vr,z[1]*vr]}I.stream=function(z){return D&&B===z?D:D=H3e(V3e(u)(g(P(S(B=z)))))},I.preclip=function(z){return arguments.length?(g=z,d=void 0,F()):g},I.postclip=function(z){return arguments.length?(S=z,_=y=x=b=null,F()):S},I.clipAngle=function(z){return arguments.length?(g=+z?Ak(d=z*ye):(d=null,e5),F()):d*vr},I.clipExtent=function(z){return arguments.length?(S=z==null?(_=y=x=b=null,jm):Dp(_=+z[0][0],y=+z[0][1],x=+z[1][0],b=+z[1][1]),F()):_==null?null:[[_,y],[x,b]]},I.scale=function(z){return arguments.length?(r=+z,R()):r},I.translate=function(z){return arguments.length?(n=+z[0],i=+z[1],R()):[n,i]},I.center=function(z){return arguments.length?(o=z[0]%360*ye,a=z[1]%360*ye,R()):[o*vr,a*vr]},I.rotate=function(z){return arguments.length?(s=z[0]%360*ye,l=z[1]%360*ye,c=z.length>2?z[2]%360*ye:0,R()):[s*vr,l*vr,c*vr]},I.angle=function(z){return arguments.length?(h=z%360*ye,R()):h*vr},I.reflectX=function(z){return arguments.length?(f=z?-1:1,R()):f<0},I.reflectY=function(z){return arguments.length?(p=z?-1:1,R()):p<0},I.precision=function(z){return arguments.length?(P=Gj(k,C=z*z),F()):xr(C)},I.fitExtent=function(z,U){return G_(I,z,U)},I.fitSize=function(z,U){return Fb(I,z,U)},I.fitWidth=function(z,U){return Bb(I,z,U)},I.fitHeight=function(z,U){return Hb(I,z,U)};function R(){var z=Pbt(r,0,0,f,p,h).apply(null,t(o,a)),U=(h?Pbt:U3e)(r,n-z[0],i-z[1],f,p,h);return u=t5(s,l,c),k=QE(t,U),O=QE(u,k),P=Gj(k,C),F()}function F(){return D=B=null,I}return function(){return t=e.apply(this,arguments),I.invert=t.invert&&L,R()}}function Vb(e){var t=0,r=Be/3,n=l5(e),i=n(t,r);return i.parallels=function(o){return arguments.length?n(t=o[0]*ye,r=o[1]*ye):[t*vr,r*vr]},i}function Ibt(e){var t=Zt(e);function r(n,i){return[n*t,Xt(i)/t]}return r.invert=function(n,i){return[n/t,wn(i*t)]},r}function Wj(e,t){var r=Xt(e),n=(r+Xt(t))/2;if(Re(n)<le)return Ibt(e);var i=1+r*(2*n-r),o=xr(i)/n;function a(s,l){var c=xr(i-2*n*Xt(l))/n;return[c*Xt(s*=n),o-c*Zt(s)]}return a.invert=function(s,l){var c=o-l,u=bn(s,Re(c))*ca(c);return c*n<0&&(u-=Be*ca(s)*ca(c)),[u/n,wn((i-(s*s+c*c)*n*n)/(2*n))]},a}function W_(){return Vb(Wj).scale(155.424).center([0,33.6442])}function Uk(){return W_().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function q3e(e){var t=e.length;return{point:function(r,n){for(var i=-1;++i<t;)e[i].point(r,n)},sphere:function(){for(var r=-1;++r<t;)e[r].sphere()},lineStart:function(){for(var r=-1;++r<t;)e[r].lineStart()},lineEnd:function(){for(var r=-1;++r<t;)e[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<t;)e[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<t;)e[r].polygonEnd()}}}function Lbt(){var e,t,r=Uk(),n,i=W_().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o,a=W_().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s,l,c={point:function(f,p){l=[f,p]}};function u(f){var p=f[0],d=f[1];return l=null,n.point(p,d),l||(o.point(p,d),l)||(s.point(p,d),l)}u.invert=function(f){var p=r.scale(),d=r.translate(),g=(f[0]-d[0])/p,_=(f[1]-d[1])/p;return(_>=.12&&_<.234&&g>=-.425&&g<-.214?i:_>=.166&&_<.234&&g>=-.214&&g<-.115?a:r).invert(f)},u.stream=function(f){return e&&t===f?e:e=q3e([r.stream(t=f),i.stream(f),a.stream(f)])},u.precision=function(f){return arguments.length?(r.precision(f),i.precision(f),a.precision(f),h()):r.precision()},u.scale=function(f){return arguments.length?(r.scale(f),i.scale(f*.35),a.scale(f),u.translate(r.translate())):r.scale()},u.translate=function(f){if(!arguments.length)return r.translate();var p=r.scale(),d=+f[0],g=+f[1];return n=r.translate(f).clipExtent([[d-.455*p,g-.238*p],[d+.455*p,g+.238*p]]).stream(c),o=i.translate([d-.307*p,g+.201*p]).clipExtent([[d-.425*p+le,g+.12*p+le],[d-.214*p-le,g+.234*p-le]]).stream(c),s=a.translate([d-.205*p,g+.212*p]).clipExtent([[d-.214*p+le,g+.166*p+le],[d-.115*p-le,g+.234*p-le]]).stream(c),h()},u.fitExtent=function(f,p){return G_(u,f,p)},u.fitSize=function(f,p){return Fb(u,f,p)},u.fitWidth=function(f,p){return Bb(u,f,p)},u.fitHeight=function(f,p){return Hb(u,f,p)};function h(){return e=t=null,u}return u.scale(1070)}function qk(e){return function(t,r){var n=Zt(t),i=Zt(r),o=e(n*i);return[o*i*Xt(t),o*Xt(r)]}}function Vh(e){return function(t,r){var n=xr(t*t+r*r),i=e(n),o=Xt(i),a=Zt(i);return[bn(t*o,n*a),wn(n&&r*o/n)]}}var Gk=qk(function(e){return xr(2/(1+e))});Gk.invert=Vh(function(e){return 2*wn(e/2)});function kbt(){return Si(Gk).scale(124.75).clipAngle(180-.001)}var Wk=qk(function(e){return(e=hk(e))&&e/Xt(e)});Wk.invert=Vh(function(e){return e});function Rbt(){return Si(Wk).scale(79.4188).clipAngle(180-.001)}function Y_(e,t){return[e,F_(Ib((mn+t)/2))]}Y_.invert=function(e,t){return[e,2*ic(ck(t))-mn]};function Nbt(){return Yj(Y_).scale(961/wi)}function Yj(e){var t=Si(e),r=t.center,n=t.scale,i=t.translate,o=t.clipExtent,a=null,s,l,c;t.scale=function(h){return arguments.length?(n(h),u()):n()},t.translate=function(h){return arguments.length?(i(h),u()):i()},t.center=function(h){return arguments.length?(r(h),u()):r()},t.clipExtent=function(h){return arguments.length?(h==null?a=s=l=c=null:(a=+h[0][0],s=+h[0][1],l=+h[1][0],c=+h[1][1]),u()):a==null?null:[[a,s],[l,c]]};function u(){var h=Be*n(),f=t(wk(t.rotate()).invert([0,0]));return o(a==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:e===Y_?[[Math.max(f[0]-h,a),s],[Math.min(f[0]+h,l),c]]:[[a,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,c)]])}return u()}function Yk(e){return Ib((mn+e)/2)}function jj(e,t){var r=Zt(e),n=e===t?Xt(e):F_(r/Zt(t))/F_(Yk(t)/Yk(e)),i=r*uk(Yk(e),n)/n;if(!n)return Y_;function o(a,s){i>0?s<-mn+le&&(s=-mn+le):s>mn-le&&(s=mn-le);var l=i/uk(Yk(s),n);return[l*Xt(n*a),i-l*Zt(n*a)]}return o.invert=function(a,s){var l=i-s,c=ca(n)*xr(a*a+l*l),u=bn(a,Re(l))*ca(l);return l*n<0&&(u-=Be*ca(a)*ca(l)),[u/n,2*ic(uk(i/c,1/n))-mn]},o}function Dbt(){return Vb(jj).scale(109.5).parallels([30,30])}function j_(e,t){return[e,t]}j_.invert=j_;function Obt(){return Si(j_).scale(152.63)}function Xj(e,t){var r=Zt(e),n=e===t?Xt(e):(r-Zt(t))/(t-e),i=r/n+e;if(Re(n)<le)return j_;function o(a,s){var l=i-s,c=n*a;return[l*Xt(c),i-l*Zt(c)]}return o.invert=function(a,s){var l=i-s,c=bn(a,Re(l))*ca(l);return l*n<0&&(c-=Be*ca(a)*ca(l)),[c/n,i-ca(n)*xr(a*a+l*l)]},o}function zbt(){return Vb(Xj).scale(131.154).center([0,13.9389])}var c5=1.340264,u5=-.081106,h5=893e-6,f5=.003796,jk=xr(3)/2,G3e=12;function Xk(e,t){var r=wn(jk*Xt(t)),n=r*r,i=n*n*n;return[e*Zt(r)/(jk*(c5+3*u5*n+i*(7*h5+9*f5*n))),r*(c5+u5*n+i*(h5+f5*n))]}Xk.invert=function(e,t){for(var r=t,n=r*r,i=n*n*n,o=0,a,s,l;o<G3e&&(s=r*(c5+u5*n+i*(h5+f5*n))-t,l=c5+3*u5*n+i*(7*h5+9*f5*n),r-=a=s/l,n=r*r,i=n*n*n,!(Re(a)<z_));++o);return[jk*e*(c5+3*u5*n+i*(7*h5+9*f5*n))/Zt(r),wn(Xt(r)/jk)]};function Fbt(){return Si(Xk).scale(177.158)}function $k(e,t){var r=Zt(t),n=Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}$k.invert=Vh(ic);function Bbt(){return Si($k).scale(144.049).clipAngle(60)}function Hbt(){var e=1,t=0,r=0,n=1,i=1,o=0,a,s,l=null,c,u,h,f=1,p=1,d=$m({point:function(S,C){var P=b([S,C]);this.stream.point(P[0],P[1])}}),g=jm,_,y;function x(){return f=e*n,p=e*i,_=y=null,b}function b(S){var C=S[0]*f,P=S[1]*p;if(o){var k=P*a-C*s;C=C*a+P*s,P=k}return[C+t,P+r]}return b.invert=function(S){var C=S[0]-t,P=S[1]-r;if(o){var k=P*a+C*s;C=C*a-P*s,P=k}return[C/f,P/p]},b.stream=function(S){return _&&y===S?_:_=d(g(y=S))},b.postclip=function(S){return arguments.length?(g=S,l=c=u=h=null,x()):g},b.clipExtent=function(S){return arguments.length?(g=S==null?(l=c=u=h=null,jm):Dp(l=+S[0][0],c=+S[0][1],u=+S[1][0],h=+S[1][1]),x()):l==null?null:[[l,c],[u,h]]},b.scale=function(S){return arguments.length?(e=+S,x()):e},b.translate=function(S){return arguments.length?(t=+S[0],r=+S[1],x()):[t,r]},b.angle=function(S){return arguments.length?(o=S%360*ye,s=Xt(o),a=Zt(o),x()):o*vr},b.reflectX=function(S){return arguments.length?(n=S?-1:1,x()):n<0},b.reflectY=function(S){return arguments.length?(i=S?-1:1,x()):i<0},b.fitExtent=function(S,C){return G_(b,S,C)},b.fitSize=function(S,C){return Fb(b,S,C)},b.fitWidth=function(S,C){return Bb(b,S,C)},b.fitHeight=function(S,C){return Hb(b,S,C)},b}function Kk(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}Kk.invert=function(e,t){var r=t,n=25,i;do{var o=r*r,a=o*o;r-=i=(r*(1.007226+o*(.015085+a*(-.044475+.028874*o-.005916*a)))-t)/(1.007226+o*(.015085*3+a*(-.044475*7+.028874*9*o-.005916*11*a)))}while(Re(i)>le&&--n>0);return[e/(.8707+(o=r*r)*(-.131979+o*(-.013791+o*o*o*(.003971-.001529*o)))),r]};function Vbt(){return Si(Kk).scale(175.295)}function Zk(e,t){return[Zt(t)*Xt(e),Xt(t)]}Zk.invert=Vh(wn);function Ubt(){return Si(Zk).scale(249.5).clipAngle(90+le)}function Jk(e,t){var r=Zt(t),n=1+Zt(e)*r;return[r*Xt(e)/n,Xt(t)/n]}Jk.invert=Vh(function(e){return 2*ic(e)});function qbt(){return Si(Jk).scale(250).clipAngle(142)}function Qk(e,t){return[F_(Ib((mn+t)/2)),-e]}Qk.invert=function(e,t){return[-t,2*ic(ck(e))-mn]};function Gbt(){var e=Yj(Qk),t=e.center,r=e.rotate;return e.center=function(n){return arguments.length?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},e.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function W3e(e,t){return e.parent===t.parent?1:2}function Y3e(e){return e.reduce(j3e,0)/e.length}function j3e(e,t){return e+t.x}function X3e(e){return 1+e.reduce($3e,0)}function $3e(e,t){return Math.max(e,t.y)}function K3e(e){for(var t;t=e.children;)e=t[0];return e}function Z3e(e){for(var t;t=e.children;)e=t[t.length-1];return e}function Wbt(){var e=W3e,t=1,r=1,n=!1;function i(o){var a,s=0;o.eachAfter(function(f){var p=f.children;p?(f.x=Y3e(p),f.y=X3e(p)):(f.x=a?s+=e(f,a):0,f.y=0,a=f)});var l=K3e(o),c=Z3e(o),u=l.x-e(l,c)/2,h=c.x+e(c,l)/2;return o.eachAfter(n?function(f){f.x=(f.x-o.x)*t,f.y=(o.y-f.y)*r}:function(f){f.x=(f.x-u)/(h-u)*t,f.y=(1-(o.y?f.y/o.y:1))*r})}return i.separation=function(o){return arguments.length?(e=o,i):e},i.size=function(o){return arguments.length?(n=!1,t=+o[0],r=+o[1],i):n?null:[t,r]},i.nodeSize=function(o){return arguments.length?(n=!0,t=+o[0],r=+o[1],i):n?[t,r]:null},i}function J3e(e){var t=0,r=e.children,n=r&&r.length;if(!n)t=1;else for(;--n>=0;)t+=r[n].value;e.value=t}function Ybt(){return this.eachAfter(J3e)}function jbt(e){var t=this,r,n=[t],i,o,a;do for(r=n.reverse(),n=[];t=r.pop();)if(e(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)n.push(i[o]);while(n.length);return this}function Xbt(e){for(var t=this,r=[t],n,i;t=r.pop();)if(e(t),n=t.children,n)for(i=n.length-1;i>=0;--i)r.push(n[i]);return this}function $bt(e){for(var t=this,r=[t],n=[],i,o,a;t=r.pop();)if(n.push(t),i=t.children,i)for(o=0,a=i.length;o<a;++o)r.push(i[o]);for(;t=n.pop();)e(t);return this}function Kbt(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})}function Zbt(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function Jbt(e){for(var t=this,r=Q3e(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function Q3e(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}function Qbt(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function t2t(){var e=[];return this.each(function(t){e.push(t)}),e}function e2t(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function r2t(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t}function p5(e,t){var r=new Km(e),n=+e.value&&(r.value=e.value),i,o=[r],a,s,l,c;for(t==null&&(t=eMe);i=o.pop();)if(n&&(i.value=+i.data.value),(s=t(i.data))&&(c=s.length))for(i.children=new Array(c),l=c-1;l>=0;--l)o.push(a=i.children[l]=new Km(s[l])),a.parent=i,a.depth=i.depth+1;return r.eachBefore($j)}function tMe(){return p5(this).eachBefore(rMe)}function eMe(e){return e.children}function rMe(e){e.data=e.data.data}function $j(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Km(e){this.data=e,this.depth=this.height=0,this.parent=null}Km.prototype=p5.prototype={constructor:Km,count:Ybt,each:jbt,eachAfter:$bt,eachBefore:Xbt,sum:Kbt,sort:Zbt,path:Jbt,ancestors:Qbt,descendants:t2t,leaves:e2t,links:r2t,copy:tMe};var n2t=Array.prototype.slice;function i2t(e){for(var t=e.length,r,n;t;)n=Math.random()*t--|0,r=e[t],e[t]=e[n],e[n]=r;return e}function e8(e){for(var t=0,r=(e=i2t(n2t.call(e))).length,n=[],i,o;t<r;)i=e[t],o&&o2t(o,i)?++t:(o=iMe(n=nMe(n,i)),t=0);return o}function nMe(e,t){var r,n;if(Kj(t,e))return[t];for(r=0;r<e.length;++r)if(t8(t,e[r])&&Kj(d5(e[r],t),e))return[e[r],t];for(r=0;r<e.length-1;++r)for(n=r+1;n<e.length;++n)if(t8(d5(e[r],e[n]),t)&&t8(d5(e[r],t),e[n])&&t8(d5(e[n],t),e[r])&&Kj(a2t(e[r],e[n],t),e))return[e[r],e[n],t];throw new Error}function t8(e,t){var r=e.r-t.r,n=t.x-e.x,i=t.y-e.y;return r<0||r*r<n*n+i*i}function o2t(e,t){var r=e.r-t.r+1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function Kj(e,t){for(var r=0;r<t.length;++r)if(!o2t(e,t[r]))return!1;return!0}function iMe(e){switch(e.length){case 1:return oMe(e[0]);case 2:return d5(e[0],e[1]);case 3:return a2t(e[0],e[1],e[2])}}function oMe(e){return{x:e.x,y:e.y,r:e.r}}function d5(e,t){var r=e.x,n=e.y,i=e.r,o=t.x,a=t.y,s=t.r,l=o-r,c=a-n,u=s-i,h=Math.sqrt(l*l+c*c);return{x:(r+o+l/h*u)/2,y:(n+a+c/h*u)/2,r:(h+i+s)/2}}function a2t(e,t,r){var n=e.x,i=e.y,o=e.r,a=t.x,s=t.y,l=t.r,c=r.x,u=r.y,h=r.r,f=n-a,p=n-c,d=i-s,g=i-u,_=l-o,y=h-o,x=n*n+i*i-o*o,b=x-a*a-s*s+l*l,S=x-c*c-u*u+h*h,C=p*d-f*g,P=(d*S-g*b)/(C*2)-n,k=(g*_-d*y)/C,O=(p*b-f*S)/(C*2)-i,D=(f*y-p*_)/C,B=k*k+D*D-1,I=2*(o+P*k+O*D),L=P*P+O*O-o*o,R=-(B?(I+Math.sqrt(I*I-4*B*L))/(2*B):L/I);return{x:n+P+k*R,y:i+O+D*R,r:R}}function s2t(e,t,r){var n=e.x-t.x,i,o,a=e.y-t.y,s,l,c=n*n+a*a;c?(o=t.r+r.r,o*=o,l=e.r+r.r,l*=l,o>l?(i=(c+l-o)/(2*c),s=Math.sqrt(Math.max(0,l/c-i*i)),r.x=e.x-i*n-s*a,r.y=e.y-i*a+s*n):(i=(c+o-l)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),r.x=t.x+i*n-s*a,r.y=t.y+i*a+s*n)):(r.x=t.x+r.r,r.y=t.y)}function l2t(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function c2t(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,o=(t.y*r.r+r.y*t.r)/n;return i*i+o*o}function r8(e){this._=e,this.next=null,this.previous=null}function Zj(e){if(!(i=e.length))return 0;var t,r,n,i,o,a,s,l,c,u,h;if(t=e[0],t.x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;s2t(r,t,n=e[2]),t=new r8(t),r=new r8(r),n=new r8(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;t:for(s=3;s<i;++s){s2t(t._,r._,n=e[s]),n=new r8(n),l=r.next,c=t.previous,u=r._.r,h=t._.r;do if(u<=h){if(l2t(l._,n._)){r=l,t.next=r,r.previous=t,--s;continue t}u+=l._.r,l=l.next}else{if(l2t(c._,n._)){t=c,t.next=r,r.previous=t,--s;continue t}h+=c._.r,c=c.previous}while(l!==c.next);for(n.previous=t,n.next=r,t.next=r.previous=r=n,o=c2t(t);(n=n.next)!==r;)(a=c2t(n))<o&&(t=n,o=a);r=t.next}for(t=[r._],n=r;(n=n.next)!==r;)t.push(n._);for(n=e8(t),s=0;s<i;++s)t=e[s],t.x-=n.x,t.y-=n.y;return n.r}function u2t(e){return Zj(e),e}function h2t(e){return e==null?null:Ub(e)}function Ub(e){if(typeof e!="function")throw new Error;return e}function Op(){return 0}function Zm(e){return function(){return e}}function aMe(e){return Math.sqrt(e.value)}function d2t(){var e=null,t=1,r=1,n=Op;function i(o){return o.x=t/2,o.y=r/2,e?o.eachBefore(f2t(e)).eachAfter(Jj(n,.5)).eachBefore(p2t(1)):o.eachBefore(f2t(aMe)).eachAfter(Jj(Op,1)).eachAfter(Jj(n,o.r/Math.min(t,r))).eachBefore(p2t(Math.min(t,r)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(e=h2t(o),i):e},i.size=function(o){return arguments.length?(t=+o[0],r=+o[1],i):[t,r]},i.padding=function(o){return arguments.length?(n=typeof o=="function"?o:Zm(+o),i):n},i}function f2t(e){return function(t){t.children||(t.r=Math.max(0,+e(t)||0))}}function Jj(e,t){return function(r){if(n=r.children){var n,i,o=n.length,a=e(r)*t||0,s;if(a)for(i=0;i<o;++i)n[i].r+=a;if(s=Zj(n),a)for(i=0;i<o;++i)n[i].r-=a;r.r=s+a}}}function p2t(e){return function(t){var r=t.parent;t.r*=e,r&&(t.x=r.x+e*t.x,t.y=r.y+e*t.y)}}function n8(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Uh(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(n-t)/e.value;++s<l;)a=o[s],a.y0=r,a.y1=i,a.x0=t,a.x1=t+=a.value*c}function m2t(){var e=1,t=1,r=0,n=!1;function i(a){var s=a.height+1;return a.x0=a.y0=r,a.x1=e,a.y1=t/s,a.eachBefore(o(t,s)),n&&a.eachBefore(n8),a}function o(a,s){return function(l){l.children&&Uh(l,l.x0,a*(l.depth+1)/s,l.x1,a*(l.depth+2)/s);var c=l.x0,u=l.y0,h=l.x1-r,f=l.y1-r;h<c&&(c=h=(c+h)/2),f<u&&(u=f=(u+f)/2),l.x0=c,l.y0=u,l.x1=h,l.y1=f}}return i.round=function(a){return arguments.length?(n=!!a,i):n},i.size=function(a){return arguments.length?(e=+a[0],t=+a[1],i):[e,t]},i.padding=function(a){return arguments.length?(r=+a,i):r},i}var g2t="$",sMe={depth:-1},_2t={};function lMe(e){return e.id}function cMe(e){return e.parentId}function y2t(){var e=lMe,t=cMe;function r(n){var i,o,a=n.length,s,l,c,u=new Array(a),h,f,p={};for(o=0;o<a;++o)i=n[o],c=u[o]=new Km(i),(h=e(i,o,n))!=null&&(h+="")&&(f=g2t+(c.id=h),p[f]=f in p?_2t:c);for(o=0;o<a;++o)if(c=u[o],h=t(n[o],o,n),h==null||!(h+="")){if(s)throw new Error("multiple roots");s=c}else{if(l=p[g2t+h],!l)throw new Error("missing: "+h);if(l===_2t)throw new Error("ambiguous: "+h);l.children?l.children.push(c):l.children=[c],c.parent=l}if(!s)throw new Error("no root");if(s.parent=sMe,s.eachBefore(function(d){d.depth=d.parent.depth+1,--a}).eachBefore($j),s.parent=null,a>0)throw new Error("cycle");return s}return r.id=function(n){return arguments.length?(e=Ub(n),r):e},r.parentId=function(n){return arguments.length?(t=Ub(n),r):t},r}function uMe(e,t){return e.parent===t.parent?1:2}function Qj(e){var t=e.children;return t?t[0]:e.t}function tX(e){var t=e.children;return t?t[t.length-1]:e.t}function hMe(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}function fMe(e){for(var t=0,r=0,n=e.children,i=n.length,o;--i>=0;)o=n[i],o.z+=t,o.m+=t,t+=o.s+(r+=o.c)}function pMe(e,t,r){return e.a.parent===t.parent?e.a:r}function i8(e,t){this._=e,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=t}i8.prototype=Object.create(Km.prototype);function dMe(e){for(var t=new i8(e,0),r,n=[t],i,o,a,s;r=n.pop();)if(o=r._.children)for(r.children=new Array(s=o.length),a=s-1;a>=0;--a)n.push(i=r.children[a]=new i8(o[a],a)),i.parent=r;return(t.parent=new i8(null,0)).children=[t],t}function v2t(){var e=uMe,t=1,r=1,n=null;function i(c){var u=dMe(c);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),n)c.eachBefore(l);else{var h=c,f=c,p=c;c.eachBefore(function(x){x.x<h.x&&(h=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var d=h===f?1:e(h,f)/2,g=d-h.x,_=t/(f.x+d+g),y=r/(p.depth||1);c.eachBefore(function(x){x.x=(x.x+g)*_,x.y=x.depth*y})}return c}function o(c){var u=c.children,h=c.parent.children,f=c.i?h[c.i-1]:null;if(u){fMe(c);var p=(u[0].z+u[u.length-1].z)/2;f?(c.z=f.z+e(c._,f._),c.m=c.z-p):c.z=p}else f&&(c.z=f.z+e(c._,f._));c.parent.A=s(c,f,c.parent.A||h[0])}function a(c){c._.x=c.z+c.parent.m,c.m+=c.parent.m}function s(c,u,h){if(u){for(var f=c,p=c,d=u,g=f.parent.children[0],_=f.m,y=p.m,x=d.m,b=g.m,S;d=tX(d),f=Qj(f),d&&f;)g=Qj(g),p=tX(p),p.a=c,S=d.z+x-f.z-_+e(d._,f._),S>0&&(hMe(pMe(d,c,h),c,S),_+=S,y+=S),x+=d.m,_+=f.m,b+=g.m,y+=p.m;d&&!tX(p)&&(p.t=d,p.m+=x-y),f&&!Qj(g)&&(g.t=f,g.m+=_-b,h=c)}return h}function l(c){c.x*=t,c.y=c.depth*r}return i.separation=function(c){return arguments.length?(e=c,i):e},i.size=function(c){return arguments.length?(n=!1,t=+c[0],r=+c[1],i):n?null:[t,r]},i.nodeSize=function(c){return arguments.length?(n=!0,t=+c[0],r=+c[1],i):n?[t,r]:null},i}function Jm(e,t,r,n,i){for(var o=e.children,a,s=-1,l=o.length,c=e.value&&(i-r)/e.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=r,a.y1=r+=a.value*c}var eX=(1+Math.sqrt(5))/2;function rX(e,t,r,n,i,o){for(var a=[],s=t.children,l,c,u=0,h=0,f=s.length,p,d,g=t.value,_,y,x,b,S,C,P;u<f;){p=i-r,d=o-n;do _=s[h++].value;while(!_&&h<f);for(y=x=_,C=Math.max(d/p,p/d)/(g*e),P=_*_*C,S=Math.max(x/P,P/y);h<f;++h){if(_+=c=s[h].value,c<y&&(y=c),c>x&&(x=c),P=_*_*C,b=Math.max(x/P,P/y),b>S){_-=c;break}S=b}a.push(l={value:_,dice:p<d,children:s.slice(u,h)}),l.dice?Uh(l,r,n,i,g?n+=d*_/g:o):Jm(l,r,n,g?r+=p*_/g:i,o),g-=_,u=h}return a}var o8=function e(t){function r(n,i,o,a,s){rX(t,n,i,o,a,s)}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(eX);function x2t(){var e=o8,t=!1,r=1,n=1,i=[0],o=Op,a=Op,s=Op,l=Op,c=Op;function u(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(h),i=[0],t&&f.eachBefore(n8),f}function h(f){var p=i[f.depth],d=f.x0+p,g=f.y0+p,_=f.x1-p,y=f.y1-p;_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),f.x0=d,f.y0=g,f.x1=_,f.y1=y,f.children&&(p=i[f.depth+1]=o(f)/2,d+=c(f)-p,g+=a(f)-p,_-=s(f)-p,y-=l(f)-p,_<d&&(d=_=(d+_)/2),y<g&&(g=y=(g+y)/2),e(f,d,g,_,y))}return u.round=function(f){return arguments.length?(t=!!f,u):t},u.size=function(f){return arguments.length?(r=+f[0],n=+f[1],u):[r,n]},u.tile=function(f){return arguments.length?(e=Ub(f),u):e},u.padding=function(f){return arguments.length?u.paddingInner(f).paddingOuter(f):u.paddingInner()},u.paddingInner=function(f){return arguments.length?(o=typeof f=="function"?f:Zm(+f),u):o},u.paddingOuter=function(f){return arguments.length?u.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):u.paddingTop()},u.paddingTop=function(f){return arguments.length?(a=typeof f=="function"?f:Zm(+f),u):a},u.paddingRight=function(f){return arguments.length?(s=typeof f=="function"?f:Zm(+f),u):s},u.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Zm(+f),u):l},u.paddingLeft=function(f){return arguments.length?(c=typeof f=="function"?f:Zm(+f),u):c},u}function b2t(e,t,r,n,i){var o=e.children,a,s=o.length,l,c=new Array(s+1);for(c[0]=l=a=0;a<s;++a)c[a+1]=l+=o[a].value;u(0,s,e.value,t,r,n,i);function u(h,f,p,d,g,_,y){if(h>=f-1){var x=o[h];x.x0=d,x.y0=g,x.x1=_,x.y1=y;return}for(var b=c[h],S=p/2+b,C=h+1,P=f-1;C<P;){var k=C+P>>>1;c[k]<S?C=k+1:P=k}S-c[C-1]<c[C]-S&&h+1<C&&--C;var O=c[C]-b,D=p-O;if(_-d>y-g){var B=(d*D+_*O)/p;u(h,C,O,d,g,B,y),u(C,f,D,B,g,_,y)}else{var I=(g*D+y*O)/p;u(h,C,O,d,g,_,I),u(C,f,D,d,I,_,y)}}}function w2t(e,t,r,n,i){(e.depth&1?Jm:Uh)(e,t,r,n,i)}var S2t=function e(t){function r(n,i,o,a,s){if((l=n._squarify)&&l.ratio===t)for(var l,c,u,h,f=-1,p,d=l.length,g=n.value;++f<d;){for(c=l[f],u=c.children,h=c.value=0,p=u.length;h<p;++h)c.value+=u[h].value;c.dice?Uh(c,i,o,a,o+=(s-o)*c.value/g):Jm(c,i,o,i+=(a-i)*c.value/g,s),g-=c.value}else n._squarify=l=rX(t,n,i,o,a,s),l.ratio=t}return r.ratio=function(n){return e((n=+n)>1?n:1)},r}(eX);function M2t(e){for(var t=-1,r=e.length,n,i=e[r-1],o=0;++t<r;)n=i,i=e[t],o+=n[1]*i[0]-n[0]*i[1];return o/2}function E2t(e){for(var t=-1,r=e.length,n=0,i=0,o,a=e[r-1],s,l=0;++t<r;)o=a,a=e[t],l+=s=o[0]*a[1]-a[0]*o[1],n+=(o[0]+a[0])*s,i+=(o[1]+a[1])*s;return l*=3,[n/l,i/l]}function T2t(e,t,r){return(t[0]-e[0])*(r[1]-e[1])-(t[1]-e[1])*(r[0]-e[0])}function mMe(e,t){return e[0]-t[0]||e[1]-t[1]}function C2t(e){for(var t=e.length,r=[0,1],n=2,i=2;i<t;++i){for(;n>1&&T2t(e[r[n-2]],e[r[n-1]],e[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function A2t(e){if((r=e.length)<3)return null;var t,r,n=new Array(r),i=new Array(r);for(t=0;t<r;++t)n[t]=[+e[t][0],+e[t][1],t];for(n.sort(mMe),t=0;t<r;++t)i[t]=[n[t][0],-n[t][1]];var o=C2t(n),a=C2t(i),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],c=[];for(t=o.length-1;t>=0;--t)c.push(e[n[o[t]][2]]);for(t=+s;t<a.length-l;++t)c.push(e[n[a[t]][2]]);return c}function P2t(e,t){for(var r=e.length,n=e[r-1],i=t[0],o=t[1],a=n[0],s=n[1],l,c,u=!1,h=0;h<r;++h)n=e[h],l=n[0],c=n[1],c>o!=s>o&&i<(a-l)*(o-c)/(s-c)+l&&(u=!u),a=l,s=c;return u}function I2t(e){for(var t=-1,r=e.length,n=e[r-1],i,o,a=n[0],s=n[1],l=0;++t<r;)i=a,o=s,n=e[t],a=n[0],s=n[1],i-=a,o-=s,l+=Math.sqrt(i*i+o*o);return l}function ac(){return Math.random()}var L2t=function e(t){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return t()*i+n}}return r.source=e,r}(ac);var a8=function e(t){function r(n,i){var o,a;return n=n==null?0:+n,i=i==null?1:+i,function(){var s;if(o!=null)s=o,o=null;else do o=t()*2-1,s=t()*2-1,a=o*o+s*s;while(!a||a>1);return n+i*s*Math.sqrt(-2*Math.log(a)/a)}}return r.source=e,r}(ac);var k2t=function e(t){function r(){var n=a8.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return r.source=e,r}(ac);var s8=function e(t){function r(n){return function(){for(var i=0,o=0;o<n;++o)i+=t();return i}}return r.source=e,r}(ac);var R2t=function e(t){function r(n){var i=s8.source(t)(n);return function(){return i()/n}}return r.source=e,r}(ac);var N2t=function e(t){function r(n){return function(){return-Math.log(1-t())/n}}return r.source=e,r}(ac);function hi(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function sc(e,t){switch(arguments.length){case 0:break;case 1:this.interpolator(e);break;default:this.interpolator(t).domain(e);break}return this}Tb();var D2t=Array.prototype,X_=D2t.map,lc=D2t.slice;var l8={name:"implicit"};function gu(){var e=Ji(),t=[],r=[],n=l8;function i(o){var a=o+"",s=e.get(a);if(!s){if(n!==l8)return n;e.set(a,s=t.push(o))}return r[(s-1)%r.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=Ji();for(var a=-1,s=o.length,l,c;++a<s;)e.has(c=(l=o[a])+"")||e.set(c,t.push(l));return i},i.range=function(o){return arguments.length?(r=lc.call(o),i):r.slice()},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return gu(t,r).unknown(n)},hi.apply(i,arguments),i}function Qm(){var e=gu().unknown(void 0),t=e.domain,r=e.range,n=[0,1],i,o,a=!1,s=0,l=0,c=.5;delete e.unknown;function u(){var h=t().length,f=n[1]<n[0],p=n[f-0],d=n[1-f];i=(d-p)/Math.max(1,h-s+l*2),a&&(i=Math.floor(i)),p+=(d-p-i*(h-s))*c,o=i*(1-s),a&&(p=Math.round(p),o=Math.round(o));var g=Ir(h).map(function(_){return p+i*_});return r(f?g.reverse():g)}return e.domain=function(h){return arguments.length?(t(h),u()):t()},e.range=function(h){return arguments.length?(n=[+h[0],+h[1]],u()):n.slice()},e.rangeRound=function(h){return n=[+h[0],+h[1]],a=!0,u()},e.bandwidth=function(){return o},e.step=function(){return i},e.round=function(h){return arguments.length?(a=!!h,u()):a},e.padding=function(h){return arguments.length?(s=Math.min(1,l=+h),u()):s},e.paddingInner=function(h){return arguments.length?(s=Math.min(1,h),u()):s},e.paddingOuter=function(h){return arguments.length?(l=+h,u()):l},e.align=function(h){return arguments.length?(c=Math.max(0,Math.min(1,h)),u()):c},e.copy=function(){return Qm(t(),n).round(a).paddingInner(s).paddingOuter(l).align(c)},hi.apply(u(),arguments)}function O2t(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return O2t(t())},e}function tg(){return O2t(Qm.apply(null,arguments).paddingInner(1))}function z2t(e){return function(){return e}}function m5(e){return+e}var F2t=[0,1];function ni(e){return e}function nX(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:z2t(isNaN(t)?NaN:.5)}function B2t(e){var t=e[0],r=e[e.length-1],n;return t>r&&(n=t,t=r,r=n),function(i){return Math.max(t,Math.min(r,i))}}function gMe(e,t,r){var n=e[0],i=e[1],o=t[0],a=t[1];return i<n?(n=nX(i,n),o=r(a,o)):(n=nX(n,i),o=r(o,a)),function(s){return o(n(s))}}function _Me(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),o=new Array(n),a=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<n;)i[a]=nX(e[a],e[a+1]),o[a]=r(t[a],t[a+1]);return function(s){var l=ys(e,s,1,n)-1;return o[l](i[l](s))}}function qh(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function $_(){var e=F2t,t=F2t,r=nc,n,i,o,a=ni,s,l,c;function u(){return s=Math.min(e.length,t.length)>2?_Me:gMe,l=c=null,h}function h(f){return isNaN(f=+f)?o:(l||(l=s(e.map(n),t,r)))(n(a(f)))}return h.invert=function(f){return a(i((c||(c=s(t,e.map(n),zi)))(f)))},h.domain=function(f){return arguments.length?(e=X_.call(f,m5),a===ni||(a=B2t(e)),u()):e.slice()},h.range=function(f){return arguments.length?(t=lc.call(f),u()):t.slice()},h.rangeRound=function(f){return t=lc.call(f),r=dL,u()},h.clamp=function(f){return arguments.length?(a=f?B2t(e):ni,h):a!==ni},h.interpolate=function(f){return arguments.length?(r=f,u()):r},h.unknown=function(f){return arguments.length?(o=f,h):o},function(f,p){return n=f,i=p,u()}}function g5(e,t){return $_()(e,t)}function c8(e,t,r,n){var i=tl(e,t,r),o;switch(n=Lp(n==null?",f":n),n.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(o=ok(i,a))&&(n.precision=o),WE(n,a)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(o=ak(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=o-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(o=ik(i))&&(n.precision=o-(n.type==="%")*2);break}}return xn(n)}function il(e){var t=e.domain;return e.ticks=function(r){var n=t();return ab(n[0],n[n.length-1],r==null?10:r)},e.tickFormat=function(r,n){var i=t();return c8(i[0],i[i.length-1],r==null?10:r,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,o=n.length-1,a=n[i],s=n[o],l;return s<a&&(l=a,a=s,s=l,l=i,i=o,o=l),l=x_(a,s,r),l>0?(a=Math.floor(a/l)*l,s=Math.ceil(s/l)*l,l=x_(a,s,r)):l<0&&(a=Math.ceil(a*l)/l,s=Math.floor(s*l)/l,l=x_(a,s,r)),l>0?(n[i]=Math.floor(a/l)*l,n[o]=Math.ceil(s/l)*l,t(n)):l<0&&(n[i]=Math.ceil(a*l)/l,n[o]=Math.floor(s*l)/l,t(n)),e},e}function On(){var e=g5(ni,ni);return e.copy=function(){return qh(e,On())},hi.apply(e,arguments),il(e)}function u8(e){var t;function r(n){return isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=X_.call(n,m5),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return u8(e).unknown(t)},e=arguments.length?X_.call(e,m5):[0,1],il(r)}function h8(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],o=e[n],a;return o<i&&(a=r,r=n,n=a,a=i,i=o,o=a),e[r]=t.floor(i),e[n]=t.ceil(o),e}function H2t(e){return Math.log(e)}function V2t(e){return Math.exp(e)}function yMe(e){return-Math.log(-e)}function vMe(e){return-Math.exp(-e)}function xMe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function bMe(e){return e===10?xMe:e===Math.E?Math.exp:function(t){return Math.pow(e,t)}}function wMe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),function(t){return Math.log(t)/e})}function U2t(e){return function(t){return-e(-t)}}function _5(e){var t=e(H2t,V2t),r=t.domain,n=10,i,o;function a(){return i=wMe(n),o=bMe(n),r()[0]<0?(i=U2t(i),o=U2t(o),e(yMe,vMe)):e(H2t,V2t),t}return t.base=function(s){return arguments.length?(n=+s,a()):n},t.domain=function(s){return arguments.length?(r(s),a()):r()},t.ticks=function(s){var l=r(),c=l[0],u=l[l.length-1],h;(h=u<c)&&(f=c,c=u,u=f);var f=i(c),p=i(u),d,g,_,y=s==null?10:+s,x=[];if(!(n%1)&&p-f<y){if(f=Math.round(f)-1,p=Math.round(p)+1,c>0){for(;f<p;++f)for(g=1,d=o(f);g<n;++g)if(_=d*g,!(_<c)){if(_>u)break;x.push(_)}}else for(;f<p;++f)for(g=n-1,d=o(f);g>=1;--g)if(_=d*g,!(_<c)){if(_>u)break;x.push(_)}}else x=ab(f,p,Math.min(p-f,y)).map(o);return h?x.reverse():x},t.tickFormat=function(s,l){if(l==null&&(l=n===10?".0e":","),typeof l!="function"&&(l=xn(l)),s===1/0)return l;s==null&&(s=10);var c=Math.max(1,n*s/t.ticks().length);return function(u){var h=u/o(Math.round(i(u)));return h*n<n-.5&&(h*=n),h<=c?l(u):""}},t.nice=function(){return r(h8(r(),{floor:function(s){return o(Math.floor(i(s)))},ceil:function(s){return o(Math.ceil(i(s)))}}))},t}function cc(){var e=_5($_()).domain([1,10]);return e.copy=function(){return qh(e,cc()).base(e.base())},hi.apply(e,arguments),e}function q2t(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function G2t(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function y5(e){var t=1,r=e(q2t(t),G2t(t));return r.constant=function(n){return arguments.length?e(q2t(t=+n),G2t(t)):t},il(r)}function f8(){var e=y5($_());return e.copy=function(){return qh(e,f8()).constant(e.constant())},hi.apply(e,arguments)}function W2t(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function SMe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function MMe(e){return e<0?-e*e:e*e}function v5(e){var t=e(ni,ni),r=1;function n(){return r===1?e(ni,ni):r===.5?e(SMe,MMe):e(W2t(r),W2t(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},il(t)}function K_(){var e=v5($_());return e.copy=function(){return qh(e,K_()).exponent(e.exponent())},hi.apply(e,arguments),e}function Y2t(){return K_.apply(null,arguments).exponent(.5)}function eg(){var e=[],t=[],r=[],n;function i(){var a=0,s=Math.max(1,t.length);for(r=new Array(s-1);++a<s;)r[a-1]=sa(e,a/s);return o}function o(a){return isNaN(a=+a)?n:t[ys(r,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(var s=0,l=a.length,c;s<l;++s)c=a[s],c!=null&&!isNaN(c=+c)&&e.push(c);return e.sort(oa),i()},o.range=function(a){return arguments.length?(t=lc.call(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(n=a,o):n},o.quantiles=function(){return r.slice()},o.copy=function(){return eg().domain(e).range(t).unknown(n)},hi.apply(o,arguments)}function qb(){var e=0,t=1,r=1,n=[.5],i=[0,1],o;function a(l){return l<=l?i[ys(n,l,0,r)]:o}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return a}return a.domain=function(l){return arguments.length?(e=+l[0],t=+l[1],s()):[e,t]},a.range=function(l){return arguments.length?(r=(i=lc.call(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return n.slice()},a.copy=function(){return qb().domain([e,t]).range(i).unknown(o)},hi.apply(il(a),arguments)}function p8(){var e=[.5],t=[0,1],r,n=1;function i(o){return o<=o?t[ys(e,o,0,n)]:r}return i.domain=function(o){return arguments.length?(e=lc.call(o),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=lc.call(o),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return p8().domain(e).range(t).unknown(r)},hi.apply(i,arguments)}var iX=new Date,oX=new Date;function br(e,t,r,n){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=function(o){return e(o=new Date(+o)),o},i.ceil=function(o){return e(o=new Date(o-1)),t(o,1),e(o),o},i.round=function(o){var a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=function(o,a){return t(o=new Date(+o),a==null?1:Math.floor(a)),o},i.range=function(o,a,s){var l=[],c;if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=function(o){return br(function(a){if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},function(a,s){if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););})},r&&(i.count=function(o,a){return iX.setTime(+o),oX.setTime(+a),e(iX),e(oX),Math.floor(r(iX,oX))},i.every=function(o){return o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(n?function(a){return n(a)%o===0}:function(a){return i.count(0,a)%o===0}):i}),i}var d8=br(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});d8.every=function(e){return e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?br(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):d8};var Z_=d8,aX=d8.range;var J_=1e3,uc=6e4,Gb=36e5,m8=864e5,g8=6048e5;var j2t=br(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+t*J_)},function(e,t){return(t-e)/J_},function(e){return e.getUTCSeconds()}),Q_=j2t,sX=j2t.range;var X2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*J_)},function(e,t){e.setTime(+e+t*uc)},function(e,t){return(t-e)/uc},function(e){return e.getMinutes()}),_8=X2t,$2t=X2t.range;var K2t=br(function(e){e.setTime(e-e.getMilliseconds()-e.getSeconds()*J_-e.getMinutes()*uc)},function(e,t){e.setTime(+e+t*Gb)},function(e,t){return(t-e)/Gb},function(e){return e.getHours()}),y8=K2t,Z2t=K2t.range;var J2t=br(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*uc)/m8},function(e){return e.getDate()-1}),ty=J2t,Q2t=J2t.range;function ey(e){return br(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(t,r){t.setDate(t.getDate()+r*7)},function(t,r){return(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*uc)/g8})}var rg=ey(0),ry=ey(1),lX=ey(2),cX=ey(3),zp=ey(4),uX=ey(5),hX=ey(6),fX=rg.range,twt=ry.range,ewt=lX.range,rwt=cX.range,nwt=zp.range,iwt=uX.range,owt=hX.range;var awt=br(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),v8=awt,swt=awt.range;var pX=br(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});pX.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:br(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)})};var Gh=pX,lwt=pX.range;var cwt=br(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*uc)},function(e,t){return(t-e)/uc},function(e){return e.getUTCMinutes()}),x8=cwt,uwt=cwt.range;var hwt=br(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+t*Gb)},function(e,t){return(t-e)/Gb},function(e){return e.getUTCHours()}),b8=hwt,fwt=hwt.range;var pwt=br(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/m8},function(e){return e.getUTCDate()-1}),ny=pwt,dwt=pwt.range;function iy(e){return br(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCDate(t.getUTCDate()+r*7)},function(t,r){return(r-t)/g8})}var ng=iy(0),oy=iy(1),dX=iy(2),mX=iy(3),Fp=iy(4),gX=iy(5),_X=iy(6),yX=ng.range,mwt=oy.range,gwt=dX.range,_wt=mX.range,ywt=Fp.range,vwt=gX.range,xwt=_X.range;var bwt=br(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),w8=bwt,wwt=bwt.range;var vX=br(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});vX.every=function(e){return!isFinite(e=Math.floor(e))||!(e>0)?null:br(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)})};var Wh=vX,Swt=vX.range;function xX(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bX(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function x5(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function S5(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=b5(i),u=w5(i),h=b5(o),f=w5(o),p=b5(a),d=w5(a),g=b5(s),_=w5(s),y=b5(l),x=w5(l),b={a:W,A:Z,b:rt,B:ot,c:null,d:Pwt,e:Pwt,f:jMe,g:nEe,G:oEe,H:GMe,I:WMe,j:YMe,L:Nwt,m:XMe,M:$Me,p:st,q:St,Q:kwt,s:Rwt,S:KMe,u:ZMe,U:JMe,V:QMe,w:tEe,W:eEe,x:null,X:null,y:rEe,Y:iEe,Z:aEe,"%":Lwt},S={a:bt,A:Mt,b:lt,B:Kt,c:null,d:Iwt,e:Iwt,f:uEe,g:xEe,G:wEe,H:sEe,I:lEe,j:cEe,L:Owt,m:hEe,M:fEe,p:_t,q:ct,Q:kwt,s:Rwt,S:pEe,u:dEe,U:mEe,V:gEe,w:_Ee,W:yEe,x:null,X:null,y:vEe,Y:bEe,Z:SEe,"%":Lwt},C={a:B,A:I,b:L,B:R,c:F,d:Cwt,e:Cwt,f:HMe,g:Twt,G:Ewt,H:Awt,I:Awt,j:OMe,L:BMe,m:DMe,M:zMe,p:D,q:NMe,Q:UMe,s:qMe,S:FMe,u:PMe,U:IMe,V:LMe,w:AMe,W:kMe,x:z,X:U,y:Twt,Y:Ewt,Z:RMe,"%":VMe};b.x=P(r,b),b.X=P(n,b),b.c=P(t,b),S.x=P(r,S),S.X=P(n,S),S.c=P(t,S);function P(X,et){return function(dt){var q=[],pt=-1,ht=0,wt=X.length,kt,ie,ee;for(dt instanceof Date||(dt=new Date(+dt));++pt<wt;)X.charCodeAt(pt)===37&&(q.push(X.slice(ht,pt)),(ie=Mwt[kt=X.charAt(++pt)])!=null?kt=X.charAt(++pt):ie=kt==="e"?" ":"0",(ee=et[kt])&&(kt=ee(dt,ie)),q.push(kt),ht=pt+1);return q.push(X.slice(ht,pt)),q.join("")}}function k(X,et){return function(dt){var q=x5(1900,void 0,1),pt=O(q,X,dt+="",0),ht,wt;if(pt!=dt.length)return null;if("Q"in q)return new Date(q.Q);if("s"in q)return new Date(q.s*1e3+("L"in q?q.L:0));if(et&&!("Z"in q)&&(q.Z=0),"p"in q&&(q.H=q.H%12+q.p*12),q.m===void 0&&(q.m="q"in q?q.q:0),"V"in q){if(q.V<1||q.V>53)return null;"w"in q||(q.w=1),"Z"in q?(ht=bX(x5(q.y,0,1)),wt=ht.getUTCDay(),ht=wt>4||wt===0?oy.ceil(ht):oy(ht),ht=ny.offset(ht,(q.V-1)*7),q.y=ht.getUTCFullYear(),q.m=ht.getUTCMonth(),q.d=ht.getUTCDate()+(q.w+6)%7):(ht=xX(x5(q.y,0,1)),wt=ht.getDay(),ht=wt>4||wt===0?ry.ceil(ht):ry(ht),ht=ty.offset(ht,(q.V-1)*7),q.y=ht.getFullYear(),q.m=ht.getMonth(),q.d=ht.getDate()+(q.w+6)%7)}else("W"in q||"U"in q)&&("w"in q||(q.w="u"in q?q.u%7:"W"in q?1:0),wt="Z"in q?bX(x5(q.y,0,1)).getUTCDay():xX(x5(q.y,0,1)).getDay(),q.m=0,q.d="W"in q?(q.w+6)%7+q.W*7-(wt+5)%7:q.w+q.U*7-(wt+6)%7);return"Z"in q?(q.H+=q.Z/100|0,q.M+=q.Z%100,bX(q)):xX(q)}}function O(X,et,dt,q){for(var pt=0,ht=et.length,wt=dt.length,kt,ie;pt<ht;){if(q>=wt)return-1;if(kt=et.charCodeAt(pt++),kt===37){if(kt=et.charAt(pt++),ie=C[kt in Mwt?et.charAt(pt++):kt],!ie||(q=ie(X,dt,q))<0)return-1}else if(kt!=dt.charCodeAt(q++))return-1}return q}function D(X,et,dt){var q=c.exec(et.slice(dt));return q?(X.p=u[q[0].toLowerCase()],dt+q[0].length):-1}function B(X,et,dt){var q=p.exec(et.slice(dt));return q?(X.w=d[q[0].toLowerCase()],dt+q[0].length):-1}function I(X,et,dt){var q=h.exec(et.slice(dt));return q?(X.w=f[q[0].toLowerCase()],dt+q[0].length):-1}function L(X,et,dt){var q=y.exec(et.slice(dt));return q?(X.m=x[q[0].toLowerCase()],dt+q[0].length):-1}function R(X,et,dt){var q=g.exec(et.slice(dt));return q?(X.m=_[q[0].toLowerCase()],dt+q[0].length):-1}function F(X,et,dt){return O(X,t,et,dt)}function z(X,et,dt){return O(X,r,et,dt)}function U(X,et,dt){return O(X,n,et,dt)}function W(X){return a[X.getDay()]}function Z(X){return o[X.getDay()]}function rt(X){return l[X.getMonth()]}function ot(X){return s[X.getMonth()]}function st(X){return i[+(X.getHours()>=12)]}function St(X){return 1+~~(X.getMonth()/3)}function bt(X){return a[X.getUTCDay()]}function Mt(X){return o[X.getUTCDay()]}function lt(X){return l[X.getUTCMonth()]}function Kt(X){return s[X.getUTCMonth()]}function _t(X){return i[+(X.getUTCHours()>=12)]}function ct(X){return 1+~~(X.getUTCMonth()/3)}return{format:function(X){var et=P(X+="",b);return et.toString=function(){return X},et},parse:function(X){var et=k(X+="",!1);return et.toString=function(){return X},et},utcFormat:function(X){var et=P(X+="",S);return et.toString=function(){return X},et},utcParse:function(X){var et=k(X+="",!0);return et.toString=function(){return X},et}}}var Mwt={"-":"",_:" ",0:"0"},xo=/^\s*\d+/,EMe=/^%/,TMe=/[\\^$*+?|[\]().{}]/g;function Br(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",o=i.length;return n+(o<r?new Array(r-o+1).join(t)+i:i)}function CMe(e){return e.replace(TMe,"\\$&")}function b5(e){return new RegExp("^(?:"+e.map(CMe).join("|")+")","i")}function w5(e){for(var t={},r=-1,n=e.length;++r<n;)t[e[r].toLowerCase()]=r;return t}function AMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function PMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function IMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function LMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function kMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function Ewt(e,t,r){var n=xo.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function Twt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function RMe(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function NMe(e,t,r){var n=xo.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function DMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Cwt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function OMe(e,t,r){var n=xo.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Awt(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function zMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function FMe(e,t,r){var n=xo.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function BMe(e,t,r){var n=xo.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function HMe(e,t,r){var n=xo.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function VMe(e,t,r){var n=EMe.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function UMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function qMe(e,t,r){var n=xo.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Pwt(e,t){return Br(e.getDate(),t,2)}function GMe(e,t){return Br(e.getHours(),t,2)}function WMe(e,t){return Br(e.getHours()%12||12,t,2)}function YMe(e,t){return Br(1+ty.count(Gh(e),e),t,3)}function Nwt(e,t){return Br(e.getMilliseconds(),t,3)}function jMe(e,t){return Nwt(e,t)+"000"}function XMe(e,t){return Br(e.getMonth()+1,t,2)}function $Me(e,t){return Br(e.getMinutes(),t,2)}function KMe(e,t){return Br(e.getSeconds(),t,2)}function ZMe(e){var t=e.getDay();return t===0?7:t}function JMe(e,t){return Br(rg.count(Gh(e)-1,e),t,2)}function Dwt(e){var t=e.getDay();return t>=4||t===0?zp(e):zp.ceil(e)}function QMe(e,t){return e=Dwt(e),Br(zp.count(Gh(e),e)+(Gh(e).getDay()===4),t,2)}function tEe(e){return e.getDay()}function eEe(e,t){return Br(ry.count(Gh(e)-1,e),t,2)}function rEe(e,t){return Br(e.getFullYear()%100,t,2)}function nEe(e,t){return e=Dwt(e),Br(e.getFullYear()%100,t,2)}function iEe(e,t){return Br(e.getFullYear()%1e4,t,4)}function oEe(e,t){var r=e.getDay();return e=r>=4||r===0?zp(e):zp.ceil(e),Br(e.getFullYear()%1e4,t,4)}function aEe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Br(t/60|0,"0",2)+Br(t%60,"0",2)}function Iwt(e,t){return Br(e.getUTCDate(),t,2)}function sEe(e,t){return Br(e.getUTCHours(),t,2)}function lEe(e,t){return Br(e.getUTCHours()%12||12,t,2)}function cEe(e,t){return Br(1+ny.count(Wh(e),e),t,3)}function Owt(e,t){return Br(e.getUTCMilliseconds(),t,3)}function uEe(e,t){return Owt(e,t)+"000"}function hEe(e,t){return Br(e.getUTCMonth()+1,t,2)}function fEe(e,t){return Br(e.getUTCMinutes(),t,2)}function pEe(e,t){return Br(e.getUTCSeconds(),t,2)}function dEe(e){var t=e.getUTCDay();return t===0?7:t}function mEe(e,t){return Br(ng.count(Wh(e)-1,e),t,2)}function zwt(e){var t=e.getUTCDay();return t>=4||t===0?Fp(e):Fp.ceil(e)}function gEe(e,t){return e=zwt(e),Br(Fp.count(Wh(e),e)+(Wh(e).getUTCDay()===4),t,2)}function _Ee(e){return e.getUTCDay()}function yEe(e,t){return Br(oy.count(Wh(e)-1,e),t,2)}function vEe(e,t){return Br(e.getUTCFullYear()%100,t,2)}function xEe(e,t){return e=zwt(e),Br(e.getUTCFullYear()%100,t,2)}function bEe(e,t){return Br(e.getUTCFullYear()%1e4,t,4)}function wEe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Fp(e):Fp.ceil(e),Br(e.getUTCFullYear()%1e4,t,4)}function SEe(){return"+0000"}function Lwt(){return"%"}function kwt(e){return+e}function Rwt(e){return Math.floor(+e/1e3)}var Wb,M5,wX,ay,E5;S8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function S8(e){return Wb=S5(e),M5=Wb.format,wX=Wb.parse,ay=Wb.utcFormat,E5=Wb.utcParse,Wb}var SX="%Y-%m-%dT%H:%M:%S.%LZ";function MEe(e){return e.toISOString()}var EEe=Date.prototype.toISOString?MEe:ay(SX),Fwt=EEe;function TEe(e){var t=new Date(e);return isNaN(t)?null:t}var CEe=+new Date("2000-01-01T00:00:00.000Z")?TEe:E5(SX),Bwt=CEe;var T5=1e3,C5=T5*60,A5=C5*60,P5=A5*24,AEe=P5*7,Hwt=P5*30,MX=P5*365;function PEe(e){return new Date(e)}function IEe(e){return e instanceof Date?+e:+new Date(+e)}function M8(e,t,r,n,i,o,a,s,l){var c=g5(ni,ni),u=c.invert,h=c.domain,f=l(".%L"),p=l(":%S"),d=l("%I:%M"),g=l("%I %p"),_=l("%a %d"),y=l("%b %d"),x=l("%B"),b=l("%Y"),S=[[a,1,T5],[a,5,5*T5],[a,15,15*T5],[a,30,30*T5],[o,1,C5],[o,5,5*C5],[o,15,15*C5],[o,30,30*C5],[i,1,A5],[i,3,3*A5],[i,6,6*A5],[i,12,12*A5],[n,1,P5],[n,2,2*P5],[r,1,AEe],[t,1,Hwt],[t,3,3*Hwt],[e,1,MX]];function C(k){return(a(k)<k?f:o(k)<k?p:i(k)<k?d:n(k)<k?g:t(k)<k?r(k)<k?_:y:e(k)<k?x:b)(k)}function P(k,O,D,B){if(k==null&&(k=10),typeof k=="number"){var I=Math.abs(D-O)/k,L=ob(function(R){return R[2]}).right(S,I);L===S.length?(B=tl(O/MX,D/MX,k),k=e):L?(L=S[I/S[L-1][2]<S[L][2]/I?L-1:L],B=L[1],k=L[0]):(B=Math.max(tl(O,D,k),1),k=s)}return B==null?k:k.every(B)}return c.invert=function(k){return new Date(u(k))},c.domain=function(k){return arguments.length?h(X_.call(k,IEe)):h().map(PEe)},c.ticks=function(k,O){var D=h(),B=D[0],I=D[D.length-1],L=I<B,R;return L&&(R=B,B=I,I=R),R=P(k,B,I,O),R=R?R.range(B,I+1):[],L?R.reverse():R},c.tickFormat=function(k,O){return O==null?C:l(O)},c.nice=function(k,O){var D=h();return(k=P(k,D[0],D[D.length-1],O))?h(h8(D,k)):c},c.copy=function(){return qh(c,M8(e,t,r,n,i,o,a,s,l))},c}function Yb(){return hi.apply(M8(Gh,v8,rg,ty,y8,_8,Q_,Z_,M5).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Vwt(){return hi.apply(M8(Wh,w8,ng,ny,b8,x8,Q_,Z_,ay).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function E8(){var e=0,t=1,r,n,i,o,a=ni,s=!1,l;function c(u){return isNaN(u=+u)?l:a(i===0?.5:(u=(o(u)-r)*i,s?Math.max(0,Math.min(1,u)):u))}return c.domain=function(u){return arguments.length?(r=o(e=+u[0]),n=o(t=+u[1]),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(u){return arguments.length?(s=!!u,c):s},c.interpolator=function(u){return arguments.length?(a=u,c):a},c.unknown=function(u){return arguments.length?(l=u,c):l},function(u){return o=u,r=u(e),n=u(t),i=r===n?0:1/(n-r),c}}function Bp(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function T8(){var e=il(E8()(ni));return e.copy=function(){return Bp(e,T8())},sc.apply(e,arguments)}function EX(){var e=_5(E8()).domain([1,10]);return e.copy=function(){return Bp(e,EX()).base(e.base())},sc.apply(e,arguments)}function TX(){var e=y5(E8());return e.copy=function(){return Bp(e,TX()).constant(e.constant())},sc.apply(e,arguments)}function C8(){var e=v5(E8());return e.copy=function(){return Bp(e,C8()).exponent(e.exponent())},sc.apply(e,arguments)}function Uwt(){return C8.apply(null,arguments).exponent(.5)}function A8(){var e=[],t=ni;function r(n){if(!isNaN(n=+n))return t((ys(e,n)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var i=0,o=n.length,a;i<o;++i)a=n[i],a!=null&&!isNaN(a=+a)&&e.push(a);return e.sort(oa),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return A8(t).domain(e)},sc.apply(r,arguments)}function P8(){var e=0,t=.5,r=1,n,i,o,a,s,l=ni,c,u=!1,h;function f(p){return isNaN(p=+p)?h:(p=.5+((p=+c(p))-i)*(p<i?a:s),l(u?Math.max(0,Math.min(1,p)):p))}return f.domain=function(p){return arguments.length?(n=c(e=+p[0]),i=c(t=+p[1]),o=c(r=+p[2]),a=n===i?0:.5/(i-n),s=i===o?0:.5/(o-i),f):[e,t,r]},f.clamp=function(p){return arguments.length?(u=!!p,f):u},f.interpolator=function(p){return arguments.length?(l=p,f):l},f.unknown=function(p){return arguments.length?(h=p,f):h},function(p){return c=p,n=p(e),i=p(t),o=p(r),a=n===i?0:.5/(i-n),s=i===o?0:.5/(o-i),f}}function I8(){var e=il(P8()(ni));return e.copy=function(){return Bp(e,I8())},sc.apply(e,arguments)}function CX(){var e=_5(P8()).domain([.1,1,10]);return e.copy=function(){return Bp(e,CX()).base(e.base())},sc.apply(e,arguments)}function AX(){var e=y5(P8());return e.copy=function(){return Bp(e,AX()).constant(e.constant())},sc.apply(e,arguments)}function L8(){var e=v5(P8());return e.copy=function(){return Bp(e,L8()).exponent(e.exponent())},sc.apply(e,arguments)}function qwt(){return L8.apply(null,arguments).exponent(.5)}function te(e){for(var t=e.length/6|0,r=new Array(t),n=0;n<t;)r[n]="#"+e.slice(n*6,++n*6);return r}var jb=te("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var Gwt=te("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var Wwt=te("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var Ywt=te("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var jwt=te("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var Xwt=te("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var $wt=te("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var Kwt=te("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var Zwt=te("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var Jwt=te("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");function Ie(e){return uL(e[e.length-1])}var PX=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(te),Qwt=Ie(PX);var IX=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(te),tSt=Ie(IX);var LX=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(te),eSt=Ie(LX);var kX=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(te),rSt=Ie(kX);var RX=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(te),nSt=Ie(RX);var NX=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(te),iSt=Ie(NX);var DX=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(te),oSt=Ie(DX);var OX=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(te),aSt=Ie(OX);var zX=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(te),sSt=Ie(zX);var FX=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(te),lSt=Ie(FX);var BX=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(te),cSt=Ie(BX);var HX=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(te),uSt=Ie(HX);var VX=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(te),hSt=Ie(VX);var UX=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(te),fSt=Ie(UX);var qX=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(te),pSt=Ie(qX);var GX=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(te),dSt=Ie(GX);var WX=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(te),mSt=Ie(WX);var YX=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(te),gSt=Ie(YX);var jX=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(te),_St=Ie(jX);var XX=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(te),ySt=Ie(XX);var $X=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(te),vSt=Ie($X);var KX=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(te),xSt=Ie(KX);var ZX=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(te),bSt=Ie(ZX);var JX=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(te),wSt=Ie(JX);var QX=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(te),SSt=Ie(QX);var t$=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(te),MSt=Ie(t$);var e$=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(te),ESt=Ie(e$);function TSt(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-e*(35.34-e*(2381.73-e*(6402.7-e*(7024.72-e*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+e*(170.73+e*(52.82-e*(131.46-e*(176.58-e*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+e*(442.36-e*(2482.43-e*(6167.24-e*(6614.94-e*2475.67)))))))+")"}var CSt=E_(la(300,.5,0),la(-240,.5,1));var ASt=E_(la(-100,.75,.35),la(80,1.5,.8)),PSt=E_(la(260,.75,.35),la(80,1.5,.8)),k8=la();function ISt(e){(e<0||e>1)&&(e-=Math.floor(e));var t=Math.abs(e-.5);return k8.h=360*e-100,k8.s=1.5-1.5*t,k8.l=.8-.9*t,k8+""}var R8=cu(),LEe=Math.PI/3,kEe=Math.PI*2/3;function LSt(e){var t;return e=(.5-e)*Math.PI,R8.r=255*(t=Math.sin(e))*t,R8.g=255*(t=Math.sin(e+LEe))*t,R8.b=255*(t=Math.sin(e+kEe))*t,R8+""}function kSt(e){return e=Math.max(0,Math.min(1,e)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+e*(1172.33-e*(10793.56-e*(33300.12-e*(38394.49-e*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+e*(557.33+e*(1225.33-e*(3574.96-e*(1073.77+e*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+e*(3211.1-e*(15327.97-e*(27814-e*(22569.18-e*6838.66)))))))+")"}function N8(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var RSt=N8(te("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),NSt=N8(te("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),DSt=N8(te("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),OSt=N8(te("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function qe(e){return function(){return e}}var r$=Math.abs,Bo=Math.atan2,ig=Math.cos,zSt=Math.max,D8=Math.min,_u=Math.sin,sy=Math.sqrt,bo=1e-12,yu=Math.PI,I5=yu/2,hc=2*yu;function FSt(e){return e>1?0:e<-1?yu:Math.acos(e)}function n$(e){return e>=1?I5:e<=-1?-I5:Math.asin(e)}function REe(e){return e.innerRadius}function NEe(e){return e.outerRadius}function DEe(e){return e.startAngle}function OEe(e){return e.endAngle}function zEe(e){return e&&e.padAngle}function FEe(e,t,r,n,i,o,a,s){var l=r-e,c=n-t,u=a-i,h=s-o,f=h*l-u*c;if(!(f*f<bo))return f=(u*(t-o)-h*(e-i))/f,[e+f*l,t+f*c]}function O8(e,t,r,n,i,o,a){var s=e-r,l=t-n,c=(a?o:-o)/sy(s*s+l*l),u=c*l,h=-c*s,f=e+u,p=t+h,d=r+u,g=n+h,_=(f+d)/2,y=(p+g)/2,x=d-f,b=g-p,S=x*x+b*b,C=i-o,P=f*g-d*p,k=(b<0?-1:1)*sy(zSt(0,C*C*S-P*P)),O=(P*b-x*k)/S,D=(-P*x-b*k)/S,B=(P*b+x*k)/S,I=(-P*x+b*k)/S,L=O-_,R=D-y,F=B-_,z=I-y;return L*L+R*R>F*F+z*z&&(O=B,D=I),{cx:O,cy:D,x01:-u,y01:-h,x11:O*(i/C-1),y11:D*(i/C-1)}}function BSt(){var e=REe,t=NEe,r=qe(0),n=null,i=DEe,o=OEe,a=zEe,s=null;function l(){var c,u,h=+e.apply(this,arguments),f=+t.apply(this,arguments),p=i.apply(this,arguments)-I5,d=o.apply(this,arguments)-I5,g=r$(d-p),_=d>p;if(s||(s=c=bs()),f<h&&(u=f,f=h,h=u),!(f>bo))s.moveTo(0,0);else if(g>hc-bo)s.moveTo(f*ig(p),f*_u(p)),s.arc(0,0,f,p,d,!_),h>bo&&(s.moveTo(h*ig(d),h*_u(d)),s.arc(0,0,h,d,p,_));else{var y=p,x=d,b=p,S=d,C=g,P=g,k=a.apply(this,arguments)/2,O=k>bo&&(n?+n.apply(this,arguments):sy(h*h+f*f)),D=D8(r$(f-h)/2,+r.apply(this,arguments)),B=D,I=D,L,R;if(O>bo){var F=n$(O/h*_u(k)),z=n$(O/f*_u(k));(C-=F*2)>bo?(F*=_?1:-1,b+=F,S-=F):(C=0,b=S=(p+d)/2),(P-=z*2)>bo?(z*=_?1:-1,y+=z,x-=z):(P=0,y=x=(p+d)/2)}var U=f*ig(y),W=f*_u(y),Z=h*ig(S),rt=h*_u(S);if(D>bo){var ot=f*ig(x),st=f*_u(x),St=h*ig(b),bt=h*_u(b),Mt;if(g<yu&&(Mt=FEe(U,W,St,bt,ot,st,Z,rt))){var lt=U-Mt[0],Kt=W-Mt[1],_t=ot-Mt[0],ct=st-Mt[1],X=1/_u(FSt((lt*_t+Kt*ct)/(sy(lt*lt+Kt*Kt)*sy(_t*_t+ct*ct)))/2),et=sy(Mt[0]*Mt[0]+Mt[1]*Mt[1]);B=D8(D,(h-et)/(X-1)),I=D8(D,(f-et)/(X+1))}}P>bo?I>bo?(L=O8(St,bt,U,W,f,I,_),R=O8(ot,st,Z,rt,f,I,_),s.moveTo(L.cx+L.x01,L.cy+L.y01),I<D?s.arc(L.cx,L.cy,I,Bo(L.y01,L.x01),Bo(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,I,Bo(L.y01,L.x01),Bo(L.y11,L.x11),!_),s.arc(0,0,f,Bo(L.cy+L.y11,L.cx+L.x11),Bo(R.cy+R.y11,R.cx+R.x11),!_),s.arc(R.cx,R.cy,I,Bo(R.y11,R.x11),Bo(R.y01,R.x01),!_))):(s.moveTo(U,W),s.arc(0,0,f,y,x,!_)):s.moveTo(U,W),!(h>bo)||!(C>bo)?s.lineTo(Z,rt):B>bo?(L=O8(Z,rt,ot,st,h,-B,_),R=O8(U,W,St,bt,h,-B,_),s.lineTo(L.cx+L.x01,L.cy+L.y01),B<D?s.arc(L.cx,L.cy,B,Bo(L.y01,L.x01),Bo(R.y01,R.x01),!_):(s.arc(L.cx,L.cy,B,Bo(L.y01,L.x01),Bo(L.y11,L.x11),!_),s.arc(0,0,h,Bo(L.cy+L.y11,L.cx+L.x11),Bo(R.cy+R.y11,R.cx+R.x11),_),s.arc(R.cx,R.cy,B,Bo(R.y11,R.x11),Bo(R.y01,R.x01),!_))):s.arc(0,0,h,S,b,_)}if(s.closePath(),c)return s=null,c+""||null}return l.centroid=function(){var c=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,u=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-yu/2;return[ig(u)*c,_u(u)*c]},l.innerRadius=function(c){return arguments.length?(e=typeof c=="function"?c:qe(+c),l):e},l.outerRadius=function(c){return arguments.length?(t=typeof c=="function"?c:qe(+c),l):t},l.cornerRadius=function(c){return arguments.length?(r=typeof c=="function"?c:qe(+c),l):r},l.padRadius=function(c){return arguments.length?(n=c==null?null:typeof c=="function"?c:qe(+c),l):n},l.startAngle=function(c){return arguments.length?(i=typeof c=="function"?c:qe(+c),l):i},l.endAngle=function(c){return arguments.length?(o=typeof c=="function"?c:qe(+c),l):o},l.padAngle=function(c){return arguments.length?(a=typeof c=="function"?c:qe(+c),l):a},l.context=function(c){return arguments.length?(s=c==null?null:c,l):s},l}function HSt(e){this._context=e}HSt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Yh(e){return new HSt(e)}function Xb(e){return e[0]}function $b(e){return e[1]}function vu(){var e=Xb,t=$b,r=qe(!0),n=null,i=Yh,o=null;function a(s){var l,c=s.length,u,h=!1,f;for(n==null&&(o=i(f=bs())),l=0;l<=c;++l)!(l<c&&r(u=s[l],l,s))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+e(u,l,s),+t(u,l,s));if(f)return o=null,f+""||null}return a.x=function(s){return arguments.length?(e=typeof s=="function"?s:qe(+s),a):e},a.y=function(s){return arguments.length?(t=typeof s=="function"?s:qe(+s),a):t},a.defined=function(s){return arguments.length?(r=typeof s=="function"?s:qe(!!s),a):r},a.curve=function(s){return arguments.length?(i=s,n!=null&&(o=i(n)),a):i},a.context=function(s){return arguments.length?(s==null?n=o=null:o=i(n=s),a):n},a}function z8(){var e=Xb,t=null,r=qe(0),n=$b,i=qe(!0),o=null,a=Yh,s=null;function l(u){var h,f,p,d=u.length,g,_=!1,y,x=new Array(d),b=new Array(d);for(o==null&&(s=a(y=bs())),h=0;h<=d;++h){if(!(h<d&&i(g=u[h],h,u))===_)if(_=!_)f=h,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),p=h-1;p>=f;--p)s.point(x[p],b[p]);s.lineEnd(),s.areaEnd()}_&&(x[h]=+e(g,h,u),b[h]=+r(g,h,u),s.point(t?+t(g,h,u):x[h],n?+n(g,h,u):b[h]))}if(y)return s=null,y+""||null}function c(){return vu().defined(i).curve(a).context(o)}return l.x=function(u){return arguments.length?(e=typeof u=="function"?u:qe(+u),t=null,l):e},l.x0=function(u){return arguments.length?(e=typeof u=="function"?u:qe(+u),l):e},l.x1=function(u){return arguments.length?(t=u==null?null:typeof u=="function"?u:qe(+u),l):t},l.y=function(u){return arguments.length?(r=typeof u=="function"?u:qe(+u),n=null,l):r},l.y0=function(u){return arguments.length?(r=typeof u=="function"?u:qe(+u),l):r},l.y1=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:qe(+u),l):n},l.lineX0=l.lineY0=function(){return c().x(e).y(r)},l.lineY1=function(){return c().x(e).y(n)},l.lineX1=function(){return c().x(t).y(r)},l.defined=function(u){return arguments.length?(i=typeof u=="function"?u:qe(!!u),l):i},l.curve=function(u){return arguments.length?(a=u,o!=null&&(s=a(o)),l):a},l.context=function(u){return arguments.length?(u==null?o=s=null:s=a(o=u),l):o},l}function VSt(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function USt(e){return e}function qSt(){var e=USt,t=VSt,r=null,n=qe(0),i=qe(hc),o=qe(0);function a(s){var l,c=s.length,u,h,f=0,p=new Array(c),d=new Array(c),g=+n.apply(this,arguments),_=Math.min(hc,Math.max(-hc,i.apply(this,arguments)-g)),y,x=Math.min(Math.abs(_)/c,o.apply(this,arguments)),b=x*(_<0?-1:1),S;for(l=0;l<c;++l)(S=d[p[l]=l]=+e(s[l],l,s))>0&&(f+=S);for(t!=null?p.sort(function(C,P){return t(d[C],d[P])}):r!=null&&p.sort(function(C,P){return r(s[C],s[P])}),l=0,h=f?(_-c*b)/f:0;l<c;++l,g=y)u=p[l],S=d[u],y=g+(S>0?S*h:0)+b,d[u]={data:s[u],index:l,value:S,startAngle:g,endAngle:y,padAngle:x};return d}return a.value=function(s){return arguments.length?(e=typeof s=="function"?s:qe(+s),a):e},a.sortValues=function(s){return arguments.length?(t=s,r=null,a):t},a.sort=function(s){return arguments.length?(r=s,t=null,a):r},a.startAngle=function(s){return arguments.length?(n=typeof s=="function"?s:qe(+s),a):n},a.endAngle=function(s){return arguments.length?(i=typeof s=="function"?s:qe(+s),a):i},a.padAngle=function(s){return arguments.length?(o=typeof s=="function"?s:qe(+s),a):o},a}var F8=Kb(Yh);function GSt(e){this._curve=e}GSt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Kb(e){function t(r){return new GSt(e(r))}return t._curve=e,t}function Zb(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(r){return arguments.length?t(Kb(r)):t()._curve},e}function i$(){return Zb(vu().curve(F8))}function o$(){var e=z8().curve(F8),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,o=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Zb(r())},delete e.lineX0,e.lineEndAngle=function(){return Zb(n())},delete e.lineX1,e.lineInnerRadius=function(){return Zb(i())},delete e.lineY0,e.lineOuterRadius=function(){return Zb(o())},delete e.lineY1,e.curve=function(a){return arguments.length?t(Kb(a)):t()._curve},e}function ly(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var L5=Array.prototype.slice;function BEe(e){return e.source}function HEe(e){return e.target}function a$(e){var t=BEe,r=HEe,n=Xb,i=$b,o=null;function a(){var s,l=L5.call(arguments),c=t.apply(this,l),u=r.apply(this,l);if(o||(o=s=bs()),e(o,+n.apply(this,(l[0]=c,l)),+i.apply(this,l),+n.apply(this,(l[0]=u,l)),+i.apply(this,l)),s)return o=null,s+""||null}return a.source=function(s){return arguments.length?(t=s,a):t},a.target=function(s){return arguments.length?(r=s,a):r},a.x=function(s){return arguments.length?(n=typeof s=="function"?s:qe(+s),a):n},a.y=function(s){return arguments.length?(i=typeof s=="function"?s:qe(+s),a):i},a.context=function(s){return arguments.length?(o=s==null?null:s,a):o},a}function VEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function UEe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function qEe(e,t,r,n,i){var o=ly(t,r),a=ly(t,r=(r+i)/2),s=ly(n,r),l=ly(n,i);e.moveTo(o[0],o[1]),e.bezierCurveTo(a[0],a[1],s[0],s[1],l[0],l[1])}function WSt(){return a$(VEe)}function YSt(){return a$(UEe)}function jSt(){var e=a$(qEe);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}var k5={draw:function(e,t){var r=Math.sqrt(t/yu);e.moveTo(r,0),e.arc(0,0,r,0,hc)}};var B8={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var XSt=Math.sqrt(.3333333333333333),GEe=XSt*2,H8={draw:function(e,t){var r=Math.sqrt(t/GEe),n=r*XSt;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}};var WEe=.8908130915292852,$St=Math.sin(yu/10)/Math.sin(7*yu/10),YEe=Math.sin(hc/10)*$St,jEe=-Math.cos(hc/10)*$St,V8={draw:function(e,t){var r=Math.sqrt(t*WEe),n=YEe*r,i=jEe*r;e.moveTo(0,-r),e.lineTo(n,i);for(var o=1;o<5;++o){var a=hc*o/5,s=Math.cos(a),l=Math.sin(a);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}};var U8={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}};var s$=Math.sqrt(3),q8={draw:function(e,t){var r=-Math.sqrt(t/(s$*3));e.moveTo(0,r*2),e.lineTo(-s$*r,-r),e.lineTo(s$*r,-r),e.closePath()}};var fc=-.5,pc=Math.sqrt(3)/2,l$=1/Math.sqrt(12),XEe=(l$/2+1)*3,G8={draw:function(e,t){var r=Math.sqrt(t/XEe),n=r/2,i=r*l$,o=n,a=r*l$+r,s=-o,l=a;e.moveTo(n,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(fc*n-pc*i,pc*n+fc*i),e.lineTo(fc*o-pc*a,pc*o+fc*a),e.lineTo(fc*s-pc*l,pc*s+fc*l),e.lineTo(fc*n+pc*i,fc*i-pc*n),e.lineTo(fc*o+pc*a,fc*a-pc*o),e.lineTo(fc*s+pc*l,fc*l-pc*s),e.closePath()}};var KSt=[k5,B8,H8,U8,V8,q8,G8];function ZSt(){var e=qe(k5),t=qe(64),r=null;function n(){var i;if(r||(r=i=bs()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(e=typeof i=="function"?i:qe(i),n):e},n.size=function(i){return arguments.length?(t=typeof i=="function"?i:qe(+i),n):t},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}function dc(){}function Jb(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function R5(e){this._context=e}R5.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Jb(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function W8(e){return new R5(e)}function JSt(e){this._context=e}JSt.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QSt(e){return new JSt(e)}function t3t(e){this._context=e}t3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Jb(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function e3t(e){return new t3t(e)}function r3t(e,t){this._basis=new R5(e),this._beta=t}r3t.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n=e[0],i=t[0],o=e[r]-n,a=t[r]-i,s=-1,l;++s<=r;)l=s/r,this._basis.point(this._beta*e[s]+(1-this._beta)*(n+l*o),this._beta*t[s]+(1-this._beta)*(i+l*a));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var n3t=function e(t){function r(n){return t===1?new R5(n):new r3t(n,t)}return r.beta=function(n){return e(+n)},r}(.85);function Qb(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Y8(e,t){this._context=e,this._k=(1-t)/6}Y8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Qb(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var i3t=function e(t){function r(n){return new Y8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function j8(e,t){this._context=e,this._k=(1-t)/6}j8.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var o3t=function e(t){function r(n){return new j8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function X8(e,t){this._context=e,this._k=(1-t)/6}X8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qb(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var a3t=function e(t){function r(n){return new X8(n,t)}return r.tension=function(n){return e(+n)},r}(0);function N5(e,t,r){var n=e._x1,i=e._y1,o=e._x2,a=e._y2;if(e._l01_a>bo){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>bo){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);o=(o*c+e._x1*e._l23_2a-t*e._l12_2a)/u,a=(a*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,o,a,e._x2,e._y2)}function s3t(e,t){this._context=e,this._alpha=t}s3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var l3t=function e(t){function r(n){return t?new s3t(n,t):new Y8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function c3t(e,t){this._context=e,this._alpha=t}c3t.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var u3t=function e(t){function r(n){return t?new c3t(n,t):new j8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function h3t(e,t){this._context=e,this._alpha=t}h3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,n=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:N5(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var f3t=function e(t){function r(n){return t?new h3t(n,t):new X8(n,0)}return r.alpha=function(n){return e(+n)},r}(.5);function p3t(e){this._context=e}p3t.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function d3t(e){return new p3t(e)}function m3t(e){return e<0?-1:1}function g3t(e,t,r){var n=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(n||i<0&&-0),a=(r-e._y1)/(i||n<0&&-0),s=(o*i+a*n)/(n+i);return(m3t(o)+m3t(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function _3t(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function c$(e,t,r){var n=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-n)/3;e._context.bezierCurveTo(n+s,i+s*t,o-s,a-s*r,o,a)}function $8(e){this._context=e}$8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:c$(this,this._t0,_3t(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,c$(this,_3t(this,r=g3t(this,e,t)),r);break;default:c$(this,this._t0,r=g3t(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function y3t(e){this._context=new v3t(e)}(y3t.prototype=Object.create($8.prototype)).point=function(e,t){$8.prototype.point.call(this,t,e)};function v3t(e){this._context=e}v3t.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,n,i,o){this._context.bezierCurveTo(t,e,n,r,o,i)}};function x3t(e){return new $8(e)}function b3t(e){return new y3t(e)}function S3t(e){this._context=e}S3t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=w3t(e),i=w3t(t),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(n[0][o],i[0][o],n[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function w3t(e){var t,r=e.length-1,n,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/o[t-1],o[t]-=n,a[t]-=n*a[t-1];for(i[r-1]=a[r-1]/o[r-1],t=r-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function M3t(e){return new S3t(e)}function K8(e,t){this._context=e,this._t=t}K8.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function E3t(e){return new K8(e,.5)}function T3t(e){return new K8(e,0)}function C3t(e){return new K8(e,1)}function xu(e,t){if((a=e.length)>1)for(var r=1,n,i,o=e[t[0]],a,s=o.length;r<a;++r)for(i=o,o=e[t[r]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function bu(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function $Ee(e,t){return e[t]}function A3t(){var e=qe([]),t=bu,r=xu,n=$Ee;function i(o){var a=e.apply(this,arguments),s,l=o.length,c=a.length,u=new Array(c),h;for(s=0;s<c;++s){for(var f=a[s],p=u[s]=new Array(l),d=0,g;d<l;++d)p[d]=g=[0,+n(o[d],f,d,o)],g.data=o[d];p.key=f}for(s=0,h=t(u);s<c;++s)u[h[s]].index=s;return r(u,h),u}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:qe(L5.call(o)),i):e},i.value=function(o){return arguments.length?(n=typeof o=="function"?o:qe(+o),i):n},i.order=function(o){return arguments.length?(t=o==null?bu:typeof o=="function"?o:qe(L5.call(o)),i):t},i.offset=function(o){return arguments.length?(r=o==null?xu:o,i):r},i}function P3t(e,t){if((n=e.length)>0){for(var r,n,i=0,o=e[0].length,a;i<o;++i){for(a=r=0;r<n;++r)a+=e[r][i][1]||0;if(a)for(r=0;r<n;++r)e[r][i][1]/=a}xu(e,t)}}function I3t(e,t){if((l=e.length)>0)for(var r,n=0,i,o,a,s,l,c=e[t[0]].length;n<c;++n)for(a=s=0,r=0;r<l;++r)(o=(i=e[t[r]][n])[1]-i[0])>0?(i[0]=a,i[1]=a+=o):o<0?(i[1]=s,i[0]=s+=o):(i[0]=0,i[1]=o)}function L3t(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,o=n.length;r<o;++r){for(var a=0,s=0;a<i;++a)s+=e[a][r][1]||0;n[r][1]+=n[r][0]=-s/2}xu(e,t)}}function k3t(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,o,a;n<o;++n){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],h=u[n][1]||0,f=u[n-1][1]||0,p=(h-f)/2,d=0;d<s;++d){var g=e[t[d]],_=g[n][1]||0,y=g[n-1][1]||0;p+=_-y}l+=h,c+=p*h}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,xu(e,t)}}function Z8(e){var t=e.map(KEe);return bu(e).sort(function(r,n){return t[r]-t[n]})}function KEe(e){for(var t=-1,r=0,n=e.length,i,o=-1/0;++t<n;)(i=+e[t][1])>o&&(o=i,r=t);return r}function J8(e){var t=e.map(u$);return bu(e).sort(function(r,n){return t[r]-t[n]})}function u$(e){for(var t=0,r=-1,n=e.length,i;++r<n;)(i=+e[r][1])&&(t+=i);return t}function R3t(e){return J8(e).reverse()}function N3t(e){var t=e.length,r,n,i=e.map(u$),o=Z8(e),a=0,s=0,l=[],c=[];for(r=0;r<t;++r)n=o[r],a<s?(a+=i[n],l.push(n)):(s+=i[n],c.push(n));return c.reverse().concat(l)}function D3t(e){return bu(e).reverse()}function h$(e){return function(){return e}}function O3t(e){return e[0]}function z3t(e){return e[1]}function f$(){this._=null}function t2(e){e.U=e.C=e.L=e.R=e.P=e.N=null}f$.prototype={constructor:f$,insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=F3t(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(D5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,O5(this,n))):(i=n.L,i&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(O5(this,r),e=r,r=e.U),r.C=!1,n.C=!0,D5(this,n))),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t=e.U,r,n=e.L,i=e.R,o,a;if(n?i?o=F3t(i):o=n:o=i,t?t.L===e?t.L=o:t.R=o:this._=o,n&&i?(a=o.C,o.C=e.C,o.L=n,n.U=o,o!==i?(t=o.U,o.U=e.U,e=o.R,t.L=e,o.R=i,i.U=o):(o.U=t,t=o,e=o.R)):(a=e.C,e=o),e&&(e.U=t),!a){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===t.L){if(r=t.R,r.C&&(r.C=!1,t.C=!0,D5(this,t),r=t.R),r.L&&r.L.C||r.R&&r.R.C){(!r.R||!r.R.C)&&(r.L.C=!1,r.C=!0,O5(this,r),r=t.R),r.C=t.C,t.C=r.R.C=!1,D5(this,t),e=this._;break}}else if(r=t.L,r.C&&(r.C=!1,t.C=!0,O5(this,t),r=t.L),r.L&&r.L.C||r.R&&r.R.C){(!r.L||!r.L.C)&&(r.R.C=!1,r.C=!0,D5(this,r),r=t.L),r.C=t.C,t.C=r.L.C=!1,O5(this,t),e=this._;break}r.C=!0,e=t,t=t.U}while(!e.C);e&&(e.C=!1)}}};function D5(e,t){var r=t,n=t.R,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.R=n.L,r.R&&(r.R.U=r),n.L=r}function O5(e,t){var r=t,n=t.L,i=r.U;i?i.L===r?i.L=n:i.R=n:e._=n,n.U=i,r.U=n,r.L=n.R,r.L&&(r.L.U=r),n.R=r}function F3t(e){for(;e.L;)e=e.L;return e}var p$=f$;function e2(e,t,r,n){var i=[null,null],o=wo.push(i)-1;return i.left=e,i.right=t,r&&z5(i,e,t,r),n&&z5(i,t,e,n),Va[e.index].halfedges.push(o),Va[t.index].halfedges.push(o),i}function r2(e,t,r){var n=[t,r];return n.left=e,n}function z5(e,t,r,n){!e[0]&&!e[1]?(e[0]=n,e.left=t,e.right=r):e.left===r?e[1]=n:e[0]=n}function ZEe(e,t,r,n,i){var o=e[0],a=e[1],s=o[0],l=o[1],c=a[0],u=a[1],h=0,f=1,p=c-s,d=u-l,g;if(g=t-s,!(!p&&g>0)){if(g/=p,p<0){if(g<h)return;g<f&&(f=g)}else if(p>0){if(g>f)return;g>h&&(h=g)}if(g=n-s,!(!p&&g<0)){if(g/=p,p<0){if(g>f)return;g>h&&(h=g)}else if(p>0){if(g<h)return;g<f&&(f=g)}if(g=r-l,!(!d&&g>0)){if(g/=d,d<0){if(g<h)return;g<f&&(f=g)}else if(d>0){if(g>f)return;g>h&&(h=g)}if(g=i-l,!(!d&&g<0)){if(g/=d,d<0){if(g>f)return;g>h&&(h=g)}else if(d>0){if(g<h)return;g<f&&(f=g)}return!(h>0)&&!(f<1)||(h>0&&(e[0]=[s+h*p,l+h*d]),f<1&&(e[1]=[s+f*p,l+f*d])),!0}}}}}function JEe(e,t,r,n,i){var o=e[1];if(o)return!0;var a=e[0],s=e.left,l=e.right,c=s[0],u=s[1],h=l[0],f=l[1],p=(c+h)/2,d=(u+f)/2,g,_;if(f===u){if(p<t||p>=n)return;if(c>h){if(!a)a=[p,r];else if(a[1]>=i)return;o=[p,i]}else{if(!a)a=[p,i];else if(a[1]<r)return;o=[p,r]}}else if(g=(c-h)/(f-u),_=d-g*p,g<-1||g>1)if(c>h){if(!a)a=[(r-_)/g,r];else if(a[1]>=i)return;o=[(i-_)/g,i]}else{if(!a)a=[(i-_)/g,i];else if(a[1]<r)return;o=[(r-_)/g,r]}else if(u<f){if(!a)a=[t,g*t+_];else if(a[0]>=n)return;o=[n,g*n+_]}else{if(!a)a=[n,g*n+_];else if(a[0]<t)return;o=[t,g*t+_]}return e[0]=a,e[1]=o,!0}function B3t(e,t,r,n){for(var i=wo.length,o;i--;)(!JEe(o=wo[i],e,t,r,n)||!ZEe(o,e,t,r,n)||!(Math.abs(o[0][0]-o[1][0])>Hr||Math.abs(o[0][1]-o[1][1])>Hr))&&delete wo[i]}function H3t(e){return Va[e.index]={site:e,halfedges:[]}}function QEe(e,t){var r=e.site,n=t.left,i=t.right;return r===i&&(i=n,n=r),i?Math.atan2(i[1]-n[1],i[0]-n[0]):(r===n?(n=t[1],i=t[0]):(n=t[0],i=t[1]),Math.atan2(n[0]-i[0],i[1]-n[1]))}function d$(e,t){return t[+(t.left!==e.site)]}function t5e(e,t){return t[+(t.left===e.site)]}function V3t(){for(var e=0,t=Va.length,r,n,i,o;e<t;++e)if((r=Va[e])&&(o=(n=r.halfedges).length)){var a=new Array(o),s=new Array(o);for(i=0;i<o;++i)a[i]=i,s[i]=QEe(r,wo[n[i]]);for(a.sort(function(l,c){return s[c]-s[l]}),i=0;i<o;++i)s[i]=n[a[i]];for(i=0;i<o;++i)n[i]=s[i]}}function U3t(e,t,r,n){var i=Va.length,o,a,s,l,c,u,h,f,p,d,g,_,y=!0;for(o=0;o<i;++o)if(a=Va[o]){for(s=a.site,c=a.halfedges,l=c.length;l--;)wo[c[l]]||c.splice(l,1);for(l=0,u=c.length;l<u;)d=t5e(a,wo[c[l]]),g=d[0],_=d[1],h=d$(a,wo[c[++l%u]]),f=h[0],p=h[1],(Math.abs(g-f)>Hr||Math.abs(_-p)>Hr)&&(c.splice(l,0,wo.push(r2(s,d,Math.abs(g-e)<Hr&&n-_>Hr?[e,Math.abs(f-e)<Hr?p:n]:Math.abs(_-n)<Hr&&r-g>Hr?[Math.abs(p-n)<Hr?f:r,n]:Math.abs(g-r)<Hr&&_-t>Hr?[r,Math.abs(f-r)<Hr?p:t]:Math.abs(_-t)<Hr&&g-e>Hr?[Math.abs(p-t)<Hr?f:e,t]:null))-1),++u);u&&(y=!1)}if(y){var x,b,S,C=1/0;for(o=0,y=null;o<i;++o)(a=Va[o])&&(s=a.site,x=s[0]-e,b=s[1]-t,S=x*x+b*b,S<C&&(C=S,y=a));if(y){var P=[e,t],k=[e,n],O=[r,n],D=[r,t];y.halfedges.push(wo.push(r2(s=y.site,P,k))-1,wo.push(r2(s,k,O))-1,wo.push(r2(s,O,D))-1,wo.push(r2(s,D,P))-1)}}for(o=0;o<i;++o)(a=Va[o])&&(a.halfedges.length||delete Va[o])}var q3t=[],Q8;function e5e(){t2(this),this.x=this.y=this.arc=this.site=this.cy=null}function cy(e){var t=e.P,r=e.N;if(!(!t||!r)){var n=t.site,i=e.site,o=r.site;if(n!==o){var a=i[0],s=i[1],l=n[0]-a,c=n[1]-s,u=o[0]-a,h=o[1]-s,f=2*(l*h-c*u);if(!(f>=-G3t)){var p=l*l+c*c,d=u*u+h*h,g=(h*p-c*d)/f,_=(l*d-u*p)/f,y=q3t.pop()||new e5e;y.arc=e,y.site=i,y.x=g+a,y.y=(y.cy=_+s)+Math.sqrt(g*g+_*_),e.circle=y;for(var x=null,b=n2._;b;)if(y.y<b.y||y.y===b.y&&y.x<=b.x)if(b.L)b=b.L;else{x=b.P;break}else if(b.R)b=b.R;else{x=b;break}n2.insert(x,y),x||(Q8=y)}}}}function uy(e){var t=e.circle;t&&(t.P||(Q8=t.N),n2.remove(t),q3t.push(t),t2(t),e.circle=null)}var Y3t=[];function r5e(){t2(this),this.edge=this.site=this.circle=null}function W3t(e){var t=Y3t.pop()||new r5e;return t.site=e,t}function m$(e){uy(e),hy.remove(e),Y3t.push(e),t2(e)}function j3t(e){var t=e.circle,r=t.x,n=t.cy,i=[r,n],o=e.P,a=e.N,s=[e];m$(e);for(var l=o;l.circle&&Math.abs(r-l.circle.x)<Hr&&Math.abs(n-l.circle.cy)<Hr;)o=l.P,s.unshift(l),m$(l),l=o;s.unshift(l),uy(l);for(var c=a;c.circle&&Math.abs(r-c.circle.x)<Hr&&Math.abs(n-c.circle.cy)<Hr;)a=c.N,s.push(c),m$(c),c=a;s.push(c),uy(c);var u=s.length,h;for(h=1;h<u;++h)c=s[h],l=s[h-1],z5(c.edge,l.site,c.site,i);l=s[0],c=s[u-1],c.edge=e2(l.site,c.site,null,i),cy(l),cy(c)}function X3t(e){for(var t=e[0],r=e[1],n,i,o,a,s=hy._;s;)if(o=$3t(s,r)-t,o>Hr)s=s.L;else if(a=t-n5e(s,r),a>Hr){if(!s.R){n=s;break}s=s.R}else{o>-Hr?(n=s.P,i=s):a>-Hr?(n=s,i=s.N):n=i=s;break}H3t(e);var l=W3t(e);if(hy.insert(n,l),!(!n&&!i)){if(n===i){uy(n),i=W3t(n.site),hy.insert(l,i),l.edge=i.edge=e2(n.site,l.site),cy(n),cy(i);return}if(!i){l.edge=e2(n.site,l.site);return}uy(n),uy(i);var c=n.site,u=c[0],h=c[1],f=e[0]-u,p=e[1]-h,d=i.site,g=d[0]-u,_=d[1]-h,y=2*(f*_-p*g),x=f*f+p*p,b=g*g+_*_,S=[(_*x-p*b)/y+u,(f*b-g*x)/y+h];z5(i.edge,c,d,S),l.edge=e2(c,e,null,S),i.edge=e2(e,d,null,S),cy(n),cy(i)}}function $3t(e,t){var r=e.site,n=r[0],i=r[1],o=i-t;if(!o)return n;var a=e.P;if(!a)return-1/0;r=a.site;var s=r[0],l=r[1],c=l-t;if(!c)return s;var u=s-n,h=1/o-1/c,f=u/c;return h?(-f+Math.sqrt(f*f-2*h*(u*u/(-2*c)-l+c/2+i-o/2)))/h+n:(n+s)/2}function n5e(e,t){var r=e.N;if(r)return $3t(r,t);var n=e.site;return n[1]===t?n[0]:1/0}var Hr=1e-6,G3t=1e-12,hy,Va,n2,wo;function i5e(e,t,r){return(e[0]-r[0])*(t[1]-e[1])-(e[0]-t[0])*(r[1]-e[1])}function o5e(e,t){return t[1]-e[1]||t[0]-e[0]}function F5(e,t){var r=e.sort(o5e).pop(),n,i,o;for(wo=[],Va=new Array(e.length),hy=new p$,n2=new p$;;)if(o=Q8,r&&(!o||r[1]<o.y||r[1]===o.y&&r[0]<o.x))(r[0]!==n||r[1]!==i)&&(X3t(r),n=r[0],i=r[1]),r=e.pop();else if(o)j3t(o.arc);else break;if(V3t(),t){var a=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1];B3t(a,s,l,c),U3t(a,s,l,c)}this.edges=wo,this.cells=Va,hy=n2=wo=Va=null}F5.prototype={constructor:F5,polygons:function(){var e=this.edges;return this.cells.map(function(t){var r=t.halfedges.map(function(n){return d$(t,e[n])});return r.data=t.site.data,r})},triangles:function(){var e=[],t=this.edges;return this.cells.forEach(function(r,n){if(!!(s=(o=r.halfedges).length))for(var i=r.site,o,a=-1,s,l,c=t[o[s-1]],u=c.left===i?c.right:c.left;++a<s;)l=u,c=t[o[a]],u=c.left===i?c.right:c.left,l&&u&&n<l.index&&n<u.index&&i5e(i,l,u)<0&&e.push([i.data,l.data,u.data])}),e},links:function(){return this.edges.filter(function(e){return e.right}).map(function(e){return{source:e.left.data,target:e.right.data}})},find:function(e,t,r){for(var n=this,i,o=n._found||0,a=n.cells.length,s;!(s=n.cells[o]);)if(++o>=a)return null;var l=e-s.site[0],c=t-s.site[1],u=l*l+c*c;do s=n.cells[i=o],o=null,s.halfedges.forEach(function(h){var f=n.edges[h],p=f.left;if(!((p===s.site||!p)&&!(p=f.right))){var d=e-p[0],g=t-p[1],_=d*d+g*g;_<u&&(u=_,o=p.index)}});while(o!==null);return n._found=i,r==null||u<=r*r?s.site:null}};function K3t(){var e=O3t,t=z3t,r=null;function n(i){return new F5(i.map(function(o,a){var s=[Math.round(e(o,a,i)/Hr)*Hr,Math.round(t(o,a,i)/Hr)*Hr];return s.index=a,s.data=o,s}),r)}return n.polygons=function(i){return n(i).polygons()},n.links=function(i){return n(i).links()},n.triangles=function(i){return n(i).triangles()},n.x=function(i){return arguments.length?(e=typeof i=="function"?i:h$(+i),n):e},n.y=function(i){return arguments.length?(t=typeof i=="function"?i:h$(+i),n):t},n.extent=function(i){return arguments.length?(r=i==null?null:[[+i[0][0],+i[0][1]],[+i[1][0],+i[1][1]]],n):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},n.size=function(i){return arguments.length?(r=i==null?null:[[0,0],[+i[0],+i[1]]],n):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},n}km();function B5(e){return function(){return e}}function g$(e,t,r){this.target=e,this.type=t,this.transform=r}function jh(e,t,r){this.k=e,this.x=t,this.y=r}jh.prototype={constructor:jh,scale:function(e){return e===1?this:new jh(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new jh(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Xh=new jh(1,0,0);i2.prototype=jh.prototype;function i2(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Xh;return e.__zoom}function tR(){qt.stopImmediatePropagation()}function o2(){qt.preventDefault(),qt.stopImmediatePropagation()}function a5e(){return!qt.ctrlKey&&!qt.button}function s5e(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function Z3t(){return this.__zoom||Xh}function l5e(){return-qt.deltaY*(qt.deltaMode===1?.05:qt.deltaMode?1:.002)}function c5e(){return navigator.maxTouchPoints||"ontouchstart"in this}function u5e(e,t,r){var n=e.invertX(t[0][0])-r[0][0],i=e.invertX(t[1][0])-r[1][0],o=e.invertY(t[0][1])-r[0][1],a=e.invertY(t[1][1])-r[1][1];return e.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function eR(){var e=a5e,t=s5e,r=u5e,n=l5e,i=c5e,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=vL,c=vs("start","zoom","end"),u,h,f=500,p=150,d=0;function g(L){L.property("__zoom",Z3t).on("wheel.zoom",P).on("mousedown.zoom",k).on("dblclick.zoom",O).filter(i).on("touchstart.zoom",D).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",I).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(L,R,F){var z=L.selection?L.selection():L;z.property("__zoom",Z3t),L!==z?b(L,R,F):z.interrupt().each(function(){S(this,arguments).start().zoom(null,typeof R=="function"?R.apply(this,arguments):R).end()})},g.scaleBy=function(L,R,F){g.scaleTo(L,function(){var z=this.__zoom.k,U=typeof R=="function"?R.apply(this,arguments):R;return z*U},F)},g.scaleTo=function(L,R,F){g.transform(L,function(){var z=t.apply(this,arguments),U=this.__zoom,W=F==null?x(z):typeof F=="function"?F.apply(this,arguments):F,Z=U.invert(W),rt=typeof R=="function"?R.apply(this,arguments):R;return r(y(_(U,rt),W,Z),z,a)},F)},g.translateBy=function(L,R,F){g.transform(L,function(){return r(this.__zoom.translate(typeof R=="function"?R.apply(this,arguments):R,typeof F=="function"?F.apply(this,arguments):F),t.apply(this,arguments),a)})},g.translateTo=function(L,R,F,z){g.transform(L,function(){var U=t.apply(this,arguments),W=this.__zoom,Z=z==null?x(U):typeof z=="function"?z.apply(this,arguments):z;return r(Xh.translate(Z[0],Z[1]).scale(W.k).translate(typeof R=="function"?-R.apply(this,arguments):-R,typeof F=="function"?-F.apply(this,arguments):-F),U,a)},z)};function _(L,R){return R=Math.max(o[0],Math.min(o[1],R)),R===L.k?L:new jh(R,L.x,L.y)}function y(L,R,F){var z=R[0]-F[0]*L.k,U=R[1]-F[1]*L.k;return z===L.x&&U===L.y?L:new jh(L.k,z,U)}function x(L){return[(+L[0][0]+ +L[1][0])/2,(+L[0][1]+ +L[1][1])/2]}function b(L,R,F){L.on("start.zoom",function(){S(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){S(this,arguments).end()}).tween("zoom",function(){var z=this,U=arguments,W=S(z,U),Z=t.apply(z,U),rt=F==null?x(Z):typeof F=="function"?F.apply(z,U):F,ot=Math.max(Z[1][0]-Z[0][0],Z[1][1]-Z[0][1]),st=z.__zoom,St=typeof R=="function"?R.apply(z,U):R,bt=l(st.invert(rt).concat(ot/st.k),St.invert(rt).concat(ot/St.k));return function(Mt){if(Mt===1)Mt=St;else{var lt=bt(Mt),Kt=ot/lt[2];Mt=new jh(Kt,rt[0]-lt[0]*Kt,rt[1]-lt[1]*Kt)}W.zoom(null,Mt)}})}function S(L,R,F){return!F&&L.__zooming||new C(L,R)}function C(L,R){this.that=L,this.args=R,this.active=0,this.extent=t.apply(L,R),this.taps=0}C.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(L,R){return this.mouse&&L!=="mouse"&&(this.mouse[1]=R.invert(this.mouse[0])),this.touch0&&L!=="touch"&&(this.touch0[1]=R.invert(this.touch0[0])),this.touch1&&L!=="touch"&&(this.touch1[1]=R.invert(this.touch1[0])),this.that.__zoom=R,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(L){Mp(new g$(g,L,this.that.__zoom),c.apply,c,[L,this.that,this.args])}};function P(){if(!e.apply(this,arguments))return;var L=S(this,arguments),R=this.__zoom,F=Math.max(o[0],Math.min(o[1],R.k*Math.pow(2,n.apply(this,arguments)))),z=zo(this);if(L.wheel)(L.mouse[0][0]!==z[0]||L.mouse[0][1]!==z[1])&&(L.mouse[1]=R.invert(L.mouse[0]=z)),clearTimeout(L.wheel);else{if(R.k===F)return;L.mouse=[z,R.invert(z)],hu(this),L.start()}o2(),L.wheel=setTimeout(U,p),L.zoom("mouse",r(y(_(R,F),L.mouse[0],L.mouse[1]),L.extent,a));function U(){L.wheel=null,L.end()}}function k(){if(h||!e.apply(this,arguments))return;var L=S(this,arguments,!0),R=Ht(qt.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",Z,!0),F=zo(this),z=qt.clientX,U=qt.clientY;zm(qt.view),tR(),L.mouse=[F,this.__zoom.invert(F)],hu(this),L.start();function W(){if(o2(),!L.moved){var rt=qt.clientX-z,ot=qt.clientY-U;L.moved=rt*rt+ot*ot>d}L.zoom("mouse",r(y(L.that.__zoom,L.mouse[0]=zo(L.that),L.mouse[1]),L.extent,a))}function Z(){R.on("mousemove.zoom mouseup.zoom",null),Fm(qt.view,L.moved),o2(),L.end()}}function O(){if(!!e.apply(this,arguments)){var L=this.__zoom,R=zo(this),F=L.invert(R),z=L.k*(qt.shiftKey?.5:2),U=r(y(_(L,z),R,F),t.apply(this,arguments),a);o2(),s>0?Ht(this).transition().duration(s).call(b,U,R):Ht(this).call(g.transform,U)}}function D(){if(!!e.apply(this,arguments)){var L=qt.touches,R=L.length,F=S(this,arguments,qt.changedTouches.length===R),z,U,W,Z;for(tR(),U=0;U<R;++U)W=L[U],Z=Tp(this,L,W.identifier),Z=[Z,this.__zoom.invert(Z),W.identifier],F.touch0?!F.touch1&&F.touch0[2]!==Z[2]&&(F.touch1=Z,F.taps=0):(F.touch0=Z,z=!0,F.taps=1+!!u);u&&(u=clearTimeout(u)),z&&(F.taps<2&&(u=setTimeout(function(){u=null},f)),hu(this),F.start())}}function B(){if(!!this.__zooming){var L=S(this,arguments),R=qt.changedTouches,F=R.length,z,U,W,Z;for(o2(),u&&(u=clearTimeout(u)),L.taps=0,z=0;z<F;++z)U=R[z],W=Tp(this,R,U.identifier),L.touch0&&L.touch0[2]===U.identifier?L.touch0[0]=W:L.touch1&&L.touch1[2]===U.identifier&&(L.touch1[0]=W);if(U=L.that.__zoom,L.touch1){var rt=L.touch0[0],ot=L.touch0[1],st=L.touch1[0],St=L.touch1[1],bt=(bt=st[0]-rt[0])*bt+(bt=st[1]-rt[1])*bt,Mt=(Mt=St[0]-ot[0])*Mt+(Mt=St[1]-ot[1])*Mt;U=_(U,Math.sqrt(bt/Mt)),W=[(rt[0]+st[0])/2,(rt[1]+st[1])/2],Z=[(ot[0]+St[0])/2,(ot[1]+St[1])/2]}else if(L.touch0)W=L.touch0[0],Z=L.touch0[1];else return;L.zoom("touch",r(y(U,W,Z),L.extent,a))}}function I(){if(!!this.__zooming){var L=S(this,arguments),R=qt.changedTouches,F=R.length,z,U;for(tR(),h&&clearTimeout(h),h=setTimeout(function(){h=null},f),z=0;z<F;++z)U=R[z],L.touch0&&L.touch0[2]===U.identifier?delete L.touch0:L.touch1&&L.touch1[2]===U.identifier&&delete L.touch1;if(L.touch1&&!L.touch0&&(L.touch0=L.touch1,delete L.touch1),L.touch0)L.touch0[1]=this.__zoom.invert(L.touch0[0]);else if(L.end(),L.taps===2){var W=Ht(this).on("dblclick.zoom");W&&W.apply(this,arguments)}}}return g.wheelDelta=function(L){return arguments.length?(n=typeof L=="function"?L:B5(+L),g):n},g.filter=function(L){return arguments.length?(e=typeof L=="function"?L:B5(!!L),g):e},g.touchable=function(L){return arguments.length?(i=typeof L=="function"?L:B5(!!L),g):i},g.extent=function(L){return arguments.length?(t=typeof L=="function"?L:B5([[+L[0][0],+L[0][1]],[+L[1][0],+L[1][1]]]),g):t},g.scaleExtent=function(L){return arguments.length?(o[0]=+L[0],o[1]=+L[1],g):[o[0],o[1]]},g.translateExtent=function(L){return arguments.length?(a[0][0]=+L[0][0],a[1][0]=+L[1][0],a[0][1]=+L[0][1],a[1][1]=+L[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(L){return arguments.length?(r=L,g):r},g.duration=function(L){return arguments.length?(s=+L,g):s},g.interpolate=function(L){return arguments.length?(l=L,g):l},g.on=function(){var L=c.on.apply(c,arguments);return L===c?g:L},g.clickDistance=function(L){return arguments.length?(d=(L=+L)*L,g):Math.sqrt(d)},g}var J3t=Ee(Oe(),1);var rR=class extends bp{constructor(){super(...arguments),this._experiments=[]}load(){let t=_e().experiments();return this.requestManager.request(t).then(r=>{J3t.isEqual(this._experiments,r)||(this._experiments=r,this.emitChange())})}getExperiments(){return this._experiments.slice()}},nR=new rR;var h5e={googleStandard:["#db4437","#ff7043","#f4b400","#0f9d58","#00796b","#00acc1","#4285f4","#5c6bc0","#ab47bc"],googleCool:["#9e9d24","#0f9d58","#00796b","#00acc1","#4285f4","#5c6bc0","#607d8b"],googleWarm:["#795548","#ab47bc","#f06292","#c2185b","#db4437","#ff7043","#f4b400"],googleColorBlindAssist:["#ff7043","#00ACC1","#AB47BC","#2A56C6","#0b8043","#F7CB4D","#c0ca33","#5e35b1","#A52714"],tensorboardColorBlindAssist:["#ff7043","#0077bb","#cc3311","#33bbee","#ee3377","#009988","#bbbbbb"],colorBlindAssist1:["#4477aa","#44aaaa","#aaaa44","#aa7744","#aa4455","#aa4488"],colorBlindAssist2:["#88ccee","#44aa99","#117733","#999933","#ddcc77","#cc6677","#882255","#aa4499"],colorBlindAssist3:["#332288","#6699cc","#88ccee","#44aa99","#117733","#999933","#ddcc77","#cc6677","#aa4466","#882255","#661100","#aa4499"],colorBlindAssist4:["#4477aa","#66ccee","#228833","#ccbb44","#ee6677","#aa3377","#bbbbbb"],colorBlindAssist5:["#FF6DB6","#920000","#924900","#DBD100","#24FF24","#006DDB","#490092"],mldash:["#E47EAD","#F4640D","#FAA300","#F5E636","#00A077","#0077B8","#00B7ED"]},iR=h5e.tensorboardColorBlindAssist;var _$=class{constructor(t=iR){this.palette=t,this.identifiers=Ji()}setDomain(t){return this.identifiers=Ji(),t.forEach((r,n)=>{this.identifiers.set(r,this.palette[n%this.palette.length])}),this}getColor(t){if(!this.identifiers.has(t))throw new Error(`String ${t} was not in the domain.`);return this.identifiers.get(t)}};function Q3t(e,t){let r=new _$;function n(){r.setDomain(t())}return e.addListener(n),n(),i=>r.getColor(i)}var fn=Q3t(wp,()=>wp.getRuns()),vQr=Q3t(nR,()=>nR.getExperiments().map(({name:e})=>e));var og=Ee(Oe(),1);_s({moduleName:"run-color-style",styleContent:`
    [color-class='light-blue'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-light-blue-500);
      --paper-checkbox-checked-ink-color: var(--paper-light-blue-500);
      --paper-checkbox-unchecked-color: var(--paper-light-blue-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-light-blue-900);
    }
    [color-class='red'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-red-500);
      --paper-checkbox-checked-ink-color: var(--paper-red-500);
      --paper-checkbox-unchecked-color: var(--paper-red-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-red-900);
    }
    [color-class='green'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-green-500);
      --paper-checkbox-checked-ink-color: var(--paper-green-500);
      --paper-checkbox-unchecked-color: var(--paper-green-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-green-900);
    }
    [color-class='purple'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-purple-500);
      --paper-checkbox-checked-ink-color: var(--paper-purple-500);
      --paper-checkbox-unchecked-color: var(--paper-purple-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-purple-900);
    }
    [color-class='teal'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-teal-500);
      --paper-checkbox-checked-ink-color: var(--paper-teal-500);
      --paper-checkbox-unchecked-color: var(--paper-teal-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-teal-900);
    }
    [color-class='pink'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-pink-500);
      --paper-checkbox-checked-ink-color: var(--paper-pink-500);
      --paper-checkbox-unchecked-color: var(--paper-pink-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-pink-900);
    }
    [color-class='orange'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-orange-500);
      --paper-checkbox-checked-ink-color: var(--paper-orange-500);
      --paper-checkbox-unchecked-color: var(--paper-orange-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-orange-900);
    }
    [color-class='brown'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-brown-500);
      --paper-checkbox-checked-ink-color: var(--paper-brown-500);
      --paper-checkbox-unchecked-color: var(--paper-brown-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-brown-900);
    }
    [color-class='indigo'] paper-checkbox {
      --paper-checkbox-checked-color: var(--paper-indigo-500);
      --paper-checkbox-checked-ink-color: var(--paper-indigo-500);
      --paper-checkbox-unchecked-color: var(--paper-indigo-900);
      --paper-checkbox-unchecked-ink-color: var(--paper-indigo-900);
    }
  `});var ol=class extends Gt(mt){constructor(){super(...arguments),this.names=[],this.coloring={getColor:()=>""},this.regex="",this.selectionState={},this.maxNamesToEnableByDefault=40,this._debouncedRegexChange=this._debouncedRegexChangeImpl()}_debouncedRegexChangeImpl(){var t=og.debounce(r=>{this.regex=r},150,{leading:!1});return function(){var r=this.$$("#names-regex").value;r==""?this.async(()=>{this.regex=r},30):t(r)}}get _regex(){var t=this.regex;try{return new RegExp(t)}catch(r){return null}}_setIsolatorIcon(){var i;var t=this.selectionState,r=og.filter(og.values(t)).length,n=Array.prototype.slice.call((i=this.root)==null?void 0:i.querySelectorAll(".isolator"));n.forEach(function(o){r===1&&t[o.name]?o.icon="radio-button-checked":o.icon="radio-button-unchecked"})}computeNamesMatchingRegex(t,r){let n=this._regex;return n?this.names.filter(i=>n.test(i)):this.names}computeOutSelected(t,r){var n=this.selectionState,i=this.maxNamesToEnableByDefault,o=this.namesMatchingRegex.length<=i;return this.namesMatchingRegex.filter(a=>n[a]==null?o:n[a])}synchronizeColors(t){var i,o,a,s;this._setIsolatorIcon(),((o=(i=this.root)==null?void 0:i.querySelectorAll("paper-checkbox"))!=null?o:[]).forEach(l=>{let c=this.coloring.getColor(l.name);l.updateStyles({"--paper-checkbox-checked-color":c,"--paper-checkbox-checked-ink-color":c,"--paper-checkbox-unchecked-color":c,"--paper-checkbox-unchecked-ink-color":c})}),((s=(a=this.root)==null?void 0:a.querySelectorAll(".isolator"))!=null?s:[]).forEach(l=>{let c=this.coloring.getColor(l.name);l.style.color=c}),window.requestAnimationFrame(()=>{this.updateStyles()})}_isolateName(t){var r=t.target.name,n={};this.names.forEach(function(i){n[i]=i==r}),this.selectionState=n}_checkboxChange(t){var r=t.target;let n=og.clone(this.selectionState);n[r.name]=r.checked,this.selectionState=n}_isChecked(t,r){return this.outSelected.indexOf(t)!=-1}toggleAll(){let t=this.namesMatchingRegex.some(n=>this.outSelected.includes(n)),r={};this.names.forEach(n=>{r[n]=!t}),this.selectionState=r}};ol.template=Q`
    <style include="scrollbar-style"></style>
    <style include="run-color-style"></style>

    <paper-input
      id="names-regex"
      no-label-float=""
      label="Write a regex to filter runs"
      value="[[regex]]"
      on-bind-value-changed="_debouncedRegexChange"
    ></paper-input>
    <div id="outer-container" class="scrollbar">
      <template
        is="dom-repeat"
        items="[[namesMatchingRegex]]"
        on-dom-change="synchronizeColors"
      >
        <div class="name-row">
          <div
            class="icon-container checkbox-container vertical-align-container"
          >
            <paper-checkbox
              class="checkbox vertical-align-center"
              id$="checkbox-[[item]]"
              name="[[item]]"
              checked$="[[_isChecked(item, selectionState.*)]]"
              on-change="_checkboxChange"
            ></paper-checkbox>
          </div>
          <div
            class="icon-container isolator-container vertical-align-container"
          >
            <paper-icon-button
              icon="radio-button-unchecked"
              class="isolator vertical-align-center"
              on-tap="_isolateName"
              name="[[item]]"
            ></paper-icon-button>
          </div>
          <div class="item-label-container">
            <span>[[item]]</span>
          </div>
        </div>
      </template>
    </div>
    <style>
      paper-input {
        --paper-input-container-focus-color: var(--tb-orange-strong);
        --paper-input-container-input: {
          font-size: 14px;
        }
        --paper-input-container-label: {
          font-size: 14px;
        }
      }
      :host {
        display: flex;
        flex-direction: column;
        height: 100%;
        overflow: hidden;
      }
      #outer-container {
        contain: content;
        flex-grow: 1;
        flex-shrink: 1;
        overflow-x: hidden;
        overflow-y: auto;
        width: 100%;
        will-change: transform;
        word-wrap: break-word;
      }
      .name-row {
        contain: content;
        padding-top: 5px;
        padding-bottom: 5px;
        display: flex;
        flex-direction: row;
        font-size: 13px;
        word-break: break-all; /* makes wrapping of hyperparam strings better */
      }
      .icon-container {
        flex-grow: 0;
        flex-shrink: 0;
        padding-left: 2px;
      }
      .checkbox {
        padding-left: 2px;
        width: 18px;
        height: 18px;
      }
      .isolator {
        width: 18px;
        height: 18px;
        padding: 0px;
      }
      .isolator-container {
        padding-left: 6px;
        padding-right: 3px;
      }
      .checkbox-container {
        padding-left: 2px;
      }
      .item-label-container {
        padding-left: 5px;
        flex-grow: 1;
        flex-shrink: 1;
        width: 0px; /* hack to get the flex-grow to work properly */
      }
      .tooltip-value-container {
        display: flex;
        justify-content: center;
        flex-grow: 0;
        flex-shrink: 0;
        text-align: right;
        padding-left: 2px;
      }
      .vertical-align-container {
        display: flex;
        justify-content: center;
      }
      .vertical-align-container .vertical-align-center {
        align-self: center;
      }
      .vertical-align-container .vertical-align-top {
        align-self: start;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],ol.prototype,"names",void 0);E([A({type:Object}),w("design:type",Object)],ol.prototype,"coloring",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ol.prototype,"regex",void 0);E([A({type:Array,computed:"computeNamesMatchingRegex(names.*, _regex)"}),w("design:type",Array)],ol.prototype,"namesMatchingRegex",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],ol.prototype,"selectionState",void 0);E([A({type:Array,notify:!0,computed:"computeOutSelected(namesMatchingRegex.*, selectionState.*)"}),w("design:type",Array)],ol.prototype,"outSelected",void 0);E([A({type:Number}),w("design:type",Number)],ol.prototype,"maxNamesToEnableByDefault",void 0);E([A({type:Object}),w("design:type",Object)],ol.prototype,"_debouncedRegexChange",void 0);E([Rt("regex"),w("design:type",Object),w("design:paramtypes",[])],ol.prototype,"_regex",null);E([Bt("selectionState","names"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ol.prototype,"_setIsolatorIcon",null);ol=E([yt("tf-multi-checkbox")],ol);var a2=class extends mt{get _parts(){var t=this.value,r=this.delimiterPattern;let n=[];for(;;){let i=new RegExp(r,"g");if(i.test(t),i.lastIndex===0){n.push(t);break}else n.push(t.slice(0,i.lastIndex)),t=t.slice(i.lastIndex)}return n}};a2.template=Q`
    <!--
      This ugly formatting is required to prevent spaces from slipping
      into the HTML.
    -->
    <template is="dom-repeat" items="[[_parts]]" as="part"
      >[[part]]<wbr
    /></template>
  `;E([A({type:String}),w("design:type",String)],a2.prototype,"value",void 0);E([A({type:String}),w("design:type",String)],a2.prototype,"delimiterPattern",void 0);E([Rt("value","delimiterPattern"),w("design:type",Array),w("design:paramtypes",[])],a2.prototype,"_parts",null);a2=E([yt("tf-wbr-string")],a2);var mc=class extends Gt(mt){constructor(){super(...arguments),this.runSelectionState=OW("runSelectionState",{defaultValue:{}}).call(this),this.regexInput=y_("regexInput",{defaultValue:""}).call(this),this._dataLocationClipLength=250,this._dataLocationDelimiterPattern="[/=_,-]",this.coloring={getColor:fn},this._storeRunSelectionState=zW("runSelectionState",{defaultValue:{}}),this._regexObserver=v_("regexInput",{defaultValue:""})}attached(){this._runStoreListener=wp.addListener(()=>{this.set("runs",wp.getRuns())}),this.set("runs",wp.getRuns()),this._envStoreListener=ib.addListener(()=>{this.set("dataLocation",ib.getDataLocation())}),this.set("dataLocation",ib.getDataLocation())}detached(){wp.removeListenerByKey(this._runStoreListener),ib.removeListenerByKey(this._envStoreListener)}_toggleAll(){this.$.multiCheckbox.toggleAll()}get _clippedDataLocation(){var t=this.dataLocation,r=this._dataLocationClipLength;if(t!==void 0)return t.length>r?t.substring(0,r):t}_openDataLocationDialog(t){t.preventDefault(),this.$$("#data-location-dialog").open()}_shouldShowExpandDataLocationButton(t,r){return t&&t.length>r}};mc.template=Q`
    <paper-dialog with-backdrop="" id="data-location-dialog">
      <h2>Data Location</h2>
      <tf-wbr-string
        value="[[dataLocation]]"
        delimiter-pattern="[[_dataLocationDelimiterPattern]]"
      >
      </tf-wbr-string
    ></paper-dialog>
    <div id="top-text">
      <h3 id="tooltip-help" class="tooltip-container">Runs</h3>
    </div>
    <tf-multi-checkbox
      id="multiCheckbox"
      names="[[runs]]"
      selection-state="{{runSelectionState}}"
      out-selected="{{selectedRuns}}"
      regex="{{regexInput}}"
      coloring="[[coloring]]"
    ></tf-multi-checkbox>
    <paper-button class="x-button" id="toggle-all" on-tap="_toggleAll">
      Toggle All Runs
    </paper-button>
    <template is="dom-if" if="[[dataLocation]]">
      <div id="data-location">
        <tf-wbr-string
          value="[[_clippedDataLocation]]"
          delimiter-pattern="[[_dataLocationDelimiterPattern]]"
        ></tf-wbr-string
        ><!--
          We use HTML comments to remove spaces before the ellipsis.
        --><template
          is="dom-if"
          if="[[_shouldShowExpandDataLocationButton(dataLocation, _dataLocationClipLength)]]"
          ><!--
          --><a href="" on-click="_openDataLocationDialog">…</a>
        </template>
      </div>
    </template>
    <style>
      :host {
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        padding-bottom: 10px;
      }
      #top-text {
        color: var(--tb-secondary-text-color);
        width: 100%;
        flex-grow: 0;
        flex-shrink: 0;
        padding-right: 16px;
        box-sizing: border-box;
      }
      tf-wbr-string {
        overflow-wrap: break-word;
      }
      tf-multi-checkbox {
        display: flex;
        flex-grow: 1;
        flex-shrink: 1;
        overflow: hidden;
      }
      .x-button {
        font-size: 13px;
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
      }
      #tooltip-help {
        color: var(--tb-secondary-text-color);
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }
      paper-button {
        margin-left: 0;
      }
      #data-location {
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin: 5px 0 0 0;
        max-width: 288px;
      }
    </style>
  `;E([A({type:Object,observer:"_storeRunSelectionState"}),w("design:type",Object)],mc.prototype,"runSelectionState",void 0);E([A({type:String,observer:"_regexObserver"}),w("design:type",String)],mc.prototype,"regexInput",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],mc.prototype,"selectedRuns",void 0);E([A({type:Array}),w("design:type",Array)],mc.prototype,"runs",void 0);E([A({type:String,notify:!0}),w("design:type",String)],mc.prototype,"dataLocation",void 0);E([A({type:Number}),w("design:type",Number)],mc.prototype,"_dataLocationClipLength",void 0);E([A({type:String}),w("design:type",String)],mc.prototype,"_dataLocationDelimiterPattern",void 0);E([A({type:Object}),w("design:type",Object)],mc.prototype,"coloring",void 0);E([Rt("dataLocation","_dataLocationClipLength"),w("design:type",Object),w("design:paramtypes",[])],mc.prototype,"_clippedDataLocation",null);mc=E([yt("tf-runs-selector")],mc);var an=class{constructor(){this.cancellationCount=0}cancellable(t){let r=this.cancellationCount;return n=>{let i=this.cancellationCount!==r;return t({value:n,cancelled:i})}}cancelAll(){this.cancellationCount++}};var H5=class extends Gt(mt){constructor(){super(...arguments),this.html=""}get sanitizedHtml(){return this.html}attached(){window.requestAnimationFrame(()=>{this.scopeSubtree(this.$.markdown,!0)})}};H5.template=Q`
    <div id="markdown" inner-h-t-m-l="[[sanitizedHtml]]"></div>
    <style>
      /*
       * Reduce topmost and bottommost margins from 16px to 0.3em (renders
       * at about 4.8px) to keep the layout compact. This improves the
       * appearance when there is only one line of text; standard Markdown
       * renderers will still include a \`<p>\` element.
       *
       * By targeting only the top-level, extremal elements, we preserve any
       * actual paragraph breaks and only change the padding against the
       * component edges.
       */
      #markdown > p:first-child {
        margin-top: 0.3em;
      }
      #markdown > p:last-child {
        margin-bottom: 0.3em;
      }

      /* Pleasant styles for Markdown tables. */
      #markdown table {
        border-collapse: collapse;
      }
      #markdown table th {
        font-weight: 600;
      }
      #markdown table th,
      #markdown table td {
        padding: 6px 13px;
        border: 1px solid var(--tb-ui-border, #dfe2e5);
      }
      #markdown table tr {
        background-color: inherit;
        border-top: 1px solid var(--tb-ui-border, #c6cbd1);
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],H5.prototype,"html",void 0);E([Rt("html"),w("design:type",Object),w("design:paramtypes",[])],H5.prototype,"sanitizedHtml",null);H5=E([yt("tf-markdown-view")],H5);_s({moduleName:"tf-card-heading-style",styleContent:`
    figcaption {
      width: 100%;
    }

    /** Horizontal line of labels. */
    .heading-row {
      margin-top: -4px;
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
    }

    /** Piece of text in the figure caption. */
    .heading-label {
      flex-grow: 1;
      margin-top: 4px;
      max-width: 100%;
      word-wrap: break-word;
    }

    /** Makes label show on the right. */
    .heading-right {
      flex-grow: 0;
    }
  `});function s2(e){return e?e.toString().replace(/GMT-\d+ \(([^)]+)\)/,"$1"):""}function tMt(e){let t=p5e(e);return t?Math.round((t[0]*299+t[1]*587+t[2]*114)/1e3)>125?"inherit":"#eee":"inherit"}function p5e(e){if(!e)return null;let t=e.match(/^#([0-9a-f]{1,2})([0-9a-f]{1,2})([0-9a-f]{1,2})$/);if(!t)return null;if(e.length==4)for(var r=1;r<=3;r++)t[r]=t[r]+t[r];return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}var gc=class extends mt{constructor(){super(...arguments),this.displayName=null,this.tag=null,this.run=null,this.description=null,this.color=null}_updateHeadingStyle(){this.updateStyles({"--tf-card-heading-background-color":this._runBackground,"--tf-card-heading-color":this._runColor})}_computeRunBackground(t){return t||"none"}_computeRunColor(t){return tMt(t)}get _nameLabel(){var t=this.displayName,r=this.tag;return t||r||""}get _tagLabel(){var t=this.displayName,r=this.tag;return r&&r!==t?r:""}_toggleDescriptionDialog(t){let r=this.$.descriptionDialog;r.positionTarget=t.target,r.toggle()}};gc.template=Q`
    <div class="container">
      <figcaption class="content">
        <div class="heading-row">
          <template is="dom-if" if="[[_nameLabel]]">
            <div itemprop="name" class="heading-label name">[[_nameLabel]]</div>
          </template>
          <template is="dom-if" if="[[run]]">
            <!-- Extra wrapping span needed to avoid flexbox blockification. -->
            <!-- (see flexbox spec, section 4 "Flex Items") -->
            <span>
              <span
                itemprop="run"
                id="heading-run"
                class="heading-label heading-right run"
                >[[run]]</span
              >
            </span>
          </template>
        </div>
        <template is="dom-if" if="[[_tagLabel]]">
          <div class="heading-row">
            <div class="heading-label">
              tag: <span itemprop="tag">[[_tagLabel]]</span>
            </div>
          </div>
        </template>
        <slot></slot>
      </figcaption>
      <template is="dom-if" if="[[description]]">
        <paper-icon-button
          icon="info"
          on-tap="_toggleDescriptionDialog"
          title="Show summary description"
        ></paper-icon-button>
      </template>
      <paper-dialog
        id="descriptionDialog"
        no-overlap=""
        horizontal-align="auto"
        vertical-align="auto"
      >
        <paper-dialog-scrollable>
          <tf-markdown-view html="[[description]]"></tf-markdown-view>
        </paper-dialog-scrollable>
      </paper-dialog>
    </div>
    <style include="tf-card-heading-style">
      .container {
        display: flex;
      }
      .content {
        font-size: 12px;
        flex-grow: 1;
      }
      .name {
        font-size: 14px;
      }
      .run {
        font-size: 11px;
        width: auto;
        border-radius: 3px;
        font-weight: bold;
        padding: 1px 4px 2px;
      }
      paper-icon-button {
        flex-grow: 0;
      }
      paper-dialog-scrollable {
        max-width: 640px;
      }
      #heading-run {
        background: var(--tf-card-heading-background-color);
        color: var(--tf-card-heading-color);
      }
    </style>
  `;E([A({type:String}),w("design:type",Object)],gc.prototype,"displayName",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"tag",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"run",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"description",void 0);E([A({type:String}),w("design:type",Object)],gc.prototype,"color",void 0);E([A({type:String,computed:"_computeRunBackground(color)",readOnly:!0,observer:"_updateHeadingStyle"}),w("design:type",String)],gc.prototype,"_runBackground",void 0);E([A({type:String,computed:"_computeRunColor(color)",readOnly:!0,observer:"_updateHeadingStyle"}),w("design:type",String)],gc.prototype,"_runColor",void 0);E([Rt("displayName","tag"),w("design:type",String),w("design:paramtypes",[])],gc.prototype,"_nameLabel",null);E([Rt("displayName","tag"),w("design:type",String),w("design:paramtypes",[])],gc.prototype,"_tagLabel",null);gc=E([yt("tf-card-heading")],gc);var Fi=class extends Gt(mt){constructor(){super(...arguments),this._metadataCanceller=new an,this._steps=[],this._attached=!1}get _runColor(){var t=this.run;return fn(t)}get _hasAtLeastOneStep(){var t=this._steps;return!!t&&t.length>0}get _hasMultipleSteps(){var t=this._steps;return!!t&&t.length>1}get _maxStepIndex(){var t=this._steps;return t.length-1}get _currentDatum(){var t=this._steps,r=this._stepIndex;return t[r]}get _sampleText(){var t=this.sample;return`${t+1}`}get _hasMultipleSamples(){var t=this.totalSamples;return t>1}attached(){this._attached=!0,this.reload()}_reloadOnRunTagChange(){this.reload()}reload(){if(!this._attached)return;this._metadataCanceller.cancelAll();let r=_e().pluginRoute("audio","/audio",new URLSearchParams({tag:this.tag,run:this.run,sample:String(this.sample)})),n=this._metadataCanceller.cancellable(i=>{if(i.cancelled)return;let a=i.value.map(this._createStepDatum.bind(this));this.set("_steps",a),this.set("_stepIndex",a.length-1)});this.requestManager.request(r).then(n)}_createStepDatum(t){let r=new URLSearchParams(t.query);r.append("ts",String(t.wall_time));let n=_e().pluginRouteForSrc("audio","/individualAudio",r);return{wall_time:s2(new Date(t.wall_time*1e3)),step:t.step,label:t.label,contentType:t.contentType,url:n}}};Fi.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    >
      <template is="dom-if" if="[[_hasMultipleSamples]]">
        <div class="heading-row">
          <div class="heading-label">
            sample: [[_sampleText]] of [[totalSamples]]
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep]]">
        <div class="heading-row">
          <div class="heading-label">
            step <strong>[[_currentDatum.step]]</strong>
          </div>
          <template is="dom-if" if="[[_currentDatum.wall_time]]">
            <div class="heading-label heading-right">
              [[_currentDatum.wall_time]]
            </div>
          </template>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps]]">
        <div class="heading-row">
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_maxStepIndex]]"
            max-markers="[[_maxStepIndex]]"
            snaps=""
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>
    <template is="dom-if" if="[[_hasAtLeastOneStep]]">
      <audio
        controls=""
        src$="[[_currentDatum.url]]"
        type$="[[_currentDatum.contentType]]"
      ></audio>
      <tf-markdown-view html="[[_currentDatum.label]]"></tf-markdown-view>
    </template>
    <div id="main-audio-container"></div>

    <style include="tf-card-heading-style">
      :host {
        display: block;
        width: 350px;
        height: auto;
        position: relative;
        --step-slider-knob-color: #424242;
        margin-right: 15px;
        margin-bottom: 15px;
      }

      #steps {
        height: 15px;
        margin: 0 0 0 -15px;
        width: 100%;
        box-sizing: border-box;
        padding: 0 5px; /* so the slider knob doesn't butt out */
        margin-top: 5px;
        --paper-slider-active-color: var(--step-slider-knob-color);
        --paper-slider-knob-color: var(--step-slider-knob-color);
        --paper-slider-pin-color: var(--step-slider-knob-color);
        --paper-slider-knob-start-color: var(--step-slider-knob-color);
        --paper-slider-knob-start-border-color: var(--step-slider-knob-color);
        --paper-slider-pin-start-color: var(--step-slider-knob-color);
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Fi.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Fi.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"totalSamples",void 0);E([A({type:Object}),w("design:type",Object)],Fi.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Ae)],Fi.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],Fi.prototype,"_metadataCanceller",void 0);E([A({type:Array}),w("design:type",Array)],Fi.prototype,"_steps",void 0);E([A({type:Number}),w("design:type",Number)],Fi.prototype,"_stepIndex",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Fi.prototype,"_runColor",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasAtLeastOneStep",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasMultipleSteps",null);E([Rt("_steps"),w("design:type",Number),w("design:paramtypes",[])],Fi.prototype,"_maxStepIndex",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],Fi.prototype,"_currentDatum",null);E([Rt("sample"),w("design:type",String),w("design:paramtypes",[])],Fi.prototype,"_sampleText",null);E([Rt("totalSamples"),w("design:type",Boolean),w("design:paramtypes",[])],Fi.prototype,"_hasMultipleSamples",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Fi.prototype,"_reloadOnRunTagChange",null);Fi=E([yt("tf-audio-loader")],Fi);var $h=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._tagFilter="",this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadAudio()})}_fetchTags(){let t=_e().pluginRoute("audio","/tags");return this._requestManager.request(t).then(r=>{if(fy.isEqual(r,this._runToTagInfo))return;let n=fy.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r)})}_reloadAudio(){var t;(t=this.root)==null||t.querySelectorAll("tf-audio-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=fy.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return fy.range(c).map(u=>Object.assign({},l,{sample:u,totalSamples:c}))}return o.map(l=>Object.assign({},l,{items:[].concat.apply([],l.items.map(a))}))}_tagMetadata(t,r,n){return t[r][n]}};$h.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="sidebar-section runs-selector">
          <tf-runs-selector
            id="runs-selector"
            selected-runs="{{_selectedRuns}}"
          ></tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No audio data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any audio data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-audio-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  total-samples="[[item.totalSamples]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  request-manager="[[_requestManager]]"
                ></tf-audio-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],$h.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],$h.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],$h.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],$h.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],$h.prototype,"_tagFilter",void 0);E([A({type:Object}),w("design:type",Ae)],$h.prototype,"_requestManager",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter"),w("design:type",Array),w("design:paramtypes",[])],$h.prototype,"_categories",null);$h=E([yt("tf-audio-dashboard")],$h);var V5=class extends Gt(mt){attached(){this.async(function(){this.getEffectiveChildren().forEach(function(t){this.listen(t,"tap","_selectTarget")}.bind(this))})}_selectTarget(t){this.selectedId=t.currentTarget.id}_selectedIdChanged(){var t=this.queryEffectiveChildren("#"+this.selectedId);!t||(this.getEffectiveChildren().forEach(function(r){r.classList.remove("selected")}),t.classList.add("selected"))}};V5.template=Q`
    <div id="wrap">
      <h3>[[name]]</h3>
      <div class="content-wrapper"><slot></slot></div>
    </div>
    <style>
      .content-wrapper ::slotted(*) {
        background: none;
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin-top: 10px;
      }

      .content-wrapper ::slotted(*) {
        background: none;
        color: var(--tb-ui-dark-accent);
        font-size: 13px;
        margin-top: 10px;
      }

      .content-wrapper ::slotted(.selected) {
        background-color: var(--tb-ui-dark-accent);
        color: white !important;
      }

      h3 {
        color: var(--tb-secondary-text-color);
        display: block;
        font-size: 14px;
        font-weight: normal;
        margin: 0 0 5px;
        pointer-events: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],V5.prototype,"name",void 0);E([A({type:String,notify:!0,observer:"_selectedIdChanged"}),w("design:type",String)],V5.prototype,"selectedId",void 0);V5=E([yt("tf-option-selector")],V5);function oR(e,t){let r,n={};Object.keys(e).forEach(a=>{let s=e[a];r===void 0&&(r=s.displayName),r!==s.displayName&&(r=null),n[s.description]===void 0&&(n[s.description]=[]),n[s.description].push(a)});let i=r!=null?r:t,o=(()=>{let a=Object.keys(n);return a.length===0?"":a.length===1?a[0]:`<p><strong>Multiple descriptions:</strong></p><ul>${a.map(c=>{let u=n[c].map(p=>`<code>${p.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/&/g,"&amp;")}</code>`),h=u.length>2?u.slice(0,u.length-1).join(", ")+", and "+u[u.length-1]:u.join(" and ");return`<li><p>For ${d5e(u.length,"run","runs")} ${h}:</p>${c}</li>`}).join("")}</ul>`})();return{displayName:i,description:o}}function d5e(e,t,r){return e===1?t:r}var rMt=Ee(Oe(),1);var Hp=class extends mt{constructor(){super(...arguments),this.weight=.6,this._updateWeight=rMt.debounce(function(t){this.weight=t},250)}_immediateWeightNumberForPaperSliderChanged(){this._inputWeightStringForPaperInput=this._immediateWeightNumberForPaperSlider.toString(),this._updateWeight.call(this,this._immediateWeightNumberForPaperSlider)}_inputWeightStringForPaperInputChanged(){+this._inputWeightStringForPaperInput<0?this._inputWeightStringForPaperInput="0":+this._inputWeightStringForPaperInput>1&&(this._inputWeightStringForPaperInput="1");var t=+this._inputWeightStringForPaperInput;isNaN(t)||this._updateWeight.call(this,t)}};Hp.template=Q`
    <h3 class="title">Smoothing</h3>
    <div class="smoothing-block">
      <paper-slider
        id="slider"
        immediate-value="{{_immediateWeightNumberForPaperSlider}}"
        max="[[max]]"
        min="[[min]]"
        pin
        step="[[step]]"
        type="number"
        value="{{weight}}"
      ></paper-slider>
      <paper-input
        id="input"
        label="weight"
        no-label-float
        value="{{_inputWeightStringForPaperInput}}"
        type="number"
        step="[[step]]"
        min="[[min]]"
        max="[[max]]"
      ></paper-input>
    </div>
    <style>
      .title {
        color: var(--tb-secondary-text-color);
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }

      .smoothing-block {
        display: flex;
      }

      paper-slider {
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
        flex-grow: 2;
      }

      paper-input {
        --paper-input-container-focus-color: var(--tb-orange-strong);
        --paper-input-container-input: {
          font-size: 14px;
        }
        --paper-input-container-label: {
          font-size: 14px;
        }
        width: 60px;
      }
    </style>
  `;E([A({type:Number}),w("design:type",Number)],Hp.prototype,"step",void 0);E([A({type:Number}),w("design:type",Number)],Hp.prototype,"max",void 0);E([A({type:Number}),w("design:type",Number)],Hp.prototype,"min",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],Hp.prototype,"weight",void 0);E([A({type:Number,notify:!0,observer:"_immediateWeightNumberForPaperSliderChanged"}),w("design:type",Number)],Hp.prototype,"_immediateWeightNumberForPaperSlider",void 0);E([A({type:String,notify:!0,observer:"_inputWeightStringForPaperInputChanged"}),w("design:type",String)],Hp.prototype,"_inputWeightStringForPaperInput",void 0);Hp=E([yt("tf-smoothing-input")],Hp);var Yo=Ee(Oe(),1);function Mi(e,t){let r=Object.keys(t).sort().filter(a=>t[a]!==void 0);if(!r.length)return e;let n=e.indexOf("?")!==-1?"&":"?",o=Array().concat(...r.map(a=>{let s=t[a];return(Array.isArray(s)?s:[s]).map(c=>`${a}=${m5e(c)}`)})).join("&");return e+n+o}function m5e(e){return encodeURIComponent(e).replace(/\(/g,"%28").replace(/\)/g,"%29")}var $Kt=Ee(Oe(),1),ZWn=Ee(wl(),1);var DKt=Ee(Oe(),1);var x4;(function(e){e[e.LOADING=0]="LOADING",e[e.LOADED=1]="LOADED"})(x4||(x4={}));function kS(e){return class extends e{constructor(){super(...arguments),this.loadKey="",this.dataToLoad=[],this.getDataLoadName=r=>String(r),this.dataLoading=!1,this.dataLoadedAtLeastOnce=!1,this._isConnected=!1,this._dataLoadState=new Map,this._canceller=new an,this._loadDataAsync=null,this._loadData=DKt.throttle(this._loadDataImpl,100,{leading:!0,trailing:!0})}connectedCallback(){super.connectedCallback(),this._isConnected=!0}disconnectedCallback(){super.disconnectedCallback(),this._isConnected=!1}static get properties(){return{active:{type:Boolean,observer:"_loadDataIfActive"},_isConnected:{type:Boolean},loadKey:{type:String},dataToLoad:{type:Array},getDataLoadName:{type:Object},loadDataCallback:{type:Object},requestData:{type:Object}}}static get observers(){return["_dataToLoadChanged(_isConnected, dataToLoad.*)"]}onLoadFinish(){}reload(){this._dataLoadState.clear(),this._loadData()}reset(){this._loadDataAsync!=null&&(clearTimeout(this._loadDataAsync),this._loadDataAsync=null),this._canceller&&this._canceller.cancelAll(),this._dataLoadState&&this._dataLoadState.clear(),this._isConnected&&this._loadData()}_dataToLoadChanged(){this._isConnected&&this._loadData()}detached(){this._loadDataAsync!=null&&(clearTimeout(this._loadDataAsync),this._loadDataAsync=null)}_loadDataIfActive(){this.active&&this._loadData()}_loadDataImpl(){!this.active||(this._loadDataAsync!==null&&clearTimeout(this._loadDataAsync),this._loadDataAsync=setTimeout(this._canceller.cancellable(r=>{if(r.cancelled)return;this.dataLoading=!0;let n=this.dataToLoad.filter(a=>{let s=this.getDataLoadName(a);return!this._dataLoadState.has(s)});for(let a of n){let s=this.getDataLoadName(a);this._dataLoadState.set(s,x4.LOADING)}let i=this._canceller.cancellable(a=>{if(a.cancelled)return;let{item:s,data:l}=a.value,c=this.getDataLoadName(s);this._dataLoadState.set(c,x4.LOADED),this.loadDataCallback(this,s,l)}),o=this._canceller.cancellable(a=>{if(!a.cancelled){let l=a.value,c=new Set(n.map(h=>this.getDataLoadName(h)));this.dataToLoad.some(h=>c.has(this.getDataLoadName(h)))&&this.onLoadFinish(),this._loadDataAsync=null,this.dataLoadedAtLeastOnce=!0}Array.from(this._dataLoadState.values()).includes(x4.LOADING)||(this.dataLoading=!1)});this.requestData(n,i,()=>o(void 0))})))}}}var bqe=Ee(Oe(),1),Wo=Ee(wl(),1),RS=[{character:"\u25FC",method:Wo.SymbolFactories.square},{character:"\u25C6",method:Wo.SymbolFactories.diamond},{character:"\u25B2",method:Wo.SymbolFactories.triangle},{character:"\u2605",method:Wo.SymbolFactories.star},{character:"\u271A",method:Wo.SymbolFactories.cross}],Ed;(function(e){e.STEP="step",e.RELATIVE="relative",e.WALL_TIME="wall_time"})(Ed||(Ed={}));var e0=4,wqe=4,mB=3,gB=20,_B=4,OKt=6;function Wu(e){return t=>{let r=Math.abs(t);r<1e-15&&(r=0);let n;return r>=1e4?n=xn("."+e+"~e"):r>0&&r<.01?n=xn("."+e+"~e"):n=xn("."+e+"~g"),n(t)}}var b4=xn(`.${wqe}~s`);function Xat(){let e=new Wo.Scales.Linear;e.tickGenerator(Wo.Scales.TickGenerators.integerTickGenerator());let t=new Wo.Axes.Numeric(e,"bottom");return t.formatter(b4),{scale:e,axis:t,accessor:r=>r.step}}var yB=Wo.Formatters.time("%a %b %e, %H:%M:%S");function Sqe(){let e=new Wo.Scales.Time;return{scale:e,axis:new Wo.Axes.Time(e,"bottom"),accessor:t=>t.wall_time}}var r0=(e,t,r)=>{if(e.relative!=null)return e.relative;let n=r.data(),i=n.length>0?+n[0].wall_time:0;return(+e.wall_time-i)/(60*60*1e3)},vB=e=>{let t="",r=Math.floor(e/24);e-=r*24,r&&(t+=r+"d ");let n=Math.floor(e);e-=n,e*=60,(n||r)&&(t+=n+"h ");let i=Math.floor(e);e-=i,e*=60,(i||n||r)&&(t+=i+"m ");let o=Math.floor(e);return t+o+"s"};function Mqe(){let e=new Wo.Scales.Linear;return{scale:e,axis:new Wo.Axes.Numeric(e,"bottom"),accessor:r0}}function xB(e){switch(e){case Ed.STEP:return Xat();case Ed.WALL_TIME:return Sqe();case Ed.RELATIVE:return Mqe();default:throw new Error("invalid xType: "+e)}}var zs=Ee(Oe(),1),Mn=Ee(wl(),1);var va=Ee(wl(),1);function Eqe(e){let t=[],r=e;for(;r&&r instanceof HTMLElement;)if(t.push(r),r.assignedSlot)r=r.assignedSlot;else if(r.parentElement)r=r.parentElement;else{let n=r.parentNode;n instanceof DocumentFragment?r=n.host:r=n!==r?n:null}return t}var Tqe=[1,0,0,1,0,0];function Cqe(e){let t=Eqe(e),r=Tqe,n=null;for(let i of t){let o=va.Utils.DOM.getElementTransform(i);if(o!=null){let l=i.clientWidth/2,c=i.clientHeight/2;r=va.Utils.Math.multiplyTranslate(r,[l,c]),r=va.Utils.Math.multiplyMatrix(r,va.Utils.Math.invertMatrix(o)),r=va.Utils.Math.multiplyTranslate(r,[-l,-c])}let a=i.scrollLeft,s=i.scrollTop;(n===null||i===n)&&(a-=i.offsetLeft+i.clientLeft,s-=i.offsetTop+i.clientTop,n=i.offsetParent),r=va.Utils.Math.multiplyTranslate(r,[a,s])}return r}var wB=class extends va.Utils.Translator{computePosition(t,r){let n={x:t,y:r},i=Cqe(this._rootElement);return i==null?n:va.Utils.Math.applyTransform(i,n)}},Uv=class extends va.Dispatchers.Mouse{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new wB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[Uv._DISPATCHER_KEY];return n||(n=new Uv(t),r[Uv._DISPATCHER_KEY]=n),n}},qv=class extends va.Dispatchers.Touch{constructor(t){super(t),this._eventTarget=t.root().rootElement().node(),this._translator=new wB(t.root().rootElement().node())}static getDispatcher(t){let r=t.root().rootElement(),n=r[qv._DISPATCHER_KEY];return n||(n=new qv(t),r[qv._DISPATCHER_KEY]=n),n}};va.Interaction.prototype._isInsideComponent=function(e){return 0<=e.x&&0<=e.y&&e.x<this._componentAttachedTo.width()&&e.y<this._componentAttachedTo.height()};var SB=class extends va.Interactions.Pointer{_anchor(t){let r=this;r._isAnchored=!0,r._mouseDispatcher=Uv.getDispatcher(r._componentAttachedTo),r._mouseDispatcher.onMouseMove(r._mouseMoveCallback),r._touchDispatcher=qv.getDispatcher(r._componentAttachedTo),r._touchDispatcher.onTouchStart(r._touchStartCallback)}};var zKt=Ee(Oe(),1);var Gv;(function(e){e.AUTO="auto",e.BOTTOM="bottom",e.RIGHT="right"})(Gv||(Gv={}));var Aqe={boxShadow:"0 1px 4px rgba(0, 0, 0, .3)",opacity:0,position:"fixed",willChange:"transform",zIndex:5},w4=class extends Gt(mt){constructor(){super(...arguments),this.position=Gv.AUTO,this.minDistFromEdge=15,this._styleCache=null,this._raf=null,this._tunnel=null}ready(){this._styleCache=null,this._raf=null,this._tunnel=null}attached(){this._tunnel=this._createTunnel(),this._hideOnBlur=()=>{document.hidden&&this.hide()},window.addEventListener("visibilitychange",this._hideOnBlur)}detached(){this.hide(),this._removeTunnel(this._tunnel),this._tunnel=null,window.removeEventListener("visibilitychange",this._hideOnBlur)}content(){return this._tunnel.shadowRoot}hide(){this._raf!==null&&window.cancelAnimationFrame(this._raf),this._styleCache=null,this._tunnel.style.opacity=0}updateAndPosition(t){this._raf!==null&&window.cancelAnimationFrame(this._raf),this._raf=window.requestAnimationFrame(()=>{!this.isAttached||this._repositionImpl(t)})}_repositionImpl(t){let r=this._tunnel,n=t.getBoundingClientRect(),i=r.getBoundingClientRect(),o=window.innerHeight,a=document.body.clientWidth,s=n.top,l=s+n.height,c=i.height+gB,u=null,h=Math.max(this.minDistFromEdge,n.left),f=null,p=s;this.position==Gv.RIGHT?h=n.right:(p=l+gB,a<h+i.width+this.minDistFromEdge&&(h=null,f=this.minDistFromEdge)),this.position==Gv.AUTO&&n.top-c>0&&o<n.top+n.height+c&&(p=null,u=o-s+gB);let d={contain:"content",opacity:1,left:h?`${h}px`:null,right:f?`${f}px`:null,top:p?`${p}px`:null,bottom:u?`${u}px`:null};zKt.isEqual(this._styleCache,d)||(Object.assign(r.style,d),this._styleCache=d)}_createTunnel(){if(!this.contentComponentName)throw new RangeError("Require `contentComponentName` to be a name of a Polymer component");let t=document.createElement(this.contentComponentName);return Object.assign(t.style,Aqe),document.body.appendChild(t),t}_removeTunnel(t){document.body.removeChild(t)}};E([A({type:String}),w("design:type",String)],w4.prototype,"contentComponentName",void 0);E([A({type:String}),w("design:type",String)],w4.prototype,"position",void 0);E([A({type:Number}),w("design:type",Number)],w4.prototype,"minDistFromEdge",void 0);w4=E([yt("vz-chart-tooltip")],w4);var NS=Ee(wl(),1);var HKt=1e4,VKt=.001,UKt=xn(".2~e"),Pqe=xn(".4~r"),FKt=xn(",~");function BKt(e){if(e===0)return"0";let t=Math.abs(e);return t>=HKt||t<VKt?UKt(e):Pqe(e)}var Kat={formatTick:BKt,formatShort:BKt,formatReadable(e){let t=Math.abs(e);return t>=HKt||t<VKt?UKt(e):FKt(e)},formatLong:FKt},iWn=new Intl.NumberFormat(void 0,{maximumFractionDigits:4});var oWn=xn("0.3~s"),aWn=xn(",.3~f");var Iqe=1e3,Lqe=60*Iqe,kqe=60*Lqe,Rqe=24*kqe,sWn=365*Rqe,lWn=xn(".4~");var Nqe=Yb().tickFormat(),$at,qKt={formatTick(e){return Nqe(new Date(e))},formatShort(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"})},formatReadable(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"})},formatLong(e){return new Date(e).toLocaleString($at,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})}};var Td;(function(e){e[e.LINEAR=0]="LINEAR",e[e.LOG10=1]="LOG10",e[e.TIME=2]="TIME"})(Td||(Td={}));function GKt(e){switch(e){case Td.LINEAR:return new Zat;case Td.LOG10:return new Jat;case Td.TIME:return new Qat;default:let t=e;throw new RangeError(`ScaleType ${t} not supported.`)}}var Dqe=.05,Zat=class{constructor(){this.defaultFormatter=Kat}transform(t,r,n){let[i,o]=t,a=o-i,[s,l]=r,c=l-s;return a===0?s:c/a*(n-i)+s}forward(t,r,n){return this.transform(t,r,n)}reverse(t,r,n){return this.transform(r,t,n)}niceDomain(t){let[r,n]=t;if(n<r)throw new Error("Unexpected input: min is larger than max");if(n===r)return r===0?[-1,1]:r<0?[2*r,0]:[0,2*r];let i=On(),o=(n-r+Number.EPSILON)*Dqe,[a,s]=i.domain([r-o,n+o]).nice().domain();return[a,s]}ticks(t,r){return On().domain(t).ticks(r)}isSafeNumber(t){return Number.isFinite(t)}},Jat=class{constructor(){this.defaultFormatter=Kat}transform(t){return Math.log10(t>0?t:Number.MIN_VALUE)}untransform(t){return Math.exp(t/Math.LOG10E)}forward(t,r,n){if(n<=0)return r[0];let[i,o]=t,[a,s]=r,l=this.transform(i),u=this.transform(o)-l,h=s-a;return n=this.transform(n),h/(u+Number.EPSILON)*(n-l)+a}reverse(t,r,n){let[i,o]=t,[a,s]=r,l=this.transform(i),u=this.transform(o)-l,h=s-a,f=u/(h+Number.EPSILON)*(n-a)+l;return this.untransform(f)}niceDomain(t){let[r,n]=t;if(r>n)throw new Error("Unexpected input: min is larger than max");let i=Math.max(r,Number.MIN_VALUE),o=Math.max(n,Number.MIN_VALUE);return n<=0?[Number.MIN_VALUE,1]:[Math.max(Number.MIN_VALUE,i*.5),o*2]}ticks(t,r){let n=t[0]<=0?Number.MIN_VALUE:t[0],i=t[1]<=0?Number.MIN_VALUE:t[1],o=cc().domain([n,i]).ticks(r);return o.length?o:t}isSafeNumber(t){return Number.isFinite(t)&&t>0}},Qat=class{constructor(){this.scale=Yb(),this.defaultFormatter=qKt}forward(t,r,n){return this.scale.domain(t).range(r)(n)}reverse(t,r,n){return this.scale.domain(t).range(r).invert(n).getTime()}niceDomain(t){let[r,n]=this.scale.domain(t).nice().domain();return[r.getTime(),n.getTime()]}ticks(t,r){return this.scale.domain(t).ticks(r).map(n=>n.getTime())}isSafeNumber(t){return Number.isFinite(t)}};var MB=class extends NS.Scales.Linear{constructor(){super(),this._ignoreOutlier=!1,this.padProportion(.2)}setValueProviderForDomain(t){return this._valueProviderForDomain=t,this}_niceDomain(t,r){let[n,i]=t;return GKt(Td.LINEAR).niceDomain([n,i])}_getUnboundedExtent(t){let r=this._getAllIncludedValues(t),n=this._defaultExtent();if(r.length!==0){let i=[NS.Utils.Math.min(r,n[0]),NS.Utils.Math.max(r,n[1])];n=this._niceDomain(i)}return n}_getAllIncludedValues(t=!1){let r=this._valueProviderForDomain?this._valueProviderForDomain():[];return this.extentOfValues(r)}extentOfValues(t){let r=t.filter(o=>NS.Utils.Math.isValidNumber(o)),n=r;if(this.ignoreOutlier()){let o=r.sort((l,c)=>l-c),a=sa(o,.05),s=sa(o,.95);n=r.filter(l=>l>=a&&l<=s)}let i=aa(n);return i[0]==null||i[1]==null?[]:i}ignoreOutlier(t){return typeof t=="boolean"?(this._ignoreOutlier=t,this):this._ignoreOutlier}};var CB=Ee(wl(),1);var WKt=Ee(wl(),1),EB=class extends WKt.QuantitativeScale{constructor(){super(...arguments),this._ignoreOutlier=!1}setValueProviderForDomain(t){return this._valueProviderForDomain=t,this}ignoreOutlier(t){return typeof t=="boolean"?(this._ignoreOutlier=t,this):this._ignoreOutlier}_getAllIncludedValues(t=!1){let r=this._valueProviderForDomain?this._valueProviderForDomain():[];return this.extentOfValues(r)}};var TB=Math.pow(2,-1074);function S4(e){return Math.log10(e)}function tst(e){return Math.pow(10,e)}var AB=class extends EB{constructor(){super(),this._d3LogScale=cc(),this.padProportion(.2)}scale(t){return t<=0?NaN:this._d3LogScale(t)}invert(t){return this._d3LogScale.invert(t)}scaleTransformation(t){return this.scale(t)}invertedTransformation(t){return this.invert(t)}getTransformationDomain(){return this.domain()}setTransformationDomain(t){this.domain(t)}getTransformationExtent(){return this._getUnboundedExtent(!0)}_getDomain(){return this._untransformedDomain}_setDomain(t){this._untransformedDomain=t;let[r,n]=t;super._setDomain([Math.max(TB,r),n])}_niceDomain(t,r){let[n,i]=t,o=Math.max(S4(TB),S4(n)),a=S4(i),s=a-o,l=s?s*this.padProportion():1;return[tst(Math.max(S4(TB),o-l)),tst(a+l)]}_getUnboundedExtent(t){let r=this._getAllIncludedValues(t),n=this._defaultExtent();if(r.length!==0){let i=[CB.Utils.Math.min(r,n[0]),CB.Utils.Math.max(r,n[1])];n=this._niceDomain(i)}return n}_getAllIncludedValues(t=!1){return super._getAllIncludedValues().map(n=>n>0?n:TB)}_defaultExtent(){return[1,10]}_backingScaleDomain(t){return t==null?this._d3LogScale.domain():(this._d3LogScale.domain(t),this)}_getRange(){return this._d3LogScale.range()}_setRange(t){this._d3LogScale.range(t)}defaultTicks(){return this._d3LogScale.ticks(1)}ticks(){return this._d3LogScale.ticks()}extentOfValues(t){let r=t.filter(o=>CB.Utils.Math.isValidNumber(o)&&o>0),n=r;if(this.ignoreOutlier()){let a=r.map(S4).sort((c,u)=>c-u),s=sa(a,.05),l=sa(a,.95);n=a.filter(c=>c>=s&&c<=l).map(tst)}let i=aa(n);return i[0]==null||i[1]==null?[]:i}};var Cd=Ee(wl(),1);var n0=Ee(wl(),1),PB=class extends n0.Components.SelectionBoxLayer{constructor(t,r,n){super(),this.easeFn=xs,this._animationTime=750,this.xScale(t),this.yScale(r),this._dragInteraction=new n0.Interactions.Drag,this._doubleClickInteraction=new n0.Interactions.Click,this.setupCallbacks(),this.unzoomMethod=n,this.onDetach(()=>{this._doubleClickInteraction.detachFrom(this),this._dragInteraction.detachFrom(this)}),this.onAnchor(()=>{this._doubleClickInteraction.attachTo(this),this._dragInteraction.attachTo(this)})}interactionStart(t){this.onStart=t}interactionEnd(t){this.onEnd=t}dragInteraction(){return this._dragInteraction}setupCallbacks(){let t=!1;this._dragInteraction.onDragStart(r=>{this.bounds({topLeft:r,bottomRight:r}),this.onStart()}),this._dragInteraction.onDrag((r,n)=>{this.bounds({topLeft:r,bottomRight:n}),this.boxVisible(!0),t=!0}),this._dragInteraction.onDragEnd((r,n)=>{this.boxVisible(!1),this.bounds({topLeft:r,bottomRight:n}),t?this.zoom():this.onEnd(),t=!1}),this._doubleClickInteraction.onDoubleClick(this.unzoom.bind(this))}animationTime(t){if(t==null)return this._animationTime;if(t<0)throw new Error("animationTime cannot be negative");return this._animationTime=t,this}ease(t){if(typeof t!="function")throw new Error("ease function must be a function");return(t(0)!==0||t(1)!==1)&&n0.Utils.Window.warn("Easing function does not maintain invariant f(0)==0 && f(1)==1. Bad behavior may result."),this.easeFn=t,this}zoom(){let t=this.xExtent()[0].valueOf(),r=this.xExtent()[1].valueOf(),n=this.yExtent()[1].valueOf(),i=this.yExtent()[0].valueOf();t===r||n===i||this.interpolateZoom(t,r,n,i)}unzoom(){let t=this.xScale();t._domainMin=null,t._domainMax=null;let r=t._getExtent();this.xScale().domain(r),this.unzoomMethod()}isZooming(t){this._dragInteraction.enabled(!t),this._doubleClickInteraction.enabled(!t)}interpolateZoom(t,r,n,i){let o=this.xScale().domain()[0].valueOf(),a=this.xScale().domain()[1].valueOf(),s=this.yScale().domain()[0].valueOf(),l=this.yScale().domain()[1].valueOf(),c=this.easeFn,u=(p,d,g)=>zi(p,d)(c(g));this.isZooming(!0);let h=Date.now(),f=()=>{let d=Date.now()-h,g=this._animationTime===0?1:Math.min(1,d/this._animationTime),_=u(o,t,g),y=u(a,r,g),x=u(s,n,g),b=u(l,i,g);this.xScale().domain([_,y]),this.yScale().domain([x,b]),g<1?n0.Utils.DOM.requestAnimationFramePolyfill(f):(this.onEnd(),this.isZooming(!1))};f()}};var xa;(function(e){e[e.NONE=0]="NONE",e[e.DRAG_ZOOMING=1]="DRAG_ZOOMING",e[e.PANNING=2]="PANNING"})(xa||(xa={}));var zf=class extends Cd.Components.Group{constructor(t,r,n){super(),this.state=xa.NONE,this.panStartCallback=new Cd.Utils.CallbackSet,this.panEndCallback=new Cd.Utils.CallbackSet,this.panZoom=new Cd.Interactions.PanZoom(t,r),this.panZoom.dragInteraction().mouseFilter(o=>zf.isPanKey(o)&&o.button===0),this.panZoom.wheelFilter(this.canScrollZoom),this.dragZoomLayer=new PB(t,r,n),this.dragZoomLayer.dragInteraction().mouseFilter(o=>!zf.isPanKey(o)&&o.button===0),this.append(this.dragZoomLayer);let i=this.onWheel.bind(this);this.onAnchor(()=>{this._mouseDispatcher=Cd.Dispatchers.Mouse.getDispatcher(this),this._mouseDispatcher.onWheel(i),this.panZoom.attachTo(this)}),this.onDetach(()=>{this.panZoom.detachFrom(this),this._mouseDispatcher&&(this._mouseDispatcher.offWheel(i),this._mouseDispatcher=null)}),this.panZoom.dragInteraction().onDragStart(()=>{this.state==xa.NONE&&this.setState(xa.PANNING)}),this.panZoom.dragInteraction().onDragEnd(()=>{this.state==xa.PANNING&&this.setState(xa.NONE)}),this.dragZoomLayer.dragInteraction().onDragStart(()=>{this.state==xa.NONE&&this.setState(xa.DRAG_ZOOMING)}),this.dragZoomLayer.dragInteraction().onDragEnd(()=>{this.state==xa.DRAG_ZOOMING&&this.setState(xa.NONE)})}onWheel(t,r){if(this.canScrollZoom(r))return;let n=this.element();if(!n.select(".help").empty())return;let i=n.append("div").classed("help",!0);i.append("span").text("Alt + Scroll to Zoom"),i.on("animationend",()=>void i.remove())}static isPanKey(t){return Boolean(t.altKey)||Boolean(t.shiftKey)}canScrollZoom(t){return t.altKey}setState(t){if(this.state==t)return;let r=this.state;this.state=t,this.root().removeClass(this.stateClassName(r)),this.root().addClass(this.stateClassName(t)),r==xa.PANNING&&this.panEndCallback.callCallbacks(),t==xa.PANNING&&this.panStartCallback.callCallbacks()}stateClassName(t){switch(t){case xa.PANNING:return"panning";case xa.DRAG_ZOOMING:return"drag-zooming";case xa.NONE:default:return""}}onPanStart(t){this.panStartCallback.add(t)}onPanEnd(t){this.panEndCallback.add(t)}onScrollZoom(t){this.panZoom.onZoomEnd(t)}onDragZoomStart(t){this.dragZoomLayer.interactionStart(t)}onDragZoomEnd(t){this.dragZoomLayer.interactionEnd(t)}};var IB;(function(e){e[e.TEXT=0]="TEXT",e[e.DOM=1]="DOM"})(IB||(IB={}));var Ff;(function(e){e.LOG="log",e.LINEAR="linear"})(Ff||(Ff={}));var YKt=20,DS=class{constructor(t,r,n,i,o,a,s,l,c,u,h){this.dirtyDatasets=new Set,this.seriesNames=[],this.name2datasets={},this.colorScale=i,this.tooltip=o,this.datasets=[],this._ignoreYOutliers=!1,this.lastPointsDataset=new Mn.Dataset,this.nanDataset=new Mn.Dataset,this.yValueAccessor=r,this.symbolFunction=u,this._defaultXRange=l,this._defaultYRange=c,this.tooltipColumns=a,this.buildChart(t,r,n,s,h)}buildChart(t,r,n,i,o){this.destroy();let a=t();this.xAccessor=a.accessor,this.xScale=a.scale,this.xAxis=a.axis,this.xAxis.margin(1).tickLabelPadding(3),o&&this.xAxis.formatter(o),this.yScale=DS.getYScaleFromType(n),this.yScale.setValueProviderForDomain(()=>this.getValuesForYAxisDomainCompute()),this.yAxis=new Mn.Axes.Numeric(this.yScale,"left");let s=Wu(mB);this.yAxis.margin(0).tickLabelPadding(5).formatter(s),this.yAxis.usesTextWidthApproximation(!0),this.fillArea=i;let l=new zf(this.xScale,this.yScale,()=>this.resetDomain());this.tooltipInteraction=this.createTooltipInteraction(l),this.tooltipPointsComponent=new Mn.Component;let c=this.buildPlot(this.xScale,this.yScale,i);this.gridlines=new Mn.Components.Gridlines(this.xScale,this.yScale);let u=null;n!==Ff.LOG&&(u=new Mn.Components.GuideLineLayer("horizontal"),u.scale(this.yScale).value(0));let h=new Mn.Components.GuideLineLayer("vertical");h.scale(this.xScale).value(0),this.center=new Mn.Components.Group([this.gridlines,u,h,c,this.tooltipPointsComponent,l]),this.center.addClass("main"),this.outer=new Mn.Components.Table([[this.yAxis,this.center],[null,this.xAxis]])}buildPlot(t,r,n){n&&(this.marginAreaPlot=new Mn.Plots.Area,this.marginAreaPlot.x(this.xAccessor,t),this.marginAreaPlot.y(n.higherAccessor,r),this.marginAreaPlot.y0(n.lowerAccessor),this.marginAreaPlot.attr("fill",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.marginAreaPlot.attr("fill-opacity",.3),this.marginAreaPlot.attr("stroke-width",0)),this.smoothedAccessor=c=>c.smoothed;let i=new Mn.Plots.Line;i.x(this.xAccessor,t),i.y(this.yValueAccessor,r),i.attr("stroke",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.linePlot=i,this.setupTooltips(i);let o=new Mn.Plots.Line;if(o.x(this.xAccessor,t),o.y(this.smoothedAccessor,r),o.attr("stroke",(c,u,h)=>this.colorScale.scale(h.metadata().name)),this.smoothLinePlot=o,this.symbolFunction){let c=new Mn.Plots.Scatter;c.x(this.xAccessor,t),c.y(this.yValueAccessor,r),c.attr("fill",(u,h,f)=>this.colorScale.scale(f.metadata().name)),c.attr("opacity",1),c.size(_B*2),c.symbol((u,h,f)=>this.symbolFunction(f.metadata().name)),this.markersScatterPlot=c}let a=new Mn.Plots.Scatter;a.x(this.xAccessor,t),a.y(this.yValueAccessor,r),a.attr("fill",c=>this.colorScale.scale(c.name)),a.attr("opacity",1),a.size(_B*2),a.datasets([this.lastPointsDataset]),this.scatterPlot=a;let s=new Mn.Plots.Scatter;s.x(this.xAccessor,t),s.y(c=>c.displayY,r),s.attr("fill",c=>this.colorScale.scale(c.name)),s.attr("opacity",1),s.size(OKt*2),s.datasets([this.nanDataset]),s.symbol(Mn.SymbolFactories.triangle),this.nanDisplay=s;let l=[s,a,o,i];return this.marginAreaPlot&&l.push(this.marginAreaPlot),this.markersScatterPlot&&l.push(this.markersScatterPlot),new Mn.Components.Group(l)}ignoreYOutliers(t){t!==this._ignoreYOutliers&&(this._ignoreYOutliers=t,this.updateSpecialDatasets(),this.yScale.ignoreOutlier(t),this.resetYDomain())}getValuesForYAxisDomainCompute(){let t=this.getAccessorsForComputingYRange(),r=n=>t.map(i=>n.data().map(o=>i(o,-1,n)));return zs.flattenDeep(this.datasets.map(r)).filter(isFinite)}updateSpecialDatasets(){let t=this.getYAxisAccessor(),r=this.datasets.map(o=>{let a=null,s=o.data().filter(l=>!isNaN(t(l,-1,o)));if(s.length>0){let l=s.length-1;a=s[l],a.name=o.metadata().name,a.relative=r0(a,-1,o)}return a}).filter(o=>o!=null);this.lastPointsDataset.data(r),this.markersScatterPlot&&this.markersScatterPlot.datasets(this.datasets.map(this.createSampledDatasetForMarkers));let n=o=>{let a=null,s=o.data(),l=0;for(;l<s.length&&a==null;)isNaN(t(s[l],-1,o))||(a=t(s[l],-1,o)),l++;a==null&&(a=0);let c=[];for(l=0;l<s.length;l++)isNaN(t(s[l],-1,o))?(s[l].name=o.metadata().name,s[l].displayY=a,s[l].relative=r0(s[l],-1,o),c.push(s[l])):a=t(s[l],-1,o);return c},i=zs.flatten(this.datasets.map(n));this.nanDataset.data(i)}resetDomain(){this.resetXDomain(),this.resetYDomain()}resetXDomain(){let t;if(this._defaultXRange!=null)t=this._defaultXRange;else{let r=this.xScale;r._domainMin=null,r._domainMax=null,t=r._getExtent()}this.xScale.domain(t)}resetYDomain(){this._defaultYRange!=null?this.yScale.domain(this._defaultYRange):(this.yScale.autoDomain(),this.yScale.domain(this.yScale.domain()))}getAccessorsForComputingYRange(){let t=[this.getYAxisAccessor()];return this.fillArea&&t.push(this.fillArea.lowerAccessor,this.fillArea.higherAccessor),t}getYAxisAccessor(){return this.smoothingEnabled?this.smoothedAccessor:this.yValueAccessor}createTooltipInteraction(t){let r=new SB,n=()=>{r.enabled(!1),this.hideTooltips()},i=()=>r.enabled(!0);return t.onPanStart(n),t.onDragZoomStart(n),t.onPanEnd(i),t.onDragZoomEnd(i),t.onScrollZoom(()=>this.updateTooltipContent(this._lastMousePosition)),r.onPointerMove(o=>{this._lastMousePosition=o,this.updateTooltipContent(o)}),r.onPointerExit(()=>this.hideTooltips()),r}updateTooltipContent(t){!this.linePlot||(window.cancelAnimationFrame(this._tooltipUpdateAnimationFrame),this._tooltipUpdateAnimationFrame=window.requestAnimationFrame(()=>{let r={x:t.x,y:t.y},n=this.gridlines.content().node().getBBox(),i=this.linePlot.datasets().map(l=>this.findClosestPoint(r,l)).filter(l=>Boolean(l)),o=Mn.Utils.DOM.intersectsBBox,a=i.filter(l=>o(l.x,l.y,n)||isNaN(this.yValueAccessor(l.datum,0,l.dataset))),s=a.filter(l=>!isNaN(this.yValueAccessor(l.datum,0,l.dataset)));if(i.length!==0){this.scatterPlot.attr("display","none");let l=this.tooltipPointsComponent.content().selectAll(".point").data(s,c=>c.dataset.metadata().name);l.enter().append("circle").classed("point",!0),l.attr("r",_B).attr("cx",c=>c.x).attr("cy",c=>c.y).style("stroke","none").attr("fill",c=>this.colorScale.scale(c.dataset.metadata().name)),l.exit().remove(),this.drawTooltips(a,r,this.tooltipColumns)}else this.hideTooltips()}))}hideTooltips(){window.cancelAnimationFrame(this._tooltipUpdateAnimationFrame),this.tooltip.hide(),this.scatterPlot.attr("display","block"),this.tooltipPointsComponent.content().selectAll(".point").remove()}setupTooltips(t){t.onDetach(()=>{this.tooltipInteraction.detachFrom(t),this.tooltipInteraction.enabled(!1)}),t.onAnchor(()=>{this.tooltipInteraction.attachTo(t),this.tooltipInteraction.enabled(!0)})}drawTooltips(t,r,n){if(!t.length){this.tooltip.hide();return}let{colorScale:i}=this;n=[{title:"",static:!1,evalType:IB.DOM,evaluate(d){return Ht(this).select("span").style("background-color",()=>i.scale(d.dataset.metadata().name)),""},enter(d){Ht(this).append("span").classed("swatch",!0).style("background-color",()=>i.scale(d.dataset.metadata().name))}},...n];let a=Wu(e0),s=d=>Math.pow(d.x-r.x,2)+Math.pow(d.y-r.y,2),l=zs.min(t.map(s)),c=this.smoothingEnabled?this.smoothedAccessor:this.yValueAccessor;this.tooltipSortingMethod==="ascending"?t=zs.sortBy(t,d=>c(d.datum,-1,d.dataset)):this.tooltipSortingMethod==="descending"?t=zs.sortBy(t,d=>c(d.datum,-1,d.dataset)).reverse():this.tooltipSortingMethod==="nearest"?t=zs.sortBy(t,s):t=t.slice(0).reverse();let u=this,h=Ht(this.tooltip.content()).select("table"),f=h.select("thead").selectAll("th").data(n,(d,g,_)=>d.title);f.enter().append("th").text(d=>d.title).nodes(),f.exit().remove();let p=h.select("tbody").selectAll("tr").data(t,(d,g,_)=>d.dataset.metadata().name);p.classed("distant",d=>{let g=d.dataset.data()[0],_=zs.last(d.dataset.data()),y=this.xScale.scale(this.xAccessor(g,0,d.dataset)),x=this.xScale.scale(this.xAccessor(_,0,d.dataset)),b=this.smoothingEnabled?d.datum.smoothed:this.yValueAccessor(d.datum,0,d.dataset);return r.x<y||r.x>x||isNaN(b)}).classed("closest",d=>s(d)===l).each(function(d){u.drawTooltipRow(this,n,d)}).order(),p.exit().remove(),p.enter().append("tr").each(function(d){u.drawTooltipRow(this,n,d)}).nodes(),this.tooltip.updateAndPosition(this.targetSVG.node())}drawTooltipRow(t,r,n){let i=this,o=Ht(t).selectAll("td").data(r);o.each(function(a){a.static||i.drawTooltipColumn.call(i,this,a,n)}),o.exit().remove(),o.enter().append("td").each(function(a){"enter"in a&&a.enter.call(this,n),i.drawTooltipColumn.call(i,this,a,n)})}drawTooltipColumn(t,r,n){let{smoothingEnabled:i}=this;"evalType"in r&&r.evalType==IB.DOM?r.evaluate.call(t,n,{smoothingEnabled:i}):Ht(t).text(r.evaluate.call(t,n,{smoothingEnabled:i}))}findClosestPoint(t,r){let n=r.data().map((s,l)=>this.xScale.scale(this.xAccessor(s,l,r))),i=zs.sortedIndex(n,t.x);if(n.length==0)return null;if(i===n.length)i=i-1;else if(i!==0){let s=Math.abs(n[i-1]-t.x),l=Math.abs(n[i]-t.x);i=s<l?i-1:i}let o=r.data()[i],a=this.smoothingEnabled?this.smoothedAccessor(o,i,r):this.yValueAccessor(o,i,r);return{x:n[i],y:this.yScale.scale(a),datum:o,dataset:r}}resmoothDataset(t){let r=t.data(),n=this.smoothingWeight,i=r.length>0?0:NaN,o=0,a=r.map((l,c)=>this.yValueAccessor(l,c,t)),s=a.every(l=>l==a[0]);r.forEach((l,c)=>{let u=a[c];if(s||!Number.isFinite(u))l.smoothed=u;else{i=i*n+(1-n)*u,o++;let h=1;n!==1&&(h=1-Math.pow(n,o)),l.smoothed=i/h}})}getDataset(t){return this.name2datasets[t]===void 0&&(this.name2datasets[t]=new Mn.Dataset([],{name:t,meta:null})),this.name2datasets[t]}static getYScaleFromType(t){if(t===Ff.LOG)return new AB;if(t===Ff.LINEAR)return new MB;throw new Error("Unrecognized yScale type "+t)}setVisibleSeries(t){this.disableChanges(),t=t.sort(),t.reverse(),this.seriesNames=t}disableChanges(){this.dirtyDatasets.size||(this.linePlot.datasets([]),this.smoothLinePlot&&this.smoothLinePlot.datasets([]),this.marginAreaPlot&&this.marginAreaPlot.datasets([]))}commitChanges(){this.datasets=this.seriesNames.map(t=>this.getDataset(t)),[...this.dirtyDatasets].forEach(t=>{this.smoothingEnabled&&this.resmoothDataset(this.getDataset(t))}),this.updateSpecialDatasets(),this.linePlot.datasets(this.datasets),this.smoothingEnabled&&this.smoothLinePlot.datasets(this.datasets),this.marginAreaPlot&&this.marginAreaPlot.datasets(this.datasets),this.measureBBoxAndMaybeInvalidateLayoutInRaf(),this.dirtyDatasets.clear()}createSampledDatasetForMarkers(t){let r=t.data();if(r.length<=YKt)return t;let n=Math.ceil(r.length/YKt),i=new Array(Math.floor(r.length/n));for(let o=0,a=0;o<i.length;o++,a+=n)i[o]=r[a];return new Mn.Dataset(i,t.metadata())}setSeriesData(t,r){this.disableChanges(),this.getDataset(t).data(r),this.dirtyDatasets.add(t)}setSeriesMetadata(t,r){this.disableChanges(),this.getDataset(t).metadata(Mx(Kl({},this.getDataset(t).metadata()),{meta:r})),this.dirtyDatasets.add(t)}smoothingUpdate(t){this.smoothingWeight=t,this.datasets.forEach(r=>this.resmoothDataset(r)),this.smoothingEnabled||(this.linePlot.addClass("ghost"),this.scatterPlot.y(this.smoothedAccessor,this.yScale),this.smoothingEnabled=!0,this.smoothLinePlot.datasets(this.datasets)),this.markersScatterPlot&&this.markersScatterPlot.y(this.getYAxisAccessor(),this.yScale),this.updateSpecialDatasets()}smoothingDisable(){this.smoothingEnabled&&(this.linePlot.removeClass("ghost"),this.scatterPlot.y(this.yValueAccessor,this.yScale),this.smoothLinePlot.datasets([]),this.smoothingEnabled=!1,this.updateSpecialDatasets()),this.markersScatterPlot&&this.markersScatterPlot.y(this.getYAxisAccessor(),this.yScale)}setColorScale(t){this.colorScale=t}setTooltipColumns(t){this.tooltipColumns=t}setTooltipSortingMethod(t){this.tooltipSortingMethod=t}renderTo(t){this.targetSVG=t,this.outer.renderTo(t),this._defaultXRange!=null&&this.resetXDomain(),this._defaultYRange!=null&&this.resetYDomain(),this.measureBBoxAndMaybeInvalidateLayoutInRaf()}redraw(){window.cancelAnimationFrame(this._redrawRaf),this._redrawRaf=window.requestAnimationFrame(()=>{this.measureBBoxAndMaybeInvalidateLayout(),this.outer.redraw()})}measureBBoxAndMaybeInvalidateLayoutInRaf(){window.cancelAnimationFrame(this._invalidateLayoutRaf),this._invalidateLayoutRaf=window.requestAnimationFrame(()=>{this.measureBBoxAndMaybeInvalidateLayout()})}measureBBoxAndMaybeInvalidateLayout(){if(this._lastDrawBBox){let{width:t}=this._lastDrawBBox,{width:r}=this.targetSVG.node().getBoundingClientRect();t==0&&t<r&&this.outer.invalidateCache()}this._lastDrawBBox=this.targetSVG.node().getBoundingClientRect()}destroy(){window.cancelAnimationFrame(this._redrawRaf),window.cancelAnimationFrame(this._invalidateLayoutRaf),this.outer&&this.outer.destroy()}onAnchor(t){this.outer&&this.outer.onAnchor(t)}isDataFitToDomain(){return t(this.xAxis.getScale())&&t(this.yAxis.getScale());function t(r){let n=r.getTransformationDomain(),i=r.getTransformationExtent();return i[0]===n[0]&&i[1]===n[1]}}};var XKt=Ee(Oe(),1),nst=Ee(wl(),1);_s({moduleName:"plottable-style",styleContent:`
    
.plottable-colors-0 {
  background-color: #5279c7; /* INDIGO */
}

.plottable-colors-1 {
  background-color: #fd373e; /* CORAL_RED */
}

.plottable-colors-2 {
  background-color: #63c261; /* FERN */
}

.plottable-colors-3 {
  background-color: #fad419; /* BRIGHT_SUN */
}

.plottable-colors-4 {
  background-color: #2c2b6f; /* JACARTA */
}

.plottable-colors-5 {
  background-color: #ff7939; /* BURNING_ORANGE */
}

.plottable-colors-6 {
  background-color: #db2e65; /* CERISE_RED */
}

.plottable-colors-7 {
  background-color: #99ce50; /* CONIFER */
}

.plottable-colors-8 {
  background-color: #962565; /* ROYAL_HEATH */
}

.plottable-colors-9 {
  background-color: #06cccc; /* ROBINS_EGG_BLUE */
}

/**
 * User-supplied renderTo element.
 */
.plottable {
  display: block; /* must be block elements for width/height calculations to work in Firefox. */
  pointer-events: visibleFill;
  position: relative;
  /**
   * Pre 3.0, users could set the dimension of the root element in two ways: either using CSS
   * (inline or through a stylesheet), or using the SVG width/height attributes. By default, we
   * set the SVG width/height attributes to 100%.
   *
   * Post 3.0 the root element is always a normal div and the only way to set the dimensions is
   * to use CSS. To replicate the "100%-by-default" behavior, we apply width/height 100%.
   */
  width: 100%;
  height: 100%;
}

/**
 * The _element that roots each Component's DOM.
 */
.plottable .component {
  /* Allow components to be positioned with explicit left/top/width/height styles */
  position: absolute;
}

.plottable .background-container,
.plottable .content,
.plottable .foreground-container {
  position: absolute;
  width: 100%;
  height: 100%;
}

/**
 * Don't allow svg elements above the content to steal events
 */
.plottable .foreground-container {
  pointer-events: none;
}

.plottable .component-overflow-hidden {
  overflow: hidden;
}

.plottable .component-overflow-visible {
  overflow: visible;
}

.plottable .plot-canvas-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.plottable .plot-canvas {
  width: 100%;
  height: 100%;
  /**
   * Play well with deferred rendering.
   */
  transform-origin: 0px 0px 0px;
}

.plottable text {
  text-rendering: geometricPrecision;
}

.plottable .label text {
  fill: #32313F;
}

.plottable .bar-label-text-area text,
.plottable .scatter-label-text-area text {
  font-size: 12px;
}

.plottable .label-area text {
  fill: #32313F;
  font-size: 14px;
}

.plottable .light-label text {
  fill: white;
}

.plottable .dark-label text {
  fill: #32313F;
}

.plottable .off-bar-label text {
  fill: #32313F;
}

.plottable .stacked-bar-label text {
  fill: #32313F;
  font-style: normal;
}

.plottable .stacked-bar-plot .off-bar-label {
  /* HACKHACK #2795: correct off-bar label logic to be implemented on StackedBar */
  visibility: hidden !important;
}

.plottable .axis-label text {
  font-size: 10px;
  font-weight: bold;
  letter-spacing: 1px;
  line-height: normal;
  text-transform: uppercase;
}

.plottable .title-label text {
  font-size: 20px;
  font-weight: bold;
}

.plottable .axis line.baseline {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis line.tick-mark {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis text {
  fill: #32313F;
  font-size: 12px;
  font-weight: 200;
  line-height: normal;
}

.plottable .axis .annotation-circle {
  fill: white;
  stroke-width: 1px;
  stroke: #CCC;
}

.plottable .axis .annotation-line {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .axis .annotation-rect {
  stroke: #CCC;
  stroke-width: 1px;
  fill: white;
}

.plottable .bar-plot .baseline {
  stroke: #999;
}

.plottable .gridlines line {
  stroke: #3C3C3C; /* hackhack: gridlines should be solid; see #820 */
  opacity: 0.25;
  stroke-width: 1px;
}

.plottable .selection-box-layer .selection-area {
  fill: black;
  fill-opacity: 0.03;
  stroke: #CCC;
}
/* DragBoxLayer */
.plottable .drag-box-layer.x-resizable .drag-edge-lr {
  cursor: ew-resize;
}
.plottable .drag-box-layer.y-resizable .drag-edge-tb {
  cursor: ns-resize;
}

.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tl {
  cursor: nwse-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tr {
  cursor: nesw-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-bl {
  cursor: nesw-resize;
}
.plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-br {
  cursor: nwse-resize;
}

.plottable .drag-box-layer.movable .selection-area {
  cursor: move; /* IE fallback */
  cursor: -moz-grab;
  cursor: -webkit-grab;
  cursor: grab;
}

.plottable .drag-box-layer.movable .selection-area:active {
  cursor: -moz-grabbing;
  cursor: -webkit-grabbing;
  cursor: grabbing;
}
/* /DragBoxLayer */

.plottable .guide-line-layer line.guide-line {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .drag-line-layer.enabled.vertical line.drag-edge {
  cursor: ew-resize;
}

.plottable .drag-line-layer.enabled.horizontal line.drag-edge {
  cursor: ns-resize;
}

.plottable .legend text {
  fill: #32313F;
  font-size: 12px;
  font-weight: bold;
  line-height: normal;
}

.plottable .interpolated-color-legend rect.swatch-bounding-box {
  fill: none;
  stroke: #CCC;
  stroke-width: 1px;
  pointer-events: none;
}

.plottable .waterfall-plot line.connector {
  stroke: #CCC;
  stroke-width: 1px;
}

.plottable .pie-plot .arc.outline {
  stroke-linejoin: round;
}

`});var i0;(function(e){e.GROUP="G",e.DIV="DIV",e.SVG="SVG",e.TEXT="TEXT"})(i0||(i0={}));var est=class{constructor(t){this.uniqueId=0,this.root=t}exportAsString(){let t=this.convert(this.root);if(!t)return"";let r=this.createRootSvg();return r.appendChild(t),r.outerHTML}createUniqueId(t){return`${t}_${this.uniqueId++}`}getSize(){return this.root.getBoundingClientRect()}createRootSvg(){let t=document.createElement("svg"),r=this.getSize();return t.setAttributeNS("svg","viewBox",`0 0 ${r.width} ${r.height}`),t.setAttribute("xmlns","http://www.w3.org/2000/svg"),t}createConvertedNode(t){let r=t.nodeName.toUpperCase();if(t.nodeType==Node.ELEMENT_NODE&&(r==i0.DIV||r==i0.SVG)){let n=document.createElement(i0.GROUP),i=window.getComputedStyle(t),o=parseInt(i.left,10),a=parseInt(i.top,10);if(o||a){let s=this.createUniqueId("clip");n.setAttribute("transform",`translate(${o}, ${a})`),n.setAttribute("clip-path",`url(#${s})`);let l=parseInt(i.width,10),c=parseInt(i.height,10),u=document.createElement("rect");u.setAttribute("width",String(l)),u.setAttribute("height",String(c));let h=document.createElementNS("svg","clipPath");h.id=s,h.appendChild(u),n.appendChild(h)}return n}else return t.cloneNode()}convert(t){let r=this.createConvertedNode(t);return Array.from(t.childNodes).map(i=>this.convert(i)).filter(Boolean).forEach(i=>{r.appendChild(i)}),r.nodeName.toUpperCase()==i0.GROUP&&!r.hasChildNodes()||this.shouldOmitNode(t)?null:this.stripClass(this.transferStyle(t,r))}stripClass(t){return t.nodeType==Node.ELEMENT_NODE&&t.removeAttribute("class"),t}transferStyle(t,r){if(r.nodeType!=Node.ELEMENT_NODE)return r;let n=r,i=r.nodeName.toUpperCase(),o=window.getComputedStyle(t);return i==i0.TEXT&&Object.assign(n.style,{fontFamily:o.fontFamily,fontSize:o.fontSize,fontWeight:o.fontWeight}),i!=i0.GROUP&&(n.setAttribute("fill",o.fill),n.setAttribute("stroke",o.stroke),n.setAttribute("stroke-width",o.strokeWidth)),o.opacity!="1"&&n.setAttribute("opacity",o.opacity),r}shouldOmitNode(t){return!1}},LB=class extends est{shouldOmitNode(t){return t.nodeType==Node.ELEMENT_NODE?t.classList.contains("scatter-plot"):!1}};_s({moduleName:"vz-pan-zoom-style",styleContent:`
    .help {
      align-items: center;
      animation-delay: 1s;
      animation-duration: 1s;
      animation-name: fade-out;
      background: rgba(30, 30, 30, 0.6);
      bottom: 0;
      color: #fff;
      display: flex;
      justify-content: center;
      left: 0;
      opacity: 1;
      padding: 20px;
      pointer-events: none;
      position: absolute;
      right: 0;
      top: 0;
    }

    .help > span {
      white-space: normal;
    }

    @keyframes fade-out {
      0% {
        opacity: 1;
      }

      100% {
        opacity: 0;
      }
    }
  `});var Oqe=Wu(e0),jKt=e=>isNaN(e)?"NaN":Oqe(e),ist=[{title:"Name",evaluate:e=>e.dataset.metadata().name},{title:"Smoothed",evaluate(e,t){let{smoothingEnabled:r}=t;return jKt(r?e.datum.smoothed:e.datum.scalar)}},{title:"Value",evaluate:e=>jKt(e.datum.scalar)},{title:"Step",evaluate:e=>b4(e.datum.step)},{title:"Time",evaluate:e=>yB(e.datum.wall_time)},{title:"Relative",evaluate:e=>vB(r0(e.datum,-1,e.dataset))}],Zr=class extends Gt(mt){constructor(){super(...arguments),this.colorScale=new nst.Scales.Color().range(jb.slice(0)),this.smoothingEnabled=!1,this.smoothingWeight=.6,this.xType=null,this.xComponentsCreationMethod=null,this.yValueAccessor=t=>t.scalar,this.tooltipColumns=ist,this.yScaleType=Ff.LINEAR,this.ignoreYOutliers=!1,this.tooltipSortingMethod="default",this.tooltipPosition=Gv.BOTTOM,this._visibleSeriesCache=[],this._seriesDataCache={},this._seriesMetadataCache={},this._makeChartAsyncCallbackId=null}ready(){super.ready(),this.scopeSubtree(this.$.chartdiv,!0)}attached(){let t={capture:!0,passive:!0};this._listen(this,"mousedown",this._onMouseDown.bind(this),t),this._listen(this,"mouseup",this._onMouseUp.bind(this),t),this._listen(window,"keydown",this._onKeyDown.bind(this),t),this._listen(window,"keyup",this._onKeyUp.bind(this),t)}detached(){this._makeChartAsyncCallbackId!==null&&(this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=null),this._chart&&(this._chart.destroy(),this._chart=void 0),this._listeners&&(this._listeners.forEach(({node:t,eventName:r,func:n,option:i})=>{t.removeEventListener(r,n,i)}),this._listeners.clear())}_listen(t,r,n,i={}){this._listeners||(this._listeners=new Set),this._listeners.add({node:t,eventName:r,func:n,option:i}),t.addEventListener(r,n,i)}_onKeyDown(t){this.toggleClass("pankey",zf.isPanKey(t))}_onKeyUp(t){this.toggleClass("pankey",zf.isPanKey(t))}_onMouseDown(t){this.toggleClass("mousedown",!0)}_onMouseUp(t){this.toggleClass("mousedown",!1)}isDataFitToDomain(){return this._chart?this._chart.isDataFitToDomain():!0}setVisibleSeries(t){XKt.isEqual(this._visibleSeriesCache,t)||(this._visibleSeriesCache=t)}setSeriesData(t,r){this._seriesDataCache[t]=r,this._chart&&this._chart.setSeriesData(t,r)}setSeriesMetadata(t,r){this._seriesMetadataCache[t]=r,this._chart&&this._chart.setSeriesMetadata(t,r)}commitChanges(){!this._chart||this._chart.commitChanges()}resetDomain(){this._chart&&this._chart.resetDomain()}redraw(){this._chart&&this._chart.redraw()}_makeChart(){this._makeChartAsyncCallbackId!==null&&(this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=null),this._makeChartAsyncCallbackId=this.async(function(){this._makeChartAsyncCallbackId=null;let t=this.xComponentsCreationMethod;if(!this.xType&&!t?t=Xat:this.xType&&(t=()=>xB(this.xType)),!(!t||!this.yValueAccessor||!this.tooltipColumns)){var r=new DS(t,this.yValueAccessor,this.yScaleType,this.colorScale,this.$.tooltip,this.tooltipColumns,this.fillArea,this.defaultXRange,this.defaultYRange,this.symbolFunction,this.xAxisFormatter),n=Ht(this.$.chartdiv);r.renderTo(n),this._chart&&this._chart.destroy(),this._chart=r,this._chart.onAnchor(()=>this.fire("chart-attached"))}},350)}_reloadFromCache(){!this._chart||(this._visibleSeriesCache.forEach(t=>{this._chart.setSeriesData(t,this._seriesDataCache[t]||[])}),this._visibleSeriesCache.filter(t=>this._seriesMetadataCache[t]).forEach(t=>{this._chart.setSeriesMetadata(t,this._seriesMetadataCache[t])}),this._chart.setVisibleSeries(this._visibleSeriesCache),this._chart.commitChanges())}_smoothingChanged(){!this._chart||(this.smoothingEnabled?this._chart.smoothingUpdate(this.smoothingWeight):this._chart.smoothingDisable())}_outliersChanged(){!this._chart||this._chart.ignoreYOutliers(this.ignoreYOutliers)}_colorScaleChanged(){!this._chart||(this._chart.setColorScale(this.colorScale),this._chart.redraw())}_tooltipColumnsChanged(){!this._chart||this._chart.setTooltipColumns(this.tooltipColumns)}_tooltipSortingMethodChanged(){!this._chart||this._chart.setTooltipSortingMethod(this.tooltipSortingMethod)}getExporter(){return new LB(this.$.chartdiv)}};Zr.template=Q`
    <div id="chartdiv"></div>
    <vz-chart-tooltip
      id="tooltip"
      position="[[tooltipPosition]]"
      content-component-name="vz-line-chart-tooltip"
    ></vz-chart-tooltip>
    <style include="plottable-style"></style>
    <style include="vz-pan-zoom-style"></style>
    <style>
      :host {
        -moz-user-select: none;
        -webkit-user-select: none;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        outline: none;
        position: relative;
        white-space: nowrap;
      }
      div {
        -webkit-user-select: none;
        -moz-user-select: none;
        flex-grow: 1;
        flex-shrink: 1;
      }

      #chartdiv .main {
        contain: strict;
        cursor: crosshair;
      }

      :host(.pankey) #chartdiv :not(.drag-zooming) .main {
        cursor: -webkit-grab;
        cursor: grab;
      }

      :host(.mousedown) #chartdiv .panning .main {
        cursor: -webkit-grabbing;
        cursor: grabbing;
      }

      #chartdiv {
        contain: strict;
      }

      #chartdiv line.guide-line {
        stroke: #999;
        stroke-width: 1.5px;
      }
      #chartdiv:hover .main {
        will-change: transform;
      }

      .ghost {
        opacity: 0.2;
        stroke-width: 1px;
      }

      .plottable .axis text {
        fill: currentColor;
      }

      .plottable .gridlines line {
        stroke: var(--tb-secondary-text-color);
      }
    </style>
  `;E([A({type:Object}),w("design:type",nst.Scales.Color)],Zr.prototype,"colorScale",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"symbolFunction",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Zr.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Zr.prototype,"smoothingWeight",void 0);E([A({type:String}),w("design:type",Object)],Zr.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"xComponentsCreationMethod",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"xAxisFormatter",void 0);E([A({type:Object}),w("design:type",Function)],Zr.prototype,"yValueAccessor",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"tooltipColumns",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"fillArea",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"defaultYRange",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"yScaleType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zr.prototype,"ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"tooltipSortingMethod",void 0);E([A({type:String}),w("design:type",String)],Zr.prototype,"tooltipPosition",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_chart",void 0);E([A({type:Array}),w("design:type",Array)],Zr.prototype,"_visibleSeriesCache",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_seriesDataCache",void 0);E([A({type:Object}),w("design:type",Object)],Zr.prototype,"_seriesMetadataCache",void 0);E([A({type:Number}),w("design:type",Object)],Zr.prototype,"_makeChartAsyncCallbackId",void 0);E([Bt("xComponentsCreationMethod","xType","yValueAccessor","yScaleType","isAttached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_makeChart",null);E([Bt("_chart","_visibleSeriesCache"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_reloadFromCache",null);E([Bt("smoothingEnabled","smoothingWeight","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_smoothingChanged",null);E([Bt("ignoreYOutliers","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_outliersChanged",null);E([Bt("colorScale"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_colorScaleChanged",null);E([Bt("tooltipColumns"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_tooltipColumnsChanged",null);E([Bt("tooltipSortingMethod","_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Zr.prototype,"_tooltipSortingMethodChanged",null);Zr=E([yt("vz-line-chart2")],Zr);var rst=class extends mt{};rst.template=Q`
    <div class="content">
      <table>
        <thead></thead>
        <tbody></tbody>
      </table>
    </div>
    <style>
      :host {
        pointer-events: none;
      }

      .content {
        background: rgba(0, 0, 0, 0.8);
        border-radius: 4px;
        color: #fff;
        overflow: hidden;
        pointer-events: none;
      }

      table {
        font-size: 13px;
        line-height: 1.4em;
        margin-top: 10px;
        padding: 8px;
      }

      thead {
        font-size: 14px;
      }

      tbody {
        font-size: 13px;
        line-height: 21px;
        white-space: nowrap;
      }

      td {
        padding: 0 5px;
      }

      .swatch {
        border-radius: 50%;
        display: block;
        height: 18px;
        width: 18px;
      }

      .closest .swatch {
        box-shadow: inset 0 0 0 2px #fff;
      }

      th {
        padding: 0 5px;
        text-align: left;
      }

      .distant td:not(.swatch) {
        opacity: 0.8;
      }

      .ghost {
        opacity: 0.2;
        stroke-width: 1px;
      }
    </style>
  `;rst=E([yt("vz-line-chart-tooltip")],rst);var ost=[],zqe=0,Fqe=$Kt.throttle(function e(){if(ost.length==0)return;let t=ost.shift();t&&t.active&&(t.redraw(),t._maybeRenderedInBadState=!1),window.cancelAnimationFrame(zqe),window.requestAnimationFrame(e)},100),Hn=class extends kS(Gt(mt)){constructor(){super(...arguments),this._redrawRaf=null,this.active=!1,this.logScaleActive=!1,this.colorScale={scale:fn},this._resetDomainOnNextLoad=!0,this._maybeRenderedInBadState=!1}onLoadFinish(){this.commitChanges(),this.dataToLoad.length>0&&this._resetDomainOnNextLoad&&(this._resetDomainOnNextLoad=!1,this.getChart().resetDomain()),this.redraw()}disconnectedCallback(){super.disconnectedCallback(),this._redrawRaf!==null&&cancelAnimationFrame(this._redrawRaf)}exportAsSvgString(){return this.getChart().getExporter().exportAsString()}getChart(){return this.$.chart}resetDomain(){this.getChart().resetDomain()}setSeriesData(t,r){this.getChart().setSeriesData(t,r)}setSeriesMetadata(t,r){this.getChart().setSeriesMetadata(t,r)}commitChanges(){this.getChart().commitChanges()}redraw(){this._redrawRaf!==null&&cancelAnimationFrame(this._redrawRaf),this._redrawRaf=window.requestAnimationFrame(()=>{this.active?this.getChart().redraw():this._maybeRenderedInBadState=!0})}_loadKeyChanged(){this.reset(),this._resetDomainOnNextLoad=!0}_dataSeriesChanged(){this.getChart().setVisibleSeries(this.dataSeries)}_logScaleChanged(t){let r=this.getChart();r.yScaleType=t?Ff.LOG:Ff.LINEAR,this.redraw()}_fixBadStateWhenActive(){this.active&&this._maybeRenderedInBadState&&(ost.push(this),Fqe())}_onChartAttached(){this.active||(this._maybeRenderedInBadState=!0)}};Hn.template=Q`
    <div id="chart-and-spinner-container">
      <vz-line-chart2
        id="chart"
        data-loading$="[[dataLoading]]"
        data-loaded-once$="[[dataLoadedAtLeastOnce]]"
        color-scale="[[colorScale]]"
        default-x-range="[[defaultXRange]]"
        default-y-range="[[defaultYRange]]"
        fill-area="[[fillArea]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        on-chart-attached="_onChartAttached"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        symbol-function="[[symbolFunction]]"
        tooltip-columns="[[tooltipColumns]]"
        tooltip-position="[[tooltipPosition]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-components-creation-method="[[xComponentsCreationMethod]]"
        x-type="[[xType]]"
        y-value-accessor="[[yValueAccessor]]"
      ></vz-line-chart2>
      <template is="dom-if" if="[[dataLoading]]">
        <div id="loading-spinner-container">
          <paper-spinner-lite active=""></paper-spinner-lite>
        </div>
      </template>
    </div>
    <style>
      :host {
        height: 100%;
        width: 100%;
        display: flex;
        flex-direction: column;
      }

      :host([_maybe-rendered-in-bad-state]) vz-line-chart {
        visibility: hidden;
      }

      #chart-and-spinner-container {
        display: flex;
        flex-grow: 1;
        position: relative;
      }

      #loading-spinner-container {
        align-items: center;
        bottom: 0;
        display: flex;
        display: flex;
        justify-content: center;
        left: 0;
        pointer-events: none;
        position: absolute;
        right: 0;
        top: 0;
      }

      vz-line-chart2 {
        -webkit-user-select: none;
        -moz-user-select: none;
      }

      vz-line-chart2[data-loading] {
        opacity: 0.3;
      }
    </style>
  `;E([A({type:Boolean,observer:"_fixBadStateWhenActive"}),w("design:type",Boolean)],Hn.prototype,"active",void 0);E([A({type:Array}),w("design:type",Array)],Hn.prototype,"dataSeries",void 0);E([A({type:Object}),w("design:type",Ae)],Hn.prototype,"requestManager",void 0);E([A({type:Boolean,observer:"_logScaleChanged"}),w("design:type",Boolean)],Hn.prototype,"logScaleActive",void 0);E([A({type:Object}),w("design:type",Object)],Hn.prototype,"xComponentsCreationMethod",void 0);E([A({type:String}),w("design:type",String)],Hn.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Function)],Hn.prototype,"yValueAccessor",void 0);E([A({type:Object}),w("design:type",Object)],Hn.prototype,"fillArea",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hn.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Hn.prototype,"smoothingWeight",void 0);E([A({type:Array}),w("design:type",Array)],Hn.prototype,"tooltipColumns",void 0);E([A({type:String}),w("design:type",Object)],Hn.prototype,"tooltipSortingMethod",void 0);E([A({type:String}),w("design:type",String)],Hn.prototype,"tooltipPosition",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hn.prototype,"ignoreYOutliers",void 0);E([A({type:Array}),w("design:type",Array)],Hn.prototype,"defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],Hn.prototype,"defaultYRange",void 0);E([A({type:Object}),w("design:type",Function)],Hn.prototype,"symbolFunction",void 0);E([A({type:Object}),w("design:type",Object)],Hn.prototype,"colorScale",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hn.prototype,"_resetDomainOnNextLoad",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Hn.prototype,"_maybeRenderedInBadState",void 0);E([Bt("loadKey"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hn.prototype,"_loadKeyChanged",null);E([Bt("dataSeries.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hn.prototype,"_dataSeriesChanged",null);Hn=E([yt("tf-line-chart-data-loader")],Hn);_s({moduleName:"tf-custom-scalar-card-style",styleContent:`
    :host {
      margin: 5px 10px;
      display: inline-block;
      width: 330px;
      vertical-align: text-top;
    }

    :host([_expanded]) {
      width: 100%;
    }

    :host([_expanded]) #tf-line-chart-data-loader-container {
      height: 400px;
    }

    h1 {
      font-size: 19px;
      font-weight: normal;
    }

    #tf-line-chart-data-loader-container {
      height: 200px;
      width: 100%;
    }

    #buttons {
      display: flex;
      flex-direction: row;
    }

    paper-icon-button {
      color: #2196f3;
      border-radius: 100%;
      width: 32px;
      height: 32px;
      padding: 4px;
    }

    paper-icon-button[selected] {
      background: var(--tb-ui-light-accent);
    }

    .download-links {
      display: flex;
      height: 32px;
    }

    .download-links a {
      font-size: 10px;
      align-self: center;
      margin: 2px;
    }

    .download-links paper-dropdown-menu {
      width: 100px;
      --paper-input-container-label: {
        font-size: 10px;
      }
      --paper-input-container-input: {
        font-size: 10px;
      }
    }
  `});var OS=class{constructor(t,r,n,i,o){this.run=t,this.tag=r,this.name=n,this.scalarData=i,this.symbol=o}getName(){return this.name}setData(t){this.scalarData=t}getData(){return this.scalarData}getRun(){return this.run}getTag(){return this.tag}getSymbol(){return this.symbol}};function kB(e,t){return`${t} (${e})`}var Wv=class{constructor(t){this.runBasedColorScale=t}scale(t){return this.runBasedColorScale.scale(this.parseRunName(t))}parseRunName(t){let r=t.match(/\((.*)\)$/);return r?r[1]:""}};var Jr=class extends Gt(mt){constructor(){super(...arguments),this.active=!0,this._colorScale=new Wv({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=_e().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._runToNextAvailableSymbolIndex={},this._matchesListOpened=!1,this._fillArea={lowerAccessor:t=>t.lower,higherAccessor:t=>t.upper},this._tooltipColumns=(()=>{let t=Wu(e0),r=n=>isNaN(n)?"NaN":t(n);return[{title:"Name",evaluate:n=>n.dataset.metadata().name},{title:"Value",evaluate:n=>r(n.datum.scalar)},{title:"Lower Margin",evaluate:n=>r(n.datum.lower)},{title:"Upper Margin",evaluate:n=>r(n.datum.upper)},{title:"Step",evaluate:n=>b4(n.datum.step)},{title:"Time",evaluate:n=>yB(n.datum.wall_time)},{title:"Relative",evaluate:n=>vB(r0(n.datum,-1,n.dataset))}]})(),this._missingTags=[],this._missingTagsCollapsibleOpened=!1}reload(){this.$.loader.reload()}redraw(){this.$.loader.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this.$.loader;t&&t.resetDomain()}_csvUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i=new URLSearchParams({tag:n.getTag(),run:n.getRun()});return _e().pluginRouteForSrc("custom_scalars","/download_data",i)}_createProcessDataFunction(t){return(r,n,i)=>{if(!i.regex_valid){this.set("_tagFilterInvalid",!0);return}let o=Yo.clone(this._nameToDataSeries),a=[];Yo.forEach(t,l=>{let c=!1,u=i.tag_to_events[l.value],h=i.tag_to_events[l.lower],f=i.tag_to_events[l.upper];if(Yo.isUndefined(u)&&(a.push(l.value),c=!0),Yo.isUndefined(h)&&(a.push(l.lower),c=!0),Yo.isUndefined(f)&&(a.push(l.upper),c=!0),c)return;let p=b=>b[1],d=this._findStepMismatch(l,u.map(p),h.map(p),f.map(p));if(d){this.set("_stepsMismatch",d);return}let g=b=>b[2],_=u.map((b,S)=>({wall_time:new Date(b[0]*1e3),step:p(b),scalar:g(b),lower:g(h[S]),upper:g(f[S])})),y=kB(n,l.value),x=o[y];if(x)x.setData(_);else{let b=this._createNewDataSeries(n,l.value,y,_);o[y]=b}}),this.set("_nameToDataSeries",o);let s=Yo.findIndex(this._missingTags,l=>l.run===n);if(a.length&&a.length!=3){let l={run:n,tags:a};s>=0?this.splice("_missingTags",s,1,l):this.push("_missingTags",l)}else s>=0&&this.splice("_missingTags",s,1)}}_findStepMismatch(t,r,n,i){return Yo.isEqual(n,r)&&Yo.isEqual(i,r)?null:{seriesObject:t,valueSteps:r,lowerSteps:n,upperSteps:i}}_createNewDataSeries(t,r,n,i){this._runToNextAvailableSymbolIndex[t]|=0;let o=RS[this._runToNextAvailableSymbolIndex[t]],a=new OS(t,r,n,i,o),s=RS.length;return this._runToNextAvailableSymbolIndex[t]=(this._runToNextAvailableSymbolIndex[t]+1)%s,a}_updateChart(){var t=this._nameToDataSeries;Yo.forOwn(t,r=>{this.$.loader.setSeriesData(r.getName(),r.getData())}),this.$.loader.commitChanges()}get _seriesNames(){let t=new Set(this.runs);return Object.entries(this._nameToDataSeries).filter(([r,n])=>t.has(n.run)).map(([r])=>r)}_determineColor(t,r){return t.scale(r)}_refreshDataSeries(){var t=this._tagFilter;this.set("_nameToDataSeries",{})}_createSymbolFunction(){return t=>this._nameToDataSeries[t].getSymbol().method()}_determineSymbol(t,r){return t[r].getSymbol().character}get _tagFilter(){var t=this.marginChartSeries;return Yo.flatten(t.map(i=>[i.value,i.lower,i.upper])).map(i=>"("+this._escapeRegexCharacters(i)+")").join("|")}_escapeRegexCharacters(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}_getToggleCollapsibleIcon(t){return t?"expand-less":"expand-more"}_toggleMatchesOpen(){this.set("_matchesListOpened",!this._matchesListOpened)}get _titleDisplayString(){var t=this.title;return t||"untitled"}_separateWithCommas(t){return t.join(", ")}_toggleMissingTagsCollapsibleOpen(){this.set("_missingTagsCollapsibleOpened",!this._missingTagsCollapsibleOpened)}_matchListEntryColorUpdated(){var r;let t=this.$$("#match-list-repeat");!t||(r=this.root)==null||r.querySelectorAll(".match-list-entry").forEach(n=>{let i=t.itemForElement(n);n.style.color=this._determineColor(this._colorScale,i)})}};Jr.template=Q`
    <tf-card-heading display-name="[[_titleDisplayString]]"></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        id="loader"
        active="[[active]]"
        color-scale="[[_colorScale]]"
        data-series="[[_seriesNames]]"
        fill-area="[[_fillArea]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-key="[[_tagFilter]]"
        data-to-load="[[runs]]"
        request-data="[[_requestData]]"
        log-scale-active="[[_logScaleActive]]"
        load-data-callback="[[_createProcessDataFunction(marginChartSeries)]]"
        request-manager="[[requestManager]]"
        symbol-function="[[_createSymbolFunction()]]"
        tooltip-columns="[[_tooltipColumns]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <paper-dropdown-menu
            no-label-float="true"
            label="series to download"
            selected-item-label="{{_dataSeriesNameToDownload}}"
          >
            <paper-listbox class="dropdown-content" slot="dropdown-content">
              <template
                is="dom-repeat"
                items="[[_seriesNames]]"
                as="dataSeriesName"
              >
                <paper-item no-label-float="true"
                  >[[dataSeriesName]]</paper-item
                >
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
          <a
            download="[[_dataSeriesNameToDownload]].csv"
            href="[[_csvUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >CSV</a
          >
          <a
            download="[[_dataSeriesNameToDownload]].json"
            href="[[_jsonUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >JSON</a
          >
        </div>
      </template>
    </div>

    <!-- here -->
    <template is="dom-if" if="[[_missingTags.length]]">
      <div class="collapsible-list-title">
        <paper-icon-button
          icon="[[_getToggleCollapsibleIcon(_missingTagsCollapsibleOpened)]]"
          on-click="_toggleMissingTagsCollapsibleOpen"
          class="toggle-collapsible-button"
        >
        </paper-icon-button>
        <span class="collapsible-title-text">
          <iron-icon icon="icons:error"></iron-icon> Missing Tags
        </span>
      </div>
      <iron-collapse opened="[[_missingTagsCollapsibleOpened]]">
        <div class="error-content">
          <iron-icon class="error-icon" icon="icons:error"></iron-icon>
          <template is="dom-repeat" items="[[_missingTags]]" as="missingEntry">
            <div class="missing-tags-for-run-container">
              Run "[[missingEntry.run]]" lacks data for tags
              <ul>
                <template
                  is="dom-repeat"
                  items="[[missingEntry.tags]]"
                  as="tag"
                >
                  <li>[[tag]]</li>
                </template>
              </ul>
            </div>
          </template>
        </div>
      </iron-collapse>
    </template>

    <template is="dom-if" if="[[_tagFilterInvalid]]">
      <div class="error-content">
        <iron-icon class="error-icon" icon="icons:error"></iron-icon>
        This regular expresion is invalid:<br />
        <span class="invalid-regex">[[_tagFilter]]</span>
      </div>
    </template>

    <template is="dom-if" if="[[_stepsMismatch]]">
      <div class="error-content">
        <iron-icon class="error-icon" icon="icons:error"></iron-icon>
        The steps for value, lower, and upper tags do not match:
        <ul>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.value]]</span>:
            [[_separateWithCommas(_stepsMismatch.valueSteps)]]
          </li>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.lower]]</span>:
            [[_separateWithCommas(_stepsMismatch.lowerSteps)]]
          </li>
          <li>
            <span class="tag-name">[[_stepsMismatch.seriesObject.upper]]</span>:
            [[_separateWithCommas(_stepsMismatch.upperSteps)]]
          </li>
        </ul>
      </div>
    </template>

    <div id="matches-container">
      <div class="collapsible-list-title">
        <template is="dom-if" if="[[_seriesNames.length]]">
          <paper-icon-button
            icon="[[_getToggleCollapsibleIcon(_matchesListOpened)]]"
            on-click="_toggleMatchesOpen"
            class="toggle-matches-button"
          >
          </paper-icon-button>
        </template>

        <span class="collapsible-title-text">
          Matches ([[_seriesNames.length]])
        </span>
      </div>
      <template is="dom-if" if="[[_seriesNames.length]]">
        <iron-collapse opened="[[_matchesListOpened]]">
          <div id="matches-list">
            <template
              is="dom-repeat"
              items="[[_seriesNames]]"
              as="seriesName"
              id="match-list-repeat"
              on-dom-change="_matchListEntryColorUpdated"
            >
              <div class="match-list-entry">
                <span class="match-entry-symbol">
                  [[_determineSymbol(_nameToDataSeries, seriesName)]]
                </span>
                [[seriesName]]
              </div>
            </template>
          </div>
        </iron-collapse>
      </template>
    </div>

    <style include="tf-custom-scalar-card-style"></style>
    <style>
      .error-content {
        background: #f00;
        border-radius: 5px;
        color: #fff;
        margin: 10px 0 0 0;
        padding: 10px;
      }

      .error-icon {
        display: block;
        fill: #fff;
        margin: 0 auto 5px auto;
      }

      .invalid-regex {
        font-weight: bold;
      }

      .error-content ul {
        margin: 1px 0 0 0;
        padding: 0 0 0 19px;
      }

      .tag-name {
        font-weight: bold;
      }

      .collapsible-list-title {
        margin: 10px 0 5px 0;
      }

      .collapsible-title-text {
        vertical-align: middle;
      }

      #matches-list {
        max-height: 200px;
        overflow-y: auto;
      }

      .match-list-entry {
        margin: 0 0 5px 0;
      }

      .match-entry-symbol {
        font-family: arial, sans-serif;
        display: inline-block;
        width: 10px;
      }

      .missing-tags-for-run-container {
        margin: 8px 0 0 0;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],Jr.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"active",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"title",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"marginChartSeries",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],Jr.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"showDownloadLinks",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],Jr.prototype,"tooltipSortingMethod",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_colorScale",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_tagFilterInvalid",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_nameToDataSeries",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Jr.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_logScaleActive",void 0);E([A({type:Object}),w("design:type",Function)],Jr.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_runToNextAvailableSymbolIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_matchesListOpened",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_fillArea",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"_tooltipColumns",void 0);E([A({type:Array}),w("design:type",Array)],Jr.prototype,"_missingTags",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Jr.prototype,"_missingTagsCollapsibleOpened",void 0);E([A({type:Object}),w("design:type",Object)],Jr.prototype,"_stepsMismatch",void 0);E([Bt("_nameToDataSeries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Jr.prototype,"_updateChart",null);E([Rt("_nameToDataSeries","runs"),w("design:type",Object),w("design:paramtypes",[])],Jr.prototype,"_seriesNames",null);E([Bt("_tagFilter"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Jr.prototype,"_refreshDataSeries",null);E([Rt("marginChartSeries"),w("design:type",String),w("design:paramtypes",[])],Jr.prototype,"_tagFilter",null);E([Rt("title"),w("design:type",String),w("design:paramtypes",[])],Jr.prototype,"_titleDisplayString",null);Jr=E([yt("tf-custom-scalar-margin-chart-card")],Jr);var o0=Ee(Oe(),1);var RB={};Ks(RB,{BaseStore:()=>bp,Canceller:()=>an,EnvironmentStore:()=>V9,ExperimentsStore:()=>rR,HttpMethodType:()=>Am,InvalidRequestOptionsError:()=>Vx,ListenKey:()=>H9,RequestCancellationError:()=>c9,RequestManager:()=>Ae,RequestNetworkError:()=>uE,RequestOptions:()=>Ux,RunsStore:()=>U9,TYPES:()=>Oxe,addParams:()=>Mi,createRouter:()=>Rgt,createSearchParam:()=>Ngt,environmentStore:()=>ib,experimentsStore:()=>nR,filterTags:()=>Fxe,getRouter:()=>_e,getRunsNamed:()=>zxe,getTags:()=>$i,runsStore:()=>wp});var En=class extends Gt(mt){constructor(){super(...arguments),this.active=!0,this._colorScale=new Wv({scale:fn}),this._nameToDataSeries={},this._expanded=!1,this._requestData=(t,r,n)=>{let o=_e().pluginRoute("custom_scalars","/scalars");Promise.all(t.map(a=>{let s=a,l=this._tagFilter,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._runToNextAvailableSymbolIndex={},this._matchesListOpened=!1}reload(){this.$.loader.reload()}redraw(){this.$.loader.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this.$.loader;t&&t.resetDomain()}_csvUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"csv"})}_jsonUrl(t,r){if(!r)return"";let n=this._downloadDataUrl(t,r);return Mi(n,{format:"json"})}_downloadDataUrl(t,r){let n=t[r],i=new URLSearchParams({tag:n.getTag(),run:n.getRun()});return _e().pluginRouteForSrc("custom_scalars","/download_data",i)}_createProcessDataFunction(){return(t,r,n)=>{if(n.regex_valid){let i=o0.clone(this._nameToDataSeries);o0.forOwn(n.tag_to_events,(o,a)=>{let s=o.map(u=>({wall_time:new Date(u[0]*1e3),step:u[1],scalar:u[2]})),l=kB(r,a),c=i[l];if(c)c.setData(s);else{o0.isUndefined(this._runToNextAvailableSymbolIndex[r])&&(this._runToNextAvailableSymbolIndex[r]=0);let u=RS[this._runToNextAvailableSymbolIndex[r]],h=new OS(r,a,l,s,u);i[l]=h;let f=RS.length;this._runToNextAvailableSymbolIndex[r]=(this._runToNextAvailableSymbolIndex[r]+1)%f}}),this.set("_nameToDataSeries",i)}}}_updateChart(){var t=this._nameToDataSeries;Object.entries(t).forEach(([r,n])=>{this.$.loader.setSeriesData(r,n.getData())}),this.$.loader.commitChanges()}_computeSelectedRunsSet(t){let r={};return o0.forEach(t,n=>{r[n]=1}),r}get _seriesNames(){let t=new Set(this.runs);return Object.entries(this._nameToDataSeries).filter(([r,n])=>t.has(n.run)).map(([r])=>r)}_determineColor(t,r){return t.scale(r)}_refreshDataSeries(){var t=this._tagFilter;this.set("_nameToDataSeries",{})}_createSymbolFunction(){return t=>this._nameToDataSeries[t].getSymbol().method()}_determineSymbol(t,r){return t[r].getSymbol().character}get _tagFilter(){var t=this.tagRegexes;return t.length===1?t[0]:t.map(r=>"("+r+")").join("|")}_getToggleMatchesIcon(t){return t?"expand-less":"expand-more"}_toggleMatchesOpen(){this.set("_matchesListOpened",!this._matchesListOpened)}get _titleDisplayString(){var t=this.title;return t||"untitled"}_matchListEntryColorUpdated(t){var n;let r=this.$$("#match-list-repeat");!r||(n=this.root)==null||n.querySelectorAll(".match-list-entry").forEach(i=>{let o=r.itemForElement(i);i.style.color=this._determineColor(this._colorScale,o)})}};En.template=Q`
    <tf-card-heading display-name="[[_titleDisplayString]]"></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        id="loader"
        active="[[active]]"
        color-scale="[[_colorScale]]"
        data-series="[[_seriesNames]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-key="[[_tagFilter]]"
        data-to-load="[[runs]]"
        request-data="[[_requestData]]"
        log-scale-active="[[_logScaleActive]]"
        load-data-callback="[[_createProcessDataFunction()]]"
        request-manager="[[requestManager]]"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        symbol-function="[[_createSymbolFunction()]]"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <paper-dropdown-menu
            no-label-float="true"
            label="series to download"
            selected-item-label="{{_dataSeriesNameToDownload}}"
          >
            <paper-listbox class="dropdown-content" slot="dropdown-content">
              <template
                is="dom-repeat"
                items="[[_seriesNames]]"
                as="dataSeriesName"
              >
                <paper-item no-label-float="true"
                  >[[dataSeriesName]]</paper-item
                >
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
          <a
            download="[[_dataSeriesNameToDownload]].csv"
            href="[[_csvUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >CSV</a
          >
          <a
            download="[[_dataSeriesNameToDownload]].json"
            href="[[_jsonUrl(_nameToDataSeries, _dataSeriesNameToDownload)]]"
            >JSON</a
          >
        </div>
      </template>
    </div>
    <div id="matches-container">
      <div id="matches-list-title">
        <template is="dom-if" if="[[_seriesNames.length]]">
          <paper-icon-button
            icon="[[_getToggleMatchesIcon(_matchesListOpened)]]"
            on-click="_toggleMatchesOpen"
            class="toggle-matches-button"
          >
          </paper-icon-button>
        </template>

        <span class="matches-text"> Matches ([[_seriesNames.length]]) </span>
      </div>
      <template is="dom-if" if="[[_seriesNames.length]]">
        <iron-collapse opened="[[_matchesListOpened]]">
          <div id="matches-list">
            <template
              is="dom-repeat"
              items="[[_seriesNames]]"
              as="seriesName"
              id="match-list-repeat"
              on-dom-change="_matchListEntryColorUpdated"
            >
              <div class="match-list-entry">
                <span class="match-entry-symbol">
                  [[_determineSymbol(_nameToDataSeries, seriesName)]]
                </span>
                [[seriesName]]
              </div>
            </template>
          </div>
        </iron-collapse>
      </template>
    </div>

    <style include="tf-custom-scalar-card-style"></style>
    <style>
      #matches-list-title {
        margin: 10px 0 5px 0;
      }

      #matches-list {
        max-height: 200px;
        overflow-y: auto;
      }

      .match-list-entry {
        margin: 0 0 5px 0;
      }

      .match-entry-symbol {
        font-family: arial, sans-serif;
        display: inline-block;
        width: 10px;
      }

      .matches-text {
        vertical-align: middle;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],En.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"active",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"title",void 0);E([A({type:Array}),w("design:type",Array)],En.prototype,"tagRegexes",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],En.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"showDownloadLinks",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],En.prototype,"smoothingWeight",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],En.prototype,"tooltipSortingMethod",void 0);E([A({type:Object}),w("design:type",Wv)],En.prototype,"_colorScale",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"_nameToDataSeries",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],En.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"_logScaleActive",void 0);E([A({type:Object}),w("design:type",Function)],En.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],En.prototype,"_runToNextAvailableSymbolIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],En.prototype,"_matchesListOpened",void 0);E([Bt("_nameToDataSeries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],En.prototype,"_updateChart",null);E([Rt("_nameToDataSeries","runs"),w("design:type",Object),w("design:paramtypes",[])],En.prototype,"_seriesNames",null);E([Bt("_tagFilter"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],En.prototype,"_refreshDataSeries",null);E([Rt("tagRegexes"),w("design:type",String),w("design:paramtypes",[])],En.prototype,"_tagFilter",null);E([Rt("title"),w("design:type",String),w("design:paramtypes",[])],En.prototype,"_titleDisplayString",null);En=E([yt("tf-custom-scalar-multi-line-chart-card")],En);var jo=class extends mt{constructor(){super(...arguments),this._requestManager=new Ae(50),this._canceller=new an,this._showDownloadLinks=vp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=_E("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=vp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType="step",this._active=!0,this.reloadOnReady=!0,this._showDownloadLinksObserver=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=yE("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){let t=_e().pluginsListing(),r=this._canceller.cancellable(n=>{n.cancelled||(this.set("_dataNotFound",!n.value.custom_scalars),!this._dataNotFound&&this._retrieveLayoutAndData())});this._requestManager.request(t).then(r)}_reloadCharts(){var r;let t=(r=this.root)==null?void 0:r.querySelectorAll("tf-custom-scalar-margin-chart-card, tf-custom-scalar-multi-line-chart-card");t==null||t.forEach(n=>{n.reload()})}_retrieveLayoutAndData(){let t=_e().pluginRoute("custom_scalars","/layout"),r=this._canceller.cancellable(n=>{n.cancelled||(this.set("_layout",n.value),this._dataNotFound||this._reloadCharts())});this._requestManager.request(t).then(r)}get _smoothingEnabled(){var t=this._smoothingWeight;return t>0}get _categories(){var t=this._layout;if(!t.category)return[];let r=!1;return this._openedCategories||(r=!0,this._openedCategories={}),t.category.map(i=>(r&&!i.closed&&(this._openedCategories[i.title]=!0),{name:i.title,items:i.chart,metadata:{type:Na.PREFIX_GROUP,opened:!!this._openedCategories[i.title]}}))}_categoryOpenedToggled(t){let r=t.target;r.opened?this._openedCategories[r.category.name]=!0:delete this._openedCategories[r.category.name]}};jo.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox checked="{{_showDownloadLinks}}"
                >Show data download links</paper-checkbox
              >
            </div>
            <div class="line-item">
              <paper-checkbox checked="{{_ignoreYOutliers}}"
                >Ignore outliers in chart scaling</paper-checkbox
              >
            </div>
            <div id="tooltip-sorting">
              <div id="tooltip-sorting-label">Tooltip sorting method:</div>
              <paper-dropdown-menu
                no-label-float=""
                selected-item-label="{{_tooltipSortingMethod}}"
              >
                <paper-listbox
                  class="dropdown-content"
                  selected="0"
                  slot="dropdown-content"
                >
                  <paper-item>default</paper-item>
                  <paper-item>descending</paper-item>
                  <paper-item>ascending</paper-item>
                  <paper-item>nearest</paper-item>
                </paper-listbox>
              </paper-dropdown-menu>
            </div>
          </div>
          <div class="sidebar-section">
            <tf-smoothing-input
              weight="{{_smoothingWeight}}"
              step="0.001"
              min="0"
              max="1"
            ></tf-smoothing-input>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="x-type-selector"
              name="Horizontal Axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button
              ><!--
            --><paper-button id="relative">relative</paper-button
              ><!--
            --><paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center" id="categories-container">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>The custom scalars dashboard is inactive.</h3>
            <p>Probable causes:</p>
            <ol>
              <li>You haven't laid out the dashboard.</li>
              <li>You haven’t written any scalar data to your event files.</li>
            </ol>

            <p>
              To lay out the dashboard, pass a <code>Layout</code> protobuffer
              to the <code>set_layout</code> method. For example,
            </p>
            <pre>
from tensorboard import summary
from tensorboard.plugins.custom_scalar import layout_pb2
...
# This action does not have to be performed at every step, so the action is not
# taken care of by an op in the graph. We only need to specify the layout once
# (instead of per step).
layout_summary = summary_lib.custom_scalar_pb(layout_pb2.Layout(
  category=[
    layout_pb2.Category(
      title='losses',
      chart=[
          layout_pb2.Chart(
              title='losses',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'loss.*'],
              )),
          layout_pb2.Chart(
              title='baz',
              margin=layout_pb2.MarginChartContent(
                series=[
                  layout_pb2.MarginChartContent.Series(
                    value='loss/baz/scalar_summary',
                    lower='baz_lower/baz/scalar_summary',
                    upper='baz_upper/baz/scalar_summary'),
                ],
              )),
      ]),
    layout_pb2.Category(
      title='trig functions',
      chart=[
          layout_pb2.Chart(
              title='wave trig functions',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'trigFunctions/cosine', r'trigFunctions/sine'],
              )),
          # The range of tangent is different. Let's give it its own chart.
          layout_pb2.Chart(
              title='tan',
              multiline=layout_pb2.MultilineChartContent(
                tag=[r'trigFunctions/tangent'],
              )),
      ],
      # This category we care less about. Let's make it initially closed.
      closed=True),
  ]))
writer.add_summary(layout_summary)
</pre
            >
            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              as="chart"
              category="[[category]]"
              disable-pagination
              initial-opened="[[category.metadata.opened]]"
            >
              <template>
                <template is="dom-if" if="[[chart.multiline]]">
                  <tf-custom-scalar-multi-line-chart-card
                    active="[[active]]"
                    request-manager="[[_requestManager]]"
                    runs="[[_selectedRuns]]"
                    title="[[chart.title]]"
                    x-type="[[_xType]]"
                    smoothing-enabled="[[_smoothingEnabled]]"
                    smoothing-weight="[[_smoothingWeight]]"
                    tooltip-sorting-method="[[tooltipSortingMethod]]"
                    ignore-y-outliers="[[_ignoreYOutliers]]"
                    show-download-links="[[_showDownloadLinks]]"
                    tag-regexes="[[chart.multiline.tag]]"
                  ></tf-custom-scalar-multi-line-chart-card>
                </template>
                <template is="dom-if" if="[[chart.margin]]">
                  <tf-custom-scalar-margin-chart-card
                    active="[[active]]"
                    request-manager="[[_requestManager]]"
                    runs="[[_selectedRuns]]"
                    title="[[chart.title]]"
                    x-type="[[_xType]]"
                    tooltip-sorting-method="[[tooltipSortingMethod]]"
                    ignore-y-outliers="[[_ignoreYOutliers]]"
                    show-download-links="[[_showDownloadLinks]]"
                    margin-chart-series="[[chart.margin.series]]"
                  ></tf-custom-scalar-margin-chart-card>
                </template>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      #tooltip-sorting {
        align-items: center;
        display: flex;
        font-size: 14px;
        margin-top: 15px;
      }
      #tooltip-sorting paper-dropdown-menu {
        margin-left: 10px;
        --paper-input-container-focus-color: var(--tb-orange-strong);
        width: 105px;
      }
      .line-item {
        display: block;
        padding-top: 5px;
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Ae)],jo.prototype,"_requestManager",void 0);E([A({type:Object}),w("design:type",an)],jo.prototype,"_canceller",void 0);E([A({type:Array}),w("design:type",Array)],jo.prototype,"_selectedRuns",void 0);E([A({type:Boolean,notify:!0,observer:"_showDownloadLinksObserver"}),w("design:type",Boolean)],jo.prototype,"_showDownloadLinks",void 0);E([A({type:Number,notify:!0,observer:"_smoothingWeightObserver"}),w("design:type",Number)],jo.prototype,"_smoothingWeight",void 0);E([A({type:Boolean,observer:"_ignoreYOutliersObserver"}),w("design:type",Boolean)],jo.prototype,"_ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],jo.prototype,"_xType",void 0);E([A({type:Object}),w("design:type",Object)],jo.prototype,"_layout",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"_dataNotFound",void 0);E([A({type:Object}),w("design:type",Object)],jo.prototype,"_openedCategories",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"_active",void 0);E([A({type:Boolean}),w("design:type",Boolean)],jo.prototype,"reloadOnReady",void 0);E([Rt("_smoothingWeight"),w("design:type",Boolean),w("design:paramtypes",[])],jo.prototype,"_smoothingEnabled",null);E([Rt("_layout"),w("design:type",Array),w("design:paramtypes",[])],jo.prototype,"_categories",null);jo=E([yt("tf-custom-scalar-dashboard")],jo);var DB=Ee(Oe(),1);var ast=Ee(Oe(),1),ba=Ee(wl(),1);var NB=class{constructor(t,r){this.run2datasets={},this.colorScale=r,this.buildChart(t)}getDataset(t){return this.run2datasets[t]===void 0&&(this.run2datasets[t]=new ba.Dataset([],{run:t})),this.run2datasets[t]}buildChart(t){this.outer&&this.outer.destroy();let r=xB(t);this.xAccessor=r.accessor,this.xScale=r.scale,this.xAxis=r.axis,this.xAxis.margin(0),this.xAxis.tickLabelPadding(3),this.yScale=new ba.Scales.Linear,this.yAxis=new ba.Axes.Numeric(this.yScale,"left");let n=Wu(mB);this.yAxis.margin(0).tickLabelPadding(5).formatter(n),this.yAxis.usesTextWidthApproximation(!0);let i=this.buildPlot(this.xAccessor,this.xScale,this.yScale);this.gridlines=new ba.Components.Gridlines(this.xScale,this.yScale),this.center=new ba.Components.Group([this.gridlines,i]),this.outer=new ba.Components.Table([[this.yAxis,this.center],[null,this.xAxis]])}buildPlot(t,r,n){let i=[0,228,1587,3085,5e3,6915,8413,9772,1e4],o=ast.range(i.length-1).map(h=>(i[h+1]-i[h])/2500),a=i.map((h,f)=>p=>p[f][1]),s=4,l=a[s],c=ast.range(a.length-1).map(h=>{let f=new ba.Plots.Area;f.x(t,r);let p=h>s?a[h]:a[h+1],d=h>s?a[h+1]:a[h];return f.y(d,n),f.y0(p),f.attr("fill",(g,_,y)=>this.colorScale.scale(y.metadata().run)),f.attr("stroke",(g,_,y)=>this.colorScale.scale(y.metadata().run)),f.attr("stroke-weight",(g,_,y)=>"0.5px"),f.attr("stroke-opacity",()=>o[h]),f.attr("fill-opacity",()=>o[h]),f}),u=new ba.Plots.Line;return u.x(t,r),u.y(l,n),u.attr("stroke",(h,f,p)=>this.colorScale.scale(p.run)),this.plots=c,new ba.Components.Group(c)}setVisibleSeries(t){this.runs=t;let r=t.map(n=>this.getDataset(n));this.plots.forEach(n=>n.datasets(r))}setSeriesData(t,r){this.getDataset(t).data(r)}renderTo(t){this.targetSVG=t,this.outer.renderTo(t)}redraw(){this.outer.redraw()}destroy(){this.outer.destroy()}},Bc=class extends Gt(mt){constructor(){super(...arguments),this.colorScale=new ba.Scales.Color().range(jb.slice()),this.xType="step",this._visibleSeriesCache=[],this._seriesDataCache={},this._makeChartAsyncCallbackId=null}setVisibleSeries(t){this._visibleSeriesCache=t,this._chart&&(this._chart.setVisibleSeries(t),this.redraw())}setSeriesData(t,r){this._seriesDataCache[t]=r,this._chart&&this._chart.setSeriesData(t,r)}redraw(){this._chart.redraw()}_makeChart(){var t=this.xType,r=this.colorScale,n=this._attached;this._makeChartAsyncCallbackId!==null&&this.cancelAsync(this._makeChartAsyncCallbackId),this._makeChartAsyncCallbackId=this.async(function(){if(this._makeChartAsyncCallbackId=null,!!n){this._chart&&this._chart.destroy();var i=new NB(t,r),o=Ht(this.$.chartdiv);i.renderTo(o),this._chart=i}},350)}_reloadFromCache(){this._chart&&(this._chart.setVisibleSeries(this._visibleSeriesCache),this._visibleSeriesCache.forEach(function(t){this._chart.setSeriesData(t,this._seriesDataCache[t]||[])}.bind(this)))}attached(){this._attached=!0}detached(){this._attached=!1}};Bc.template=Q`
    <style include="plottable-style"></style>
    <div id="chartdiv"></div>
    <style>
      :host {
        -webkit-user-select: none;
        -moz-user-select: none;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        position: relative;
      }
      #chartdiv {
        -webkit-user-select: none;
        -moz-user-select: none;
        flex-grow: 1;
        flex-shrink: 1;
      }
      .plottable .axis text {
        fill: currentColor;
      }
    </style>
  `;E([A({type:Object}),w("design:type",ba.Scales.Color)],Bc.prototype,"colorScale",void 0);E([A({type:String}),w("design:type",String)],Bc.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bc.prototype,"_attached",void 0);E([A({type:Object}),w("design:type",NB)],Bc.prototype,"_chart",void 0);E([A({type:Array}),w("design:type",Array)],Bc.prototype,"_visibleSeriesCache",void 0);E([A({type:Object}),w("design:type",Object)],Bc.prototype,"_seriesDataCache",void 0);E([A({type:Number}),w("design:type",Object)],Bc.prototype,"_makeChartAsyncCallbackId",void 0);E([Bt("xType","colorScale","_attached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Bc.prototype,"_makeChart",null);E([Bt("_chart"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Bc.prototype,"_reloadFromCache",null);Bc=E([yt("vz-distribution-chart")],Bc);var wa=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=_e().pluginRoute("distributions","/distributions");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this.loadDataCallback=(t,r,n)=>{let i=n.map(a=>{let[s,l,c]=a;return c.wall_time=new Date(s*1e3),c.step=l,c}),o=this.getDataLoadName(r);this.$.chart.setSeriesData(o,i),this.$.chart.setVisibleSeries([o])},this._colorScale={scale:fn},this._expanded=!1,this._canceller=new an}_reloadOnRunTagChange(){this.reload()}_updateDataToLoad(){var t=this.run,r=this.tag;this.dataToLoad=[{run:t,tag:r}]}get _runColor(){var t=this.run;return this._colorScale.scale(t)}redraw(){this.$.chart.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}};wa.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    ></tf-card-heading>
    <!--
      The main distribution that we render. Data is set directly with
      \`setSeriesData\`, not with a bound property.
    -->
    <vz-distribution-chart
      id="chart"
      x-type="[[xType]]"
      color-scale="[[_colorScale]]"
    ></vz-distribution-chart>
    <div style="display: flex; flex-direction: row;">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
    </div>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 330px;
        height: 235px;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      :host([_expanded]) {
        width: 700px;
        height: 500px;
      }

      vz-histogram-timeseries {
        -moz-user-select: none;
        -webkit-user-select: none;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      tf-card-heading {
        margin-bottom: 10px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],wa.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],wa.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],wa.prototype,"xType",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],wa.prototype,"_colorScale",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],wa.prototype,"_expanded",void 0);E([A({type:Object}),w("design:type",Ae)],wa.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],wa.prototype,"_canceller",void 0);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],wa.prototype,"_reloadOnRunTagChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],wa.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],wa.prototype,"_runColor",null);wa=E([yt("tf-distribution-loader")],wa);var Sl=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._xType="step",this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadDistributions()})}_fetchTags(){let t=_e().pluginRoute("distributions","/tags");return this._requestManager.request(t).then(r=>{if(DB.isEqual(r,this._runToTagInfo))return;let n=DB.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTag",n),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadDistributions(){var t;(t=this.root)==null||t.querySelectorAll("tf-distribution-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;return Ql(t,r,n)}_tagMetadata(t,r,n){return t[r][n]}};Sl.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="xTypeSelector"
              name="Horizontal axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button>
              <paper-button id="relative">relative</paper-button>
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>

      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No distribution data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any histogram data to your event files.
                (Histograms and distributions both use the histogram summary
                operation.)
              </li>

              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-distribution-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  x-type="[[_xType]]"
                  request-manager="[[_requestManager]]"
                ></tf-distribution-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Sl.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],Sl.prototype,"_xType",void 0);E([A({type:Array}),w("design:type",Array)],Sl.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Sl.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],Sl.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Sl.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Sl.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Sl.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],Sl.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Sl.prototype,"_categories",null);Sl=E([yt("tf-distribution-dashboard")],Sl);var OB={};Ks(OB,{DISAMBIGUATOR:()=>q0t,ListenKey:()=>mE,addHashListener:()=>gE,addStorageListener:()=>TW,disposeBooleanBinding:()=>t2e,disposeNumberBinding:()=>e2e,disposeObjectBinding:()=>i2e,disposeStringBinding:()=>Zbe,fireStorageChanged:()=>CW,getBoolean:()=>Jbe,getBooleanInitializer:()=>vp,getBooleanObserver:()=>xp,getNumber:()=>NW,getNumberInitializer:()=>_E,getNumberObserver:()=>yE,getObject:()=>r2e,getObjectInitializer:()=>OW,getObjectObserver:()=>zW,getString:()=>$be,getStringInitializer:()=>y_,getStringObserver:()=>v_,getUrlHashDict:()=>B0t,makeBindings:()=>vE,migrateLegacyURLScheme:()=>o2e,removeHashListenerByKey:()=>AW,removeStorageListenerByKey:()=>PW,setBoolean:()=>Qbe,setNumber:()=>DW,setObject:()=>n2e,setString:()=>Kbe});var ict=Ee(Oe(),1);var KKt="Graph dashboard actions",ZKt="Graph dashboard timings",sst;(function(e){e.FETCH_PBTXT_BYTES="FETCH_PBTXT_BYTES",e.FETCH_PBTXT_BYTES_FROM_FILESYSTEM="FETCH_PBTXT_BYTES_FROM_FILESYSTEM",e.FETCH_PBTXT_BYTES_FROM_SERVER="FETCH_PBTXT_BYTES_FROM_SERVER",e.PARSE_PBTXT_INTO_OBJECT="PARSE_PBTXT_INTO_OBJECT",e.FETCH_METADATA_PBTXT_BYTES="FETCH_METADATA_PBTXT_BYTES",e.PARSE_METADATA_PBTXT_INTO_OBJECT="PARSE_METADATA_PBTXT_INTO_OBJECT",e.NORMALIZING_NAMES="NORMALIZING_NAMES",e.BUILD_SLIM_GRAPH="BUILD_SLIM_GRAPH",e.HIERARCHY_ADD_NODES="HIERARCHY_ADD_NODES",e.HIERARCHY_DETECT_SERIES="HIERARCHY_DETECT_SERIES",e.HIERARCHY_ADD_EDGES="HIERARCHY_ADD_EDGES",e.HIERARCHY_FIND_SIMILAR_SUBGRAPHS="HIERARCHY_FIND_SIMILAR_SUBGRAPHS",e.RENDER_BUILD_HIERARCHY="RENDER_BUILD_HIERARCHY",e.RENDER_SCENE_LAYOUT="RENDER_SCENE_LAYOUT",e.RENDER_SCENE_BUILD_SCENE="RENDER_SCENE_BUILD_SCENE",e.GRAPH_LOAD_SUCCEEDED="GRAPH_LOAD_SUCCEEDED",e.GRAPH_LOAD_FAILED="GRAPH_LOAD_FAILED"})(sst||(sst={}));var lst;(function(e){e.NODE_EXPANSION_TOGGLED="NODE_EXPANSION_TOGGLED",e.NODE_SEARCH_RESULT_FOCUSED="NODE_SEARCH_RESULT_FOCUSED",e.NODE_AUXILIARY_EXTRACTION_CHANGED="NODE_AUXILIARY_EXTRACTION_CHANGED",e.GRAPH_TYPE_CHANGED="GRAPH_TYPE_CHANGED",e.TRACE_INPUT_MODE_TOGGLED="TRACE_INPUT_MODE_TOGGLED",e.NODE_COLOR_MODE_CHANGED="NODE_COLOR_MODE_CHANGED",e.UPLOADED_GRAPH_FROM_FILESYSTEM="UPLOADED_GRAPH_FROM_FILESYSTEM"})(lst||(lst={}));var jr=Kl(Kl({},sst),lst);var nle=Ee(Olt(),1),pn=Ee(Oe(),1);var Fs;(function(e){e.OP_GRAPH="op_graph",e.CONCEPTUAL_GRAPH="conceptual_graph",e.PROFILE="profile"})(Fs||(Fs={}));var ve={Node:{CONTAINER:"nodes",GROUP:"node",SHAPE:"nodeshape",COLOR_TARGET:"nodecolortarget",LABEL:"nodelabel",BUTTON_CONTAINER:"buttoncontainer",BUTTON_CIRCLE:"buttoncircle",EXPAND_BUTTON:"expandbutton",COLLAPSE_BUTTON:"collapsebutton"},Edge:{CONTAINER:"edges",GROUP:"edge",LINE:"edgeline",REFERENCE_EDGE:"referenceedge",REF_LINE:"refline",SELECTABLE:"selectableedge",SELECTED:"selectededge",STRUCTURAL:"structural"},Annotation:{OUTBOX:"out-annotations",INBOX:"in-annotations",GROUP:"annotation",NODE:"annotation-node",EDGE:"annotation-edge",CONTROL_EDGE:"annotation-control-edge",LABEL:"annotation-label",ELLIPSIS:"annotation-ellipsis"},Scene:{GROUP:"scene",CORE:"core",FUNCTION_LIBRARY:"function-library",INEXTRACT:"in-extract",OUTEXTRACT:"out-extract"},Subscene:{GROUP:"subscene"},OPNODE:"op",METANODE:"meta",SERIESNODE:"series",BRIDGENODE:"bridge",ELLIPSISNODE:"ellipsis"},J4={Edge:{LABEL:3.5},Annotation:{LABEL:5},Node:{EXPANDED_LABEL:9,SERIES_LABEL:8,OP_LABEL:6,HEALTH_PILL_STAT_LABEL:4}},ju="http://www.w3.org/2000/svg";function m0(e,t,r){let n=e.node().childNodes;for(let i=0;i<n.length;i++){let o=n[i];if(o.tagName===t){if(r instanceof Array){let a=!0;for(let s=0;s<r.length;s++)a=a&&o.classList.contains(r[s]);if(a)return Ht(o)}else if(!r||o.classList.contains(r))return Ht(o)}}return Ht(null)}function An(e,t,r,n){let i=m0(e,t,r);if(!i.empty())return i;let o=document.createElementNS("http://www.w3.org/2000/svg",t);if(r instanceof Array)for(let a=0;a<r.length;a++)o.classList.add(r[a]);else o.classList.add(r);return n?e.node().insertBefore(o,n):e.node().appendChild(o),Ht(o).datum(e.datum())}var KS=class{constructor(t){this.totalBytes=0,this.outputSize=t}addExecutionTime(t,r){this.startTime!=null?this.startTime=Math.min(this.startTime,t):this.startTime=t,this.endTime!=null?this.endTime=Math.max(this.endTime,r):this.endTime=r}addBytesAllocation(t){this.totalBytes!=null?this.totalBytes=Math.max(this.totalBytes,t):this.totalBytes=t}combine(t){t.totalBytes!=null&&(this.totalBytes+=t.totalBytes),t.getTotalMicros()!=null&&this.addExecutionTime(t.startTime,t.endTime)}getTotalMicros(){return this.startTime==null||this.endTime==null?null:this.endTime-this.startTime}},Q4=.75,tP=12,tcr=.3,ecr=[1,5e6],Xse=K_().exponent(tcr).domain(ecr).range([Q4,tP]).clamp(!0);var ZS=Ee(Oe(),1);var Kse=20;function rcr(e){return e.hasOwnProperty("timingId")}function Po(e){rcr(e)?(ZKt,e.timingId,e.eventValue,void 0):(KKt,e.actionId,e.eventLabel,void 0)}function Rd(e,t,r){let n=Date.now(),i=t(),o=Date.now()-n;return console.log(e,":",o,"ms"),r&&Po({timingId:r,eventValue:o}),i}function nP(e){return{setMessage:function(t){e.set("progress",{value:e.progress.value,msg:t})},updateProgress:function(t){e.set("progress",{value:e.progress.value+t,msg:e.progress.msg})},reportError:function(t,r){console.error(r.stack),e.set("progress",{value:e.progress.value,msg:t,error:!0})}}}function JS(e,t,r){return{setMessage:function(n){e.setMessage(r+": "+n)},updateProgress:function(n){e.updateProgress(n*t/100)},reportError:function(n,i){e.reportError(r+": "+n,i)}}}function Zse(e,t,r,n,i){n.setMessage(e);try{let o=Rd(e,r,i);return n.updateProgress(t),o}catch(o){return n.reportError("Failed "+e,o),null}}function e1(e,t,r,n,i){return new Promise((o,a)=>{n.setMessage(e),setTimeout(function(){try{let s=Rd(e,r,i);n.updateProgress(t),o(s)}catch(s){n.reportError("Failed "+e,s)}},Kse)})}function mH(e,t,r,n,i){return new Promise((o,a)=>{let s=function(l){n.reportError("Failed "+e,l),a(l)};n.setMessage(e),setTimeout(function(){try{let l=Date.now();r().then(function(c){let u=Date.now()-l;console.log(e,":",u,"ms"),n.updateProgress(t),Po({timingId:i,eventValue:u}),o(c)}).catch(s)}catch(l){s(l)}},Kse)})}function Jse(e){return e.replace(/([:.\[\],/\\\(\)])/g,"\\$1")}var iP=[{symbol:"B"},{symbol:"KB",numUnits:1024},{symbol:"MB",numUnits:1024},{symbol:"GB",numUnits:1024},{symbol:"TB",numUnits:1024},{symbol:"PB",numUnits:1024}],oP=[{symbol:"\xB5s"},{symbol:"ms",numUnits:1e3},{symbol:"s",numUnits:1e3},{symbol:"min",numUnits:60},{symbol:"hr",numUnits:60},{symbol:"days",numUnits:24}];function Nd(e,t,r=0){return r+1<t.length&&e>=t[r+1].numUnits?Nd(e/t[r+1].numUnits,t,r+1):Number(e.toPrecision(3))+" "+t[r].symbol}function gH(e){return!!(e&&(e.totalBytes>0||e.getTotalMicros()>0||e.outputSize))}function zlt(e){if(e.length<2)return e;let t=0,r=0,n=ZS.min(ZS.map(e,i=>i.length));for(;;){t++;let i=ZS.map(e,a=>a.substring(0,t));if(i.every((a,s)=>s===0?!0:a===i[s-1])){if(t>=n)return e;r=t}else break}return ZS.map(e,i=>i.substring(r))}function Qse(e){var t=+new Date-+new Date(e/1e3);return t<3e4?"just now":t<6e4?Math.floor(t/1e3)+" seconds ago":t<12e4?"a minute ago":t<36e5?Math.floor(t/6e4)+" minutes ago":Math.floor(t/36e5)==1?"an hour ago":t<864e5?Math.floor(t/36e5)+" hours ago":t<1728e5?"yesterday":Math.floor(t/864e5)+" days ago"}var ncr=document.createElement("canvas"),rP=ncr.getContext("2d");function $se(e,t){return rP&&(rP.font=`${t}px Roboto, sans-serif`),rP==null?void 0:rP.measureText(e).width}function tle(e,t,r){if(!e)return"";if($se(e,t)<=r)return e;let n=0,i=e.length;for(;n<i;){let o=n+Math.round((i-n)/2),a=e.slice(0,o)+"\u2026";$se(a,t)<=r?n=o:i=o-1}return n===0?e[0]:e.slice(0,n)+"\u2026"}var dH=class{constructor(){this.eventTypeToListeners=new Map}getListeners(t){return this.eventTypeToListeners.has(t)||this.eventTypeToListeners.set(t,[]),this.eventTypeToListeners.get(t)}addListener(t,r){var n;(n=this.getListeners(t))==null||n.push(r)}removeListener(t,r){var i;let n=(i=this.getListeners(t))==null?void 0:i.filter(o=>o!==r);this.eventTypeToListeners.set(t,n)}dispatchEvent(t,r){for(let n of this.getListeners(t))n(r)}};var Al="/",qc="__root__",Sa="__function_library__",ile="_too_large_attrs";var ole="--",g0;(function(e){e[e.FULL=0]="FULL",e[e.EMBEDDED=1]="EMBEDDED",e[e.META=2]="META",e[e.SERIES=3]="SERIES",e[e.CORE=4]="CORE",e[e.SHADOW=5]="SHADOW",e[e.BRIDGE=6]="BRIDGE",e[e.EDGE=7]="EDGE"})(g0||(g0={}));var jt;(function(e){e[e.META=0]="META",e[e.OP=1]="OP",e[e.SERIES=2]="SERIES",e[e.BRIDGE=3]="BRIDGE",e[e.ELLIPSIS=4]="ELLIPSIS"})(jt||(jt={}));var ur;(function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE",e[e.UNSPECIFIED=2]="UNSPECIFIED"})(ur||(ur={}));var is;(function(e){e[e.GROUP=0]="GROUP",e[e.UNGROUP=1]="UNGROUP"})(is||(is={}));var icr="_output_shapes",ocr="_XlaCluster",Xu=class{constructor(){this.nodes={},this.edges=[]}},_H=class{constructor(t){this.type=jt.ELLIPSIS,this.isGroupNode=!1,this.cardinality=1,this.parentNode=null,this.stats=null,this.setNumMoreNodes(t),this.include=ur.UNSPECIFIED}setNumMoreNodes(t){this.numMoreNodes=t,this.name="... "+t+" more"}},_0=class{constructor(t){this.op=t.op,this.name=t.name,this.device=t.device,this.attr=t.attr,this.inputs=ccr(t.input),this.outputShapes=acr(t.attr),this.xlaCluster=scr(t.attr),this.compatible=!1,this.type=jt.OP,this.isGroupNode=!1,this.cardinality=1,this.inEmbeddings=[],this.outEmbeddings=[],this.parentNode=null,this.include=ur.UNSPECIFIED,this.owningSeries=null}};function lP(e,t={}){return new aP(e,t)}function ale(e,t,r){pn.each(e.nodes,n=>{n.stats=null}),pn.each(t.dev_stats,n=>{r&&!r[n.device]||pn.each(n.node_stats,i=>{let o=i.node_name in e.nodes?i.node_name:sP(i.node_name);if(!(o in e.nodes))return;let a=0;i.memory&&pn.each(i.memory,l=>{l.total_bytes&&(l.total_bytes>0?a+=Number(l.total_bytes):console.log("ignoring negative memory allocation for "+o))});let s=null;i.output&&(s=pn.map(i.output,l=>pn.map(l.tensor_description.shape.dim,c=>Number(c.size)))),e.nodes[o].device=n.device,e.nodes[o].stats==null&&(e.nodes[o].stats=new KS(s)),e.nodes[o].stats.addBytesAllocation(a),i.all_end_rel_micros&&(i.all_end_rel_micros>0?e.nodes[o].stats.addExecutionTime(i.all_start_micros,i.all_start_micros+i.all_end_rel_micros):console.log("ignoring negative runtime for "+o))})})}var aP=class{constructor(t,r={}){this.name=t,this.type=jt.META,this.depth=1,this.isGroupNode=!0,this.cardinality=0,this.metagraph=e3(t,g0.META,r),this.bridgegraph=null,this.opHistogram={},this.deviceHistogram={},this.xlaClusterHistogram={},this.compatibilityHistogram={compatible:0,incompatible:0},this.templateId=null,this.parentNode=null,this.hasNonControlEdges=!1,this.include=ur.UNSPECIFIED,this.associatedFunction=""}getFirstChild(){return this.metagraph.node(this.metagraph.nodes()[0])}getRootOp(){let t=this.name.split("/"),r=this.name+"/("+t[t.length-1]+")";return this.metagraph.node(r)}leaves(){let t=[],r=[this],n;for(;r.length;){let i=r.shift();i!=null&&i.isGroupNode?(n=i.metagraph,pn.each(n.nodes(),o=>r.push(n.node(o)))):t.push(i==null?void 0:i.name)}return t}};function Hlt(e,t){return new qf(e,t)}var qf=class{constructor(t,r){this.v=t,this.w=r,this.baseEdgeList=[],this.inbound=null,this.numRegularEdges=0,this.numControlEdges=0,this.numRefEdges=0,this.totalSize=0}addBaseEdge(t,r){this.baseEdgeList.push(t),t.isControlDependency?this.numControlEdges+=1:this.numRegularEdges+=1,t.isReferenceEdge&&(this.numRefEdges+=1),this.totalSize+=qf.computeSizeOfEdge(t,r),r.maxMetaEdgeSize=Math.max(r.maxMetaEdgeSize,this.totalSize)}static computeSizeOfEdge(t,r){let n=r.node(t.v);if(!n.outputShapes)return 1;r.hasShapeInfo=!0;let i=Object.keys(n.outputShapes).map(o=>n.outputShapes[o]).map(o=>o==null?1:o.reduce((a,s)=>(s===-1&&(s=1),a*s),1));return pn.sum(i)}};function QS(e,t,r,n,i,o){return new Blt(e,t,r,n,i,o)}function t3(e,t,r,n,i){let o=typeof n!="undefined"&&typeof i!="undefined"?"["+n+"-"+i+"]":"#",a=e+o+t;return(r?r+"/":"")+a}var Blt=class{constructor(t,r,n,i,o,a){this.name=o||t3(t,r,n),this.type=jt.SERIES,this.hasLoop=!1,this.prefix=t,this.suffix=r,this.clusterId=i,this.ids=[],this.parent=n,this.isGroupNode=!0,this.cardinality=0,this.metagraph=e3(o,g0.SERIES,a),this.bridgegraph=null,this.parentNode=null,this.deviceHistogram={},this.xlaClusterHistogram={},this.compatibilityHistogram={compatible:0,incompatible:0},this.hasNonControlEdges=!1,this.include=ur.UNSPECIFIED}};function acr(e){let t=null;if(!e)return null;for(let r=0;r<e.length;r++){let{key:n,value:i}=e[r];if(n===icr){if(!i.list||!i.list.shape)return null;let o=i.list.shape.map(a=>a.unknown_rank?null:a.dim==null||a.dim.length===1&&a.dim[0].size==null?[]:a.dim.map(s=>s.size||0));return e.splice(r,1),o}}return null}function scr(e){if(!e)return null;for(let t=0;t<e.length;t++)if(e[t].key===ocr)return e[t].value.s||null;return null}var lcr=/^([^:]+):((\w+:|)\d+)$/;function ccr(e){let t=[],r=null;for(let n of e||[]){let i=n.startsWith("^");i&&(n=n.substring(1));let o=n,a="0",s=n.includes(":")&&n.match(lcr);s&&(o=s[1],a=s[2]),r!==o&&(r=o,t.push({name:o,outputTensorKey:a,isControlDependency:i}))}return t}function Flt(e,t,r,n,i,o){if(t===r.name)return;let a=i.refEdges[r.op+" "+o]===!0;e.edges.push({v:t,w:r.name,outputTensorKey:n.outputTensorKey,isControlDependency:n.isControlDependency,isReferenceEdge:a})}var sle={enableEmbedding:!0,inEmbeddingTypes:["Const"],outEmbeddingTypes:["^[a-zA-Z]+Summary$"],refEdges:{"Assign 0":!0,"AssignAdd 0":!0,"AssignSub 0":!0,"assign 0":!0,"assign_add 0":!0,"assign_sub 0":!0,"count_up_to 0":!0,"ScatterAdd 0":!0,"ScatterSub 0":!0,"ScatterUpdate 0":!0,"scatter_add 0":!0,"scatter_sub 0":!0,"scatter_update 0":!0}};function lle(e,t,r){let n={},i={},o={},a=ele(t.inEmbeddingTypes),s=ele(t.outEmbeddingTypes),l=[],c=e.node,u=new Array(c.length);return e1("Normalizing names",30,()=>{let h=new Array(c.length),f=0,p=g=>{let _=new _0(g);return a(_)?(l.push(_.name),n[_.name]=_,_):s(_)?(l.push(_.name),i[_.name]=_,pn.each(_.inputs,y=>{let x=y.name;o[x]=o[x]||[],o[x].push(_)}),_):(h[f]=_,u[f]=_.name,f++,_)};pn.each(c,p);let d=g=>{let _=Sa+g.signature.name;if(p({name:_,input:[],device:"",op:"",attr:[]}),g.signature.input_arg){let b=0,S=C=>{let P=p({name:_+Al+C.name,input:[],device:"",op:"input_arg",attr:[{key:"T",value:{type:C.type}}]});P.functionInputIndex=b,b++};g.signature.input_arg.name?S(g.signature.input_arg):pn.each(g.signature.input_arg,S)}let y=0,x={};if(g.signature.output_arg){let b=S=>{x[_+Al+S.name]=y,y++};g.signature.output_arg.name?b(g.signature.output_arg):pn.each(g.signature.output_arg,b)}pn.each(g.node_def,b=>{b.name=_+"/"+b.name,typeof b.input=="string"&&(b.input=[b.input]);let S=p(b);pn.isNumber(x[b.name])&&(S.functionOutputIndex=x[b.name]),pn.each(S.inputs,C=>{C.name=_+Al+C.name})})};return e.library&&e.library.function&&pn.each(e.library.function,d),h.splice(f),u.splice(f),h},r,jr.NORMALIZING_NAMES).then(h=>e1("Building the data structure",70,()=>{let f=ucr(u,l),p=new Xu;return pn.each(h,d=>{let g=f[d.name]||d.name;p.nodes[g]=d,d.name in o&&(d.outEmbeddings=o[d.name],pn.each(d.outEmbeddings,_=>{_.name=f[_.name]||_.name})),d.name=g}),pn.each(h,d=>{pn.each(d.inputs,(g,_)=>{let y=g.name;if(y in n){let x=n[y];d.inEmbeddings.push(x);for(let b of x.inputs)Flt(p,f[b.name]||b.name,d,b,t,_)}else if(y in i){let x=i[y];for(let b of x.inputs)Flt(p,f[b.name]||b.name,d,g,t,_)}else Flt(p,f[y]||y,d,g,t,_)})}),pn.each(n,(d,g)=>{d.name=f[d.name]||d.name}),p},r,jr.BUILD_SLIM_GRAPH))}function e3(e,t,r={}){let n=new nle.graphlib.Graph(r);return n.setGraph({name:e,rankdir:r.rankdir||"BT",type:t}),n}function ele(e){return function(t){for(let r=0;r<e.length;r++){let n=new RegExp(e[r]);if(typeof t.op=="string"&&t.op.match(n))return!0}return!1}}function sP(e){let t=e.split(Al);return e+Al+"("+t[t.length-1]+")"}function ucr(e,t){let r={},n={};e.sort();for(let i=0;i<e.length-1;++i){let o=e[i];pn.each(cP(o).slice(0,-1),a=>{n[a]=!0});for(let a=i+1;a<e.length;++a){let s=e[a];if(pn.startsWith(s,o)){if(s.length>o.length&&s.charAt(o.length)===Al){r[o]=sP(o);break}}else break}}return pn.each(t,i=>{i in n&&(r[i]=sP(i))}),r}function rle(e){let t=e.nodes().map(function(r){var n;return(n=e.neighbors(r))==null?void 0:n.length});return t.sort(),t}function cle(e,t){let r=rle(e),n=rle(t);for(let i=0;i<r.length;i++)if(r[i]!==n[i])return!1;return!0}function cP(e,t){let r=[],n=e.indexOf(Al);for(;n>=0;)r.push(e.substring(0,n)),n=e.indexOf(Al,n+1);if(t){let i=t[e];i&&r.push(i)}return r.push(e),r}function yH(e){return e===ur.EXCLUDE?"Add to main graph":"Remove from main graph"}function ule(e){return e===is.GROUP?"Ungroup this series of nodes":"Group this series of nodes"}var He=Ee(Oe(),1);var r1=Ee(Oe(),1);function hle(e,t){let r=fcr(e),n=pcr(r,t);return Object.keys(n).sort(i=>n[i].level).reduce((i,o)=>(i[o]=n[o],i),{})}function hcr(e){let t=r1.map({depth:e.depth,"|V|":e.metagraph.nodes().length,"|E|":e.metagraph.edges().length},function(n,i){return i+"="+n}).join(" "),r=r1.map(e.opHistogram,function(n,i){return i+"="+n}).join(",");return t+" [ops] "+r}function fcr(e){let t=e.getNodeMap(),r=Object.keys(t).reduce((n,i)=>{let o=t[i];if(o.type!==jt.META)return n;let a=i.split("/").length-1,s=hcr(o),l=n[s]||{nodes:[],level:a};return n[s]=l,l.nodes.push(o),l.level>a&&(l.level=a),n},{});return Object.keys(r).map(n=>[n,r[n]]).filter(([n,i])=>{let{nodes:o}=i;if(o.length>1)return!0;let a=o[0];return a.type===jt.META&&a.associatedFunction}).sort(([n,i])=>i.nodes[0].depth)}function pcr(e,t){return r1.reduce(e,function(n,i){let o=i[0],a=i[1].nodes,s=[];return a.forEach(function(l){for(let c=0;c<s.length;c++)if(!t||dcr(s[c].metanode.metagraph,l.metagraph)){l.templateId=s[c].metanode.templateId,s[c].members.push(l.name);return}l.templateId=o+"["+s.length+"]",s.push({metanode:l,members:[l.name]})}),s.forEach(function(l){n[l.metanode.templateId]={level:i[1].level,nodes:l.members}}),n},{})}function vH(e,t,r){return r1.sortBy(e,[n=>t.node(n).op,n=>t.node(n).templateId,n=>{var i;return(i=t.neighbors(n))==null?void 0:i.length},n=>{var i;return(i=t.predecessors(n))==null?void 0:i.length},n=>{var i;return(i=t.successors(n))==null?void 0:i.length},n=>n.substr(r.length)])}function dcr(e,t){if(!cle(e,t))return!1;let r=e.graph().name,n=t.graph().name,i={},o={},a=[];function s(u,h){let f=u.substr(r.length),p=h.substr(n.length);return i[f]^o[p]?(console.warn("different visit pattern","["+r+"]",f,"["+n+"]",p),!0):(i[f]||(i[f]=o[p]=!0,a.push({n1:u,n2:h})),!1)}let l=e.sources(),c=t.sources();if(l.length!==c.length)return console.log("different source length"),!1;l=vH(l,e,r),c=vH(c,t,n);for(let u=0;u<l.length;u++)if(s(l[u],c[u]))return!1;for(;a.length>0;){let u=a.pop();if(!mcr(e.node(u==null?void 0:u.n1),t.node(u==null?void 0:u.n2)))return!1;let f=e.successors(u==null?void 0:u.n1),p=t.successors(u==null?void 0:u.n2);if((f==null?void 0:f.length)!==(p==null?void 0:p.length))return console.log("# of successors mismatch",f,p),!1;f=vH(f,e,r),p=vH(p,t,n);for(let d=0;d<(f==null?void 0:f.length);d++)if(s(f==null?void 0:f[d],p==null?void 0:p[d]))return!1}return!0}function mcr(e,t){if(e.type===jt.META){let r=e,n=t;return!!r.templateId&&!!n.templateId&&r.templateId===n.templateId}else{if(e.type===jt.OP&&t.type===jt.OP)return e.op===t.op;if(e.type===jt.SERIES&&t.type===jt.SERIES){let r=e,n=t,i=r.metagraph.nodeCount();return i===n.metagraph.nodeCount()&&(i===0||r.metagraph.node(r.metagraph.nodes()[0]).op===n.metagraph.node(n.metagraph.nodes()[0]).op)}}return!1}var Dd;(function(e){e[e.TEMPLATES_UPDATED=0]="TEMPLATES_UPDATED"})(Dd||(Dd={}));var os=class extends dH{constructor(t){super(),this.hasShapeInfo=!1,this.maxMetaEdgeSize=1,this.graphOptions={},this.templates=null,this.graphOptions.compound=!0,this.graphOptions.rankdir=t.rankDirection,this.root=lP(qc,this.graphOptions),this.libraryFunctions={},this.seriesGroupMap=new Map(t.seriesMap),this.devices=null,this.xlaClusters=null,this.verifyTemplate=t.verifyTemplate,this.index={},this.index[qc]=this.root,this.orderings={}}getSeriesGroupType(t){var r;return(r=this.seriesGroupMap.get(t))!=null?r:is.GROUP}setSeriesGroupType(t,r){return this.seriesGroupMap.set(t,r)}buildSeriesGroupMapToggled(t){let r=this.getSeriesGroupType(t)===is.GROUP?is.UNGROUP:is.GROUP;return new Map([...this.seriesGroupMap,[t,r]])}getNodeMap(){return this.index}node(t){return this.index[t]}setNode(t,r){this.index[t]=r}getBridgegraph(t){let r=this.index[t];if(!r)throw Error("Could not find node in hierarchy: "+t);if(!("metagraph"in r))return null;let n=r;if(n.bridgegraph)return n.bridgegraph;let i=n.bridgegraph=e3("BRIDGEGRAPH",g0.BRIDGE,this.graphOptions);if(!r.parentNode||!("metagraph"in r.parentNode))return i;let o=r.parentNode,a=o.metagraph,s=this.getBridgegraph(o.name);return He.each([a,s],l=>{l.edges().filter(c=>c.v===t||c.w===t).forEach(c=>{let u=c.w===t,h=l.edge(c);He.each(h.baseEdgeList,f=>{let[p,d]=u?[f.w,c.v]:[f.v,c.w],g=this.getChildName(t,p),_={v:u?d:g,w:u?g:d},y=i.edge(_);y||(y=Hlt(_.v,_.w),y.inbound=u,i.setEdge(_.v,_.w,y)),y.addBaseEdge(f,this)})})}),i}getChildName(t,r){let n=this.index[r];for(;n;){if(n.parentNode&&n.parentNode.name===t)return n.name;n=n.parentNode}throw Error("Could not find immediate child for descendant: "+r)}getPredecessors(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);let n=this.getOneWayEdges(r,!0);return r.isGroupNode||He.each(r.inEmbeddings,i=>{He.each(r.inputs,o=>{if(o.name===i.name){let a=new qf(i.name,t);a.addBaseEdge({isControlDependency:o.isControlDependency,outputTensorKey:o.outputTensorKey,isReferenceEdge:!1,v:i.name,w:t},this),n.regular.push(a)}})}),n}getSuccessors(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);let n=this.getOneWayEdges(r,!1);return r.isGroupNode||He.each(r.outEmbeddings,i=>{He.each(i.inputs,o=>{if(o.name===t){let a=new qf(t,i.name);a.addBaseEdge({isControlDependency:o.isControlDependency,outputTensorKey:o.outputTensorKey,isReferenceEdge:!1,v:t,w:i.name},this),n.regular.push(a)}})}),n}getOneWayEdges(t,r){let n={control:[],regular:[]};if(!t.parentNode||!t.parentNode.isGroupNode)return n;let i=t.parentNode,o=i.metagraph,a=this.getBridgegraph(i.name);return fle(o,t,r,n),fle(a,t,r,n),n}getTopologicalOrdering(t){let r=this.index[t];if(!r)throw Error("Could not find node with name: "+t);if(!r.isGroupNode)return null;if(t in this.orderings)return this.orderings[t];let n={},i={},o=r.metagraph;He.each(o.edges(),c=>{!o.edge(c).numRegularEdges||(c.v in n||(n[c.v]=[]),n[c.v].push(c.w),i[c.w]=!0)});let a=He.difference(He.keys(n),He.keys(i)),s=this.orderings[t]={},l=0;for(;a.length;){let c=a.shift();s[c]=l++,He.each(n[c],u=>a.push(u)),delete n[c]}return s}getTemplateIndex(){if(!this.templates)return null;let t=$L(this.templates);if(!t.length)return null;let r=gu().domain(t).range(Ir(0,t.length));return n=>r(n)}updateTemplates(){Rd("Finding similar subgraphs",()=>{this.templates=hle(this,this.verifyTemplate),this.dispatchEvent(Dd.TEMPLATES_UPDATED)},jr.HIERARCHY_FIND_SIMILAR_SUBGRAPHS)}};function fle(e,t,r,n){let i=r?e.inEdges(t.name):e.outEdges(t.name);He.each(i,o=>{let a=e.edge(o);(a.numRegularEdges?n.regular:n.control).push(a)})}var r3={verifyTemplate:!0,seriesNodeMinSize:5,seriesMap:new Map,rankDirection:"BT",useGeneralizedSeriesPatterns:!1};function bH(e,t,r){let n=new os(t),i={};return e1("Adding nodes",30,()=>{let o={},a={};He.each(e.nodes,(s,l)=>{s.device&&(o[s.device]=!0),s.xlaCluster&&(a[s.xlaCluster]=!0)}),n.devices=He.keys(o),n.xlaClusters=He.keys(a),_cr(n,e)},r,jr.HIERARCHY_ADD_NODES).then(()=>e1("Detect series",30,()=>{t.seriesNodeMinSize>0&&mle(n.root,n,i,t.seriesNodeMinSize,t.seriesMap,t.useGeneralizedSeriesPatterns)},r,jr.HIERARCHY_DETECT_SERIES)).then(()=>e1("Adding edges",40,()=>{ycr(n,e,i)},r,jr.HIERARCHY_ADD_EDGES)).then(()=>n)}function ple(e,t){let r={},n={};He.each(e.root.leaves(),i=>{let o=e.node(i);o.device!=null&&(r[o.device]=!0),o.xlaCluster!=null&&(n[o.xlaCluster]=!0)}),e.devices=He.keys(r),e.xlaClusters=He.keys(n),He.each(e.getNodeMap(),(i,o)=>{i.isGroupNode&&(i.stats=new KS(null),i.deviceHistogram={})}),He.each(e.root.leaves(),i=>{let o=e.node(i),a=o;for(;a.parentNode!=null;){if(o.device!=null){let s=a.parentNode.deviceHistogram;s[o.device]=(s[o.device]||0)+1}if(o.xlaCluster!=null){let s=a.parentNode.xlaClusterHistogram;s[o.xlaCluster]=(s[o.xlaCluster]||0)+1}o.stats!=null&&a.parentNode.stats.combine(o.stats),a=a.parentNode}})}function dle(e){let t=[],r={};return He.each(e.root.leaves(),n=>{let i=e.node(n);if(i.type==jt.OP){let o=i;if(!o.compatible)if(o.owningSeries){if(e.getSeriesGroupType(o.owningSeries)===is.UNGROUP)t.push(o);else if(!r[o.owningSeries]){let a=e.node(o.owningSeries);a&&(r[o.owningSeries]=a,t.push(a))}}else t.push(o);He.each(o.inEmbeddings,a=>{a.compatible||t.push(a)}),He.each(o.outEmbeddings,a=>{a.compatible||t.push(a)})}}),t}function _cr(e,t){let r={};He.each(t.nodes,(n,i)=>{let o=cP(n.name),a=e.root;a.depth=Math.max(o.length,a.depth),r[n.op]||(r[n.op]=[]),r[n.op].push(n);for(let s=0;s<o.length&&(a.depth=Math.max(a.depth,o.length-s),a.cardinality+=n.cardinality,a.opHistogram[n.op]=(a.opHistogram[n.op]||0)+1,n.device!=null&&(a.deviceHistogram[n.device]=(a.deviceHistogram[n.device]||0)+1),n.xlaCluster!=null&&(a.xlaClusterHistogram[n.xlaCluster]=(a.xlaClusterHistogram[n.xlaCluster]||0)+1),n.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1,He.each(n.inEmbeddings,u=>{u.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1}),He.each(n.outEmbeddings,u=>{u.compatible?a.compatibilityHistogram.compatible=(a.compatibilityHistogram.compatible||0)+1:a.compatibilityHistogram.incompatible=(a.compatibilityHistogram.incompatible||0)+1}),s!==o.length-1);s++){let l=o[s],c=e.node(l);if(!c&&(c=lP(l,e.graphOptions),c.parentNode=a,e.setNode(l,c),a.metagraph.setNode(l,c),l.indexOf(Sa)===0&&a.name===qc)){let u=l.substring(Sa.length);r[u]||(r[u]=[]),e.libraryFunctions[u]={node:c,usages:r[u]},c.associatedFunction=u}a=c}e.setNode(n.name,n),n.parentNode=a,a.metagraph.setNode(n.name,n),He.each(n.inEmbeddings,function(s){e.setNode(s.name,s),s.parentNode=n}),He.each(n.outEmbeddings,function(s){e.setNode(s.name,s),s.parentNode=n})})}function ycr(e,t,r){let n=e.getNodeMap(),i=[],o=[],a=(s,l)=>{let c=0;for(;s;)l[c++]=s.name,s=s.parentNode;return c-1};He.each(t.edges,s=>{let l=a(t.nodes[s.v],i),c=a(t.nodes[s.w],o);if(l===-1||c===-1)return;for(;i[l]===o[c];)if(l--,c--,l<0||c<0)throw Error("No difference found between ancestor paths.");let u=n[i[l+1]],h=i[l],f=o[c],p=u.metagraph.edge(h,f);p||(p=Hlt(h,f),u.metagraph.setEdge(h,f,p)),!u.hasNonControlEdges&&!s.isControlDependency&&(u.hasNonControlEdges=!0),p.addBaseEdge(s,e)})}function mle(e,t,r,n,i,o){let a=e.metagraph;He.each(a.nodes(),u=>{let h=a.node(u);h.type===jt.META&&mle(h,t,r,n,i,o)});let s=vcr(a),c=(o?bcr:xcr)(s,a,t.graphOptions);He.each(c,function(u,h){let f=u.metagraph.nodes();He.each(f,p=>{let d=a.node(p);d.owningSeries||(d.owningSeries=h)}),f.length<n&&t.getSeriesGroupType(u.name)===is.GROUP&&t.setSeriesGroupType(u.name,is.UNGROUP),t.getSeriesGroupType(u.name)!==is.UNGROUP&&(t.setNode(h,u),a.setNode(h,u),He.each(f,p=>{let d=a.node(p);u.metagraph.setNode(p,d),u.parentNode=d.parentNode,u.cardinality++,d.device!=null&&(u.deviceHistogram[d.device]=(u.deviceHistogram[d.device]||0)+1),d.xlaCluster!=null&&(u.xlaClusterHistogram[d.xlaCluster]=(u.xlaClusterHistogram[d.xlaCluster]||0)+1),d.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1,He.each(d.inEmbeddings,g=>{g.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1}),He.each(d.outEmbeddings,g=>{g.compatible?u.compatibilityHistogram.compatible=(u.compatibilityHistogram.compatible||0)+1:u.compatibilityHistogram.incompatible=(u.compatibilityHistogram.incompatible||0)+1}),d.parentNode=u,r[p]=h,a.removeNode(p)}))})}function vcr(e){let t={};return He.reduce(e.nodes(),(r,n)=>{let i=e.node(n);if(i.type===jt.META)return r;let o=i.op;return o&&(r[o]=r[o]||[],r[o].push(i.name)),r},t)}function xcr(e,t,r){let n={};return He.each(e,function(i,o){if(i.length<=1)return;let a={};He.each(i,function(s){let l=s.charAt(s.length-1)==="*",c=s.split("/"),u=c[c.length-1],h=c.slice(0,c.length-1).join("/"),f=u.match(/^(\D*)(\d+)$/),p,d,g="";f?(p=f[1],d=f[2]):(p=l?u.substr(0,u.length-1):u,d=0,g=l?"*":"");let _=t3(p,g,h);a[_]=a[_]||[];let y=QS(p,g,h,+d,s,r);a[_].push(y)}),He.each(a,function(s,l){if(s.length<2)return;s.sort(function(u,h){return+u.clusterId-+h.clusterId});let c=[s[0]];for(let u=1;u<s.length;u++){let h=s[u];if(h.clusterId===c[c.length-1].clusterId+1){c.push(h);continue}xH(c,n,+o,t,r),c=[h]}xH(c,n,+o,t,r)})}),n}function bcr(e,t,r){let n={};return He.each(e,function(i,o){if(i.length<=1)return;let a={},s={};He.each(i,function(c){let u=c.charAt(c.length-1)==="*",h=c.split("/"),f=h[h.length-1],p=h.slice(0,h.length-1).join("/"),d=/(\d+)/g,g=[],_,y,x,b,S,C=0;for(;_=d.exec(f);)++C,y=f.slice(0,_.index),x=_[0],b=f.slice(_.index+_[0].length),S=t3(y,b,p),a[S]=a[S],a[S]||(a[S]=QS(y,b,p,+x,c,r)),a[S].ids.push(x),s[c]=s[c]||[],s[c].push([S,x]);C<1&&(y=u?f.substr(0,f.length-1):f,x=0,b=u?"*":"",S=t3(y,b,p),a[S]=a[S],a[S]||(a[S]=QS(y,b,p,+x,c,r)),a[S].ids.push(x),s[c]=s[c]||[],s[c].push([S,x]))});var l={};He.each(s,function(c,u){c.sort(function(y,x){return a[x[0]].ids.length-a[y[0]].ids.length});var h=c[0][0],f=c[0][1];l[h]=l[h]||[];let p=u.split("/"),d=p[p.length-1],g=p.slice(0,p.length-1).join("/");var _=QS(a[h].prefix,a[h].suffix,g,+f,u,r);l[h].push(_)}),He.each(l,function(c,u){if(c.length<2)return;c.sort(function(f,p){return+f.clusterId-+p.clusterId});let h=[c[0]];for(let f=1;f<c.length;f++){let p=c[f];if(p.clusterId===h[h.length-1].clusterId+1){h.push(p);continue}xH(h,n,+o,t,r),h=[p]}xH(h,n,+o,t,r)})}),n}function xH(e,t,r,n,i){if(e.length>1){let o=t3(e[0].prefix,e[0].suffix,e[0].parent,e[0].clusterId,e[e.length-1].clusterId),a=QS(e[0].prefix,e[0].suffix,e[0].parent,r,o,i);He.each(e,function(s){a.ids.push(s.clusterId),a.metagraph.setNode(s.name,n.node(s.name))}),t[o]=a}}var me=Ee(Oe(),1);var y0={DEFAULT_FILL:"#ffffff",DEFAULT_STROKE:"#b2b2b2",COMPATIBLE:"#0f9d58",INCOMPATIBLE:"#db4437"},Ku={DEFAULT_FILL:"#d9d9d9",DEFAULT_STROKE:"#a6a6a6",SATURATION:.6,LIGHTNESS:.85,EXPANDED_COLOR:"#f0f0f0",HUES:[220,100,180,40,20,340,260,300,140,60],STRUCTURE_PALETTE(e,t){let r=Ku.HUES,n=r.length,i=r[e%n],o=Math.sin(i*Math.PI/360),a=t?30:90-60*o,s=t?95:80;return Vm(i,.01*a,.01*s).toString()},DEVICE_PALETTE(e){return Ku.STRUCTURE_PALETTE(e)},XLA_CLUSTER_PALETTE(e){return Ku.STRUCTURE_PALETTE(e)},UNKNOWN:"#eee",GRADIENT_OUTLINE:"#888"},Vlt={DEFAULT_FILL:"white",DEFAULT_STROKE:"#b2b2b2"},Xo={minNodeCountForExtraction:15,minDegreeForExtraction:5,maxControlDegree:4,maxBridgePathDegree:4,outExtractTypes:["NoOp"],inExtractTypes:[],detachAllEdgesForHighDegree:!0,extractIsolatedNodesWithAnnotationsOnOneSide:!0,enableBridgegraph:!0,minMaxColors:["#fff5f0","#fb6a4a"],maxAnnotations:5},wcr=new RegExp("^(?:"+Sa+")?(\\w+)_[a-z0-9]{8}(?:_\\d+)?$"),lo=class{constructor(t,r,n){this.hierarchy=t,this.displayingStats=r,this.autoExtractNodes=n,this.index={},this.renderedOpNames=[],this.computeScales(),this.hasSubhierarchy={},this.root=new SH(t.root,t.graphOptions),this.index[t.root.name]=this.root,this.renderedOpNames.push(t.root.name),this.buildSubhierarchy(t.root.name),this.root.expanded=!0,this.traceInputs=!1}computeScales(){this.deviceColorMap=gu().domain(this.hierarchy.devices).range(me.map(Ir(this.hierarchy.devices.length),Ku.DEVICE_PALETTE)),this.xlaClusterColorMap=gu().domain(this.hierarchy.xlaClusters).range(me.map(Ir(this.hierarchy.xlaClusters.length),Ku.XLA_CLUSTER_PALETTE));let t=this.hierarchy.root.metagraph,r=lu(t.nodes(),(i,o)=>{let a=t.node(i);if(a.stats!=null)return a.stats.totalBytes});this.memoryUsageScale=On().domain([0,r]).range(Xo.minMaxColors);let n=lu(t.nodes(),(i,o)=>{let a=t.node(i);if(a.stats!=null)return a.stats.getTotalMicros()});this.computeTimeScale=On().domain([0,n]).range(Xo.minMaxColors),this.edgeWidthSizedBasedScale=this.hierarchy.hasShapeInfo?Xse:On().domain([1,this.hierarchy.maxMetaEdgeSize]).range([Q4,tP])}getRenderNodeByName(t){return this.index[t]}getNodeByName(t){return this.hierarchy.node(t)}colorHistogram(t,r){if(Object.keys(t).length>0){let n=me.sum(Object.keys(t).map(i=>t[i]));return Object.keys(t).map(i=>({color:r(i),proportion:t[i]/n}))}return null}getOrCreateRenderNodeByName(t){if(!t)return null;if(t in this.index)return this.index[t];let r=this.hierarchy.node(t);if(!r)return null;let n=r.isGroupNode?new SH(r,this.hierarchy.graphOptions):new Gf(r);this.index[t]=n,this.renderedOpNames.push(t),r.stats&&(n.memoryColor=this.memoryUsageScale(r.stats.totalBytes),n.computeTimeColor=this.computeTimeScale(r.stats.getTotalMicros())),n.isFadedOut=this.displayingStats&&!gH(r.stats);var i=null,o=null,a=null;if(r.isGroupNode){i=r.deviceHistogram,o=r.xlaClusterHistogram;let s=r.compatibilityHistogram.compatible,l=r.compatibilityHistogram.incompatible;(s!=0||l!=0)&&(a=s/(s+l))}else{let s=n.node.device;s&&(i={[s]:1});let l=n.node.xlaCluster;l&&(o={[l]:1}),n.node.type===jt.OP&&(a=n.node.compatible?1:0)}return i&&(n.deviceColors=this.colorHistogram(i,this.deviceColorMap)),o&&(n.xlaClusterColors=this.colorHistogram(o,this.xlaClusterColorMap)),a!=null&&(n.compatibilityColors=[{color:y0.COMPATIBLE,proportion:a},{color:y0.INCOMPATIBLE,proportion:1-a}]),this.index[t]}getNearestVisibleAncestor(t){let r=cP(t),n=0,i=null,o=t;for(;n<r.length&&(o=r[n],i=this.getRenderNodeByName(o),!!i.expanded);n++);if(n==r.length-2){let a=r[n+1];if(i!=null&&i.inAnnotations.nodeNames[a]||i!=null&&i.outAnnotations.nodeNames[a])return a}return o}setDepth(t){yle(this.root,+t)}isNodeAuxiliary(t){let r=this.getRenderNodeByName(t.node.parentNode.name),n=me.find(r.isolatedInExtract,i=>i.node.name===t.node.name);return n?!0:(n=me.find(r.isolatedOutExtract,i=>i.node.name===t.node.name),!!n)}getNamesOfRenderedOps(){return this.renderedOpNames}cloneAndAddFunctionOpNode(t,r,n,i){let o=n.name.replace(r,i),a=t.metagraph.node(o);if(a)return a;a=new _0({name:o,input:[],device:n.device,op:n.op,attr:me.cloneDeep(n.attr)}),a.cardinality=n.cardinality,a.include=n.include,a.outputShapes=me.cloneDeep(n.outputShapes),a.xlaCluster=n.xlaCluster,a.functionInputIndex=n.functionInputIndex,a.functionOutputIndex=n.functionOutputIndex,a.inputs=n.inputs.map(l=>{let c=me.clone(l);return c.name=l.name.replace(r,i),c}),a.parentNode=t,t.metagraph.setNode(a.name,a),this.hierarchy.setNode(a.name,a);let s=l=>this.cloneAndAddFunctionOpNode(t,r,l,i);return a.inEmbeddings=n.inEmbeddings.map(s),a.outEmbeddings=n.outEmbeddings.map(s),a}cloneFunctionLibraryMetanode(t,r,n,i,o){let a={},s=this.cloneFunctionLibraryMetanodeHelper(t,r,n,i,o,a);return me.isEmpty(a)||this.patchEdgesFromFunctionOutputs(r,a),s}cloneFunctionLibraryMetanodeHelper(t,r,n,i,o,a){let s=lP(n.name.replace(i,o));return s.depth=n.depth,s.cardinality=n.cardinality,s.templateId=n.templateId,s.opHistogram=me.clone(n.opHistogram),s.deviceHistogram=me.clone(n.deviceHistogram),s.xlaClusterHistogram=me.clone(n.xlaClusterHistogram),s.hasNonControlEdges=n.hasNonControlEdges,s.include=n.include,s.nodeAttributes=me.clone(n.nodeAttributes),s.associatedFunction=n.associatedFunction,me.each(n.metagraph.nodes(),l=>{let c=n.metagraph.node(l);switch(c.type){case jt.META:let u=this.cloneFunctionLibraryMetanodeHelper(t,r,c,i,o,a);u.parentNode=s,s.metagraph.setNode(u.name,u),this.hierarchy.setNode(u.name,u);break;case jt.OP:let h=this.cloneAndAddFunctionOpNode(s,i,c,o);me.isNumber(h.functionInputIndex)&&this.patchEdgesIntoFunctionInputs(r,h),me.isNumber(h.functionOutputIndex)&&(a[h.functionOutputIndex]=h);break;default:console.warn(c.name+" is oddly neither a metanode nor an opnode.")}}),this.cloneLibraryMetanodeEdges(n,s,i,o),s}cloneLibraryMetanodeEdges(t,r,n,i){me.each(t.metagraph.edges(),o=>{let a=t.metagraph.edge(o),s=a.v.replace(n,i),l=a.w.replace(n,i),c=new qf(s,l);c.inbound=a.inbound,c.numRegularEdges=a.numRegularEdges,c.numControlEdges=a.numControlEdges,c.numRefEdges=a.numRefEdges,c.totalSize=a.totalSize,a.baseEdgeList&&(c.baseEdgeList=a.baseEdgeList.map(u=>{let h=me.clone(u);return h.v=u.v.replace(n,i),h.w=u.w.replace(n,i),h})),r.metagraph.node(l)?r.metagraph.setEdge(s,l,c):r.metagraph.setEdge(l,s,c)})}patchEdgesIntoFunctionInputs(t,r){let n=Math.min(r.functionInputIndex,t.inputs.length-1),i=me.clone(t.inputs[n]);for(;i.isControlDependency;)n++,i=t.inputs[n];r.inputs.push(i);let o=this.hierarchy.getPredecessors(t.name),a,s=0;me.each(o.regular,l=>{if(s+=l.numRegularEdges,s>n)return a=l,!1}),me.each(a.baseEdgeList,l=>{l.w===t.name&&(l.w=r.name),l.v===t.name&&(l.v=r.name)})}patchEdgesFromFunctionOutputs(t,r){let n=this.hierarchy.getSuccessors(t.name);me.each(n.regular,i=>{me.each(i.baseEdgeList,o=>{let a=this.hierarchy.node(o.w);me.each(a.inputs,s=>{if(s.name===t.name){let l=r[s.outputTensorKey];s.name=l.name,s.outputTensorKey=o.outputTensorKey}})}),me.each(i.baseEdgeList,o=>{o.v=r[o.outputTensorKey].name,o.outputTensorKey="0"})})}buildSubhierarchy(t){if(t in this.hasSubhierarchy)return;this.hasSubhierarchy[t]=!0;let r=this.index[t];if(r.node.type!==jt.META&&r.node.type!==jt.SERIES)return;let n=r,i=n.node.metagraph,o=n.coreGraph,a=[],s=[];me.isEmpty(this.hierarchy.libraryFunctions)||(me.each(i.nodes(),d=>{let g=i.node(d),_=this.hierarchy.libraryFunctions[g.op];if(!_||d.indexOf(Sa)===0)return;let y=this.cloneFunctionLibraryMetanode(i,g,_.node,_.node.name,g.name);a.push(g),s.push(y)}),me.each(s,(d,g)=>{let _=a[g];d.parentNode=_.parentNode,i.setNode(_.name,d),this.hierarchy.setNode(_.name,d)})),me.each(i.nodes(),d=>{let g=this.getOrCreateRenderNodeByName(d),_=g.node;o.setNode(d,g),_.isGroupNode||(me.each(_.inEmbeddings,y=>{let x=new Od(null),b=new Gf(y);gle(g,y,b,x,gi.CONSTANT),this.index[y.name]=b}),me.each(_.outEmbeddings,y=>{let x=new Od(null),b=new Gf(y);_le(g,y,b,x,gi.SUMMARY),this.index[y.name]=b}))}),me.each(i.edges(),d=>{let g=i.edge(d),_=new Od(g);_.isFadedOut=this.index[d.v].isFadedOut||this.index[d.w].isFadedOut,o.setEdge(d.v,d.w,_)}),n.node.type===jt.META&&Pcr(n,this.autoExtractNodes),me.isEmpty(this.hierarchy.libraryFunctions)||this.buildSubhierarchiesForNeededFunctions(i),t===qc&&me.forOwn(this.hierarchy.libraryFunctions,(d,g)=>{let _=d.node,y=this.getOrCreateRenderNodeByName(_.name);n.libraryFunctionsExtract.push(y),y.node.include=ur.EXCLUDE,o.removeNode(_.name)});let l=n.node.parentNode;if(!l)return;let c=this.index[l.name],u=(d,...g)=>g.concat([d?"IN":"OUT"]).join("~~"),h=this.hierarchy.getBridgegraph(t),f={in:{},out:{},control:{}};me.each(h.edges(),d=>{let g=!!i.node(d.w),_=g?d.v:d.w;h.edge(d).numRegularEdges?g?f.out[_]=(f.out[_]||0)+1:f.in[_]=(f.in[_]||0)+1:f.control[_]=(f.control[_]||0)+1});let p=this.hierarchy.getNodeMap();me.each(h.edges(),d=>{let g=h.edge(d),_=!!i.node(d.w),[y,x]=_?[d.w,d.v]:[d.v,d.w],b=this.index[y],S=this.index[x],C=S?S.node:p[x],P=!g.numRegularEdges&&f.control[x]>Xo.maxControlDegree,[,k]=_?[r.inAnnotations,b.inAnnotations]:[r.outAnnotations,b.outAnnotations],D=(_?f.out:f.in)[x]>Xo.maxBridgePathDegree,B=null,I=!1;if(Xo.enableBridgegraph&&!D&&!P&&b.isInCore()){let W=Z=>{let rt=_?{v:Z,w:t}:{v:t,w:Z};return c.coreGraph.edge(rt)};B=W(x),B||(B=W(u(_,x,l.name))),I=!!B}let L=!1;if(B&&!g.numRegularEdges){let W=B,Z=c.node;for(;W.adjoiningMetaedge;)W=W.adjoiningMetaedge,Z=Z.parentNode;let rt=this.hierarchy.getTopologicalOrdering(Z.name),ot=W.metaedge;L=rt[ot.v]>rt[ot.w]}if(I=I&&!L,!I){k.push(new i3(C,S,new Od(g),gi.SHORTCUT,_));return}let R=u(_,t),F=u(_,x,t),z=o.node(F);if(!z){let W=o.node(R);if(!W){let rt={name:R,type:jt.BRIDGE,isGroupNode:!1,cardinality:0,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:_,nodeAttributes:{}};W=new Gf(rt),this.index[R]=W,o.setNode(R,W)}let Z={name:F,type:jt.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:_,nodeAttributes:{}};z=new Gf(Z),this.index[F]=z,o.setNode(F,z),o.setParent(F,R),W.node.cardinality++}let U=new Od(g);U.adjoiningMetaedge=B,_?o.setEdge(F,y,U):o.setEdge(y,F,U)}),me.each([!0,!1],d=>{let g=u(d,t),_=o.node(g);!_||me.each(o.nodes(),y=>{var k,O;if(o.node(y).node.type===jt.BRIDGE||!(d?!((k=o.predecessors(y))!=null&&k.length):!((O=o.successors(y))!=null&&O.length)))return;let S=u(d,t,"STRUCTURAL_TARGET"),C=o.node(S);if(!C){let D={name:S,type:jt.BRIDGE,isGroupNode:!1,cardinality:1,parentNode:null,stats:null,include:ur.UNSPECIFIED,inbound:d,nodeAttributes:{}};C=new Gf(D),C.structural=!0,this.index[S]=C,o.setNode(S,C),_.node.cardinality++,o.setParent(S,g)}let P=new Od(null);P.structural=!0,P.weight--,d?o.setEdge(S,y,P):o.setEdge(y,S,P)})})}buildSubhierarchiesForNeededFunctions(t){me.each(t.edges(),r=>{let n=t.edge(r),i=new Od(n);me.forEach(i.metaedge.baseEdgeList,o=>{let a=o.v.split(Al);for(let s=a.length;s>=0;s--){let l=a.slice(0,s),c=this.hierarchy.node(l.join(Al));if(c){if(c.type===jt.OP&&this.hierarchy.libraryFunctions[c.op])for(let u=1;u<l.length;u++){let h=l.slice(0,u).join(Al);!h||this.buildSubhierarchy(h)}break}}})})}},i3=class{constructor(t,r,n,i,o){this.node=t,this.renderNodeInfo=r,this.renderMetaedgeInfo=n,this.annotationType=i,this.dx=0,this.dy=0,this.width=0,this.height=0,n&&n.metaedge&&(this.v=n.metaedge.v,this.w=n.metaedge.w),this.isIn=o,this.points=[]}},gi;(function(e){e[e.SHORTCUT=0]="SHORTCUT",e[e.CONSTANT=1]="CONSTANT",e[e.SUMMARY=2]="SUMMARY",e[e.ELLIPSIS=3]="ELLIPSIS"})(gi||(gi={}));var wH=class{constructor(){this.list=[],this.nodeNames={}}push(t){if(t.node.name in this.nodeNames)return;if(this.nodeNames[t.node.name]=!0,this.list.length<Xo.maxAnnotations){this.list.push(t);return}let r=this.list[this.list.length-1];if(r.annotationType===gi.ELLIPSIS){let i=r.node;i.setNumMoreNodes(++i.numMoreNodes);return}let n=new _H(1);this.list.push(new i3(n,new Gf(n),null,gi.ELLIPSIS,t.isIn))}},Gf=class{constructor(t){if(this.node=t,this.expanded=!1,this.inAnnotations=new wH,this.outAnnotations=new wH,this.x=0,this.y=0,this.width=0,this.height=0,this.inboxWidth=0,this.outboxWidth=0,this.excluded=!1,this.structural=!1,this.labelOffset=0,this.radius=0,this.labelHeight=0,this.paddingTop=0,this.paddingLeft=0,this.paddingRight=0,this.paddingBottom=0,this.isInExtract=!1,this.isOutExtract=!1,this.coreBox={width:0,height:0},this.isFadedOut=!1,this.displayName=t.name.substring(t.name.lastIndexOf(Al)+1),t.type===jt.META&&t.associatedFunction){let r=this.displayName.match(wcr);r?this.displayName=r[1]:me.startsWith(this.displayName,Sa)&&(this.displayName=this.displayName.substring(Sa.length))}}isInCore(){return!this.isInExtract&&!this.isOutExtract&&!this.isLibraryFunction}},Od=class{constructor(t){this.metaedge=t,this.adjoiningMetaedge=null,this.structural=!1,this.weight=1,this.isFadedOut=!1}};function gle(e,t,r,n,i){let o=new i3(t,r,n,i,!0);e.inAnnotations.push(o)}function _le(e,t,r,n,i){let o=new i3(t,r,n,i,!1);e.outAnnotations.push(o)}function Scr(e,t){me.each(e.nodes(),r=>{let n=e.node(r);if(n.expanded=t>1,t>0)switch(n.node.type){case jt.META:case jt.SERIES:yle(n,t-1);break}})}var SH=class extends Gf{constructor(t,r){super(t);let i=t.metagraph.graph();this.coreGraph=e3(i.name,g0.CORE,r),this.inExtractBox={width:0,height:0},this.outExtractBox={width:0,height:0},this.libraryFunctionsBox={width:0,height:0},this.isolatedInExtract=[],this.isolatedOutExtract=[],this.libraryFunctionsExtract=[]}};function yle(e,t){e.coreGraph&&Scr(e.coreGraph,t)}function uP(e,t,r){let n=e.node(t),i=e.node(r),o=e.edge(t,r);(n.node.include===ur.INCLUDE||i.node.include===ur.INCLUDE)&&n.node.include!==ur.EXCLUDE&&i.node.include!==ur.EXCLUDE||(_le(n,i.node,i,o,gi.SHORTCUT),gle(i,n.node,n,o,gi.SHORTCUT),e.removeEdge(t,r))}function Ult(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isOutExtract=!0,me.each(n.predecessors(t),(a,s)=>{uP(n,a,t)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.successors(t),(a,s)=>{uP(n,t,a)}),((o=n.neighbors(t))==null?void 0:o.length)===0&&(i.node.include=ur.EXCLUDE,e.isolatedOutExtract.push(i),n.removeNode(t))}function qlt(e,t,r){var o;let n=e.coreGraph,i=n.node(t);i.isInExtract=!0,me.each(n.successors(t),(a,s)=>{uP(n,t,a)}),(Xo.detachAllEdgesForHighDegree||r)&&me.each(n.predecessors(t),(a,s)=>{uP(n,a,t)}),((o=n.neighbors(t))==null?void 0:o.length)===0&&(i.node.include=ur.EXCLUDE,e.isolatedInExtract.push(i),n.removeNode(t))}function vle(e,t){if(e.type===jt.OP){for(let r=0;r<t.length;r++)if(e.op===t[r])return!0}else if(e.type===jt.META){let r=e.getRootOp();if(r){for(let n=0;n<t.length;n++)if(r.op===t[n])return!0}}return!1}function Mcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{var i,o;t.node(r).node.include===ur.EXCLUDE&&!r.startsWith(Sa)&&(((i=e.coreGraph.outEdges(r))==null?void 0:i.length)>((o=e.coreGraph.inEdges(r))==null?void 0:o.length)?Ult(e,r,!0):qlt(e,r,!0))})}function Ecr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&vle(n.node,Xo.outExtractTypes)&&Ult(e,r)})}function Tcr(e){let t=e.coreGraph;me.each(t.nodes(),r=>{let n=t.node(r);n.node.include===ur.UNSPECIFIED&&vle(n.node,Xo.inExtractTypes)&&qlt(e,r)})}function Ccr(e){let t=e.coreGraph,r={},n={},i=0;if(me.each(t.nodes(),_=>{var b,S,C,P;if(t.node(_).node.include!==ur.UNSPECIFIED)return;let y=me.reduce(t.predecessors(_),(k,O)=>{let D=t.edge(O,_).metaedge;return k+(D.numRegularEdges?1:0)},0);y===0&&((b=t.predecessors(_))==null?void 0:b.length)>0&&(y=(S=t.predecessors(_))==null?void 0:S.length);let x=me.reduce(t.successors(_),(k,O)=>{let D=t.edge(_,O).metaedge;return k+(D.numRegularEdges?1:0)},0);x===0&&((C=t.successors(_))==null?void 0:C.length)>0&&(x=(P=t.successors(_))==null?void 0:P.length),r[_]=y,n[_]=x,i++}),i<Xo.minNodeCountForExtraction)return;let o=Xo.minDegreeForExtraction-1,a=Math.round(i*.75),s=Math.round(i*.25),l=Object.keys(r).sort((_,y)=>r[_]-r[y]),c=r[l[a]],u=r[l[s]],h=c+c-u;h=Math.max(h,o);for(let _=i-1;r[l[_]]>h;_--)qlt(e,l[_]);let f=Object.keys(n).sort((_,y)=>n[_]-n[y]),p=n[f[a]],d=n[f[s]],g=p+(p-d)*4;g=Math.max(g,o);for(let _=i-1;n[f[_]]>g;_--){let y=t.node(f[_]);!y||y.isInExtract||Ult(e,f[_])}}function Acr(e){let t=e.coreGraph,r={};me.each(t.edges(),n=>{t.edge(n).metaedge.numRegularEdges||((r[n.v]=r[n.v]||[]).push(n),(r[n.w]=r[n.w]||[]).push(n))}),me.each(r,(n,i)=>{n.length>Xo.maxControlDegree&&me.each(n,o=>uP(t,o.v,o.w))})}function Pcr(e,t){Mcr(e),Xo.outExtractTypes.length&&Ecr(e),Xo.inExtractTypes.length&&Tcr(e),t&&Ccr(e),Xo.maxControlDegree&&Acr(e);let r=e.coreGraph;me.each(r.nodes(),n=>{var a;let i=r.node(n),o=(a=r.neighbors(n))==null?void 0:a.length;if(i.node.include===ur.UNSPECIFIED&&o===0){let s=i.outAnnotations.list.length>0,l=i.inAnnotations.list.length>0;i.isInExtract?(e.isolatedInExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):i.isOutExtract?(e.isolatedOutExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):Xo.extractIsolatedNodesWithAnnotationsOnOneSide&&(s&&!l?(i.isInExtract=!0,e.isolatedInExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)):l&&!s&&(i.isOutExtract=!0,e.isolatedOutExtract.push(i),i.node.include=ur.EXCLUDE,r.removeNode(n)))}})}function xle(e,t,r){let n=r.split("/"),i=n[n.length-1].match(/(.*):\w+/);(i==null?void 0:i.length)===2&&(n[n.length-1]=i==null?void 0:i[1]);let o=n[0],a=t.getRenderNodeByName(o);for(let s=1;s<n.length&&a.node.type!==jt.OP;s++)t.buildSubhierarchy(o),a.expanded=!0,e.setNodeExpanded(a),o+="/"+n[s],a=t.getRenderNodeByName(o);return a.node.name}var Mle=Ee(Olt(),1),Ze=Ee(Oe(),1);var Tr={animation:{duration:250},graph:{meta:{nodeSep:5,rankSep:25,edgeSep:5},series:{nodeSep:5,rankSep:25,edgeSep:5},padding:{paddingTop:40,paddingLeft:20}},subscene:{meta:{paddingTop:10,paddingBottom:10,paddingLeft:10,paddingRight:10,labelHeight:20,extractXOffset:15,extractYOffset:20},series:{paddingTop:10,paddingBottom:10,paddingLeft:10,paddingRight:10,labelHeight:10}},nodeSize:{meta:{radius:5,width:60,maxLabelWidth:52,height:On().domain([1,200]).range([15,60]).clamp(!0),expandButtonRadius:3},op:{width:15,height:6,radius:3,labelOffset:-8,maxLabelWidth:30},series:{expanded:{radius:10,labelOffset:0},vertical:{width:16,height:13,labelOffset:-13},horizontal:{width:24,height:8,radius:10,labelOffset:-10}},bridge:{width:20,height:20,radius:2,labelOffset:0}},shortcutSize:{op:{width:10,height:4},meta:{width:12,height:4,radius:1},series:{width:14,height:4}},annotations:{inboxWidth:50,outboxWidth:50,xOffset:10,yOffset:3,labelOffset:2,maxLabelWidth:40},constant:{size:{width:4,height:4}},series:{maxStackCount:3,parallelStackOffsetRatio:.2,towerStackOffsetRatio:.5},minimap:{size:150}},o3=140;function MH(e){e.node.isGroupNode&&Lcr(e),e.node.type===jt.META?kcr(e):e.node.type===jt.SERIES&&Rcr(e)}function Icr(e){e.inboxWidth=e.inAnnotations.list.length>0?Tr.annotations.inboxWidth:0,e.outboxWidth=e.outAnnotations.list.length>0?Tr.annotations.outboxWidth:0,e.coreBox.width=e.width,e.coreBox.height=e.height;let t=e.displayName.length,r=3;e.width=Math.max(e.coreBox.width+e.inboxWidth+e.outboxWidth,t*r)}function Lcr(e){let t=e.coreGraph.nodes().map(r=>e.coreGraph.node(r)).concat(e.isolatedInExtract,e.isolatedOutExtract,e.libraryFunctionsExtract);Ze.each(t,r=>{switch(r.node.type){case jt.OP:Ze.extend(r,Tr.nodeSize.op);break;case jt.BRIDGE:Ze.extend(r,Tr.nodeSize.bridge);break;case jt.META:r.expanded?MH(r):(Ze.extend(r,Tr.nodeSize.meta),r.height=Tr.nodeSize.meta.height(r.node.cardinality));break;case jt.SERIES:if(r.expanded)Ze.extend(r,Tr.nodeSize.series.expanded),MH(r);else{let i=r.node.hasNonControlEdges?Tr.nodeSize.series.vertical:Tr.nodeSize.series.horizontal;Ze.extend(r,i)}break;default:throw Error("Unrecognized node type: "+r.node.type)}r.expanded||Icr(r),Ncr(r)})}function Ele(e,t){Ze.extend(e.graph(),{nodesep:t.nodeSep,ranksep:t.rankSep,edgesep:t.edgeSep});let r=[],n=[];if(Ze.each(e.nodes(),l=>{e.node(l).node.type===jt.BRIDGE?r.push(l):n.push(l)}),!n.length)return{width:0,height:0};Mle.layout(e);let i=1/0,o=1/0,a=-1/0,s=-1/0;return Ze.each(n,l=>{let c=e.node(l),u=.5*c.width,h=c.x-u,f=c.x+u;i=h<i?h:i,a=f>a?f:a;let p=.5*c.height,d=c.y-p,g=c.y+p;o=d<o?d:o,s=g>s?g:s}),Ze.each(e.edges(),l=>{let c=e.edge(l);if(c.structural)return;let u=e.node(c.metaedge.v),h=e.node(c.metaedge.w);if(c.points.length===3&&Dcr(c.points)){if(u!=null){let d=u.expanded?u.x:v0(u);c.points[0].x=d}if(h!=null){let d=h.expanded?h.x:v0(h);c.points[2].x=d}c.points=[c.points[0],c.points[1]]}let f=c.points[c.points.length-2];h!=null&&(c.points[c.points.length-1]=Sle(f,h));let p=c.points[1];u!=null&&(c.points[0]=Sle(p,u)),Ze.each(c.points,d=>{i=d.x<i?d.x:i,a=d.x>a?d.x:a,o=d.y<o?d.y:o,s=d.y>s?d.y:s})}),Ze.each(e.nodes(),l=>{let c=e.node(l);c.x-=i,c.y-=o}),Ze.each(e.edges(),l=>{Ze.each(e.edge(l).points,c=>{c.x-=i,c.y-=o})}),{width:a-i,height:s-o}}function kcr(e){let t=Tr.subscene.meta;Ze.extend(e,t),Ze.extend(e.coreBox,Ele(e.coreGraph,Tr.graph.meta));let r=e.isolatedInExtract.length?Ze.maxBy(e.isolatedInExtract,c=>c.width).width:null;e.inExtractBox.width=r!=null?r:0,e.inExtractBox.height=Ze.reduce(e.isolatedInExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let n=e.isolatedOutExtract.length?Ze.maxBy(e.isolatedOutExtract,c=>c.width).width:null;e.outExtractBox.width=n!=null?n:0,e.outExtractBox.height=Ze.reduce(e.isolatedOutExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let i=e.libraryFunctionsExtract.length?Ze.maxBy(e.libraryFunctionsExtract,c=>c.width).width:null;e.libraryFunctionsBox.width=i!=null?i:0,e.libraryFunctionsBox.height=Ze.reduce(e.libraryFunctionsExtract,(c,u,h)=>{let f=h>0?t.extractYOffset:0;return u.x=0,u.y=c+f+u.height/2,c+f+u.height},0);let o=0;e.isolatedInExtract.length>0&&o++,e.isolatedOutExtract.length>0&&o++,e.libraryFunctionsExtract.length>0&&o++,e.coreGraph.nodeCount()>0&&o++;let a=Tr.subscene.meta.extractXOffset,s=o<=1?0:o*a,l=Math.max(o3,e.inExtractBox.width+e.outExtractBox.width);e.coreBox.width+=l+s+e.libraryFunctionsBox.width+s,e.coreBox.height=t.labelHeight+Math.max(e.inExtractBox.height,e.coreBox.height,e.libraryFunctionsBox.height,e.outExtractBox.height),e.width=e.coreBox.width+t.paddingLeft+t.paddingRight,e.height=e.paddingTop+e.coreBox.height+e.paddingBottom}function Rcr(e){let t=e.coreGraph,r=Tr.subscene.series;Ze.extend(e,r),Ze.extend(e.coreBox,Ele(e.coreGraph,Tr.graph.series)),Ze.each(t.nodes(),n=>{t.node(n).excluded=!1}),e.width=e.coreBox.width+r.paddingLeft+r.paddingRight,e.height=e.coreBox.height+r.paddingTop+r.paddingBottom}function Ncr(e){if(e.expanded)return;let t=e.inAnnotations.list,r=e.outAnnotations.list;Ze.each(t,u=>ble(u)),Ze.each(r,u=>ble(u));let n=Tr.annotations,i=Ze.reduce(t,(u,h,f)=>{let p=f>0?n.yOffset:0;return h.dx=-(e.coreBox.width+h.width)/2-n.xOffset,h.dy=u+p+h.height/2,u+p+h.height},0);Ze.each(t,u=>{u.dy-=i/2,u.labelOffset=n.labelOffset});let o=Ze.reduce(r,(u,h,f)=>{let p=f>0?n.yOffset:0;return h.dx=(e.coreBox.width+h.width)/2+n.xOffset,h.dy=u+p+h.height/2,u+p+h.height},0);Ze.each(r,u=>{u.dy-=o/2,u.labelOffset=n.labelOffset});let a=Math.min(e.height/2-e.radius,i/2);a=a<0?0:a;let s=On().domain([0,t.length-1]).range([-a,a]);Ze.each(t,(u,h)=>{u.points=[{dx:u.dx+u.width/2,dy:u.dy},{dx:-e.coreBox.width/2,dy:t.length>1?s(h):0}]});let l=Math.min(e.height/2-e.radius,o/2);l=l<0?0:l;let c=On().domain([0,r.length-1]).range([-l,l]);Ze.each(r,(u,h)=>{u.points=[{dx:e.coreBox.width/2,dy:r.length>1?c(h):0},{dx:u.dx-u.width/2,dy:u.dy}]}),e.height=Math.max(e.height,i,o)}function ble(e){switch(e.annotationType){case gi.CONSTANT:Ze.extend(e,Tr.constant.size);break;case gi.SHORTCUT:if(e.node.type===jt.OP)Ze.extend(e,Tr.shortcutSize.op);else if(e.node.type===jt.META)Ze.extend(e,Tr.shortcutSize.meta);else if(e.node.type===jt.SERIES)Ze.extend(e,Tr.shortcutSize.series);else throw Error("Invalid node type: "+e.node.type);break;case gi.SUMMARY:Ze.extend(e,Tr.constant.size);break}}function v0(e){if(e.expanded)return e.x;let t=e.inAnnotations.list.length?e.inboxWidth:0;return e.x-e.width/2+t+e.coreBox.width/2}function wle(e,t){let r=t.x-e.x,n=t.y-e.y;return 180*Math.atan(n/r)/Math.PI}function Dcr(e){let t=wle(e[0],e[1]);for(let r=1;r<e.length-1;r++){let n=wle(e[r],e[r+1]);if(Math.abs(n-t)>1)return!1;t=n}return!0}function Sle(e,t){let r=t.expanded?t.x:v0(t),n=t.y,i=e.x-r,o=e.y-n,a=t.expanded?t.width:t.coreBox.width,s=t.expanded?t.height:t.coreBox.height,l,c;return Math.abs(o)*a/2>Math.abs(i)*s/2?(o<0&&(s=-s),l=o===0?0:s/2*i/o,c=s/2):(i<0&&(a=-a),l=a/2,c=i===0?0:a/2*o/i),{x:r+l,y:n+c}}var Pl=m0,Hi=ve,Ocr=320,zcr=150,fP=[{background_color:"#CC2F2C",label:"NaN"},{background_color:"#FF8D00",label:"-\u221E"},{background_color:"#EAEAEA",label:"-"},{background_color:"#A5A5A5",label:"0"},{background_color:"#262626",label:"+"},{background_color:"#003ED4",label:"+\u221E"}];function Cle(e,t,r,n){let i=e.getBoundingClientRect(),o=null;try{if(o=t.getBBox(),(o==null?void 0:o.width)===0)return}catch(c){return}let a=.9*Math.min(i.width/(o==null?void 0:o.width),i.height/(o==null?void 0:o.height),2),s=Tr.graph,l=Xh.scale(a).translate(s.padding.paddingLeft,s.padding.paddingTop);Ht(e).transition().duration(500).call(r.transform,l).on("end.fitted",()=>{r.on("end.fitted",null),n()})}function Ale(e,t,r,n){let i=Ht(t).select(`[data-name="${e}"]`).node();if(!i)return console.warn(`panToNode() failed for node name "${e}"`),!1;let o=i.getBBox(),a=i.getScreenCTM(),s=t.createSVGPoint(),l=t.createSVGPoint();s.x=o.x,s.y=o.y,l.x=o.x+o.width,l.y=o.y+o.height,s=s.matrixTransform(a),l=l.matrixTransform(a);let c=(p,d,g,_)=>!(p>g&&d<_),u=t.getBoundingClientRect(),h=u.left+u.width-Ocr,f=u.top+u.height-zcr;if(c(s.x,l.x,u.left,h)||c(s.y,l.y,u.top,f)){let p=(s.x+l.x)/2,d=(s.y+l.y)/2,g=u.left+u.width/2-p,_=u.top+u.height/2-d,y=i2(t);return Ht(t).transition().duration(500).call(n.translateBy,g/y.k,_/y.k),!0}return!1}function Ple(e,t){let r=t.node.type===jt.SERIES?0:Tr.subscene.meta.labelHeight;a3(Pl(e,"g",Hi.Scene.CORE),0,r);let n=t.isolatedInExtract.length>0,i=t.isolatedOutExtract.length>0,o=t.libraryFunctionsExtract.length>0,a=Tr.subscene.meta.extractXOffset,s=0;if(n&&(s+=t.outExtractBox.width),i&&(s+=t.outExtractBox.width),n){let l=t.coreBox.width;s<o3?l=l-o3+t.inExtractBox.width/2:l=l-t.inExtractBox.width/2-t.outExtractBox.width-(i?a:0),l=l-t.libraryFunctionsBox.width-(o?a:0),a3(Pl(e,"g",Hi.Scene.INEXTRACT),l,r)}if(i){let l=t.coreBox.width;s<o3?l=l-o3+t.outExtractBox.width/2:l-=t.outExtractBox.width/2,l=l-t.libraryFunctionsBox.width-(o?a:0),a3(Pl(e,"g",Hi.Scene.OUTEXTRACT),l,r)}if(o){let l=t.coreBox.width-t.libraryFunctionsBox.width/2;a3(Pl(e,"g",Hi.Scene.FUNCTION_LIBRARY),l,r)}}function Ile(e,t){Ht(e).on("click",()=>{t.fire("graph-select")})}function a3(e,t,r){e.attr("transform")!=null&&(e=e.transition("position")),e.attr("transform","translate("+t+","+r+")")}function zd(e,t,r,n,i){e.transition().attr("x",t-n/2).attr("y",r-i/2).attr("width",n).attr("height",i)}function Lle(e,t,r,n,i){let o=i/2,a=n/2,s=[[t,r-o],[t+a,r+o],[t-a,r+o]];e.transition().attr("points",s.map(l=>l.join(",")).join(" "))}function kle(e,t){let r=v0(t),n=t.expanded?t.width:t.coreBox.width,i=t.expanded?t.height:t.coreBox.height,o=r+n/2-6,a=t.y-i/2+6;t.node.type===jt.SERIES&&!t.expanded&&(o+=10,a-=2);let s="translate("+o+","+a+")";e.selectAll("path").transition().attr("transform",s),e.select("circle").transition().attr({cx:o,cy:a,r:Tr.nodeSize.meta.expandButtonRadius})}function EH(e,t,r,n,i){e.transition().attr("cx",t).attr("cy",r).attr("rx",n/2).attr("ry",i/2)}function Tle(e,t){return t?e.toFixed(0):Math.abs(e)>=1?e.toFixed(1):e.toExponential(1)}function Fcr(e,t,r,n){let i="Device: "+e.device_name+`
`;i+="dtype: "+e.dtype+`
`;let o="(scalar)";e.shape.length>0&&(o="("+e.shape.join(",")+")"),i+=`
shape: `+o+`

`,i+="#(elements): "+t+`
`;let a=[];for(let s=0;s<r.length;s++)r[s]>0&&a.push("#("+fP[s].label+"): "+r[s]);return i+=a.join(", ")+`

`,n.max>=n.min&&(i+="min: "+n.min+", max: "+n.max+`
`,i+="mean: "+n.mean+", stddev: "+n.stddev),i}function Bcr(e,t,r,n,i=60,o=10,a=0,s){if(Ht(e.parentNode).selectAll(".health-pill").remove(),!t)return;let l=t.value,c=l.slice(2,8),u=c[0],h=c[1],f=c[5],p=l[1],d={min:l[8],max:l[9],mean:l[10],stddev:Math.sqrt(l[11])};i==null&&(i=60),o==null&&(o=10),a==null&&(a=0),r!=null&&r.node.type===jt.OP&&(i/=2,o/=2);let g=document.createElementNS(ju,"g");g.classList.add("health-pill");let _=document.createElementNS(ju,"defs");g.appendChild(_);let y=document.createElementNS(ju,"linearGradient"),x="health-pill-gradient-"+n;y.setAttribute("id",x);let b=0,S="0%";for(let D=0;D<c.length;D++){if(!c[D])continue;b+=c[D];let B=document.createElementNS(ju,"stop");B.setAttribute("offset",S),B.setAttribute("stop-color",fP[D].background_color),y.appendChild(B);let I=document.createElementNS(ju,"stop"),L=b*100/p+"%";I.setAttribute("offset",L),I.setAttribute("stop-color",fP[D].background_color),y.appendChild(I),S=L}_.appendChild(y);let C=document.createElementNS(ju,"rect");C.setAttribute("fill","url(#"+x+")"),C.setAttribute("width",String(i)),C.setAttribute("height",String(o)),C.setAttribute("y",String(a)),g.appendChild(C);let P=document.createElementNS(ju,"title");P.textContent=Fcr(t,p,c,d),g.appendChild(P);let k=!1;if(r!=null){let D=r.x-i/2,B=r.y-o-r.height/2-2;if(r.labelOffset<0&&(B+=r.labelOffset),g.setAttribute("transform","translate("+D+", "+B+")"),c[2]||c[3]||c[4]){let L=r.node.attr;if(L&&L.length){for(let R=0;R<L.length;R++)if(L[R].key==="T"){let F=L[R].value.type;k=F&&/^DT_(BOOL|INT|UINT)/.test(F);break}}}}let O=document.createElementNS(ju,"text");if(Number.isFinite(d.min)&&Number.isFinite(d.max)){let D=Tle(d.min,k),B=Tle(d.max,k);if(p>1?O.textContent=D+" ~ "+B:O.textContent=D,u>0||h>0||f>0){O.textContent+=" (";let I=[];u>0&&I.push(`NaN\xD7${u}`),h>0&&I.push(`-\u221E\xD7${h}`),f>0&&I.push(`+\u221E\xD7${f}`),O.textContent+=I.join("; ")+")"}}else O.textContent="(No finite elements)";O.classList.add("health-pill-stats"),s==null&&(s=i/2),O.setAttribute("x",String(s)),O.setAttribute("y",String(a-2)),g.appendChild(O),zt(e.parentNode).appendChild(g)}function Rle(e,t,r){if(!t)return;let n=1;Ht(e).selectAll("g.nodeshape").each(function(o){let a=t[o.node.name],s=a?a[r]:null;Bcr(this,s,o,n++)})}var qn;(function(e){e.NONE="none",e.COMPUTE_TIME="compute_time",e.DEVICE="device",e.MEMORY="memory",e.OP_COMPATIBILITY="op_compatibility",e.STRUCTURE="structure",e.XLA_CLUSTER="xla_cluster"})(qn||(qn={}));var mP=Ee(Oe(),1);var Vi=Ee(Oe(),1);function Hcr(e){let t=0,r=0,n=e;for(;n&&n.offsetLeft>=0&&n.offsetTop>=0;)t+=n.offsetLeft-n.scrollLeft,r+=n.offsetTop-n.scrollTop,n=n.offsetParent;return{left:t,top:r}}function Wlt(e,t){let r=e.getContextMenu(),n=Ht(e.getContextMenu());return function(i,o){let a=qt,s=Hcr(e);n.style("display","block").style("left",a.clientX-s.left+1+"px").style("top",a.clientY-s.top+1+"px"),a.preventDefault(),a.stopPropagation();function l(u){u&&u.composedPath().includes(r)||(n.style("display","none"),document.body.removeEventListener("mousedown",l,{capture:!0}))}document.body.addEventListener("mousedown",l,{capture:!0}),n.text(""),n.append("ul").selectAll("li").data(t).enter().append("li").on("click",(u,h)=>{u.action(this,i,o),l()}).text(function(u){return u.title(i)})}}var AH=Ee(Oe(),1);var Ucr="\xD7",Nle=qb().domain([Q4,tP]).range(["small","medium","large","xlarge"]),qcr=2.5;function pP(e){return e.v+ole+e.w}function zle(e,t,r){let n=r,i=[];i=AH.reduce(t.edges(),(s,l)=>{let c=t.edge(l);return s.push({v:l.v,w:l.w,label:c}),s},i);let a=An(e,"g",ve.Edge.CONTAINER).selectAll(function(){return this.childNodes}).data(i,pP);return a.enter().append("g").attr("class",ve.Edge.GROUP).attr("data-edge",pP).each(function(s){let l=Ht(this);s.label.edgeGroup=l,n._edgeGroupIndex[pP(s)]=l,n.handleEdgeSelected&&l.on("click",c=>{qt.stopPropagation(),n.fire("edge-select",{edgeData:c,edgeGroup:l})}),Xlt(l,s,n)}).merge(a).each(function(){Wcr(r,this)}).each(function(s){Ycr(Ht(this),s,n)}),a.exit().each(s=>{delete n._edgeGroupIndex[pP(s)]}).remove(),a}function Ylt(e,t){let r=t.getNodeByName(e.v);if(r.outputShapes==null||AH.isEmpty(r.outputShapes))return null;let n=r.outputShapes[e.outputTensorKey];return n==null?null:n.length===0?"scalar":n.map(i=>i===-1?"?":i).join(Ucr)}function jlt(e,t){return t.edgeLabelFunction?t.edgeLabelFunction(e,t):e.baseEdgeList.length>1?e.baseEdgeList.length+" tensors":Ylt(e.baseEdgeList[0],t)}function Dle(e,t,r){let n=document.createElementNS(ju,"path");for(let i=1;i<e.length;i++)if(n.setAttribute("d",r(e.slice(0,i))),n.getTotalLength()>t)return i-1;return e.length-1}function Ole(e,t,r){let n=vu().x(u=>u.x).y(u=>u.y),i=Ht(document.createElementNS("http://www.w3.org/2000/svg","path")).attr("d",n(e)),o=+t.attr("markerWidth"),a=t.attr("viewBox").split(" ").map(Number),s=a[2]-a[0],l=+t.attr("refX"),c=i.node();if(r){let u=1-l/s,h=o*u,f=c.getPointAtLength(h),p=Dle(e,h,n);return e[p-1]={x:f.x,y:f.y},e.slice(p-1)}else{let u=1-l/s,h=c.getTotalLength()-o*u,f=c.getPointAtLength(h),p=Dle(e,h,n);return e[p]={x:f.x,y:f.y},e.slice(0,p+1)}}function Xlt(e,t,r,n){n=n||ve.Edge.LINE,t.label&&t.label.structural&&(n+=" "+ve.Edge.STRUCTURAL),t.label&&t.label.metaedge&&t.label.metaedge.numRefEdges&&(n+=" "+ve.Edge.REFERENCE_EDGE),r.handleEdgeSelected&&(n+=" "+ve.Edge.SELECTABLE);let i="path_"+pP(t),o;if(r.renderHierarchy.edgeWidthFunction)o=r.renderHierarchy.edgeWidthFunction(t,n);else{let c=1;t.label!=null&&t.label.metaedge!=null&&(c=t.label.metaedge.totalSize),o=r.renderHierarchy.edgeWidthSizedBasedScale(c)}let a=e.append("path").attr("id",i).attr("class",n).style("stroke-width",o+"px");if(t.label&&t.label.metaedge)if(t.label.metaedge.numRefEdges){let c=`reference-arrowhead-${Nle(o)}`;a.style("marker-start",`url(#${c})`),t.label.startMarkerId=c}else{let c=`dataflow-arrowhead-${Nle(o)}`;a.style("marker-end",`url(#${c})`),t.label.endMarkerId=c}if(t.label==null||t.label.metaedge==null)return;let s=jlt(t.label.metaedge,r.renderHierarchy);if(s==null)return;let l=o>qcr?"central":"text-after-edge";e.append("text").append("textPath").attr("xlink:href","#"+i).attr("startOffset","50%").attr("text-anchor","middle").attr("dominant-baseline","central").text(s)}var CH=vu().curve(W8).x(e=>e.x).y(e=>e.y);function Gcr(e,t,r,n,i){let o=r.label,a=o.adjoiningMetaedge,s=o.points,{shadowRoot:l}=e;if(r.label.startMarkerId&&(s=Ole(s,Ht(l==null?void 0:l.querySelector("#"+r.label.startMarkerId)),!0)),r.label.endMarkerId&&(s=Ole(s,Ht(l==null?void 0:l.querySelector("#"+r.label.endMarkerId)),!1)),!a)return nc(i,CH(s));let c=a.edgeGroup.node().firstChild,u=o.metaedge.inbound;return function(h){var g;let f=c.getPointAtLength(u?c.getTotalLength():0).matrixTransform(c.getCTM()).matrixTransform((g=t.getCTM())==null?void 0:g.inverse()),p=u?0:s.length-1;return s[p].x=f.x,s[p].y=f.y,CH(s)}}function Wcr(e,t){Ht(t).select("path."+ve.Edge.LINE).transition().attrTween("d",function(r,n,i){return Gcr(e,this,r,n,i)})}function Ycr(e,t,r){e.classed("faded",t.label.isFadedOut);let n=t.label.metaedge;e.select("path."+ve.Edge.LINE).classed("control-dep",n&&!n.numRegularEdges)}function PH(e,t,r){let i=An(e,"g",ve.Node.CONTAINER).selectAll(function(){return this.childNodes}).data(t,o=>o.node.name+":"+o.node.type);return i.enter().append("g").attr("data-name",o=>o.node.name).each(function(o){let a=Ht(this);r.addNodeGroup(o.node.name,a)}).merge(i).attr("class",o=>ve.Node.GROUP+" "+Wle(o)).each(function(o){let a=Ht(this),s=An(a,"g",ve.Annotation.INBOX);Vle(s,o.inAnnotations,o,r);let l=An(a,"g",ve.Annotation.OUTBOX);Vle(l,o.outAnnotations,o,r);let c=Gle(a,o,ve.Node.SHAPE);o.node.isGroupNode&&Xcr(c,o,r),Hle(c,o,r),jcr(a,o,r);let u=Kcr(a,o,r);Hle(u,o,r,o.node.type===jt.META),s3(a,o,r),Jcr(a,o)}),i.exit().each(function(o){r.removeNodeGroup(o.node.name);let a=Ht(this);o.inAnnotations.list.length>0&&a.select("."+ve.Annotation.INBOX).selectAll("."+ve.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)}),o.outAnnotations.list.length>0&&a.select("."+ve.Annotation.OUTBOX).selectAll("."+ve.Annotation.GROUP).each(s=>{r.removeAnnotationGroup(s,o)})}).remove(),i}function jcr(e,t,r){if(t.node.isGroupNode){if(t.expanded)return ect(e,t,r,ve.Subscene.GROUP);Pl(e,"g",ve.Subscene.GROUP).remove()}return null}function Ble(e,t){let r=t.x-t.width/2+t.paddingLeft,n=t.y-t.height/2+t.paddingTop,i=Pl(e,"g",ve.Subscene.GROUP);a3(i,r,n)}function Xcr(e,t,r){let n=An(e,"g",ve.Node.BUTTON_CONTAINER);An(n,"circle",ve.Node.BUTTON_CIRCLE),An(n,"path",ve.Node.EXPAND_BUTTON).attr("d","M0,-2.2 V2.2 M-2.2,0 H2.2"),An(n,"path",ve.Node.COLLAPSE_BUTTON).attr("d","M-2.2,0 H2.2"),n.on("click",i=>{qt.stopPropagation(),r.fire("node-toggle-expand",{name:i.node.name})}),kle(n,t)}function Hle(e,t,r,n){if(n){e.attr("pointer-events","none");return}let i=Wlt(r,Ule(t.node,r));e.on("dblclick",o=>{r.fire("node-toggle-expand",{name:o.node.name})}).on("mouseover",o=>{r.isNodeExpanded(o)||r.fire("node-highlight",{name:o.node.name})}).on("mouseout",o=>{r.isNodeExpanded(o)||r.fire("node-unhighlight",{name:o.node.name})}).on("click",o=>{qt.stopPropagation(),r.fire("node-select",{name:o.node.name})}).on("contextmenu",(o,a)=>{r.fire("node-select",{name:o.node.name}),i.call(o,a)})}function Ule(e,t){let r=[{title:n=>yH(e.include),action:(n,i,o)=>{t.fire("node-toggle-extract",{name:e.name})}}];return t.nodeContextMenuItems&&(r=r.concat(t.nodeContextMenuItems)),Jlt(e)&&r.push({title:n=>Qlt(e),action:(n,i,o)=>{t.fire("node-toggle-seriesgroup",{name:IH(e)})}}),r}function Jlt(e){return IH(e)!==null}function IH(e){return e?e.type===jt.SERIES?e.name:e.type===jt.OP?e.owningSeries:null:null}function $cr(e){let t=null;if(e)e.type===jt.SERIES?t=e:e.parentNode&&e.parentNode.type===jt.SERIES&&(t=e.parentNode);else return null;return t}function Qlt(e){return ule($cr(e)!==null?is.GROUP:is.UNGROUP)}function Kcr(e,t,r){var c;let n=t.displayName,i=t.node.type===jt.META&&!t.expanded,o=An(e,"text",ve.Node.LABEL),a=o.node();(c=a.parentNode)==null||c.appendChild(a),o.attr("dy",".35em").attr("text-anchor","middle");let s=8;switch(t.node.type){case jt.META:s=t.expanded?J4.Node.EXPANDED_LABEL:J4.Node.SERIES_LABEL;break;case jt.OP:s=J4.Node.OP_LABEL;break}if(i){n.length>r.maxMetanodeLabelLength&&(n=n.substr(0,r.maxMetanodeLabelLength-2)+"\u2026");let u=Zcr(r);o.attr("font-size",u(n.length)+"px"),s=u(n.length)}let l=o.text(n);return qle(l,t.node.type,s,t),o}function qle(e,t,r,n){let i=e.node(),o=i.textContent,a=null;switch(t){case jt.META:n&&!n.expanded&&(a=Tr.nodeSize.meta.maxLabelWidth);break;case jt.OP:a=Tr.nodeSize.op.maxLabelWidth;break;case-1:a=Tr.annotations.maxLabelWidth;break;default:break}if(a!==null)return i.textContent=tle(i.textContent,r,a),e.append("title").text(o)}var $lt=null;function Zcr(e){return $lt||($lt=On().domain([e.maxMetanodeLabelLengthLargeFont,e.maxMetanodeLabelLength]).range([e.maxMetanodeLabelLengthFontSize,e.minMetanodeLabelLengthFontSize]).clamp(!0)),$lt}function dP(e,t,r,n){Pl(e,"text",ve.Node.LABEL).transition().attr("x",t).attr("y",r+n)}function Gle(e,t,r){let n=An(e,"g",r);switch(t.node.type){case jt.OP:let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){An(n,"polygon",ve.Node.COLOR_TARGET);break}An(n,"ellipse",ve.Node.COLOR_TARGET);break;case jt.SERIES:let o="annotation",a=t;a.coreGraph&&(o=a.node.hasNonControlEdges?"vertical":"horizontal");let s=[ve.Node.COLOR_TARGET];a.isFadedOut&&s.push("faded-ellipse"),An(n,"use",s).attr("xlink:href","#op-series-"+o+"-stamp"),An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.BRIDGE:An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;case jt.META:An(n,"rect",ve.Node.COLOR_TARGET).attr("rx",t.radius).attr("ry",t.radius);break;default:throw Error("Unrecognized node type: "+t.node.type)}return n}function Wle(e){switch(e.node.type){case jt.OP:return ve.OPNODE;case jt.META:return ve.METANODE;case jt.SERIES:return ve.SERIESNODE;case jt.BRIDGE:return ve.BRIDGENODE;case jt.ELLIPSIS:return ve.ELLIPSISNODE}throw Error("Unrecognized node type: "+e.node.type)}function Jcr(e,t){let r=Pl(e,"g",ve.Node.SHAPE),n=v0(t);switch(t.node.type){case jt.OP:{let i=t.node;if(Vi.isNumber(i.functionInputIndex)||Vi.isNumber(i.functionOutputIndex)){let o=Pl(r,"polygon");Lle(o,t.x,t.y,t.coreBox.width,t.coreBox.height)}else{let o=Pl(r,"ellipse");EH(o,n,t.y,t.coreBox.width,t.coreBox.height)}dP(e,n,t.y,t.labelOffset);break}case jt.META:{let i=r.selectAll("rect");t.expanded?(zd(i,t.x,t.y,t.width,t.height),Ble(e,t),dP(e,n,t.y,-t.height/2+t.labelHeight/2)):(zd(i,n,t.y,t.coreBox.width,t.coreBox.height),dP(e,n,t.y,0));break}case jt.SERIES:{let i=Pl(r,"use");t.expanded?(zd(i,t.x,t.y,t.width,t.height),Ble(e,t),dP(e,n,t.y,-t.height/2+t.labelHeight/2)):(zd(i,n,t.y,t.coreBox.width,t.coreBox.height),dP(e,n,t.y,t.labelOffset));break}case jt.BRIDGE:{let i=Pl(r,"rect");zd(i,t.x,t.y,t.width,t.height);break}default:throw Error("Unrecognized node type: "+t.node.type)}}function Klt(e,t,r){let n=Jse(e);if(!r)return`url(#${n})`;let i=Ht(r),o=i.select("defs#_graph-gradients");o.empty()&&(o=i.append("defs").attr("id","_graph-gradients"));let a=o.select("linearGradient#"+n);if(a.empty()){a=o.append("linearGradient").attr("id",e),a.selectAll("*").remove();let s=0;Vi.each(t,l=>{let c=l.color;a.append("stop").attr("offset",s).attr("stop-color",c),a.append("stop").attr("offset",s+l.proportion).attr("stop-color",c),s+=l.proportion})}return`url(#${n})`}function LH(e){Ht(e).select("defs#_graph-gradients").remove()}function kH(e,t,r,n,i){let o=Ku;switch(e=e||(()=>0),t){case qn.NONE:case qn.STRUCTURE:if(r.node.type===jt.META){let a=r.node.templateId;return t===qn.STRUCTURE&&a!==null?o.STRUCTURE_PALETTE(e(a),n):o.UNKNOWN}else return r.node.type===jt.SERIES?n?o.EXPANDED_COLOR:"white":r.node.type===jt.BRIDGE?r.structural?"#f0e":r.node.inbound?"#0ef":"#fe0":Vi.isNumber(r.node.functionInputIndex)?"#795548":Vi.isNumber(r.node.functionOutputIndex)?"#009688":"white";case qn.DEVICE:return r.deviceColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("device-"+r.node.name,r.deviceColors,i);case qn.XLA_CLUSTER:return r.xlaClusterColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("xla-"+r.node.name,r.xlaClusterColors,i);case qn.COMPUTE_TIME:return n?o.EXPANDED_COLOR:r.computeTimeColor||o.UNKNOWN;case qn.MEMORY:return n?o.EXPANDED_COLOR:r.memoryColor||o.UNKNOWN;case qn.OP_COMPATIBILITY:return r.compatibilityColors==null?o.UNKNOWN:n?o.EXPANDED_COLOR:Klt("op-compat-"+r.node.name,r.compatibilityColors,i);default:throw new Error("Unknown case to color nodes by")}}function s3(e,t,r,n){n=n||ve.Node.SHAPE;let i=r.isNodeHighlighted(t.node.name),o=r.isNodeSelected(t.node.name),a=t.isInExtract||t.isOutExtract||t.isLibraryFunction,s=t.expanded&&n!==ve.Annotation.NODE,l=t.isFadedOut;e.classed("highlighted",i),e.classed("selected",o),e.classed("extract",a),e.classed("expanded",s),e.classed("faded",l);let c=e.select("."+n+" ."+ve.Node.COLOR_TARGET),u=kH(r.templateIndex,r.colorBy,t,s,r.getGraphSvgRoot());c.style("fill",u),c.style("stroke",o?null:tct(u))}function tct(e){return e.substring(0,3)==="url"?Ku.GRADIENT_OUTLINE:cu(e).darker().toString()}function Yle(e,t,r,n){let i=Ht(e);if(i.selectAll(".input-highlight").classed("input-highlight",!1),i.selectAll(".non-input").classed("non-input",!1),i.selectAll(".input-parent").classed("input-parent",!1),i.selectAll(".input-child").classed("input-child",!1),i.selectAll(".input-edge-highlight").classed("input-edge-highlight",!1),i.selectAll(".non-input-edge-highlight").classed("non-input-edge-highlight",!1),i.selectAll(".input-highlight-selected").classed("input-highlight-selected",!1),!t||!n||!r)return;let o=jle(r,t),a={};Vi.each(o,function(c){a=Xle(e,t,c,a)});let s=Object.keys(a),l=tur(t,s);eur(e,l),i.selectAll("g.node:not(.selected):not(.input-highlight):not(.input-parent):not(.input-children)").classed("non-input",!0).each(function(c){let u=c.node.name;i.selectAll(`[data-name="${u}"]`).classed("non-input",!0)}),i.selectAll("g.edge:not(.input-edge-highlight)").classed("non-input-edge-highlight",!0)}function jle(e,t){let r=[],n=t.getNodeByName(e);if(n instanceof _0)return[n].concat(n.inEmbeddings);let i=n.metagraph.nodes();return Vi.each(i,function(o){r=r.concat(jle(o,t))}),r}function Xle(e,t,r,n){if(n[r.name])return n;n[r.name]=!0;let i=r.inputs,o=Zlt(t,r);Ht(e).select(`.node[data-name="${o.name}"]`).classed("input-highlight",!0);let a={};Vi.each(i,function(u){let h=t.getNodeByName(u.name);if(h===void 0)return;if(h instanceof aP){let d=sP(h.name);h=t.getNodeByName(d)}let f=Zlt(t,h),p=a[f.name];p?p.opNodes.push(h):a[f.name]={visibleParent:f,opNodes:[h]}});let s={},l=[o];s[o.name]={traced:!1,index:0,connectionEndpoints:[]};let c=o;for(let u=1;c.name!==qc;u++)c=c.parentNode,s[c.name]={traced:!1,index:u,connectionEndpoints:[]},l[u]=c;return Vi.forOwn(a,function(u,h){let f=u.visibleParent;Vi.each(u.opNodes,function(p){n=Xle(e,t,p,n)}),f.name!==o.name&&Qcr(e,f,s,l)}),n}function Qcr(e,t,r,n){let i=t,o=t,a=[];for(;!r[i.name];)o.name!==i.name&&a.push([o,i]),o=i,i=i.parentNode;let s=r[i.name].index,l=n[Math.max(s-1,0)].name,c=l,u=o.name,h=o.name,f=Ht(e);f.selectAll(`[data-edge="${h}--${l}"]`).classed("input-edge-highlight",!0),Vi.each(a,function(p){let d=p[0],g=p[1],_=`[data-edge="${d.name}--${c}~~${g.name}~~OUT"]`;f.selectAll(_).classed("input-edge-highlight",!0)});for(let p=1;p<s;p++){let d=n[p-1],g=n[p],_=`[data-edge="${u}~~${g.name}~~IN--${d.name}"]`;f.selectAll(_).classed("input-edge-highlight",!0)}}function tur(e,t){let r={};return Vi.each(t,function(n){let i=e.getNodeByName(n),o=Zlt(e,i);r[o.name]=o}),r}function eur(e,t){Vi.forOwn(t,function(r){let n=r;for(;n.name!==qc;){let i=Ht(e).select(`.node[data-name="${n.name}"]`);i.nodes().length&&!i.classed("input-highlight")&&!i.classed("selected")&&!i.classed("op")&&i.classed("input-parent",!0),n=n.parentNode}})}function Zlt(e,t){let r=!1,n=t;for(;!r;)if(t=n,n=t.parentNode,n===void 0)r=!0;else{let i=e.getRenderNodeByName(n.name);i&&(i.expanded||n instanceof _0)&&(r=!0)}return t}function Vle(e,t,r,n){let i=e.selectAll(function(){return this.childNodes}).data(t.list,o=>o.node.name);return i.enter().append("g").attr("data-name",o=>o.node.name).each(function(o){let a=Ht(this);n.addAnnotationGroup(o,r,a);let s=ve.Annotation.EDGE,l=o.renderMetaedgeInfo&&o.renderMetaedgeInfo.metaedge;l&&!l.numRegularEdges&&(s+=" "+ve.Annotation.CONTROL_EDGE),l&&l.numRefEdges&&(s+=" "+ve.Edge.REF_LINE),Xlt(a,o,n,s),o.annotationType!==gi.ELLIPSIS?(iur(a,o),nur(a,o)):$le(a,o.node.name,o,ve.Annotation.ELLIPSIS)}).merge(i).attr("class",o=>ve.Annotation.GROUP+" "+rur(o.annotationType)+" "+Wle(o)).each(function(o){let a=Ht(this);aur(a,r,o,n),o.annotationType!==gi.ELLIPSIS&&our(a,r,o,n)}),i.exit().each(function(o){n.removeAnnotationGroup(o,r)}).remove(),i}function rur(e){return(gi[e]||"").toLowerCase()||null}function nur(e,t){if(t.annotationType===gi.SUMMARY)An(e,"use").attr("class","summary").attr("xlink:href","#summary-icon").attr("cursor","pointer");else{let r=Gle(e,t,ve.Annotation.NODE);An(r,"title").text(t.node.name)}}function iur(e,t){let r=t.node.name.split("/"),n=r[r.length-1];return $le(e,n,t,null)}function $le(e,t,r,n){let i=ve.Annotation.LABEL;n&&(i+=" "+n);let o=e.append("text").attr("class",i).attr("dy",".35em").attr("text-anchor",r.isIn?"end":"start").text(t);return qle(o,-1,J4.Annotation.LABEL)}function our(e,t,r,n){e.on("mouseover",i=>{n.fire("annotation-highlight",{name:i.node.name,hostName:t.node.name})}).on("mouseout",i=>{n.fire("annotation-unhighlight",{name:i.node.name,hostName:t.node.name})}).on("click",i=>{qt.stopPropagation(),n.fire("annotation-select",{name:i.node.name,hostName:t.node.name})}),r.annotationType!==gi.SUMMARY&&r.annotationType!==gi.CONSTANT&&e.on("contextmenu",Wlt(n,Ule(r.node,n)))}function aur(e,t,r,n){let i=v0(t);r.renderNodeInfo&&r.annotationType!==gi.ELLIPSIS&&s3(e,r.renderNodeInfo,n,ve.Annotation.NODE),r.annotationType===gi.SUMMARY&&(r.width+=10),e.select("text."+ve.Annotation.LABEL).transition().attr("x",i+r.dx+(r.isIn?-1:1)*(r.width/2+r.labelOffset)).attr("y",t.y+r.dy),e.select("use.summary").transition().attr("x",i+r.dx-3).attr("y",t.y+r.dy-6),EH(e.select("."+ve.Annotation.NODE+" ellipse"),i+r.dx,t.y+r.dy,r.width,r.height),zd(e.select("."+ve.Annotation.NODE+" rect"),i+r.dx,t.y+r.dy,r.width,r.height),zd(e.select("."+ve.Annotation.NODE+" use"),i+r.dx,t.y+r.dy,r.width,r.height),e.select("path."+ve.Annotation.EDGE).transition().attr("d",o=>{let a=o.points.map(s=>({x:s.dx+i,y:s.dy+t.y}));return CH(a)})}function ect(e,t,r,n){n=n||ve.Scene.GROUP;let i=m0(e,"g",n).empty(),o=An(e,"g",n),a=An(o,"g",ve.Scene.CORE),s=Vi.reduce(t.coreGraph.nodes(),(l,c)=>{let u=t.coreGraph.node(c);return u.excluded||l.push(u),l},Array());if(t.node.type===jt.SERIES&&s.reverse(),zle(a,t.coreGraph,r),PH(a,s,r),t.isolatedInExtract.length>0){let l=An(o,"g",ve.Scene.INEXTRACT);PH(l,t.isolatedInExtract,r)}else m0(o,"g",ve.Scene.INEXTRACT).remove();if(t.isolatedOutExtract.length>0){let l=An(o,"g",ve.Scene.OUTEXTRACT);PH(l,t.isolatedOutExtract,r)}else m0(o,"g",ve.Scene.OUTEXTRACT).remove();if(t.libraryFunctionsExtract.length>0){let l=An(o,"g",ve.Scene.FUNCTION_LIBRARY);PH(l,t.libraryFunctionsExtract,r)}else m0(o,"g",ve.Scene.FUNCTION_LIBRARY).remove();return Ple(o,t),i&&o.attr("opacity",0).transition().attr("opacity",1),o}var sur=.8,RH=class{constructor(t,r,n,i,o,a){this.svg=t,this.labelPadding=a,this.zoomG=r,this.mainZoom=n,this.maxWandH=o;let s=Ht(i.shadowRoot),l=s.select("svg"),c=l.select("rect"),u=f=>{this.viewpointCoord.x=qt.x,this.viewpointCoord.y=qt.y,this.updateViewpoint()};this.viewpointCoord={x:0,y:0};let h=pb().subject(Object).on("drag",u);c.datum(this.viewpointCoord).call(h),l.on("click",()=>{if(qt.defaultPrevented)return;let f=Number(c.attr("width")),p=Number(c.attr("height")),d=zo(l.node());this.viewpointCoord.x=d[0]-f/2,this.viewpointCoord.y=d[1]-p/2,this.updateViewpoint()}),this.viewpoint=c.node(),this.minimapSvg=l.node(),this.minimap=i,this.canvas=s.select("canvas.first").node(),this.canvasBuffer=s.select("canvas.second").node(),this.downloadCanvas=s.select("canvas.download").node(),Ht(this.downloadCanvas).style("display","none"),this.update()}updateViewpoint(){Ht(this.viewpoint).attr("x",this.viewpointCoord.x).attr("y",this.viewpointCoord.y);let t=-this.viewpointCoord.x*this.scaleMain/this.scaleMinimap,r=-this.viewpointCoord.y*this.scaleMain/this.scaleMinimap;Ht(this.svg).call(this.mainZoom.transform,Xh.translate(t,r).scale(this.scaleMain))}getImageBlob(){return new Promise(t=>{this.downloadCanvas.toBlob(r=>{t(r)},"image/png")})}update(){let t=null;try{if(t=this.zoomG.getBBox(),t.width===0)return}catch(p){return}let r=Ht(this.svg),n="",i=this.svg,a=(i.getRootNode?i.getRootNode():this.svg.parentNode).styleSheets;for(let p=0;p<a.length;p++)try{let d=a[p].cssRules||a[p].rules;if(d==null)continue;for(let g=0;g<d.length;g++)n+=d[g].cssText.replace(/ ?tf-[\w-]+ ?/g,"")+`
`}catch(d){if(d.name!=="SecurityError")throw d}let s=r.append("style");s.text(n);let l=Ht(this.zoomG),c=l.attr("transform");l.attr("transform",null),t.height+=t.y,t.width+=t.x,t.height+=this.labelPadding*2,t.width+=this.labelPadding*2,r.attr("width",t.width).attr("height",t.height),this.scaleMinimap=this.maxWandH/Math.max(t.width,t.height),this.minimapSize={width:t.width*this.scaleMinimap,height:t.height*this.scaleMinimap},Ht(this.minimapSvg).attr(this.minimapSize),Ht(this.canvasBuffer).attr(this.minimapSize);let u=Ht(this.downloadCanvas);u.style("width",t.width),u.style("height",t.height),u.attr("width",3*t.width),u.attr("height",3*t.height),this.translate!=null&&this.zoom!=null&&requestAnimationFrame(()=>this.zoom());let h=new XMLSerializer().serializeToString(this.svg);s.remove(),r.attr("width",null).attr("height",null),l.attr("transform",c);let f=new Image;f.onload=()=>{let p=this.canvasBuffer.getContext("2d");p==null||p.clearRect(0,0,this.canvasBuffer.width,this.canvasBuffer.height),p==null||p.drawImage(f,0,0,this.minimapSize.width,this.minimapSize.height),requestAnimationFrame(()=>{Ht(this.canvasBuffer).style("display",null),Ht(this.canvas).style("display","none"),[this.canvas,this.canvasBuffer]=[this.canvasBuffer,this.canvas]});let d=this.downloadCanvas.getContext("2d");d==null||d.clearRect(0,0,this.downloadCanvas.width,this.downloadCanvas.height),d==null||d.drawImage(f,0,0,this.downloadCanvas.width,this.downloadCanvas.height)},f.onerror=()=>{let p=new Blob([h],{type:"image/svg+xml;charset=utf-8"});f.src=URL.createObjectURL(p)},f.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(h)}zoom(t){if(this.scaleMinimap==null)return;t&&(this.translate=[t.x,t.y],this.scaleMain=t.k);let r=this.svg.getBoundingClientRect(),n=Ht(this.viewpoint);this.viewpointCoord.x=-this.translate[0]*this.scaleMinimap/this.scaleMain,this.viewpointCoord.y=-this.translate[1]*this.scaleMinimap/this.scaleMain;let i=r.width*this.scaleMinimap/this.scaleMain,o=r.height*this.scaleMinimap/this.scaleMain;n.attr("x",this.viewpointCoord.x).attr("y",this.viewpointCoord.y).attr("width",i).attr("height",o);let a=this.minimapSize.width,s=this.minimapSize.height,l=this.viewpointCoord.x,c=this.viewpointCoord.y,u=Math.min(Math.max(0,l+i),a)-Math.min(Math.max(0,l),a),h=Math.min(Math.max(0,c+o),s)-Math.min(Math.max(0,c),s);u*h/(a*s)<sur?this.minimap.classList.remove("hidden"):this.minimap.classList.add("hidden")}};var nct=class extends mt{init(t,r,n,i,o){return new RH(t,r,n,this,i,o)}};nct.template=Q`
    <style>
      :host {
        background-color: white;
        transition: opacity 0.3s linear;
        pointer-events: auto;
      }

      :host(.hidden) {
        opacity: 0;
        pointer-events: none;
      }

      canvas {
        border: 1px solid #999;
      }

      rect {
        fill: white;
        stroke: #111111;
        stroke-width: 1px;
        fill-opacity: 0;
        filter: url(#minimapDropShadow);
        cursor: move;
      }

      svg {
        position: absolute;
      }
    </style>
    <svg>
      <defs>
        <filter
          id="minimapDropShadow"
          x="-20%"
          y="-20%"
          width="150%"
          height="150%"
        >
          <feOffset result="offOut" in="SourceGraphic" dx="1" dy="1"></feOffset>
          <feColorMatrix
            result="matrixOut"
            in="offOut"
            type="matrix"
            values="0.1 0 0 0 0 0 0.1 0 0 0 0 0 0.1 0 0 0 0 0 0.5 0"
          ></feColorMatrix>
          <feGaussianBlur
            result="blurOut"
            in="matrixOut"
            stdDeviation="2"
          ></feGaussianBlur>
          <feBlend in="SourceGraphic" in2="blurOut" mode="normal"></feBlend>
        </filter>
      </defs>
      <rect></rect>
    </svg>
    <canvas class="first"></canvas>
    <!-- Additional canvas to use as buffer to avoid flickering between updates -->
    <canvas class="second"></canvas>
    <canvas class="download"></canvas>
  `;nct=E([yt("tf-graph-minimap")],nct);var Kle=Q`
  <style>
    :host(.dark-mode) {
      filter: invert(1);
    }

    :host {
      display: flex;
      font-size: 20px;
      height: 100%;
      width: 100%;
    }

    #svg {
      flex: 1;
      font-family: Roboto, sans-serif;
      height: 100%;
      overflow: hidden;
      width: 100%;
    }

    #hidden {
      position: fixed;
      top: 0px;
      visibility: hidden;
    }

    text {
      user-select: none;
    }

    /* --- Node and annotation-node for Metanode --- */

    .meta > .nodeshape > rect,
    .meta > .annotation-node > rect {
      cursor: pointer;
      fill: hsl(0, 0%, 70%);
    }
    .node.meta.highlighted > .nodeshape > rect,
    .node.meta.highlighted > .annotation-node > rect {
      stroke-width: 2;
    }
    .annotation.meta.highlighted > .nodeshape > rect,
    .annotation.meta.highlighted > .annotation-node > rect {
      stroke-width: 1;
    }
    .meta.selected > .nodeshape > rect,
    .meta.selected > .annotation-node > rect {
      stroke: red;
      stroke-width: 2;
    }
    .node.meta.selected.expanded > .nodeshape > rect,
    .node.meta.selected.expanded > .annotation-node > rect {
      stroke: red;
      stroke-width: 3;
    }
    .annotation.meta.selected > .nodeshape > rect,
    .annotation.meta.selected > .annotation-node > rect {
      stroke: red;
      stroke-width: 2;
    }
    .node.meta.selected.expanded.highlighted > .nodeshape > rect,
    .node.meta.selected.expanded.highlighted > .annotation-node > rect {
      stroke: red;
      stroke-width: 4;
    }

    .faded,
    .faded rect,
    .faded ellipse,
    .faded path,
    .faded use,
    #rectHatch line,
    #ellipseHatch line {
      color: #e0d4b3 !important;
      fill: white;
      stroke: #e0d4b3 !important;
    }

    .faded path {
      stroke-width: 1px !important;
    }

    .faded rect {
      fill: url(#rectHatch) !important;
    }

    .faded ellipse,
    .faded use {
      fill: url(#ellipseHatch) !important;
    }

    .faded text {
      opacity: 0;
    }

    /* Rules used for input-tracing. */
    .input-highlight > * > rect,
    .input-highlight > * > ellipse,
    .input-highlight > * > use {
      fill: white;
      stroke: #ff9800 !important;
    }

    /*  - Faded non-input styling */
    .non-input > * > rect,
.non-input > * > ellipse,
.non-input > * > use,
/* For Const nodes. */
.non-input > * > .constant:not([class*="input-highlight"]) >
  .annotation-node > ellipse,
/* For styling of annotation nodes of non-input nodes. */
.non-input > g > .annotation > .annotation-node > rect {
      stroke: #e0d4b3 !important;
      stroke-width: inherit;
      stroke-dasharray: inherit;
    }

    .non-input path {
      visibility: hidden;
    }

    .non-input > .nodeshape > rect,
.non-input > .annotation-node > rect,
/* For styling of annotation nodes of non-input nodes. */
.non-input > g > .annotation > .annotation-node > rect {
      fill: url(#rectHatch) !important;
    }

    .non-input ellipse,
    .non-input use {
      fill: url(#ellipseHatch) !important;
    }

    .non-input > text {
      opacity: 0;
    }

    .non-input .annotation > .annotation-edge {
      marker-end: url(#annotation-arrowhead-faded);
    }

    .non-input .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead-faded);
    }

    /* Input edges. */
    .input-edge-highlight > text {
      fill: black !important;
    }
    .input-highlight > .in-annotations > .annotation > .annotation-edge,
    .input-highlight-selected
      > .in-annotations
      > .annotation
      > .annotation-edge {
      stroke: #999 !important;
    }

    /* Non-input edges. */
    .non-input-edge-highlight,
.non-input > g > .annotation > path,
/* Annotation styles (label and edges respectively). */
.non-input > g >
.annotation:not(.input-highlight):not(.input-highlight-selected) >
.annotation-label
/*.annotation-edge*/ {
      visibility: hidden;
    }

    /* --- Op Node --- */

    .op > .nodeshape > .nodecolortarget,
    .op > .annotation-node > .nodecolortarget {
      cursor: pointer;
      fill: #fff;
      stroke: #ccc;
    }

    .op.selected > .nodeshape > .nodecolortarget,
    .op.selected > .annotation-node > .nodecolortarget {
      stroke: red;
      stroke-width: 2;
    }

    .op.highlighted > .nodeshape > .nodecolortarget,
    .op.highlighted > .annotation-node > .nodecolortarget {
      stroke-width: 2;
    }

    /* --- Series Node --- */

    /* By default, don't show the series background <rect>. */
    .series > .nodeshape > rect {
      fill: hsl(0, 0%, 70%);
      fill-opacity: 0;
      stroke-dasharray: 5, 5;
      stroke-opacity: 0;
      cursor: pointer;
    }

    /* Once expanded, show the series background <rect> and hide the <use>. */
    .series.expanded > .nodeshape > rect {
      fill-opacity: 0.15;
      stroke: hsl(0, 0%, 70%);
      stroke-opacity: 1;
    }
    .series.expanded > .nodeshape > use {
      visibility: hidden;
    }

    /**
 * TODO: Simplify this by applying a stable class name to all <g>
 * elements that currently have either the nodeshape or annotation-node classes.
 */
    .series > .nodeshape > use,
    .series > .annotation-node > use {
      stroke: #ccc;
    }
    .series.highlighted > .nodeshape > use,
    .series.highlighted > .annotation-node > use {
      stroke-width: 2;
    }
    .series.selected > .nodeshape > use,
    .series.selected > .annotation-node > use {
      stroke: red;
      stroke-width: 2;
    }

    .series.selected > .nodeshape > rect {
      stroke: red;
      stroke-width: 2;
    }

    .annotation.series.selected > .annotation-node > use {
      stroke: red;
      stroke-width: 2;
    }

    /* --- Bridge Node --- */
    .bridge > .nodeshape > rect {
      stroke: #f0f;
      opacity: 0.2;
      display: none;
    }

    /* --- Structural Elements --- */
    .edge > path.edgeline.structural {
      stroke: #f0f;
      opacity: 0.2;
      display: none;
    }

    /* Reference Edge */
    .edge > path.edgeline.referenceedge {
      stroke: #ffb74d;
      opacity: 1;
    }

    /* --- Series Nodes --- */

    /* Hide the rect for a series' annotation. */
    .series > .annotation-node > rect {
      display: none;
    }

    /* --- Node label --- */

    .node {
      /* Provide a hint to browsers to avoid using their static rasterization
      at initial scale, which looks very pixelated on Chromium when zoomed in.
      Note that we intentionally do *not* use 'will-change: transform' and
      'translateZ(0) here, which introduce blurriness on Firefox.
      See https://github.com/tensorflow/tensorboard/issues/4744 */
      transform: translateZ(1px);
    }

    .node > text.nodelabel {
      cursor: pointer;
      fill: #444;
    }

    .meta.expanded > text.nodelabel {
      font-size: 9px;
    }

    .series > text.nodelabel {
      font-size: 8px;
    }

    .op > text.nodelabel {
      font-size: 6px;
    }

    .bridge > text.nodelabel {
      display: none;
    }

    .node.meta.expanded > text.nodelabel {
      cursor: normal;
    }

    .annotation.meta.highlighted > text.annotation-label {
      fill: #50a3f7;
    }

    .annotation.meta.selected > text.annotation-label {
      fill: #4285f4;
    }

    /* --- Annotation --- */

    /* only applied for annotations that are not summary or constant.
(.summary, .constant gets overridden below) */
    .annotation > .annotation-node > * {
      stroke-width: 0.5;
      stroke-dasharray: 1, 1;
    }

    .annotation.summary > .annotation-node > *,
    .annotation.constant > .annotation-node > * {
      stroke-width: 1;
      stroke-dasharray: none;
    }

    .annotation > .annotation-edge {
      fill: none;
      stroke: #aaa;
      stroke-width: 0.5;
      marker-end: url(#annotation-arrowhead);
    }

    .faded .annotation > .annotation-edge {
      marker-end: url(#annotation-arrowhead-faded);
    }

    .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead);
    }

    .faded .annotation > .annotation-edge.refline {
      marker-start: url(#ref-annotation-arrowhead-faded);
    }

    .annotation > .annotation-control-edge {
      stroke-dasharray: 1, 1;
    }

    #annotation-arrowhead {
      fill: #aaa;
    }

    #annotation-arrowhead-faded {
      fill: #e0d4b3;
    }

    #ref-annotation-arrowhead {
      fill: #aaa;
    }

    #ref-annotation-arrowhead-faded {
      fill: #e0d4b3;
    }

    .annotation > .annotation-label {
      font-size: 5px;
      cursor: pointer;
    }
    .annotation > .annotation-label.annotation-ellipsis {
      cursor: default;
    }

    /* Hide annotations on expanded meta nodes since they're redundant. */
    .expanded > .in-annotations,
    .expanded > .out-annotations {
      display: none;
    }

    /* --- Annotation: Constant --- */

    .constant > .annotation-node > ellipse {
      cursor: pointer;
      fill: white;
      stroke: #848484;
    }

    .constant.selected > .annotation-node > ellipse {
      fill: white;
      stroke: red;
    }

    .constant.highlighted > .annotation-node > ellipse {
      stroke-width: 1.5;
    }

    /* --- Annotation: Summary --- */

    .summary > .annotation-node > ellipse {
      cursor: pointer;
      fill: #db4437;
      stroke: #db4437;
    }

    .summary.selected > .annotation-node > ellipse {
      fill: #a52714;
      stroke: #a52714;
    }

    .summary.highlighted > .annotation-node > ellipse {
      stroke-width: 1.5;
    }

    /* --- Edge --- */

    .edge > path.edgeline {
      fill: none;
      stroke: #bbb;
      stroke-linecap: round;
      stroke-width: 0.75;
    }

    .edge .selectableedge {
      cursor: pointer;
    }

    .selectededge > path.edgeline {
      cursor: default;
      stroke: #f00;
    }

    .edge.selectededge text {
      fill: #000;
    }

    /* Labels showing tensor shapes on edges */
    .edge > text {
      font-size: 3.5px;
      fill: #666;
    }

    .dataflow-arrowhead {
      fill: #bbb;
    }

    .reference-arrowhead {
      fill: #ffb74d;
    }

    .selected-arrowhead {
      fill: #f00;
    }

    .edge .control-dep {
      stroke-dasharray: 2, 2;
    }

    /* --- Group node expand/collapse button --- */

    /* Hides expand/collapse buttons when a node isn't expanded or highlighted. Using
   incredibly small opacity so that the bounding box of the <g> parent still takes
   this container into account even when it isn't visible */
    .node:not(.highlighted):not(.expanded) > .nodeshape > .buttoncontainer {
      opacity: 0.01;
    }
    .node.highlighted > .nodeshape > .buttoncontainer {
      cursor: pointer;
    }
    .buttoncircle {
      fill: #e7811d;
    }
    .buttoncircle:hover {
      fill: #b96717;
    }
    .expandbutton,
    .collapsebutton {
      stroke: white;
    }
    /* Do not let the path elements in the button take pointer focus */
    .node > .nodeshape > .buttoncontainer > .expandbutton,
    .node > .nodeshape > .buttoncontainer > .collapsebutton {
      pointer-events: none;
    }
    /* Only show the expand button when a node is collapsed and only show the
   collapse button when a node is expanded. */
    .node.expanded > .nodeshape > .buttoncontainer > .expandbutton {
      display: none;
    }
    .node:not(.expanded) > .nodeshape > .buttoncontainer > .collapsebutton {
      display: none;
    }

    .health-pill-stats {
      font-size: 4px;
      text-anchor: middle;
    }

    .health-pill rect {
      filter: url(#health-pill-shadow);
      rx: 3;
      ry: 3;
    }

    .titleContainer {
      position: relative;
      top: 20px;
    }

    .title,
    .auxTitle,
    .functionLibraryTitle {
      position: absolute;
    }

    #minimap {
      position: absolute;
      right: 20px;
      bottom: 20px;
    }

    .context-menu {
      position: absolute;
      display: none;
      background-color: #e2e2e2;
      border-radius: 2px;
      font-size: 14px;
      min-width: 150px;
      border: 1px solid #d4d4d4;
    }

    .context-menu ul {
      list-style-type: none;
      margin: 0;
      padding: 0;
      cursor: default;
    }

    .context-menu ul li {
      padding: 4px 16px;
    }

    .context-menu ul li:hover {
      background-color: #f3913e;
      color: white;
    }
  </style>
  <div class="titleContainer">
    <div id="title" class="title">Main Graph</div>
    <div id="auxTitle" class="auxTitle">Auxiliary Nodes</div>
    <div id="functionLibraryTitle" class="functionLibraryTitle">Functions</div>
  </div>
  <svg id="svg">
    <defs>
      <!-- Arrow heads for reference edge paths of different predefined sizes per color. -->
      <path
        id="reference-arrowhead-path"
        d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"
      ></path>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-small"
        viewBox="0 0 10 10"
        markerWidth="5"
        markerHeight="5"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-medium"
        viewBox="0 0 10 10"
        markerWidth="13"
        markerHeight="13"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-large"
        viewBox="0 0 10 10"
        markerWidth="16"
        markerHeight="16"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>
      <marker
        class="reference-arrowhead"
        id="reference-arrowhead-xlarge"
        viewBox="0 0 10 10"
        markerWidth="20"
        markerHeight="20"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#reference-arrowhead-path"></use>
      </marker>

      <!-- Arrow heads for dataflow edge paths of different predefined sizes per color. -->
      <path
        id="dataflow-arrowhead-path"
        d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"
      ></path>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-small"
        viewBox="0 0 10 10"
        markerWidth="5"
        markerHeight="5"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-medium"
        viewBox="0 0 10 10"
        markerWidth="13"
        markerHeight="13"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-large"
        viewBox="0 0 10 10"
        markerWidth="16"
        markerHeight="16"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>
      <marker
        class="dataflow-arrowhead"
        id="dataflow-arrowhead-xlarge"
        viewBox="0 0 10 10"
        markerWidth="20"
        markerHeight="20"
        refX="2"
        refY="5"
        orient="auto-start-reverse"
        markerUnits="userSpaceOnUse"
      >
        <use xlink:href="#dataflow-arrowhead-path"></use>
      </marker>

      <!-- Arrow head for annotation edge paths. -->
      <marker
        id="annotation-arrowhead"
        markerWidth="5"
        markerHeight="5"
        refX="5"
        refY="2.5"
        orient="auto"
      >
        <path d="M 0,0 L 5,2.5 L 0,5 L 0,0"></path>
      </marker>
      <marker
        id="annotation-arrowhead-faded"
        markerWidth="5"
        markerHeight="5"
        refX="5"
        refY="2.5"
        orient="auto"
      >
        <path d="M 0,0 L 5,2.5 L 0,5 L 0,0"></path>
      </marker>
      <marker
        id="ref-annotation-arrowhead"
        markerWidth="5"
        markerHeight="5"
        refX="0"
        refY="2.5"
        orient="auto"
      >
        <path d="M 5,0 L 0,2.5 L 5,5 L 5,0"></path>
      </marker>
      <marker
        id="ref-annotation-arrowhead-faded"
        markerWidth="5"
        markerHeight="5"
        refX="0"
        refY="2.5"
        orient="auto"
      >
        <path d="M 5,0 L 0,2.5 L 5,5 L 5,0"></path>
      </marker>
      <!-- Template for an Op node ellipse. -->
      <ellipse
        id="op-node-stamp"
        rx="7.5"
        ry="3"
        stroke="inherit"
        fill="inherit"
      ></ellipse>
      <!-- Template for an Op node annotation ellipse (smaller). -->
      <ellipse
        id="op-node-annotation-stamp"
        rx="5"
        ry="2"
        stroke="inherit"
        fill="inherit"
      ></ellipse>
      <!-- Vertically stacked series of Op nodes when unexpanded. -->
      <g id="op-series-vertical-stamp">
        <use xlink:href="#op-node-stamp" x="8" y="9"></use>
        <use xlink:href="#op-node-stamp" x="8" y="6"></use>
        <use xlink:href="#op-node-stamp" x="8" y="3"></use>
      </g>
      <!-- Horizontally stacked series of Op nodes when unexpanded. -->
      <g id="op-series-horizontal-stamp">
        <use xlink:href="#op-node-stamp" x="16" y="4"></use>
        <use xlink:href="#op-node-stamp" x="12" y="4"></use>
        <use xlink:href="#op-node-stamp" x="8" y="4"></use>
      </g>
      <!-- Horizontally stacked series of Op nodes for annotation. -->
      <g id="op-series-annotation-stamp">
        <use xlink:href="#op-node-annotation-stamp" x="9" y="2"></use>
        <use xlink:href="#op-node-annotation-stamp" x="7" y="2"></use>
        <use xlink:href="#op-node-annotation-stamp" x="5" y="2"></use>
      </g>
      <svg
        id="summary-icon"
        fill="#848484"
        height="12"
        viewBox="0 0 24 24"
        width="12"
      >
        <path
          d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
        ></path>
      </svg>

      <!-- Hatch patterns for faded out nodes. -->
      <pattern
        id="rectHatch"
        patternTransform="rotate(45 0 0)"
        width="5"
        height="5"
        patternUnits="userSpaceOnUse"
      >
        <line x1="0" y1="0" x2="0" y2="5" style="stroke-width: 1"></line>
      </pattern>
      <pattern
        id="ellipseHatch"
        patternTransform="rotate(45 0 0)"
        width="2"
        height="2"
        patternUnits="userSpaceOnUse"
      >
        <line x1="0" y1="0" x2="0" y2="2" style="stroke-width: 1"></line>
      </pattern>

      <!-- A shadow for health pills. -->
      <filter
        id="health-pill-shadow"
        x="-40%"
        y="-40%"
        width="180%"
        height="180%"
      >
        <feGaussianBlur in="SourceAlpha" stdDeviation="0.8"></feGaussianBlur>
        <feOffset dx="0" dy="0" result="offsetblur"></feOffset>
        <feFlood flood-color="#000000"></feFlood>
        <feComposite in2="offsetblur" operator="in"></feComposite>
        <feMerge>
          <feMergeNode></feMergeNode>
          <feMergeNode in="SourceGraphic"></feMergeNode>
        </feMerge>
      </filter>
    </defs>
    <!-- Make a large rectangle that fills the svg space so that
  zoom events get captured on safari -->
    <rect fill="white" width="10000" height="10000"></rect>
    <g id="root"></g>
  </svg>
  <tf-graph-minimap id="minimap"></tf-graph-minimap>
  <div id="contextMenu" class="context-menu"></div>
`;var Lr=class extends Gt(_o(mt)){constructor(){super(...arguments),this._zoomed=!1,this._zoomStartCoords=null,this._zoomTransform=null,this._maxZoomDistanceForClick=20,this._nodeGroupIndex={},this._annotationGroupIndex={},this._edgeGroupIndex={},this.maxMetanodeLabelLengthFontSize=9,this.minMetanodeLabelLengthFontSize=6,this.maxMetanodeLabelLengthLargeFont=11,this.maxMetanodeLabelLength=18}getNode(t){return this.renderHierarchy.getRenderNodeByName(t)}isNodeExpanded(t){return t.expanded}setNodeExpanded(t){this._build(this.renderHierarchy),this._updateLabels(!this._zoomed)}panToNode(t){Ale(t,this.$.svg,this.$.root,this._zoom)&&(this._zoomed=!0)}getGraphSvgRoot(){return this.$.svg}getContextMenu(){return this.$.contextMenu}_resetState(){this._nodeGroupIndex={},this._annotationGroupIndex={},this._edgeGroupIndex={},this._updateLabels(!1),Ht(this.$.svg).select("#root").selectAll("*").remove(),LH(this.$.svg)}_build(t){this.templateIndex=t.hierarchy.getTemplateIndex(),Rd("tf-graph-scene (layout):",function(){MH(t.root)}.bind(this),jr.RENDER_SCENE_LAYOUT),Rd("tf-graph-scene (build scene):",function(){ect(Ht(this.$.root),t.root,this),Ile(this.$.svg,this),this._updateInputTrace()}.bind(this),jr.RENDER_SCENE_BUILD_SCENE),setTimeout(function(){this._updateHealthPills(this.nodeNamesToHealthPills,this.healthPillStepIndex),this.minimap.update()}.bind(this),Tr.animation.duration)}ready(){super.ready(),this._zoom=eR().on("end",function(){if(this._zoomStartCoords){var t=Math.sqrt(Math.pow(this._zoomStartCoords.x-this._zoomTransform.x,2)+Math.pow(this._zoomStartCoords.y-this._zoomTransform.y,2));t<this._maxZoomDistanceForClick?this._fireEnableClick():setTimeout(this._fireEnableClick.bind(this),50)}this._zoomStartCoords=null}.bind(this)).on("zoom",function(){this._zoomTransform=qt.transform,this._zoomStartCoords||(this._zoomStartCoords=this._zoomTransform,this.fire("disable-click")),this._zoomed=!0,Ht(this.$.root).attr("transform",qt.transform),this.minimap.zoom(qt.transform)}.bind(this)),Ht(this.$.svg).call(this._zoom).on("dblclick.zoom",null),Ht(window).on("resize",function(){this.minimap.zoom()}.bind(this)),this.minimap=this.$.minimap.init(this.$.svg,this.$.root,this._zoom,Tr.minimap.size,Tr.subscene.meta.labelHeight)}attached(){this.set("_isAttached",!0)}detached(){this.set("_isAttached",!1)}_renderHierarchyChanged(){var t=this.renderHierarchy;this._hasRenderHierarchyBeenFitOnce=!1,this._resetState(),this._build(t)}_animateAndFit(){var t=this._isAttached;this._hasRenderHierarchyBeenFitOnce||!t||setTimeout(this.fit.bind(this),Tr.animation.duration)}_updateLabels(t){var r=this.$$(".title"),n=r.style,i=this.$$(".auxTitle"),o=i.style,a=this.$$(".functionLibraryTitle").style;let s=Ht(this.$.svg);var l=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.CORE).node();if(t&&l&&this.progress&&this.progress.value===100){var c=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.INEXTRACT).node()||s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.OUTEXTRACT).node(),u=l.getCTM().e,h=c?c.getCTM().e:null;n.display="inline",n.left=u+"px",h!==null&&h!==u?(o.display="inline",h=Math.max(u+r.getBoundingClientRect().width,h),o.left=h+"px"):o.display="none";let f=s.select("."+Hi.Scene.GROUP+">."+Hi.Scene.FUNCTION_LIBRARY).node(),p=f?f.getCTM().e:null;p!==null&&p!==h?(a.display="inline",p=Math.max(h+i.getBoundingClientRect().width,p),a.left=p+"px"):a.display="none"}else n.display="none",o.display="none",a.display="none"}nodeColorsChanged(){this.renderHierarchy!=null&&(this.templateIndex=this.renderHierarchy.hierarchy.getTemplateIndex(),mP.each(this._nodeGroupIndex,(t,r)=>{this._updateNodeState(r)}),this.minimap.update())}fit(){this._hasRenderHierarchyBeenFitOnce=!0,Cle(this.$.svg,this.$.root,this._zoom,function(){this._zoomed=!1}.bind(this))}getImageBlob(){return this.minimap.getImageBlob()}isNodeSelected(t){return t===this.selectedNode}isNodeHighlighted(t){return t===this.highlightedNode}addAnnotationGroup(t,r,n){var i=t.node.name;this._annotationGroupIndex[i]=this._annotationGroupIndex[i]||{},this._annotationGroupIndex[i][r.node.name]=n}getAnnotationGroupsIndex(t){return this._annotationGroupIndex[t]}removeAnnotationGroup(t,r){delete this._annotationGroupIndex[t.node.name][r.node.name]}addNodeGroup(t,r){this._nodeGroupIndex[t]=r}getNodeGroup(t){return this._nodeGroupIndex[t]}removeNodeGroup(t){delete this._nodeGroupIndex[t]}addEdgeGroup(t,r){this._edgeGroupIndex[t]=r}getEdgeGroup(t){return this._edgeGroupIndex[t]}_updateHealthPills(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex;Rle(this.$.svg,t,r)}_updateNodeState(t){var r=this.getNode(t),n=this.getNodeGroup(t);if(n&&s3(n,r,this),r.node.type===jt.META&&r.node.associatedFunction&&!r.isLibraryFunction){var i=Sa+r.node.associatedFunction,o=Ht("."+Hi.Scene.GROUP+">."+Hi.Scene.FUNCTION_LIBRARY+' g[data-name="'+i+'"]');s3(o,r,this)}var a=this.getAnnotationGroupsIndex(t);mP.each(a,(s,l)=>{s3(s,r,this,Hi.Annotation.NODE)})}_selectedNodeChanged(t,r){if(t!==r&&(r&&this._updateNodeState(r),!!t)){this.minimap.update();for(var n=this.renderHierarchy.hierarchy.node(t),i=[];n.parentNode!=null&&n.parentNode.name!=qc;)n=n.parentNode,i.push(n.name);var o;mP.forEachRight(i,a=>{this.renderHierarchy.buildSubhierarchy(a);var s=this.renderHierarchy.getRenderNodeByName(a);s.node.isGroupNode&&!s.expanded&&(s.expanded=!0,o||(o=s))}),o&&(this.setNodeExpanded(o),this._zoomed=!0),t&&this._updateNodeState(t),setTimeout(()=>{this.panToNode(t)},Tr.animation.duration)}}_highlightedNodeChanged(t,r){t!==r&&(t&&this._updateNodeState(t),r&&this._updateNodeState(r))}_onZoomChanged(){this._updateLabels(!this._zoomed)}_fireEnableClick(){this.fire("enable-click")}_updateInputTrace(){Yle(this.getGraphSvgRoot(),this.renderHierarchy,this.selectedNode,this.traceInputs)}};Lr.template=Kle;E([A({type:Object}),w("design:type",lo)],Lr.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],Lr.prototype,"name",void 0);E([A({type:String}),w("design:type",String)],Lr.prototype,"colorBy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"_hasRenderHierarchyBeenFitOnce",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Lr.prototype,"_isAttached",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoom",void 0);E([A({type:String,observer:"_highlightedNodeChanged"}),w("design:type",String)],Lr.prototype,"highlightedNode",void 0);E([A({type:String,observer:"_selectedNodeChanged"}),w("design:type",String)],Lr.prototype,"selectedNode",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"handleEdgeSelected",void 0);E([A({type:Boolean,observer:"_onZoomChanged"}),w("design:type",Boolean)],Lr.prototype,"_zoomed",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoomStartCoords",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_zoomTransform",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"_maxZoomDistanceForClick",void 0);E([A({type:Object}),w("design:type",Function)],Lr.prototype,"templateIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_nodeGroupIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_annotationGroupIndex",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"_edgeGroupIndex",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLengthFontSize",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"minMetanodeLabelLengthFontSize",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLengthLargeFont",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"maxMetanodeLabelLength",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"progress",void 0);E([A({type:Array}),w("design:type",Array)],Lr.prototype,"nodeContextMenuItems",void 0);E([A({type:Object}),w("design:type",Object)],Lr.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Lr.prototype,"healthPillStepIndex",void 0);E([Bt("renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_renderHierarchyChanged",null);E([Bt("_isAttached","renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_animateAndFit",null);E([Bt("colorBy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"nodeColorsChanged",null);E([Bt("nodeNamesToHealthPills","healthPillStepIndex"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_updateHealthPills",null);E([Bt("traceInputs","selectedNode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Lr.prototype,"_updateInputTrace",null);Lr=E([yt("tf-graph-scene")],Lr);var Dr=class extends Gt(mt){constructor(){super(...arguments),this._renderDepth=1,this._allowGraphSelect=!0,this.edgeWidthFunction="",this.handleNodeSelected="",this.edgeLabelFunction="",this.handleEdgeSelected=""}panToNode(t){this.$$("tf-graph-scene").panToNode(t)}_autoExtractNodesChanged(){var t=this.graphHierarchy;if(!!t){for(let r of Object.values(t.getNodeMap()))r.include=ur.UNSPECIFIED;this._buildRenderHierarchy(t)}}_buildNewRenderHierarchy(){var t=this.graphHierarchy;!t||this._buildRenderHierarchy(t)}_statsChanged(){var t=this.stats,r=this.devicesForStats;this.graphHierarchy&&(t&&r&&(ale(this.basicGraph,t,r),ple(this.graphHierarchy,t)),this._buildRenderHierarchy(this.graphHierarchy))}ready(){super.ready(),this.addEventListener("graph-select",this._graphSelected.bind(this)),this.addEventListener("disable-click",this._disableClick.bind(this)),this.addEventListener("enable-click",this._enableClick.bind(this)),this.addEventListener("node-toggle-expand",this._nodeToggleExpand.bind(this)),this.addEventListener("node-select",this._nodeSelected.bind(this)),this.addEventListener("node-highlight",this._nodeHighlighted.bind(this)),this.addEventListener("node-unhighlight",this._nodeUnhighlighted.bind(this)),this.addEventListener("node-toggle-extract",this._nodeToggleExtract.bind(this)),this.addEventListener("node-toggle-seriesgroup",this._nodeToggleSeriesGroup.bind(this)),this.addEventListener("edge-select",this._edgeSelected.bind(this)),this.addEventListener("annotation-select",this._nodeSelected.bind(this)),this.addEventListener("annotation-highlight",this._nodeHighlighted.bind(this)),this.addEventListener("annotation-unhighlight",this._nodeUnhighlighted.bind(this))}_buildRenderHierarchy(t){if(t.root.type!==jt.META)return;let r=this,n=Rd("new tf_graph_render.Hierarchy",()=>{let i=new lo(t,!!this.stats,this.autoExtractNodes);i.edgeLabelFunction=this.edgeLabelFunction,i.edgeWidthFunction=this.edgeWidthFunction;function o(a){return{minValue:a.domain()[0],maxValue:a.domain()[1],startColor:a.range()[0],endColor:a.range()[1]}}return r._setColorByParams({compute_time:o(i.computeTimeScale),memory:o(i.memoryUsageScale),device:ict.map(i.deviceColorMap.domain(),function(a){return{device:a,color:i.deviceColorMap(a)}}),xla_cluster:ict.map(i.xlaClusterColorMap.domain(),function(a){return{xla_cluster:a,color:i.xlaClusterColorMap(a)}})}),i},jr.RENDER_BUILD_HIERARCHY);r._setRenderHierarchy(n)}_getVisible(t){return t&&this.renderHierarchy.getNearestVisibleAncestor(t)}fit(){this.$.scene.fit()}getImageBlob(){return this.$.scene.getImageBlob()}_graphChanged(){!this.graphHierarchy||(this.graphHierarchy.addListener(Dd.TEMPLATES_UPDATED,()=>{this.$.scene.nodeColorsChanged()}),this.fire("graph-select"))}_graphSelected(t){this._allowGraphSelect&&(this.set("selectedNode",null),this.set("selectedEdge",null)),this._allowGraphSelect=!0}_disableClick(t){this._allowGraphSelect=!1}_enableClick(t){this._allowGraphSelect=!0}_selectedNodeChanged(){var t=this.selectedNode;this.handleNodeSelected&&this.handleNodeSelected(t)}_selectedEdgeChanged(){var t=this.selectedEdge;this._deselectPreviousEdge(),t&&(this._lastSelectedEdgeGroup.classed(Hi.Edge.SELECTED,!0),this._updateMarkerOfSelectedEdge(t)),this.handleEdgeSelected&&this.handleEdgeSelected(t)}_nodeSelected(t){this._allowGraphSelect&&this.set("selectedNode",t.detail.name),this._allowGraphSelect=!0}_edgeSelected(t){this._allowGraphSelect&&(this.set("_lastSelectedEdgeGroup",t.detail.edgeGroup),this.set("selectedEdge",t.detail.edgeData)),this._allowGraphSelect=!0}_nodeHighlighted(t){this.set("highlightedNode",t.detail.name)}_nodeUnhighlighted(t){this.set("highlightedNode",null)}_nodeToggleExpand(t){this._nodeSelected(t);var r=t.detail.name,n=this.renderHierarchy.getRenderNodeByName(r);n.node.type!==jt.OP&&(this.renderHierarchy.buildSubhierarchy(r),n.expanded=!n.expanded,this.async(function(){this.$.scene.setNodeExpanded(n)},75),Po({actionId:jr.NODE_EXPANSION_TOGGLED,eventLabel:n.expanded?"expanded":"collapsed"}))}_nodeToggleExtract(t){var r=t.detail.name;this.nodeToggleExtract(r)}nodeToggleExtract(t){let r=this.renderHierarchy.getRenderNodeByName(t);r.node.include==ur.INCLUDE?r.node.include=ur.EXCLUDE:r.node.include==ur.EXCLUDE?r.node.include=ur.INCLUDE:r.node.include=this.renderHierarchy.isNodeAuxiliary(r)?ur.INCLUDE:ur.EXCLUDE,this._buildRenderHierarchy(this.graphHierarchy),Po({actionId:jr.NODE_AUXILIARY_EXTRACTION_CHANGED,eventLabel:r.node.include===ur.INCLUDE?"Auxiliary to Main":"Main to Auxiliary"})}_nodeToggleSeriesGroup(t){var r=t.detail.name;this.nodeToggleSeriesGroup(r)}nodeToggleSeriesGroup(t){this.set("progress",{value:0,msg:""});var r=nP(this),n=JS(r,100,"Namespace hierarchy");let i=Mx(Kl({},this.hierarchyParams),{seriesMap:this.graphHierarchy.buildSeriesGroupMapToggled(t)});bH(this.basicGraph,i,n).then(function(o){this.set("graphHierarchy",o),this._buildRenderHierarchy(this.graphHierarchy)}.bind(this))}_deselectPreviousEdge(){let t="."+Hi.Edge.SELECTED;Ht(t).classed(Hi.Edge.SELECTED,!1).each((r,n)=>{if(r.label){let i=Ht(this).selectAll("path.edgeline");r.label.startMarkerId&&i.style("marker-start",`url(#${r.label.startMarkerId})`),r.label.endMarkerId&&i.style("marker-end",`url(#${r.label.endMarkerId})`)}})}_updateMarkerOfSelectedEdge(t){var r;if(t.label){let n=t.label.startMarkerId||t.label.endMarkerId;if(n){let i=n.replace("dataflow-","selected-"),o=this.$$("#"+i);if(!o){let s=this.$.scene.querySelector("#"+n);o=s==null?void 0:s.cloneNode(!0),o.setAttribute("id",i),o.classList.add("selected-arrowhead"),(r=s==null?void 0:s.parentNode)==null||r.appendChild(o)}let a=t.label.startMarkerId?"marker-start":"marker-end";this._lastSelectedEdgeGroup.selectAll("path.edgeline").style(a,`url(#${i})`)}}}not(t){return!t}};Dr.template=Q`
    <style>
      .container {
        width: 100%;
        height: 100%;
        background: white;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
      }

      .vertical {
        width: 100%;
        height: 100%;
        @apply --layout-vertical;
      }

      .auto {
        @apply --layout-flex-auto;
        @apply --layout-vertical;
      }

      h2 {
        text-align: center;
      }

      paper-button {
        text-transform: none;
      }
    </style>
    <div class="container">
      <div class="vertical">
        <template is="dom-if" if="[[title]]">
          <h2>[[title]]</h2>
        </template>
        <tf-graph-scene
          id="scene"
          class="auto"
          render-hierarchy="[[renderHierarchy]]"
          highlighted-node="[[_getVisible(highlightedNode)]]"
          selected-node="{{selectedNode}}"
          selected-edge="{{selectedEdge}}"
          color-by="[[colorBy]]"
          progress="[[progress]]"
          node-context-menu-items="[[nodeContextMenuItems]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          health-pill-step-index="{{healthPillStepIndex}}"
          handle-edge-selected="[[handleEdgeSelected]]"
          trace-inputs="[[traceInputs]]"
        ></tf-graph-scene>
      </div>
    </div>
  `;E([A({type:Object,notify:!0,observer:"_graphChanged"}),w("design:type",os)],Dr.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],Dr.prototype,"basicGraph",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"stats",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"devicesForStats",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"hierarchyParams",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Dr.prototype,"progress",void 0);E([A({type:String}),w("design:type",String)],Dr.prototype,"title",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Dr.prototype,"selectedNode",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Dr.prototype,"selectedEdge",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"_lastSelectedEdgeGroup",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Dr.prototype,"highlightedNode",void 0);E([A({type:String}),w("design:type",String)],Dr.prototype,"colorBy",void 0);E([A({type:Object,notify:!0,readOnly:!0}),w("design:type",Object)],Dr.prototype,"colorByParams",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",lo)],Dr.prototype,"renderHierarchy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"autoExtractNodes",void 0);E([A({type:Array}),w("design:type",Array)],Dr.prototype,"nodeContextMenuItems",void 0);E([A({type:Number}),w("design:type",Number)],Dr.prototype,"_renderDepth",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Dr.prototype,"_allowGraphSelect",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Dr.prototype,"healthPillStepIndex",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"edgeWidthFunction",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"handleNodeSelected",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"edgeLabelFunction",void 0);E([A({type:Object}),w("design:type",Object)],Dr.prototype,"handleEdgeSelected",void 0);E([Bt("autoExtractNodes"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_autoExtractNodesChanged",null);E([Bt("graphHierarchy","edgeWidthFunction","handleNodeSelected","edgeLabelFunction","handleEdgeSelected"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_buildNewRenderHierarchy",null);E([Bt("stats","devicesForStats"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_statsChanged",null);E([Bt("selectedNode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_selectedNodeChanged",null);E([Bt("selectedEdge"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Dr.prototype,"_selectedEdgeChanged",null);Dr=E([yt("tf-graph")],Dr);var co=class extends Gt(mt){constructor(){super(...arguments),this.specificHealthPillStep=0,this.healthPillEntries=fP}ready(){super.ready();var t=document.getElementById("mainContainer"),r=document.querySelector("tf-dashboard-layout .scrollbar");t&&r&&(t.style.overflow="hidden",r.style.overflow="hidden")}_healthPillsAvailable(t,r){return t&&r}_computeTensorCountString(t,r){return t?t[r].toFixed(0):""}get healthPillValuesForSelectedNode(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex,n=this.selectedNode,i=this.allStepsModeEnabled,o=this.areHealthPillsLoading;if(o||!n)return null;let a=t[n];if(!a)return null;let s=a[i?0:r];return s?s.value.slice(2,8):null}get _currentStepDisplayValue(){var t=this.nodeNamesToHealthPills,r=this.healthPillStepIndex,n=this.allStepsModeEnabled,i=this.specificHealthPillStep,o=this.areHealthPillsLoading;if(n)return i.toFixed(0);if(o)return 0;for(let a in t)return t[a][r].step.toFixed(0);return 0}get _biggestStepEverSeen(){var t=this.nodeNamesToHealthPills;for(let n in t){var r=t[n];return Math.max(this._biggestStepEverSeen,r[r.length-1].step)}return this._biggestStepEverSeen||0}get _maxStepIndex(){var t=this.nodeNamesToHealthPills;for(let r in t)return t[r].length-1;return 0}_hasDebuggerNumericAlerts(t){return t&&t.length}_updateAlertsList(){var t=this.debuggerNumericAlerts,r=this.$$("#numeric-alerts-body");if(!!r){r.innerText="";for(var n=0;n<t.length;n++){var i=t[n],o=document.createElement("tr"),a=document.createElement("td");a.innerText=Qse(i.first_timestamp),a.classList.add("first-offense-td"),o.appendChild(a);var s=document.createElement("td");s.classList.add("tensor-device-td");var l=document.createElement("div");l.classList.add("tensor-section-within-table"),l.innerText=i.tensor_name,this._addOpExpansionListener(l,i.tensor_name),s.appendChild(l);var c=document.createElement("div");c.classList.add("device-section-within-table"),c.innerText="("+i.device_name+")",s.appendChild(c),o.appendChild(s);var u=document.createElement("div");u.classList.add("mini-health-pill");var h=document.createElement("td");if(h.classList.add("mini-health-pill-td"),h.appendChild(u),o.appendChild(h),i.neg_inf_event_count){var f=document.createElement("div");f.classList.add("negative-inf-mini-health-pill-section"),f.innerText=i.neg_inf_event_count,f.setAttribute("title",i.neg_inf_event_count+" events with -\u221E"),u.appendChild(f)}if(i.pos_inf_event_count){var p=document.createElement("div");p.classList.add("positive-inf-mini-health-pill-section"),p.innerText=i.pos_inf_event_count,p.setAttribute("title",i.pos_inf_event_count+" events with +\u221E"),u.appendChild(p)}if(i.nan_event_count){var d=document.createElement("div");d.classList.add("nan-mini-health-pill-section"),d.innerText=i.nan_event_count,d.setAttribute("title",i.nan_event_count+" events with NaN"),u.appendChild(d)}zt(r).appendChild(o)}}}_addOpExpansionListener(t,r){t.addEventListener("click",()=>{var n=xle(document.getElementById("scene"),this.renderHierarchy,r),i,o=document.querySelector("tf-graph-info#graph-info");o&&(i=o.scrollHeight-o.scrollTop);var a=this.selectedNode;this.set("selectedNode",n);var s=()=>{o.scrollTop=o.scrollHeight-i};o&&(a?s():window.setTimeout(s,20))})}};co.template=Q`
    <style>
      :host {
        font-size: 12px;
        margin: 0;
        padding: 0;
        display: block;
      }

      h2 {
        padding: 0;
        text-align: center;
        margin: 0;
      }

      .health-pill-legend {
        padding: 15px;
      }

      .health-pill-legend h2 {
        text-align: left;
      }

      .health-pill-entry {
        margin: 10px 10px 10px 0;
      }

      .health-pill-entry .color-preview {
        width: 26px;
        height: 26px;
        border-radius: 3px;
        display: inline-block;
        margin: 0 10px 0 0;
      }

      .health-pill-entry .color-label,
      .health-pill-entry .tensor-count {
        color: #777;
        display: inline-block;
        height: 26px;
        font-size: 22px;
        line-height: 26px;
        vertical-align: top;
      }

      .health-pill-entry .tensor-count {
        float: right;
      }

      #health-pill-step-slider {
        width: 100%;
        margin: 0 0 0 -15px;
        /* 31 comes from adding a padding of 15px from both sides of the paper-slider, subtracting
   * 1px so that the slider width aligns with the image (the last slider marker takes up 1px),
   * and adding 2px to account for a border of 1px on both sides of the image. 30 - 1 + 2.
   * Apparently, the paper-slider lacks a mixin for those padding values. */
        width: calc(100% + 31px);
      }

      #health-pills-loading-spinner {
        width: 20px;
        height: 20px;
        vertical-align: top;
      }

      #health-pill-step-number-input {
        text-align: center;
        vertical-align: top;
      }

      #numeric-alerts-table-container {
        max-height: 400px;
        overflow-x: hidden;
        overflow-y: auto;
      }

      #numeric-alerts-table {
        text-align: left;
      }

      #numeric-alerts-table td {
        vertical-align: top;
      }

      #numeric-alerts-table .first-offense-td {
        display: inline-block;
      }

      .first-offense-td {
        width: 80px;
      }

      .tensor-device-td {
        max-width: 140px;
        word-wrap: break-word;
      }

      .tensor-section-within-table {
        color: #266236;
        cursor: pointer;
        opacity: 0.8;
        text-decoration: underline;
      }

      .tensor-section-within-table:hover {
        opacity: 1;
      }

      .device-section-within-table {
        color: #666;
      }

      .mini-health-pill {
        width: 130px;
      }

      .mini-health-pill > div {
        height: 100%;
        width: 60px;
        border-radius: 3px;
      }

      #event-counts-th {
        padding: 0 0 0 10px;
      }

      .negative-inf-mini-health-pill-section {
        background: rgb(255, 141, 0);
        width: 20px;
      }

      .positive-inf-mini-health-pill-section {
        background: rgb(0, 62, 212);
        width: 20px;
      }

      .nan-mini-health-pill-section {
        background: rgb(204, 47, 44);
        width: 20px;
      }

      .negative-inf-mini-health-pill-section,
      .positive-inf-mini-health-pill-section,
      .nan-mini-health-pill-section {
        color: #fff;
        display: inline-block;
        height: 100%;
        line-height: 20px;
        margin: 0 0 0 10px;
        text-align: center;
      }

      .no-numeric-alerts-notification {
        margin: 0;
      }
    </style>
    <paper-material elevation="1" class="card health-pill-legend">
      <div class="title">
        Enable all (not just sampled) steps. Requires slow disk read.
      </div>
      <paper-toggle-button
        id="enableAllStepsModeToggle"
        checked="{{allStepsModeEnabled}}"
      >
      </paper-toggle-button>
      <h2>
        Step of Health Pills:
        <template is="dom-if" if="[[allStepsModeEnabled]]">
          <input
            type="number"
            id="health-pill-step-number-input"
            min="0"
            max="[[_biggestStepEverSeen]]"
            value="{{specificHealthPillStep::input}}"
          />
        </template>
        <template is="dom-if" if="[[!allStepsModeEnabled]]">
          [[_currentStepDisplayValue]]
        </template>
        <paper-spinner-lite
          active
          hidden$="[[!areHealthPillsLoading]]"
          id="health-pills-loading-spinner"
        ></paper-spinner-lite>
      </h2>
      <template is="dom-if" if="[[allStepsModeEnabled]]">
        <paper-slider
          id="health-pill-step-slider"
          immediate-value="{{specificHealthPillStep}}"
          max="[[_biggestStepEverSeen]]"
          snaps
          step="1"
          value="{{specificHealthPillStep}}"
        ></paper-slider>
      </template>
      <template is="dom-if" if="[[!allStepsModeEnabled]]">
        <template is="dom-if" if="[[_maxStepIndex]]">
          <paper-slider
            id="health-pill-step-slider"
            immediate-value="{{healthPillStepIndex}}"
            max="[[_maxStepIndex]]"
            snaps
            step="1"
            value="{{healthPillStepIndex}}"
          ></paper-slider>
        </template>
      </template>
      <h2>
        Health Pill
        <template is="dom-if" if="[[healthPillValuesForSelectedNode]]">
          Counts for Selected Node
        </template>
        <template is="dom-if" if="[[!healthPillValuesForSelectedNode]]">
          Legend
        </template>
      </h2>
      <template is="dom-repeat" items="[[healthPillEntries]]">
        <div class="health-pill-entry">
          <div
            class="color-preview"
            style="background:[[item.background_color]]"
          ></div>
          <div class="color-label">[[item.label]]</div>
          <div class="tensor-count">
            [[_computeTensorCountString(healthPillValuesForSelectedNode,
            index)]]
          </div>
        </div>
      </template>
      <div hidden$="[[!_hasDebuggerNumericAlerts(debuggerNumericAlerts)]]">
        <h2 id="numeric-alerts-header">Numeric Alerts</h2>
        <p>Alerts are sorted from top to bottom by increasing timestamp.</p>
        <div id="numeric-alerts-table-container">
          <table id="numeric-alerts-table">
            <thead>
              <tr>
                <th>First Offense</th>
                <th>Tensor (Device)</th>
                <th id="event-counts-th">Event Counts</th>
              </tr>
            </thead>
            <tbody id="numeric-alerts-body"></tbody>
          </table>
        </div>
      </div>
      <template
        is="dom-if"
        if="[[!_hasDebuggerNumericAlerts(debuggerNumericAlerts)]]"
      >
        <p class="no-numeric-alerts-notification">
          No numeric alerts so far. That is likely good. Alerts indicate the
          presence of NaN or (+/-) Infinity values, which may be concerning.
        </p>
      </template>
    </paper-material>
  `;E([A({type:Object}),w("design:type",lo)],co.prototype,"renderHierarchy",void 0);E([A({type:Array,notify:!0}),w("design:type",Object)],co.prototype,"debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],co.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number,notify:!0}),w("design:type",Object)],co.prototype,"healthPillStepIndex",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],co.prototype,"specificHealthPillStep",void 0);E([A({type:String,notify:!0}),w("design:type",Object)],co.prototype,"selectedNode",void 0);E([A({type:String,notify:!0}),w("design:type",Object)],co.prototype,"highlightedNode",void 0);E([A({type:Number,notify:!0}),w("design:type",Object)],co.prototype,"selectedNodeInclude",void 0);E([A({type:Boolean}),w("design:type",Object)],co.prototype,"areHealthPillsLoading",void 0);E([A({type:Array}),w("design:type",Array)],co.prototype,"healthPillEntries",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Object)],co.prototype,"allStepsModeEnabled",void 0);E([Rt("nodeNamesToHealthPills","healthPillStepIndex","selectedNode","allStepsModeEnabled","areHealthPillsLoading"),w("design:type",Object),w("design:paramtypes",[])],co.prototype,"healthPillValuesForSelectedNode",null);E([Rt("nodeNamesToHealthPills","healthPillStepIndex","allStepsModeEnabled","specificHealthPillStep","areHealthPillsLoading"),w("design:type",Object),w("design:paramtypes",[])],co.prototype,"_currentStepDisplayValue",null);E([Rt("nodeNamesToHealthPills"),w("design:type",Number),w("design:paramtypes",[])],co.prototype,"_biggestStepEverSeen",null);E([Rt("nodeNamesToHealthPills"),w("design:type",Number),w("design:paramtypes",[])],co.prototype,"_maxStepIndex",null);E([Bt("debuggerNumericAlerts"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],co.prototype,"_updateAlertsList",null);co=E([yt("tf-graph-debugger-data-card")],co);var oct={};Ks(oct,{GraphIconType:()=>n1});var n1;(function(e){e.CONST="CONST",e.META="META",e.OP="OP",e.SERIES="SERIES",e.SUMMARY="SUMMARY"})(n1||(n1={}));var Zu=class extends Gt(_o(mt)){constructor(){super(...arguments),this.vertical=!1,this.fillOverride=null,this.strokeOverride=null,this.height=20,this.faded=!1}getSvgDefinableElement(){return this.$.svgDefs}get _fill(){var t=this.type,r=this.fillOverride;if(r!=null)return r;switch(t){case n1.META:return Ku.DEFAULT_FILL;case n1.SERIES:return Vlt.DEFAULT_FILL;default:return y0.DEFAULT_FILL}}get _stroke(){var t=this.type,r=this.strokeOverride;if(r!=null)return r;switch(t){case n1.META:return Ku.DEFAULT_STROKE;case n1.SERIES:return Vlt.DEFAULT_STROKE;default:return y0.DEFAULT_STROKE}}_isType(t,r){return t===r}_fadedClass(t,r){return t?"faded-"+r:""}};Zu.template=Q`
    <style>
      :host {
        font-size: 0;
      }

      :host(.dark-mode) svg {
        filter: invert(1);
      }

      .faded-rect {
        fill: url(#rectHatch);
      }

      .faded-ellipse {
        fill: url(#ellipseHatch);
      }

      .faded-rect,
      .faded-ellipse,
      .faded-series {
        stroke: var(--tb-graph-faded) !important;
      }
      #rectHatch line,
      #ellipseHatch line {
        color: #e0d4b3 !important;
        fill: white;
        stroke: #e0d4b3 !important;
      }
    </style>
    <!-- SVG for definitions -->
    <svg height="0" width="0" id="svgDefs">
      <defs>
        <!-- Hatch patterns for faded out nodes. -->
        <pattern
          id="rectHatch"
          patternTransform="rotate(45 0 0)"
          width="5"
          height="5"
          patternUnits="userSpaceOnUse"
        >
          <line x1="0" y1="0" x2="0" y2="5" style="stroke-width: 1"></line>
        </pattern>
        <pattern
          id="ellipseHatch"
          patternTransform="rotate(45 0 0)"
          width="2"
          height="2"
          patternUnits="userSpaceOnUse"
        >
          <line x1="0" y1="0" x2="0" y2="2" style="stroke-width: 1"></line>
        </pattern>
        <!-- Template for an Op node ellipse. -->
        <ellipse
          id="op-node-stamp"
          rx="7.5"
          ry="3"
          stroke="inherit"
          fill="inherit"
        ></ellipse>
        <!-- Template for an Op node annotation ellipse (smaller). -->
        <ellipse
          id="op-node-annotation-stamp"
          rx="5"
          ry="2"
          stroke="inherit"
          fill="inherit"
        ></ellipse>
        <!-- Vertically stacked series of Op nodes when unexpanded. -->
        <g id="op-series-vertical-stamp">
          <use xlink:href="#op-node-stamp" x="8" y="9"></use>
          <use xlink:href="#op-node-stamp" x="8" y="6"></use>
          <use xlink:href="#op-node-stamp" x="8" y="3"></use>
        </g>
        <g id="op-series-horizontal-stamp">
          <use xlink:href="#op-node-stamp" x="16" y="4"></use>
          <use xlink:href="#op-node-stamp" x="12" y="4"></use>
          <use xlink:href="#op-node-stamp" x="8" y="4"></use>
        </g>
        <g
          id="summary-icon"
          fill="#848484"
          height="12"
          viewBox="0 0 24 24"
          width="12"
        >
          <path
            d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
          ></path>
        </g>
      </defs>
    </svg>
    <template is="dom-if" if="[[_isType(type, 'CONST')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 10 10"
      >
        <circle
          cx="5"
          cy="5"
          r="3"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
        ></circle>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'SUMMARY')]]">
      <svg
        width$="[[height]]"
        height$="[[height]]"
        viewBox="0 0 24 24"
        fill="#848484"
      >
        <path
          d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"
        ></path>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'OP')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 16 8"
      >
        <use
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xlink:href="#op-node-stamp"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
          class$="{{_fadedClass(faded, 'ellipse')}}"
          x="8"
          y="4"
        ></use>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'META')]]">
      <svg
        height$="[[height]]"
        preserveAspectRatio="xMinYMid meet"
        viewBox="0 0 37 16"
      >
        <rect
          x="1"
          y="1"
          fill$="[[_fill]]"
          stroke$="[[_stroke]]"
          class$="{{_fadedClass(faded, 'rect')}}"
          stroke-width="2px"
          height="14"
          width="35"
          rx="5"
          ry="5"
        ></rect>
      </svg>
    </template>
    <template is="dom-if" if="[[_isType(type, 'SERIES')]]">
      <template is="dom-if" if="[[vertical]]">
        <svg
          height$="[[height]]"
          preserveAspectRatio="xMinYMid meet"
          viewBox="0 0 16 15"
        >
          <use
            xmlns:xlink="http://www.w3.org/1999/xlink"
            xlink:href="#op-series-vertical-stamp"
            fill$="[[_fill]]"
            stroke$="[[_stroke]]"
            class$="{{_fadedClass(faded, 'series')}}"
            x="0"
            y="2"
          ></use>
        </svg>
      </template>
      <template is="dom-if" if="[[!vertical]]">
        <svg
          height$="[[height]]"
          preserveAspectRatio="xMinYMid meet"
          viewBox="0 0 24 10"
        >
          <use
            xmlns:xlink="http://www.w3.org/1999/xlink"
            xlink:href="#op-series-horizontal-stamp"
            fill$="[[_fill]]"
            stroke$="[[_stroke]]"
            class$="{{_fadedClass(faded, 'series')}}"
            x="0"
            y="1"
          ></use>
        </svg>
      </template>
    </template>
  `;E([A({type:String}),w("design:type",String)],Zu.prototype,"type",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zu.prototype,"vertical",void 0);E([A({type:String}),w("design:type",Object)],Zu.prototype,"fillOverride",void 0);E([A({type:String}),w("design:type",Object)],Zu.prototype,"strokeOverride",void 0);E([A({type:Number}),w("design:type",Number)],Zu.prototype,"height",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Zu.prototype,"faded",void 0);E([Rt("type","fillOverride"),w("design:type",String),w("design:paramtypes",[])],Zu.prototype,"_fill",null);E([Rt("type","strokeOverride"),w("design:type",String),w("design:paramtypes",[])],Zu.prototype,"_stroke",null);Zu=E([yt("tf-graph-icon")],Zu);var Bs=class extends Gt(mt){constructor(){super(...arguments),this.node=null,this.renderInfo=null,this.colorBy=qn.STRUCTURE,this.templateIndex=null,this.type=null,this.vertical=!1,this.const=!1,this.summary=!1,this.fill=null,this.height=20}_computeFillOverride(t,r,n,i,o){return t&&r&&i?kH(i,n,r,!1):o}_getStrokeOverride(t){return t?tct(t):null}_getType(t,r,n,i){let{GraphIconType:o}=oct;if(t)switch(t.type){case jt.OP:{let a=t.op;return typeof a!="string"?o.OP:a==="Const"||n?o.CONST:a.endsWith("Summary")||r?o.SUMMARY:o.OP}case jt.META:return o.META;case jt.SERIES:return o.SERIES}return i}_isVertical(t,r){return t?t.hasNonControlEdges:!!r}_getFaded(t){return t&&t.isFadedOut}_onFillOverrideChanged(t,r){let{node:n,renderInfo:i,colorBy:o,templateIndex:a}=this;t!==r&&LH(this.$.icon.getSvgDefinableElement()),n&&i&&a&&kH(a,o,i,!1,this.$.icon.getSvgDefinableElement())}};Bs.template=Q`
    <style>
      tf-graph-icon {
        --tb-graph-faded: var(--tb-graph-faded);
      }
    </style>
    <tf-graph-icon
      id="icon"
      type="[[_getType(node, summary, const, type)]]"
      height="[[height]]"
      fill-override="[[_fillOverride]]"
      stroke-override="[[_getStrokeOverride(_fillOverride)]]"
      faded="[[_getFaded(renderInfo)]]"
      vertical="[[_isVertical(node, vertical)]]"
    ></tf-graph-icon>
  `;E([A({type:Object}),w("design:type",Object)],Bs.prototype,"node",void 0);E([A({type:Object}),w("design:type",Object)],Bs.prototype,"renderInfo",void 0);E([A({type:Object}),w("design:type",String)],Bs.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Bs.prototype,"templateIndex",void 0);E([A({type:String}),w("design:type",Object)],Bs.prototype,"type",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"vertical",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"const",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Bs.prototype,"summary",void 0);E([A({type:String}),w("design:type",Object)],Bs.prototype,"fill",void 0);E([A({type:Number}),w("design:type",Number)],Bs.prototype,"height",void 0);E([A({type:String,computed:"_computeFillOverride(node, renderInfo, colorBy, templateIndex, fill)",observer:"_onFillOverrideChanged"}),w("design:type",String)],Bs.prototype,"_fillOverride",void 0);Bs=E([yt("tf-node-icon")],Bs);var Gc=class extends Gt(mt){_itemTypeChanged(){this.itemType!=="subnode"?this.$["list-item"].classList.add("clickable"):this.$["list-item"].classList.remove("clickable")}_nodeListener(t){this.fire("node-list-item-"+t.type,{nodeName:this.name,type:this.itemType})}_fadedClass(t){return t&&t.isFadedOut?"faded":""}};Gc.template=Q`
    <style>
      #list-item {
        width: 100%;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
        position: relative;
        display: inline-block;
      }

      #list-item:hover {
        background-color: var(--google-yellow-100);
      }

      .clickable {
        cursor: pointer;
      }

      #list-item span {
        margin-left: 40px;
      }

      #list-item.excluded span {
        color: #999;
      }

      #list-item span.edge-label {
        float: right;
        font-size: 10px;
        margin-left: 3px;
        margin-right: 5px;
      }

      .node-icon {
        position: absolute;
        top: 1px;
        left: 2px;
      }

      .faded span {
        color: var(--tb-graph-faded);
      }
    </style>

    <div
      id="list-item"
      on-mouseover="_nodeListener"
      on-mouseout="_nodeListener"
      on-click="_nodeListener"
    >
      <div class$="{{_fadedClass(itemRenderInfo)}}">
        <tf-node-icon
          class="node-icon"
          height="12"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          node="[[itemNode]]"
          render-info="[[itemRenderInfo]]"
          template-index="[[templateIndex]]"
        >
        </tf-node-icon>
        <span title$="[[name]]">[[name]]</span>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",Object)],Gc.prototype,"cardNode",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"itemNode",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"edgeLabel",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"itemRenderInfo",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"name",void 0);E([A({type:String,observer:"_itemTypeChanged"}),w("design:type",String)],Gc.prototype,"itemType",void 0);E([A({type:String}),w("design:type",String)],Gc.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Gc.prototype,"colorByParams",void 0);E([A({type:Object}),w("design:type",Function)],Gc.prototype,"templateIndex",void 0);Gc=E([yt("tf-graph-op-compat-list-item")],Gc);var as=class extends Gt(_o(mt)){constructor(){super(...arguments),this._expanded=!0,this._opCompatColor=y0.COMPATIBLE,this._opIncompatColor=y0.INCOMPATIBLE,this._templateIndex=null}_getNode(t,r){return r.node(t)}_getRenderInfo(t,r){return this.renderHierarchy.getOrCreateRenderNodeByName(t)}_toggleExpanded(){this._expanded=!this._expanded}_getToggleIcon(t){return t?"expand-less":"expand-more"}_resizeList(t){var r=document.querySelector(t);r&&r.fire("iron-resize")}get _incompatibleOpNodes(){let t=this.graphHierarchy;return!t||!t.root?[]:(this.async(this._resizeList.bind(this,"#incompatibleOpsList")),dle(t))}get _opCompatScore(){var t=this.graphHierarchy;if(t&&t.root){var r=t.root,n=r.compatibilityHistogram.compatible,i=r.compatibilityHistogram.incompatible;if(n==0&&i==0)return 0;var o=n+i;return Math.floor(100*n/o)/100}return 0}get _opCompatScoreLabel(){var t=this._opCompatScore;return xn(".0%")(t)}get _totalIncompatOps(){var t=this.graphHierarchy;return t&&t.root?t.root.compatibilityHistogram.incompatible:0}_graphHierarchyChanged(){this._templateIndex=this.graphHierarchy.getTemplateIndex(),this.graphHierarchy.addListener(Dd.TEMPLATES_UPDATED,()=>{this._templateIndex=this.graphHierarchy.getTemplateIndex()})}};as.template=Q`
    <style>
      :host {
        max-height: 500px;
      }

      .incompatible-ops-list {
        height: 350px;
        max-height: 400px;
        overflow-y: scroll;
        display: flex;
        flex-direction: column;
      }

      iron-list {
        flex: 1 1 auto;
      }

      paper-item {
        padding: 0;
        background: var(--secondary-background-color);
      }

      paper-item-body[two-line] {
        min-height: 0;
        padding: 8px 12px 4px;
      }

      .expandedInfo {
        padding: 8px 12px;
        font-weight: 500;
        font-size: 12pt;
        width: 100%;
      }

      .node-name {
        white-space: normal;
        word-wrap: break-word;
        font-size: 14pt;
        font-weight: 500;
      }

      .subtitle {
        color: var(--secondary-text-color);
        font-size: 12pt;
      }

      .toggle-button {
        float: right;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .non-control-list-item {
        padding-left: 10px;
      }

      div.op-compat-display {
        margin-top: 10px;
        display: inline-block;
      }

      /**
       * Sadly, because the whole body is inverted in color, legends also need
       * to be inverted.
       **/
      :host(.dark-mode) div.op-compat-display {
        filter: invert(1);
      }

      svg.op-compat {
        width: 250px;
        height: 25px;
        float: left;
      }

      div.op-compat-value {
        float: right;
        height: 100%;
        font-size: 14px;
        color: black;
        margin-left: 10px;
      }
    </style>

    <paper-item>
      <paper-item-body two-line>
        <div>
          <paper-icon-button
            icon="{{_getToggleIcon(_expanded)}}"
            on-click="_toggleExpanded"
            class="toggle-button"
          >
          </paper-icon-button>
          <div class="node-name" id="nodetitle">[[nodeTitle]]</div>
        </div>
        <div secondary>
          <div class="subtitle">
            <div class="op-compat-display">
              <svg
                class="op-compat"
                preserveAspectRatio="xMinYMid meet"
                viewBox="0 0 250 25"
              >
                <defs>
                  <linearGradient id="op-compat-fill">
                    <stop offset="0" stop-color$="[[_opCompatColor]]"></stop>
                    <stop
                      offset$="[[_opCompatScore]]"
                      stop-color$="[[_opCompatColor]]"
                    ></stop>
                    <stop
                      offset$="[[_opCompatScore]]"
                      stop-color$="[[_opIncompatColor]]"
                    ></stop>
                    <stop offset="1" stop-color$="[[_opIncompatColor ]]"></stop>
                  </linearGradient>
                </defs>
                <rect
                  height="25"
                  width="250"
                  rx="5"
                  ry="5"
                  style="fill: url('#op-compat-fill');"
                ></rect>
              </svg>
              <div class="op-compat-value">[[_opCompatScoreLabel]]</div>
            </div>
          </div>
        </div>
      </paper-item-body>
    </paper-item>

    <iron-collapse opened="{{_expanded}}">
      <template is="dom-if" if="{{_expanded}}" restamp="true">
        <div class="expandedInfo">
          Incompatible Operations: (<span>[[_totalIncompatOps]]</span>)
          <iron-list
            class="incompatible-ops-list"
            id="incompatibleOpsList"
            items="[[_incompatibleOpNodes]]"
          >
            <template>
              <tf-graph-op-compat-list-item
                class="non-control-list-item"
                item-node="[[item]]"
                item-render-info="[[_getRenderInfo(item.name, renderHierarchy)]]"
                name="[[item.name]]"
                template-index="[[_templateIndex]]"
                color-by="[[colorBy]]"
                item-type="incompatible-ops"
              >
              </tf-graph-op-compat-list-item>
            </template>
          </iron-list>
        </div>
      </template>
    </iron-collapse>
  `;E([A({type:Object}),w("design:type",os)],as.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",lo)],as.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"nodeTitle",void 0);E([A({type:Boolean}),w("design:type",Boolean)],as.prototype,"_expanded",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"_opCompatColor",void 0);E([A({type:String}),w("design:type",String)],as.prototype,"_opIncompatColor",void 0);E([A({type:Object}),w("design:type",Object)],as.prototype,"_templateIndex",void 0);E([Rt("graphHierarchy"),w("design:type",Array),w("design:paramtypes",[])],as.prototype,"_incompatibleOpNodes",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],as.prototype,"_opCompatScore",null);E([Rt("_opCompatScore"),w("design:type",String),w("design:paramtypes",[])],as.prototype,"_opCompatScoreLabel",null);E([Rt("graphHierarchy"),w("design:type",Number),w("design:paramtypes",[])],as.prototype,"_totalIncompatOps",null);E([Bt("graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],as.prototype,"_graphHierarchyChanged",null);as=E([yt("tf-graph-op-compat-card")],as);var l3=Ee(Oe(),1);var Wc=class extends Gt(_o(mt)){_itemTypeChanged(){this.itemType!=="subnode"?this.$["list-item"].classList.add("clickable"):this.$["list-item"].classList.remove("clickable")}_nodeListener(t){this.fire("node-list-item-"+t.type,{cardNode:this.cardNode.name,nodeName:this.name,type:this.itemType})}_fadedClass(t){return t&&t.isFadedOut?"faded":""}};Wc.template=Q`
    <style>
      #list-item {
        width: 100%;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
        position: relative;
        display: inline-block;
      }

      #list-item:hover {
        background-color: var(--google-yellow-100);
      }

      :host(.dark-mode) #list-item:hover {
        background-color: var(--paper-yellow-900);
        color: #fff;
      }

      .clickable {
        cursor: pointer;
      }

      #list-item span {
        margin-left: 40px;
      }

      #list-item.excluded span {
        color: #999;
      }

      #list-item span.edge-label {
        float: right;
        font-size: 10px;
        margin-left: 3px;
        margin-right: 5px;
      }

      .node-icon {
        position: absolute;
        top: 1px;
        left: 2px;
      }

      .faded span {
        color: var(--tb-graph-faded);
      }
    </style>
    <div
      id="list-item"
      on-mouseover="_nodeListener"
      on-mouseout="_nodeListener"
      on-click="_nodeListener"
    >
      <div class$="{{_fadedClass(itemRenderInfo)}}">
        <tf-node-icon
          class="node-icon"
          height="12"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          node="[[itemNode]]"
          render-info="[[itemRenderInfo]]"
          template-index="[[templateIndex]]"
        ></tf-node-icon>
        <span title$="[[name]]">[[name]]</span>
        <span class="edge-label">[[edgeLabel]]</span>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",Object)],Wc.prototype,"cardNode",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"itemNode",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"edgeLabel",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"itemRenderInfo",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"name",void 0);E([A({type:String,observer:"_itemTypeChanged"}),w("design:type",String)],Wc.prototype,"itemType",void 0);E([A({type:String}),w("design:type",String)],Wc.prototype,"colorBy",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"colorByParams",void 0);E([A({type:Object}),w("design:type",Object)],Wc.prototype,"templateIndex",void 0);Wc=E([yt("tf-node-list-item")],Wc);var dn=class extends Gt(mt){constructor(){super(...arguments),this._expanded=!0,this._openedControlPred=!1,this._openedControlSucc=!1,this._templateIndex=null}expandNode(){this.fire("_node.expand",this.node)}_getNode(t,r){return r.node(t)}_getNodeStats(t,r){var n=this._getNode(t,r);return n?n.stats:null}_getTotalMicros(t){return t?t.getTotalMicros():0}get _hasDisplayableNodeStats(){var t=this._nodeStats;return gH(t)}get _nodeStatsFormattedBytes(){var t=this._nodeStats;if(!(!t||!t.totalBytes))return Nd(t.totalBytes,iP)}get _nodeStatsFormattedComputeTime(){var t=this._nodeStats;if(!(!t||!t.getTotalMicros()))return Nd(t.getTotalMicros(),oP)}get _nodeStatsFormattedOutputSizes(){var t=this._nodeStats;if(!(!t||!t.outputSize||!t.outputSize.length))return l3.map(t.outputSize,function(r){return r.length===0?"scalar":"["+r.join(", ")+"]"})}_getRenderInfo(t,r){return this.renderHierarchy.getOrCreateRenderNodeByName(t)}get _attributes(){var t=this._node;if(this.async(this._resizeList.bind(this,"#attributesList")),!t||!t.attr)return[];var r=[];return l3.each(t.attr,function(n){n.key===ile?r=r.concat(n.value.list.s.map(function(i){return{key:i,value:"Too large to show..."}})):r.push({key:n.key,value:JSON.stringify(n.value)})}),r}get _device(){var t=this._node;return t?t.device:null}get _successors(){var t=this._node,r=this.graphHierarchy;return this._refreshNodeItemList("inputsList"),t?this._convertEdgeListToEdgeInfoList(r.getSuccessors(t.name),!1,t.isGroupNode):{regular:[],control:[]}}get _predecessors(){var t=this._node,r=this.graphHierarchy;return this._refreshNodeItemList("outputsList"),t?this._convertEdgeListToEdgeInfoList(r.getPredecessors(t.name),!0,t.isGroupNode):{regular:[],control:[]}}get _functionUsages(){var t=this._node,r=this.graphHierarchy;if(this._refreshNodeItemList("functionUsagesList"),!t||t.type!==jt.META)return[];let n=r.libraryFunctions[t.associatedFunction];return n?n.usages:[]}_refreshNodeItemList(t){this.async(this._resizeList.bind(this,`#${t}`))}_convertEdgeListToEdgeInfoList(t,r,n){var i=a=>l3.map(a.baseEdgeList,s=>{var l=r?s.v:s.w;return{name:l,node:this._getNode(l,this.graphHierarchy),edgeLabel:Ylt(s,this.renderHierarchy),renderInfo:this._getRenderInfo(l,this.renderHierarchy)}}),o=function(a){var s=[];return l3.each(a,l=>{var c=r?l.v:l.w;!n||l.baseEdgeList.length==1?s=s.concat(i(l)):s.push({name:c,node:this._getNode(c,this.graphHierarchy),edgeLabel:jlt(l,this.renderHierarchy),renderInfo:this._getRenderInfo(c,this.renderHierarchy)})}),s}.bind(this);return{regular:o(t.regular),control:o(t.control)}}get _subnodes(){var t=this._node;return t&&t.metagraph?t.metagraph.nodes():null}get _totalPredecessors(){var t=this._predecessors;return t.regular.length+t.control.length}get _totalSuccessors(){var t=this._successors;return t.regular.length+t.control.length}_toggleControlPred(){this._openedControlPred=!this._openedControlPred}_toggleControlSucc(){this._openedControlSucc=!this._openedControlSucc}_toggleExpanded(){this._expanded=!this._expanded}_getToggleIcon(t){return t?"expand-less":"expand-more"}_resetState(){this._openedControlPred=!1,this._openedControlSucc=!1,this.set("_groupButtonText",Qlt(this._node))}_resizeList(t){var r=document.querySelector(t);r&&r.fire("iron-resize")}_toggleInclude(){this.fire("node-toggle-inclusion",{name:this.graphNodeName})}_nodeIncludeStateChanged(t,r){this.set("_auxButtonText",yH(t))}_toggleGroup(){var t=IH(this._node);this.fire("node-toggle-seriesgroup",{name:t})}_isLibraryFunction(t){return t&&t.name.startsWith(Sa)}_isInSeries(t){return Jlt(t)}_graphHierarchyChanged(){this._templateIndex=this.graphHierarchy.getTemplateIndex(),this.graphHierarchy.addListener(Dd.TEMPLATES_UPDATED,()=>{this._templateIndex=this.graphHierarchy.getTemplateIndex()})}};dn.template=Q`
    <style>
      .sub-list-group {
        font-weight: 500;
        font-size: 12pt;
        padding-bottom: 8px;
        width: 100%;
      }

      .sub-list {
        max-height: 300px;
        overflow-y: scroll;
      }

      .attr-left {
        float: left;
        width: 30%;
        word-wrap: break-word;
        color: var(--secondary-text-color);
        font-size: 11pt;
        font-weight: 400;
      }

      .attr-right {
        margin-left: 30%;
        word-wrap: break-word;
        color: var(--secondary-text-color);
        font-weight: 400;
      }

      .sub-list-table {
        display: table;
        width: 100%;
      }

      .sub-list-table-row {
        display: table-row;
      }

      .sub-list-table-row .sub-list-table-cell:last-child {
        text-align: right;
      }

      .sub-list-table-cell {
        color: var(--secondary-text-color);
        display: table-cell;
        font-size: 11pt;
        font-weight: 400;
        max-width: 200px;
        padding: 0 4px;
      }

      paper-item {
        padding: 0;
        background: var(--primary-background-color);
      }

      paper-item-body[two-line] {
        min-height: 0;
        padding: 8px 12px 4px;
      }

      .expandedInfo {
        padding: 8px 12px;
      }

      .controlDeps {
        padding: 0 0 0 8px;
      }

      .node-name {
        white-space: normal;
        word-wrap: break-word;
        font-size: 14pt;
        font-weight: 500;
      }

      .node-icon {
        float: right;
      }

      .subtitle {
        color: var(--secondary-text-color);
        font-size: 12pt;
      }

      .controlLine {
        font-size: 11pt;
        font-weight: 400;
      }

      .toggle-button {
        float: right;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .control-toggle-button {
        float: left;
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .toggle-include-group {
        padding-top: 4px;
      }

      .toggle-include {
        margin: 5px 6px;
        text-transform: none;
        padding: 4px 6px;
        font-size: 10pt;
        background-color: #fafafa;
        color: #666;
      }

      .toggle-include:hover {
        background-color: var(--google-yellow-100);
      }

      .non-control-list-item {
        padding-left: 10px;
      }
    </style>
    <paper-item>
      <paper-item-body two-line>
        <div>
          <paper-icon-button
            icon="{{_getToggleIcon(_expanded)}}"
            on-click="_toggleExpanded"
            class="toggle-button"
          >
          </paper-icon-button>
          <div class="node-name">
            <tf-wbr-string value="[[_node.name]]" delimiter-pattern="/">
            </tf-wbr-string>
          </div>
        </div>
        <div secondary>
          <tf-node-icon
            class="node-icon"
            node="[[_node]]"
            render-info="[[_getRenderInfo(graphNodeName, renderHierarchy)]]"
            color-by="[[colorBy]]"
            template-index="[[_templateIndex]]"
          ></tf-node-icon>
          <template is="dom-if" if="{{_node.op}}">
            <div class="subtitle">
              Operation:
              <span>[[_node.op]]</span>
            </div>
          </template>
          <template is="dom-if" if="{{_node.metagraph}}">
            <div class="subtitle">
              Subgraph:
              <span>[[_node.cardinality]]</span> nodes
            </div>
          </template>
        </div>
      </paper-item-body>
    </paper-item>
    <iron-collapse opened="{{_expanded}}">
      <template is="dom-if" if="{{_expanded}}" restamp="true">
        <div class="expandedInfo">
          <div class="sub-list-group attributes">
            Attributes (<span>[[_attributes.length]]</span>)
            <iron-list
              class="sub-list"
              id="attributesList"
              items="[[_attributes]]"
            >
              <template>
                <div>
                  <div class="attr-left">[[item.key]]</div>
                  <div class="attr-right">[[item.value]]</div>
                </div>
              </template>
            </iron-list>
          </div>

          <template is="dom-if" if="{{_device}}">
            <div class="sub-list-group device">
              <div class="attr-left">Device</div>
              <div class="attr-right">[[_device]]</div>
            </div>
          </template>

          <div class="sub-list-group predecessors">
            Inputs (<span>[[_totalPredecessors]]</span>)
            <iron-list
              class="sub-list"
              id="inputsList"
              items="[[_predecessors.regular]]"
            >
              <template>
                <tf-node-list-item
                  class="non-control-list-item"
                  card-node="[[_node]]"
                  item-node="[[item.node]]"
                  edge-label="[[item.edgeLabel]]"
                  item-render-info="[[item.renderInfo]]"
                  name="[[item.name]]"
                  item-type="predecessors"
                  color-by="[[colorBy]]"
                  template-index="[[_templateIndex]]"
                >
                </tf-node-list-item>
              </template>
            </iron-list>
            <template is="dom-if" if="[[_predecessors.control.length]]">
              <div class="controlDeps">
                <div class="controlLine">
                  <paper-icon-button
                    icon="{{_getToggleIcon(_openedControlPred)}}"
                    on-click="_toggleControlPred"
                    class="control-toggle-button"
                  >
                  </paper-icon-button>
                  Control dependencies
                </div>
                <iron-collapse opened="{{_openedControlPred}}" no-animation>
                  <template
                    is="dom-if"
                    if="{{_openedControlPred}}"
                    restamp="true"
                  >
                    <iron-list
                      class="sub-list"
                      items="[[_predecessors.control]]"
                    >
                      <template>
                        <tf-node-list-item
                          card-node="[[_node]]"
                          item-node="[[item.node]]"
                          item-render-info="[[item.renderInfo]]"
                          name="[[item.name]]"
                          item-type="predecessors"
                          color-by="[[colorBy]]"
                          template-index="[[_templateIndex]]"
                        >
                        </tf-node-list-item>
                      </template>
                    </iron-list>
                  </template>
                </iron-collapse>
              </div>
            </template>
          </div>

          <div class="sub-list-group successors">
            Outputs (<span>[[_totalSuccessors]]</span>)
            <iron-list
              class="sub-list"
              id="outputsList"
              items="[[_successors.regular]]"
            >
              <template>
                <tf-node-list-item
                  class="non-control-list-item"
                  card-node="[[_node]]"
                  item-node="[[item.node]]"
                  edge-label="[[item.edgeLabel]]"
                  item-render-info="[[item.renderInfo]]"
                  name="[[item.name]]"
                  item-type="successor"
                  color-by="[[colorBy]]"
                  template-index="[[_templateIndex]]"
                >
                </tf-node-list-item>
              </template>
            </iron-list>
            <template is="dom-if" if="[[_successors.control.length]]">
              <div class="controlDeps">
                <div class="controlLine">
                  <paper-icon-button
                    icon="{{_getToggleIcon(_openedControlSucc)}}"
                    on-click="_toggleControlSucc"
                    class="control-toggle-button"
                  >
                  </paper-icon-button>
                  Control dependencies
                </div>
                <iron-collapse opened="{{_openedControlSucc}}" no-animation>
                  <template
                    is="dom-if"
                    if="{{_openedControlSucc}}"
                    restamp="true"
                  >
                    <iron-list class="sub-list" items="[[_successors.control]]">
                      <template>
                        <tf-node-list-item
                          card-node="[[_node]]"
                          item-node="[[item.node]]"
                          item-render-info="[[item.renderInfo]]"
                          name="[[item.name]]"
                          item-type="successors"
                          color-by="[[colorBy]]"
                          template-index="[[_templateIndex]]"
                        >
                        </tf-node-list-item>
                      </template>
                    </iron-list>
                  </template>
                </iron-collapse>
              </div>
            </template>
          </div>
          <template is="dom-if" if="{{_hasDisplayableNodeStats}}">
            <div class="sub-list-group node-stats">
              Node Stats
              <div class="sub-list-table">
                <template is="dom-if" if="{{_nodeStats.totalBytes}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Memory</div>
                    <div class="sub-list-table-cell">
                      [[_nodeStatsFormattedBytes]]
                    </div>
                  </div>
                </template>
                <template is="dom-if" if="{{_getTotalMicros(_nodeStats)}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Compute Time</div>
                    <div class="sub-list-table-cell">
                      [[_nodeStatsFormattedComputeTime]]
                    </div>
                  </div>
                </template>
                <template is="dom-if" if="{{_nodeStats.outputSize}}">
                  <div class="sub-list-table-row">
                    <div class="sub-list-table-cell">Tensor Output Sizes</div>
                    <div class="sub-list-table-cell">
                      <template
                        is="dom-repeat"
                        items="{{_nodeStatsFormattedOutputSizes}}"
                      >
                        [[item]] <br />
                      </template>
                    </div>
                  </div>
                </template>
              </div>
            </div>
          </template>

          <template is="dom-if" if="[[_functionUsages.length]]">
            <div class="sub-list-group predecessors">
              Usages of the Function (<span>[[_functionUsages.length]]</span>)
              <iron-list
                class="sub-list"
                id="functionUsagesList"
                items="[[_functionUsages]]"
              >
                <template>
                  <tf-node-list-item
                    class="non-control-list-item"
                    card-node="[[_node]]"
                    item-node="[[item]]"
                    name="[[item.name]]"
                    item-type="functionUsages"
                    color-by="[[colorBy]]"
                    template-index="[[_templateIndex]]"
                  >
                  </tf-node-list-item>
                </template>
              </iron-list>
            </div>
          </template>

          <template is="dom-if" if="[[!_isLibraryFunction(_node)]]">
            <div class="toggle-include-group">
              <paper-button
                raised
                class="toggle-include"
                on-click="_toggleInclude"
              >
                <span>[[_auxButtonText]]</span>
              </paper-button>
            </div>
          </template>

          <template is="dom-if" if="{{_isInSeries(_node)}}">
            <div class="toggle-include-group">
              <paper-button
                raised
                class="toggle-include"
                on-click="_toggleGroup"
              >
                <span>[[_groupButtonText]]</span>
              </paper-button>
            </div>
          </template>
        </div>
      </template>
    </iron-collapse>
  `;E([A({type:String}),w("design:type",String)],dn.prototype,"graphNodeName",void 0);E([A({type:Object}),w("design:type",os)],dn.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Object)],dn.prototype,"renderHierarchy",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"colorBy",void 0);E([A({type:Object,computed:"_getNode(graphNodeName, graphHierarchy)",observer:"_resetState"}),w("design:type",Object)],dn.prototype,"_node",void 0);E([A({type:Object,computed:"_getNodeStats(graphNodeName, graphHierarchy)",observer:"_resetState"}),w("design:type",Object)],dn.prototype,"_nodeStats",void 0);E([A({type:Number,observer:"_nodeIncludeStateChanged"}),w("design:type",Number)],dn.prototype,"nodeInclude",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_openedControlPred",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dn.prototype,"_openedControlSucc",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"_auxButtonText",void 0);E([A({type:String}),w("design:type",String)],dn.prototype,"_groupButtonText",void 0);E([A({type:Object}),w("design:type",Function)],dn.prototype,"_templateIndex",void 0);E([Rt("_nodeStats"),w("design:type",Boolean),w("design:paramtypes",[])],dn.prototype,"_hasDisplayableNodeStats",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedBytes",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedComputeTime",null);E([Rt("_nodeStats"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_nodeStatsFormattedOutputSizes",null);E([Rt("_node"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_attributes",null);E([Rt("_node"),w("design:type",String),w("design:paramtypes",[])],dn.prototype,"_device",null);E([Rt("_node","graphHierarchy"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_successors",null);E([Rt("_node","graphHierarchy"),w("design:type",Object),w("design:paramtypes",[])],dn.prototype,"_predecessors",null);E([Rt("_node","graphHierarchy"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_functionUsages",null);E([Rt("_node"),w("design:type",Array),w("design:paramtypes",[])],dn.prototype,"_subnodes",null);E([Rt("_predecessors"),w("design:type",Number),w("design:paramtypes",[])],dn.prototype,"_totalPredecessors",null);E([Rt("_successors"),w("design:type",Number),w("design:paramtypes",[])],dn.prototype,"_totalSuccessors",null);E([Bt("graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],dn.prototype,"_graphHierarchyChanged",null);dn=E([yt("tf-node-info")],dn);var ss=class extends Gt(mt){ready(){super.ready(),this.addEventListener("node-list-item-click",this._nodeListItemClicked.bind(this)),this.addEventListener("node-list-item-mouseover",this._nodeListItemMouseover.bind(this)),this.addEventListener("node-list-item-mouseout",this._nodeListItemMouseout.bind(this))}_nodeListItemClicked(t){this.selectedNode=t.detail.nodeName}_nodeListItemMouseover(t){this.highlightedNode=t.detail.nodeName}_nodeListItemMouseout(){this.highlightedNode=null}_healthPillsAvailable(t,r){return t&&r&&Object.keys(r).length>0}_equals(t,r){return t===r}};ss.template=Q`
    <style>
      :host {
        background: var(--secondary-background-color);
        font-size: 12px;
        margin: 0;
        padding: 0;
        display: block;
        max-height: 650px;
        overflow-x: hidden;
        overflow-y: auto;
      }

      h2 {
        padding: 0;
        text-align: center;
        margin: 0;
      }
    </style>
    <template is="dom-if" if="{{selectedNode}}">
      <paper-material elevation="1" class="card">
        <tf-node-info
          graph-hierarchy="[[graphHierarchy]]"
          render-hierarchy="[[renderHierarchy]]"
          flat-graph="[[graph]]"
          graph-node-name="[[selectedNode]]"
          node-include="[[selectedNodeInclude]]"
          highlighted-node="{{highlightedNode}}"
          color-by="[[colorBy]]"
        >
        </tf-node-info>
      </paper-material>
    </template>
    <template is="dom-if" if="[[_equals(colorBy, 'op_compatibility')]]">
      <tf-graph-op-compat-card
        graph-hierarchy="[[graphHierarchy]]"
        render-hierarchy="[[renderHierarchy]]"
        color-by="[[colorBy]]"
        node-title="[[compatNodeTitle]]"
      >
      </tf-graph-op-compat-card>
    </template>
    <template
      is="dom-if"
      if="[[_healthPillsAvailable(debuggerDataEnabled, nodeNamesToHealthPills)]]"
    >
      <tf-graph-debugger-data-card
        render-hierarchy="[[renderHierarchy]]"
        debugger-numeric-alerts="[[debuggerNumericAlerts]]"
        node-names-to-health-pills="[[nodeNamesToHealthPills]]"
        selected-node="{{selectedNode}}"
        highlighted-node="{{highlightedNode}}"
        are-health-pills-loading="[[areHealthPillsLoading]]"
        all-steps-mode-enabled="{{allStepsModeEnabled}}"
        specific-health-pill-step="{{specificHealthPillStep}}"
        health-pill-step-index="{{healthPillStepIndex}}"
      >
      </tf-graph-debugger-data-card>
    </template>
  `;E([A({type:String}),w("design:type",String)],ss.prototype,"title",void 0);E([A({type:Object}),w("design:type",os)],ss.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],ss.prototype,"graph",void 0);E([A({type:Object}),w("design:type",lo)],ss.prototype,"renderHierarchy",void 0);E([A({type:Object}),w("design:type",Object)],ss.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ss.prototype,"healthPillStepIndex",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"colorBy",void 0);E([A({type:String}),w("design:type",String)],ss.prototype,"compatNodeTitle",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ss.prototype,"selectedNode",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ss.prototype,"highlightedNode",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ss.prototype,"selectedNodeInclude",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ss.prototype,"debuggerDataEnabled",void 0);ss=E([yt("tf-graph-info")],ss);var cur={MAX_NODE_COUNT:1e4,MAX_EDGE_COUNT:1e4},tn=class extends Gt(mt){constructor(){super(...arguments),this.hierarchyParams=r3,this.allStepsModeEnabled=!1,this.specificHealthPillStep=0,this.compatNodeTitle="TPU Compatibility"}fit(){this.$.graph.fit()}downloadAsImage(t){return Ri(this,null,function*(){let r=yield this.$.graph.getImageBlob(),n=document.createElement("a");n.href=URL.createObjectURL(r),n.download=t,n.click(),URL.revokeObjectURL(n.href)})}_isNotComplete(t){return t.value<100}_getContainerClass(t){var r="container";return t.error&&(r+=" error"),this._isNotComplete(t)&&(r+=" loading"),r}_onNodeInclusionToggled(t){this.$.graph.nodeToggleExtract(t.detail.name)}_onNodeSeriesGroupToggled(t){this.$.graph.nodeToggleSeriesGroup(t.detail.name)}_updateNodeInclude(){let t=this.renderHierarchy?this.renderHierarchy.getNodeByName(this.selectedNode):null;this._selectedNodeInclude=t?t.include:ur.UNSPECIFIED}_slimGraphChanged(){if(!this.graph)return;let{MAX_NODE_COUNT:t,MAX_EDGE_COUNT:r}=cur;Object.keys(this.graph.nodes).length>t&&this.graph.edges.length>r&&this.colorBy===qn.STRUCTURE&&(this.colorBy=qn.NONE)}_ensureTemplates(){!this.graphHierarchy||this.colorBy!==qn.STRUCTURE||this.graphHierarchy.getTemplateIndex()||this.graphHierarchy.updateTemplates()}};tn.template=Q`
    <style>
      ::host {
        display: block;
      }

      /deep/ .close {
        position: absolute;
        cursor: pointer;
        left: 15px;
        bottom: 15px;
      }

      .container {
        width: 100%;
        height: 100%;
        opacity: 1;
      }

      .container.loading {
        cursor: progress;
        opacity: 0.1;
      }

      .container.loading.error {
        cursor: auto;
      }

      #info {
        position: absolute;
        right: 5px;
        top: 5px;
        padding: 0px;
        max-width: 380px;
        min-width: 320px;
        background-color: rgba(255, 255, 255, 0.9);
        @apply --shadow-elevation-2dp;
      }

      #main {
        width: 100%;
        height: 100%;
      }

      #progress-bar {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        position: absolute;
        top: 40px;
        left: 0;
        font-size: 13px;
      }

      #progress-msg {
        margin-bottom: 5px;
        white-space: pre-wrap;
        width: 400px;
      }

      paper-progress {
        width: 400px;
        --paper-progress-height: 6px;
        --paper-progress-active-color: #f3913e;
      }

      .context-menu {
        position: absolute;
        display: none;
        background-color: #e2e2e2;
        border-radius: 2px;
        font-size: 14px;
        min-width: 150px;
        border: 1px solid #d4d4d4;
      }

      /deep/ .context-menu ul {
        list-style-type: none;
        margin: 0;
        padding: 0;
        cursor: default;
      }

      /deep/ .context-menu ul li {
        padding: 4px 16px;
      }

      /deep/ .context-menu ul li:hover {
        background-color: #f3913e;
        color: white;
      }
    </style>
    <template is="dom-if" if="[[_isNotComplete(progress)]]">
      <div id="progress-bar">
        <div id="progress-msg">[[progress.msg]]</div>
        <paper-progress value="[[progress.value]]"></paper-progress>
      </div>
    </template>
    <div class$="[[_getContainerClass(progress)]]">
      <div id="main">
        <tf-graph
          id="graph"
          graph-hierarchy="{{graphHierarchy}}"
          basic-graph="[[graph]]"
          hierarchy-params="[[hierarchyParams]]"
          render-hierarchy="{{renderHierarchy}}"
          devices-for-stats="[[devicesForStats]]"
          stats="[[stats]]"
          selected-node="{{selectedNode}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="{{colorByParams}}"
          progress="{{progress}}"
          edge-label-function="[[edgeLabelFunction]]"
          edge-width-function="[[edgeWidthFunction]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          health-pill-step-index="[[healthPillStepIndex]]"
          handle-node-selected="[[handleNodeSelected]]"
          handle-edge-selected="[[handleEdgeSelected]]"
          trace-inputs="[[traceInputs]]"
          auto-extract-nodes="[[autoExtractNodes]]"
        ></tf-graph>
      </div>
      <div id="info">
        <tf-graph-info
          id="graph-info"
          title="selected"
          graph-hierarchy="[[graphHierarchy]]"
          render-hierarchy="[[renderHierarchy]]"
          graph="[[graph]]"
          selected-node="{{selectedNode}}"
          selected-node-include="{{_selectedNodeInclude}}"
          highlighted-node="{{_highlightedNode}}"
          color-by="[[colorBy]]"
          color-by-params="[[colorByParams]]"
          debugger-data-enabled="[[debuggerDataEnabled]]"
          are-health-pills-loading="[[areHealthPillsLoading]]"
          debugger-numeric-alerts="[[debuggerNumericAlerts]]"
          node-names-to-health-pills="[[nodeNamesToHealthPills]]"
          all-steps-mode-enabled="{{allStepsModeEnabled}}"
          specific-health-pill-step="{{specificHealthPillStep}}"
          health-pill-step-index="{{healthPillStepIndex}}"
          compat-node-title="[[compatNodeTitle]]"
          on-node-toggle-inclusion="_onNodeInclusionToggled"
          on-node-toggle-seriesgroup="_onNodeSeriesGroupToggled"
        ></tf-graph-info>
      </div>
    </div>
  `;E([A({type:Object}),w("design:type",os)],tn.prototype,"graphHierarchy",void 0);E([A({type:Object}),w("design:type",Xu)],tn.prototype,"graph",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"hierarchyParams",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"stats",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"progress",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"autoExtractNodes",void 0);E([A({type:String,notify:!0}),w("design:type",String)],tn.prototype,"colorBy",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],tn.prototype,"colorByParams",void 0);E([A({type:Object,notify:!0}),w("design:type",lo)],tn.prototype,"renderHierarchy",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"debuggerDataEnabled",void 0);E([A({type:Boolean}),w("design:type",Boolean)],tn.prototype,"areHealthPillsLoading",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],tn.prototype,"debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"nodeNamesToHealthPills",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],tn.prototype,"allStepsModeEnabled",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],tn.prototype,"specificHealthPillStep",void 0);E([A({type:Number}),w("design:type",Number)],tn.prototype,"healthPillStepIndex",void 0);E([A({type:String,notify:!0}),w("design:type",String)],tn.prototype,"selectedNode",void 0);E([A({type:String}),w("design:type",String)],tn.prototype,"compatNodeTitle",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"edgeWidthFunction",void 0);E([A({type:Number}),w("design:type",Number)],tn.prototype,"_selectedNodeInclude",void 0);E([A({type:String}),w("design:type",String)],tn.prototype,"_highlightedNode",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"handleNodeSelected",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"edgeLabelFunction",void 0);E([A({type:Object}),w("design:type",Object)],tn.prototype,"handleEdgeSelected",void 0);E([Bt("selectedNode","renderHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_updateNodeInclude",null);E([Bt("graph"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_slimGraphChanged",null);E([Bt("colorBy","graphHierarchy"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],tn.prototype,"_ensureTemplates",null);tn=E([yt("tf-graph-board")],tn);var c3=Ee(Oe(),1);var Ju=class{isNotTpuOp(t){return t.toLowerCase().search("cpu:")!=-1||t.toLowerCase().search("gpu:")!=-1?!0:t.toLowerCase().search("tpu")==-1}opValid(t){return t.name.search(Sa)==0||!t.op||t.device&&this.isNotTpuOp(t.device)||t.device&&t.device.search("TPU_SYSTEM")!=-1?!0:c3.includes(Ju.WHITELIST,t.op)}};Ju.WHITELIST=["Abs","Acos","Acosh","Add","AddN","AddV2","AdjustContrastv2","AdjustHue","AdjustSaturation","All","AllToAll","Angle","Any","ApproximateEqual","ArgMax","ArgMin","Asin","Asinh","Assert","AssignAddVariableOp","AssignSubVariableOp","AssignVariableOp","Atan","Atan2","Atanh","AvgPool","AvgPool3D","AvgPool3DGrad","AvgPoolGrad","BatchMatMul","BatchMatMulV2","BatchToSpace","BatchToSpaceND","BesselI0e","BesselI1e","Betainc","BiasAdd","BiasAddGrad","BiasAddV1","Bitcast","BitwiseAnd","BitwiseOr","BitwiseXor","BroadcastArgs","BroadcastGradientArgs","BroadcastTo","Bucketize","Case","Cast","Ceil","CheckNumerics","Cholesky","ClipByValue","CollectivePermute","CollectiveReduceV2","Complex","ComplexAbs","Concat","ConcatOffset","ConcatV2","Conj","ConjugateTranspose","Const","ControlTrigger","Conv2D","Conv2DBackpropFilter","Conv2DBackpropInput","Conv3D","Conv3DBackpropFilterV2","Conv3DBackpropInputV2","Cos","Cosh","Cross","CrossReplicaSum","Cumprod","Cumsum","DataFormatDimMap","DataFormatVecPermute","DepthToSpace","DepthwiseConv2dNative","DepthwiseConv2dNativeBackpropFilter","DepthwiseConv2dNativeBackpropInput","Dequantize","DeviceIndex","Diag","DiagPart","Digamma","Div","DivNoNan","DynamicStitch","Einsum","Elu","EluGrad","Empty","EmptyTensorList","EnsureShape","Equal","Erf","Erfc","Erfinv","Exp","ExpandDims","Expm1","ExtractImagePatches","FFT","FFT2D","FFT3D","FakeParam","FakeQuantWithMinMaxArgs","FakeQuantWithMinMaxArgsGradient","FakeQuantWithMinMaxVars","FakeQuantWithMinMaxVarsGradient","Fill","Floor","FloorDiv","FloorMod","FusedBatchNorm","FusedBatchNormGrad","FusedBatchNormGradV2","FusedBatchNormGradV3","FusedBatchNormV2","FusedBatchNormV3","Gather","GatherNd","GatherV2","GetItem","Greater","GreaterEqual","HSVToRGB","IFFT","IFFT2D","IFFT3D","IRFFT","IRFFT2D","IRFFT3D","Identity","IdentityN","If","Igamma","IgammaGradA","Igammac","Imag","InTopKV2","InfeedDequeue","InfeedDequeueTuple","InplaceAdd","InplaceUpdate","Inv","Invert","InvertPermutation","IsFinite","IsInf","IsNan","KthOrderStatistic","L2Loss","LRN","LRNGrad","LeakyRelu","LeakyReluGrad","LeftShift","Less","LessEqual","Lgamma","LinSpace","ListDiff","Log","Log1p","LogSoftmax","LogicalAnd","LogicalNot","LogicalOr","LowerBound","MakeUnique","MatMul","MatrixBandPart","MatrixDiag","MatrixDiagPart","MatrixDiagPartV2","MatrixDiagPartV3","MatrixDiagV2","MatrixDiagV3","MatrixInverse","MatrixSetDiag","MatrixSetDiagV2","MatrixSetDiagV3","MatrixSolve","MatrixTriangularSolve","Max","MaxPool","MaxPool3D","MaxPool3DGrad","MaxPool3DGradGrad","MaxPoolGrad","MaxPoolGradGrad","MaxPoolGradGradV2","MaxPoolGradV2","MaxPoolV2","Maximum","Mean","Min","Minimum","MirrorPad","MirrorPadGrad","Mod","Mul","MulNoNan","Multinomial","Ndtri","Neg","NextAfter","NoOp","NonMaxSuppressionV4","NotEqual","OneHot","OnesLike","OutfeedEnqueue","OutfeedEnqueueTuple","Pack","Pad","PadV2","ParallelDynamicStitch","ParameterizedTruncatedNormal","PartitionedCall","PlaceholderWithDefault","Polygamma","PopulationCount","Pow","PreventGradient","Prod","Qr","QuantizeAndDequantizeV2","QuantizeAndDequantizeV3","RFFT","RFFT2D","RFFT3D","RGBToHSV","RandomGammaGrad","RandomShuffle","RandomStandardNormal","RandomUniform","RandomUniformInt","Range","Rank","ReadVariableOp","Real","RealDiv","Reciprocal","ReciprocalGrad","Relu","Relu6","Relu6Grad","ReluGrad","Reshape","ResizeBilinear","ResizeBilinearGrad","ResizeNearestNeighbor","ResizeNearestNeighborGrad","ResourceApplyAdaMax","ResourceApplyAdadelta","ResourceApplyAdagrad","ResourceApplyAdagradDA","ResourceApplyAdagradV2","ResourceApplyAdam","ResourceApplyAddSign","ResourceApplyCenteredRMSProp","ResourceApplyFtrl","ResourceApplyFtrlV2","ResourceApplyGradientDescent","ResourceApplyKerasMomentum","ResourceApplyMomentum","ResourceApplyPowerSign","ResourceApplyProximalAdagrad","ResourceApplyProximalGradientDescent","ResourceApplyRMSProp","ResourceGather","ResourceScatterAdd","ResourceScatterDiv","ResourceScatterMax","ResourceScatterMin","ResourceScatterMul","ResourceScatterNdAdd","ResourceScatterNdSub","ResourceScatterNdUpdate","ResourceScatterSub","ResourceScatterUpdate","ResourceStridedSliceAssign","Reverse","ReverseSequence","ReverseV2","RightShift","Rint","RngReadAndSkip","RngSkip","Roll","Round","Rsqrt","RsqrtGrad","ScatterNd","Select","SelectV2","SelfAdjointEigV2","Selu","SeluGrad","Shape","ShapeN","Sigmoid","SigmoidGrad","Sign","Sin","Sinh","Size","Slice","Snapshot","Softmax","SoftmaxCrossEntropyWithLogits","Softplus","SoftplusGrad","Softsign","SoftsignGrad","SpaceToBatch","SpaceToBatchND","SpaceToDepth","SparseMatMul","SparseSoftmaxCrossEntropyWithLogits","SparseToDense","Split","SplitV","Sqrt","SqrtGrad","Square","SquaredDifference","Squeeze","StackCloseV2","StackPopV2","StackPushV2","StackV2","StatefulPartitionedCall","StatefulStandardNormalV2","StatefulTruncatedNormal","StatefulUniform","StatefulUniformFullInt","StatefulUniformInt","StatelessCase","StatelessIf","StatelessMultinomial","StatelessRandomGetAlg","StatelessRandomGetKeyCounter","StatelessRandomGetKeyCounterAlg","StatelessRandomNormal","StatelessRandomNormalV2","StatelessRandomUniform","StatelessRandomUniformFullInt","StatelessRandomUniformFullIntV2","StatelessRandomUniformInt","StatelessRandomUniformIntV2","StatelessRandomUniformV2","StatelessTruncatedNormal","StatelessTruncatedNormalV2","StatelessWhile","StopGradient","StridedSlice","StridedSliceGrad","Sub","Sum","Svd","SymbolicGradient","TPUEmbeddingActivations","Tan","Tanh","TanhGrad","TensorArrayCloseV3","TensorArrayConcatV3","TensorArrayGatherV3","TensorArrayGradV3","TensorArrayReadV3","TensorArrayScatterV3","TensorArraySizeV3","TensorArraySplitV3","TensorArrayV3","TensorArrayWriteV3","TensorListConcatV2","TensorListElementShape","TensorListFromTensor","TensorListGather","TensorListGetItem","TensorListLength","TensorListPopBack","TensorListPushBack","TensorListReserve","TensorListSetItem","TensorListSplit","TensorListStack","TensorScatterAdd","TensorScatterMax","TensorScatterMin","TensorScatterSub","TensorScatterUpdate","TensorStridedSliceUpdate","Tile","TopKUnique","TopKV2","TopKWithUnique","Transpose","TridiagonalSolve","TruncateDiv","TruncateMod","TruncatedNormal","Unique","Unpack","UnsortedSegmentMax","UnsortedSegmentMin","UnsortedSegmentProd","UnsortedSegmentSum","UpperBound","VarIsInitializedOp","VariableShape","Where","While","Xdivy","XlaBroadcastHelper","XlaConv","XlaConvV2","XlaDequantize","XlaDot","XlaDotV2","XlaDynamicSlice","XlaDynamicUpdateSlice","XlaEinsum","XlaGather","XlaHostCompute","XlaIf","XlaKeyValueSort","XlaPad","XlaRecv","XlaRecvFromHost","XlaReduce","XlaReduceWindow","XlaReplicaId","XlaScatter","XlaSelectAndScatter","XlaSelfAdjointEig","XlaSend","XlaSendToHost","XlaSetBound","XlaSetDynamicDimensionSize","XlaSharding","XlaSort","XlaSpmdFullToShardShape","XlaSpmdShardToFullShape","XlaSvd","XlaVariadicReduce","XlaVariadicSort","XlaWhile","Xlog1py","Xlogy","ZerosLike","Zeta","Enter","Exit","LoopCond","Merge","NextIteration","Switch","_Arg","_ArrayToList","_FusedBatchNormEx","_ListToArray","_ParallelConcatUpdate","_RecvTPUEmbeddingActivations","_RecvTPUEmbeddingDeduplicationData","_Retval","_SendTPUEmbeddingGradients","_TPUCompile","_TPUExecute","_UnaryOpsComposition","TPUCompilationResult","TPUReplicatedInput","TPUReplicatedOutput","TPUReplicateMetadata","MergeV2Checkpoints","RestoreV2","SaveV2","Abort","Assert","Assign","Placeholder","PlaceholderV2","ShardedFilename","StringJoin","Variable","VariableV2","VarHandleOp","AudioSummary","AudioSummaryV2","DebugNumericSummary","HistogramSummary","ImageSummary","MergeSummary","ScalarSummary","StatsAggregatorSummary"];function Zle(e,t){if(t===null)throw new Error("Compatibility provider required, but got: "+t);c3.each(e.nodes,r=>{r.compatible=t.opValid(r),c3.each(r.inEmbeddings,n=>{n.compatible=t.opValid(n)}),c3.each(r.outEmbeddings,n=>{n.compatible=t.opValid(n)})})}var gP=Ee(Oe(),1);var Jle=Ee(Oe(),1);var Il=class extends Gt(mt){constructor(){super(...arguments),this._rawRegexInput="",this._previousRegexInput="",this._searchTimeoutDelay=150,this._maxRegexResults=42}get _regexInput(){var t=this.renderHierarchy,r=this._rawRegexInput;return r.trim()}_regexInputChanged(){var t=this._regexInput;this._requestSearch()}_clearSearchResults(){this.set("_regexMatches",[])}_requestSearch(){if(!this._searchPending){if(this._regexInput===this._previousRegexInput){this._searchPending=!1;return}this._searchPending=!0,this._executeSearch(),this.async(()=>{this._searchPending=!1,this._requestSearch()},this._searchTimeoutDelay)}}_executeSearch(){if(this._previousRegexInput=this._regexInput,!this._regexInput){this._clearSearchResults();return}try{var t=new RegExp(this._regexInput)}catch(i){this._clearSearchResults();return}let r=[],n=this.renderHierarchy.hierarchy.getNodeMap();Jle.each(n,(i,o)=>{if(r.length>=this._maxRegexResults)return!1;!t.test(o)||r.push(o)}),this.set("_regexMatches",r)}_matchClicked(t){let r=t.model.item;this.set("selectedNode",r),Po({actionId:jr.NODE_SEARCH_RESULT_FOCUSED})}};Il.template=Q`
    <div id="search-container">
      <paper-input
        id="runs-regex"
        label="Search nodes (regex)"
        value="{{_rawRegexInput}}"
      >
      </paper-input>
      <div id="search-results-anchor">
        <div id="search-results">
          <template is="dom-repeat" items="[[_regexMatches]]">
            <div id="search-match" on-click="_matchClicked">[[item]]</div>
          </template>
        </div>
      </div>
    </div>
    <style>
      #search-container {
        width: 100%;
        overflow: visible;
      }

      #runs-regex {
        width: 100%;
      }

      #search-results-anchor {
        position: relative;
      }

      #search-results {
        color: #fff;
        position: absolute;
        max-height: 200px;
        overflow-x: hidden;
        overflow-y: auto;
        text-align: right;
        max-width: 100%;
        box-sizing: border-box;
      }

      #search-match {
        background: var(--tb-orange-strong);
        padding: 3px;
        float: right;
        width: 100%;
        box-sizing: border-box;
        direction: rtl;
      }

      #search-match:hover {
        background: var(--tb-orange-weak);
        cursor: pointer;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Il.prototype,"renderHierarchy",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Il.prototype,"selectedNode",void 0);E([A({type:String}),w("design:type",String)],Il.prototype,"_rawRegexInput",void 0);E([A({type:String}),w("design:type",String)],Il.prototype,"_previousRegexInput",void 0);E([A({type:Number}),w("design:type",Number)],Il.prototype,"_searchTimeoutDelay",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Il.prototype,"_searchPending",void 0);E([A({type:Number}),w("design:type",Number)],Il.prototype,"_maxRegexResults",void 0);E([A({type:Array}),w("design:type",Array)],Il.prototype,"_regexMatches",void 0);E([Rt("renderHierarchy","_rawRegexInput"),w("design:type",String),w("design:paramtypes",[])],Il.prototype,"_regexInput",null);E([Bt("_regexInput"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Il.prototype,"_regexInputChanged",null);Il=E([yt("tf-graph-node-search")],Il);var lct=/device:([^:]+:[0-9]+)$/,sct=[{regex:lct}],Qle=[],uur=new Set([qn.COMPUTE_TIME,qn.MEMORY]),Pn=class extends Gt(_o(mt)){constructor(){super(...arguments),this.ColorBy=qn,this.stats=null,this.devicesForStats=null,this.colorBy=qn.STRUCTURE,this.datasets=[],this._selectedRunIndex=0,this.traceInputs=!1,this.autoExtractNodes=!0,this._selectedTagIndex=0,this._selectedGraphType=Fs.OP_GRAPH,this.showSessionRunsDropdown=!0,this.showUploadButton=!0,this._legendOpened=!0,this._downloadFilename="graph.png"}_onGraphTypeChangedByUserGesture(){Po({actionId:jr.GRAPH_TYPE_CHANGED,eventLabel:this._selectedGraphType})}_onColorByChangedByUserGesture(){Po({actionId:jr.NODE_COLOR_MODE_CHANGED,eventLabel:this.colorBy})}_onTraceInputsChangedByUserGesture(){Po({actionId:jr.TRACE_INPUT_MODE_TOGGLED})}_xlaClustersProvided(t){return t&&t.hierarchy&&t.hierarchy.xlaClusters.length>0}_statsChanged(t){if(t!=null){var r={},n=gP.each(t.dev_stats,function(i){var o=gP.some(sct,function(s){return s.regex.test(i.device)}),a=gP.some(Qle,function(s){return s.regex.test(i.device)});o&&!a&&(r[i.device]=!0)});this.set("devicesForStats",r)}}get _currentDevices(){var t=this.devicesForStats;let r=this.stats,o=(r?r.dev_stats:[]).map(s=>s.device).filter(s=>sct.some(l=>l.regex.test(s))),a=zlt(o);if(a.length==1){let s=a[0].match(lct);s&&(a[0]=s[1])}return o.map((s,l)=>{let c=null;return Qle.forEach(u=>{u.regex.test(s)&&(c=u.msg)}),{device:s,suffix:a[l],used:t==null?void 0:t[s],ignoredMsg:c}})}_deviceCheckboxClicked(t){let r=t.target,n=Object.assign({},this.devicesForStats),i=r.value;r.checked?n[i]=!0:delete n[i],this.set("devicesForStats",n)}_numTags(t,r){return this._getTags(t,r).length}_getTags(t,r){return!t||!t[r]?[]:t[r].tags}_fit(){this.fire("fit-tap")}_isGradientColoring(t,r){return uur.has(r)&&t!=null}_equals(t,r){return t===r}get _currentDeviceParams(){var t=this.colorByParams;let r=t.device.filter(o=>sct.some(a=>a.regex.test(o.device))),n=zlt(r.map(o=>o.device));if(n.length==1){var i=n[0].match(lct);i&&(n[0]=i[1])}return r.map((o,a)=>({device:n[a],color:o.color}))}get _currentXlaClusterParams(){var t=this.colorByParams;return t.xla_cluster}get _currentGradientParams(){var t=this.colorByParams,r=this.colorBy;if(!this._isGradientColoring(this.stats,r))return null;let n=t[r],i=n.minValue,o=n.maxValue;return r===qn.MEMORY?(i=Nd(i,iP),o=Nd(o,iP)):r===qn.COMPUTE_TIME&&(i=Nd(i,oP),o=Nd(o,oP)),{minValue:i,maxValue:o,startColor:n.startColor,endColor:n.endColor}}download(){this.fire("download-image-requested",this._downloadFilename)}_updateFileInput(t){var a;let r=(a=t.target.files)==null?void 0:a[0];if(!r)return;let n=r.name,i=n.lastIndexOf(".");i>=0&&(n=n.substring(0,i));let o=n.lastIndexOf("/");o>=0&&(n=n.substring(o+1)),this._setDownloadFilename(n),this.set("selectedFile",t),Po({actionId:jr.UPLOADED_GRAPH_FROM_FILESYSTEM})}_datasetsChanged(t,r){var n;r!=null&&(this._selectedRunIndex=0),this._setDownloadFilename((n=this.datasets[this._selectedRunIndex])==null?void 0:n.name)}_computeSelection(t,r,n,i){return!t[r]||!t[r].tags[n]?null:{run:t[r].name,tag:t[r].tags[n].tag,type:i}}_selectedRunIndexChanged(t){var r;!this.datasets||(this.colorBy=qn.STRUCTURE,this._selectedTagIndex=0,this._selectedGraphType=this._getDefaultSelectionType(),this.traceInputs=!1,this._setDownloadFilename((r=this.datasets[t])==null?void 0:r.name))}_selectedTagIndexChanged(){this._selectedGraphType=this._getDefaultSelectionType()}_getDefaultSelectionType(){let{datasets:t,_selectedRunIndex:r,_selectedTagIndex:n}=this;if(!t||!t[r]||!t[r].tags[n]||t[r].tags[n].opGraph)return Fs.OP_GRAPH;let i=t[r];return i.tags[n].profile?Fs.PROFILE:i.tags[n].conceptualGraph?Fs.CONCEPTUAL_GRAPH:Fs.OP_GRAPH}_getFile(){this.$$("#file").click()}_setDownloadFilename(t){this._downloadFilename=(t||"graph")+".png"}_statsNotNull(t){return t!==null}_toggleLegendOpen(){this.set("_legendOpened",!this._legendOpened)}_getToggleLegendIcon(t){return t?"expand-more":"expand-less"}_getSelectionOpGraphDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].opGraph}_getSelectionProfileDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].profile}_getSelectionConceptualGraphDisabled(t,r,n){return!t[r]||!t[r].tags[n]||!t[r].tags[n].conceptualGraph}};Pn.template=Q`
    <style>
      :host {
        color: #555;
        display: flex;
        flex-direction: column;
        font-size: 12px;
        width: 100%;
        --tb-graph-controls-title-color: #000;
        --tb-graph-controls-legend-text-color: #000;
        --tb-graph-controls-text-color: #555;
        --tb-graph-controls-title-font-size: 14px;
        --tb-graph-controls-subtitle-font-size: 14px;
        --paper-input-container-shared-input-style_-_font-size: 14px;
        --paper-font-subhead_-_font-size: 14px;
      }

      :host(.dark-mode) {
        --tb-graph-controls-title-color: #fff;
        --tb-graph-controls-legend-text-color: #f3f3f3;
        --tb-graph-controls-text-color: #eee;
      }

      paper-dropdown-menu {
        --paper-dropdown-menu-input: {
          padding: 0;
          color: gray;
        }
        --iron-icon-width: 15px;
        --iron-icon-height: 15px;
        --primary-text-color: gray;
        --paper-item-min-height: 30px;
      }

      paper-button[raised].keyboard-focus {
        font-weight: normal;
      }

      .run-dropdown {
        --paper-input-container: {
          padding: 5px 0 5px 5px;
        }
      }

      table {
        border-collapse: collapse;
        border-spacing: 0;
      }

      table tr {
        height: 20px;
      }

      table td {
        padding: 0;
        margin: 0;
      }

      .allcontrols {
        padding: 0 20px 20px;
        flex-grow: 1;
        overflow-y: auto;
      }

      .legend-holder {
        background: var(--secondary-background-color);
        box-sizing: border-box;
        color: var(--tb-graph-controls-text-color);
        width: 100%;
      }

      .legend-toolbar {
        appearance: none;
        background-color: inherit;
        border-top: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
        border-right: none;
        border-left: none;
        cursor: pointer;
        color: var(--tb-graph-controls-legend-text-color);
        font: inherit;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
      }

      .legend-toolbar,
      .legend-content {
        padding: 8px 20px;
      }

      .toggle-legend-button {
        max-height: 20px;
        max-width: 20px;
        padding: 0;
      }

      .toggle-legend-text {
        font-size: var(--tb-graph-controls-subtitle-font-size);
      }

      paper-radio-button {
        display: block;
        padding: 5px;
      }
      svg.icon,
      tf-graph-icon {
        width: 60px;
        height: 18px;
      }
      .domainValues {
        margin-bottom: 10px;
        width: 165px;
      }
      .domainStart {
        float: left;
      }
      .domainEnd {
        float: right;
      }
      .colorBox {
        width: 20px;
      }

      .image-icon {
        width: 24px;
        height: 24px;
      }

      .help-icon {
        height: 15px;
        margin: 0;
        padding: 0;
      }

      .gray {
        color: #666;
      }

      .title {
        font-size: var(--tb-graph-controls-title-font-size);
        margin: 8px 5px 8px 0;
        color: var(--tb-graph-controls-title-color);
      }
      .title small {
        font-weight: normal;
      }
      .deviceList,
      .xlaClusterList {
        max-height: 200px;
        overflow-y: auto;
      }

      #file {
        padding: 8px 0;
      }

      .color-legend-row {
        align-items: center;
        clear: both;
        display: flex;
        height: 20px;
        margin-top: 5px;
      }

      .color-legend-row .label,
      .color-legend-row svg,
      .color-legend-row tf-graph-icon {
        flex: 0 0 40px;
        margin-right: 20px;
      }

      .devices-checkbox input {
        text-align: left;
        vertical-align: middle;
      }

      .control-holder .icon-button {
        font-size: var(--tb-graph-controls-subtitle-font-size);
        margin: 0 -5px;
        padding: 5px;
        display: flex;
        justify-content: flex-start;
        color: var(--tb-graph-controls-text-color);
      }

      .button-text {
        padding-left: 20px;
        text-transform: none;
      }

      .upload-button {
        width: 165px;
        height: 25px;
        text-transform: none;
        margin-top: 4px;
      }

      .button-icon {
        width: 26px;
        height: 26px;
        color: var(--paper-orange-500);
      }

      .hidden-input {
        display: none;
      }

      .allcontrols .control-holder {
        clear: both;
        display: flex;
        justify-content: space-between;
      }

      .allcontrols .control-holder.control-options {
        padding: 0 0 15px 15px;
        flex-direction: column;
      }

      .allcontrols .control-holder paper-toggle-button {
        margin-bottom: 5px;
      }

      span.counter {
        font-size: var(--tb-graph-controls-subtitle-font-size);
        color: gray;
        margin-left: 4px;
      }

      .runs-row .title,
      .tags-row .title {
        display: flex;
        align-items: baseline;
      }

      .runs-row paper-item,
      .tags-row paper-item {
        --paper-item: {
          white-space: nowrap;
        }
      }

      table.control-holder {
        border: 0;
        border-collapse: collapse;
      }

      table.tf-graph-controls td.input-element-table-data {
        padding: 0 0 0 20px;
      }

      .spacer {
        flex-grow: 1;
      }

      .color-text {
        overflow: hidden;
      }

      .color-text.gradient-container {
        margin: 0 5px;
      }

      /** Override inline styles that suppress pointer events for disabled buttons. Otherwise, the */
      /*  tooltips do not appear. */
      paper-radio-group paper-radio-button {
        pointer-events: auto !important;
      }

      .legend-clarifier {
        color: #266236;
        cursor: help;
        display: inline-block;
        text-decoration: underline;
      }

      .legend-clarifier paper-tooltip {
        width: 150px;
      }

      /** Otherwise, polymer UI controls appear atop node search. */
      tf-graph-node-search {
        z-index: 1;
        width: 100%;
      }

      paper-dropdown-menu {
        flex-grow: 1;
      }
    </style>

    <div class="allcontrols">
      <div class="control-holder">
        <tf-graph-node-search
          selected-node="{{selectedNode}}"
          render-hierarchy="[[renderHierarchy]]"
        ></tf-graph-node-search>
      </div>
      <div class="control-holder">
        <paper-button class="icon-button" on-tap="_fit" alt="Fit to screen">
          <iron-icon icon="aspect-ratio" class="button-icon"></iron-icon>
          <span class="button-text">Fit to screen</span>
        </paper-button>
      </div>
      <div class="control-holder">
        <paper-button
          class="icon-button"
          on-click="download"
          alt="Download PNG"
        >
          <iron-icon icon="file-download" class="button-icon"></iron-icon>
          <span class="button-text">Download PNG</span>
        </paper-button>
      </div>
      <template is="dom-if" if="[[showUploadButton]]">
        <div class="control-holder">
          <paper-button
            class="icon-button"
            on-click="_getFile"
            alt="Upload file"
            title="Upload a pbtxt file to view a graph from the local filesystem"
          >
            <iron-icon icon="file-upload" class="button-icon"></iron-icon>
            <span class="button-text">Upload file</span>
          </paper-button>

          <div class="hidden-input">
            <input
              type="file"
              id="file"
              name="file"
              on-change="_updateFileInput"
              accept=".pbtxt"
            />
          </div>
        </div>
      </template>
      <div class="control-holder runs-row">
        <div class="title">
          Run <span class="counter">([[datasets.length]])</span>
        </div>
        <paper-dropdown-menu
          no-label-float
          no-animations
          noink
          horizontal-align="left"
          class="run-dropdown"
        >
          <paper-listbox
            class="dropdown-content"
            selected="{{_selectedRunIndex}}"
            slot="dropdown-content"
          >
            <template is="dom-repeat" items="[[datasets]]">
              <paper-item>[[item.name]]</paper-item>
            </template>
          </paper-listbox>
        </paper-dropdown-menu>
      </div>
      <template is="dom-if" if="[[showSessionRunsDropdown]]">
        <div class="control-holder tags-row">
          <div class="title">
            Tag
            <span class="counter"
              >([[_numTags(datasets, _selectedRunIndex)]])</span
            >
          </div>
          <paper-dropdown-menu
            no-label-float
            no-animations
            horizontal-align="left"
            noink
            class="run-dropdown"
          >
            <paper-listbox
              class="dropdown-content"
              selected="{{_selectedTagIndex}}"
              slot="dropdown-content"
            >
              <template
                is="dom-repeat"
                items="[[_getTags(datasets, _selectedRunIndex)]]"
              >
                <paper-item>[[item.displayName]]</paper-item>
              </template>
            </paper-listbox>
          </paper-dropdown-menu>
        </div>
      </template>
      <div class="title">Graph type</div>
      <div class="control-holder control-options">
        <paper-radio-group
          selected="{{_selectedGraphType}}"
          on-paper-radio-group-changed="_onGraphTypeChangedByUserGesture"
        >
          <!-- Note that the name has to match that of tf_graph_common.SelectionType. -->
          <paper-radio-button
            name="op_graph"
            disabled="[[_getSelectionOpGraphDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Op graph</paper-radio-button
          >
          <paper-radio-button
            name="conceptual_graph"
            disabled="[[_getSelectionConceptualGraphDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Conceptual graph</paper-radio-button
          >
          <paper-radio-button
            name="profile"
            disabled="[[_getSelectionProfileDisabled(datasets, _selectedRunIndex, _selectedTagIndex)]]"
            >Profile</paper-radio-button
          >
        </paper-radio-group>
      </div>
      <div class="title">Node options</div>
      <div class="control-holder control-options">
        <paper-toggle-button
          checked="{{traceInputs}}"
          on-change="_onTraceInputsChangedByUserGesture"
        >
          Trace inputs
        </paper-toggle-button>
        <paper-toggle-button checked="{{autoExtractNodes}}">
          Auto-extract high-degree nodes
        </paper-toggle-button>
      </div>
      <template is="dom-if" if="[[healthPillsFeatureEnabled]]">
        <div class="control-holder">
          <paper-toggle-button checked="{{healthPillsToggledOn}}"
            >Show health pills</paper-toggle-button
          >
        </div>
      </template>
      <div class="title">Color by</div>
      <div class="control-holder control-options">
        <paper-radio-group
          selected="{{colorBy}}"
          on-paper-radio-group-changed="_onColorByChangedByUserGesture"
        >
          <paper-radio-button name="[[ColorBy.NONE]]">None</paper-radio-button>

          <paper-radio-button name="[[ColorBy.STRUCTURE]]"
            >Structure</paper-radio-button
          >

          <paper-radio-button name="[[ColorBy.DEVICE]]"
            >Device</paper-radio-button
          >

          <paper-radio-button
            id="xla-cluster-radio-button"
            name="[[ColorBy.XLA_CLUSTER]]"
            disabled="[[!_xlaClustersProvided(renderHierarchy)]]"
          >
            XLA cluster
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="xla-cluster-radio-button"
            position="right"
            offset="0"
          >
            Coloring by XLA cluster is only enabled if at least 1 op specifies
            an XLA cluster.
          </paper-tooltip>

          <paper-radio-button
            id="compute-time-radio-button"
            name="[[ColorBy.COMPUTE_TIME]]"
            disabled="[[!stats]]"
          >
            Compute time
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="compute-time-radio-button"
            position="right"
            offset="0"
          >
            Coloring by compute time is only enabled if the RunMetadata proto is
            passed to the FileWriter when a specific session is run.
          </paper-tooltip>

          <paper-radio-button
            id="memory-radio-button"
            name="[[ColorBy.MEMORY]]"
            disabled="[[!stats]]"
          >
            Memory
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="memory-radio-button"
            position="right"
            offset="0"
          >
            Coloring by memory is only enabled if the RunMetadata proto is
            passed to the FileWriter when a specific session is run.
          </paper-tooltip>

          <paper-radio-button
            id="tpu-compatibility-radio-button"
            name="[[ColorBy.OP_COMPATIBILITY]]"
          >
            TPU compatibility
          </paper-radio-button>
          <paper-tooltip
            animation-delay="0"
            for="tpu-compatibility-radio-button"
            position="right"
            offset="0"
          >
            Coloring by whether an operation is compatible for the TPU device.
          </paper-tooltip>
        </paper-radio-group>
        <span class="spacer"></span>
      </div>
    </div>
    <div class="legend-holder">
      <button class="legend-toolbar" on-click="_toggleLegendOpen">
        <span class="toggle-legend-text">Legend</span>
        <iron-icon
          icon="[[_getToggleLegendIcon(_legendOpened)]]"
          class="toggle-legend-button"
        >
        </iron-icon>
      </button>
      <iron-collapse opened="[[_legendOpened]]" class="legend-content">
        <!-- Color-mode-specific legend items -->
        <div>
          <template is="dom-if" if="[[_isGradientColoring(stats, colorBy)]]">
            <svg width="140" height="20" class="color-text gradient-container">
              <defs>
                <linearGradient
                  id="linearGradient"
                  x1="0%"
                  y1="0%"
                  x2="100%"
                  y2="0%"
                >
                  <stop
                    class="start"
                    offset="0%"
                    stop-color$="[[_currentGradientParams.startColor]]"
                  ></stop>
                  <stop
                    class="end"
                    offset="100%"
                    stop-color$="[[_currentGradientParams.endColor]]"
                  ></stop>
                </linearGradient>
              </defs>
              <rect
                x="0"
                y="0"
                width="135"
                height="20"
                fill="url(#linearGradient)"
                stroke="black"
              ></rect>
            </svg>
            <div class="domainValues color-text">
              <div class="domainStart">[[_currentGradientParams.minValue]]</div>
              <div class="domainEnd">[[_currentGradientParams.maxValue]]</div>
            </div>
            <br style="clear: both" />
            <div>Devices included in stats:</div>
            <div class="deviceList">
              <template is="dom-repeat" items="[[_currentDevices]]">
                <div class="color-legend-row devices-checkbox">
                  <span
                    ><input
                      type="checkbox"
                      value$="[[item.device]]"
                      checked$="[[item.used]]"
                      on-click="_deviceCheckboxClicked"
                  /></span>
                  <span>[[item.suffix]]</span>
                  <template is="dom-if" if="[[item.ignoredMsg]]">
                    <paper-icon-button
                      icon="help"
                      class="help-icon"
                    ></paper-icon-button>
                    <paper-tooltip
                      position="right"
                      offset="0"
                      animation-delay="0"
                      >[[item.ignoredMsg]]</paper-tooltip
                    >
                  </template>
                </div>
              </template>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'structure')]]">
            <div class="color-text">
              <div class="color-legend-row">
                <span class="label"> colors </span>
                <span class="color-legend-value">same substructure</span>
              </div>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="META"
                  height="16"
                  fill-override="#eee"
                  stroke-override="#a6a6a6"
                ></tf-graph-icon>
                <span class="color-legend-value">unique substructure</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'device')]]">
            <div>
              <template is="dom-repeat" items="[[_currentDeviceParams]]">
                <div class="color-legend-row">
                  <tf-graph-icon
                    type="META"
                    height="16"
                    fill-override="[[item.color]]"
                    stroke-override="#a6a6a6"
                  ></tf-graph-icon>
                  <span class="color-legend-value">[[item.device]]</span>
                </div>
              </template>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="META"
                  height="16"
                  fill-override="#eee"
                  stroke-override="#a6a6a6"
                ></tf-graph-icon>
                <span class="color-legend-value">unknown device</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'xla_cluster')]]">
            <div>
              <template is="dom-repeat" items="[[_currentXlaClusterParams]]">
                <div class="color-legend-row">
                  <svg>
                    <use
                      xmlns:xlink="http://www.w3.org/1999/xlink"
                      xlink:href="#unfilled-rect"
                      x="0"
                      y="0"
                      style="fill:[[item.color]]"
                    ></use>
                  </svg>
                  <span class="color-legend-value">[[item.xla_cluster]]</span>
                </div>
              </template>
              <div class="color-legend-row">
                <svg>
                  <use
                    xmlns:xlink="http://www.w3.org/1999/xlink"
                    xlink:href="#grey-rect"
                    x="0"
                    y="0"
                  ></use>
                </svg>
                <span class="color-legend-value">unknown XLA cluster</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_equals(colorBy, 'op_compatibility')]]">
            <div class="color-text">
              <div class="color-legend-row">
                <tf-graph-icon
                  type="OP"
                  height="16"
                  fill-override="#0f9d58"
                  stroke-override="#ccc"
                ></tf-graph-icon>
                <span class="color-legend-value">Valid Op</span>
              </div>
              <div class="color-legend-row">
                <tf-graph-icon
                  type="OP"
                  height="16"
                  fill-override="#db4437"
                  stroke-override="#ccc"
                ></tf-graph-icon>
                <span class="color-legend-value">Invalid Op</span>
              </div>
            </div>
          </template>
          <template is="dom-if" if="[[_statsNotNull(stats)]]">
            <div class="color-legend-row">
              <tf-graph-icon type="META" height="16" faded></tf-graph-icon>
              <span class="color-legend-value">unused substructure</span>
            </div>
          </template>
        </div>

        <!-- Common legend items -->
        <div>
          <table>
            <tbody>
              <tr>
                <td></td>
                <td>(* = expandable)</td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon
                    type="META"
                    height="16"
                    fill-override="#d9d9d9"
                    stroke-override="#ccc"
                  ></tf-graph-icon>
                </td>
                <td>
                  Namespace<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Encapsulates a set of nodes. Namespace is hierarchical and
                      based on scope.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="OP" height="16"></tf-graph-icon>
                </td>
                <td>
                  OpNode
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that performs an operation. These nodes cannot
                      expand.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="SERIES" height="16"></tf-graph-icon>
                </td>
                <td>
                  Unconnected series<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Sequence of numbered nodes that are not connected to each
                      other.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon
                    type="SERIES"
                    height="16"
                    vertical
                  ></tf-graph-icon>
                </td>
                <td>
                  Connected series<span class="gray">*</span>
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Sequence of numbered nodes that are connected to each
                      other.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg class="icon">
                    <circle
                      fill="white"
                      stroke="#848484"
                      cx="10"
                      cy="10"
                      r="5"
                    ></circle>
                  </svg>
                </td>
                <td>
                  Constant
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that outputs a constant value.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <tf-graph-icon type="SUMMARY" height="20"></tf-graph-icon>
                </td>
                <td>
                  Summary
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Node that collects data for visualization within
                      TensorBoard.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <defs>
                      <marker
                        id="dataflow-arrowhead-legend"
                        fill="#bbb"
                        markerWidth="10"
                        markerHeight="10"
                        refX="9"
                        refY="5"
                        orient="auto-start-reverse"
                      >
                        <path d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"></path>
                      </marker>
                    </defs>
                    <path
                      marker-end="url(#dataflow-arrowhead-legend)"
                      stroke="#bbb"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                    ></path>
                  </svg>
                </td>
                <td>
                  Dataflow edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing the data flow between operations. Edges flow
                      upwards unless arrowheads specify otherwise.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <path
                      stroke="#bbb"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                      stroke-dasharray="2, 2"
                    ></path>
                  </svg>
                </td>
                <td>
                  Control dependency edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing the control dependency between operations.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
              <tr>
                <td>
                  <svg
                    class="icon"
                    height="15px"
                    preserveAspectRatio="xMinYMid meet"
                    viewBox="0 0 15 15"
                  >
                    <defs>
                      <marker
                        id="reference-arrowhead-legend"
                        fill="#FFB74D"
                        markerWidth="10"
                        markerHeight="10"
                        refX="9"
                        refY="5"
                        orient="auto-start-reverse"
                      >
                        <path d="M 0,0 L 10,5 L 0,10 C 3,7 3,3 0,0"></path>
                      </marker>
                    </defs>
                    <path
                      marker-end="url(#reference-arrowhead-legend)"
                      stroke="#FFB74D"
                      d="M2 9 l 29 0"
                      stroke-linecap="round"
                    ></path>
                  </svg>
                </td>
                <td>
                  Reference edge
                  <div class="legend-clarifier">
                    <span>?</span>
                    <paper-tooltip
                      animation-delay="0"
                      position="right"
                      offset="0"
                    >
                      Edge showing that the outgoing operation node can mutate
                      the incoming tensor.
                    </paper-tooltip>
                  </div>
                </td>
              </tr>
            </tbody>
          </table>
        </div>
      </iron-collapse>
    </div>
  `;E([A({type:Object,observer:"_statsChanged"}),w("design:type",Object)],Pn.prototype,"stats",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"devicesForStats",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Pn.prototype,"colorBy",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"colorByParams",void 0);E([A({type:Array,observer:"_datasetsChanged"}),w("design:type",Object)],Pn.prototype,"datasets",void 0);E([A({type:Object}),w("design:type",lo)],Pn.prototype,"renderHierarchy",void 0);E([A({type:Object,notify:!0,readOnly:!0,computed:"_computeSelection(datasets, _selectedRunIndex, _selectedTagIndex, _selectedGraphType)"}),w("design:type",Object)],Pn.prototype,"selection",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Pn.prototype,"selectedFile",void 0);E([A({type:Number,observer:"_selectedRunIndexChanged"}),w("design:type",Number)],Pn.prototype,"_selectedRunIndex",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"traceInputs",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"autoExtractNodes",void 0);E([A({type:Number,observer:"_selectedTagIndexChanged"}),w("design:type",Number)],Pn.prototype,"_selectedTagIndex",void 0);E([A({type:String}),w("design:type",String)],Pn.prototype,"_selectedGraphType",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Pn.prototype,"selectedNode",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"showSessionRunsDropdown",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"showUploadButton",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"healthPillsFeatureEnabled",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Pn.prototype,"healthPillsToggledOn",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Pn.prototype,"_legendOpened",void 0);E([Rt("devicesForStats"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentDevices",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentDeviceParams",null);E([Rt("colorByParams"),w("design:type",Array),w("design:paramtypes",[])],Pn.prototype,"_currentXlaClusterParams",null);E([Rt("colorByParams","colorBy"),w("design:type",Object),w("design:paramtypes",[])],Pn.prototype,"_currentGradientParams",null);Pn=E([yt("tf-graph-controls")],Pn);function hur(e){if(e==="true")return!0;if(e==="false")return!1;if(e[0]==='"')return e.substring(1,e.length-1);let r=parseFloat(e);return isNaN(r)?e:r}function tce(e){return new Promise((t,r)=>{fetch(e).then(n=>{n.ok?n.arrayBuffer().then(t,r):n.text().then(r,r)})})}function ece(e,t){return Zse("Reading metadata pbtxt",40,()=>e==null?Promise.resolve(null):tce(e),t,jr.FETCH_METADATA_PBTXT_BYTES).then(r=>mH("Parsing metadata.pbtxt",60,()=>r!=null?gur(r):Promise.resolve(null),t,jr.PARSE_METADATA_PBTXT_INTO_OBJECT))}function rce(e,t,r){return mH("Reading graph pbtxt",40,()=>Ri(this,null,function*(){let n=Date.now();if(t){let o=yield new Promise(function(a,s){let l=new FileReader;l.onload=()=>a(l.result),l.onerror=()=>s(l.error),l.readAsArrayBuffer(t)});return Po({timingId:jr.FETCH_PBTXT_BYTES_FROM_FILESYSTEM,eventValue:Date.now()-n}),o}let i=yield tce(e);return Po({timingId:jr.FETCH_PBTXT_BYTES_FROM_SERVER,eventValue:Date.now()-n}),i}),r,jr.FETCH_PBTXT_BYTES).then(n=>mH("Parsing graph.pbtxt",60,()=>mur(n),r,jr.PARSE_PBTXT_INTO_OBJECT))}function fur(e,t,r=1e6,n=`
`){return new Promise(function(i,o){function a(s,l,c){let u=c>=e.byteLength,h=l.split(n);h[0]=s+h[0];let f=u?"":h.pop();for(let g of h)try{t(g)}catch(_){o(_);return}if(u){i(!0);return}let p=new Blob([e.slice(c,c+r)]),d=new FileReader;d.onload=function(g){a(f,g.target.result,c+r)},d.readAsText(p)}a("","",0)})}var pur={"library.function":!0,"library.function.node_def":!0,"library.function.node_def.input":!0,"library.function.node_def.attr":!0,"library.function.node_def.attr.value.list.b":!0,"library.function.node_def.attr.value.list.f":!0,"library.function.node_def.attr.value.list.func":!0,"library.function.node_def.attr.value.list.i":!0,"library.function.node_def.attr.value.list.s":!0,"library.function.node_def.attr.value.list.shape":!0,"library.function.node_def.attr.value.list.shape.dim":!0,"library.function.node_def.attr.value.list.tensor":!0,"library.function.node_def.attr.value.list.type":!0,"library.function.node_def.attr.value.shape.dim":!0,"library.function.node_def.attr.value.tensor.string_val":!0,"library.function.node_def.attr.value.tensor.tensor_shape.dim":!0,"library.function.signature.input_arg":!0,"library.function.signature.output_arg":!0,"library.versions":!0,node:!0,"node.input":!0,"node.attr":!0,"node.attr.value.list.b":!0,"node.attr.value.list.f":!0,"node.attr.value.list.func":!0,"node.attr.value.list.i":!0,"node.attr.value.list.s":!0,"node.attr.value.list.shape":!0,"node.attr.value.list.shape.dim":!0,"node.attr.value.list.tensor":!0,"node.attr.value.list.type":!0,"node.attr.value.shape.dim":!0,"node.attr.value.tensor.string_val":!0,"node.attr.value.tensor.tensor_shape.dim":!0},dur={"step_stats.dev_stats":!0,"step_stats.dev_stats.node_stats":!0,"step_stats.dev_stats.node_stats.output":!0,"step_stats.dev_stats.node_stats.memory":!0,"step_stats.dev_stats.node_stats.output.tensor_description.shape.dim":!0};function mur(e){return nce(e,pur)}function gur(e){return nce(e,dur).then(t=>t.step_stats)}function nce(e,t){let r={},n=[],i=[],o=r;function a(l){let c=l.indexOf(":"),u=l.substring(0,c).trim(),h=hur(l.substring(c+2).trim());return{name:u,value:h}}function s(l,c,u,h){let f=l[c];f==null?l[c]=h.join(".")in t?[u]:u:Array.isArray(f)?f.push(u):l[c]=[f,u]}return fur(e,function(l){if(l=l.trim(),!!l)switch(l[l.length-1]){case"{":let c=l.substring(0,l.length-2).trim(),u={};n.push(o),i.push(c),s(o,c,u,i),o=u;break;case"}":o=n.pop(),i.pop();break;default:let h=a(l);s(o,h.name,h.value,i.concat(h.name));break}}).then(function(){return r})}function oce(e,t,r,n=new Ju,i=r3){let o=JS(e,30,"Data"),a=JS(e,20,"Graph"),s=JS(e,50,"Namespace hierarchy"),l=Date.now();return rce(t,r,o).then(function(c){if(!c.node)throw new Error("The graph is empty. This can happen when TensorFlow could not trace any graph. Please refer to https://github.com/tensorflow/tensorboard/issues/1961 for more information.");return lle(c,sle,a)},()=>{throw new Error("Malformed GraphDef. This can sometimes be caused by a bad network connection or difficulty reconciling multiple GraphDefs; for the latter case, please refer to https://github.com/tensorflow/tensorboard/issues/1929.")}).then(c=>Ri(this,null,function*(){Zle(c,n);let u=yield bH(c,i,s);return Po({timingId:jr.GRAPH_LOAD_SUCCEEDED,eventValue:Date.now()-l}),{graph:c,graphHierarchy:u}})).catch(c=>{let u=`Graph visualization failed.

${c}`;throw e.reportError(u,c),Po({timingId:jr.GRAPH_LOAD_FAILED,eventValue:Date.now()-l}),c})}var Hs=class extends Gt(mt){constructor(){super(...arguments),this.compatibilityProvider=new Ju,this.hierarchyParams=r3,this._template=null}_selectionChanged(){!this.selection||this.debounce("selectionchange",()=>{this._load(this.selection)})}_load(t){let{run:r,tag:n,type:i}=t;switch(i){case Fs.OP_GRAPH:case Fs.CONCEPTUAL_GRAPH:{(function(){this._setOutStats(null)}).bind(this)();let o=new URLSearchParams;o.set("run",r),o.set("conceptual",String(i===Fs.CONCEPTUAL_GRAPH)),n&&o.set("tag",n);let a=_e().pluginRouteForSrc("graphs","/graph",o);return this._fetchAndConstructHierarchicalGraph(a).then(()=>{this._graphRunTag={run:r,tag:n}})}case Fs.PROFILE:{let{tags:o}=this.datasets.find(({name:f})=>f===r),s=o.find(f=>f.tag===n).opGraph?n:null;console.assert(o.find(f=>f.tag===s),`Required tag (${s}) is missing.`);let c=!this._graphRunTag||this._graphRunTag.run!==r||this._graphRunTag.tag!==s?this._load({run:r,tag:s,type:Fs.OP_GRAPH}):Promise.resolve(),u=new URLSearchParams;u.set("tag",n),u.set("run",r);let h=_e().pluginRouteForSrc("graphs","/run_metadata",u);return c.then(()=>this._readAndParseMetadata(h))}default:return Promise.reject(new Error(`Unknown selection type: ${i}`))}}_readAndParseMetadata(t){this.set("progress",{value:0,msg:""});var r=nP(this);ece(t,r).then(function(n){this._setOutStats(n)}.bind(this))}_fetchAndConstructHierarchicalGraph(t,r){this.set("progress",{value:0,msg:""});let n=nP(this);return oce(n,t,r!==void 0?r:null,this.compatibilityProvider,this.hierarchyParams).then(function({graph:i,graphHierarchy:o}){this._setOutGraph(i),this._setOutGraphHierarchy(o)}.bind(this))}_selectedFileChanged(){var i;var t=this.selectedFile;if(!t)return;let r=t.target,n=(i=r.files)==null?void 0:i[0];!n||(r.value="",this._fetchAndConstructHierarchicalGraph(null,n))}};E([A({type:Array}),w("design:type",Array)],Hs.prototype,"datasets",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Hs.prototype,"progress",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"selection",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"selectedFile",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"compatibilityProvider",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"hierarchyParams",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",os)],Hs.prototype,"outGraphHierarchy",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Xu)],Hs.prototype,"outGraph",void 0);E([A({type:Object,readOnly:!0,notify:!0}),w("design:type",Object)],Hs.prototype,"outStats",void 0);E([A({type:Object}),w("design:type",Object)],Hs.prototype,"_graphRunTag",void 0);E([Bt("selection","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hs.prototype,"_selectionChanged",null);E([Bt("selectedFile","compatibilityProvider"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hs.prototype,"_selectedFileChanged",null);Hs=E([yt("tf-graph-dashboard-loader")],Hs);var ace="run";var Or=class extends Gt(mt){constructor(){super(...arguments),this._datasets=[],this._datasetsFetched=!1,this._selectedDataset=0,this._requestManager=new Ae,this._canceller=new an,this.specificHealthPillStep=0,this.healthPillsToggledOn=!1,this._debuggerNumericAlerts=[],this._nodeNamesToHealthPills={},this._healthPillRequestId=1,this._healthPillStepRequestTimerDelay=500,this.run=y_(ace,{defaultValue:"",useLocalStorage:!1}).call(this),this._runObserver=v_(ace,{defaultValue:"",polymerProperty:"run",useLocalStorage:!1})}attached(){this.set("_isAttached",!0)}detached(){this.set("_isAttached",!1)}ready(){super.ready(),this.addEventListener("node-toggle-expand",this._handleNodeToggleExpand.bind(this))}reload(){this._debuggerDataEnabled||this._requestManager.request(_e().pluginsListing()).then(this._canceller.cancellable(t=>{t.cancelled||t.value.debugger&&this.set("_debuggerDataEnabled",!0)})),this._maybeFetchHealthPills()}_fit(){this.$$("#graphboard").fit()}_onDownloadImageRequested(t){this.$$("#graphboard").downloadAsImage(t.detail)}_getGraphDisplayClassName(t,r){return t||r.length?"":"no-graph"}_fetchDataset(){return this._requestManager.request(_e().pluginRoute("graphs","/info"))}_fetchHealthPills(t,r){let n={node_names:JSON.stringify(t),run:"__debugger_data__"};r!==void 0&&(n.step=r);let i=_e().pluginRoute("debugger","/health_pills");return this._requestManager.request(i,n)}_fetchDebuggerNumericsAlerts(){return this._requestManager.request(_e().pluginRoute("debugger","/numerics_alert_report"))}_graphUrl(t,r,n){return _e().pluginRouteForSrc("graphs","/graph",new URLSearchParams({run:t,limit_attr_size:r,large_attrs_key:n}))}_shouldRequestHealthPills(){return this._debuggerDataEnabled&&this.healthPillsToggledOn&&this._renderHierarchy&&this._datasetsState(this._datasetsFetched,this._datasets,"PRESENT")}_maybeInitializeDashboard(){var t=this._isAttached;this._initialized||!t||(this.set("_compatibilityProvider",new Ju),this._initialized=!0,this._fetchDataset().then(r=>{let n=Object.keys(r);this._datasets=n.sort(xh).map(i=>{let o=r[i],s=Object.keys(o.tags).sort(xh).map(c=>o.tags[c]).map(({tag:c,conceptual_graph:u,op_graph:h,profile:f})=>({tag:c,displayName:c,conceptualGraph:u,opGraph:h,profile:f})),l=o.run_graph?[{tag:null,displayName:"Default",conceptualGraph:!1,opGraph:!0,profile:!1},...s]:s;return{name:i,tags:l}}),this._datasetsFetched=!0}))}_determineSelectedDataset(){var t=this._datasetsFetched,r=this._datasets,n=this.run;if(!n){this.set("_selectedDataset",0);return}let i=r.findIndex(o=>o.name===n);if(i===-1){if(t){let o=this.$$("#error-dialog");o.textContent=`No dataset named "${n}" could be found.`,o.open()}return}this.set("_selectedDataset",i)}_updateSelectedDatasetName(){var t=this._datasetsFetched,r=this._datasets,n=this._selectedDataset;!t||r.length<=n||this.set("run",r[n].name)}_requestHealthPills(){this.set("_areHealthPillsLoading",!0);var t=++this._healthPillRequestId;this._healthPillStepRequestTimerId!==null&&(window.clearTimeout(this._healthPillStepRequestTimerId),this._healthPillStepRequestTimerId=null),this.allStepsModeEnabled?this._healthPillStepRequestTimerId=setTimeout(function(){this._healthPillStepRequestTimerId=null,this._initiateNetworkRequestForHealthPills(t)}.bind(this),this._healthPillStepRequestTimerDelay):this._initiateNetworkRequestForHealthPills(t)}_initiateNetworkRequestForHealthPills(t){if(this._healthPillRequestId!==t)return;let r=this.allStepsModeEnabled?this.specificHealthPillStep:void 0,n=this._fetchHealthPills(this._renderHierarchy.getNamesOfRenderedOps(),r),i=this._fetchDebuggerNumericsAlerts();Promise.all([n,i]).then(function(o){var a=o[0],s=o[1];if(!!this.healthPillsToggledOn&&t===this._healthPillRequestId){for(var l in a){this.set("_healthPillStepIndex",a[l].length-1);break}this.set("_debuggerNumericAlerts",s),this.set("_nodeNamesToHealthPills",a),this.set("_areHealthPillsLoading",!1),this.set("_healthPillStepRequestTimerId",null)}}.bind(this))}_datasetsState(t,r,n){return t?!r||!r.length?n==="EMPTY":n==="PRESENT":n==="NOT_LOADED"}_renderHierarchyChanged(t){this.reload()}_handleNodeToggleExpand(){this._maybeFetchHealthPills()}_healthPillsToggledOnChanged(t){t?this.reload():this.set("_nodeNamesToHealthPills",{})}_maybeFetchHealthPills(){!this._shouldRequestHealthPills()||this._requestHealthPills()}};Or.template=Q`
    <paper-dialog id="error-dialog" with-backdrop></paper-dialog>
    <tf-dashboard-layout>
      <tf-graph-controls
        id="controls"
        class="sidebar"
        slot="sidebar"
        devices-for-stats="{{_devicesForStats}}"
        color-by-params="[[_colorByParams]]"
        stats="[[_stats]]"
        color-by="{{_colorBy}}"
        datasets="[[_datasets]]"
        render-hierarchy="[[_renderHierarchy]]"
        selection="{{_selection}}"
        selected-file="{{_selectedFile}}"
        selected-node="{{_selectedNode}}"
        health-pills-feature-enabled="[[_debuggerDataEnabled]]"
        health-pills-toggled-on="{{healthPillsToggledOn}}"
        on-fit-tap="_fit"
        trace-inputs="{{_traceInputs}}"
        auto-extract-nodes="{{_autoExtractNodes}}"
        on-download-image-requested="_onDownloadImageRequested"
      ></tf-graph-controls>
      <div
        class$="center [[_getGraphDisplayClassName(_selectedFile, _datasets)]]"
        slot="center"
      >
        <tf-graph-dashboard-loader
          id="loader"
          datasets="[[_datasets]]"
          selection="[[_selection]]"
          selected-file="[[_selectedFile]]"
          out-graph-hierarchy="{{_graphHierarchy}}"
          out-graph="{{_graph}}"
          out-stats="{{_stats}}"
          progress="{{_progress}}"
          hierarchy-params="[[_hierarchyParams]]"
          compatibility-provider="[[_compatibilityProvider]]"
        ></tf-graph-dashboard-loader>
        <div class="no-data-message">
          <h3>No graph definition files were found.</h3>
          <p>
            To store a graph, create a
            <code>tf.summary.FileWriter</code>
            and pass the graph either via the constructor, or by calling its
            <code>add_graph()</code> method. You may want to check out the
            <a href="https://www.tensorflow.org/tensorboard/graphs"
              >examining the TensorFlow graph tutorial</a
            >.
          </p>

          <p>
            If you’re new to using TensorBoard, and want to find out how to add
            data and set up your event files, check out the
            <a
              href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
              >README</a
            >
            and perhaps the
            <a
              href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
              >TensorBoard tutorial</a
            >.
          </p>

          <p>
            If you think TensorBoard is configured properly, please see
            <a
              href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
              >the section of the README devoted to missing data problems</a
            >
            and consider filing an issue on GitHub.
          </p>
        </div>
        <div class="graphboard">
          <tf-graph-board
            id="graphboard"
            devices-for-stats="[[_devicesForStats]]"
            color-by="{{_colorBy}}"
            color-by-params="{{_colorByParams}}"
            graph-hierarchy="[[_graphHierarchy]]"
            graph="[[_graph]]"
            hierarchy-params="[[_hierarchyParams]]"
            progress="[[_progress]]"
            debugger-data-enabled="[[_debuggerDataEnabled]]"
            are-health-pills-loading="[[_areHealthPillsLoading]]"
            debugger-numeric-alerts="[[_debuggerNumericAlerts]]"
            node-names-to-health-pills="[[_nodeNamesToHealthPills]]"
            all-steps-mode-enabled="{{allStepsModeEnabled}}"
            specific-health-pill-step="{{specificHealthPillStep}}"
            health-pill-step-index="[[_healthPillStepIndex]]"
            render-hierarchy="{{_renderHierarchy}}"
            selected-node="{{_selectedNode}}"
            stats="[[_stats]]"
            trace-inputs="[[_traceInputs]]"
            auto-extract-nodes="[[_autoExtractNodes]]"
          ></tf-graph-board>
        </div>
      </div>
    </tf-dashboard-layout>
    <style>
      :host /deep/ {
        font-family: 'Roboto', sans-serif;
      }

      .sidebar {
        display: flex;
        height: 100%;
      }

      .center {
        position: relative;
        height: 100%;
      }

      paper-dialog {
        padding: 20px;
      }

      .no-data-message {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      .graphboard {
        height: 100%;
      }

      .no-graph .graphboard {
        display: none;
      }

      .center:not(.no-graph) .no-data-message {
        display: none;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],Or.prototype,"_datasets",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_datasetsFetched",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_selectedDataset",void 0);E([A({type:Object,observer:"_renderHierarchyChanged"}),w("design:type",lo)],Or.prototype,"_renderHierarchy",void 0);E([A({type:Object}),w("design:type",Ae)],Or.prototype,"_requestManager",void 0);E([A({type:Object}),w("design:type",an)],Or.prototype,"_canceller",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_debuggerDataEnabled",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"allStepsModeEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"specificHealthPillStep",void 0);E([A({type:Boolean,observer:"_healthPillsToggledOnChanged"}),w("design:type",Boolean)],Or.prototype,"healthPillsToggledOn",void 0);E([A({type:String,notify:!0}),w("design:type",String)],Or.prototype,"selectedNode",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_isAttached",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_initialized",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_areHealthPillsLoading",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],Or.prototype,"_debuggerNumericAlerts",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_nodeNamesToHealthPills",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillStepIndex",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillRequestId",void 0);E([A({type:Number}),w("design:type",Object)],Or.prototype,"_healthPillStepRequestTimerId",void 0);E([A({type:Number}),w("design:type",Number)],Or.prototype,"_healthPillStepRequestTimerDelay",void 0);E([A({type:Array}),w("design:type",Array)],Or.prototype,"runs",void 0);E([A({type:String,notify:!0,observer:"_runObserver"}),w("design:type",String)],Or.prototype,"run",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_selection",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_compatibilityProvider",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_traceInputs",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Or.prototype,"_autoExtractNodes",void 0);E([A({type:Object}),w("design:type",Object)],Or.prototype,"_selectedFile",void 0);E([Bt("_isAttached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_maybeInitializeDashboard",null);E([Bt("_datasetsFetched","_datasets","run"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_determineSelectedDataset",null);E([Bt("_datasetsFetched","_datasets","_selectedDataset"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Or.prototype,"_updateSelectedDatasetName",null);Or=E([yt("tf-graph-dashboard")],Or);var NH=Ee(Oe(),1);var kr=Vr,Ma=class extends Gt(_o(mt)){constructor(){super(...arguments),this.mode="offset",this.timeProperty="step",this.bins="bins",this.x="x",this.dx="dx",this.y="y",this.colorScale=kr.scaleOrdinal(kr.schemeCategory10),this.modeTransitionDuration=500,this._name=null,this._data=null}ready(){super.ready(),this.scopeSubtree(this.$.svg,!0)}attached(){this._attached=!0}detached(){this._attached=!1}setSeriesData(t,r){this._name=t,this._data=r,this.redraw()}_redrawOnChange(){this.redraw()}redraw(){this._draw(0)}_modeRedraw(){this._draw(this.modeTransitionDuration)}_draw(t){if(!this._attached||!this._data)return;if(t===void 0)throw new Error("vz-histogram-timeseries _draw needs duration");if(this._data.length<=0)throw new Error("Not enough steps in the data");if(!this._data[0].hasOwnProperty(this.bins))throw new Error("No bins property of '"+this.bins+"' in data");if(this._data[0][this.bins].length<=0)throw new Error("Must have at least one bin in bins in data");if(!this._data[0][this.bins][0].hasOwnProperty(this.x))throw new Error("No x property '"+this.x+"' on bins data");if(!this._data[0][this.bins][0].hasOwnProperty(this.dx))throw new Error("No dx property '"+this.dx+"' on bins data");if(!this._data[0][this.bins][0].hasOwnProperty(this.y))throw new Error("No y property '"+this.y+"' on bins data");var r=this.timeProperty,n=this.x,i=this.bins,o=this.dx,a=this.y,s=this._data,l=this._name,c=this.mode,u=kr.hcl(this.colorScale(l)),h=kr.select(this.$.tooltip),f=function(Nt){return Nt[n]},p=function(Nt){return Nt[a]},d=function(Nt){return Nt[o]},g=function(Nt){return Nt[n]+Nt[o]},_=function(Nt){return Nt[r]};r==="relative"&&(_=function(Nt){return Nt.wall_time-s[0].wall_time});var y=this.$.svg.getBoundingClientRect(),x=y.width,b=y.height,S,C={top:5,right:60,bottom:20,left:24};c==="offset"?(S=b/2.5,C.top=S+5):S=b-C.top-C.bottom;var P=x-C.left-C.right,k=b-C.top-C.bottom,O=kr.min(s,f),D=kr.max(s,g),B=kr.format(".3n"),I=kr.format(".0f");r==="wall_time"?I=kr.timeFormat("%m/%d %X"):r==="relative"&&(I=function(Nt){return kr.format(".1r")(Nt/36e5)+"h"});var L=s.map(function(Nt,ze){return[kr.min(Nt[i],f),kr.max(Nt[i],g)]}),R=s.map(function(Nt){return kr.extent(Nt[i],p)}),F=500,z=kr.extent(s,_),U=(r==="wall_time"?kr.scaleTime():kr.scaleLinear()).domain(z).range([0,c==="offset"?k:0]),W=kr.scaleLinear().domain([0,kr.max(s,function(Nt,ze){return R[ze][1]})]).range([S,0]),Z=kr.scaleLinear().domain(W.domain()).range([F,0]),rt=kr.scaleLinear().domain([kr.min(s,function(Nt,ze){return L[ze][0]}),kr.max(s,function(Nt,ze){return L[ze][1]})]).nice().range([0,P]),ot=kr.scaleLinear().domain(rt.domain()).range([0,F]);let st=kr.scaleLinear().domain(kr.extent(s,_)).range([u.brighter(),u.darker()]).interpolate(kr.interpolateHcl);var St=kr.axisBottom(rt).ticks(Math.max(2,P/20)),bt=kr.axisRight(U).ticks(Math.max(2,k/15)).tickFormat(I),Mt=kr.axisRight(W).ticks(Math.max(2,k/15)).tickSize(P+5).tickFormat(B),lt=function(Nt){return Nt[n]+Nt[o]/2},Kt=kr.line().x(function(Nt){return ot(lt(Nt))}).y(function(Nt){return Z(Nt[a])}),_t=function(Nt){return"M"+ot(lt(Nt[0]))+","+Z(0)+"L"+Kt(Nt).slice(1)+"L"+ot(lt(Nt[Nt.length-1]))+","+Z(0)},ct=this.$.svg,X=kr.select(ct),et=X.transition().duration(t),dt=X.select("g").classed("small",function(){return P>0&&P<=150}).classed("medium",function(){return P>150&&P<=300}).classed("large",function(){return P>300}),q=et.select("g").attr("transform","translate("+C.left+","+C.top+")"),pt=kr.bisector(g).left,ht=dt.select(".stage").on("mouseover",function(){Tt.style("opacity",1),Ct.style("opacity",1),at.style("opacity",1),Ce.style("opacity",1),h.style("opacity",1)}).on("mouseout",function(){Tt.style("opacity",0),Ct.style("opacity",0),at.style("opacity",0),Ce.style("opacity",0),Tt.classed("hover-closest",!1),It.classed("outline-hover",!1),h.style("opacity",0)}).on("mousemove",Pt),wt=ht.select(".background").attr("transform","translate("+-C.left+","+-C.top+")").attr("width",x).attr("height",b),kt=ht.selectAll(".histogram").data(s),ie=kt.exit().remove(),ee=kt.enter().append("g").attr("class","histogram"),Le=ee.merge(kt).sort(function(Nt,ze){return _(Nt)-_(ze)}),ar=q.selectAll(".histogram").attr("transform",function(Nt){return"translate(0, "+(c==="offset"?U(_(Nt))-S:0)+")"}),fr=ee.append("line").attr("class","baseline"),tt=ar.select(".baseline").style("stroke-opacity",function(Nt){return c==="offset"?.1:0}).attr("y1",S).attr("y2",S).attr("x2",P),$=ee.append("path").attr("class","outline"),It=Le.select(".outline").attr("vector-effect","non-scaling-stroke").attr("d",function(Nt){return _t(Nt[i])}).style("stroke-width",1),$t=ar.select(".outline").attr("transform","scale("+P/F+", "+S/F+")").style("stroke",function(Nt){return c==="offset"?"":st(_(Nt))}).style("fill-opacity",function(Nt){return c==="offset"?1:0}).style("fill",function(Nt){return st(_(Nt))}),he=ee.append("g").attr("class","hover"),Tt=Le.select(".hover").style("fill",function(Nt){return st(_(Nt))});he.append("circle").attr("r",2),he.append("text").style("display","none").attr("dx",4);var be=dt.select(".x-axis-hover").selectAll(".label").data(["x"]),nt=be.enter().append("g").attr("class","label"),Ct=be.merge(nt);nt.append("rect").attr("x",-20).attr("y",6).attr("width",40).attr("height",14),nt.append("line").attr("x1",0).attr("x2",0).attr("y1",0).attr("y2",6),nt.append("text").attr("dy",18);var Wt=dt.select(".y-axis-hover").selectAll(".label").data(["y"]),fe=Wt.enter().append("g").attr("class","label"),at=Wt.merge(fe);fe.append("rect").attr("x",8).attr("y",-6).attr("width",40).attr("height",14),fe.append("line").attr("x1",0).attr("x2",6).attr("y1",0).attr("y2",0),fe.append("text").attr("dx",8).attr("dy",4);var se=dt.select(".y-slice-axis-hover").selectAll(".label").data(["y"]),Qt=se.enter().append("g").attr("class","label"),Ce=se.merge(Qt);Qt.append("rect").attr("x",8).attr("y",-6).attr("width",40).attr("height",14),Qt.append("line").attr("x1",0).attr("x2",6).attr("y1",0).attr("y2",0),Qt.append("text").attr("dx",8).attr("dy",4),q.select(".y.axis.slice").style("opacity",c==="offset"?0:1).attr("transform","translate(0, "+(c==="offset"?-S:0)+")").call(Mt),q.select(".x.axis").attr("transform","translate(0, "+k+")").call(St),q.select(".y.axis").style("opacity",c==="offset"?1:0).attr("transform","translate("+P+", "+(c==="offset"?0:k)+")").call(bt),q.selectAll(".tick text").attr("fill","#aaa"),q.selectAll(".axis path.domain").attr("stroke","none");function Pt(){var Nt=kr.mouse(this),ze=rt.invert(Nt[0]),yn=U.invert(Nt[1]);function Wi(cn){return Math.min(cn[i].length-1,pt(cn[i],ze))}var Ar,Pa=1/0,ho;Tt.attr("transform",function(cn,cx){var rp=Wi(cn);ho=cn;var K=rt(cn[i][rp][n]+cn[i][rp][o]/2),gt=W(cn[i][rp][a]),Et=c==="offset"?U(_(cn))-(S-gt):gt,xt=Math.abs(Nt[1]-Et);return xt<Pa&&(Pa=xt,Ar=cn),"translate("+K+","+gt+")"}),Tt.select("text").text(function(cn){var cx=Wi(cn);return cn[i][cx][a]}),Tt.classed("hover-closest",function(cn){return cn===Ar}),It.classed("outline-hover",function(cn){return cn===Ar});var Ia=Wi(ho);Ct.attr("transform",function(cn){return"translate("+rt(ho[i][Ia][n]+ho[i][Ia][o]/2)+", "+k+")"}).select("text").text(function(cn){return B(ho[i][Ia][n]+ho[i][Ia][o]/2)});var lx=bt.tickFormat();at.attr("transform",function(cn){return"translate("+P+", "+(c==="offset"?U(_(Ar)):0)+")"}).style("display",c==="offset"?"":"none").select("text").text(function(cn){return lx(_(Ar))});var cm=Mt.tickFormat();Ce.attr("transform",function(cn){return"translate("+P+", "+(c==="offset"?0:W(Ar[i][Ia][a]))+")"}).style("display",c==="offset"?"none":"").select("text").text(function(cn){return cm(Ar[i][Ia][a])});var J0=kr.mouse(ct);h.style("transform","translate("+(J0[0]+15)+"px,"+(J0[1]-15)+"px)").select("span").text(c==="offset"?cm(Ar[i][Ia][a]):(r==="step"?"step ":"")+lx(_(Ar)))}}};Ma.template=Q`
    <div id="tooltip"><span></span></div>
    <svg id="svg">
      <g>
        <g class="axis x"></g>
        <g class="axis y"></g>
        <g class="axis y slice"></g>
        <g class="stage">
          <rect class="background"></rect>
        </g>
        <g class="x-axis-hover"></g>
        <g class="y-axis-hover"></g>
        <g class="y-slice-axis-hover"></g>
      </g>
    </svg>

    <style>
      :host {
        color: #aaa;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        flex-shrink: 1;
        position: relative;
        --vz-histogram-timeseries-hover-bg-color: #fff;
        --vz-histogram-timeseries-outline-color: #fff;
        --vz-histogram-timeseries-hover-outline-color: #000;
      }

      :host(.dark-mode) {
        --vz-histogram-timeseries-hover-bg-color: var(
          --primary-background-color
        );
        --vz-histogram-timeseries-outline-color: var(--paper-grey-600);
        --vz-histogram-timeseries-hover-outline-color: #fff;
      }

      svg {
        font-family: roboto, sans-serif;
        overflow: visible;
        display: block;
        width: 100%;
        flex-grow: 1;
        flex-shrink: 1;
      }

      text {
        fill: currentColor;
      }

      #tooltip {
        position: absolute;
        display: block;
        opacity: 0;
        font-weight: bold;
        font-size: 11px;
      }

      .background {
        fill-opacity: 0;
        fill: red;
      }

      .histogram {
        pointer-events: none;
      }

      .hover {
        font-size: 9px;
        dominant-baseline: middle;
        opacity: 0;
      }

      .hover circle {
        stroke: white;
        stroke-opacity: 0.5;
        stroke-width: 1px;
      }

      .hover text {
        fill: black;
        opacity: 0;
      }

      .hover.hover-closest circle {
        fill: var(--vz-histogram-timeseries-hover-outline-color) !important;
      }

      .hover.hover-closest text {
        opacity: 1;
      }

      .baseline {
        stroke: black;
        stroke-opacity: 0.1;
      }

      .outline {
        fill: none;
        stroke: var(--vz-histogram-timeseries-outline-color);
        stroke-opacity: 0.5;
      }

      .outline.outline-hover {
        stroke: var(--vz-histogram-timeseries-hover-outline-color) !important;
        stroke-opacity: 1;
      }

      .x-axis-hover,
      .y-axis-hover,
      .y-slice-axis-hover {
        pointer-events: none;
      }

      .x-axis-hover .label,
      .y-axis-hover .label,
      .y-slice-axis-hover .label {
        opacity: 0;
        font-weight: bold;
        font-size: 11px;
        text-anchor: end;
      }

      .x-axis-hover text {
        text-anchor: middle;
      }

      .y-axis-hover text,
      .y-slice-axis-hover text {
        text-anchor: start;
      }

      .x-axis-hover line,
      .y-axis-hover line,
      .y-slice-axis-hover line {
        stroke: currentColor;
      }

      .x-axis-hover rect,
      .y-axis-hover rect,
      .y-slice-axis-hover rect {
        fill: var(--vz-histogram-timeseries-hover-bg-color);
      }

      #tooltip,
      .x-axis-hover text,
      .y-axis-hover text,
      .y-slice-axis-hover text {
        color: var(--vz-histogram-timeseries-hover-outline-color);
      }

      .axis {
        font-size: 11px;
      }

      .axis path.domain {
        fill: none;
      }

      .axis .tick line {
        stroke: #ddd;
      }

      .axis.slice {
        opacity: 0;
      }

      .axis.slice .tick line {
        stroke-dasharray: 2;
      }

      .small .axis text {
        display: none;
      }
      .small .axis .tick:first-of-type text {
        display: block;
      }
      .small .axis .tick:last-of-type text {
        display: block;
      }
      .medium .axis text {
        display: none;
      }
      .medium .axis .tick:nth-child(2n + 1) text {
        display: block;
      }
      .large .axis text {
        display: none;
      }
      .large .axis .tick:nth-child(2n + 1) text {
        display: block;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Ma.prototype,"mode",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"timeProperty",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"bins",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"x",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"dx",void 0);E([A({type:String}),w("design:type",String)],Ma.prototype,"y",void 0);E([A({type:Object}),w("design:type",Object)],Ma.prototype,"colorScale",void 0);E([A({type:Number}),w("design:type",Number)],Ma.prototype,"modeTransitionDuration",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ma.prototype,"_attached",void 0);E([A({type:String}),w("design:type",Object)],Ma.prototype,"_name",void 0);E([A({type:Array}),w("design:type",Object)],Ma.prototype,"_data",void 0);E([Bt("timeProperty","colorScale","_attached"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ma.prototype,"_redrawOnChange",null);E([Bt("mode"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ma.prototype,"_modeRedraw",null);Ma=E([yt("vz-histogram-timeseries")],Ma);function yur(e){let[t,r,n]=e;return{wall_time:t,step:r,min:Lm(n.map(([i,,])=>i)),max:lu(n.map(([,i])=>i)),buckets:n.map(([i,o,a])=>({left:i,right:o,count:a}))}}function vur(e,t,r,n=30){(t===void 0||r==null)&&(t=0,r=0),r===t&&(r=t*1.1+1,t=t/1.1-1);let i=(r-t)/n,o=0,a=[];for(let s=0;s<n;s++){let l=t+s*i,c=l+i,u=0;for(;o<e.buckets.length;){let h=Math.min(r,e.buckets[o].right),f=Math.max(t,e.buckets[o].left);if(h-f>0){let d=Math.min(h,c)-Math.max(f,l),g=d/(h-f)*e.buckets[o].count;u+=d>0?g:0}else{let d=c>=r;u+=l<=f&&(d?h<=c:h<c)?e.buckets[o].count:0}if(h>c)break;o++}a.push({x:l,dx:i,y:u})}return a}function sce(e){let t=e.map(yur),r=Lm(t,i=>i.min),n=lu(t,i=>i.max);return t.map(i=>({wall_time:i.wall_time,step:i.step,bins:vur(i,r,n)}))}var Ea=class extends kS(Gt(mt)){constructor(){super(...arguments),this.getDataLoadName=({run:t})=>t,this.requestData=(t,r,n)=>{let o=_e().pluginRoute("histograms","/histograms");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this.loadDataCallback=(t,r,n)=>{let i=sce(n),o=this.getDataLoadName(r);this.$.chart.setSeriesData(o,i)},this._colorScaleFunction=fn,this._expanded=!1}_reloadOnRunTagRequestManagerChange(){this.reload()}_updateDataToLoad(){var t=this.run,r=this.tag;this.dataToLoad=[{run:t,tag:r}]}get _runColor(){var t=this.run;return this._colorScaleFunction(t)}redraw(){this.$.chart.redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}};Ea.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    ></tf-card-heading>
    <!--
      The main histogram that we render. Data is set directly with
      \`setSeriesData\`, not with a bound property.
    -->
    <vz-histogram-timeseries
      id="chart"
      time-property="[[timeProperty]]"
      mode="[[histogramMode]]"
      color-scale="[[_colorScaleFunction]]"
    ></vz-histogram-timeseries>
    <div style="display: flex; flex-direction: row;">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
    </div>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 330px;
        height: 235px;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      :host([_expanded]) {
        width: 700px;
        height: 500px;
      }

      vz-histogram-timeseries {
        -moz-user-select: none;
        -webkit-user-select: none;
        will-change: transform;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }

      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      tf-card-heading {
        margin-bottom: 10px;
        width: 90%;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Ea.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"getDataLoadName",void 0);E([A({type:Object}),w("design:type",Ae)],Ea.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"loadDataCallback",void 0);E([A({type:Object}),w("design:type",Object)],Ea.prototype,"tagMetadata",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"timeProperty",void 0);E([A({type:String}),w("design:type",String)],Ea.prototype,"histogramMode",void 0);E([A({type:Object}),w("design:type",Function)],Ea.prototype,"_colorScaleFunction",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Ea.prototype,"_expanded",void 0);E([Bt("run","tag","requestManager"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_reloadOnRunTagRequestManagerChange",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ea.prototype,"_updateDataToLoad",null);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Ea.prototype,"_runColor",null);Ea=E([yt("tf-histogram-loader")],Ea);var ls=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._histogramMode="offset",this._timeProperty="step",this._restamp=!1,this._requestManager=new Ae}_redrawCategoryPane(t,r){!r||t.target.querySelectorAll("tf-histogram-loader").forEach(n=>n.redraw())}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadHistograms()})}_fetchTags(){let t=_e().pluginRoute("histograms","/tags");return this._requestManager.request(t).then(r=>{if(NH.isEqual(r,this._runToTagInfo))return;let n=NH.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTag",n),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadHistograms(){var t;(t=this.root)==null||t.querySelectorAll("tf-histogram-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;return Ql(t,r,n)}_tagMetadata(t,r,n){return t[r][n]}};ls.template=Q`
    <tf-dashboard-layout>
      <div slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="histogramModeSelector"
              name="Histogram mode"
              selected-id="{{_histogramMode}}"
            >
              <paper-button id="overlay">overlay</paper-button>
              <paper-button id="offset">offset</paper-button>
            </tf-option-selector>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="timePropertySelector"
              name="Offset time axis"
              selected-id="{{_timeProperty}}"
            >
              <paper-button id="step">step</paper-button>
              <paper-button id="relative">relative</paper-button>
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No histogram data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any histogram data to your event files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-histogram-loader
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  active="[[active]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  time-property="[[_timeProperty]]"
                  histogram-mode="[[_histogramMode]]"
                  request-manager="[[_requestManager]]"
                ></tf-histogram-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_histogramMode",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_timeProperty",void 0);E([A({type:Array}),w("design:type",Array)],ls.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ls.prototype,"_runToTag",void 0);E([A({type:Object}),w("design:type",Object)],ls.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ls.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_restamp",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ls.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Ae)],ls.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],ls.prototype,"_categories",null);ls=E([yt("tf-histogram-dashboard")],ls);var u3=class{constructor(t,r=!0){this._requestManager=t,this._useHttpGet=r}getExperiment(t){return this._sendRequest("/experiment",t)}getDownloadUrl(t,r,n){return _e().pluginRouteForSrc("hparams","/download_data",new URLSearchParams({format:t,columnsVisibility:JSON.stringify(n),request:JSON.stringify(r)}))}listSessionGroups(t){return this._sendRequest("/session_groups",t)}listMetricEvals(t){return this._sendRequest("/metric_evals",t)}_sendRequest(t,r){if(this._useHttpGet){let o=_e().pluginRoute("hparams",t,new URLSearchParams({request:JSON.stringify(r)}));return this._requestManager.request(o)}let n=new Ux;n.withCredentials=!0,n.methodType=Am.POST,n.contentType="text/plain",n.body=JSON.stringify(r);let i=_e().pluginRoute("hparams",t);return this._requestManager.requestWithOptions(i,n)}};var _ce=Ee(Oe(),1);var DH=class extends mt{constructor(){super(...arguments),this.orientation="horizontal"}};DH.template=Q`
    <slot name="content"></slot>

    <style>
      :host {
        display: block;
      }

      :host slot {
        display: flex;
        height: 100%;
        width: 100%;
      }

      :host ::slotted(*) {
        flex: 0 0 auto;
      }

      :host([orientation='horizontal']) slot {
        flex-direction: row;
        overflow-x: auto;
      }

      :host([orientation='vertical']) slot {
        flex-direction: column;
        overflow-y: auto;
      }

      :host ::slotted(*:not(:last-child)) {
        border: 0 solid var(--divider-color, #ccc);
      }

      :host([orientation='vertical']) ::slotted(*:not(:last-child)) {
        border-bottom-width: 5px;
      }

      :host([orientation='horizontal']) ::slotted(*:not(:last-child)) {
        border-right-width: 5px;
      }
    </style>
  `;E([A({type:String,reflectToAttribute:!0}),w("design:type",String)],DH.prototype,"orientation",void 0);DH=E([yt("hparams-split-layout")],DH);var cs={};Ks(cs,{columnValueByIndex:()=>x0,columnValueByVisibleIndex:()=>BH,euclideanDist:()=>h3,filterSet:()=>Pur,getAbsoluteColumnIndex:()=>zH,hashOfString:()=>dct,hparamName:()=>Fd,hparamValueByIndex:()=>hce,hparamValueByName:()=>uce,hparamValueByVisibleIndex:()=>mce,isNullOrUndefined:()=>Tur,l2NormSquared:()=>p3,metricName:()=>Qu,metricValueByIndex:()=>fce,metricValueByName:()=>f3,metricValueByVisibleIndex:()=>FH,numColumns:()=>uct,numHParams:()=>lce,numMetrics:()=>cce,numVisibleColumns:()=>wur,numVisibleHParams:()=>pce,numVisibleMetrics:()=>dce,numericColumnExtent:()=>hct,pointToRectangleDist:()=>gce,prettyPrint:()=>b0,prettyPrintHParamValueByName:()=>Sur,prettyPrintMetricValueByName:()=>Mur,quadTreeVisitPointsInDisk:()=>Aur,quadTreeVisitPointsInRect:()=>Cur,rotateStr:()=>Eur,schemaColumnName:()=>cct,schemaVisibleColumnName:()=>bur,sessionGroupWithName:()=>fct,setArrayObservably:()=>pct,translateStr:()=>yP,visibleNumericColumnExtent:()=>_P});var OH=Ee(Oe(),1);function Fd(e){return e.displayName!==""&&e.displayName!==void 0?e.displayName:e.name}function Qu(e){if(e.displayName!==""&&e.displayName!==void 0)return e.displayName;let t=e.name.group,r=e.name.tag;return t===void 0&&(t=""),r===void 0&&(r=""),t===""?r:t+"."+r}function cct(e,t){if(t<e.hparamColumns.length)return Fd(e.hparamColumns[t].hparamInfo);let r=t-e.hparamColumns.length;return Qu(e.metricColumns[r].metricInfo)}function lce(e){return e.hparamColumns.length}function cce(e){return e.metricColumns.length}function uct(e){return lce(e)+cce(e)}function uce(e,t){return e[t]}function f3(e,t){return e.find(r=>OH.isEqual(r.name,t))}function hce(e,t,r){return t.hparams[e.hparamColumns[r].hparamInfo.name]}function fce(e,t,r){let n=e.metricColumns[r].metricInfo.name,i=f3(t.metricValues,n);return i===void 0||i.value==="NaN"?void 0:i.value}function x0(e,t,r){return r<e.hparamColumns.length?hce(e,t,r):fce(e,t,r-e.hparamColumns.length)}function hct(e,t,r){return aa(t,n=>x0(e,n,r))}function zH(e,t,r){let n;if(r<t.hparamInfos.length)n=e.hparamColumns.findIndex(i=>i.hparamInfo.name===t.hparamInfos[r].name);else{let i=r-t.hparamInfos.length,o=t.metricInfos[i].name;n=e.hparamColumns.length+e.metricColumns.findIndex(a=>a.metricInfo.name===o)}return console.assert(n!==-1),n}function bur(e,t){if(t<e.hparamInfos.length)return Fd(e.hparamInfos[t]);let r=t-e.hparamInfos.length;return Qu(e.metricInfos[r])}function pce(e){return e.hparamInfos.length}function dce(e){return e.metricInfos.length}function wur(e){return pce(e)+dce(e)}function _P(e,t,r){return aa(t,n=>BH(e,n,r))}function Sur(e,t){return b0(uce(e,t))}function Mur(e,t){return b0(f3(e,t))}function fct(e,t){return e.find(r=>r.name===t)}function mce(e,t,r){return t.hparams[e.hparamInfos[r].name]}function FH(e,t,r){let n=e.metricInfos[r].name,i=f3(t.metricValues,n);return i===void 0||i.value==="NaN"?void 0:i.value}function BH(e,t,r){return r<e.hparamInfos.length?mce(e,t,r):FH(e,t,r-e.hparamInfos.length)}function b0(e){return OH.isNumber(e)?e.toPrecision(5):e==null?"":e.toString()}function p3(e,t){return e*e+t*t}function h3(e,t,r,n){return Math.sqrt(p3(e-r,t-n))}function gce(e,t,r,n,i,o){if(e<r&&t<n)return h3(e,t,r,n);if(r<=e&&e<i&&t<n)return n-t;if(i<=e&&t<n)return h3(e,t,i,n);if(e<r&&n<=t&&t<o)return r-e;if(r<=e&&e<i&&n<=t&&t<o)return 0;if(i<=e&&n<=t&&t<o)return e-i;if(e<r&&o<=t)return h3(e,t,r,o);if(r<=e&&e<i&&o<=t)return t-o;if(i<=e&&o<=t)return h3(e,t,i,o);throw"Point (x,y) must be in one of the regions defined above."}function yP(e,t){return t===void 0?"translate("+e+")":"translate("+e+","+t+")"}function Eur(e,t,r){let n="rotate("+e;return t!==void 0&&r!==void 0&&(n=n+","+t+","+r),n=n+")",n}function Tur(e){return e==null}function Cur(e,t,r,n,i,o){e.visit((a,s,l,c,u)=>{if(a.length===void 0){do{let h=e.x()(a.data),f=e.y()(a.data);t<=h&&h<n&&r<=f&&f<i&&o(a.data)}while(a=a.next);return!0}return s>=n||c<=t||l>=i||u<=r})}function Aur(e,t,r,n,i){e.visit((o,a,s,l,c)=>{if(o.length===void 0){do{let u=e.x()(o.data),h=e.y()(o.data),f=h3(t,r,u,h);f<=n&&i(o.data,f)}while(o=o.next);return!0}return gce(t,r,a,s,l,c)>n})}function Pur(e,t){let r=new Set;return e.forEach(n=>{t(n)&&r.add(n)}),r}function pct(e,t,r){let n=e.get(t,e);if(!Array.isArray(n)){e.set(t,r);return}e.splice.apply(e,[t,0,n.length].concat(r))}function dct(e){let t=0;for(let r=0;r<e.length;++r)t=t*31+e.charCodeAt(r)&4294967295;return t+TI(2,31)}var Iur=10,Qn=class extends Gt(mt){constructor(){super(...arguments),this.configuration={schema:{hparamColumns:Array(),metricColumns:Array()},columnsVisibility:Array(),visibleSchema:{hparamInfos:Array(),metricInfos:Array()}},this.sessionGroups=[],this.dataLoadedWithNonEmptyHparams=!1,this.dataLoadedWithEmptyHparams=!1,this._statuses=[{value:"STATUS_UNKNOWN",displayName:"Unknown",allowed:!0},{value:"STATUS_SUCCESS",displayName:"Success",allowed:!0},{value:"STATUS_FAILURE",displayName:"Failure",allowed:!0},{value:"STATUS_RUNNING",displayName:"Running",allowed:!0}],this._getExperimentResolved=new Promise(t=>{this._resolveGetExperiment=t}),this._listSessionGroupsCanceller=new an,this._pageSizeInput={value:"100",invalid:!1},this._pageNumberInput={value:"1",invalid:!1},this._pageCountStr="?",this._hparamName=Fd,this._metricName=Qu,this._prettyPrint=b0}reload(){this._queryServer()}_csvUrl(t,r){return this._downloadDataUrl(t,r,"csv")}_jsonUrl(t,r){return this._downloadDataUrl(t,r,"json")}_latexUrl(t,r){return this._downloadDataUrl(t,r,"latex")}_downloadDataUrl(t,r,n){let i=r.columnsVisibility;return this.backend.getDownloadUrl(n,t,i)}_computeExperimentAndRelatedProps(){let t=cs;if(t.isNullOrUndefined(this.backend)||t.isNullOrUndefined(this.experimentName))return;let r={experimentName:this.experimentName};this.backend.getExperiment(r).then(n=>{_ce.isEqual(n,this._experiment)||(this.set("_experiment",n),this._computeHParams(),this._computeMetrics(),this._queryServer(),this._resolveGetExperiment())}).finally(()=>{this._computeDataFound()})}_computeDataFound(){let t=Boolean(this._experiment&&this._experiment.hparamInfos&&this._experiment.hparamInfos.length>0);this.set("dataLoadedWithNonEmptyHparams",t),this.set("dataLoadedWithEmptyHparams",!t)}_computeHParams(){let t=[];this._experiment.hparamInfos.forEach(i=>{let o={info:i,displayed:!1,filter:{}};o.info.hasOwnProperty("domainDiscrete")?o.info.domainDiscrete.length<Iur?(o.filter.domainDiscrete=[],o.info.domainDiscrete.forEach(a=>{o.filter.domainDiscrete.push({value:a,checked:!0})})):o.filter.regexp="":o.info.type==="DATA_TYPE_FLOAT64"?o.filter.interval={min:{value:"",invalid:!1},max:{value:"",invalid:!1}}:console.warn("cannot process domain type %s without discrete domain values",o.info.type),t.push(o)}),t.sort((i,o)=>i.info.differs===o.info.differs?0:i.info.differs?-1:1);let n=Math.min(5,t.length);for(let i=0;i<n;i++)t[i].displayed=!0;this.set("_hparams",t)}_computeMetrics(){let t=[];this._experiment.metricInfos.forEach((n,i)=>{let o={info:n,filter:{interval:{min:{value:"",invalid:!1},max:{value:"",invalid:!1}}},displayed:i<5};t.push(o)}),this.set("_metrics",t)}_computeSchema(){return!this._hparams||!this._metrics?{hparamColumns:[],metricColumns:[]}:{hparamColumns:this._hparams.map(t=>({hparamInfo:t.info})),metricColumns:this._metrics.map(t=>({metricInfo:t.info}))}}_updateConfiguration(){this.debounce("_updateConfiguration",()=>{this.configuration={schema:this._computeSchema(),columnsVisibility:this._computeColumnsVisibility(),visibleSchema:this._computeVisibleSchema()}})}_computeColumnsVisibility(){return!this._hparams||!this._metrics?[]:this._hparams.map(t=>t.displayed).concat(this._metrics.map(t=>t.displayed))}_computeVisibleSchema(){if(!this._hparams||!this._metrics)return{hparamInfos:[],metricInfos:[]};let t=this._hparams.filter(n=>n.displayed).map(n=>n.info),r=this._metrics.filter(n=>n.displayed).map(n=>n.info);return{hparamInfos:t,metricInfos:r}}_hasRegexpFilter(t){return t.filter.regexp!==void 0}_queryServer(){this.debounce("queryServer",()=>this._queryServerNoDebounce(),100)}_queryServerNoDebounce(){if(!(!this._hparams||!this._metrics))return this._sendListSessionGroupsRequest().then(this._listSessionGroupsCanceller.cancellable(({value:t,cancelled:r})=>{if(!r){if(t.totalSize>=0){let n=+this._pageSizeInput.value;this.set("_pageCountStr",String(Math.ceil(t.totalSize/n))),this.set("_totalSessionGroupsCountStr",t.totalSize)}else this.set("_pageCountStr","?"),this.set("_totalSessionGroupsCountStr","Unknown");pct(this,"sessionGroups",t.sessionGroups)}}))}_sendListSessionGroupsRequest(){let t=this._buildListSessionGroupsRequest();if(t!==null)return this.set("_sessionGroupsRequest",t),this._listSessionGroupsCanceller.cancelAll(),this.backend.listSessionGroups(t)}_buildListSessionGroupsRequest(){let t=this,r=!0;function n(h){return h.min.value!==""||h.max.value!==""}function i(h){let f=t.get(h+".min.value");console.assert(f!==void 0);let p=f===""?"-Infinity":+f,d=isNaN(p);t.set(h+".min.invalid",d),r=r&&!d;let g=t.get(h+".max.value");console.assert(g!==void 0);let _=g===""?"Infinity":+g,y=isNaN(_);return t.set(h+".max.invalid",y),r=r&&!y,d||y?null:{minValue:p,maxValue:_}}function o(h){let f=t.get(h+".value");console.assert(f!==void 0);let p=+f,d=Number.isInteger(p)&&p>0;return t.set(h+".invalid",!d),r=r&&d,d?p:null}let a=this._statuses.filter(h=>h.allowed).map(h=>h.value),s=[];if(this._hparams.forEach((h,f)=>{let p={hparam:h.info.name};h.filter.domainDiscrete?h.filter.domainDiscrete.every(g=>g.checked)||(p.filterDiscrete=[],h.filter.domainDiscrete.forEach(g=>{g.checked&&p.filterDiscrete.push(g.value)})):h.filter.interval?n(h.filter.interval)&&(p.filterInterval=i("_hparams."+f+".filter.interval")):h.filter.regexp&&(p.filterRegexp=h.filter.regexp),s.push(p)}),this._metrics.forEach((h,f)=>{let p={metric:h.info.name};n(h.filter.interval)&&(p.filterInterval=i("_metrics."+f+".filter.interval")),s.push(p)}),this._sortByIndex!==void 0&&this._sortDirection!==void 0){if(!(this._sortByIndex in s))return console.error("No column in colParams with index sortByIndex: %s",this._sortByIndex),null;s[this._sortByIndex].order=this._sortDirection===0?"ORDER_ASC":"ORDER_DESC"}let l=o("_pageNumberInput")||0,c=o("_pageSizeInput")||0;if(!r)return null;let u=c*(l-1);return{experimentName:this.experimentName,allowedStatuses:a,colParams:s,startIndex:u,sliceSize:c}}_metricSortByIndex(t){return t+this._hparams.length}};Qn.template=Q`
    <hparams-split-layout orientation="vertical">
      <div slot="content" class="section hyperparameters">
        <div class="section-title">Hyperparameters</div>
        <template is="dom-repeat" items="{{_hparams}}" as="hparam">
          <div class="hparam">
            <paper-checkbox
              checked="{{hparam.displayed}}"
              class="hparam-checkbox"
            >
              [[_hparamName(hparam.info)]]
            </paper-checkbox>
            <!-- Precisely one of the templates below will be stamped.-->
            <!-- 1. A list of checkboxes -->
            <template is="dom-if" if="[[hparam.filter.domainDiscrete]]">
              <template
                is="dom-repeat"
                items="[[hparam.filter.domainDiscrete]]"
              >
                <paper-checkbox
                  checked="{{item.checked}}"
                  class="discrete-value-checkbox"
                  on-change="_queryServer"
                >
                  [[_prettyPrint(item.value)]]
                </paper-checkbox>
              </template>
            </template>
            <!-- 2. A numeric interval -->
            <template is="dom-if" if="[[hparam.filter.interval]]">
              <paper-input
                label="Min"
                value="{{hparam.filter.interval.min.value}}"
                allowed_pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="[[hparam.filter.interval.min.invalid]]"
                placeholder="-infinity"
              >
              </paper-input>
              <paper-input
                label="Max"
                value="{{hparam.filter.interval.max.value}}"
                allowed_pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="[[hparam.filter.interval.max.invalid]]"
                placeholder="+infinity"
              >
              </paper-input>
            </template>
            <!-- 3. A regexp -->
            <template is="dom-if" if="[[_hasRegexpFilter(hparam)]]">
              <paper-input
                label="Regular expression"
                value="{{hparam.filter.regexp}}"
                on-value-changed="_queryServer"
              >
              </paper-input>
            </template>
          </div>
        </template>
      </div>
      <div slot="content" class="section metrics">
        <div class="section-title">Metrics</div>
        <template is="dom-repeat" items="{{_metrics}}" as="metric">
          <div class="metric">
            <!-- TODO(erez): Make it easier to handle a large number of
                  metrics:
                  1. Add an 'isolator' radio-button to select just one
                  metric and
                  hide all the rest
                  2. Add a 'toggle-all' button that will hide/unhide
                    all the
                  metrics.
                  Use similar logic/appearance to the run-selector of
                  scalars.-->
            <paper-checkbox
              checked="{{metric.displayed}}"
              class="metric-checkbox"
            >
              [[_metricName(metric.info)]]
            </paper-checkbox>
            <div class="inline-element">
              <paper-input
                label="Min"
                value="{{metric.filter.interval.min.value}}"
                allowed-pattern="[0-9.e\\-]"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="{{metric.filter.interval.min.invalid}}"
                placeholder="-infinity"
              >
              </paper-input>
            </div>
            <div class="inline-element">
              <paper-input
                label="Max"
                allowed-pattern="[0-9.e\\-]"
                value="{{metric.filter.interval.max.value}}"
                on-value-changed="_queryServer"
                error-message="Invalid input"
                invalid="{{metric.filter.interval.max.invalid}}"
                placeholder="+infinity"
              >
              </paper-input>
            </div>
          </div>
        </template>
      </div>
      <div slot="content" class="section status">
        <div class="section-title">Status</div>
        <template is="dom-repeat" items="[[_statuses]]" as="status">
          <paper-checkbox checked="{{status.allowed}}" on-change="_queryServer">
            [[status.displayName]]
          </paper-checkbox>
        </template>
      </div>
      <div slot="content" class="section sorting">
        <div class="section-title">Sorting</div>
        <paper-dropdown-menu
          label="Sort by"
          on-selected-item-changed="_queryServer"
          horizontal-align="left"
        >
          <paper-listbox
            class="dropdown-content"
            slot="dropdown-content"
            selected="{{_sortByIndex}}"
            on-selected-item-changed="_queryServer"
          >
            <template is="dom-repeat" items="[[_hparams]]" as="hparam">
              <paper-item> [[_hparamName(hparam.info)]] </paper-item>
            </template>
            <template is="dom-repeat" items="[[_metrics]]" as="metric">
              <paper-item> [[_metricName(metric.info)]] </paper-item>
            </template>
          </paper-listbox>
        </paper-dropdown-menu>
        <paper-dropdown-menu
          label="Direction"
          on-selected-item-changed="_queryServer"
          horizontal-align="left"
        >
          <paper-listbox
            class="dropdown-content"
            slot="dropdown-content"
            selected="{{_sortDirection}}"
          >
            <paper-item>Ascending</paper-item>
            <paper-item>Descending</paper-item>
          </paper-listbox>
        </paper-dropdown-menu>
      </div>
      <div slot="content" class="section paging">
        <div class="section-title">Paging</div>
        <div>
          Number of matching session groups: [[_totalSessionGroupsCountStr]]
        </div>
        <div class="inline-element page-number-input">
          <paper-input
            label="Page #"
            value="{{_pageNumberInput.value}}"
            allowed-pattern="[0-9]"
            error-message="Invalid input"
            invalid="[[_pageNumberInput.invalid]]"
            on-value-changed="_queryServer"
          >
            <div slot="suffix" class="page-suffix">/ [[_pageCountStr]]</div>
          </paper-input>
        </div>
        <div class="inline-element page-size-input">
          <paper-input
            label="Max # of session groups per page:"
            value="{{_pageSizeInput.value}}"
            allowed-pattern="[0-9]"
            error-message="Invalid input"
            invalid="[[_pageSizeInput.invalid]]"
            on-value-changed="_queryServer"
          >
          </paper-input>
        </div>
      </div>
      <div slot="content" class="section download">
        <template is="dom-if" if="[[_sessionGroupsRequest]]">
          Download data as
          <span>
            <a
              id="csvLink"
              download="hparams_table.csv"
              href="[[_csvUrl(_sessionGroupsRequest, configuration)]]"
              >CSV</a
            >
            <a
              id="jsonLink"
              download="hparams_table.json"
              href="[[_jsonUrl(_sessionGroupsRequest, configuration)]]"
              >JSON</a
            >
            <a
              id="latexLink"
              download="hparams_table.tex"
              href="[[_latexUrl(_sessionGroupsRequest, configuration)]]"
              >LaTeX</a
            >
          </span>
        </template>
      </div>
    </hparams-split-layout>
    <style>
      .section {
        padding: 10px;
      }
      .section-title {
        display: block;
        font-weight: bold;
        text-decoration: underline;
        margin-bottom: 7px;
      }
      .discrete-value-checkbox,
      .metric-checkbox,
      .hparam-checkbox {
        display: block;
      }
      .discrete-value-checkbox {
        margin-left: 20px;
      }
      .hparam,
      .metric {
        display: block;
      }
      .inline-element {
        display: inline-block;
        width: 40%;
        margin-left: 10px;
      }
      .page-number-input {
        width: 20%;
      }
      .page-size-input {
        width: 60%;
      }
      vaadin-split-layout {
        height: 100%;
      }
      paper-listbox {
        max-height: 15em;
      }
      .page-suffix {
        white-space: nowrap;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Qn.prototype,"experimentName",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],Qn.prototype,"configuration",void 0);E([A({type:Array,notify:!0}),w("design:type",Object)],Qn.prototype,"sessionGroups",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Qn.prototype,"dataLoadedWithNonEmptyHparams",void 0);E([A({type:Boolean,notify:!0}),w("design:type",Boolean)],Qn.prototype,"dataLoadedWithEmptyHparams",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_experiment",void 0);E([A({type:Array}),w("design:type",Array)],Qn.prototype,"_hparams",void 0);E([A({type:Array}),w("design:type",Array)],Qn.prototype,"_metrics",void 0);E([A({type:Array}),w("design:type",Object)],Qn.prototype,"_statuses",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_getExperimentResolved",void 0);E([A({type:Object}),w("design:type",Function)],Qn.prototype,"_resolveGetExperiment",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_listSessionGroupsCanceller",void 0);E([A({type:Number}),w("design:type",Number)],Qn.prototype,"_sortByIndex",void 0);E([A({type:Number}),w("design:type",Number)],Qn.prototype,"_sortDirection",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_pageSizeInput",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_pageNumberInput",void 0);E([A({type:String}),w("design:type",String)],Qn.prototype,"_pageCountStr",void 0);E([A({type:String}),w("design:type",String)],Qn.prototype,"_totalSessionGroupsCountStr",void 0);E([A({type:Object}),w("design:type",Object)],Qn.prototype,"_sessionGroupsRequest",void 0);E([Bt("backend","experimentName"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Qn.prototype,"_computeExperimentAndRelatedProps",null);E([Bt("_hparams.*","_metrics.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Qn.prototype,"_updateConfiguration",null);Qn=E([yt("tf-hparams-query-pane")],Qn);var Uct=Ee(Oe(),1);var mct=typeof window!="undefined"&&window.customElements!=null&&window.customElements.polyfillWrapFlushCallback!==void 0;var i1=(e,t,r=null)=>{for(;t!==r;){let n=t.nextSibling;e.removeChild(t),t=n}};var Yc=`{{lit-${String(Math.random()).slice(2)}}}`,gct=`<!--${Yc}-->`,yce=new RegExp(`${Yc}|${gct}`),d3="$lit$",o1=class{constructor(t,r){this.parts=[],this.element=r;let n=[],i=[],o=document.createTreeWalker(r.content,133,null,!1),a=0,s=-1,l=0,{strings:c,values:{length:u}}=t;for(;l<u;){let h=o.nextNode();if(h===null){o.currentNode=i.pop();continue}if(s++,h.nodeType===1){if(h.hasAttributes()){let f=h.attributes,{length:p}=f,d=0;for(let g=0;g<p;g++)vce(f[g].name,d3)&&d++;for(;d-- >0;){let g=c[l],_=HH.exec(g)[2],y=_.toLowerCase()+d3,x=h.getAttribute(y);h.removeAttribute(y);let b=x.split(yce);this.parts.push({type:"attribute",index:s,name:_,strings:b}),l+=b.length-1}}h.tagName==="TEMPLATE"&&(i.push(h),o.currentNode=h.content)}else if(h.nodeType===3){let f=h.data;if(f.indexOf(Yc)>=0){let p=h.parentNode,d=f.split(yce),g=d.length-1;for(let _=0;_<g;_++){let y,x=d[_];if(x==="")y=Yf();else{let b=HH.exec(x);b!==null&&vce(b[2],d3)&&(x=x.slice(0,b.index)+b[1]+b[2].slice(0,-d3.length)+b[3]),y=document.createTextNode(x)}p.insertBefore(y,h),this.parts.push({type:"node",index:++s})}d[g]===""?(p.insertBefore(Yf(),h),n.push(h)):h.data=d[g],l+=g}}else if(h.nodeType===8)if(h.data===Yc){let f=h.parentNode;(h.previousSibling===null||s===a)&&(s++,f.insertBefore(Yf(),h)),a=s,this.parts.push({type:"node",index:s}),h.nextSibling===null?h.data="":(n.push(h),s--),l++}else{let f=-1;for(;(f=h.data.indexOf(Yc,f+1))!==-1;)this.parts.push({type:"node",index:-1}),l++}}for(let h of n)h.parentNode.removeChild(h)}},vce=(e,t)=>{let r=e.length-t.length;return r>=0&&e.slice(r)===t},vP=e=>e.index!==-1,Yf=()=>document.createComment(""),HH=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;var _ct=133;function yct(e,t){let{element:{content:r},parts:n}=e,i=document.createTreeWalker(r,_ct,null,!1),o=xP(n),a=n[o],s=-1,l=0,c=[],u=null;for(;i.nextNode();){s++;let h=i.currentNode;for(h.previousSibling===u&&(u=null),t.has(h)&&(c.push(h),u===null&&(u=h)),u!==null&&l++;a!==void 0&&a.index===s;)a.index=u!==null?-1:a.index-l,o=xP(n,o),a=n[o]}c.forEach(h=>h.parentNode.removeChild(h))}var Lur=e=>{let t=e.nodeType===11?0:1,r=document.createTreeWalker(e,_ct,null,!1);for(;r.nextNode();)t++;return t},xP=(e,t=-1)=>{for(let r=t+1;r<e.length;r++){let n=e[r];if(vP(n))return r}return-1};function xce(e,t,r=null){let{element:{content:n},parts:i}=e;if(r==null){n.appendChild(t);return}let o=document.createTreeWalker(n,_ct,null,!1),a=xP(i),s=0,l=-1;for(;o.nextNode();)for(l++,o.currentNode===r&&(s=Lur(t),r.parentNode.insertBefore(t,r));a!==-1&&i[a].index===l;){if(s>0){for(;a!==-1;)i[a].index+=s,a=xP(i,a);return}a=xP(i,a)}}var kur=new WeakMap;var a1=e=>typeof e=="function"&&kur.has(e);var Ll={},VH={};var w0=class{constructor(t,r,n){this.__parts=[],this.template=t,this.processor=r,this.options=n}update(t){let r=0;for(let n of this.__parts)n!==void 0&&n.setValue(t[r]),r++;for(let n of this.__parts)n!==void 0&&n.commit()}_clone(){let t=mct?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),r=[],n=this.template.parts,i=document.createTreeWalker(t,133,null,!1),o=0,a=0,s,l=i.nextNode();for(;o<n.length;){if(s=n[o],!vP(s)){this.__parts.push(void 0),o++;continue}for(;a<s.index;)a++,l.nodeName==="TEMPLATE"&&(r.push(l),i.currentNode=l.content),(l=i.nextNode())===null&&(i.currentNode=r.pop(),l=i.nextNode());if(s.type==="node"){let c=this.processor.handleTextExpression(this.options);c.insertAfterNode(l.previousSibling),this.__parts.push(c)}else this.__parts.push(...this.processor.handleAttributeExpressions(l,s.name,s.strings,this.options));o++}return mct&&(document.adoptNode(t),customElements.upgrade(t)),t}};var bce=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:e=>e}),Nur=` ${Yc} `,S0=class{constructor(t,r,n,i){this.strings=t,this.values=r,this.type=n,this.processor=i}getHTML(){let t=this.strings.length-1,r="",n=!1;for(let i=0;i<t;i++){let o=this.strings[i],a=o.lastIndexOf("<!--");n=(a>-1||n)&&o.indexOf("-->",a+1)===-1;let s=HH.exec(o);s===null?r+=o+(n?Nur:gct):r+=o.substr(0,s.index)+s[1]+s[2]+d3+s[3]+Yc}return r+=this.strings[t],r}getTemplateElement(){let t=document.createElement("template"),r=this.getHTML();return bce!==void 0&&(r=bce.createHTML(r)),t.innerHTML=r,t}};var GH=e=>e===null||!(typeof e=="object"||typeof e=="function"),UH=e=>Array.isArray(e)||!!(e&&e[Symbol.iterator]),m3=class{constructor(t,r,n){this.dirty=!0,this.element=t,this.name=r,this.strings=n,this.parts=[];for(let i=0;i<n.length-1;i++)this.parts[i]=this._createPart()}_createPart(){return new bP(this)}_getValue(){let t=this.strings,r=t.length-1,n=this.parts;if(r===1&&t[0]===""&&t[1]===""){let o=n[0].value;if(typeof o=="symbol")return String(o);if(typeof o=="string"||!UH(o))return o}let i="";for(let o=0;o<r;o++){i+=t[o];let a=n[o];if(a!==void 0){let s=a.value;if(GH(s)||!UH(s))i+=typeof s=="string"?s:String(s);else for(let l of s)i+=typeof l=="string"?l:String(l)}}return i+=t[r],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}},bP=class{constructor(t){this.value=void 0,this.committer=t}setValue(t){t!==Ll&&(!GH(t)||t!==this.value)&&(this.value=t,a1(t)||(this.committer.dirty=!0))}commit(){for(;a1(this.value);){let t=this.value;this.value=Ll,t(this)}this.value!==Ll&&this.committer.commit()}},Bd=class{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(Yf()),this.endNode=t.appendChild(Yf())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=Yf()),t.__insert(this.endNode=Yf())}insertAfterPart(t){t.__insert(this.startNode=Yf()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(this.startNode.parentNode===null)return;for(;a1(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=Ll,r(this)}let t=this.__pendingValue;t!==Ll&&(GH(t)?t!==this.value&&this.__commitText(t):t instanceof S0?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):UH(t)?this.__commitIterable(t):t===VH?(this.value=VH,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){let r=this.startNode.nextSibling;t=t==null?"":t;let n=typeof t=="string"?t:String(t);r===this.endNode.previousSibling&&r.nodeType===3?r.data=n:this.__commitNode(document.createTextNode(n)),this.value=t}__commitTemplateResult(t){let r=this.options.templateFactory(t);if(this.value instanceof w0&&this.value.template===r)this.value.update(t.values);else{let n=new w0(r,t.processor,this.options),i=n._clone();n.update(t.values),this.__commitNode(i),this.value=n}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());let r=this.value,n=0,i;for(let o of t)i=r[n],i===void 0&&(i=new Bd(this.options),r.push(i),n===0?i.appendIntoPart(this):i.insertAfterPart(r[n-1])),i.setValue(o),i.commit(),n++;n<r.length&&(r.length=n,this.clear(i&&i.endNode))}clear(t=this.startNode){i1(this.startNode.parentNode,t.nextSibling,this.endNode)}},wP=class{constructor(t,r,n){if(this.value=void 0,this.__pendingValue=void 0,n.length!==2||n[0]!==""||n[1]!=="")throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=r,this.strings=n}setValue(t){this.__pendingValue=t}commit(){for(;a1(this.__pendingValue);){let r=this.__pendingValue;this.__pendingValue=Ll,r(this)}if(this.__pendingValue===Ll)return;let t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=Ll}},SP=class extends m3{constructor(t,r,n){super(t,r,n),this.single=n.length===2&&n[0]===""&&n[1]===""}_createPart(){return new qH(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}},qH=class extends bP{},wce=!1;(()=>{try{let e={get capture(){return wce=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();var MP=class{constructor(t,r,n){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=r,this.eventContext=n,this.__boundHandleEvent=i=>this.handleEvent(i)}setValue(t){this.__pendingValue=t}commit(){for(;a1(this.__pendingValue);){let o=this.__pendingValue;this.__pendingValue=Ll,o(this)}if(this.__pendingValue===Ll)return;let t=this.__pendingValue,r=this.value,n=t==null||r!=null&&(t.capture!==r.capture||t.once!==r.once||t.passive!==r.passive),i=t!=null&&(r==null||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=Dur(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=Ll}handleEvent(t){typeof this.value=="function"?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}},Dur=e=>e&&(wce?{capture:e.capture,passive:e.passive,once:e.once}:e.capture);function vct(e){let t=s1.get(e.type);t===void 0&&(t={stringsArray:new WeakMap,keyString:new Map},s1.set(e.type,t));let r=t.stringsArray.get(e.strings);if(r!==void 0)return r;let n=e.strings.join(Yc);return r=t.keyString.get(n),r===void 0&&(r=new o1(e,e.getTemplateElement()),t.keyString.set(n,r)),t.stringsArray.set(e.strings,r),r}var s1=new Map;var M0=new WeakMap,xct=(e,t,r)=>{let n=M0.get(t);n===void 0&&(i1(t,t.firstChild),M0.set(t,n=new Bd(Object.assign({templateFactory:vct},r))),n.appendInto(t)),n.setValue(e),n.commit()};var WH=class{handleAttributeExpressions(t,r,n,i){let o=r[0];return o==="."?new SP(t,r.slice(1),n).parts:o==="@"?[new MP(t,r.slice(1),i.eventContext)]:o==="?"?[new wP(t,r.slice(1),n)]:new m3(t,r,n).parts}handleTextExpression(t){return new Bd(t)}},Sce=new WH;typeof window!="undefined"&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");var Ece=(e,t)=>`${e}--${t}`,YH=!0;typeof window.ShadyCSS=="undefined"?YH=!1:typeof window.ShadyCSS.prepareTemplateDom=="undefined"&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),YH=!1);var Fur=e=>t=>{let r=Ece(t.type,e),n=s1.get(r);n===void 0&&(n={stringsArray:new WeakMap,keyString:new Map},s1.set(r,n));let i=n.stringsArray.get(t.strings);if(i!==void 0)return i;let o=t.strings.join(Yc);if(i=n.keyString.get(o),i===void 0){let a=t.getTemplateElement();YH&&window.ShadyCSS.prepareTemplateDom(a,e),i=new o1(t,a),n.keyString.set(o,i)}return n.stringsArray.set(t.strings,i),i},Bur=["html","svg"],Hur=e=>{Bur.forEach(t=>{let r=s1.get(Ece(t,e));r!==void 0&&r.keyString.forEach(n=>{let{element:{content:i}}=n,o=new Set;Array.from(i.querySelectorAll("style")).forEach(a=>{o.add(a)}),yct(n,o)})})},Tce=new Set,Vur=(e,t,r)=>{Tce.add(e);let n=r?r.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:o}=i;if(o===0){window.ShadyCSS.prepareTemplateStyles(n,e);return}let a=document.createElement("style");for(let c=0;c<o;c++){let u=i[c];u.parentNode.removeChild(u),a.textContent+=u.textContent}Hur(e);let s=n.content;r?xce(r,a,s.firstChild):s.insertBefore(a,s.firstChild),window.ShadyCSS.prepareTemplateStyles(n,e);let l=s.querySelector("style");if(window.ShadyCSS.nativeShadow&&l!==null)t.insertBefore(l.cloneNode(!0),t.firstChild);else if(r){s.insertBefore(a,s.firstChild);let c=new Set;c.add(a),yct(r,c)}},Cce=(e,t,r)=>{if(!r||typeof r!="object"||!r.scopeName)throw new Error("The `scopeName` option is required.");let n=r.scopeName,i=M0.has(t),o=YH&&t.nodeType===11&&!!t.host,a=o&&!Tce.has(n),s=a?document.createDocumentFragment():t;if(xct(e,s,Object.assign({templateFactory:Fur(n)},r)),a){let l=M0.get(s);M0.delete(s);let c=l.value instanceof w0?l.value.template:void 0;Vur(n,s,c),i1(t,t.firstChild),t.appendChild(s),M0.set(t,l)}!i&&o&&window.ShadyCSS.styleElement(t.host)};var Ace;window.JSCompiler_renameProperty=(e,t)=>e;var Tct={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return e!==null;case Number:return e===null?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},Pce=(e,t)=>t!==e&&(t===t||e===e),bct={attribute:!0,type:String,converter:Tct,reflect:!1,hasChanged:Pce},wct=1,Sct=1<<2,Mct=1<<3,Ect=1<<4,Cct="finalized",g3=class extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();let t=[];return this._classProperties.forEach((r,n)=>{let i=this._attributeNameForProperty(n,r);i!==void 0&&(this._attributeToPropertyMap.set(i,n),t.push(i))}),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;let t=Object.getPrototypeOf(this)._classProperties;t!==void 0&&t.forEach((r,n)=>this._classProperties.set(n,r))}}static createProperty(t,r=bct){if(this._ensureClassProperties(),this._classProperties.set(t,r),r.noAccessor||this.prototype.hasOwnProperty(t))return;let n=typeof t=="symbol"?Symbol():`__${t}`,i=this.getPropertyDescriptor(t,n,r);i!==void 0&&Object.defineProperty(this.prototype,t,i)}static getPropertyDescriptor(t,r,n){return{get(){return this[r]},set(i){let o=this[t];this[r]=i,this.requestUpdateInternal(t,o,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||bct}static finalize(){let t=Object.getPrototypeOf(this);if(t.hasOwnProperty(Cct)||t.finalize(),this[Cct]=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){let r=this.properties,n=[...Object.getOwnPropertyNames(r),...typeof Object.getOwnPropertySymbols=="function"?Object.getOwnPropertySymbols(r):[]];for(let i of n)this.createProperty(i,r[i])}}static _attributeNameForProperty(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}static _valueHasChanged(t,r,n=Pce){return n(t,r)}static _propertyValueFromAttribute(t,r){let n=r.type,i=r.converter||Tct,o=typeof i=="function"?i:i.fromAttribute;return o?o(t,n):t}static _propertyValueToAttribute(t,r){if(r.reflect===void 0)return;let n=r.type,i=r.converter;return(i&&i.toAttribute||Tct.toAttribute)(t,n)}initialize(){this._updateState=0,this._updatePromise=new Promise(t=>this._enableUpdatingResolver=t),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach((t,r)=>{if(this.hasOwnProperty(r)){let n=this[r];delete this[r],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(r,n)}})}_applyInstanceProperties(){this._instanceProperties.forEach((t,r)=>this[r]=t),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){this._enableUpdatingResolver!==void 0&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,r,n){r!==n&&this._attributeToProperty(t,n)}_propertyToAttribute(t,r,n=bct){let i=this.constructor,o=i._attributeNameForProperty(t,n);if(o!==void 0){let a=i._propertyValueToAttribute(r,n);if(a===void 0)return;this._updateState=this._updateState|Mct,a==null?this.removeAttribute(o):this.setAttribute(o,a),this._updateState=this._updateState&~Mct}}_attributeToProperty(t,r){if(this._updateState&Mct)return;let n=this.constructor,i=n._attributeToPropertyMap.get(t);if(i!==void 0){let o=n.getPropertyOptions(i);this._updateState=this._updateState|Ect,this[i]=n._propertyValueFromAttribute(r,o),this._updateState=this._updateState&~Ect}}requestUpdateInternal(t,r,n){let i=!0;if(t!==void 0){let o=this.constructor;n=n||o.getPropertyOptions(t),o._valueHasChanged(this[t],r,n.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,r),n.reflect===!0&&!(this._updateState&Ect)&&(this._reflectingProperties===void 0&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,n))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,r){return this.requestUpdateInternal(t,r),this.updateComplete}_enqueueUpdate(){return Ri(this,null,function*(){this._updateState=this._updateState|Sct;try{yield this._updatePromise}catch(r){}let t=this.performUpdate();return t!=null&&(yield t),!this._hasRequestedUpdate})}get _hasRequestedUpdate(){return this._updateState&Sct}get hasUpdated(){return this._updateState&wct}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1,r=this._changedProperties;try{t=this.shouldUpdate(r),t?this.update(r):this._markUpdated()}catch(n){throw t=!1,this._markUpdated(),n}t&&(this._updateState&wct||(this._updateState=this._updateState|wct,this.firstUpdated(r)),this.updated(r))}_markUpdated(){this._changedProperties=new Map,this._updateState=this._updateState&~Sct}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){this._reflectingProperties!==void 0&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((r,n)=>this._propertyToAttribute(n,this[n],r)),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}};Ace=Cct;g3[Ace]=!0;var Ice=Element.prototype,Iii=Ice.msMatchesSelector||Ice.webkitMatchesSelector;var jH=window.ShadowRoot&&(window.ShadyCSS===void 0||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Act=Symbol(),l1=class{constructor(t,r){if(r!==Act)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return this._styleSheet===void 0&&(jH?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}},Pct=e=>new l1(String(e),Act),Uur=e=>{if(e instanceof l1)return e.cssText;if(typeof e=="number")return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but
            take care to ensure page security.`)},Ci=(e,...t)=>{let r=t.reduce((n,i,o)=>n+Uur(i)+e[o+1],e[0]);return new l1(r,Act)};(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");var Lce={},EP=class extends g3{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;let t=this.getStyles();if(Array.isArray(t)){let r=(o,a)=>o.reduceRight((s,l)=>Array.isArray(l)?r(l,s):(s.add(l),s),a),n=r(t,new Set),i=[];n.forEach(o=>i.unshift(o)),this._styles=i}else this._styles=t===void 0?[]:[t];this._styles=this._styles.map(r=>{if(r instanceof CSSStyleSheet&&!jH){let n=Array.prototype.slice.call(r.cssRules).reduce((i,o)=>i+o.cssText,"");return Pct(n)}return r})}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){let t=this.constructor._styles;t.length!==0&&(window.ShadyCSS!==void 0&&!window.ShadyCSS.nativeShadow?window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map(r=>r.cssText),this.localName):jH?this.renderRoot.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet):this._needsShimAdoptedStyleSheets=!0)}connectedCallback(){super.connectedCallback(),this.hasUpdated&&window.ShadyCSS!==void 0&&window.ShadyCSS.styleElement(this)}update(t){let r=this.render();super.update(t),r!==Lce&&this.constructor.render(r,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(n=>{let i=document.createElement("style");i.textContent=n.cssText,this.renderRoot.appendChild(i)}))}render(){return Lce}};EP.finalized=!0;EP.render=Cce;EP.shadowRootOptions={mode:"open"};var kce=0,Ict={},jc=(e,t,r)=>{let n=r&&r.moduleId||`custom-style-module-${kce++}`;Array.isArray(t)||(t=t?[t]:[]),t.forEach(a=>{if(!(a instanceof l1))throw new Error("An item in styles is not of type CSSResult. Use `unsafeCSS` or `css`.");if(!Ict[a]){let s=document.createElement("dom-module");s.innerHTML=`
        <template>
          <style>${a.toString()}</style>
        </template>
      `;let l=`custom-style-module-${kce++}`;s.register(l),Ict[a]=l}});let i=document.createElement("dom-module");if(e){let a=customElements.get(e);a&&Object.prototype.hasOwnProperty.call(a,"__finalized")&&console.warn(`The custom element definition for "${e}"
      was finalized before a style module was registered.
      Make sure to add component specific style modules before
      importing the corresponding custom element.`),i.setAttribute("theme-for",e)}let o=r&&r.include||[];i.innerHTML=`
    <template>
      ${o.map(a=>`<style include=${a}></style>`)}
      ${t.map(a=>`<style include=${Ict[a]}></style>`)}
    </template>
  `,i.register(n)};var Lct=class extends HTMLElement{static get version(){return"20.0.2"}};customElements.define("vaadin-lumo-styles",Lct);var qur=Ci`
  :host {
    /* Base (background) */
    --lumo-base-color: #fff;

    /* Tint */
    --lumo-tint-5pct: hsla(0, 0%, 100%, 0.3);
    --lumo-tint-10pct: hsla(0, 0%, 100%, 0.37);
    --lumo-tint-20pct: hsla(0, 0%, 100%, 0.44);
    --lumo-tint-30pct: hsla(0, 0%, 100%, 0.5);
    --lumo-tint-40pct: hsla(0, 0%, 100%, 0.57);
    --lumo-tint-50pct: hsla(0, 0%, 100%, 0.64);
    --lumo-tint-60pct: hsla(0, 0%, 100%, 0.7);
    --lumo-tint-70pct: hsla(0, 0%, 100%, 0.77);
    --lumo-tint-80pct: hsla(0, 0%, 100%, 0.84);
    --lumo-tint-90pct: hsla(0, 0%, 100%, 0.9);
    --lumo-tint: #fff;

    /* Shade */
    --lumo-shade-5pct: hsla(214, 61%, 25%, 0.05);
    --lumo-shade-10pct: hsla(214, 57%, 24%, 0.1);
    --lumo-shade-20pct: hsla(214, 53%, 23%, 0.16);
    --lumo-shade-30pct: hsla(214, 50%, 22%, 0.26);
    --lumo-shade-40pct: hsla(214, 47%, 21%, 0.38);
    --lumo-shade-50pct: hsla(214, 45%, 20%, 0.5);
    --lumo-shade-60pct: hsla(214, 43%, 19%, 0.61);
    --lumo-shade-70pct: hsla(214, 42%, 18%, 0.72);
    --lumo-shade-80pct: hsla(214, 41%, 17%, 0.83);
    --lumo-shade-90pct: hsla(214, 40%, 16%, 0.94);
    --lumo-shade: hsl(214, 35%, 15%);

    /* Contrast */
    --lumo-contrast-5pct: var(--lumo-shade-5pct);
    --lumo-contrast-10pct: var(--lumo-shade-10pct);
    --lumo-contrast-20pct: var(--lumo-shade-20pct);
    --lumo-contrast-30pct: var(--lumo-shade-30pct);
    --lumo-contrast-40pct: var(--lumo-shade-40pct);
    --lumo-contrast-50pct: var(--lumo-shade-50pct);
    --lumo-contrast-60pct: var(--lumo-shade-60pct);
    --lumo-contrast-70pct: var(--lumo-shade-70pct);
    --lumo-contrast-80pct: var(--lumo-shade-80pct);
    --lumo-contrast-90pct: var(--lumo-shade-90pct);
    --lumo-contrast: var(--lumo-shade);

    /* Text */
    --lumo-header-text-color: var(--lumo-contrast);
    --lumo-body-text-color: var(--lumo-contrast-90pct);
    --lumo-secondary-text-color: var(--lumo-contrast-70pct);
    --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
    --lumo-disabled-text-color: var(--lumo-contrast-30pct);

    /* Primary */
    --lumo-primary-color: hsl(214, 90%, 52%);
    --lumo-primary-color-50pct: hsla(214, 90%, 52%, 0.5);
    --lumo-primary-color-10pct: hsla(214, 90%, 52%, 0.1);
    --lumo-primary-text-color: var(--lumo-primary-color);
    --lumo-primary-contrast-color: #fff;

    /* Error */
    --lumo-error-color: hsl(3, 100%, 61%);
    --lumo-error-color-50pct: hsla(3, 100%, 60%, 0.5);
    --lumo-error-color-10pct: hsla(3, 100%, 60%, 0.1);
    --lumo-error-text-color: hsl(3, 92%, 53%);
    --lumo-error-contrast-color: #fff;

    /* Success */
    --lumo-success-color: hsl(145, 80%, 42%); /* hsl(144,82%,37%); */
    --lumo-success-color-50pct: hsla(145, 76%, 44%, 0.55);
    --lumo-success-color-10pct: hsla(145, 76%, 44%, 0.12);
    --lumo-success-text-color: hsl(145, 100%, 32%);
    --lumo-success-contrast-color: #fff;
  }
`,Rce=document.createElement("template");Rce.innerHTML=`<style>${qur.toString().replace(":host","html")}</style>`;document.head.appendChild(Rce.content);var Gur=Ci`
  [theme~='dark'] {
    /* Base (background) */
    --lumo-base-color: hsl(214, 35%, 21%);

    /* Tint */
    --lumo-tint-5pct: hsla(214, 65%, 85%, 0.06);
    --lumo-tint-10pct: hsla(214, 60%, 80%, 0.14);
    --lumo-tint-20pct: hsla(214, 64%, 82%, 0.23);
    --lumo-tint-30pct: hsla(214, 69%, 84%, 0.32);
    --lumo-tint-40pct: hsla(214, 73%, 86%, 0.41);
    --lumo-tint-50pct: hsla(214, 78%, 88%, 0.5);
    --lumo-tint-60pct: hsla(214, 82%, 90%, 0.6);
    --lumo-tint-70pct: hsla(214, 87%, 92%, 0.7);
    --lumo-tint-80pct: hsla(214, 91%, 94%, 0.8);
    --lumo-tint-90pct: hsla(214, 96%, 96%, 0.9);
    --lumo-tint: hsl(214, 100%, 98%);

    /* Shade */
    --lumo-shade-5pct: hsla(214, 0%, 0%, 0.07);
    --lumo-shade-10pct: hsla(214, 4%, 2%, 0.15);
    --lumo-shade-20pct: hsla(214, 8%, 4%, 0.23);
    --lumo-shade-30pct: hsla(214, 12%, 6%, 0.32);
    --lumo-shade-40pct: hsla(214, 16%, 8%, 0.41);
    --lumo-shade-50pct: hsla(214, 20%, 10%, 0.5);
    --lumo-shade-60pct: hsla(214, 24%, 12%, 0.6);
    --lumo-shade-70pct: hsla(214, 28%, 13%, 0.7);
    --lumo-shade-80pct: hsla(214, 32%, 13%, 0.8);
    --lumo-shade-90pct: hsla(214, 33%, 13%, 0.9);
    --lumo-shade: hsl(214, 33%, 13%);

    /* Contrast */
    --lumo-contrast-5pct: var(--lumo-tint-5pct);
    --lumo-contrast-10pct: var(--lumo-tint-10pct);
    --lumo-contrast-20pct: var(--lumo-tint-20pct);
    --lumo-contrast-30pct: var(--lumo-tint-30pct);
    --lumo-contrast-40pct: var(--lumo-tint-40pct);
    --lumo-contrast-50pct: var(--lumo-tint-50pct);
    --lumo-contrast-60pct: var(--lumo-tint-60pct);
    --lumo-contrast-70pct: var(--lumo-tint-70pct);
    --lumo-contrast-80pct: var(--lumo-tint-80pct);
    --lumo-contrast-90pct: var(--lumo-tint-90pct);
    --lumo-contrast: var(--lumo-tint);

    /* Text */
    --lumo-header-text-color: var(--lumo-contrast);
    --lumo-body-text-color: var(--lumo-contrast-90pct);
    --lumo-secondary-text-color: var(--lumo-contrast-70pct);
    --lumo-tertiary-text-color: var(--lumo-contrast-50pct);
    --lumo-disabled-text-color: var(--lumo-contrast-30pct);

    /* Primary */
    --lumo-primary-color: hsl(214, 86%, 55%);
    --lumo-primary-color-50pct: hsla(214, 86%, 55%, 0.5);
    --lumo-primary-color-10pct: hsla(214, 90%, 63%, 0.1);
    --lumo-primary-text-color: hsl(214, 100%, 70%);
    --lumo-primary-contrast-color: #fff;

    /* Error */
    --lumo-error-color: hsl(3, 90%, 63%);
    --lumo-error-color-50pct: hsla(3, 90%, 63%, 0.5);
    --lumo-error-color-10pct: hsla(3, 90%, 63%, 0.1);
    --lumo-error-text-color: hsl(3, 100%, 67%);

    /* Success */
    --lumo-success-color: hsl(145, 65%, 42%);
    --lumo-success-color-50pct: hsla(145, 65%, 42%, 0.5);
    --lumo-success-color-10pct: hsla(145, 65%, 42%, 0.1);
    --lumo-success-text-color: hsl(145, 85%, 47%);
  }

  html {
    color: var(--lumo-body-text-color);
    background-color: var(--lumo-base-color);
  }

  [theme~='dark'] {
    color: var(--lumo-body-text-color);
    background-color: var(--lumo-base-color);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    color: var(--lumo-header-text-color);
  }

  a {
    color: var(--lumo-primary-text-color);
  }

  blockquote {
    color: var(--lumo-secondary-text-color);
  }

  code,
  pre {
    background-color: var(--lumo-contrast-10pct);
    border-radius: var(--lumo-border-radius-m);
  }
`;jc("",Gur,{moduleId:"lumo-color"});var Wur=Ci`
  :host {
    color: var(--lumo-body-text-color) !important;
    background-color: var(--lumo-base-color) !important;
  }
`;jc("",Wur,{moduleId:"lumo-color-legacy",include:["lumo-color"]});var Nce=document.createElement("template");Nce.innerHTML=`
  <style>
    @font-face {
      font-family: 'lumo-icons';
      src: url(data:application/font-woff;charset=utf-8;base64, ) format('woff');
      font-weight: normal;
      font-style: normal;
    }

    html {
      --lumo-icons-align-center: "\\ea01";
      --lumo-icons-align-left: "\\ea02";
      --lumo-icons-align-right: "\\ea03";
      --lumo-icons-angle-down: "\\ea04";
      --lumo-icons-angle-left: "\\ea05";
      --lumo-icons-angle-right: "\\ea06";
      --lumo-icons-angle-up: "\\ea07";
      --lumo-icons-arrow-down: "\\ea08";
      --lumo-icons-arrow-left: "\\ea09";
      --lumo-icons-arrow-right: "\\ea0a";
      --lumo-icons-arrow-up: "\\ea0b";
      --lumo-icons-bar-chart: "\\ea0c";
      --lumo-icons-bell: "\\ea0d";
      --lumo-icons-calendar: "\\ea0e";
      --lumo-icons-checkmark: "\\ea0f";
      --lumo-icons-chevron-down: "\\ea10";
      --lumo-icons-chevron-left: "\\ea11";
      --lumo-icons-chevron-right: "\\ea12";
      --lumo-icons-chevron-up: "\\ea13";
      --lumo-icons-clock: "\\ea14";
      --lumo-icons-cog: "\\ea15";
      --lumo-icons-cross: "\\ea16";
      --lumo-icons-download: "\\ea17";
      --lumo-icons-dropdown: "\\ea18";
      --lumo-icons-edit: "\\ea19";
      --lumo-icons-error: "\\ea1a";
      --lumo-icons-eye: "\\ea1b";
      --lumo-icons-eye-disabled: "\\ea1c";
      --lumo-icons-menu: "\\ea1d";
      --lumo-icons-minus: "\\ea1e";
      --lumo-icons-ordered-list: "\\ea1f";
      --lumo-icons-phone: "\\ea20";
      --lumo-icons-photo: "\\ea21";
      --lumo-icons-play: "\\ea22";
      --lumo-icons-plus: "\\ea23";
      --lumo-icons-redo: "\\ea24";
      --lumo-icons-reload: "\\ea25";
      --lumo-icons-search: "\\ea26";
      --lumo-icons-undo: "\\ea27";
      --lumo-icons-unordered-list: "\\ea28";
      --lumo-icons-upload: "\\ea29";
      --lumo-icons-user: "\\ea2a";
    }
  </style>
`;document.head.appendChild(Nce.content);var Yur=Ci`
  :host {
    --lumo-size-xs: 1.625rem;
    --lumo-size-s: 1.875rem;
    --lumo-size-m: 2.25rem;
    --lumo-size-l: 2.75rem;
    --lumo-size-xl: 3.5rem;

    /* Icons */
    --lumo-icon-size-s: 1.25em;
    --lumo-icon-size-m: 1.5em;
    --lumo-icon-size-l: 2.25em;
    /* For backwards compatibility */
    --lumo-icon-size: var(--lumo-icon-size-m);
  }
`,Dce=document.createElement("template");Dce.innerHTML=`<style>${Yur.toString().replace(":host","html")}</style>`;document.head.appendChild(Dce.content);var jur=Ci`
  :host {
    /* Square */
    --lumo-space-xs: 0.25rem;
    --lumo-space-s: 0.5rem;
    --lumo-space-m: 1rem;
    --lumo-space-l: 1.5rem;
    --lumo-space-xl: 2.5rem;

    /* Wide */
    --lumo-space-wide-xs: calc(var(--lumo-space-xs) / 2) var(--lumo-space-xs);
    --lumo-space-wide-s: calc(var(--lumo-space-s) / 2) var(--lumo-space-s);
    --lumo-space-wide-m: calc(var(--lumo-space-m) / 2) var(--lumo-space-m);
    --lumo-space-wide-l: calc(var(--lumo-space-l) / 2) var(--lumo-space-l);
    --lumo-space-wide-xl: calc(var(--lumo-space-xl) / 2) var(--lumo-space-xl);

    /* Tall */
    --lumo-space-tall-xs: var(--lumo-space-xs) calc(var(--lumo-space-xs) / 2);
    --lumo-space-tall-s: var(--lumo-space-s) calc(var(--lumo-space-s) / 2);
    --lumo-space-tall-m: var(--lumo-space-m) calc(var(--lumo-space-m) / 2);
    --lumo-space-tall-l: var(--lumo-space-l) calc(var(--lumo-space-l) / 2);
    --lumo-space-tall-xl: var(--lumo-space-xl) calc(var(--lumo-space-xl) / 2);
  }
`,Oce=document.createElement("template");Oce.innerHTML=`<style>${jur.toString().replace(":host","html")}</style>`;document.head.appendChild(Oce.content);var Xur=Ci`
  :host {
    /* Border radius */
    --lumo-border-radius-s: 0.25em; /* Checkbox, badge, date-picker year indicator, etc */
    --lumo-border-radius-m: var(--lumo-border-radius, 0.25em); /* Button, text field, menu overlay, etc */
    --lumo-border-radius-l: 0.5em; /* Dialog, notification, etc */
    --lumo-border-radius: 0.25em; /* Deprecated */

    /* Shadow */
    --lumo-box-shadow-xs: 0 1px 4px -1px var(--lumo-shade-50pct);
    --lumo-box-shadow-s: 0 2px 4px -1px var(--lumo-shade-20pct), 0 3px 12px -1px var(--lumo-shade-30pct);
    --lumo-box-shadow-m: 0 2px 6px -1px var(--lumo-shade-20pct), 0 8px 24px -4px var(--lumo-shade-40pct);
    --lumo-box-shadow-l: 0 3px 18px -2px var(--lumo-shade-20pct), 0 12px 48px -6px var(--lumo-shade-40pct);
    --lumo-box-shadow-xl: 0 4px 24px -3px var(--lumo-shade-20pct), 0 18px 64px -8px var(--lumo-shade-40pct);

    /* Clickable element cursor */
    --lumo-clickable-cursor: default;
  }
`,zce=document.createElement("template");zce.innerHTML=`<style>${Xur.toString().replace(":host","html")}</style>`;document.head.appendChild(zce.content);var $ur=Ci`
  :host {
    /* prettier-ignore */
    --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';

    /* Font sizes */
    --lumo-font-size-xxs: 0.75rem;
    --lumo-font-size-xs: 0.8125rem;
    --lumo-font-size-s: 0.875rem;
    --lumo-font-size-m: 1rem;
    --lumo-font-size-l: 1.125rem;
    --lumo-font-size-xl: 1.375rem;
    --lumo-font-size-xxl: 1.75rem;
    --lumo-font-size-xxxl: 2.5rem;

    /* Line heights */
    --lumo-line-height-xs: 1.25;
    --lumo-line-height-s: 1.375;
    --lumo-line-height-m: 1.625;
  }
`,Fce=document.createElement("template");Fce.innerHTML=`<style>${$ur.toString().replace(":host","html")}</style>`;document.head.appendChild(Fce.content);var Kur=Ci`
  html {
    font-family: var(--lumo-font-family);
    font-size: var(--lumo-font-size, var(--lumo-font-size-m));
    line-height: var(--lumo-line-height-m);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  /* Can’t combine with the above selector because that doesn’t work in browsers without native shadow dom */
  :host {
    font-family: var(--lumo-font-family);
    font-size: var(--lumo-font-size, var(--lumo-font-size-m));
    line-height: var(--lumo-line-height-m);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }

  small,
  [theme~='font-size-s'] {
    font-size: var(--lumo-font-size-s);
    line-height: var(--lumo-line-height-s);
  }

  [theme~='font-size-xs'] {
    font-size: var(--lumo-font-size-xs);
    line-height: var(--lumo-line-height-xs);
  }

  h1,
  h2,
  h3,
  h4,
  h5,
  h6 {
    font-weight: 600;
    line-height: var(--lumo-line-height-xs);
    margin-top: 1.25em;
  }

  h1 {
    font-size: var(--lumo-font-size-xxxl);
    margin-bottom: 0.75em;
  }

  h2 {
    font-size: var(--lumo-font-size-xxl);
    margin-bottom: 0.5em;
  }

  h3 {
    font-size: var(--lumo-font-size-xl);
    margin-bottom: 0.5em;
  }

  h4 {
    font-size: var(--lumo-font-size-l);
    margin-bottom: 0.5em;
  }

  h5 {
    font-size: var(--lumo-font-size-m);
    margin-bottom: 0.25em;
  }

  h6 {
    font-size: var(--lumo-font-size-xs);
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  p,
  blockquote {
    margin-top: 0.5em;
    margin-bottom: 0.75em;
  }

  a {
    text-decoration: none;
  }

  a:hover {
    text-decoration: underline;
  }

  hr {
    display: block;
    align-self: stretch;
    height: 1px;
    border: 0;
    padding: 0;
    margin: var(--lumo-space-s) calc(var(--lumo-border-radius-m) / 2);
    background-color: var(--lumo-contrast-10pct);
  }

  blockquote {
    border-left: 2px solid var(--lumo-contrast-30pct);
  }

  b,
  strong {
    font-weight: 600;
  }

  /* RTL specific styles */

  blockquote[dir='rtl'] {
    border-left: none;
    border-right: 2px solid var(--lumo-contrast-30pct);
  }
`;jc("",Kur,{moduleId:"lumo-typography"});jc("vaadin-checkbox",Ci`
    :host {
      -webkit-tap-highlight-color: transparent;
      -webkit-user-select: none;
      -moz-user-select: none;
      user-select: none;
      cursor: default;
      outline: none;
    }

    [part='label']:not([empty]) {
      margin: 0.1875em 0.875em 0.1875em 0.375em;
    }

    [part='checkbox'] {
      width: calc(1em + 2px);
      height: calc(1em + 2px);
      margin: 0.1875em;
      position: relative;
      border-radius: var(--lumo-border-radius-s);
      background-color: var(--lumo-contrast-20pct);
      transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
      pointer-events: none;
      line-height: 1.2;
    }

    :host([indeterminate]) [part='checkbox'],
    :host([checked]) [part='checkbox'] {
      background-color: var(--lumo-primary-color);
    }

    /* Needed to align the checkbox nicely on the baseline */
    [part='checkbox']::before {
      content: '\\2003';
    }

    /* Checkmark */
    [part='checkbox']::after {
      content: '';
      display: inline-block;
      width: 0;
      height: 0;
      border: 0 solid var(--lumo-primary-contrast-color);
      border-width: 0.1875em 0 0 0.1875em;
      box-sizing: border-box;
      transform-origin: 0 0;
      position: absolute;
      top: 0.8125em;
      left: 0.5em;
      transform: scale(0.55) rotate(-135deg);
      opacity: 0;
    }

    :host([checked]) [part='checkbox']::after {
      opacity: 1;
      width: 0.625em;
      height: 1.0625em;
    }

    /* Indeterminate checkmark */
    :host([indeterminate]) [part='checkbox']::after {
      transform: none;
      opacity: 1;
      top: 45%;
      height: 10%;
      left: 22%;
      right: 22%;
      width: auto;
      border: 0;
      background-color: var(--lumo-primary-contrast-color);
      transition: opacity 0.25s;
    }

    /* Focus ring */
    :host([focus-ring]) [part='checkbox'] {
      box-shadow: 0 0 0 3px var(--lumo-primary-color-50pct);
    }

    /* Disabled */
    :host([disabled]) {
      pointer-events: none;
      color: var(--lumo-disabled-text-color);
    }

    :host([disabled]) [part='label'] ::slotted(*) {
      color: inherit;
    }

    :host([disabled]) [part='checkbox'] {
      background-color: var(--lumo-contrast-10pct);
    }

    :host([disabled]) [part='checkbox']::after {
      border-color: var(--lumo-contrast-30pct);
    }

    :host([indeterminate][disabled]) [part='checkbox']::after {
      background-color: var(--lumo-contrast-30pct);
    }

    /* RTL specific styles */
    :host([dir='rtl']) [part='label']:not([empty]) {
      margin: 0.1875em 0.375em 0.1875em 0.875em;
    }

    /* Transition the checkmark if activated with the mouse (disabled for grid select-all this way) */
    :host(:hover) [part='checkbox']::after {
      transition: width 0.1s, height 0.25s;
    }

    /* Used for activation "halo" */
    [part='checkbox']::before {
      color: transparent;
      display: inline-block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      background-color: inherit;
      transform: scale(1.4);
      opacity: 0;
      transition: transform 0.1s, opacity 0.8s;
    }

    /* Hover */
    :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
      background-color: var(--lumo-contrast-30pct);
    }

    /* Disable hover for touch devices */
    @media (pointer: coarse) {
      :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
        background-color: var(--lumo-contrast-20pct);
      }
    }

    /* Active */
    :host([active]) [part='checkbox'] {
      transform: scale(0.9);
      transition-duration: 0.05s;
    }

    :host([active][checked]) [part='checkbox'] {
      transform: scale(1.1);
    }

    :host([active]:not([checked])) [part='checkbox']::before {
      transition-duration: 0.01s, 0.01s;
      transform: scale(0);
      opacity: 0.4;
    }
  `,{moduleId:"lumo-checkbox"});var Bce=e=>class extends e{static get properties(){return{theme:{type:String,readOnly:!0}}}attributeChangedCallback(r,n,i){super.attributeChangedCallback(r,n,i),r==="theme"&&this._setTheme(i)}};var XH=e=>class extends Bce(e){static finalize(){super.finalize();let r=this.prototype._template,n=Object.getPrototypeOf(this.prototype)._template;n&&Array.from(n.content.querySelectorAll("style[include]")).forEach(i=>{this._includeStyle(i.getAttribute("include"),r)}),this._includeMatchingThemes(r)}static _includeMatchingThemes(r){let i=ou.prototype.modules,o=!1,a=this.is+"-default-theme";Object.keys(i).sort((s,l)=>{let c=s.indexOf("vaadin-")===0,u=l.indexOf("vaadin-")===0,h=["lumo-","material-"],f=h.filter(d=>s.indexOf(d)===0).length>0,p=h.filter(d=>l.indexOf(d)===0).length>0;return c!==u?c?-1:1:f!==p?f?-1:1:0}).forEach(s=>{if(s!==a){let l=i[s].getAttribute("theme-for");l&&l.split(" ").forEach(c=>{new RegExp("^"+c.split("*").join(".*")+"$").test(this.is)&&(o=!0,this._includeStyle(s,r))})}}),!o&&i[a]&&this._includeStyle(a,r)}static _includeStyle(r,n){if(n&&!n.content.querySelector(`style[include="${r}"]`)){let i=document.createElement("style");i.setAttribute("include",r),n.content.appendChild(i)}}};var kct=!1;window.addEventListener("keydown",()=>{kct=!0},{capture:!0});window.addEventListener("mousedown",()=>{kct=!1},{capture:!0});var Zur=e=>class extends e{static get properties(){return{tabindex:{type:Number,value:0,reflectToAttribute:!0,observer:"_tabindexChanged"}}}},Hce=e=>class extends Zur(e){static get properties(){return{autofocus:{type:Boolean},_previousTabIndex:{type:Number},disabled:{type:Boolean,observer:"_disabledChanged",reflectToAttribute:!0},_isShiftTabbing:{type:Boolean}}}ready(){this.addEventListener("focusin",r=>{r.composedPath()[0]===this?this.contains(r.relatedTarget)||this._focus():r.composedPath().indexOf(this.focusElement)!==-1&&!this.disabled&&this._setFocused(!0)}),this.addEventListener("focusout",()=>this._setFocused(!1)),super.ready(),this.addEventListener("keydown",r=>{!r.defaultPrevented&&r.keyCode===9&&r.shiftKey&&(this._isShiftTabbing=!0,HTMLElement.prototype.focus.apply(this),this._setFocused(!1),setTimeout(()=>this._isShiftTabbing=!1,0))}),this.autofocus&&!this.disabled&&window.requestAnimationFrame(()=>{this._focus(),this._setFocused(!0),this.setAttribute("focus-ring","")})}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(r){r?this.setAttribute("focused",""):this.removeAttribute("focused"),r&&kct?this.setAttribute("focus-ring",""):this.removeAttribute("focus-ring")}get focusElement(){return window.console.warn(`Please implement the 'focusElement' property in <${this.localName}>`),this}_focus(){!this.focusElement||this._isShiftTabbing||(this.focusElement.focus(),this._setFocused(!0))}focus(){!this.focusElement||this.disabled||(this.focusElement.focus(),this._setFocused(!0))}blur(){!this.focusElement||(this.focusElement.blur(),this._setFocused(!1))}_disabledChanged(r){this.focusElement.disabled=r,r?(this.blur(),this._previousTabIndex=this.tabindex,this.tabindex=-1,this.setAttribute("aria-disabled","true")):(typeof this._previousTabIndex!="undefined"&&(this.tabindex=this._previousTabIndex),this.removeAttribute("aria-disabled"))}_tabindexChanged(r){r!==void 0&&(this.focusElement.tabIndex=r),this.disabled&&this.tabindex&&(this.tabindex!==-1&&(this._previousTabIndex=this.tabindex),this.tabindex=r=void 0)}click(){this.disabled||super.click()}};var Jur=/\/\*\*\s+vaadin-dev-mode:start([\s\S]*)vaadin-dev-mode:end\s+\*\*\//i,$H=window.Vaadin&&window.Vaadin.Flow&&window.Vaadin.Flow.clients;function Qur(){function e(){return!0}return Vce(e)}function thr(){try{return ehr()?!0:rhr()?$H?!nhr():!Qur():!1}catch(e){return!1}}function ehr(){return localStorage.getItem("vaadin.developmentmode.force")}function rhr(){return["localhost","127.0.0.1"].indexOf(window.location.hostname)>=0}function nhr(){return!!($H&&Object.keys($H).map(t=>$H[t]).filter(t=>t.productionMode).length>0)}function Vce(e,t){if(typeof e!="function")return;let r=Jur.exec(e.toString());if(r)try{e=new Function(r[1])}catch(n){console.log("vaadin-development-mode-detector: uncommentAndRun() failed",n)}return e(t)}window.Vaadin=window.Vaadin||{};var Rct=function(e,t){if(window.Vaadin.developmentMode)return Vce(e,t)};window.Vaadin.developmentMode===void 0&&(window.Vaadin.developmentMode=thr());function ihr(){}var Uce=function(){if(typeof Rct=="function")return Rct(ihr)};var _3=class{static detectScrollType(){let t=document.createElement("div");t.textContent="ABCD",t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t);let r="reverse";return t.scrollLeft>0?r="default":(t.scrollLeft=2,t.scrollLeft<2&&(r="negative")),document.body.removeChild(t),r}static getNormalizedScrollLeft(t,r,n){let{scrollLeft:i}=n;if(r!=="rtl"||!t)return i;switch(t){case"negative":return n.scrollWidth-n.clientWidth+i;case"reverse":return n.scrollWidth-n.clientWidth-i}return i}static setNormalizedScrollLeft(t,r,n,i){if(r!=="rtl"||!t){n.scrollLeft=i;return}switch(t){case"negative":n.scrollLeft=n.clientWidth-n.scrollWidth+i;break;case"reverse":n.scrollLeft=n.scrollWidth-n.clientWidth-i;break;default:n.scrollLeft=i;break}}};var E0=[],ohr=function(){let e=Dct();E0.forEach(t=>{Nct(t,e)})},KH,ahr=new MutationObserver(ohr);ahr.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]});var Nct=function(e,t,r=e.getAttribute("dir")){t?e.setAttribute("dir",t):r!=null&&e.removeAttribute("dir")},Dct=function(){return document.documentElement.getAttribute("dir")},ZH=e=>class extends e{static get properties(){return{dir:{type:String,value:"",reflectToAttribute:!0}}}static finalize(){super.finalize(),KH||(KH=_3.detectScrollType())}connectedCallback(){super.connectedCallback(),this.hasAttribute("dir")||(this.__subscribe(),Nct(this,Dct(),null))}attributeChangedCallback(r,n,i){if(super.attributeChangedCallback(r,n,i),r!=="dir")return;let o=Dct(),a=i===o&&E0.indexOf(this)===-1,s=!i&&n&&E0.indexOf(this)===-1;a||s?(this.__subscribe(),Nct(this,o,i)):i!==o&&n===o&&this.__subscribe(!1)}disconnectedCallback(){super.disconnectedCallback(),this.__subscribe(!1),this.removeAttribute("dir")}_valueToNodeAttribute(r,n,i){i==="dir"&&n===""&&!r.hasAttribute("dir")||super._valueToNodeAttribute(r,n,i)}_attributeToProperty(r,n,i){r==="dir"&&!n?this.dir="":super._attributeToProperty(r,n,i)}__subscribe(r=!0){r?E0.indexOf(this)===-1&&E0.push(this):E0.indexOf(this)>-1&&E0.splice(E0.indexOf(this),1)}__getNormalizedScrollLeft(r){return _3.getNormalizedScrollLeft(KH,this.getAttribute("dir")||"ltr",r)}__setNormalizedScrollLeft(r,n){return _3.setNormalizedScrollLeft(KH,this.getAttribute("dir")||"ltr",r,n)}};window.Vaadin=window.Vaadin||{};window.Vaadin.registrations=window.Vaadin.registrations||[];window.Vaadin.developmentModeCallback=window.Vaadin.developmentModeCallback||{};window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){Uce()};var Oct,qce=new Set,JH=e=>class extends ZH(e){static finalize(){super.finalize();let{is:r}=this;r&&!qce.has(r)&&(window.Vaadin.registrations.push(this),qce.add(r),window.Vaadin.developmentModeCallback&&(Oct=sr.debounce(Oct,kx,()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()}),Jl(Oct)))}constructor(){super(),document.doctype===null&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}};var QH=class extends JH(Hce(XH(yh(mt)))){static get template(){return Q`
      <style>
        :host {
          display: inline-block;
        }

        :host([hidden]) {
          display: none !important;
        }

        label {
          display: inline-flex;
          align-items: baseline;
          outline: none;
        }

        [part='checkbox'] {
          position: relative;
          display: inline-block;
          flex: none;
        }

        input[type='checkbox'] {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          width: 100%;
          height: 100%;
          opacity: 0;
          cursor: inherit;
          margin: 0;
        }

        :host([disabled]) {
          -webkit-tap-highlight-color: transparent;
        }
      </style>

      <label>
        <span part="checkbox">
          <input
            type="checkbox"
            checked="{{checked::change}}"
            disabled$="[[disabled]]"
            indeterminate="{{indeterminate::change}}"
            role="presentation"
            tabindex="-1"
          />
        </span>

        <span part="label">
          <slot></slot>
        </span>
      </label>
    `}static get is(){return"vaadin-checkbox"}static get version(){return"20.0.2"}static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,observer:"_checkedChanged",reflectToAttribute:!0},indeterminate:{type:Boolean,notify:!0,observer:"_indeterminateChanged",reflectToAttribute:!0,value:!1},value:{type:String,value:"on"},_nativeCheckbox:{type:Object}}}constructor(){super(),this.name}get name(){return this.checked?this._storedName:""}set name(t){this._storedName=t}ready(){super.ready(),this.setAttribute("role","checkbox"),this._nativeCheckbox=this.shadowRoot.querySelector('input[type="checkbox"]'),this.addEventListener("click",this._handleClick.bind(this)),this._addActiveListeners();let t=this.getAttribute("name");t&&(this.name=t),this.shadowRoot.querySelector('[part~="label"]').querySelector("slot").addEventListener("slotchange",this._updateLabelAttribute.bind(this)),this._updateLabelAttribute()}_updateLabelAttribute(){let t=this.shadowRoot.querySelector('[part~="label"]'),r=t.firstElementChild.assignedNodes();this._isAssignedNodesEmpty(r)?t.setAttribute("empty",""):t.removeAttribute("empty")}_isAssignedNodesEmpty(t){return t.length===0||t.length==1&&t[0].nodeType==Node.TEXT_NODE&&t[0].textContent.trim()===""}_checkedChanged(t){this.indeterminate?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",Boolean(t))}_indeterminateChanged(t){t?this.setAttribute("aria-checked","mixed"):this.setAttribute("aria-checked",this.checked)}_addActiveListeners(){this._addEventListenerToNode(this,"down",t=>{this.__interactionsAllowed(t)&&this.setAttribute("active","")}),this._addEventListenerToNode(this,"up",()=>this.removeAttribute("active")),this.addEventListener("keydown",t=>{this.__interactionsAllowed(t)&&t.keyCode===32&&(t.preventDefault(),this.setAttribute("active",""))}),this.addEventListener("keyup",t=>{this.__interactionsAllowed(t)&&t.keyCode===32&&(t.preventDefault(),this._toggleChecked(),this.removeAttribute("active"),this.indeterminate&&(this.indeterminate=!1))})}get focusElement(){return this.shadowRoot.querySelector("input")}__interactionsAllowed(t){return!(this.disabled||t.target.localName==="a")}_handleClick(t){this.__interactionsAllowed(t)&&(this.indeterminate?(this.indeterminate=!1,t.preventDefault(),this._toggleChecked()):t.composedPath()[0]!==this._nativeCheckbox&&(t.preventDefault(),this._toggleChecked()))}_toggleChecked(){this.checked=!this.checked,this.dispatchEvent(new CustomEvent("change",{composed:!1,bubbles:!0}))}};customElements.define(QH.is,QH);jc("vaadin-grid",Ci`
    :host {
      font-family: var(--lumo-font-family);
      font-size: var(--lumo-font-size-m);
      line-height: var(--lumo-line-height-s);
      color: var(--lumo-body-text-color);
      background-color: var(--lumo-base-color);
      box-sizing: border-box;
      -webkit-text-size-adjust: 100%;
      -webkit-tap-highlight-color: transparent;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;

      /* For internal use only */
      --_lumo-grid-border-color: var(--lumo-contrast-20pct);
      --_lumo-grid-secondary-border-color: var(--lumo-contrast-10pct);
      --_lumo-grid-border-width: 1px;
      --_lumo-grid-selected-row-color: var(--lumo-primary-color-10pct);
    }

    /* No (outer) border */

    :host(:not([theme~='no-border'])) {
      border: var(--_lumo-grid-border-width) solid var(--_lumo-grid-border-color);
    }

    /* Cell styles */

    [part~='cell'] {
      min-height: var(--lumo-size-m);
      background-color: var(--lumo-base-color);
    }

    [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      cursor: default;
      padding: var(--lumo-space-xs) var(--lumo-space-m);
    }

    /* Apply row borders by default and introduce the "no-row-borders" variant */
    :host(:not([theme~='no-row-borders'])) [part~='cell']:not([part~='details-cell']) {
      border-top: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    /* Hide first body row top border */
    :host(:not([theme~='no-row-borders'])) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
      border-top: 0;
      min-height: calc(var(--lumo-size-m) - var(--_lumo-grid-border-width));
    }

    /* Focus-ring */

    [part~='cell']:focus {
      outline: none;
    }

    :host([navigating]) [part~='cell']:focus::before {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      pointer-events: none;
      box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
    }

    /* Drag and Drop styles */
    :host([dragover])::after {
      content: '';
      position: absolute;
      z-index: 100;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      pointer-events: none;
      box-shadow: inset 0 0 0 2px var(--lumo-primary-color-50pct);
    }

    [part~='row'][dragover] {
      z-index: 100 !important;
    }

    [part~='row'][dragover] [part~='cell'] {
      overflow: visible;
    }

    [part~='row'][dragover] [part~='cell']::after {
      content: '';
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
      height: calc(var(--_lumo-grid-border-width) + 2px);
      pointer-events: none;
      background: var(--lumo-primary-color-50pct);
    }

    :host([theme~='no-row-borders']) [dragover] [part~='cell']::after {
      height: 2px;
    }

    [part~='row'][dragover='below'] [part~='cell']::after {
      top: 100%;
      bottom: auto;
      margin-top: -1px;
    }

    [part~='row'][dragover='above'] [part~='cell']::after {
      top: auto;
      bottom: 100%;
      margin-bottom: -1px;
    }

    [part~='row'][details-opened][dragover='below'] [part~='cell']:not([part~='details-cell'])::after,
    [part~='row'][details-opened][dragover='above'] [part~='details-cell']::after {
      display: none;
    }

    [part~='row'][dragover][dragover='on-top'] [part~='cell']::after {
      height: 100%;
    }

    [part~='row'][dragstart] {
      /* Add bottom-space to the row so the drag number doesn't get clipped. Needed for IE/Edge */
      border-bottom: 100px solid transparent;
      z-index: 100 !important;
      opacity: 0.9;
    }

    [part~='row'][dragstart] [part~='cell'] {
      border: none !important;
      box-shadow: none !important;
    }

    [part~='row'][dragstart] [part~='cell'][last-column] {
      border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
    }

    [part~='row'][dragstart] [part~='cell'][first-column] {
      border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
    }

    [ios] [part~='row'][dragstart] [part~='cell'] {
      background: var(--lumo-primary-color-50pct);
    }

    #scroller:not([ios]) [part~='row'][dragstart]:not([dragstart=''])::after {
      display: block;
      position: absolute;
      left: var(--_grid-drag-start-x);
      top: var(--_grid-drag-start-y);
      z-index: 100;
      content: attr(dragstart);
      align-items: center;
      justify-content: center;
      box-sizing: border-box;
      padding: calc(var(--lumo-space-xs) * 0.8);
      color: var(--lumo-error-contrast-color);
      background-color: var(--lumo-error-color);
      border-radius: var(--lumo-border-radius-m);
      font-family: var(--lumo-font-family);
      font-size: var(--lumo-font-size-xxs);
      line-height: 1;
      font-weight: 500;
      text-transform: initial;
      letter-spacing: initial;
      min-width: calc(var(--lumo-size-s) * 0.7);
      text-align: center;
    }

    /* Headers and footers */

    [part~='header-cell'] ::slotted(vaadin-grid-cell-content),
    [part~='footer-cell'] ::slotted(vaadin-grid-cell-content),
    [part~='reorder-ghost'] {
      font-size: var(--lumo-font-size-s);
      font-weight: 500;
    }

    [part~='footer-cell'] ::slotted(vaadin-grid-cell-content) {
      font-weight: 400;
    }

    [part='row']:only-child [part~='header-cell'] {
      min-height: var(--lumo-size-xl);
    }

    /* Header borders */

    /* Hide first header row top border */
    :host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='header-cell'] {
      border-top: 0;
    }

    [part='row']:last-child [part~='header-cell'] {
      border-bottom: var(--_lumo-grid-border-width) solid transparent;
    }

    :host(:not([theme~='no-row-borders'])) [part='row']:last-child [part~='header-cell'] {
      border-bottom-color: var(--_lumo-grid-secondary-border-color);
    }

    /* Overflow uses a stronger border color */
    :host([overflow~='top']) [part='row']:last-child [part~='header-cell'] {
      border-bottom-color: var(--_lumo-grid-border-color);
    }

    /* Footer borders */

    [part='row']:first-child [part~='footer-cell'] {
      border-top: var(--_lumo-grid-border-width) solid transparent;
    }

    :host(:not([theme~='no-row-borders'])) [part='row']:first-child [part~='footer-cell'] {
      border-top-color: var(--_lumo-grid-secondary-border-color);
    }

    /* Overflow uses a stronger border color */
    :host([overflow~='bottom']) [part='row']:first-child [part~='footer-cell'] {
      border-top-color: var(--_lumo-grid-border-color);
    }

    /* Column reordering */

    :host([reordering]) [part~='cell'] {
      background: linear-gradient(var(--lumo-shade-20pct), var(--lumo-shade-20pct)) var(--lumo-base-color);
    }

    :host([reordering]) [part~='cell'][reorder-status='allowed'] {
      background: var(--lumo-base-color);
    }

    :host([reordering]) [part~='cell'][reorder-status='dragging'] {
      background: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct)) var(--lumo-base-color);
    }

    [part~='reorder-ghost'] {
      opacity: 0.85;
      box-shadow: var(--lumo-box-shadow-s);
      /* TODO Use the same styles as for the cell element (reorder-ghost copies styles from the cell element) */
      padding: var(--lumo-space-s) var(--lumo-space-m) !important;
    }

    /* Column resizing */

    [part='resize-handle'] {
      width: 3px;
      background-color: var(--lumo-primary-color-50pct);
      opacity: 0;
      transition: opacity 0.2s;
    }

    :host(:not([reordering])) *:not([column-resizing]) [part~='cell']:hover [part='resize-handle'],
    [part='resize-handle']:active {
      opacity: 1;
      transition-delay: 0.15s;
    }

    /* Column borders */

    :host([theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
      border-right: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    /* Frozen columns */

    [last-frozen] {
      border-right: var(--_lumo-grid-border-width) solid transparent;
      overflow: hidden;
    }

    :host([overflow~='left']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
      border-right-color: var(--_lumo-grid-border-color);
    }

    /* Row stripes */

    :host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='body-cell'],
    :host([theme~='row-stripes']) [part~='row']:not([odd]) [part~='details-cell'] {
      background-image: linear-gradient(var(--lumo-contrast-5pct), var(--lumo-contrast-5pct));
      background-repeat: repeat-x;
    }

    /* Selected row */

    /* Raise the selected rows above unselected rows (so that box-shadow can cover unselected rows) */
    :host(:not([reordering])) [part~='row'][selected] {
      z-index: 1;
    }

    :host(:not([reordering])) [part~='row'][selected] [part~='body-cell']:not([part~='details-cell']) {
      background-image: linear-gradient(var(--_lumo-grid-selected-row-color), var(--_lumo-grid-selected-row-color));
      background-repeat: repeat;
    }

    /* Cover the border of an unselected row */
    :host(:not([theme~='no-row-borders'])) [part~='row'][selected] [part~='cell']:not([part~='details-cell']) {
      box-shadow: 0 var(--_lumo-grid-border-width) 0 0 var(--_lumo-grid-selected-row-color);
    }

    /* Compact */

    :host([theme~='compact']) [part='row']:only-child [part~='header-cell'] {
      min-height: var(--lumo-size-m);
    }

    :host([theme~='compact']) [part~='cell'] {
      min-height: var(--lumo-size-s);
    }

    :host([theme~='compact']) [part='row'][first] [part~='cell']:not([part~='details-cell']) {
      min-height: calc(var(--lumo-size-s) - var(--_lumo-grid-border-width));
    }

    :host([theme~='compact']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      padding: var(--lumo-space-xs) var(--lumo-space-s);
    }

    /* Wrap cell contents */

    :host([theme~='wrap-cell-content']) [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      white-space: normal;
    }

    /* RTL specific styles */

    :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][last-column] {
      border-radius: var(--lumo-border-radius-s) 0 0 var(--lumo-border-radius-s);
    }

    :host([dir='rtl']) [part~='row'][dragstart] [part~='cell'][first-column] {
      border-radius: 0 var(--lumo-border-radius-s) var(--lumo-border-radius-s) 0;
    }

    :host([dir='rtl'][theme~='column-borders']) [part~='cell']:not([last-column]):not([part~='details-cell']) {
      border-right: none;
      border-left: var(--_lumo-grid-border-width) solid var(--_lumo-grid-secondary-border-color);
    }

    :host([dir='rtl']) [last-frozen] {
      border-right: none;
      border-left: var(--_lumo-grid-border-width) solid transparent;
    }

    :host([dir='rtl'][overflow~='right']) [part~='cell'][last-frozen]:not([part~='details-cell']) {
      border-left-color: var(--_lumo-grid-border-color);
    }
  `,{moduleId:"lumo-grid"});jc("vaadin-checkbox",Ci`
    :host(.vaadin-grid-select-all-checkbox) {
      font-size: var(--lumo-font-size-m);
    }
  `,{moduleId:"vaadin-grid-select-all-checkbox-lumo"});var Gce=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/),shr=Gce&&Gce[1]>=8,Wce=3,Yce=h9({behaviors:[Js,v9],_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_focusedVirtualIndex:-1,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){return Math.max(0,this._virtualCount-this._physicalCount)},set _virtualStart(e){e=this._clamp(e,0,this._maxVirtualStart),this._virtualStartVal=e},get _virtualStart(){return this._virtualStartVal||0},set _physicalStart(e){e=e%this._physicalCount,e<0&&(e=this._physicalCount+e),this._physicalStartVal=e},get _physicalStart(){return this._physicalStartVal||0},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},set _physicalCount(e){this._physicalCountVal=e},get _physicalCount(){return this._physicalCountVal||0},get _optPhysicalSize(){return this._viewportHeight===0?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let e=this._firstVisibleIndexVal;if(e==null){let t=this._physicalTop+this._scrollOffset;e=this._iterateItems(function(r,n){if(t+=this._physicalSizes[r],t>this._scrollPosition)return n})||0,this._firstVisibleIndexVal=e}return e},get lastVisibleIndex(){let e=this._lastVisibleIndexVal;if(e==null){let t=this._physicalTop+this._scrollOffset;this._iterateItems(function(r,n){t<this._scrollBottom&&(e=n),t+=this._physicalSizes[r]}),this._lastVisibleIndexVal=e}return e},get _scrollOffset(){return this._scrollerPaddingTop},attached:function(){this._debounce("_render",this._render,Ni),this.listen(this,"iron-resize","_resizeHandler")},detached:function(){this.unlisten(this,"iron-resize","_resizeHandler")},updateViewportBoundaries:function(){let e=window.getComputedStyle(this);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(e["padding-top"],10),this._isRTL=Boolean(e.direction==="rtl"),this._viewportWidth=this.$.items.offsetWidth,this._viewportHeight=this._scrollTargetHeight},_scrollHandler:function(){let e=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop)),t=e-this._scrollPosition,r=t>=0;if(this._scrollPosition=e,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(t)>this._physicalSize&&this._physicalSize>0){t=t-this._scrollOffset;let n=Math.round(t/this._physicalAverage);this._virtualStart=this._virtualStart+n,this._physicalStart=this._physicalStart+n,this._physicalTop=Math.floor(this._virtualStart)*this._physicalAverage,this._update()}else if(this._physicalCount>0){let{physicalTop:n,indexes:i}=this._getReusables(r);r?(this._physicalTop=n,this._virtualStart=this._virtualStart+i.length,this._physicalStart=this._physicalStart+i.length):(this._virtualStart=this._virtualStart-i.length,this._physicalStart=this._physicalStart-i.length),this._update(i,r?null:i),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),li)}},_getReusables:function(e){let t,r,n,i=[],o=this._hiddenContentSize*this._ratio,a=this._virtualStart,s=this._virtualEnd,l=this._physicalCount,c=this._physicalTop+this._scrollOffset,u=this._physicalBottom+this._scrollOffset,h=this._scrollTop,f=this._scrollBottom;for(e?(t=this._physicalStart,r=h-c):(t=this._physicalEnd,r=u-f);n=this._physicalSizes[t],r=r-n,!(i.length>=l||r<=o);)if(e){if(s+i.length+1>=this._virtualCount||c+n>=h-this._scrollOffset)break;i.push(t),c=c+n,t=(t+1)%l}else{if(a-i.length<=0||c+this._physicalSize-n<=f)break;i.push(t),c=c-n,t=t===0?l-1:t-1}return{indexes:i,physicalTop:c-this._scrollOffset}},_update:function(e,t){if(!(e&&e.length===0||this._physicalCount===0)){if(this._assignModels(e),this._updateMetrics(e),t)for(;t.length;){let r=t.pop();this._physicalTop-=this._physicalSizes[r]}this._positionItems(),this._updateScrollerSize()}},_isClientFull:function(){return this._scrollBottom!=0&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded:function(e){let r=this._clamp(this._physicalCount+e,Wce,this._virtualCount-this._virtualStart)-this._physicalCount,n=Math.round(this._physicalCount*.5);if(!(r<0)){if(r>0){let i=window.performance.now();[].push.apply(this._physicalItems,this._createPool(r));for(let o=0;o<r;o++)this._physicalSizes.push(0);this._physicalCount=this._physicalCount+r,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart=this._physicalStart+r),this._update(),this._templateCost=(window.performance.now()-i)/r,n=Math.round(this._physicalCount*.5)}this._virtualEnd>=this._virtualCount-1||n===0||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,n)),kx):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,n),li))}},_render:function(){if(!(!this.isAttached||!this._isVisible))if(this._physicalCount!==0){let{physicalTop:e,indexes:t}=this._getReusables(!0);this._physicalTop=e,this._virtualStart=this._virtualStart+t.length,this._physicalStart=this._physicalStart+t.length,this._update(t),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(Wce))},_itemsChanged:function(e){e.path==="items"&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalCount=this._physicalCount||0,this._physicalItems=this._physicalItems||[],this._physicalSizes=this._physicalSizes||[],this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,Ni))},_iterateItems:function(e,t){let r,n,i,o;if(arguments.length===2&&t){for(o=0;o<t.length;o++)if(r=t[o],n=this._computeVidx(r),(i=e.call(this,r,n))!=null)return i}else{for(r=this._physicalStart,n=this._virtualStart;r<this._physicalCount;r++,n++)if((i=e.call(this,r,n))!=null)return i;for(r=0;r<this._physicalStart;r++,n++)if((i=e.call(this,r,n))!=null)return i}},_computeVidx:function(e){return e>=this._physicalStart?this._virtualStart+(e-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+e},_updateMetrics:function(e){if(!this._isVisible)return;ci();let t=0,r=0,n=this._physicalAverageCount,i=this._physicalAverage;this._iterateItems(function(o){r+=this._physicalSizes[o],this._physicalSizes[o]=this._physicalItems[o].offsetHeight,t+=this._physicalSizes[o],this._physicalAverageCount+=this._physicalSizes[o]?1:0},e),this._physicalSize=this._physicalSize+t-r,this._physicalAverageCount!==n&&(this._physicalAverage=Math.round((i*n+t)/this._physicalAverageCount))},_positionItems:function(){this._adjustScrollPosition();let e=this._physicalTop;this._iterateItems(function(t){this.translate3d(0,e+"px",0,this._physicalItems[t]),e+=this._physicalSizes[t]})},_adjustScrollPosition:function(){let e=this._virtualStart===0?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(e!==0){this._physicalTop=this._physicalTop-e;let t=this._scrollTop;!shr&&t>0&&this._resetScrollPosition(t-e)}},_resetScrollPosition:function(e){this.scrollTarget&&e>=0&&(this._scrollTop=e,this._scrollPosition=this._scrollTop)},_updateScrollerSize:function(e){this._estScrollHeight=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage,e=e||this._scrollHeight===0,e=e||this._scrollPosition>=this._estScrollHeight-this._physicalSize,(e||Math.abs(this._estScrollHeight-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=this._estScrollHeight+"px",this._scrollHeight=this._estScrollHeight)},scrollToIndex:function(e){if(typeof e!="number"||e<0||e>this.items.length-1||(ci(),this._physicalCount===0))return;e=this._clamp(e,0,this._virtualCount-1),(!this._isIndexRendered(e)||e>=this._maxVirtualStart)&&(this._virtualStart=e-1),this._assignModels(),this._updateMetrics(),this._physicalTop=Math.floor(this._virtualStart)*this._physicalAverage;let t=this._physicalStart,r=this._virtualStart,n=0,i=this._hiddenContentSize;for(;r<e&&n<=i;)n=n+this._physicalSizes[t],t=(t+1)%this._physicalCount,r++;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+n),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage:function(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler:function(){this._debounce("_render",function(){this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this.updateViewportBoundaries(),this._isVisible?(this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)},Ni)},_isIndexRendered:function(e){return e>=this._virtualStart&&e<=this._virtualEnd},_getPhysicalIndex:function(e){return(this._physicalStart+(e-this._virtualStart))%this._physicalCount},_clamp:function(e,t,r){return Math.min(r,Math.max(t,e))},_debounce:function(e,t,r){this._debouncers=this._debouncers||{},this._debouncers[e]=sr.debounce(this._debouncers[e],r,t.bind(this)),Jl(this._debouncers[e])}});var tV=class extends Yce{static get properties(){return{size:{type:Number,notify:!0},_vidxOffset:{type:Number,value:0}}}static get observers(){return["_effectiveSizeChanged(_effectiveSize)"]}connectedCallback(){super.connectedCallback(),this._scrollHandler()}_updateScrollerItem(){}_afterScroll(){}_getRowTarget(){}_createScrollerRows(){}_canPopulate(){}scrollToIndex(t){this._warnPrivateAPIAccess("scrollToIndex"),this._scrollingToIndex=!0,t=Math.min(Math.max(t,0),this._effectiveSize-1),this.$.table.scrollTop=t/this._effectiveSize*(this.$.table.scrollHeight-this.$.table.offsetHeight),this._scrollHandler(),this._accessIronListAPI(()=>this._maxScrollTop)&&this._virtualCount<this._effectiveSize&&this._adjustVirtualIndexOffset(1e6),this._accessIronListAPI(()=>super.scrollToIndex(t-this._vidxOffset)),this._scrollHandler();let r=Array.from(this.$.items.children).filter(n=>n.index===t)[0];if(r){let n=r.getBoundingClientRect().top-this.$.header.getBoundingClientRect().bottom;Math.abs(n)>1&&(this.$.table.scrollTop+=n,this._scrollHandler())}this._scrollingToIndex=!1}_effectiveSizeChanged(t){let r,n=0;this._iterateItems((i,o)=>{if(o===this._firstVisibleIndex){let a=this._physicalItems[i];r=a.index,n=a.getBoundingClientRect().top}}),this.items&&t<this.items.length&&(this._scrollTop=0),Array.isArray(this.items)||(this.items={length:Math.min(t,1e5)}),this._accessIronListAPI(()=>super._itemsChanged({path:"items"})),this._virtualCount=Math.min(this.items.length,t)||0,this._scrollTop===0&&(this._accessIronListAPI(()=>this._scrollToIndex(Math.min(t-1,r))),this._iterateItems(i=>{let o=this._physicalItems[i];if(o.index===r&&(this.$.table.scrollTop+=Math.round(o.getBoundingClientRect().top-n)),o.index===this._focusedItemIndex&&this._itemsFocusable&&this.$.items.contains(this.shadowRoot.activeElement)){let a=Array.from(this._itemsFocusable.parentElement.children).indexOf(this._itemsFocusable);o.children[a].focus()}})),this._assignModels(),requestAnimationFrame(()=>this._update()),this.__updateFooterPositioning()}_positionItems(){this._adjustScrollPosition();let t;isNaN(this._physicalTop)&&(t=!0,this._physicalTop=0);let r=this._physicalTop;this._iterateItems(n=>{this._physicalItems[n].style.transform=`translateY(${r}px)`,r+=this._physicalSizes[n]}),t&&this._scrollToIndex(0)}_increasePoolIfNeeded(t){t===0&&this._scrollingToIndex||!this._canPopulate()||!this._effectiveSize||(this._initialPoolCreated?this._optPhysicalSize!==1/0&&(this._debounceIncreasePool=sr.debounce(this._debounceIncreasePool,Ni,()=>{this._updateMetrics();let r=this._optPhysicalSize-this._physicalSize,n=Math.ceil(r/this._physicalAverage);this._physicalCount+n>this._effectiveSize&&(n=Math.max(0,this._effectiveSize-this._physicalCount)),this._physicalSize&&n>0&&this._optPhysicalSize!==1/0&&(super._increasePoolIfNeeded(n),this.__reorderChildNodes())})):(this._initialPoolCreated=!0,super._increasePoolIfNeeded(25)))}__reorderChildNodes(){let t=Array.from(this.$.items.childNodes);!!t.reduce((n,i,o,a)=>{if(o===0||a[o-1].index===i.index-1)return n},!0)||t.sort((n,i)=>n.index-i.index).forEach(n=>this.$.items.appendChild(n))}_createPool(t){let r=document.createDocumentFragment(),n=this._createScrollerRows(t);n.forEach(o=>r.appendChild(o)),this._getRowTarget().appendChild(r);let i=this.querySelector("[slot]");if(i){let o=i.getAttribute("slot");i.setAttribute("slot","foo-bar"),i.setAttribute("slot",o)}return Tm(this,()=>this.notifyResize()),n}_assignModels(t){this._iterateItems((r,n)=>{let i=this._physicalItems[r];this._toggleAttribute("hidden",n>=this._effectiveSize,i),this._updateScrollerItem(i,n+(this._vidxOffset||0))},t)}_scrollHandler(){let t=this.$.table.scrollTop-this._scrollPosition;this._accessIronListAPI(super._scrollHandler);let r=this._vidxOffset;this._accessIronListAPI(()=>this._maxScrollTop)&&this._virtualCount<this._effectiveSize?this._adjustVirtualIndexOffset(t):this._vidxOffset=0,this._vidxOffset!==r&&this._update(),this._afterScroll()}_adjustVirtualIndexOffset(t){if(Math.abs(t)>1e4){if(this._noScale){this._noScale=!1;return}let r=this.$.table.scrollTop/(this.$.table.scrollHeight-this.$.table.offsetHeight),n=r*this._effectiveSize;this._vidxOffset=Math.round(n-r*this._virtualCount)}else{let r=this._vidxOffset||0,n=1e3,i=100;this._scrollTop===0?(this._vidxOffset=0,r!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<n&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),r!==this._vidxOffset&&super.scrollToIndex(this.firstVisibleIndex+(r-this._vidxOffset)),this._noScale=!0);let o=this._effectiveSize-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=o,r!==this._vidxOffset&&super.scrollToIndex(this._virtualCount)):this.firstVisibleIndex>this._virtualCount-n&&this._vidxOffset<o&&(this._vidxOffset+=Math.min(o-this._vidxOffset,i),r!==this._vidxOffset&&super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-r)),this._noScale=!0)}}_accessIronListAPI(t){this._warnPrivateAPIAccessAsyncEnabled=!1;let r=t.apply(this);return this._debouncerWarnPrivateAPIAccess=sr.debounce(this._debouncerWarnPrivateAPIAccess,Ni,()=>this._warnPrivateAPIAccessAsyncEnabled=!0),r}_debounceRender(t,r){super._debounceRender(()=>this._accessIronListAPI(t),r)}_warnPrivateAPIAccess(t){this._warnPrivateAPIAccessAsyncEnabled&&console.warn(`Accessing private API (${t})!`)}_render(){this._accessIronListAPI(super._render)}_itemsChanged(){}get _firstVisibleIndex(){return this._accessIronListAPI(()=>super.firstVisibleIndex)}get _lastVisibleIndex(){return this._accessIronListAPI(()=>super.lastVisibleIndex)}_scrollToIndex(t){this._accessIronListAPI(()=>this.scrollToIndex(t))}get firstVisibleIndex(){return this._warnPrivateAPIAccess("firstVisibleIndex"),super.firstVisibleIndex}set firstVisibleIndex(t){this._warnPrivateAPIAccess("firstVisibleIndex"),super.firstVisibleIndex=t}get lastVisibleIndex(){return this._warnPrivateAPIAccess("lastVisibleIndex"),super.lastVisibleIndex}set lastVisibleIndex(t){this._warnPrivateAPIAccess("lastVisibleIndex"),super.lastVisibleIndex=t}updateViewportBoundaries(){this._warnPrivateAPIAccess("updateViewportBoundaries"),super.updateViewportBoundaries.apply(this,arguments)}_resizeHandler(){super._resizeHandler(),ci()}};var jce=e=>class extends e{static get observers(){return["_a11yUpdateGridSize(size, _columnTree, _columnTree.*)"]}_a11yGetHeaderRowCount(r){return r.filter(n=>n.some(i=>i._headerTemplate||i.headerRenderer||i.path||i.header)).length}_a11yGetFooterRowCount(r){return r.filter(n=>n.some(i=>i._headerTemplate||i.headerRenderer)).length}_a11yUpdateGridSize(r,n){if(r===void 0||n===void 0)return;let i=n[n.length-1];this.$.table.setAttribute("aria-rowcount",r+this._a11yGetHeaderRowCount(n)+this._a11yGetFooterRowCount(n)),this.$.table.setAttribute("aria-colcount",i&&i.length||0),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows()}_a11yUpdateHeaderRows(){Array.from(this.$.header.children).forEach((r,n)=>r.setAttribute("aria-rowindex",n+1))}_a11yUpdateFooterRows(){Array.from(this.$.footer.children).forEach((r,n)=>r.setAttribute("aria-rowindex",this._a11yGetHeaderRowCount(this._columnTree)+this.size+n+1))}_a11yUpdateRowRowindex(r,n){r.setAttribute("aria-rowindex",n+this._a11yGetHeaderRowCount(this._columnTree)+1)}_a11yUpdateRowSelected(r,n){r.setAttribute("aria-selected",Boolean(n)),Array.from(r.children).forEach(i=>i.setAttribute("aria-selected",Boolean(n)))}_a11yUpdateRowLevel(r,n){r.setAttribute("aria-level",n+1)}_a11yUpdateRowDetailsOpened(r,n){Array.from(r.children).forEach(i=>{typeof n=="boolean"?i.setAttribute("aria-expanded",n):i.hasAttribute("aria-expanded")&&i.removeAttribute("aria-expanded")})}_a11ySetRowDetailsCell(r,n){Array.from(r.children).forEach(i=>{i!==n&&i.setAttribute("aria-controls",n.id)})}_a11yUpdateCellColspan(r,n){r.setAttribute("aria-colspan",Number(n))}_a11yUpdateSorters(){Array.from(this.querySelectorAll("vaadin-grid-sorter")).forEach(r=>{let n=r.parentNode;for(;n&&n.localName!=="vaadin-grid-cell-content";)n=n.parentNode;n&&n.assignedSlot&&n.assignedSlot.parentNode.setAttribute("aria-sort",{asc:"ascending",desc:"descending"}[String(r.direction)]||"none")})}};var Xce=e=>class extends e{static get properties(){return{activeItem:{type:Object,notify:!0,value:null}}}ready(){super.ready(),this.$.scroller.addEventListener("click",this._onClick.bind(this)),this.addEventListener("cell-activate",this._activateItem.bind(this))}_activateItem(r){let n=r.detail.model,i=n?n.item:null;i&&(this.activeItem=this._itemsEqual(this.activeItem,i)?null:i)}_onClick(r){if(r.defaultPrevented)return;let n=r.composedPath(),i=n[n.indexOf(this.$.table)-3];if(!i||i.getAttribute("part").indexOf("details-cell")>-1)return;let o=i._content,a=this.getRootNode().activeElement;!o.contains(a)&&!this._isFocusable(r.target)&&this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(i.parentElement)}}))}_isFocusable(r){return lhr(r)}},lhr=e=>{if(!e.parentNode)return!1;let r=Array.from(e.parentNode.querySelectorAll("[tabindex], button, input, select, textarea, object, iframe, label, a[href], area[href]")).filter(n=>n.getAttribute("part")!=="cell body-cell").indexOf(e)!==-1;return!e.disabled&&r};var $ce=e=>class extends e{static get properties(){return{items:Array}}static get observers(){return["_itemsChanged(items, items.*, isAttached)"]}_itemsChanged(r,n,i){if(!!i){if(!Array.isArray(r)){r==null&&(this.size=0),this.dataProvider===this._arrayDataProvider&&(this.dataProvider=void 0);return}this.size=r.length,this.dataProvider=this.dataProvider||this._arrayDataProvider,this.clearCache(),this._ensureFirstPageLoaded()}}_arrayDataProvider(r,n){let i=(Array.isArray(this.items)?this.items:[]).slice(0);this._filters&&this._checkPaths(this._filters,"filtering",i)&&(i=this._filter(i)),this.size=i.length,r.sortOrders.length&&this._checkPaths(this._sorters,"sorting",i)&&(i=i.sort(this._multiSort.bind(this)));let o=r.page*r.pageSize,a=o+r.pageSize,s=i.slice(o,a);n(s,i.length)}_checkPaths(r,n,i){if(!i.length)return!1;let o=!0;for(let a in r){let s=r[a].path;if(!s||s.indexOf(".")===-1)continue;let l=s.replace(/\.[^.]*$/,"");Da.get(l,i[0])===void 0&&(console.warn(`Path "${s}" used for ${n} does not exist in all of the items, ${n} is disabled.`),o=!1)}return o}_multiSort(r,n){return this._sorters.map(i=>i.direction==="asc"?this._compare(Da.get(i.path,r),Da.get(i.path,n)):i.direction==="desc"?this._compare(Da.get(i.path,n),Da.get(i.path,r)):0).reduce((i,o)=>i||o,0)}_normalizeEmptyValue(r){return[void 0,null].indexOf(r)>=0?"":isNaN(r)?r.toString():r}_compare(r,n){return r=this._normalizeEmptyValue(r),n=this._normalizeEmptyValue(n),r<n?-1:r>n?1:0}_filter(r){return r.filter(n=>this._filters.filter(i=>{let o=this._normalizeEmptyValue(Da.get(i.path,n)),a=this._normalizeEmptyValue(i.value).toString().toLowerCase();return o.toString().toLowerCase().indexOf(a)===-1}).length===0)}};var Kce=e=>class extends yh(e){ready(){super.ready();let r=this.$.scroller;Em(r,"track",this._onHeaderTrack.bind(this)),r.addEventListener("touchmove",n=>r.hasAttribute("column-resizing")&&n.preventDefault()),r.addEventListener("contextmenu",n=>n.target.getAttribute("part")=="resize-handle"&&n.preventDefault()),r.addEventListener("mousedown",n=>n.target.getAttribute("part")==="resize-handle"&&n.preventDefault())}_onHeaderTrack(r){let n=r.target;if(n.getAttribute("part")==="resize-handle"){let o=n.parentElement._column;for(this._toggleAttribute("column-resizing",!0,this.$.scroller);o.localName==="vaadin-grid-column-group";)o=Array.prototype.slice.call(o._childColumns,0).sort(function(l,c){return l._order-c._order}).filter(function(l){return!l.hidden}).pop();let a=Array.from(this.$.header.querySelectorAll('[part~="row"]:last-child [part~="cell"]')),s=a.filter(l=>l._column===o)[0];if(s.offsetWidth){let l=window.getComputedStyle(s),c=10+parseInt(l.paddingLeft)+parseInt(l.paddingRight)+parseInt(l.borderLeftWidth)+parseInt(l.borderRightWidth)+parseInt(l.marginLeft)+parseInt(l.marginRight),u=s.offsetWidth+(this.__isRTL?s.getBoundingClientRect().left-r.detail.x:r.detail.x-s.getBoundingClientRect().right);o.width=Math.max(c,u)+"px",o.flexGrow=0}a.sort(function(l,c){return l._column._order-c._column._order}).forEach(function(l,c,u){c<u.indexOf(s)&&(l._column.width=l.offsetWidth+"px",l._column.flexGrow=0)}),r.detail.state==="end"&&(this._toggleAttribute("column-resizing",!1,this.$.scroller),this.dispatchEvent(new CustomEvent("column-resize",{detail:{resizedColumn:o}}))),this._resizeHandler()}}};var Zce=class Jce{constructor(t,r,n){this.grid=t,this.parentCache=r,this.parentItem=n,this.itemCaches={},this.items={},this.effectiveSize=0,this.size=0,this.pendingRequests={}}isLoading(){return Boolean(Object.keys(this.pendingRequests).length||Object.keys(this.itemCaches).filter(t=>this.itemCaches[t].isLoading())[0])}getItemForIndex(t){let{cache:r,scaledIndex:n}=this.getCacheAndIndex(t);return r.items[n]}updateSize(){this.effectiveSize=!this.parentItem||this.grid._isExpanded(this.parentItem)?this.size+Object.keys(this.itemCaches).reduce((t,r)=>{let n=this.itemCaches[r];return n.updateSize(),t+n.effectiveSize},0):0}ensureSubCacheForScaledIndex(t){if(!this.itemCaches[t]){let r=new Jce(this.grid,this,this.items[t]);this.itemCaches[t]=r,this.grid._loadPage(0,r)}}getCacheAndIndex(t){let r=t,n=Object.keys(this.itemCaches);for(let i=0;i<n.length;i++){let o=Number(n[i]),a=this.itemCaches[o];if(r<=o)return{cache:this,scaledIndex:r};if(r<=o+a.effectiveSize)return a.getCacheAndIndex(r-o-1);r-=a.effectiveSize}return{cache:this,scaledIndex:r}}},Qce=e=>class extends e{static get properties(){return{pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object,notify:!0,observer:"_dataProviderChanged"},loading:{type:Boolean,notify:!0,readOnly:!0,reflectToAttribute:!0},_cache:{type:Object,value:function(){return new Zce(this)}},itemIdPath:{type:String,value:null},expandedItems:{type:Object,notify:!0,value:()=>[]}}}static get observers(){return["_sizeChanged(size)","_itemIdPathChanged(itemIdPath)","_expandedItemsChanged(expandedItems.*)"]}_sizeChanged(r){let n=r-this._cache.size;this._cache.size+=n,this._cache.effectiveSize+=n,this._effectiveSize=this._cache.effectiveSize,this._increasePoolIfNeeded(0),this._debounceIncreasePool&&this._debounceIncreasePool.flush()}_getItem(r,n){if(r>=this._effectiveSize)return;n.index=r;let{cache:i,scaledIndex:o}=this._cache.getCacheAndIndex(r),a=i.items[o];a?(this._toggleAttribute("loading",!1,n),this._updateItem(n,a),this._isExpanded(a)&&i.ensureSubCacheForScaledIndex(o)):(this._toggleAttribute("loading",!0,n),this._loadPage(this._getPageForIndex(o),i))}_expandedInstanceChangedCallback(r,n){r.item!==void 0&&(n?this.expandItem(r.item):this.collapseItem(r.item))}getItemId(r){return this.itemIdPath?this.get(this.itemIdPath,r):r}_isExpanded(r){return this.__expandedKeys.has(this.getItemId(r))}_expandedItemsChanged(){this.__cacheExpandedKeys(),this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,this._assignModels()}_itemIdPathChanged(){this.__cacheExpandedKeys()}__cacheExpandedKeys(){this.expandedItems&&(this.__expandedKeys=new Set,this.expandedItems.forEach(r=>{this.__expandedKeys.add(this.getItemId(r))}))}expandItem(r){this._isExpanded(r)||(this.expandedItems=[...this.expandedItems,r])}collapseItem(r){this._isExpanded(r)&&(this.expandedItems=this.expandedItems.filter(n=>!this._itemsEqual(n,r)))}_getIndexLevel(r){let{cache:n}=this._cache.getCacheAndIndex(r),i=0;for(;n.parentCache;)n=n.parentCache,i++;return i}_canPopulate(){return Boolean(this._hasData&&this._columnTree)}_loadPage(r,n){if(!n.pendingRequests[r]&&this.dataProvider){this._setLoading(!0),n.pendingRequests[r]=!0;let i={page:r,pageSize:this.pageSize,sortOrders:this._mapSorters(),filters:this._mapFilters(),parentItem:n.parentItem};this._debounceIncreasePool&&this._debounceIncreasePool.flush(),this.dataProvider(i,(o,a)=>{a!==void 0?n.size=a:i.parentItem&&(n.size=o.length);let s=Array.from(this.$.items.children).map(l=>l._item);o.forEach((l,c)=>{let u=r*this.pageSize+c;n.items[u]=l,this._isExpanded(l)&&s.indexOf(l)>-1&&n.ensureSubCacheForScaledIndex(u)}),this._hasData=!0,delete n.pendingRequests[r],this._debouncerApplyCachedData=sr.debounce(this._debouncerApplyCachedData,mo.after(0),()=>{this._setLoading(!1),this._cache.updateSize(),this._effectiveSize=this._cache.effectiveSize,Array.from(this.$.items.children).filter(l=>!l.hidden).forEach(l=>{this._cache.getItemForIndex(l.index)&&this._getItem(l.index,l)}),this._increasePoolIfNeeded(0),this.__scrollToPendingIndex()}),this._cache.isLoading()||this._debouncerApplyCachedData.flush(),this.__itemsReceived()})}}_getPageForIndex(r){return Math.floor(r/this.pageSize)}clearCache(){this._cache=new Zce(this),Array.from(this.$.items.children).forEach(r=>{Array.from(r.children).forEach(n=>{n._instance&&n._instance._setPendingProperty("item",{},!1)})}),this._cache.size=this.size||0,this._cache.updateSize(),this._hasData=!1,this._assignModels(),(!this._effectiveSize||!this._initialPoolCreated)&&this._loadPage(0,this._cache)}_pageSizeChanged(r,n){n!==void 0&&r!==n&&this.clearCache()}_checkSize(){this.size===void 0&&this._effectiveSize===0&&console.warn("The <vaadin-grid> needs the total number of items in order to display rows. Set the total number of items to the `size` property, or provide the total number of items in the second argument of the `dataProvider`\u2019s `callback` call.")}_dataProviderChanged(r,n){n!==void 0&&this.clearCache(),r&&this.items&&this.items.length&&this._scrollToIndex(this._firstVisibleIndex),this._ensureFirstPageLoaded(),this._debouncerCheckSize=sr.debounce(this._debouncerCheckSize,mo.after(2e3),this._checkSize.bind(this)),this._scrollHandler()}_ensureFirstPageLoaded(){this._hasData||this._loadPage(0,this._cache)}_itemsEqual(r,n){return this.getItemId(r)===this.getItemId(n)}_getItemIndexInArray(r,n){let i=-1;return n.forEach((o,a)=>{this._itemsEqual(o,r)&&(i=a)}),i}scrollToIndex(r){super.scrollToIndex(r),!isNaN(r)&&(this._cache.isLoading()||!this.clientHeight)&&(this.__pendingScrollToIndex=r)}__scrollToPendingIndex(){if(this.__pendingScrollToIndex&&this.$.items.children.length){let r=this.__pendingScrollToIndex;delete this.__pendingScrollToIndex,this._debounceIncreasePool&&this._debounceIncreasePool.flush(),this.scrollToIndex(r)}}};var tue=e=>class extends e{ready(){super.ready(),this._addNodeObserver()}_hasColumnGroups(r){for(let n=0;n<r.length;n++)if(r[n].localName==="vaadin-grid-column-group")return!0;return!1}_getChildColumns(r){return vh.getFlattenedNodes(r).filter(this._isColumnElement)}_flattenColumnGroups(r){return r.map(n=>n.localName==="vaadin-grid-column-group"?this._getChildColumns(n):[n]).reduce((n,i)=>n.concat(i),[])}_getColumnTree(){let r=vh.getFlattenedNodes(this).filter(this._isColumnElement),n=[];for(let i=r;n.push(i),!!this._hasColumnGroups(i);)i=this._flattenColumnGroups(i);return n}_updateColumnTree(){let r=this._getColumnTree();this._arrayEquals(r,this._columnTree)||(this._columnTree=r)}_addNodeObserver(){this._observer=new vh(this,r=>{let n=r.addedNodes.filter(o=>o.localName==="template"&&o.classList.contains("row-details"))[0];n&&this._rowDetailsTemplate!==n&&(this._rowDetailsTemplate=n);let i=o=>o.filter(this._isColumnElement).length>0;if(i(r.addedNodes)||i(r.removedNodes)){let o=r.removedNodes.flatMap(s=>s._allCells),a=s=>o.filter(l=>l._content.contains(s)).length;this.__removeSorters(this._sorters.filter(a)),this.__removeFilters(this._filters.filter(a)),this._updateColumnTree()}this._debouncerCheckImports=sr.debounce(this._debouncerCheckImports,mo.after(2e3),this._checkImports.bind(this)),this._ensureFirstPageLoaded()})}_arrayEquals(r,n){if(!r||!n||r.length!=n.length)return!1;for(let i=0,o=r.length;i<o;i++)if(r[i]instanceof Array&&n[i]instanceof Array){if(!this._arrayEquals(r[i],n[i]))return!1}else if(r[i]!=n[i])return!1;return!0}_checkImports(){["vaadin-grid-column-group","vaadin-grid-filter","vaadin-grid-filter-column","vaadin-grid-tree-toggle","vaadin-grid-selection-column","vaadin-grid-sort-column","vaadin-grid-sorter"].forEach(r=>{let n=this.querySelector(r);n&&!(n instanceof mt)&&console.warn(`Make sure you have imported the required module for <${r}> element.`)})}_updateFirstAndLastColumn(){Array.from(this.shadowRoot.querySelectorAll("tr")).forEach(r=>this._updateFirstAndLastColumnForRow(r))}_updateFirstAndLastColumnForRow(r){Array.from(r.querySelectorAll('[part~="cell"]:not([part~="details-cell"])')).sort((n,i)=>n._column._order-i._column._order).forEach((n,i,o)=>{this._toggleAttribute("first-column",i===0,n),this._toggleAttribute("last-column",i===o.length-1,n)})}_isColumnElement(r){return r.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/.test(r.localName)}};var eue=e=>class extends e{getEventContext(r){let n={},i=r.composedPath(),o=i[i.indexOf(this.$.table)-3];return o&&(n.section=["body","header","footer","details"].filter(a=>o.getAttribute("part").indexOf(a)>-1)[0],o._column&&(n.column=o._column),(n.section==="body"||n.section==="details")&&Object.assign(n,this.__getRowModel(o.parentElement))),n}};var rue=e=>class extends e{static get properties(){return{_filters:{type:Array,value:function(){return[]}}}}ready(){super.ready(),this.addEventListener("filter-changed",this._filterChanged.bind(this))}_filterChanged(r){r.stopPropagation(),this.__addFilter(r.target),this.__applyFilters()}__removeFilters(r){r.length!=0&&(this._filters=this._filters.filter(n=>r.indexOf(n)<0),this.__applyFilters())}__addFilter(r){this._filters.indexOf(r)===-1&&this._filters.push(r)}__applyFilters(){this.dataProvider&&this.isAttached&&this.clearCache()}_mapFilters(){return this._filters.map(r=>({path:r.path,value:r.value}))}};var T0=class extends mt{static get is(){return"vaadin-grid-templatizer"}static get properties(){return{dataHost:Object,template:Object,_templateInstances:{type:Array,value:function(){return[]}},_parentPathValues:{value:function(){return{}}},_grid:Object}}static get observers(){return["_templateInstancesChanged(_templateInstances.*, _parentPathValues.*)"]}constructor(){super(),this._instanceProps={detailsOpened:!0,index:!0,item:!0,selected:!0,expanded:!0,level:!0}}createInstance(){this._ensureTemplatized();let t=new this._TemplateClass({});return this.addInstance(t),t}addInstance(t){this._templateInstances.indexOf(t)===-1&&(this._templateInstances.push(t),requestAnimationFrame(()=>this.notifyPath("_templateInstances.*",this._templateInstances)))}removeInstance(t){let r=this._templateInstances.indexOf(t);this.splice("_templateInstances",r,1)}_ensureTemplatized(){this._TemplateClass||(this._TemplateClass=tc(this.template,this,{instanceProps:this._instanceProps,parentModel:!0,forwardHostProp:function(t,r){this._forwardParentProp(t,r),this._templateInstances&&this._templateInstances.forEach(n=>n.notifyPath(t,r))},notifyInstanceProp:function(t,r,n){if(r==="index"||r==="item")return;let i=`__${r}__`;if(t[i]===n)return;t[i]=n;let o=Array.from(this._grid.$.items.children).filter(l=>this._grid._itemsEqual(l._item,t.item))[0];o&&Array.from(o.children).forEach(l=>{l._instance&&(l._instance[i]=n,l._instance.notifyPath(r,n))});let a="item.";if(Array.isArray(this._grid.items)&&r.indexOf(a)===0){let l=this._grid.items.indexOf(t.item),c=r.slice(a.length);this._grid.notifyPath(`items.${l}.${c}`,n)}let s=`_${r}InstanceChangedCallback`;this._grid&&this._grid[s]&&this._grid[s](t,n)}}))}_forwardParentProp(t,r){this._parentPathValues[t]=r,this._templateInstances.forEach(n=>n.notifyPath(t,r))}_templateInstancesChanged(t){let r,n;if(t.path==="_templateInstances")r=0,n=this._templateInstances.length;else if(t.path==="_templateInstances.splices")r=t.value.index,n=t.value.addedCount;else return;Object.keys(this._parentPathValues||{}).forEach(i=>{for(let o=r;o<r+n;o++)this._templateInstances[o].set(i,this._parentPathValues[i])})}};customElements.define(T0.is,T0);var nue=e=>class extends e{static get properties(){return{detailsOpenedItems:{type:Array,value:function(){return[]}},_rowDetailsTemplate:Object,rowDetailsRenderer:Function,_detailsCells:{type:Array}}}static get observers(){return["_detailsOpenedItemsChanged(detailsOpenedItems.*, _rowDetailsTemplate, rowDetailsRenderer)","_rowDetailsTemplateOrRendererChanged(_rowDetailsTemplate, rowDetailsRenderer)"]}_rowDetailsTemplateOrRendererChanged(r,n){if(r&&n)throw new Error("You should only use either a renderer or a template for row details");if(r||n){if(r&&!r.templatizer){let i=new T0;i._grid=this,i.dataHost=this.dataHost,i.template=r,r.templatizer=i}this._columnTree&&Array.from(this.$.items.children).forEach(i=>{i.querySelector("[part~=details-cell]")||(this._updateRow(i,this._columnTree[this._columnTree.length-1]),this._a11yUpdateRowDetailsOpened(i,!1)),delete i.querySelector("[part~=details-cell]")._instance}),this.detailsOpenedItems.length&&(Array.from(this.$.items.children).forEach(this._toggleDetailsCell,this),this._update())}}_detailsOpenedItemsChanged(r){r.path==="detailsOpenedItems.length"||!r.value||Array.from(this.$.items.children).forEach(n=>{this._toggleDetailsCell(n,n._item),this._a11yUpdateRowDetailsOpened(n,this._isDetailsOpened(n._item)),this._toggleAttribute("details-opened",this._isDetailsOpened(n._item),n)})}_configureDetailsCell(r){r.setAttribute("part","cell details-cell"),this._toggleAttribute("frozen",!0,r)}_toggleDetailsCell(r,n){let i=r.querySelector('[part~="details-cell"]');if(!i)return;let o=!this._isDetailsOpened(n),a=!!i.hidden!==o;(!i._instance&&!i._renderer||i.hidden!==o)&&(i.hidden=o,o?r.style.removeProperty("padding-bottom"):(this.rowDetailsRenderer?(i._renderer=this.rowDetailsRenderer,i._renderer.call(this,i._content,this,{index:r.index,item:n})):this._rowDetailsTemplate&&!i._instance&&(i._instance=this._rowDetailsTemplate.templatizer.createInstance(),i._content.innerHTML="",i._content.appendChild(i._instance.root),this._updateItem(r,n)),ci(),r.style.setProperty("padding-bottom",`${i.offsetHeight}px`),requestAnimationFrame(()=>this.notifyResize()))),a&&(this._updateMetrics(),this._positionItems())}_updateDetailsCellHeights(){Array.from(this.$.items.querySelectorAll('[part~="details-cell"]:not([hidden])')).forEach(r=>{r.parentElement.style.setProperty("padding-bottom",`${r.offsetHeight}px`)})}_isDetailsOpened(r){return this.detailsOpenedItems&&this._getItemIndexInArray(r,this.detailsOpenedItems)!==-1}openItemDetails(r){this._isDetailsOpened(r)||(this.detailsOpenedItems=[...this.detailsOpenedItems,r])}closeItemDetails(r){this._isDetailsOpened(r)&&(this.detailsOpenedItems=this.detailsOpenedItems.filter(n=>!this._itemsEqual(n,r)))}_detailsOpenedInstanceChangedCallback(r,n){n?this.openItemDetails(r.item):this.closeItemDetails(r.item)}};var zct={SCROLLING:500,IGNORE_WHEEL:500},iue=e=>class extends e{static get properties(){return{_frozenCells:{type:Array,value:()=>[]},_rowWithFocusedElement:Element,_deltaYAcc:{type:Number,value:0},_useSticky:{type:Boolean,value:window.CSS&&window.CSS.supports&&(window.CSS.supports("position","sticky")||window.CSS.supports("position","-webkit-sticky"))}}}static get observers(){return["_scrollViewportHeightUpdated(_viewportHeight)"]}set _scrollTop(r){this.$.table.scrollTop=r}get _scrollTop(){return this.$.table.scrollTop}constructor(){super(),this._scrollLineHeight=this._getScrollLineHeight()}_getScrollLineHeight(){let r=document.createElement("div");r.style.fontSize="initial",r.style.display="none",document.body.appendChild(r);let n=window.getComputedStyle(r).fontSize;return document.body.removeChild(r),n?window.parseInt(n):void 0}_scrollViewportHeightUpdated(r){this._scrollPageHeight=r-this.$.header.clientHeight-this.$.footer.clientHeight-this._scrollLineHeight}ready(){super.ready(),this.$.outerscroller=document.createElement("div"),this.scrollTarget=this.$.table,this.addEventListener("wheel",this._onWheel),this.$.items.addEventListener("focusin",r=>{let n=r.composedPath().indexOf(this.$.items);this._rowWithFocusedElement=r.composedPath()[n-1]}),this.$.items.addEventListener("focusout",()=>this._rowWithFocusedElement=void 0),this.scrollTarget.addEventListener("mousedown",()=>this.__mouseDown=!0),this.scrollTarget.addEventListener("mouseup",()=>{this.__mouseDown=!1,this.__pendingReorder&&(this.__pendingReorder=!1,setTimeout(()=>this._reorderRows(),zct.SCROLLING))})}scrollToIndex(r){this._accessIronListAPI(()=>super.scrollToIndex(r))}_onWheel(r){if(r.ctrlKey||this._hasScrolledAncestor(r.target,r.deltaX,r.deltaY))return;let n=this.$.table,i=r.deltaY;if(r.deltaMode===WheelEvent.DOM_DELTA_LINE?i*=this._scrollLineHeight:r.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(i*=this._scrollPageHeight),this._wheelAnimationFrame){this._deltaYAcc+=i,r.preventDefault();return}i+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this._debouncerWheelAnimationFrame=sr.debounce(this._debouncerWheelAnimationFrame,Ni,()=>this._wheelAnimationFrame=!1);let o=Math.abs(r.deltaX)+Math.abs(i);this._canScroll(n,r.deltaX,i)?(r.preventDefault(),n.scrollTop+=i,n.scrollLeft+=r.deltaX,this._scrollHandler(),this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=sr.debounce(this._debouncerIgnoreNewWheel,mo.after(zct.IGNORE_WHEEL),()=>this._ignoreNewWheel=!1)):this._hasResidualMomentum&&o<=this._previousMomentum||this._ignoreNewWheel?r.preventDefault():o>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=o}_hasScrolledAncestor(r,n,i){if(r.localName==="vaadin-grid-cell-content")return!1;if(this._canScroll(r,n,i)&&["auto","scroll"].indexOf(getComputedStyle(r).overflow)!==-1)return!0;if(r!==this&&r.parentElement)return this._hasScrolledAncestor(r.parentElement,n,i)}_canScroll(r,n,i){return i>0&&r.scrollTop<r.scrollHeight-r.offsetHeight||i<0&&r.scrollTop>0||n>0&&r.scrollLeft<r.scrollWidth-r.offsetWidth||n<0&&r.scrollLeft>0}_scheduleScrolling(){this._scrollingFrame||(this._scrollingFrame=requestAnimationFrame(()=>this._toggleAttribute("scrolling",!0,this.$.scroller))),this._debounceScrolling=sr.debounce(this._debounceScrolling,mo.after(zct.SCROLLING),()=>{cancelAnimationFrame(this._scrollingFrame),delete this._scrollingFrame,this._toggleAttribute("scrolling",!1,this.$.scroller),this._reorderRows()})}_afterScroll(){this._translateStationaryElements(),this.hasAttribute("reordering")||this._scheduleScrolling(),this._updateOverflow()}_updateOverflow(){let r="",n=this.$.table;n.scrollTop<n.scrollHeight-n.clientHeight&&(r+=" bottom"),n.scrollTop>0&&(r+=" top"),n.scrollLeft<n.scrollWidth-n.clientWidth&&(r+=" right"),n.scrollLeft>0&&(r+=" left"),this._debounceOverflow=sr.debounce(this._debounceOverflow,Ni,()=>{let i=r.trim();i.length>0&&this.getAttribute("overflow")!==i?this.setAttribute("overflow",i):i.length==0&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")})}_reorderRows(){if(this.__mouseDown){this.__pendingReorder=!0;return}let r=this.$.items,n=r.querySelectorAll("tr");if(!n.length)return;let i=this._virtualStart+this._vidxOffset,o=this._rowWithFocusedElement||Array.from(n).filter(l=>!l.hidden)[0];if(!o)return;let a=o.index-i,s=Array.from(n).indexOf(o)-a;if(s>0)for(let l=0;l<s;l++)r.appendChild(n[l]);else if(s<0)for(let l=n.length+s;l<n.length;l++)r.insertBefore(n[l],n[0]);if(this._safari){let{transform:l}=this.$.header.style;this.$.header.style.transform="",setTimeout(()=>this.$.header.style.transform=l)}}_frozenCellsChanged(){this._debouncerCacheElements=sr.debounce(this._debouncerCacheElements,li,()=>{Array.from(this.shadowRoot.querySelectorAll('[part~="cell"]')).forEach(function(r){r.style.transform=""}),this._frozenCells=Array.prototype.slice.call(this.$.table.querySelectorAll("[frozen]")),this._updateScrollerMeasurements(),this._translateStationaryElements()}),this._updateLastFrozen()}_updateScrollerMeasurements(){this._frozenCells.length>0&&this.__isRTL&&(this.__scrollerMetrics={scrollWidth:this.$.table.scrollWidth,clientWidth:this.$.table.clientWidth})}_updateLastFrozen(){if(!this._columnTree)return;let r=this._columnTree[this._columnTree.length-1].slice(0);r.sort((i,o)=>i._order-o._order);let n=r.reduce((i,o,a)=>(o._lastFrozen=!1,o.frozen&&!o.hidden?a:i),void 0);n!==void 0&&(r[n]._lastFrozen=!0)}_translateStationaryElements(){let r=Math.max(0,this._scrollLeft),n=Math.max(0,this._scrollTop),i=0,o=0,a=0;if(this._useSticky||(i=r,o=n,a=this.$.table.clientHeight-this.$.footer.offsetHeight-this.$.footer.offsetTop),this.$.header.style.transform=this._getTranslate(-r+i,o),this.$.footer.style.transform=this._getTranslate(-r+i,o+a),this.$.items.style.transform=this._getTranslate(-r+i,0),this._frozenCells.length>0){let s=this.__isRTL?this.__getNormalizedScrollLeft(this.$.table)+this.__scrollerMetrics.clientWidth-this.__scrollerMetrics.scrollWidth:this._scrollLeft,l=this._getTranslate(s,0);for(let c=0;c<this._frozenCells.length;c++)this._frozenCells[c].style.transform=l}}_getTranslate(r,n){return`translate(${r}px, ${n}px)`}};var oue=e=>class extends e{static get properties(){return{selectedItems:{type:Object,notify:!0,value:()=>[]}}}static get observers(){return["_selectedItemsChanged(selectedItems.*)"]}_isSelected(r){return this.selectedItems&&this._getItemIndexInArray(r,this.selectedItems)>-1}selectItem(r){this._isSelected(r)||(this.selectedItems=[...this.selectedItems,r])}deselectItem(r){this._isSelected(r)&&(this.selectedItems=this.selectedItems.filter(n=>!this._itemsEqual(n,r)))}_toggleItem(r){this._getItemIndexInArray(r,this.selectedItems)===-1?this.selectItem(r):this.deselectItem(r)}_selectedItemsChanged(r){this.$.items.children.length&&(r.path==="selectedItems"||r.path==="selectedItems.splices")&&Array.from(this.$.items.children).forEach(n=>{this._updateItem(n,n._item)})}_selectedInstanceChangedCallback(r,n){n?this.selectItem(r.item):this.deselectItem(r.item)}};var aue=e=>class extends e{static get properties(){return{multiSort:{type:Boolean,value:!1},_sorters:{type:Array,value:function(){return[]}},_previousSorters:{type:Array,value:function(){return[]}}}}ready(){super.ready(),this.addEventListener("sorter-changed",this._onSorterChanged)}_onSorterChanged(r){let n=r.target;r.stopPropagation(),this.__updateSorter(n),this.__applySorters()}__removeSorters(r){r.length!=0&&(this._sorters=this._sorters.filter(n=>r.indexOf(n)<0),this.multiSort&&this.__updateSortOrders(),this.__applySorters())}__updateSortOrders(){this._sorters.forEach((r,n)=>r._order=this._sorters.length>1?n:null,this)}__updateSorter(r){if(!(!r.direction&&this._sorters.indexOf(r)===-1)){if(r._order=null,this.multiSort)this._removeArrayItem(this._sorters,r),r.direction&&this._sorters.unshift(r),this.__updateSortOrders();else if(r.direction){let n=this._sorters.filter(i=>i!=r);this._sorters=[r],n.forEach(i=>{i._order=null,i.direction=null})}}}__applySorters(){this.dataProvider&&this.isAttached&&JSON.stringify(this._previousSorters)!==JSON.stringify(this._mapSorters())&&this.clearCache(),this._a11yUpdateSorters(),this._previousSorters=this._mapSorters()}_mapSorters(){return this._sorters.map(r=>({path:r.path,direction:r.direction}))}_removeArrayItem(r,n){let i=r.indexOf(n);i>-1&&r.splice(i,1)}};var sue=e=>class extends e{static get properties(){return{cellClassNameGenerator:Function}}static get observers(){return["__cellClassNameGeneratorChanged(cellClassNameGenerator)"]}__cellClassNameGeneratorChanged(){this.generateCellClassNames()}generateCellClassNames(){Array.from(this.$.items.children).filter(r=>!r.hidden).forEach(r=>this._generateCellClassNames(r,this.__getRowModel(r)))}_generateCellClassNames(r,n){Array.from(r.children).forEach(i=>{if(i.__generatedClasses&&i.__generatedClasses.forEach(o=>i.classList.remove(o)),this.cellClassNameGenerator){let o=this.cellClassNameGenerator(i._column,n);i.__generatedClasses=o&&o.split(" ").filter(a=>a.length>0),i.__generatedClasses&&i.__generatedClasses.forEach(a=>i.classList.add(a))}})}};var TP={BETWEEN:"between",ON_TOP:"on-top",ON_TOP_OR_BETWEEN:"on-top-or-between",ON_GRID:"on-grid"},C0={ON_TOP:"on-top",ABOVE:"above",BELOW:"below",EMPTY:"empty"},lue=e=>class extends e{static get properties(){return{dropMode:String,rowsDraggable:Boolean,dragFilter:Function,dropFilter:Function,__dndAutoScrollThreshold:{value:50}}}static get observers(){return["_dragDropAccessChanged(rowsDraggable, dropMode, dragFilter, dropFilter)"]}ready(){super.ready(),this.$.table.addEventListener("dragstart",this._onDragStart.bind(this)),this.$.table.addEventListener("dragend",this._onDragEnd.bind(this)),this.$.table.addEventListener("dragover",this._onDragOver.bind(this)),this.$.table.addEventListener("dragleave",this._onDragLeave.bind(this)),this.$.table.addEventListener("drop",this._onDrop.bind(this)),this.$.table.addEventListener("dragenter",r=>{this.dropMode&&(r.preventDefault(),r.stopPropagation())})}_onDragStart(r){if(this.rowsDraggable){let n=r.target;if(n.localName==="vaadin-grid-cell-content"&&(n=n.assignedSlot.parentNode.parentNode),n.parentNode!==this.$.items)return;if(r.stopPropagation(),this._toggleAttribute("dragging-rows",!0,this),this._safari){let s=n.style.transform;n.style.top=/translateY\((.*)\)/.exec(s)[1],n.style.transform="none",requestAnimationFrame(()=>{n.style.top="",n.style.transform=s})}let i=n.getBoundingClientRect();this._ios?r.dataTransfer.setDragImage(n):r.dataTransfer.setDragImage(n,r.clientX-i.left,r.clientY-i.top);let o=[n];this._isSelected(n._item)&&(o=this.__getViewportRows().filter(s=>this._isSelected(s._item)).filter(s=>!this.dragFilter||this.dragFilter(this.__getRowModel(s)))),r.dataTransfer.setData("text",this.__formatDefaultTransferData(o)),n.setAttribute("dragstart",o.length>1?o.length:""),this.updateStyles({"--_grid-drag-start-x":`${r.clientX-i.left+20}px`,"--_grid-drag-start-y":`${r.clientY-i.top+10}px`}),requestAnimationFrame(()=>{n.removeAttribute("dragstart"),this.updateStyles({"--_grid-drag-start-x":"","--_grid-drag-start-y":""})});let a=new CustomEvent("grid-dragstart",{detail:{draggedItems:o.map(s=>s._item),setDragData:(s,l)=>r.dataTransfer.setData(s,l),setDraggedItemsCount:s=>n.setAttribute("dragstart",s)}});a.originalEvent=r,this.dispatchEvent(a)}}_onDragEnd(r){this._toggleAttribute("dragging-rows",!1,this),r.stopPropagation();let n=new CustomEvent("grid-dragend");n.originalEvent=r,this.dispatchEvent(n)}_onDragLeave(r){r.stopPropagation(),this._clearDragStyles()}_onDragOver(r){if(this.dropMode){if(this._dropLocation=void 0,this._dragOverItem=void 0,this.__dndAutoScroll(r.clientY)){this._clearDragStyles();return}let n=r.composedPath().filter(i=>i.localName==="tr")[0];if(!this._effectiveSize||this.dropMode===TP.ON_GRID)this._dropLocation=C0.EMPTY;else if(!n||n.parentNode!==this.$.items){if(n)return;if(this.dropMode===TP.BETWEEN||this.dropMode===TP.ON_TOP_OR_BETWEEN)n=Array.from(this.$.items.children).filter(i=>!i.hidden).pop(),this._dropLocation=C0.BELOW;else return}else{let i=n.getBoundingClientRect();if(this._dropLocation=C0.ON_TOP,this.dropMode===TP.BETWEEN){let o=r.clientY-i.top<i.bottom-r.clientY;this._dropLocation=o?C0.ABOVE:C0.BELOW}else this.dropMode===TP.ON_TOP_OR_BETWEEN&&(r.clientY-i.top<i.height/3?this._dropLocation=C0.ABOVE:r.clientY-i.top>i.height/3*2&&(this._dropLocation=C0.BELOW))}if(n&&n.hasAttribute("drop-disabled")){this._dropLocation=void 0;return}r.stopPropagation(),r.preventDefault(),this._dropLocation===C0.EMPTY?this._toggleAttribute("dragover",!0,this):n?(this._dragOverItem=n._item,n.getAttribute("dragover")!==this._dropLocation&&n.setAttribute("dragover",this._dropLocation)):this._clearDragStyles()}}__dndAutoScroll(r){if(this.__dndAutoScrolling)return!0;let n=this.$.header.getBoundingClientRect().bottom,i=this.$.footer.getBoundingClientRect().top,o=n-r+this.__dndAutoScrollThreshold,a=r-i+this.__dndAutoScrollThreshold,s=0;if(a>0?s=a*2:o>0&&(s=-o*2),s){let l=this.$.table.scrollTop;if(this.$.table.scrollTop+=s,l!==this.$.table.scrollTop)return this.__dndAutoScrolling=!0,setTimeout(()=>this.__dndAutoScrolling=!1,20),this._scrollHandler(),!0}}__getViewportRows(){let r=this.$.header.getBoundingClientRect().bottom,n=this.$.footer.getBoundingClientRect().top;return Array.from(this.$.items.children).filter(i=>{let o=i.getBoundingClientRect();return o.bottom>r&&o.top<n})}_clearDragStyles(){this.removeAttribute("dragover"),Array.from(this.$.items.children).forEach(r=>r.removeAttribute("dragover"))}_onDrop(r){if(this.dropMode){r.stopPropagation(),r.preventDefault();let n=r.dataTransfer.types&&Array.from(r.dataTransfer.types).map(o=>({type:o,data:r.dataTransfer.getData(o)}));this._clearDragStyles();let i=new CustomEvent("grid-drop",{bubbles:r.bubbles,cancelable:r.cancelable,detail:{dropTargetItem:this._dragOverItem,dropLocation:this._dropLocation,dragData:n}});i.originalEvent=r,this.dispatchEvent(i)}}__formatDefaultTransferData(r){return r.map(n=>Array.from(n.children).filter(i=>!i.hidden&&i.getAttribute("part").indexOf("details-cell")===-1).sort((i,o)=>i._column._order>o._column._order?1:-1).map(i=>i._content.textContent.trim()).filter(i=>i).join("	")).join(`
`)}_dragDropAccessChanged(){this.filterDragAndDrop()}filterDragAndDrop(){Array.from(this.$.items.children).filter(r=>!r.hidden).forEach(r=>{this._filterDragAndDrop(r,this.__getRowModel(r))})}_filterDragAndDrop(r,n){let i=!this.rowsDraggable||this.dragFilter&&!this.dragFilter(n),o=!this.dropMode||this.dropFilter&&!this.dropFilter(n);Array.from(r.children).map(s=>s._content).forEach(s=>{i?s.removeAttribute("draggable"):s.setAttribute("draggable",!0)}),this._toggleAttribute("drag-disabled",i,r),this._toggleAttribute("drop-disabled",o,r)}};var cue=e=>class extends e{static get properties(){return{_headerFocusable:{type:Object,observer:"_focusableChanged"},_itemsFocusable:{type:Object,observer:"_focusableChanged"},_footerFocusable:{type:Object,observer:"_focusableChanged"},_navigatingIsHidden:Boolean,_focusedItemIndex:{type:Number,value:0},_focusedColumnOrder:Number,interacting:{type:Boolean,value:!1,reflectToAttribute:!0,readOnly:!0,observer:"_interactingChanged"}}}ready(){super.ready(),!(this._ios||this._android)&&(this.addEventListener("keydown",this._onKeyDown),this.addEventListener("keyup",this._onKeyUp),this.addEventListener("focusin",this._onFocusIn),this.addEventListener("focusout",this._onFocusOut),this.$.table.addEventListener("focusin",this._onCellFocusIn.bind(this)),this.$.table.addEventListener("focusout",this._onCellFocusOut.bind(this)),this.addEventListener("mousedown",()=>{this._toggleAttribute("navigating",!1,this),this._isMousedown=!0}),this.addEventListener("mouseup",()=>this._isMousedown=!1))}_focusableChanged(r,n){n&&n.setAttribute("tabindex","-1"),r&&this._updateGridSectionFocusTarget(r)}_interactingChanged(){this._updateGridSectionFocusTarget(this._headerFocusable),this._updateGridSectionFocusTarget(this._itemsFocusable),this._updateGridSectionFocusTarget(this._footerFocusable)}_onKeyDown(r){let n=r.key,i;switch(n){case"ArrowUp":case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"PageUp":case"PageDown":case"Home":case"End":i="Navigation";break;case"Enter":case"Escape":case"F2":i="Interaction";break;case"Tab":i="Tab";break;case" ":i="Space";break}this._detectInteracting(r),this.interacting&&i!=="Interaction"&&(i=void 0),i&&this[`_on${i}KeyDown`](r,n)}_ensureScrolledToIndex(r){Array.from(this.$.items.children).filter(i=>i.index===r)[0]||this._scrollToIndex(r)}_onNavigationKeyDown(r,n){this._scrollHandler(),r.preventDefault();function i(B){return Array.prototype.indexOf.call(B.parentNode.children,B)}let o=this._lastVisibleIndex-this._firstVisibleIndex-1,a=0,s=0;switch(n){case"ArrowRight":a=this.__isRTL?-1:1;break;case"ArrowLeft":a=this.__isRTL?1:-1;break;case"Home":a=-1/0,r.ctrlKey&&(s=-1/0);break;case"End":a=1/0,r.ctrlKey&&(s=1/0);break;case"ArrowDown":s=1;break;case"ArrowUp":s=-1;break;case"PageDown":s=o;break;case"PageUp":s=-o;break}let l=r.composedPath()[0],c=i(l),u=this._elementMatches(l,'[part~="details-cell"]'),h=l.parentNode,f=h.parentNode,p=(f===this.$.items?this._effectiveSize:f.children.length)-1,d=f===this.$.items?this._focusedItemIndex!==void 0?this._focusedItemIndex:h.index:i(h),g=Math.max(0,Math.min(d+s,p)),_=!1;if(f===this.$.items){let B=h._item,I=this._cache.getItemForIndex(g);u?_=s===0:_=s===1&&this._isDetailsOpened(B)||s===-1&&g!==d&&this._isDetailsOpened(I),_!==u&&(s===1&&_||s===-1&&!_)&&(g=d)}if(f!==this.$.items){if(g>d)for(;g<p&&f.children[g].hidden;)g++;else if(g<d)for(;g>0&&f.children[g].hidden;)g--}this._focusedColumnOrder===void 0&&(u?this._focusedColumnOrder=0:this._focusedColumnOrder=this._getColumns(f,d).filter(B=>!B.hidden)[c]._order);let y=this._getColumns(f,g).filter(B=>!B.hidden),x=y.map(B=>B._order).sort((B,I)=>B-I),b=x.length-1,S=x.indexOf(x.slice(0).sort((B,I)=>Math.abs(B-this._focusedColumnOrder)-Math.abs(I-this._focusedColumnOrder))[0]),C=s===0&&u?S:Math.max(0,Math.min(S+a,b));C!==S&&(this._focusedColumnOrder=void 0),f===this.$.items&&this._ensureScrolledToIndex(g),this._toggleAttribute("navigating",!0,this);let k=y.reduce((B,I,L)=>(B[I._order]=L,B),{})[x[C]],O=f===this.$.items?Array.from(f.children).filter(B=>B.index===g)[0]:f.children[g];if(!O)return;let D=_?Array.from(O.children).filter(B=>this._elementMatches(B,'[part~="details-cell"]'))[0]:O.children[k];if(this._scrollHorizontallyToCell(D),f===this.$.items&&(this._focusedItemIndex=g),f===this.$.items){let B=D.getBoundingClientRect(),I=this.$.footer.getBoundingClientRect().top,L=this.$.header.getBoundingClientRect().bottom;B.bottom>I?(this.$.table.scrollTop+=B.bottom-I,this._scrollHandler()):B.top<L&&(this.$.table.scrollTop-=L-B.top,this._scrollHandler())}D.focus()}_onInteractionKeyDown(r,n){let i=r.composedPath()[0],o=i.localName==="input"&&!/^(button|checkbox|color|file|image|radio|range|reset|submit)$/i.test(i.type),a;switch(n){case"Enter":a=this.interacting?!o:!0;break;case"Escape":a=!1;break;case"F2":a=!this.interacting;break}let{cell:s}=this._getGridEventLocation(r);if(this.interacting!==a&&s!==null)if(a){let l=s._content.querySelector("[focus-target]")||s._content.firstElementChild;l&&(r.preventDefault(),l.focus(),this._setInteracting(!0),this._toggleAttribute("navigating",!1,this))}else r.preventDefault(),this._focusedColumnOrder=void 0,s.focus(),this._setInteracting(!1),this._toggleAttribute("navigating",!0,this)}_predictFocusStepTarget(r,n){let i=[this.$.table,this._headerFocusable,this._itemsFocusable,this._footerFocusable,this.$.focusexit],o=i.indexOf(r);for(o+=n;o>=0&&o<=i.length-1&&(!i[o]||i[o].parentNode.hidden);)o+=n;return i[o]}_onTabKeyDown(r){let n=this._predictFocusStepTarget(r.composedPath()[0],r.shiftKey?-1:1);if(n===this.$.table)this.$.table.focus();else if(n===this.$.focusexit)this.$.focusexit.focus();else if(n===this._itemsFocusable){let i=n,o=this._itemsFocusable.parentNode;if(this._ensureScrolledToIndex(this._focusedItemIndex),o.index!==this._focusedItemIndex){let a=Array.from(o.children).indexOf(this._itemsFocusable),s=Array.from(this.$.items.children).filter(l=>l.index===this._focusedItemIndex)[0];s&&(i=s.children[a])}r.preventDefault(),i.focus()}else r.preventDefault(),n.focus();this._toggleAttribute("navigating",!0,this)}_onSpaceKeyDown(r){r.preventDefault();let n=r.composedPath()[0];(!n._content||!n._content.firstElementChild)&&this.dispatchEvent(new CustomEvent("cell-activate",{detail:{model:this.__getRowModel(n.parentElement)}}))}_onKeyUp(r){if(!/^( |SpaceBar)$/.test(r.key))return;r.preventDefault();let n=r.composedPath()[0];if(n._content&&n._content.firstElementChild){let i=this.hasAttribute("navigating");n._content.firstElementChild.click(),this._toggleAttribute("navigating",i,this)}}_onFocusIn(r){this._isMousedown||this._toggleAttribute("navigating",!0,this);let n=r.composedPath()[0];n===this.$.table||n===this.$.focusexit?(this._predictFocusStepTarget(n,n===this.$.table?1:-1).focus(),this._setInteracting(!1)):this._detectInteracting(r)}_onFocusOut(r){this._toggleAttribute("navigating",!1,this),this._detectInteracting(r)}_onCellFocusIn(r){let{section:n,cell:i}=this._getGridEventLocation(r);this._detectInteracting(r),n&&i&&(this._activeRowGroup=n,this.$.header===n?this._headerFocusable=i:this.$.items===n?this._itemsFocusable=i:this.$.footer===n&&(this._footerFocusable=i),i._content.dispatchEvent(new CustomEvent("cell-focusin",{bubbles:!1})),i.dispatchEvent(new CustomEvent("cell-focus",{bubbles:!0,composed:!0}))),this._detectFocusedItemIndex(r)}_onCellFocusOut(r){r.composedPath().indexOf(this.$.table)===3&&r.composedPath()[0]._content.dispatchEvent(new CustomEvent("cell-focusout",{bubbles:!1}))}_detectInteracting(r){let n=r.composedPath().some(i=>i.localName==="vaadin-grid-cell-content");this._setInteracting(n)}_detectFocusedItemIndex(r){let{section:n,row:i}=this._getGridEventLocation(r);n===this.$.items&&(this._focusedItemIndex=i.index)}_updateGridSectionFocusTarget(r){if(!r)return;let n=this._getGridSectionFromFocusTarget(r),i=this.interacting&&n===this._activeRowGroup;r.tabIndex=i?-1:0}_preventScrollerRotatingCellFocus(r,n){r.index===this._focusedItemIndex&&this.hasAttribute("navigating")&&this._activeRowGroup===this.$.items&&(this._navigatingIsHidden=!0,this._toggleAttribute("navigating",!1,this)),n===this._focusedItemIndex&&this._navigatingIsHidden&&(this._navigatingIsHidden=!1,this._toggleAttribute("navigating",!0,this))}_getColumns(r,n){let i=this._columnTree.length-1;return r===this.$.header?i=n:r===this.$.footer&&(i=this._columnTree.length-1-n),this._columnTree[i]}_resetKeyboardNavigation(){if(this.$.header.firstElementChild&&(this._headerFocusable=Array.from(this.$.header.firstElementChild.children).filter(r=>!r.hidden)[0]),this.$.items.firstElementChild){let r=this._iterateItems((n,i)=>{if(this._firstVisibleIndex===i)return this.$.items.children[n]});r&&(this._itemsFocusable=Array.from(r.children).filter(n=>!n.hidden)[0])}this.$.footer.firstElementChild&&(this._footerFocusable=Array.from(this.$.footer.firstElementChild.children).filter(r=>!r.hidden)[0])}_scrollHorizontallyToCell(r){if(r.hasAttribute("frozen")||this._elementMatches(r,'[part~="details-cell"]'))return;let n=r.getBoundingClientRect(),i=r.parentNode,o=Array.from(i.children).indexOf(r),a=this.$.table.getBoundingClientRect(),s=a.left,l=a.right;for(let c=o-1;c>=0;c--){let u=i.children[c];if(!(u.hasAttribute("hidden")||this._elementMatches(u,'[part~="details-cell"]'))&&u.hasAttribute("frozen")){s=u.getBoundingClientRect().right;break}}for(let c=o+1;c<i.children.length;c++){let u=i.children[c];if(!(u.hasAttribute("hidden")||this._elementMatches(u,'[part~="details-cell"]'))&&u.hasAttribute("frozen")){l=u.getBoundingClientRect().left;break}}n.left<s&&(this.$.table.scrollLeft+=Math.round(n.left-s)),n.right>l&&(this.$.table.scrollLeft+=Math.round(n.right-l))}_elementMatches(r,n){return r.matches?r.matches(n):Array.from(r.parentNode.querySelectorAll(n)).indexOf(r)!==-1}_getGridEventLocation(r){let n=r.composedPath(),i=n.indexOf(this.$.table),o=i>=1?n[i-1]:null,a=i>=2?n[i-2]:null,s=i>=3?n[i-3]:null;return{section:o,row:a,cell:s}}_getGridSectionFromFocusTarget(r){return r===this._headerFocusable?this.$.header:r===this._itemsFocusable?this.$.items:r===this._footerFocusable?this.$.footer:null}};function uue(e,t,r){let n=1;e.forEach(i=>{n%10===0&&n++,i._order=r+n*t,n++})}var hue=e=>class extends yh(e){static get properties(){return{columnReorderingAllowed:{type:Boolean,value:!1},_orderBaseScope:{type:Number,value:1e7}}}static get observers(){return["_updateOrders(_columnTree, _columnTree.*)"]}ready(){super.ready(),Em(this,"track",this._onTrackEvent),this._reorderGhost=this.shadowRoot.querySelector('[part="reorder-ghost"]'),this.addEventListener("touchstart",this._onTouchStart.bind(this)),this.addEventListener("touchmove",this._onTouchMove.bind(this)),this.addEventListener("touchend",this._onTouchEnd.bind(this)),this.addEventListener("contextmenu",this._onContextMenu.bind(this))}_onContextMenu(r){this.hasAttribute("reordering")&&r.preventDefault()}_onTouchStart(r){this._startTouchReorderTimeout=setTimeout(()=>{this._onTrackStart({detail:{x:r.touches[0].clientX,y:r.touches[0].clientY}})},100)}_onTouchMove(r){this._draggedColumn&&r.preventDefault(),clearTimeout(this._startTouchReorderTimeout)}_onTouchEnd(){clearTimeout(this._startTouchReorderTimeout),this._onTrackEnd()}_onTrackEvent(r){if(r.detail.state==="start"){let n=r.composedPath(),i=n[n.indexOf(this.$.header)-2];if(!i||!i._content||i._content.contains(this.getRootNode().activeElement)||this.$.scroller.hasAttribute("column-resizing"))return;this._touchDevice||this._onTrackStart(r)}else r.detail.state==="track"?this._onTrack(r):r.detail.state==="end"&&this._onTrackEnd(r)}_onTrackStart(r){if(!this.columnReorderingAllowed)return;let n=r.composedPath&&r.composedPath();if(n&&n.filter(o=>o.hasAttribute&&o.hasAttribute("draggable"))[0])return;let i=this._cellFromPoint(r.detail.x,r.detail.y);if(!(!i||i.getAttribute("part").indexOf("header-cell")===-1)){for(this._toggleAttribute("reordering",!0,this),this._draggedColumn=i._column;this._draggedColumn.parentElement.childElementCount===1;)this._draggedColumn=this._draggedColumn.parentElement;this._setSiblingsReorderStatus(this._draggedColumn,"allowed"),this._draggedColumn._reorderStatus="dragging",this._updateGhost(i),this._reorderGhost.style.visibility="visible",this._updateGhostPosition(r.detail.x,this._touchDevice?r.detail.y-50:r.detail.y),this._autoScroller()}}_onTrack(r){if(!this._draggedColumn)return;let n=this._cellFromPoint(r.detail.x,r.detail.y);if(!n)return;let i=this._getTargetColumn(n,this._draggedColumn);this._isSwapAllowed(this._draggedColumn,i)&&this._isSwappableByPosition(i,r.detail.x)&&this._swapColumnOrders(this._draggedColumn,i),this._updateGhostPosition(r.detail.x,this._touchDevice?r.detail.y-50:r.detail.y),this._lastDragClientX=r.detail.x}_onTrackEnd(){!this._draggedColumn||(this._toggleAttribute("reordering",!1,this),this._draggedColumn._reorderStatus="",this._setSiblingsReorderStatus(this._draggedColumn,""),this._draggedColumn=null,this._lastDragClientX=null,this._reorderGhost.style.visibility="hidden",this.dispatchEvent(new CustomEvent("column-reorder",{detail:{columns:this._getColumnsInOrder()}})))}_getColumnsInOrder(){return this._columnTree.slice(0).pop().filter(r=>!r.hidden).sort((r,n)=>r._order-n._order)}_cellFromPoint(r,n){r=r||0,n=n||0,this._draggedColumn||this._toggleAttribute("no-content-pointer-events",!0,this.$.scroller);let i=this.shadowRoot.elementFromPoint(r,n);if(this._toggleAttribute("no-content-pointer-events",!1,this.$.scroller),i&&i._column)return i}_updateGhostPosition(r,n){let i=this._reorderGhost.getBoundingClientRect(),o=r-i.width/2,a=n-i.height/2,s=parseInt(this._reorderGhost._left||0),l=parseInt(this._reorderGhost._top||0);this._reorderGhost._left=s-(i.left-o),this._reorderGhost._top=l-(i.top-a),this._reorderGhost.style.transform=`translate(${this._reorderGhost._left}px, ${this._reorderGhost._top}px)`}_updateGhost(r){let n=this._reorderGhost;n.textContent=r._content.innerText;let i=window.getComputedStyle(r);return["boxSizing","display","width","height","background","alignItems","padding","border","flex-direction","overflow"].forEach(o=>n.style[o]=i[o]),n}_updateOrders(r,n){r===void 0||n===void 0||(r[0].forEach(i=>i._order=0),uue(r[0],this._orderBaseScope,0))}_setSiblingsReorderStatus(r,n){Array.from(r.parentNode.children).filter(i=>/column/.test(i.localName)&&this._isSwapAllowed(i,r)).forEach(i=>i._reorderStatus=n)}_autoScroller(){if(this._lastDragClientX){let r=this._lastDragClientX-this.getBoundingClientRect().right+50,n=this.getBoundingClientRect().left-this._lastDragClientX+50;r>0?this.$.table.scrollLeft+=r/10:n>0&&(this.$.table.scrollLeft-=n/10),this._scrollHandler()}this._draggedColumn&&this.async(this._autoScroller,10)}_isSwapAllowed(r,n){if(r&&n){let i=r!==n,o=r.parentElement===n.parentElement,a=r.frozen===n.frozen;return i&&o&&a}}_isSwappableByPosition(r,n){let i=Array.from(this.$.header.querySelectorAll('tr:not([hidden]) [part~="cell"]')).filter(s=>r.contains(s._column))[0],o=this.$.header.querySelector("tr:not([hidden]) [reorder-status=dragging]").getBoundingClientRect(),a=i.getBoundingClientRect();return a.left>o.left?n>a.right-o.width:n<a.left+o.width}_swapColumnOrders(r,n){let i=r._order;r._order=n._order,n._order=i,this._updateLastFrozen(),this._updateFirstAndLastColumn()}_getTargetColumn(r,n){if(r&&n){let i=r._column;for(;i.parentElement!==n.parentElement&&i!==this;)i=i.parentElement;return i.parentElement===n.parentElement?i:r._column}}};var chr=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:function(){if(this.localName==="vaadin-grid-column-group")return;let r=this.parentNode;return r&&r.localName==="vaadin-grid-column-group"&&r.resizable||!1}},_headerTemplate:{type:Object},_footerTemplate:{type:Object},frozen:{type:Boolean,value:!1},hidden:{type:Boolean},header:{type:String},textAlign:{type:String},_lastFrozen:{type:Boolean,value:!1},_order:Number,_reorderStatus:Boolean,_emptyCells:Array,_headerCell:Object,_footerCell:Object,_grid:Object,headerRenderer:Function,footerRenderer:Function}}static get observers(){return["_widthChanged(width, _headerCell, _footerCell, _cells.*)","_frozenChanged(frozen, _headerCell, _footerCell, _cells.*)","_flexGrowChanged(flexGrow, _headerCell, _footerCell, _cells.*)","_pathOrHeaderChanged(path, header, _headerCell, _footerCell, _cells.*, renderer, headerRenderer, _bodyTemplate, _headerTemplate)","_textAlignChanged(textAlign, _cells.*, _headerCell, _footerCell)","_orderChanged(_order, _headerCell, _footerCell, _cells.*)","_lastFrozenChanged(_lastFrozen)","_setBodyTemplateOrRenderer(_bodyTemplate, renderer, _cells, _cells.*)","_setHeaderTemplateOrRenderer(_headerTemplate, headerRenderer, _headerCell)","_setFooterTemplateOrRenderer(_footerTemplate, footerRenderer, _footerCell)","_resizableChanged(resizable, _headerCell)","_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells.*)","_hiddenChanged(hidden, _headerCell, _footerCell, _cells.*)"]}connectedCallback(){super.connectedCallback(),this._bodyTemplate&&(this._bodyTemplate.templatizer._grid=this._grid),this._headerTemplate&&(this._headerTemplate.templatizer._grid=this._grid),this._footerTemplate&&(this._footerTemplate.templatizer._grid=this._grid),this._templateObserver.flush(),this._bodyTemplate||this._templateObserver.callback(),requestAnimationFrame(()=>{this._allCells.forEach(r=>{r._content.parentNode||this._grid&&this._grid.appendChild(r._content)})})}disconnectedCallback(){super.disconnectedCallback(),requestAnimationFrame(()=>{this._findHostGrid()||this._allCells.forEach(r=>{r._content.parentNode&&r._content.parentNode.removeChild(r._content)})}),this._gridValue=void 0}_findHostGrid(){let r=this;for(;r&&!/^vaadin.*grid(-pro)?$/.test(r.localName);)r=r.assignedSlot?r.assignedSlot.parentNode:r.parentNode;return r||void 0}get _grid(){return this._gridValue||(this._gridValue=this._findHostGrid()),this._gridValue}get _allCells(){return[].concat(this._cells||[]).concat(this._emptyCells||[]).concat(this._headerCell).concat(this._footerCell).filter(r=>r)}constructor(){super(),this._templateObserver=new vh(this,()=>{this._headerTemplate=this._prepareHeaderTemplate(),this._footerTemplate=this._prepareFooterTemplate(),this._bodyTemplate=this._prepareBodyTemplate()})}_prepareHeaderTemplate(){return this._prepareTemplatizer(this._findTemplate(!0)||null,{})}_prepareFooterTemplate(){return this._prepareTemplatizer(this._findTemplate(!1,!0)||null,{})}_prepareBodyTemplate(){return this._prepareTemplatizer(this._findTemplate()||null)}_prepareTemplatizer(r,n){if(r&&!r.templatizer){let i=new T0;i._grid=this._grid,i.dataHost=this.dataHost,i._instanceProps=n||i._instanceProps,i.template=r,r.templatizer=i}return r}_renderHeaderAndFooter(){this.headerRenderer&&this._headerCell&&this.__runRenderer(this.headerRenderer,this._headerCell),this.footerRenderer&&this._footerCell&&this.__runRenderer(this.footerRenderer,this._footerCell)}__runRenderer(r,n,i){let o=[n._content,this];i&&i.item&&o.push(i),r.apply(this,o)}__setColumnTemplateOrRenderer(r,n,i){if(!this.hidden){if(r&&n)throw new Error("You should only use either a renderer or a template");i.forEach(o=>{let a=this._grid.__getRowModel(o.parentElement);if(n)o._renderer=n,(a.item||n===this.headerRenderer||n===this.footerRenderer)&&this.__runRenderer(n,o,a);else if(o._template!==r){o._template=r,o._content.innerHTML="",r.templatizer._grid=r.templatizer._grid||this._grid;let s=r.templatizer.createInstance();o._content.appendChild(s.root),o._instance=s,a.item&&o._instance.setProperties(a)}})}}_setBodyTemplateOrRenderer(r,n,i){(r||n)&&i&&this.__setColumnTemplateOrRenderer(r,n,i)}_setHeaderTemplateOrRenderer(r,n,i){(r||n)&&i&&this.__setColumnTemplateOrRenderer(r,n,[i])}_setFooterTemplateOrRenderer(r,n,i){(r||n)&&i&&(this.__setColumnTemplateOrRenderer(r,n,[i]),this._grid.__updateHeaderFooterRowVisibility(i.parentElement))}_selectFirstTemplate(r=!1,n=!1){return vh.getFlattenedNodes(this).filter(i=>i.localName==="template"&&i.classList.contains("header")===r&&i.classList.contains("footer")===n)[0]}_findTemplate(r,n){let i=this._selectFirstTemplate(r,n);return i&&this.dataHost&&(i._rootDataHost=this.dataHost._rootDataHost||this.dataHost),i}_flexGrowChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("flexGrow"),this._allCells.forEach(n=>n.style.flexGrow=r)}_orderChanged(r){this._allCells.forEach(n=>n.style.order=r)}_widthChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("width"),this._allCells.forEach(n=>n.style.width=r),this._grid&&this._grid.__forceReflow&&this._grid.__forceReflow()}_frozenChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozen",r),this._allCells.forEach(n=>this._toggleAttribute("frozen",r,n)),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_lastFrozenChanged(r){this._allCells.forEach(n=>this._toggleAttribute("last-frozen",r,n)),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._lastFrozen=r)}_pathOrHeaderChanged(r,n,i,o,a,s,l,c,u){let h=n!==void 0;if(!l&&!u&&h&&i&&this.__setTextContent(i._content,n),r&&a.value){if(!s&&!c){let f=(p,d,{item:g})=>this.__setTextContent(p,this.get(r,g));this.__setColumnTemplateOrRenderer(void 0,f,a.value)}!l&&!u&&!h&&i&&n!==null&&this.__setTextContent(i._content,this._generateHeader(r))}i&&this._grid.__updateHeaderFooterRowVisibility(i.parentElement)}__setTextContent(r,n){r.textContent!==n&&(r.textContent=n)}_generateHeader(r){return r.substr(r.lastIndexOf(".")+1).replace(/([A-Z])/g,"-$1").toLowerCase().replace(/-/g," ").replace(/^./,n=>n.toUpperCase())}_toggleAttribute(r,n,i){i.hasAttribute(r)===!n&&(n?i.setAttribute(r,""):i.removeAttribute(r))}_reorderStatusChanged(r){this._allCells.forEach(n=>n.setAttribute("reorder-status",r))}_resizableChanged(r,n){r===void 0||n===void 0||n&&[n].concat(this._emptyCells).forEach(i=>{if(i){let o=i.querySelector('[part~="resize-handle"]');if(o&&i.removeChild(o),r){let a=document.createElement("div");a.setAttribute("part","resize-handle"),i.appendChild(a)}}})}_textAlignChanged(r){if(r===void 0)return;if(["start","end","center"].indexOf(r)===-1){console.warn('textAlign can only be set as "start", "end" or "center"');return}let n;getComputedStyle(this._grid).direction==="ltr"?r==="start"?n="left":r==="end"&&(n="right"):r==="start"?n="right":r==="end"&&(n="left"),this._allCells.forEach(i=>{i._content.style.textAlign=r,getComputedStyle(i._content).textAlign!==r&&(i._content.style.textAlign=n)})}_hiddenChanged(r){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("hidden",r),!!r!=!!this._previousHidden&&this._grid&&(r===!0&&this._allCells.forEach(n=>{n._content.parentNode&&n._content.parentNode.removeChild(n._content)}),this._grid._debouncerHiddenChanged=sr.debounce(this._grid._debouncerHiddenChanged,Ni,()=>{this._grid&&this._grid._renderColumnTree&&this._grid._renderColumnTree(this._grid._columnTree)}),this._grid._updateLastFrozen&&this._grid._updateLastFrozen(),this._grid.notifyResize&&this._grid.notifyResize(),this._grid._resetKeyboardNavigation&&this._grid._resetKeyboardNavigation()),this._previousHidden=r}},eV=class extends chr(ZH(mt)){static get is(){return"vaadin-grid-column"}static get properties(){return{width:{type:String,value:"100px"},flexGrow:{type:Number,value:1},renderer:Function,path:{type:String},autoWidth:{type:Boolean,value:!1},_bodyTemplate:{type:Object},_cells:Array}}};customElements.define(eV.is,eV);jc("vaadin-grid",Ci`
    @keyframes vaadin-grid-appear {
      to {
        opacity: 1;
      }
    }

    :host {
      display: block;
      animation: 1ms vaadin-grid-appear;
      height: 400px;
      flex: 1 1 auto;
      align-self: stretch;
      position: relative;
    }

    :host([hidden]) {
      display: none !important;
    }

    #scroller {
      display: block;
      transform: translateY(0);
      width: auto;
      height: auto;
      position: absolute;
      top: 0;
      right: 0;
      bottom: 0;
      left: 0;
    }

    :host([height-by-rows]) {
      height: auto;
      align-self: flex-start;
      flex-grow: 0;
      width: 100%;
    }

    :host([height-by-rows]) #scroller {
      width: 100%;
      height: 100%;
      position: relative;
    }

    #table {
      display: flex;
      flex-direction: column;
      width: 100%;
      height: 100%;
      overflow: auto;
      position: relative;
      outline: none;
      /* Workaround for a Desktop Safari bug: new stacking context here prevents the scrollbar from getting hidden */
      z-index: 0;
    }

    #header,
    #footer {
      display: block;
      position: -webkit-sticky;
      position: sticky;
      left: 0;
      overflow: visible;
      width: 100%;
      z-index: 1;
    }

    #header {
      top: 0;
    }

    th {
      text-align: inherit;
    }

    /* Safari doesn't work with "inherit" */
    [safari] th {
      text-align: initial;
    }

    #footer {
      bottom: 0;
    }

    #items {
      flex-grow: 1;
      flex-shrink: 0;
      display: block;
      position: -webkit-sticky;
      position: sticky;
      width: 100%;
      left: 0;
      overflow: visible;
    }

    [part~='row'] {
      display: flex;
      width: 100%;
      box-sizing: border-box;
      margin: 0;
    }

    [part~='row'][loading] [part~='body-cell'] ::slotted(vaadin-grid-cell-content) {
      opacity: 0;
    }

    #items [part~='row'] {
      position: absolute;
    }

    #items [part~='row']:empty {
      height: 1em;
    }

    [part~='cell']:not([part~='details-cell']) {
      flex-shrink: 0;
      flex-grow: 1;
      box-sizing: border-box;
      display: flex;
      width: 100%;
      position: relative;
      align-items: center;
      padding: 0;
      white-space: nowrap;
    }

    [part~='details-cell'] {
      position: absolute;
      bottom: 0;
      width: 100%;
      box-sizing: border-box;
      padding: 0;
    }

    [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      display: block;
      width: 100%;
      box-sizing: border-box;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    [hidden] {
      display: none !important;
    }

    [frozen] {
      z-index: 2;
      will-change: transform;
    }

    [no-scrollbars][safari] #table,
    [no-scrollbars][firefox] #table {
      overflow: hidden;
    }

    /* Reordering styles */
    :host([reordering]) [part~='cell'] ::slotted(vaadin-grid-cell-content),
    :host([reordering]) [part~='resize-handle'],
    #scroller[no-content-pointer-events] [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      pointer-events: none;
    }

    [part~='reorder-ghost'] {
      visibility: hidden;
      position: fixed;
      pointer-events: none;
      opacity: 0.5;

      /* Prevent overflowing the grid in Firefox */
      top: 0;
      left: 0;
    }

    :host([reordering]) {
      -moz-user-select: none;
      -webkit-user-select: none;
      user-select: none;
    }

    /* Resizing styles */
    [part~='resize-handle'] {
      position: absolute;
      top: 0;
      right: 0;
      height: 100%;
      cursor: col-resize;
      z-index: 1;
    }

    [part~='resize-handle']::before {
      position: absolute;
      content: '';
      height: 100%;
      width: 35px;
      transform: translateX(-50%);
    }

    [last-column] [part~='resize-handle']::before,
    [last-frozen] [part~='resize-handle']::before {
      width: 18px;
      transform: none;
      right: 0;
    }

    #scroller[column-resizing] {
      -ms-user-select: none;
      -moz-user-select: none;
      -webkit-user-select: none;
      user-select: none;
    }

    /* Sizer styles */
    #sizer {
      display: flex;
      position: absolute;
      visibility: hidden;
    }

    #sizer [part~='details-cell'] {
      display: none !important;
    }

    #sizer [part~='cell'][hidden] {
      display: none !important;
    }

    #sizer [part~='cell'] {
      display: block;
      flex-shrink: 0;
      line-height: 0;
      height: 0 !important;
      min-height: 0 !important;
      max-height: 0 !important;
      padding: 0 !important;
      border: none !important;
    }

    #sizer [part~='cell']::before {
      content: '-';
    }

    #sizer [part~='cell'] ::slotted(vaadin-grid-cell-content) {
      display: none !important;
    }

    /* RTL specific styles */

    :host([dir='rtl']) #items,
    :host([dir='rtl']) #header,
    :host([dir='rtl']) #footer {
      left: auto;
    }

    :host([dir='rtl']) [part~='reorder-ghost'] {
      left: auto;
      right: 0;
    }

    :host([dir='rtl']) [part~='resize-handle'] {
      left: 0;
      right: auto;
    }

    :host([dir='rtl']) [part~='resize-handle']::before {
      transform: translateX(50%);
    }

    :host([dir='rtl']) [last-column] [part~='resize-handle']::before,
    :host([dir='rtl']) [last-frozen] [part~='resize-handle']::before {
      left: 0;
      right: auto;
    }
  `,{moduleId:"vaadin-grid-styles"});var uhr=(()=>{try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}})(),rV=class extends JH(XH(Qce($ce(tue(Xce(iue(oue(aue(nue(cue(jce(rue(hue(Kce(eue(lue(sue(tV)))))))))))))))))){static get template(){return Q`
      <div
        id="scroller"
        safari$="[[_safari]]"
        ios$="[[_ios]]"
        loading$="[[loading]]"
        column-reordering-allowed$="[[columnReorderingAllowed]]"
      >
        <table id="table" role="grid" aria-multiselectable="true" tabindex="0">
          <caption id="sizer" part="row"></caption>
          <thead id="header" role="rowgroup"></thead>
          <tbody id="items" role="rowgroup"></tbody>
          <tfoot id="footer" role="rowgroup"></tfoot>
        </table>

        <div part="reorder-ghost"></div>
      </div>

      <div id="focusexit" tabindex="0"></div>
    `}static get is(){return"vaadin-grid"}static get version(){return"20.0.2"}static get observers(){return["_columnTreeChanged(_columnTree, _columnTree.*)"]}static get properties(){return{_safari:{type:Boolean,value:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},_ios:{type:Boolean,value:/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1},_firefox:{type:Boolean,value:navigator.userAgent.toLowerCase().indexOf("firefox")>-1},_android:{type:Boolean,value:/android/i.test(navigator.userAgent)},_touchDevice:{type:Boolean,value:uhr},heightByRows:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_heightByRowsChanged"},_recalculateColumnWidthOnceLoadingFinished:{type:Boolean,value:!0}}}constructor(){super(),this.addEventListener("animationend",this._onAnimationEnd)}connectedCallback(){super.connectedCallback(),this.recalculateColumnWidths()}attributeChangedCallback(t,r,n){super.attributeChangedCallback(t,r,n),t==="dir"&&(this.__isRTL=n==="rtl",this._updateScrollerMeasurements())}__hasRowsWithClientHeight(){return!!Array.from(this.$.items.children).filter(t=>t.clientHeight).length}__itemsReceived(){this._recalculateColumnWidthOnceLoadingFinished&&!this._cache.isLoading()&&this.__hasRowsWithClientHeight()&&(this._recalculateColumnWidthOnceLoadingFinished=!1,this.recalculateColumnWidths())}_recalculateColumnWidths(t){t.forEach(r=>{r.width="auto",r._origFlexGrow=r.flexGrow,r.flexGrow=0}),t.forEach(r=>{r._currentWidth=0,r._allCells.forEach(n=>{let i=n.offsetWidth+1;r._currentWidth=Math.max(r._currentWidth,i)})}),t.forEach(r=>{r.width=`${r._currentWidth}px`,r.flexGrow=r._origFlexGrow,r._currentWidth=void 0,r._origFlexGrow=void 0})}recalculateColumnWidths(){if(!!this._columnTree)if(this._cache.isLoading())this._recalculateColumnWidthOnceLoadingFinished=!0;else{let t=this._getColumns().filter(r=>!r.hidden&&r.autoWidth);this._recalculateColumnWidths(t)}}_createScrollerRows(t){let r=[];for(let n=0;n<t;n++){let i=document.createElement("tr");i.setAttribute("part","row"),i.setAttribute("role","row"),this._columnTree&&this._updateRow(i,this._columnTree[this._columnTree.length-1],"body",!1,!0),r.push(i)}return this._columnTree&&this._columnTree[this._columnTree.length-1].forEach(n=>n.isConnected&&n.notifyPath&&n.notifyPath("_cells.*",n._cells)),vgt(this,()=>{this._updateFirstAndLastColumn(),this._resetKeyboardNavigation()}),r}_getRowTarget(){return this.$.items}_createCell(t){let r=this._contentIndex=this._contentIndex+1||0,n="vaadin-grid-cell-content-"+r,i=document.createElement("vaadin-grid-cell-content");i.setAttribute("slot",n);let o=document.createElement(t);o.id=n.replace("-content-","-"),o.setAttribute("tabindex","-1"),o.setAttribute("role",t==="td"?"gridcell":"columnheader");let a=document.createElement("slot");return a.setAttribute("name",n),o.appendChild(a),o._content=i,i.addEventListener("mousedown",()=>{if(window.chrome){let s=()=>{i.contains(this.getRootNode().activeElement)||o.focus(),document.removeEventListener("mouseup",s,!0)};document.addEventListener("mouseup",s,!0)}else setTimeout(()=>{i.contains(this.getRootNode().activeElement)||o.focus()})}),o}_updateRow(t,r,n,i,o){n=n||"body";let a=document.createDocumentFragment();Array.from(t.children).forEach(s=>s._vacant=!0),t.innerHTML="",t.id!=="sizer"&&(t.hidden=!0),r.filter(s=>!s.hidden).forEach((s,l,c)=>{let u;if(n==="body"){if(s._cells=s._cells||[],u=s._cells.filter(h=>h._vacant)[0],u||(u=this._createCell("td"),s._cells.push(u)),u.setAttribute("part","cell body-cell"),t.appendChild(u),l===c.length-1&&(this._rowDetailsTemplate||this.rowDetailsRenderer)){this._detailsCells=this._detailsCells||[];let h=this._detailsCells.filter(f=>f._vacant)[0]||this._createCell("td");this._detailsCells.indexOf(h)===-1&&this._detailsCells.push(h),h._content.parentElement||a.appendChild(h._content),this._configureDetailsCell(h),t.appendChild(h),this._a11ySetRowDetailsCell(t,h),h._vacant=!1}s.notifyPath&&!o&&s.notifyPath("_cells.*",s._cells)}else{let h=n==="header"?"th":"td";i||s.localName==="vaadin-grid-column-group"?(u=s[`_${n}Cell`]||this._createCell(h),u._column=s,t.appendChild(u),s[`_${n}Cell`]=u):(s._emptyCells=s._emptyCells||[],u=s._emptyCells.filter(f=>f._vacant)[0]||this._createCell(h),u._column=s,t.appendChild(u),s._emptyCells.indexOf(u)===-1&&s._emptyCells.push(u)),u.setAttribute("part",`cell ${n}-cell`),this.__updateHeaderFooterRowVisibility(t)}u._content.parentElement||a.appendChild(u._content),u._vacant=!1,u._column=s}),this.appendChild(a),this._frozenCellsChanged(),this._updateFirstAndLastColumnForRow(t)}__updateHeaderFooterRowVisibility(t){if(!t)return;let r=Array.from(t.children).filter(n=>{let i=n._column;if(i._emptyCells&&i._emptyCells.indexOf(n)>-1)return!1;if(t.parentElement===this.$.header){if(i.headerRenderer||i._headerTemplate)return!0;if(i.header===null)return!1;if(i.path||i.header!==void 0)return!0}else if(i.footerRenderer||i._footerTemplate)return!0});t.hidden!==!r.length&&(t.hidden=!r.length,this.notifyResize())}_updateScrollerItem(t,r){this._preventScrollerRotatingCellFocus(t,r),this._columnTree&&(this._toggleAttribute("first",r===0,t),this._toggleAttribute("odd",r%2,t),this._a11yUpdateRowRowindex(t,r),this._getItem(r,t))}_columnTreeChanged(t){this._renderColumnTree(t),this.recalculateColumnWidths()}_renderColumnTree(t){for(Array.from(this.$.items.children).forEach(r=>this._updateRow(r,t[t.length-1],null,!1,!0));this.$.header.children.length<t.length;){let r=document.createElement("tr");r.setAttribute("part","row"),r.setAttribute("role","row"),this.$.header.appendChild(r);let n=document.createElement("tr");n.setAttribute("part","row"),n.setAttribute("role","row"),this.$.footer.appendChild(n)}for(;this.$.header.children.length>t.length;)this.$.header.removeChild(this.$.header.firstElementChild),this.$.footer.removeChild(this.$.footer.firstElementChild);Array.from(this.$.header.children).forEach((r,n)=>this._updateRow(r,t[n],"header",n===t.length-1)),Array.from(this.$.footer.children).forEach((r,n)=>this._updateRow(r,t[t.length-1-n],"footer",n===0)),this._updateRow(this.$.sizer,t[t.length-1]),this._resizeHandler(),this._frozenCellsChanged(),this._updateFirstAndLastColumn(),this._resetKeyboardNavigation(),this._a11yUpdateHeaderRows(),this._a11yUpdateFooterRows(),this.__updateFooterPositioning()}__updateFooterPositioning(){this._firefox&&(this.$.items.style.paddingBottom=0,this.heightByRows||(this.$.items.style.paddingBottom=`${this.$.footer.offsetHeight}px`)),this._ios&&!window.CSS.supports("position","sticky")&&(this.$.table.style.height="",this.$.table.style.minHeight="100%",this.$.table.style.maxHeight="100%",setTimeout(()=>this.$.table.style.height=`${this.$.scroller.offsetHeight}px`))}_updateItem(t,r){t._item=r;let n=this.__getRowModel(t);this._toggleAttribute("selected",n.selected,t),this._a11yUpdateRowSelected(t,n.selected),this._a11yUpdateRowLevel(t,n.level),this._toggleAttribute("expanded",n.expanded,t),this._toggleAttribute("details-opened",this._isDetailsOpened(r),t),(this._rowDetailsTemplate||this.rowDetailsRenderer)&&this._toggleDetailsCell(t,r),this._generateCellClassNames(t,n),this._filterDragAndDrop(t,n),Array.from(t.children).forEach(i=>{if(i._renderer){let o=i._column||this;i._renderer.call(o,i._content,o,n)}else i._instance&&(i._instance.__detailsOpened__=n.detailsOpened,i._instance.__selected__=n.selected,i._instance.__level__=n.level,i._instance.__expanded__=n.expanded,i._instance.setProperties(n))}),this._debouncerUpdateHeights=sr.debounce(this._debouncerUpdateHeights,mo.after(1),()=>{this._updateMetrics(),this._positionItems(),this._updateScrollerSize()})}_resizeHandler(){this._updateDetailsCellHeights(),this._accessIronListAPI(super._resizeHandler,!0),this._updateScrollerMeasurements(),this.__updateFooterPositioning()}_onAnimationEnd(t){t.animationName.indexOf("vaadin-grid-appear")===0&&(this._render(),t.stopPropagation(),this.notifyResize(),this.__itemsReceived(),requestAnimationFrame(()=>{this.__scrollToPendingIndex(),this.$.table.style.webkitOverflowScrolling="touch"}))}_toggleAttribute(t,r,n){n.hasAttribute(t)===!r&&(r?n.setAttribute(t,""):n.removeAttribute(t))}__getRowModel(t){return{index:t.index,item:t._item,level:this._getIndexLevel(t.index),expanded:this._isExpanded(t._item),selected:this._isSelected(t._item),detailsOpened:!!(this._rowDetailsTemplate||this.rowDetailsRenderer)&&this._isDetailsOpened(t._item)}}render(){this._columnTree&&(this._columnTree.forEach(t=>{t.forEach(r=>r._renderHeaderAndFooter())}),this._update())}notifyResize(){super.notifyResize()}_heightByRowsChanged(t,r){(t||r)&&this.notifyResize()}__forceReflow(){this._debouncerForceReflow=sr.debounce(this._debouncerForceReflow,Ni,()=>{this.$.scroller.style.overflow="hidden",setTimeout(()=>this.$.scroller.style.overflow="")})}};customElements.define(rV.is,rV);function fue(e,t){return Bgt(e,t)}var c1=class extends mt{constructor(){super(...arguments),this._run=""}_csvUrl(t,r,n){return r?Mi(n(t,r),{format:"csv"}):""}_jsonUrl(t,r,n){return r?n(t,r):""}_csvName(t,r){return r?`run-${r}-tag-${t}.csv`:""}_jsonName(t,r){return r?`run-${r}-tag-${t}.json`:""}};c1.template=Q`
    <paper-dropdown-menu
      no-label-float="true"
      label="run to download"
      selected-item-label="{{_run}}"
    >
      <paper-listbox slot="dropdown-content">
        <template is="dom-repeat" items="[[runs]]">
          <paper-item no-label-float="true">[[item]]</paper-item>
        </template>
      </paper-listbox>
    </paper-dropdown-menu>
    <template is="dom-if" if="[[_run]]">
      <a download="[[_csvName(tag, _run)]]" href="[[_csvUrl(tag, _run, urlFn)]]"
        >CSV</a
      ><!--
      --><a
        download="[[_jsonName(tag, _run)]]"
        href="[[_jsonUrl(tag, _run, urlFn)]]"
        >JSON</a
      >
    </template>
    <style>
      :host {
        display: flex;
        align-items: center;
        height: 32px;
      }
      paper-dropdown-menu {
        width: 100px;
        --paper-input-container-label: {
          font-size: 10px;
        }
        --paper-input-container-input: {
          font-size: 10px;
        }
      }
      a {
        font-size: 10px;
        margin: 0 0.2em;
      }
      paper-input {
        font-size: 22px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],c1.prototype,"_run",void 0);E([A({type:Array}),w("design:type",Array)],c1.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],c1.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],c1.prototype,"urlFn",void 0);c1=E([yt("tf-downloader")],c1);var hhr=64,Eli=new URLSearchParams(window.location.search),Gn=class extends mt{constructor(){super(...arguments),this.colorScale=null,this._loadDataCallback=(t,r,n)=>{if(n==null){console.error("Failed to load data for:",r);return}let i=n.map(a=>({wall_time:new Date(a[0]*1e3),step:a[1],scalar:a[2]})),o=this._getSeriesNameFromDatum(r);t.setSeriesMetadata(o,r),t.setSeriesData(o,i)},this.getDataLoadUrl=({tag:t,run:r})=>_e().pluginRouteForSrc("scalars","/scalars",new URLSearchParams({tag:t,run:r})),this._downloadUrlFn=(t,r)=>this.getDataLoadUrl({tag:t,run:r}),this.requestData=(t,r,n)=>this.inColab?this._requestDataGet(t,r,n):this._requestDataPost(t,r,n),this._requestDataGet=(t,r,n)=>{let o=_e().pluginRoute("scalars","/scalars");Promise.all(t.map(a=>{let s=Mi(o,{tag:a.tag,run:a.run});return this.requestManager.request(s).then(l=>void r({item:a,data:l}))})).finally(()=>void n())},this._requestDataPost=(t,r,n)=>{var c;let o=_e().pluginRoute("scalars","/scalars_multirun"),a=new Map;for(let{tag:u,run:h}of t){let f=a.get(u);f==null&&a.set(u,f=[]),f.push(h)}let s=(c=this.batchSize)!=null?c:hhr,l=[];for(let[u,h]of a)for(let f=0;f<h.length;f+=s)l.push({tag:u,runs:h.slice(f,f+s)});Promise.all(l.map(({tag:u,runs:h})=>this.requestManager.request(o,{tag:u,runs:h}).then(f=>{for(let p of h){let d={tag:u,run:p};Object.prototype.hasOwnProperty.call(f,p)?r({item:d,data:f[p]}):r({item:d,data:null})}}))).finally(()=>void n())},this._getDataLoadName=t=>this._getSeriesNameFromDatum(t),this._expanded=!1,this._tooltipColumns=(()=>{let t=ist.slice(),r=t.findIndex(n=>n.title=="Name");return t.splice(r,1,{title:"Name",evaluate:n=>{let i=n.dataset.metadata().meta;return this._getSeriesDisplayNameFromDatum(i)}}),t})()}_getChartDataLoader(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("tf-line-chart-data-loader")}reload(){this._getChartDataLoader().reload()}redraw(){this._getChartDataLoader().redraw()}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_toggleLogScale(){this.set("_logScaleActive",!this._logScaleActive)}_resetDomain(){let t=this._getChartDataLoader();t&&t.resetDomain()}_updateDownloadLink(){var n;let t=this._getChartDataLoader().exportAsSvgString(),r=(n=this.shadowRoot)==null?void 0:n.querySelector("#svgLink");r.href=`data:image/svg+xml;base64,${btoa(t)}`}_runsFromData(t){return t.map(r=>r.run)}_getDataSeries(){return this.dataToLoad.map(t=>this._getSeriesNameFromDatum(t))}_getSeriesNameFromDatum({run:t,experiment:r={name:"_default"}}){return JSON.stringify([r.name,t])}_getSeriesDisplayNameFromDatum(t){return t.run}_getColorScale(){return this.colorScale!==null?this.colorScale:{scale:t=>{let[,r]=JSON.parse(t);return fn(r)}}}};Gn.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
    ></tf-card-heading>
    <div id="tf-line-chart-data-loader-container">
      <tf-line-chart-data-loader
        active="[[active]]"
        color-scale="[[_getColorScale(colorScale)]]"
        data-series="[[_getDataSeries(dataToLoad.*)]]"
        data-to-load="[[dataToLoad]]"
        get-data-load-name="[[_getDataLoadName]]"
        get-data-load-url="[[getDataLoadUrl]]"
        request-data="[[requestData]]"
        ignore-y-outliers="[[ignoreYOutliers]]"
        load-data-callback="[[_loadDataCallback]]"
        load-key="[[tag]]"
        log-scale-active="[[_logScaleActive]]"
        request-manager="[[requestManager]]"
        smoothing-enabled="[[smoothingEnabled]]"
        smoothing-weight="[[smoothingWeight]]"
        tag-metadata="[[tagMetadata]]"
        tooltip-columns="[[_tooltipColumns]]"
        tooltip-position="auto"
        tooltip-sorting-method="[[tooltipSortingMethod]]"
        x-type="[[xType]]"
      >
      </tf-line-chart-data-loader>
    </div>
    <div id="buttons">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        selected$="[[_logScaleActive]]"
        icon="line-weight"
        on-tap="_toggleLogScale"
        title="Toggle y-axis log scale"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Fit domain to data"
      ></paper-icon-button>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <paper-menu-button on-paper-dropdown-open="_updateDownloadLink">
          <paper-icon-button
            class="dropdown-trigger"
            slot="dropdown-trigger"
            icon="file-download"
          ></paper-icon-button>
          <paper-listbox class="dropdown-content" slot="dropdown-content">
            <paper-item>
              <a id="svgLink" download="[[tag]].svg">
                Download Current Chart as SVG
              </a>
            </paper-item>
          </paper-listbox>
        </paper-menu-button>
      </template>
      <span style="flex-grow: 1"></span>
      <template is="dom-if" if="[[showDownloadLinks]]">
        <div class="download-links">
          <tf-downloader
            runs="[[_runsFromData(dataToLoad)]]"
            tag="[[tag]]"
            url-fn="[[_downloadUrlFn]]"
          ></tf-downloader>
        </div>
      </template>
    </div>
    <style>
      :host {
        margin: 5px;
        display: block;
        width: 330px;
      }

      :host([_expanded]) {
        width: 100%;
      }

      :host([_expanded]) #tf-line-chart-data-loader-container {
        height: 400px;
      }

      #tf-line-chart-data-loader-container {
        height: 200px;
        width: 100%;
      }

      tf-card-heading {
        display: block;
        margin-bottom: 10px;
      }

      #buttons {
        display: flex;
        flex-direction: row;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }

      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }

      .download-links {
        display: flex;
        height: 32px;
      }

      .download-links a {
        align-self: center;
        font-size: 10px;
        margin: 2px;
      }

      .download-links paper-dropdown-menu {
        width: 100px;
        --paper-input-container-label: {
          font-size: 10px;
        }
        --paper-input-container-input: {
          font-size: 10px;
        }
      }

      paper-menu-button {
        padding: 0;
      }
      paper-item a {
        color: inherit;
        text-decoration: none;
        white-space: nowrap;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Gn.prototype,"tag",void 0);E([A({type:Array}),w("design:type",Array)],Gn.prototype,"dataToLoad",void 0);E([A({type:String}),w("design:type",String)],Gn.prototype,"xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Gn.prototype,"active",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Gn.prototype,"ignoreYOutliers",void 0);E([A({type:Object}),w("design:type",Ae)],Gn.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Gn.prototype,"showDownLinks",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Gn.prototype,"smoothingEnabled",void 0);E([A({type:Number}),w("design:type",Number)],Gn.prototype,"smoothingWeight",void 0);E([A({type:Object}),w("design:type",Object)],Gn.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Object)],Gn.prototype,"colorScale",void 0);E([A({type:String}),w("design:type",String)],Gn.prototype,"tooltipSortingMethod",void 0);E([A({type:Number}),w("design:type",Number)],Gn.prototype,"batchSize",void 0);E([A({type:Boolean}),w("design:type",Number)],Gn.prototype,"inColab",void 0);E([A({type:Object}),w("design:type",Object)],Gn.prototype,"_loadDataCallback",void 0);E([A({type:Object}),w("design:type",Function)],Gn.prototype,"getDataLoadUrl",void 0);E([A({type:Object}),w("design:type",Object)],Gn.prototype,"_downloadUrlFn",void 0);E([A({type:Object}),w("design:type",Function)],Gn.prototype,"requestData",void 0);E([A({type:Object}),w("design:type",Object)],Gn.prototype,"_getDataLoadName",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],Gn.prototype,"_expanded",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Gn.prototype,"_logScaleActive",void 0);E([A({type:Array}),w("design:type",Array)],Gn.prototype,"_tooltipColumns",void 0);Gn=E([yt("tf-scalar-card")],Gn);var Vs=class extends fue([cW],mt){constructor(){super(...arguments),this.sessionGroup=null,this._xType=Ed.STEP,this._noMultiExperiments=!1,this._requestData=(t,r,n)=>{Promise.all(t.map(i=>{let o={experimentName:this.experimentName,sessionName:i.run,metricName:i.tag};return this.backend.listMetricEvals(o).then(a=>void r({item:i,data:a}))})).finally(()=>void n())},this._colorScale={scale:t=>{let r=JSON.parse(t)[1],n=this._indexOfSession.get(r),i=iR;return i[(this._sessionGroupNameHash+n)%i.length]}}}connectedCallback(){super.connectedCallback(),this.addEventListener("iron-resize",this.redraw.bind(this))}redraw(){var t;(t=this.shadowRoot)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{r.redraw()})}_sessionGroupChanged(){var t;!this.sessionGroup||Object.keys(this.sessionGroup).length==0?(this._indexOfSession=new Map,this._sessionGroupNameHash=0):(this._indexOfSession=new Map(this.sessionGroup.sessions.map((r,n)=>[r.name,n])),this._sessionGroupNameHash=dct(this.sessionGroup.name)),(t=this.shadowRoot)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{let n=r,i=n.get("tag");n.set("tag",""),n.set("tag",i)})}_haveMetrics(){return this.visibleSchema&&Array.isArray(this.visibleSchema.metricInfos)&&this.visibleSchema.metricInfos.length>0}_haveMetricsAndSessionGroup(){return this.sessionGroup&&this._haveMetrics()}_computeSeriesForSessionGroupMetric(t,r){return t===null||Object.keys(t).length==0||r===null?[]:t.sessions.filter(n=>f3(n.metricValues,r.name)!==void 0).map(n=>({tag:r.name,run:n.name}))}_computeTagMetadata(t){return{displayName:Qu(t),description:t.description||""}}};Vs.template=Q`
    <template is="dom-if" if="[[!sessionGroup]]">
      <div>
        <h3>No session group selected</h3>
        <p>Please select a session group to see its metric-graphs here.</p>
      </div>
    </template>
    <template is="dom-if" if="[[!_haveMetrics(visibleSchema.*)]]">
      <div>
        <h3>No metrics are enabled</h3>
        <p>Please enable some metrics to see content here.</p>
      </div>
    </template>
    <div class="layout horizontal wrap session-group-details">
      <template
        is="dom-if"
        if="[[_haveMetricsAndSessionGroup(visibleSchema.*, sessionGroup)]]"
      >
        <template
          is="dom-repeat"
          items="[[visibleSchema.metricInfos]]"
          as="metricInfo"
        >
          <!-- Note that we do not provide a request-manager attribute since
               we provide a function in request-data for calling the backend
               to get the metrics data.
            -->
          <tf-scalar-card
            class="scalar-card"
            color-scale="[[_colorScale]]"
            data-to-load="[[_computeSeriesForSessionGroupMetric(sessionGroup, metricInfo)]]"
            tag="[[metricInfo.name.tag]]"
            tag-metadata="[[_computeTagMetadata(metricInfo)]]"
            x-type="[[_xType]]"
            multi-experiments="[[_noMultiExperiments]]"
            request-data="[[_requestData]]"
            active
          >
          </tf-scalar-card>
        </template>
      </template>
    </div>
    <!-- "iron-flex" is needed to use the layout classes in the div above -->
    <style include="iron-flex">
      :host {
        display: block;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Vs.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Vs.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"visibleSchema",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"sessionGroup",void 0);E([A({type:String}),w("design:type",String)],Vs.prototype,"_xType",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Vs.prototype,"_noMultiExperiments",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"_indexOfSession",void 0);E([A({type:Number}),w("design:type",Number)],Vs.prototype,"_sessionGroupNameHash",void 0);E([A({type:Object}),w("design:type",Function)],Vs.prototype,"_requestData",void 0);E([A({type:Object}),w("design:type",Object)],Vs.prototype,"_colorScale",void 0);E([Bt("sessionGroup.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Vs.prototype,"_sessionGroupChanged",null);Vs=E([yt("tf-hparams-session-group-details")],Vs);var Hd=class extends Gt(_o(mt)){constructor(){super(...arguments),this._hparamName=Fd,this._metricName=Qu}_visibleSchemaOrSessionGroupsChanged(){let t=this.$.sessionGroupsTable.get("detailsOpenedItems");this.$.sessionGroupsTable.set("detailsOpenedItems",[]),ci();let r=new Map;this.sessionGroups.forEach(n=>{r.set(n.name,n)}),this.$.sessionGroupsTable.set("detailsOpenedItems",t.map(n=>r.get(n.name)).filter(Boolean))}_sessionGroupHParam(t,r){return t==null||Object.keys(t).length==0||!Object.prototype.hasOwnProperty.call(t.hparams,r)?"":b0(t.hparams[r])}_sessionGroupMetric(t,r){if(t==null||Object.keys(t).length==0)return"";for(let n=0;n<t.metricValues.length;++n){let i=t.metricValues[n];if(i.name.group===r.group&&i.name.tag==r.tag)return b0(i.value)}return""}_rowNumber(t){return t+1}};Hd.template=Q`
    <vaadin-grid
      class="session-group-table"
      id="sessionGroupsTable"
      column-reordering-allowed=""
      items="[[sessionGroups]]"
    >
      <vaadin-grid-column flex-grow="0" width="10em" resizable="">
        <template class="header">
          <div class="table-header table-cell">Trial ID</div>
        </template>
        <template>
          <div class="table-cell">[[item.name]]</div>
        </template>
      </vaadin-grid-column>
      <template is="dom-if" if="[[enableShowMetrics]]">
        <vaadin-grid-column flex-grow="0" autoWidth="" resizable="">
          <template class="header">
            <div class="table-header table-cell">Show Metrics</div>
          </template>
          <template>
            <paper-checkbox class="table-cell" checked="{{detailsOpened}}">
            </paper-checkbox>
          </template>
        </vaadin-grid-column>
      </template>
      <template
        is="dom-repeat"
        items="[[visibleSchema.hparamInfos]]"
        as="hparamInfo"
        index-as="hparamIndex"
      >
        <vaadin-grid-column flex-grow="2" width="10em" resizable="">
          <template class="header">
            <div class="table-header table-cell">
              [[_hparamName(hparamInfo)]]
            </div>
          </template>
          <template>
            <div class="table-cell">
              [[_sessionGroupHParam(item, hparamInfo.name)]]
            </div>
          </template>
        </vaadin-grid-column>
      </template>
      <template
        is="dom-repeat"
        items="{{visibleSchema.metricInfos}}"
        as="metricInfo"
        index-as="metricIndex"
      >
        <vaadin-grid-column flex-grow="2" width="10em" resizable="">
          <template class="header">
            <div class="table-header table-cell">
              [[_metricName(metricInfo)]]
            </div>
          </template>
          <template>
            <div class="table-cell">
              [[_sessionGroupMetric(item, metricInfo.name)]]
            </div>
          </template>
        </vaadin-grid-column>
      </template>
      <template class="row-details">
        <tf-hparams-session-group-details
          backend="[[backend]]"
          experiment-name="[[experimentName]]"
          session-group="[[item]]"
          visible-schema="[[visibleSchema]]"
          class="session-group-details"
        >
        </tf-hparams-session-group-details>
      </template>
    </vaadin-grid>

    <style>
      :host {
        display: inline;
      }

      :host(.dark-mode) {
        --lumo-base-color: #303030;
        --lumo-body-text-color: #fff;
      }

      :host(.dark-mode) vaadin-grid {
        --_lumo-grid-secondary-border-color: #505050;
      }

      .table-cell {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      }
      .table-header {
        /* line-break overflowing column headers */
        white-space: normal;
        overflow-wrap: break-word;
      }
      .session-group-table {
        height: 100%;
      }
      .session-group-details {
        height: 360px;
        overflow-y: auto;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Hd.prototype,"visibleSchema",void 0);E([A({type:Array}),w("design:type",Array)],Hd.prototype,"sessionGroups",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Hd.prototype,"enableShowMetrics",void 0);E([A({type:Object}),w("design:type",Object)],Hd.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Hd.prototype,"experimentName",void 0);E([Bt("visibleSchema.*","sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Hd.prototype,"_visibleSchemaOrSessionGroupsChanged",null);Hd=E([yt("tf-hparams-table-view")],Hd);var CP=class extends mt{constructor(){super(...arguments),this.sessionGroup=null,this.visibleSchema=null}_propertiesArePopulated(t,r){return t!=null&&r!==void 0&&r!==null}_singletonSessionGroups(t){return t==null?[]:[t]}};CP.template=Q`
    <!-- If sessionGroup or visibleSchema are not populated, do not display
         anything.
      -->
    <template
      is="dom-if"
      if="[[_propertiesArePopulated(visibleSchema, sessionGroup)]]"
    >
      <!-- Display one row without a "show-metrics" column -->
      <tf-hparams-table-view
        visible-schema="[[visibleSchema]]"
        session-groups="[[_singletonSessionGroups(sessionGroup)]]"
      >
      </tf-hparams-table-view>
    </template>
    <template
      is="dom-if"
      if="[[!_propertiesArePopulated(visibleSchema, sessionGroup)]]"
    >
      <div>Click or hover over a session group to display its values here.</div>
    </template>

    <style>
      :host {
        display: block;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],CP.prototype,"sessionGroup",void 0);E([A({type:Object}),w("design:type",Object)],CP.prototype,"visibleSchema",void 0);CP=E([yt("tf-hparams-session-group-values")],CP);var AP=Ee(Oe(),1);function pue(e,t,r,n){if(t.length<2)return console.error("Less than two axes in parallel coordinates plot."),null;let i=r[0],o=r[1];if(i<=t[0]||i>=t[t.length-1])return null;let a=AP.sortedIndex(t,i);console.assert(a>0),console.assert(a<t.length);let s=a-1;function l(h,f,p,d){let g=h-p,_=f-d,y=i-p,x=o-d,b=(g*y+_*x)/(g*g+_*_);if(b<=0)return p3(y,x);if(b>=1){let S=h-i,C=f-o;return p3(S,C)}return p3(y-b*g,x-b*_)}let c=null,u=null;return e.forEach(h=>{let f=l(h.controlPoints[s][0],h.controlPoints[s][1],h.controlPoints[a][0],h.controlPoints[a][1]);f>n||(c===null||f<c)&&(c=f,u=h)}),u}function due(e,t,r){return e.domain().filter(n=>{let i=e(n);return t<=i&&i<=r})}function mue(e,t,r){let n=e.range(),i=n.filter(o=>t<=o&&o<=r).map(o=>{let a=e.invertExtent(o);return o===n[n.length-1]?[a[0],a[1]+1]:a});return i.length==0?[0,0]:aa(Im(i))}function gue(e,t,r){return[e.invert(t),e.invert(r)].sort((n,i)=>n-i)}function Fct(e,t,r){function n(){if(e.length===0)return[1,2];let[i,o]=aa(e);return i!==o?[i,o]:i>0?[i*.5,i*1.5]:i<0?[i*1.5,i*.5]:[-1,1]}if(r==="LINEAR")return On().domain(n()).range([t,0]);if(r==="LOG"){let i=n();return i[0]<=0&&i[1]>=0?Fct(e,t,"LINEAR"):cc().domain(i).range([t,0])}else if(r==="QUANTILE"){let o=Ir(20).map(a=>t-a*t/19);return e.length===0&&(e=[1]),eg().domain(AP.uniq(e)).range(o)}else{if(r==="NON_NUMERIC")return tg().domain(AP.uniq(e.sort())).range([t,0]).padding(.1);throw RangeError("Unknown scale: "+r)}}var u1;(function(e){e.LINEAR="LINEAR",e.LOG="LOG",e.QUANTILE="QUANTILE",e.NON_NUMERIC="NON_NUMERIC"})(u1||(u1={}));var PP=class{isPassing(t){return!0}},nV=class{constructor(t,r,n,i){this._lower=t,this._upper=r,this._lowerOpen=n,this._upperOpen=i}isPassing(t){let r=t;return this._before(this._lower,r,!this._lowerOpen)&&this._before(r,this._upper,!this._upperOpen)}_before(t,r,n){return n?t<=r:t<r}},Hct=class{constructor(t){this._domainSet=t}isPassing(t){return this._domainSet.findIndex(r=>r===t)!==-1}},Vct=class{constructor(t,r,n,i){this._svgProps=t,this._schema=r,this._interactionManager=n,this._colIndex=i,this._isDisplayed=!1,this._yScale=null,this._scaleType=null,this.setBrushSelection(null)}colIndex(){return this._colIndex}yScale(){return this._yScale}scaleType(){return this._scaleType}brushSelection(){return this._brushSelection}isDisplayed(){return this._isDisplayed}setBrushSelection(t){this._brushSelection=t,this._brushFilter=this._buildBrushFilter(this.brushSelection(),this.scaleType(),this.yScale())}setDomainAndScale(t,r){this._scaleType=r,this._yScale=Fct(t.slice(),this._svgProps.height,this.scaleType()),this._brushFilter=this._buildBrushFilter(this.brushSelection(),this.scaleType(),this.yScale())}brushFilter(){return this._brushFilter}updateDOM(t){let r=lb(this.yScale());this.scaleType()===u1.QUANTILE&&(r=r.tickValues(this.yScale().quantiles()).tickFormat(xn("-.6g")));let n=Ht(t);n.selectAll("g").remove(),n.append("g").classed("axis",!0).call(r).append("text").classed("axis-title",!0).style("cursor","move").style("text-anchor","middle").attr("y",-9).text(a=>cct(this._schema,a)),n.call(pb().on("start",()=>{t.setAttribute("is-dragging",""),this._interactionManager.onDragStart(this.colIndex())}).on("drag",()=>this._interactionManager.onDrag(qt.x)).on("end",()=>{this._interactionManager.onDragEnd(),t.removeAttribute("is-dragging")}));let i=qL().extent([[-8,0],[8,this._svgProps.height+1]]).on("start",()=>{!Bct(qt)||(t.setAttribute("is-brushing",""),this._interactionManager.onBrushChanged(this.colIndex(),qt.selection))}).on("brush",()=>{!Bct(qt)||this._interactionManager.onBrushChanged(this.colIndex(),qt.selection)}).on("end",()=>{!Bct(qt)||(this._interactionManager.onBrushChanged(this.colIndex(),qt.selection),t.removeAttribute("is-brushing"))}),o=Ht(t).append("g").classed("brush",!0);o.call(i),i.move(o,this.brushSelection())}setDisplayed(t){this._isDisplayed=t}_buildBrushFilter(t,r,n){if(t===null)return new PP;if(r===null)return console.error("Scale type is null, but brushSelection isn't: ",t),new PP;switch(r){case u1.LINEAR:case u1.LOG:{let[i,o]=gue(n,t[0],t[1]);return new nV(i,o,!1,!1)}case u1.QUANTILE:{let[i,o]=mue(n,t[0],t[1]);return new nV(i,o,!1,!0)}case u1.NON_NUMERIC:return new Hct(due(n,t[0],t[1]))}return console.error("Unknown scale type: ",r),new PP}},iV=class{constructor(t,r,n){this._svgProps=t,this._schema=r,this._axes=this._createAxes(n),this._stationaryAxesPositions=tg().range([1,this._svgProps.width-1]).padding(.5),this._draggedAxis=null,this._svgProps.svgG.selectAll("g.axis-parent").remove(),this._parentsSel=this._svgProps.svgG.selectAll(".axis-parent")}updateAxes(t,r){console.assert(!this.isAxisDragging());let n=new Set;t.columns.forEach(o=>{let a=o.absoluteIndex,s=this._axes[a];s.setDisplayed(!0);let l=r.map(c=>x0(this._schema,c,a));s.setDomainAndScale(l,o.scale),n.add(a)}),this._axes.forEach(o=>{n.has(o.colIndex())||o.setDisplayed(!1)}),this._updateStationaryAxesPositions(n),this._parentsSel=this._parentsSel.data(Array.from(n),o=>o),this._parentsSel.exit().remove(),this._parentsSel=this._parentsSel.enter().append("g").classed("axis-parent",!0).merge(this._parentsSel);let i=this;this._parentsSel.call(o=>this._updateAxesPositionsInDOM(o)).each(function(o){i._axes[o].updateDOM(this)})}mapVisibleAxes(t){return this._stationaryAxesPositions.domain().map(r=>t(this.getAxisPosition(r),this._axes[r]))}allVisibleAxesSatisfy(t){return this._stationaryAxesPositions.domain().every(r=>t(this.getAxisPosition(r),this._axes[r]))}getAxisForColIndex(t){return this._axes[t]}dragStart(t){console.assert(!this.isAxisDragging()),console.assert(this._axes[t].isDisplayed()),this._draggedAxis=this._axes[t],this._draggedAxisPosition=this._stationaryAxesPositions(t)}drag(t){t=Math.min(Math.max(t,0),this._svgProps.width),this._draggedAxisPosition=t;let r=this._stationaryAxesPositions.domain();r.sort((n,i)=>this.getAxisPosition(n)-this.getAxisPosition(i)),this._stationaryAxesPositions.domain(r),this._updateAxesPositionsInDOM(this._parentsSel)}dragEnd(t){console.assert(this.isAxisDragging()),this._draggedAxisPosition=null,this._draggedAxis=null,this._updateAxesPositionsInDOM(this._parentsSel.transition().duration(t))}isAxisDragging(){return this._draggedAxis!==null}getAxisPosition(t){return this._draggedAxis!==null&&this._draggedAxis.colIndex()===t?this._draggedAxisPosition:this._stationaryAxesPositions(t)}_updateStationaryAxesPositions(t){let r=this._stationaryAxesPositions.domain().filter(i=>t.has(i)),n=Array.from(new Set([...r,...Array.from(t)]));this._stationaryAxesPositions.domain(n)}_updateAxesPositionsInDOM(t){t.attr("transform",r=>yP(this.getAxisPosition(r)))}_createAxes(t){return Ir(uct(this._schema)).map(r=>new Vct(this._svgProps,this._schema,t,r))}};function Bct(e){return e.sourceEvent!==null}var jf;(function(e){e[e.FOREGROUND=0]="FOREGROUND",e[e.BACKGROUND=1]="BACKGROUND"})(jf||(jf={}));var th=class{constructor(t){t===void 0&&(t=Ep(null)),console.assert(t.size()<=1),this._sessionGroupSel=t}sessionGroup(){return this._sessionGroupSel.size()===1?this._sessionGroupSel.datum():null}isNull(){return this.sessionGroup()===null}selection(){return this._sessionGroupSel}equalsTo(t){var r,n;return this.isNull()?t.isNull():t.isNull()?!1:((r=t.sessionGroup())==null?void 0:r.name)==((n=this.sessionGroup())==null?void 0:n.name)}},oV=class{constructor(t,r,n){this._svgProps=t,this._schema=r,this._axesCollection=n,this._sessionGroups=[],this._svgProps.svgG.selectAll("g.background").remove(),this._svgProps.svgG.selectAll("g.foreground").remove(),this._bgPathsSel=this._svgProps.svgG.append("g").classed("background",!0).selectAll("path"),this._fgPathsSel=this._svgProps.svgG.append("g").classed("foreground",!0).selectAll("path"),this._updateVisibleFgPathsSel(),this._peakedSessionGroupHandle=new th,this._selectedSessionGroupHandle=new th,this._d3line=vu().curve(Yh)}getSessionGroupHandle(t){return t==null?new th:new th(this._fgPathsSel.filter(r=>r.name===t.name))}hideBackgroundLines(){this._bgPathsSel.attr("visibility","hidden")}showBackgroundLines(){this._bgPathsSel.attr("visibility",null)}peakedSessionGroupHandle(){return this._peakedSessionGroupHandle}selectedSessionGroupHandle(){return this._selectedSessionGroupHandle}recomputeControlPoints(t,r=0){(t===jf.FOREGROUND?this._fgPathsSel:this._bgPathsSel).transition().duration(r).attr("d",i=>this._pathDAttribute(i)),t===jf.FOREGROUND&&window.setTimeout(()=>{let i=this;this._fgPathsSel.each(function(o){i._setControlPointsProperty(this,o)})})}recomputeForegroundLinesVisibility(){this._fgPathsSel.classed("invisible-path",t=>!this._axesCollection.allVisibleAxesSatisfy((r,n)=>n.brushFilter().isPassing(x0(this._schema,t,n.colIndex())))),this._updateVisibleFgPathsSel()}setForegroundLinesColor(t,r,n){let i=this._createLineColorFunction(t,r,n);this._fgPathsSel.attr("stroke",i)}redraw(t,r,n,i){let o=this._peakedSessionGroupHandle.sessionGroup(),a=this._selectedSessionGroupHandle.sessionGroup();this._sessionGroups=t,this._fgPathsSel=this._recomputePathSelection(this._fgPathsSel),this._bgPathsSel=this._recomputePathSelection(this._bgPathsSel),this._peakedSessionGroupHandle=this.getSessionGroupHandle(o),this._selectedSessionGroupHandle=this.getSessionGroupHandle(a),this.recomputeControlPoints(jf.FOREGROUND),this.recomputeControlPoints(jf.BACKGROUND),this.recomputeForegroundLinesVisibility(),this.setForegroundLinesColor(r,n,i)}updatePeakedSessionGroup(t){this._peakedSessionGroupHandle.selection().classed("peaked-path",!1),this._peakedSessionGroupHandle=t,this._peakedSessionGroupHandle.selection().classed("peaked-path",!0)}clearPeakedSessionGroup(){this.updatePeakedSessionGroup(new th)}updateSelectedSessionGroup(t){this._selectedSessionGroupHandle.selection().classed("selected-path",!1),this._selectedSessionGroupHandle=t,this._selectedSessionGroupHandle.selection().classed("selected-path",!0)}findClosestSessionGroup(t,r){let n=this._axesCollection.mapVisibleAxes((o,a)=>o),i=pue(this._visibleFgPathsSel.nodes(),n,[t,r],100);return i===null?new th:new th(Ht(i))}_createLineColorFunction(t,r,n){if(t===null)return()=>"red";let i=On().domain(hct(this._schema,this._sessionGroups,t)).range([r,n]).interpolate(M_);return o=>i(x0(this._schema,o,t))}_recomputePathSelection(t){return t=t.data(this._sessionGroups,r=>r.name),t.exit().remove(),t.enter().append("path").merge(t)}_setControlPointsProperty(t,r){t.controlPoints=this._computeControlPoints(r)}_computeControlPoints(t){return this._axesCollection.mapVisibleAxes((r,n)=>[r,n.yScale()(x0(this._schema,t,n.colIndex()))])}_pathDAttribute(t){return this._d3line(this._computeControlPoints(t))}_updateVisibleFgPathsSel(){this._visibleFgPathsSel=this._fgPathsSel.filter(":not(.invisible-path)")}};var aV=class{constructor(t,r){this.svg=Ht(t);let n={top:30,right:10,bottom:10,left:10},i=100,o=200,a=r*i+n.left+n.right,s=o+n.top+n.bottom;this.svg.attr("viewBox",`0 0 ${a} ${s}`),this.svg.attr("preserveAspectRatio","xMidYMid"),this.svg.style("min-width",a+"px"),this.svg.style("min-height",s+"px"),this.width=a-n.left-n.right,this.height=s-n.top-n.bottom,this.svgG=this.svg.append("g").attr("transform",yP(n.left,n.top))}},sV=class{constructor(t,r,n,i){this._svgProps=t,this._schema=r,this._peakedSessionGroupChangedCB=n,this._selectedSessionGroupChangedCB=i,this._axesCollection=new iV(t,r,this),this._linesCollection=new oV(t,r,this._axesCollection),this._svgProps.svg.on("click",()=>this.onClick()).on("mousemove mouseenter",()=>{let[o,a]=zo(this._svgProps.svgG.node());this.onMouseMoved(o,a)}).on("mouseleave",()=>this.onMouseLeave())}onDragStart(t){this._axesCollection.dragStart(t),this._linesCollection.hideBackgroundLines()}onDrag(t){this._axesCollection.drag(t),this._linesCollection.recomputeControlPoints(jf.FOREGROUND)}onDragEnd(){this._axesCollection.dragEnd(500),this._linesCollection.recomputeControlPoints(jf.FOREGROUND,500),window.setTimeout(()=>{this._linesCollection.recomputeControlPoints(jf.BACKGROUND),this._linesCollection.showBackgroundLines()},500)}onBrushChanged(t,r){this._axesCollection.getAxisForColIndex(t).setBrushSelection(r),this._linesCollection.recomputeForegroundLinesVisibility()}onMouseMoved(t,r){this._linesCollection.updatePeakedSessionGroup(this._linesCollection.findClosestSessionGroup(t,r)),this._peakedSessionGroupChangedCB(this._linesCollection.peakedSessionGroupHandle().sessionGroup())}onMouseLeave(){this._linesCollection.peakedSessionGroupHandle().isNull()||(this._linesCollection.clearPeakedSessionGroup(),this._peakedSessionGroupChangedCB(null))}onClick(){this._linesCollection.peakedSessionGroupHandle().sessionGroup()===this._linesCollection.selectedSessionGroupHandle().sessionGroup()?this._linesCollection.updateSelectedSessionGroup(new th):this._linesCollection.updateSelectedSessionGroup(this._linesCollection.peakedSessionGroupHandle()),this._selectedSessionGroupChangedCB(this._linesCollection.selectedSessionGroupHandle().sessionGroup())}onOptionsOrSessionGroupsChanged(t,r){this._axesCollection.updateAxes(t,r);let n=this._linesCollection.peakedSessionGroupHandle(),i=this._linesCollection.selectedSessionGroupHandle();this._linesCollection.redraw(r,t.colorByColumnIndex!==void 0?t.columns[t.colorByColumnIndex].absoluteIndex:null,t.minColor,t.maxColor),n.equalsTo(this._linesCollection.peakedSessionGroupHandle())||this._peakedSessionGroupChangedCB(this._linesCollection.peakedSessionGroupHandle().sessionGroup()),i.equalsTo(this._linesCollection.selectedSessionGroupHandle())||this._selectedSessionGroupChangedCB(this._linesCollection.selectedSessionGroupHandle().sessionGroup())}schema(){return this._schema}};var eh=class extends Gt(_o(mt)){constructor(){super(...arguments),this.selectedSessionGroup=null,this.closestSessionGroup=null,this.redrawCount=0}_optionsOrSessionGroupsChanged(){var n;if(!this.options)return;let{configuration:t}=(n=this._prevOptions)!=null?n:{},{configuration:r}=this.options;if(this._interactionManager===void 0||!Uct.isEqual(t==null?void 0:t.schema,r.schema)||!Uct.isEqual(t==null?void 0:t.columnsVisibility,r.columnsVisibility)){Ht(this.$.svg).selectAll("*").remove();let i=new aV(this.$.svg,r.columnsVisibility.filter(Boolean).length);this.scopeSubtree(this.$.svg,!0),this._interactionManager=new sV(i,r.schema,o=>this.closestSessionGroupChanged(o),o=>this.selectedSessionGroupChanged(o))}this._computeValidSessionGroups(),this._interactionManager.onOptionsOrSessionGroupsChanged(this.options,this._validSessionGroups),this.redrawCount++,this._prevOptions=this.options}closestSessionGroupChanged(t){this.closestSessionGroup=t}selectedSessionGroupChanged(t){this.selectedSessionGroup=t}_computeValidSessionGroups(){let t=cs;if(this.sessionGroups===void 0){this._validSessionGroups=void 0;return}let r=this.options.configuration.schema;this._validSessionGroups=this.sessionGroups.filter(n=>{for(let i=0;i<t.numColumns(r);++i){if(!this.options.configuration.columnsVisibility[i])continue;let o=t.columnValueByIndex(r,n,i);if(o===void 0||o==="NaN")return!1}return!0})}};eh.template=Q`
    <div id="container">
      <svg id="svg"></svg>
    </div>
    <style>
      :host {
        display: block;
        --tf-hparams-parallel-coords-plot-axis-shadow: 0 1px 0 #fff,
          1px 0 0 #fff, 0 -1px 0 #fff, -1px 0 0 #fff;
      }
      :host(.dark-mode) {
        --tf-hparams-parallel-coords-plot-axis-shadow: 0 1px 0 #000,
          1px 0 0 #000, 0 -1px 0 #000, -1px 0 0 #000;
      }
      svg {
        font: 10px sans-serif;
      }

      .background path {
        fill: none;
        stroke: #ddd;
        shape-rendering: crispEdges;
      }

      .foreground path {
        fill: none;
        stroke-opacity: 0.7;
        stroke-width: 1;
      }

      /* Will be set on foreground paths that are not "contained" in the current
         axes brushes. If no brushes are set, no path will have this class. */
      .foreground .invisible-path {
        display: none;
      }

      /* Style for the path closest to the mouse pointer (typically will become
      the selected path when the user clicks). */
      .foreground .peaked-path {
        stroke-width: 3;
      }

      /* The currently selected path class. We use !important to override the
         inline style that sets the regular color of a path. */
      .foreground .selected-path {
        stroke-width: 3 !important;
        stroke: #0f0 !important;
      }

      #container {
        height: 100%;
        width: 100%;
      }

      svg {
        width: 100%;
        height: 100%;
      }

      .axis text {
        text-shadow: var(--tf-hparams-parallel-coords-plot-axis-shadow);
        fill: currentColor;
        cursor: move;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],eh.prototype,"sessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],eh.prototype,"options",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],eh.prototype,"selectedSessionGroup",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],eh.prototype,"closestSessionGroup",void 0);E([A({type:Number}),w("design:type",Number)],eh.prototype,"redrawCount",void 0);E([A({type:Array}),w("design:type",Object)],eh.prototype,"_validSessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],eh.prototype,"_interactionManager",void 0);E([Bt("options.*","sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],eh.prototype,"_optionsOrSessionGroupsChanged",null);eh=E([yt("tf-hparams-parallel-coords-plot")],eh);var A0=class extends mt{constructor(){super(...arguments),this.options=null}_configurationChanged(){let t=this.configuration.visibleSchema,r=this.configuration.schema,n=(a,s)=>({name:Fd(a),index:s,absoluteIndex:zH(r,t,s),scale:this._isNumericColumn(s)?"LINEAR":"NON_NUMERIC"}),i=(a,s)=>{let l=s+t.hparamInfos.length;return{scale:"LINEAR",name:Qu(a),index:l,absoluteIndex:zH(r,t,l)}},o={columns:t.hparamInfos.map(n).concat(t.metricInfos.map(i)),minColor:"#0000FF",maxColor:"#FF0000",configuration:this.configuration};this.set("options",o),ci(),this.set("options.colorByColumnIndex",this._defaultColorByColumnIndex())}_unselectDisabledLogScales(){this.options!==null&&this.options.columns.forEach(t=>{let r="options.columns."+t.index;!this._allowLogScale(t)&&t.scale==="LOG"&&this.set(r+".scale","LINEAR")})}_allowLogScale(t){if(!this._isNumericColumn(t.index)||!this.sessionGroups)return!1;let[r,n]=_P(this.configuration.visibleSchema,this.sessionGroups,t.index);return r>0||n<0}_isNumericColumn(t){return t>=this.configuration.visibleSchema.hparamInfos.length||this.configuration.visibleSchema.hparamInfos[t].type==="DATA_TYPE_FLOAT64"}_defaultColorByColumnIndex(){if(this.configuration.visibleSchema.metricInfos.length>0)return this.configuration.visibleSchema.hparamInfos.length;let t=this.configuration.visibleSchema.hparamInfos.findIndex(r=>r.type==="DATA_TYPE_FLOAT64");if(t!==-1)return t}};A0.template=Q`
    <div class="control-panel">
      <!-- 'Color by' drop down menu -->
      <paper-dropdown-menu
        label="Color by"
        id="colorByDropDownMenu"
        horizontal-align="left"
      >
        <paper-listbox
          class="dropdown-content"
          slot="dropdown-content"
          selected="{{options.colorByColumnIndex}}"
          id="colorByListBox"
        >
          <template
            is="dom-repeat"
            items="[[options.columns]]"
            as="column"
            id="colorByColumnTemplate"
          >
            <paper-item disabled="[[!_isNumericColumn(column.index)]]">
              [[column.name]]
            </paper-item>
          </template>
        </paper-listbox>
      </paper-dropdown-menu>

      <!-- Columns scales -->
      <div class="columns-container">
        <!-- Scale options for each numeric feature -->
        <template is="dom-repeat" items="{{options.columns}}" as="column">
          <template is="dom-if" if="[[_isNumericColumn(column.index)]]">
            <div class="column">
              <div class="column-title">[[column.name]]</div>
              <div>
                <paper-radio-group
                  class="scale-radio-group"
                  selected="{{column.scale}}"
                >
                  <paper-radio-button name="LINEAR">
                    Linear
                  </paper-radio-button>
                  <!-- The id here is used to access this button in unit
                       tests.-->
                  <paper-radio-button
                    id="logScaleButton_[[column.name]]"
                    name="LOG"
                    disabled="[[!_allowLogScale(column, sessionGroups.*)]]"
                  >
                    Logarithmic
                  </paper-radio-button>
                  <paper-radio-button name="QUANTILE">
                    Quantile
                  </paper-radio-button>
                </paper-radio-group>
              </div>
            </div>
          </template>
        </template>
      </div>
    </div>

    <style>
      :host {
        display: block;
      }
      .control-panel {
        overflow: auto;
      }
      .column {
        flex-grow: 1;
        flex-shrink: 1;
        margin-right: 5px;
        border: solid 1px darkgray;
        padding: 3px;
      }
      .column-title {
        /* Fit every title in one line so the radio boxes align vertically. */
        white-space: nowrap;
        text-decoration: underline;
      }
      .columns-container {
        display: flex;
        flex-direction: row;
      }
      .scale-radio-group paper-radio-button {
        padding: 2px;
        display: block;
      }
      paper-listbox {
        max-height: 15em;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],A0.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],A0.prototype,"sessionGroups",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],A0.prototype,"options",void 0);E([Bt("configuration.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],A0.prototype,"_configurationChanged",null);E([Bt("sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],A0.prototype,"_unselectDisabledLogScales",null);A0=E([yt("tf-hparams-scale-and-color-controls")],A0);var h1=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};h1.template=Q`
    <!-- Controls behavior of parallel coordinates plot
         outputs set options to the _options property.
      -->
    <hparams-split-layout orientation="vertical">
      <!-- The scale and color controls. -->
      <tf-hparams-scale-and-color-controls
        id="controls"
        slot="content"
        class="section"
        configuration="[[configuration]]"
        session-groups="[[sessionGroups]]"
        options="{{_options}}"
      >
      </tf-hparams-scale-and-color-controls>
      <!-- The actual parallel coordinates plot -->
      <tf-hparams-parallel-coords-plot
        id="plot"
        slot="content"
        class="section"
        session-groups="[[sessionGroups]]"
        selected-session-group="{{_selectedGroup}}"
        closest-session-group="{{_closestGroup}}"
        options="[[_options]]"
      >
      </tf-hparams-parallel-coords-plot>
      <tf-hparams-session-group-values
        id="values"
        slot="content"
        class="section"
        visible-schema="[[configuration.visibleSchema]]"
        session-group="[[_closestOrSelected(
                             _closestGroup, _selectedGroup)]]"
      >
      </tf-hparams-session-group-values>
      <tf-hparams-session-group-details
        id="details"
        slot="content"
        class="section"
        backend="[[backend]]"
        experiment-name="[[experimentName]]"
        session-group="[[_selectedGroup]]"
        visible-schema="[[configuration.visibleSchema]]"
      >
      </tf-hparams-session-group-details>
    </hparams-split-layout>

    <style>
      .section {
        padding: 10px;
      }
      #values {
        height: 115px;
      }
      #details {
        flex-grow: 1;
        max-height: fit-content;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],h1.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],h1.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],h1.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],h1.prototype,"sessionGroups",void 0);h1=E([yt("tf-hparams-parallel-coords-view")],h1);var y3=Ee(Oe(),1);var $o=class extends Gt(mt){constructor(){super(...arguments),this.selectedSessionGroup=null,this.closestSessionGroup=null,this._container=null,this._svg=null,this.width=0,this.height=0,this._brushedCellIndex=null,this._brushSelection=null}ready(){super.ready(),this._container=this.$.container,this._svg=Ht(this.$.svg),this._redraw()}_sessionGroupsChanged(){this.selectedSessionGroup!==null&&(this.selectedSessionGroup=fct(this.sessionGroups,this.selectedSessionGroup.name)||null),this._redraw()}_visibleSchemaChanged(){this._brushedCellIndex=null,this._brushSelection=null,this._redraw()}_redraw(){this.debounce("_redraw",()=>{let t=cs,r=1200,n=.4*r,i=150,o=.75*i;this.width=Math.max(i*t.numVisibleColumns(this.visibleSchema),r),this.height=Math.max(o*t.numVisibleMetrics(this.visibleSchema),n),this._container.style.width=this.width+"px",this._container.style.height=this.height+"px",this._svg.attr("width",this.width).attr("height",this.height),this._svg.selectAll("g").remove(),this._draw()},100)}_draw(){let t=cs,r=this;if(!this.sessionGroups||this.sessionGroups.length==0||!this.visibleSchema||this.visibleSchema.metricInfos.length==0)return;let n=Ir(t.numVisibleColumns(r.visibleSchema)),i=Ir(t.numVisibleMetrics(r.visibleSchema)),o=80,a=50,s=5,l=Qm().domain(n).range([o+s,this.width-1-s]).paddingInner(.1),c=Qm().domain(i).range([this.height-1-s-a,s]).paddingInner(.1),u=l.bandwidth(),h=c.bandwidth(),f=n.map(ct=>r._cellScale(ct,[0,u-1])),p=i.map(ct=>r._cellScale(ct+t.numVisibleHParams(r.visibleSchema),[h-1,0])),d=this._svg.selectAll(".x-axis").data(n).enter().append("g").classed("x-axis",!0).attr("transform",ct=>t.translateStr(l(ct),0));function g(ct){return"x-axis-clip-path-"+ct}function _(ct){return"x-label-clip-path-"+ct}d.append("clipPath").attr("id",g).append("rect").attr("x",-s).attr("y",0).attr("width",u+2*s).attr("height",r.height-a/2),d.append("clipPath").attr("id",_).append("rect").attr("x",0).attr("y",r.height-a/2).attr("width",u).attr("height",a/2),d.append("g").attr("clip-path",ct=>"url(#"+g(ct)+")").each(function(ct){Ht(this).call(S,Z9(f[ct]).tickSize(r.height-a),u,40,r.options.columns[ct].scale)}),d.append("g").classed("x-axis-label",!0).attr("clip-path",ct=>"url(#"+_(ct)+")").append("text").attr("text-anchor","middle").attr("x",u/2).attr("y",r.height-1-a/4).text(ct=>t.schemaVisibleColumnName(r.visibleSchema,ct)).append("title").text(ct=>t.schemaVisibleColumnName(r.visibleSchema,ct));let y=this._svg.selectAll(".y-axis").data(i).enter().append("g").classed("y-axis",!0).attr("transform",ct=>t.translateStr(r.width-1,c(ct)));function x(ct){return"y-axis-clip-path-"+ct}function b(ct){return"y-label-clip-path-"+ct}y.append("clipPath").attr("id",x).append("rect").attr("x",-(r.width-o/2-1)).attr("y",-s).attr("width",r.width-o/2).attr("height",h+2*s),y.append("clipPath").attr("id",b).append("rect").attr("x",-(r.width-1)).attr("y",0).attr("width",o/2).attr("height",h),y.append("g").attr("clip-path",ct=>"url(#"+x(ct)+")").each(function(ct){Ht(this).call(S,lb(p[ct]).tickSize(r.width-o),h,20,r.options.columns[ct+t.numVisibleHParams(r.visibleSchema)].scale)}),y.append("g").classed("y-axis-label",!0).attr("clip-path",ct=>"url(#"+b(ct)+")").append("text").attr("text-anchor","middle").attr("x",-(r.width-o/4-1)).attr("y",h/2).attr("transform",t.rotateStr(90,-(r.width-o/4-1),h/2)).text(ct=>t.metricName(r.visibleSchema.metricInfos[ct])).append("title").text(ct=>t.metricName(r.visibleSchema.metricInfos[ct]));function S(ct,X,et,dt,q){let pt=Math.floor(et/dt),ht=X.scale();if(q==="QUANTILE"){let wt=ht.quantiles(),kt=Math.ceil(wt.length/pt);wt=Ir(0,wt.length,kt).map(ie=>wt[ie]),X.tickValues(wt).tickFormat(xn("-.2g"))}(q==="LINEAR"||q==="LOG")&&X.ticks(pt),ct.call(X),ct.selectAll(".domain").remove(),ct.selectAll(".tick line").attr("stroke","#ddd")}let C=this._svg.selectAll(".cell").data(q9(n,i)).enter().append("g").classed("cell",!0).attr("transform",([ct,X])=>t.translateStr(l(ct),c(X))),P=C.append("g").classed("frame",!0).append("rect").attr("x",-s).attr("y",-s).attr("width",u+2*s).attr("height",h+2*s).attr("stroke","#000").attr("fill","none").attr("shape-rendering","crispEdges"),k=null;r.options.colorByColumnIndex!==void 0&&(k=On().domain(this._colExtent(this.options.colorByColumnIndex)).range([this.options.minColor,this.options.maxColor]).interpolate(M_));let O=r.options.colorByColumnIndex===void 0?()=>"red":({sessionGroup:ct})=>k(this._colValue(ct,r.options.colorByColumnIndex));function D(ct,X){return f[X](r._colValue(ct,X))}function B(ct,X){return p[X](r._metricValue(ct,X))}function I(ct,X){let et=ct.selectAll(".data-marker").data(([pt,ht])=>r.sessionGroups.filter(wt=>r._colValue(wt,pt)!==void 0&&r._metricValue(wt,ht)!==void 0).map(wt=>({col:pt,metric:ht,sessionGroup:wt,x:D(wt,pt),y:B(wt,ht),sessionGroupMarkers:null}))).enter().append("circle").classed("data-marker",!0).attr("cx",({x:pt})=>pt).attr("cy",({y:pt})=>pt).attr("r",2).attr("fill",X),dt=new Map;r.sessionGroups.forEach(pt=>{dt.set(pt,[])}),et.each(function(pt){var ht;(ht=dt.get(pt.sessionGroup))==null||ht.push(this)}),et.each(pt=>{let ht=dt.get(pt.sessionGroup);pt.sessionGroupMarkers=new Set(ht)});let q=n.map(pt=>i.map(ht=>et.filter(wt=>wt.col==pt&&wt.metric==ht)));return[et,q,dt]}let[L,R,F]=I(C.append("g"),O);function z(ct,X){let et=[];return R[ct][X].each(function(){et.push(this)}),zh().x(dt=>Ht(dt).datum().x).y(dt=>Ht(dt).datum().y).addAll(et)}let U=n.map(ct=>i.map(X=>z(ct,X))),W=null;bt()&&(W=C.filter(ct=>y3.isEqual(ct,r._brushedCellIndex)),console.assert(W.size()==1,W));let Z=new Set(L.nodes());rt();function rt(){let ct=new Set(L.nodes());Mt()||(ct=ot(r._brushedCellIndex,r._brushSelection)),Ep(Array.from(t.filterSet(ct,X=>!Z.has(X)))).attr("fill",O),Ep(Array.from(t.filterSet(Z,X=>!ct.has(X)))).attr("fill","#ddd"),Z=ct}function ot(ct,X){console.assert(ct!==null),console.assert(X!==null);let[et,dt]=ct,q=new Set;return t.quadTreeVisitPointsInRect(U[et][dt],X[0][0],X[0][1],X[1][0],X[1][1],pt=>{Ht(pt).datum().sessionGroupMarkers.forEach(wt=>{q.add(wt)})}),q}let st=GL().extent([[-s+1,-s+1],[u-1+s-1,h-1+s-1]]).on("start",function(){bt()&&W.node()!=this&&st.move(W,null),St(this)}).on("brush",function(){St(this)}).on("end",function(){St(this)});function St(ct){let X=UL(ct);!bt()&&X===null||bt()&&ct===W.node()&&y3.isEqual(X,r._brushSelection)||(r._brushSelection=X,X!==null?(W=Ht(ct),r._brushedCellIndex=W.datum()):(W=null,r._brushedCellIndex=null),rt())}function bt(){return r._brushedCellIndex!==null&&r._brushSelection!==null}function Mt(){return!bt()||r._brushSelection[0][0]===r._brushSelection[1][0]||r._brushSelection[0][1]===r._brushSelection[1][1]}C.call(st),bt()&&st.move(W,r._brushSelection);let lt=null,Kt=null;this.selectedSessionGroup!==null&&(Kt=Ep(F.get(this.selectedSessionGroup)).classed("selected-marker",!0)),C.on("click",function(){let ct=lt===Kt?null:lt;if(ct===Kt)return;Kt!==null&&Kt.classed("selected-marker",!1),Kt=ct,Kt!==null&&Kt.classed("selected-marker",!0);let X=Kt===null?null:Kt.datum().sessionGroup;r.selectedSessionGroup=X}).on("mousemove mouseenter",function([ct,X]){let[et,dt]=zo(this),q=_t(ct,X,et,dt,20);lt!==q&&(lt!==null&&lt.classed("closest-marker",!1),lt=q,lt!==null?(lt.classed("closest-marker",!0),r.closestSessionGroup=lt.datum().sessionGroup):r.closestSessionGroup=null)}).on("mouseleave",function([ct,X]){lt!==null&&(lt.classed("closest-marker",!1),lt=null,r.closestSessionGroup=null)});function _t(ct,X,et,dt,q){let pt=1/0,ht=null;return t.quadTreeVisitPointsInDisk(U[ct][X],et,dt,q,(wt,kt)=>{if(Z.has(wt)&&kt<pt){let ie=Ht(wt).datum();pt=kt,ht=ie.sessionGroup}}),ht===null?null:Ep(F.get(ht))}this._svg.selectAll("*").classed("tf-hparams-scatter-plot-matrix-plot",!0)}_cellScale(t,r){let n=this._colExtent(t),i=On().domain(n).range(r);if(this.options.columns[t].scale==="LINEAR")return i;if(this.options.columns[t].scale==="LOG")return n[0]<=0&&n[1]>=0?i:cc().domain(n).range(r);if(this.options.columns[t].scale==="QUANTILE"){let o=(r[1]-r[0])/19,a=Ir(20).map(s=>r[0]+o*s);return eg().domain(y3.uniq(this.sessionGroups.map(s=>this._colValue(s,t)))).range(a)}else{if(this.options.columns[t].scale==="NON_NUMERIC")return tg().domain(y3.uniq(this.sessionGroups.map(o=>this._colValue(o,t)).sort())).range(r).padding(.1);throw"Unknown scale for column: "+t+". options: "+this.options}}_colValue(t,r){return BH(this.visibleSchema,t,r)}_metricValue(t,r){return FH(this.visibleSchema,t,r)}_colExtent(t){return _P(this.visibleSchema,this.sessionGroups,t)}};$o.template=Q`
    <div id="container">
      <svg id="svg"></svg>
    </div>

    <style>
      :host {
        display: block;
      }
      svg {
        font: 10px sans-serif;
      }

      text {
        fill: currentColor;
      }

      .frame rect {
        stroke: currentColor;
      }

      /* The closest data point marker to the mouse pointer. We use !important
         to override the inline style that sets the regular style of a marker.
      */
      .closest-marker {
        r: 6 !important;
      }

      /* The currently selected data point marker. We use !important to
         override the inline style that sets the regular style of a marker. */
      .selected-marker {
        r: 6 !important;
        fill: #0f0 !important;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],$o.prototype,"visibleSchema",void 0);E([A({type:Array}),w("design:type",Array)],$o.prototype,"sessionGroups",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"options",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],$o.prototype,"selectedSessionGroup",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],$o.prototype,"closestSessionGroup",void 0);E([A({type:Object}),w("design:type",HTMLElement)],$o.prototype,"_container",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_svg",void 0);E([A({type:Number}),w("design:type",Number)],$o.prototype,"width",void 0);E([A({type:Number}),w("design:type",Number)],$o.prototype,"height",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_brushedCellIndex",void 0);E([A({type:Object}),w("design:type",Object)],$o.prototype,"_brushSelection",void 0);E([Bt("sessionGroups.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_sessionGroupsChanged",null);E([Bt("visibleSchema.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_visibleSchemaChanged",null);E([Bt("options.*"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],$o.prototype,"_redraw",null);$o=E([yt("tf-hparams-scatter-plot-matrix-plot")],$o);var f1=class extends mt{_closestOrSelected(t,r){return t!==null?t:r}};f1.template=Q`
    <hparams-split-layout orientation="vertical">
      <!-- Controls behavior of the scatter plot matrix
             outputs the configured options to the _options property. -->
      <tf-hparams-scale-and-color-controls
        slot="content"
        class="section"
        id="controls"
        configuration="[[configuration]]"
        session-groups="[[sessionGroups]]"
        options="{{_options}}"
      >
      </tf-hparams-scale-and-color-controls>
      <!-- The actual scatter plot matrix -->
      <tf-hparams-scatter-plot-matrix-plot
        slot="content"
        class="section"
        id="plot"
        visible-schema="[[configuration.visibleSchema]]"
        session-groups="[[sessionGroups]]"
        selected-session-group="{{_selectedGroup}}"
        closest-session-group="{{_closestGroup}}"
        options="[[_options]]"
      >
      </tf-hparams-scatter-plot-matrix-plot>
      <tf-hparams-session-group-values
        slot="content"
        class="section"
        id="values"
        visible-schema="[[configuration.visibleSchema]]"
        session-group="[[_closestOrSelected(
                                 _closestGroup, _selectedGroup)]]"
      >
      </tf-hparams-session-group-values>
      <!-- Shows session group details for the clicked marker. -->
      <tf-hparams-session-group-details
        slot="content"
        class="section"
        id="details"
        backend="[[backend]]"
        experiment-name="[[experimentName]]"
        session-group="[[_selectedGroup]]"
        visible-schema="[[configuration.visibleSchema]]"
      >
      </tf-hparams-session-group-details>
    </hparams-split-layout>
    <style>
      .section {
        padding: 10px;
      }
      #controls {
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      #plot {
        flex-grow: 1;
        flex-shrink: 1;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      #values {
        flex-grow: 0;
        flex-shrink: 0;
        flex-basis: auto;
        height: 115px;
        overflow-y: auto;
        max-height: fit-content;
      }
      #details {
        flex-grow: 0;
        flex-shrink: 1;
        flex-basis: auto;
        height: auto;
        overflow-y: auto;
        max-height: fit-content;
      }
      vaadin-split-layout {
        height: 100%;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],f1.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],f1.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],f1.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],f1.prototype,"sessionGroups",void 0);f1=E([yt("tf-hparams-scatter-plot-matrix-view")],f1);var Xf=class extends mt{constructor(){super(),this._selectedTab=0,this._tableTabClicked=()=>{this.logAction("Tab Clicked","Table")},this._parallelCoordsTabClicked=()=>{this.logAction("Tab Clicked","Parallel Coords")},this._scatterPlotMatrixTabClicked=()=>{this.logAction("Tab Clicked","Scatter Plot Matrix")},this.logAction=(t,r)=>{let n=window.dataLayer||[];function i(){n.push(arguments)}i("event",t,{event_category:"HParams",event_label:r})},this.logAction("Plugin Load")}};Xf.template=Q`
    <paper-header-panel>
      <paper-toolbar slot="header" class="tab-bar">
        <paper-tabs selected="{{_selectedTab}}" slot="top">
          <!-- view-id can be used by integration tests to locate a tab.
               It should be the name of the root element implementing the view
               without the 'tf-hparams-' prefix. -->
          <paper-tab on-click="_tableTabClicked" view-id="table-view">
            TABLE VIEW
          </paper-tab>
          <paper-tab
            on-click="_parallelCoordsTabClicked"
            view-id="parallel-coords-view"
          >
            PARALLEL COORDINATES VIEW
          </paper-tab>
          <paper-tab
            on-click="_scatterPlotMatrixTabClicked"
            view-id="scatter-plot-matrix-view"
          >
            SCATTER PLOT MATRIX VIEW
          </paper-tab>
          <div class="help-and-feedback">
            <template is="dom-if" if="[[bugReportUrl]]">
              <a
                href$="[[bugReportUrl]]"
                target="_blank"
                rel="noopener noreferrer"
              >
                <paper-button
                  id="bug-report"
                  raised
                  title="Send a bug report or feature request"
                >
                  Bug Report / Feature Request
                </paper-button>
              </a>
            </template>
            <template is="dom-if" if="[[helpUrl]]">
              <a href$="[[helpUrl]]" target="_blank" rel="noopener noreferrer">
                <paper-icon-button
                  icon="help-outline"
                  title="View documentation"
                >
                </paper-icon-button>
              </a>
            </template>
          </div>
        </paper-tabs>
      </paper-toolbar>
      <iron-pages selected="[[_selectedTab]]" class="fit tab-view">
        <div id="0" class="tab">
          <tf-hparams-table-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            visible-schema="[[configuration.visibleSchema]]"
            session-groups="[[sessionGroups]]"
            enable-show-metrics
          >
          </tf-hparams-table-view>
        </div>
        <div id="1" class="tab">
          <tf-hparams-parallel-coords-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            configuration="[[configuration]]"
            session-groups="[[sessionGroups]]"
          >
          </tf-hparams-parallel-coords-view>
        </div>
        <div id="2" class="tab">
          <tf-hparams-scatter-plot-matrix-view
            backend="[[backend]]"
            experiment-name="[[experimentName]]"
            configuration="[[configuration]]"
            session-groups="[[sessionGroups]]"
          >
          </tf-hparams-scatter-plot-matrix-view>
        </div>
      </iron-pages>
    </paper-header-panel>

    <style>
      .tab-view {
        height: 100%;
      }
      .tab-bar {
        overflow-y: auto;
        color: white;
        background-color: var(
          --tb-toolbar-background-color,
          var(--tb-orange-strong)
        );
      }
      .tab {
        height: 100%;
      }
      paper-tabs {
        flex-grow: 1;
        width: 100%;
        height: 100%;
        --paper-tabs-selection-bar-color: white;
        --paper-tabs-content: {
          -webkit-font-smoothing: antialiased;
        }
      }
      tf-hparams-table-view {
        width: 100%;
        height: 100%;
      }
      .help-and-feedback {
        display: inline-flex; /* Ensure that icons stay aligned */
        justify-content: flex-end;
        align-items: center;
        text-align: right;
        color: white;
      }
      #bug-report {
        border: solid black;
        background: red;
        white-space: normal;
        word-break: break-words;
        font-size: 12px;
        max-width: 150px;
        text-align: left;
      }
      .help-and-feedback a {
        color: white;
        text-decoration: none;
      }
    </style>
  `;E([A({type:Object}),w("design:type",Object)],Xf.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"helpUrl",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"bugReportUrl",void 0);E([A({type:String}),w("design:type",String)],Xf.prototype,"experimentName",void 0);E([A({type:Object}),w("design:type",Object)],Xf.prototype,"configuration",void 0);E([A({type:Array}),w("design:type",Array)],Xf.prototype,"sessionGroups",void 0);E([A({type:Number}),w("design:type",Number)],Xf.prototype,"_selectedTab",void 0);Xf=E([yt("tf-hparams-sessions-pane"),w("design:paramtypes",[])],Xf);var rh=class extends Gt(mt){reload(){this.$["query-pane"].reload()}};rh.template=Q`
    <hparams-split-layout>
      <div slot="content" class="sidebar">
        <tf-hparams-query-pane
          id="query-pane"
          backend="[[backend]]"
          experiment-name="[[experimentName]]"
          configuration="{{_configuration}}"
          session-groups="{{_sessionGroups}}"
          data-loaded-with-non-empty-hparams="{{_dataLoadedWithNonEmptyHparams}}"
          data-loaded-with-empty-hparams="{{_dataLoadedWithEmptyHparams}}"
        >
        </tf-hparams-query-pane>
      </div>
      <div slot="content" class="center">
        <template is="dom-if" if="[[_dataLoadedWithEmptyHparams]]">
          <div class="no-data-warning">
            <h3>No hparams data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any hparams data to your event files.</li>
              <li>
                Event files are still being loaded (try reloading this page).
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>

        <template is="dom-if" if="[[_dataLoadedWithNonEmptyHparams]]">
          <tf-hparams-sessions-pane
            id="sessions-pane"
            backend="[[backend]]"
            help-url="[[helpUrl]]"
            bug-report-url="[[bugReportUrl]]"
            experiment-name="[[experimentName]]"
            configuration="[[_configuration]]"
            session-groups="[[_sessionGroups]]"
          >
          </tf-hparams-sessions-pane>
        </template>
      </div>
    </hparams-split-layout>
    <style>
      hparams-split-layout {
        width: 100%;
      }

      .sidebar {
        width: 20%;
        height: 100%;
        overflow: auto;
        flex-grow: 0;
        flex-shrink: 0;
        min-width: 10%;
      }

      .center {
        height: 100%;
        overflow-y: auto;
        flex-grow: 1;
        flex-shrink: 1;
        width: 80%;
      }

      :host {
        display: flex;
        flex-direction: row;
        height: 100%;
        width: 100%;
      }

      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      a {
        color: var(--tb-link);
      }

      a:visited {
        color: var(--tb-link-visited);
      }
    </style>
  `;E([A({type:Object}),w("design:type",u3)],rh.prototype,"backend",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"experimentName",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"helpUrl",void 0);E([A({type:String}),w("design:type",String)],rh.prototype,"bugReportUrl",void 0);E([A({type:Object}),w("design:type",Object)],rh.prototype,"_configuration",void 0);E([A({type:Array}),w("design:type",Array)],rh.prototype,"_sessionGroups",void 0);E([A({type:Boolean}),w("design:type",Boolean)],rh.prototype,"_dataLoadedWithNonEmptyHparams",void 0);E([A({type:Boolean}),w("design:type",Boolean)],rh.prototype,"_dataLoadedWithEmptyHparams",void 0);rh=E([yt("tf-hparams-main")],rh);var phr=new URLSearchParams(window.location.search).get("tensorboardColab")==="true",lV=class extends Gt(mt){constructor(){super(...arguments),this._backend=new u3(new Ae,phr)}reload(){this.$["hparams-main"].reload()}};lV.template=Q`
    <!-- TensorBoard does not specify an experimentName. Currently it only
         supports one experiment per invocation. -->
    <tf-hparams-main
      id="hparams-main"
      backend="[[_backend]]"
      experiment-name=""
    >
    </tf-hparams-main>
  `;E([A({type:Object}),w("design:type",Object)],lV.prototype,"_backend",void 0);lV=E([yt("tf-hparams-dashboard")],lV);var p1=Ee(Oe(),1);var _n=class extends Gt(mt){constructor(){super(...arguments),this.actualSize=!1,this.brightnessAdjustment=.5,this.contrastPercentage=0,this._metadataCanceller=new an,this._imageCanceller=new an,this._steps=[],this._isImageLoading=!1}get _runColor(){var t=this.run;return fn(t)}get _hasAtLeastOneStep(){var t=this._steps;return!!t&&t.length>0}get _hasMultipleSteps(){var t=this._steps;return!!t&&t.length>1}get _currentStep(){var t=this._steps,r=this._stepIndex;return t[r]||null}get _stepValue(){var t=this._currentStep;return t?t.step:0}get _currentWallTime(){var t=this._currentStep;return t?s2(t.wall_time):""}get _maxStepIndex(){var t=this._steps;return t.length-1}get _sampleText(){var t=this.sample;return`${t+1}`}get _hasMultipleSamples(){var t=this.ofSamples;return t>1}_getAriaExpanded(){return this.actualSize?"true":"false"}attached(){this.reload()}reload(){if(!this.isAttached)return;this._metadataCanceller.cancelAll();let t=new URLSearchParams({tag:this.tag,run:this.run,sample:this.sample}),r=_e().pluginRoute("images","/images",t),n=this._metadataCanceller.cancellable(i=>{if(i.cancelled)return;let a=i.value.map(this._createStepDatum.bind(this));this.set("_steps",a),this.set("_stepIndex",a.length-1)});this.requestManager.request(r).then(n)}_createStepDatum(t){let r=new URLSearchParams(t.query);r.append("ts",t.wall_time);let n=_e().pluginRouteForSrc("images","/individualImage",r);return{wall_time:new Date(t.wall_time*1e3),step:t.step,url:n}}_updateImageUrl(){var t=this._currentStep,r=this.brightnessAdjustment,n=this.contrastPercentage;if(!t)return;let i=new Image;this._imageCanceller.cancelAll(),i.onload=i.onerror=this._imageCanceller.cancellable(o=>{if(o.cancelled)return;let a=this.$$("#main-image-container");a&&(a.textContent="",zt(a).appendChild(i)),this.set("_isImageLoading",!1)}).bind(this),i.style.filter=`contrast(${n}%) `,i.style.filter+=`brightness(${r})`,this.set("_isImageLoading",!0),i.src=t.url}_handleTap(t){this.set("actualSize",!this.actualSize)}_toLocaleString(t){return t.toLocaleString()}};_n.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      run="[[run]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
      color="[[_runColor]]"
    >
      <template is="dom-if" if="[[_hasMultipleSamples]]">
        <div>sample: [[_sampleText]] of [[ofSamples]]</div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep]]">
        <div class="heading-row">
          <div class="heading-label">
            step
            <span style="font-weight: bold"
              >[[_toLocaleString(_stepValue)]]</span
            >
          </div>
          <div class="heading-label heading-right datetime">
            <template is="dom-if" if="[[_currentWallTime]]">
              [[_currentWallTime]]
            </template>
          </div>
          <div class="label right">
            <paper-spinner-lite active hidden$="[[!_isImageLoading]]">
            </paper-spinner-lite>
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps]]">
        <div>
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_maxStepIndex]]"
            max-markers="[[_maxStepIndex]]"
            snaps
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>

    <!-- Semantically a button but <img> inside a <button> disallows user to do
    an interesting operation like "Copy Image" in non-Chromium browsers. -->
    <a
      id="main-image-container"
      role="button"
      aria-label="Toggle actual size"
      aria-expanded$="[[_getAriaExpanded(actualSize)]]"
      on-tap="_handleTap"
    ></a>

    <style include="tf-card-heading-style">
      /** Make button a div. */
      button {
        width: 100%;
        display: block;
        background: none;
        border: 0;
        padding: 0;
      }

      /** Firefox: Get rid of dotted line inside button. */
      button::-moz-focus-inner {
        border: 0;
        padding: 0;
      }

      /** Firefox: Simulate Chrome's outer glow on button when focused. */
      button:-moz-focusring {
        outline: none;
        box-shadow: 0px 0px 1px 2px Highlight;
      }

      :host {
        display: block;
        width: 350px;
        height: auto;
        position: relative;
        margin: 0 15px 40px 0;
        overflow-x: auto;
      }

      /** When actual size shown is on, use the actual image width. */
      :host([actual-size]) {
        max-width: 100%;
        width: auto;
      }

      :host([actual-size]) #main-image-container {
        max-height: none;
        width: auto;
      }

      :host([actual-size]) #main-image-container img {
        width: auto;
      }

      paper-spinner-lite {
        width: 14px;
        height: 14px;
        vertical-align: text-bottom;
        --paper-spinner-color: var(--tb-orange-strong);
      }

      #steps {
        height: 15px;
        margin: 0 0 0 -15px;
        /*
         * 31 comes from adding a padding of 15px from both sides of the
         * paper-slider, subtracting 1px so that the slider width aligns
         * with the image (the last slider marker takes up 1px), and
         * adding 2px to account for a border of 1px on both sides of
         * the image. 30 - 1 + 2.
         */
        width: calc(100% + 31px);
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
      }

      #main-image-container {
        max-height: 1024px;
        overflow: auto;
      }

      #main-image-container img {
        cursor: pointer;
        display: block;
        image-rendering: -moz-crisp-edges;
        image-rendering: pixelated;
        width: 100%;
        height: auto;
      }

      paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }
      [hidden] {
        display: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],_n.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],_n.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"ofSamples",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"tagMetadata",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],_n.prototype,"actualSize",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"brightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],_n.prototype,"contrastPercentage",void 0);E([A({type:Object}),w("design:type",Ae)],_n.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"_metadataCanceller",void 0);E([A({type:Object}),w("design:type",Object)],_n.prototype,"_imageCanceller",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],_n.prototype,"_steps",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],_n.prototype,"_stepIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],_n.prototype,"_isImageLoading",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_runColor",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasAtLeastOneStep",null);E([Rt("_steps"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasMultipleSteps",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],_n.prototype,"_currentStep",null);E([Rt("_currentStep"),w("design:type",Number),w("design:paramtypes",[])],_n.prototype,"_stepValue",null);E([Rt("_currentStep"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_currentWallTime",null);E([Rt("_steps"),w("design:type",Number),w("design:paramtypes",[])],_n.prototype,"_maxStepIndex",null);E([Rt("sample"),w("design:type",String),w("design:paramtypes",[])],_n.prototype,"_sampleText",null);E([Rt("ofSamples"),w("design:type",Boolean),w("design:paramtypes",[])],_n.prototype,"_hasMultipleSamples",null);E([Bt("run","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],_n.prototype,"reload",null);E([Bt("_currentStep","brightnessAdjustment","contrastPercentage"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],_n.prototype,"_updateImageUrl",null);_n=E([yt("tf-image-loader")],_n);var Io=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._defaultBrightnessAdjustment=1,this._defaultContrastPercentage=100,this._brightnessAdjustment=1,this._contrastPercentage=100,this._requestManager=new Ae}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadImages()})}_fetchTags(){let t=_e().pluginRoute("images","/tags");return this._requestManager.request(t).then(r=>{if(p1.isEqual(r,this._runToTagInfo))return;let n=p1.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadImages(){var t;(t=this.root)==null||t.querySelectorAll("tf-image-loader").forEach(r=>{r.reload()})}_shouldOpen(t){return t<=2}_resetBrightness(){this._brightnessAdjustment=this._defaultBrightnessAdjustment}_resetContrast(){this._contrastPercentage=this._defaultContrastPercentage}get _brightnessIsDefault(){var t=this._brightnessAdjustment;return t===this._defaultBrightnessAdjustment}get _contrastIsDefault(){var t=this._contrastPercentage;return t===this._defaultContrastPercentage}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter,i=this._categoriesDomReady;let o=p1.mapValues(t,c=>Object.keys(c)),a=Ql(o,r,n);function s(c){let u=t[c.run][c.tag].samples;return p1.range(u).map(h=>Object.assign({},c,{sample:h,ofSamples:u}))}return a.map(c=>Object.assign({},c,{items:[].concat.apply([],c.items.map(s))}))}_tagMetadata(t,r,n){return t[r][n]}};Io.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox checked="{{_actualSize}}"
                >Show actual image size</paper-checkbox
              >
            </div>
          </div>
          <div class="sidebar-section">
            <h3 class="tooltip-container">Brightness adjustment</h3>
            <div class="resettable-slider-container">
              <paper-slider
                min="0"
                max="2"
                snaps
                pin
                step="0.01"
                value="{{_brightnessAdjustment}}"
                immediate-value="{{_brightnessAdjustment}}"
              ></paper-slider>
              <paper-button
                class="x-button"
                on-tap="_resetBrightness"
                disabled="[[_brightnessIsDefault]]"
                >Reset</paper-button
              >
            </div>
          </div>
          <div class="sidebar-section">
            <h3 class="tooltip-container">Contrast adjustment</h3>
            <div class="resettable-slider-container">
              <paper-slider
                min="0"
                max="500"
                snaps
                pin
                step="1"
                value="{{_contrastPercentage}}"
                immediate-value="{{_contrastPercentage}}"
              ></paper-slider>
              <paper-button
                class="x-button"
                on-tap="_resetContrast"
                disabled="[[_contrastIsDefault]]"
                >Reset</paper-button
              >
            </div>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector
            id="runs-selector"
            selected-runs="{{_selectedRuns}}"
          ></tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No image data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any image data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-image-loader
                  active="[[active]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  of-samples="[[item.ofSamples]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.run, item.tag)]]"
                  request-manager="[[_requestManager]]"
                  actual-size="[[_actualSize]]"
                  brightness-adjustment="[[_brightnessAdjustment]]"
                  contrast-percentage="[[_contrastPercentage]]"
                ></tf-image-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .resettable-slider-container {
        display: flex;
      }
      .resettable-slider-container paper-slider {
        flex-grow: 1;
      }
      .resettable-slider-container paper-button {
        flex-grow: 0;
      }
      .resettable-slider-container paper-button[disabled] {
        background-color: unset;
      }
      .x-button {
        font-size: 13px;
        background-color: var(--tb-ui-light-accent);
        color: var(--tb-ui-dark-accent);
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      paper-slider {
        --paper-slider-active-color: var(--tb-orange-strong);
        --paper-slider-knob-color: var(--tb-orange-strong);
        --paper-slider-knob-start-border-color: var(--tb-orange-strong);
        --paper-slider-knob-start-color: var(--tb-orange-strong);
        --paper-slider-markers-color: var(--tb-orange-strong);
        --paper-slider-pin-color: var(--tb-orange-strong);
        --paper-slider-pin-start-color: var(--tb-orange-strong);
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],Io.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Io.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_dataNotFound",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_actualSize",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_defaultBrightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_defaultContrastPercentage",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_brightnessAdjustment",void 0);E([A({type:Number}),w("design:type",Number)],Io.prototype,"_contrastPercentage",void 0);E([A({type:String}),w("design:type",String)],Io.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Io.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],Io.prototype,"_requestManager",void 0);E([Rt("_brightnessAdjustment"),w("design:type",Boolean),w("design:paramtypes",[])],Io.prototype,"_brightnessIsDefault",null);E([Rt("_contrastPercentage"),w("design:type",Boolean),w("design:paramtypes",[])],Io.prototype,"_contrastIsDefault",null);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Io.prototype,"_categories",null);Io=E([yt("tf-image-dashboard")],Io);var sx=Ee(Oe(),1);var d1;(function(e){e[e.CANCELLED=1]="CANCELLED"})(d1||(d1={}));var cV;(function(e){e[e.VERTEX=1]="VERTEX",e[e.FACE=2]="FACE",e[e.COLOR=3]="COLOR"})(cV||(cV={}));var qct;(function(e){e.VERTEX="float32",e.FACE="int32",e.COLOR="uint8"})(qct||(qct={}));var IP=class{constructor(t){this._canceller=new an,this._requestManager=t}reload(t,r,n){return this._canceller.cancelAll(),this._fetchMetadata(t,r,n)}_fetchDataByStep(t,r,n,i,o,a){let s=_e().pluginRoute("mesh","/data",new URLSearchParams({tag:r,run:t,content_type:n,sample:String(i),step:String(o)})),l=function(u){let f=[];for(let p=0;p<u.length/3;p++){let d=[];for(let g=0;g<3;g++)d.push(u[p*3+g]);f.push(d)}return f},c=this._canceller.cancellable(u=>{if(u.cancelled)return Promise.reject({code:d1.CANCELLED,message:"Response was invalidated."});let h=u.value;switch(n){case"VERTEX":a.vertices=l(new Float32Array(h));break;case"FACE":a.faces=l(new Int32Array(h));break;case"COLOR":a.colors=l(new Uint8Array(h));break}return a});return this._requestManager.fetch(s,{method:"GET",headers:{responseType:"arraybuffer",contentType:qct[n]}}).then(u=>u.arrayBuffer()).then(c)}fetchData(t,r,n,i){let o=[],a=new Map;return Object.keys(cV).forEach(s=>{let l=1<<cV[s];t.components&l&&o.push(this._fetchDataByStep(r,n,s,i,t.step,a))}),Promise.all(o)}_fetchMetadata(t,r,n){this._canceller.cancelAll();let i=_e().pluginRoute("mesh","/meshes",new URLSearchParams({tag:r,run:t,sample:n})),o=this._canceller.cancellable(a=>a.cancelled?Promise.reject({code:d1.CANCELLED,message:"Response was invalidated."}):a.value);return this._requestManager.fetch(i).then(a=>a.json()).then(o).then(this._processMetadata.bind(this))}_processMetadata(t){if(!t)return;let r=new Map;for(let i=0;i<t.length;i++){let o=t[i];r.has(o.step)||r.set(o.step,[]),r.get(o.step).push(o)}let n=[];return r.forEach(i=>{let o=this._createStepDatum(i[0]);n.push(o)}),n}_createStepDatum(t){return{wall_time:new Date(t.wall_time*1e3),step:t.step,config:t.config,content_type:t.content_type,components:t.components}}};var wM={};Ks(wM,{ACESFilmicToneMapping:()=>pfe,AddEquation:()=>M1,AddOperation:()=>cfe,AdditiveAnimationBlendMode:()=>kht,AdditiveBlending:()=>Mut,AlphaFormat:()=>xfe,AlwaysDepth:()=>rfe,AlwaysStencilFunc:()=>Ofe,AmbientLight:()=>L6,AmbientLightProbe:()=>zU,AnimationClip:()=>Q1,AnimationLoader:()=>oht,AnimationMixer:()=>VU,AnimationObjectGroup:()=>HU,AnimationUtils:()=>Yn,ArcCurve:()=>l6,ArrayCamera:()=>n6,ArrowHelper:()=>Mht,Audio:()=>D6,AudioAnalyser:()=>FU,AudioContext:()=>zht,AudioListener:()=>cht,AudioLoader:()=>DU,AxesHelper:()=>vM,AxisHelper:()=>K0r,BackSide:()=>Ii,BasicDepthPacking:()=>Rfe,BasicShadowMap:()=>mhr,BinaryTextureLoader:()=>e_r,Bone:()=>sM,BooleanKeyframeTrack:()=>am,BoundingBoxHelper:()=>Z0r,Box2:()=>$0,Box3:()=>ta,Box3Helper:()=>wht,BoxBufferGeometry:()=>Qf,BoxGeometry:()=>Qf,BoxHelper:()=>yM,BufferAttribute:()=>Je,BufferGeometry:()=>Pe,BufferGeometryLoader:()=>RU,ByteType:()=>mfe,Cache:()=>tx,Camera:()=>R1,CameraHelper:()=>bht,CanvasRenderer:()=>n_r,CanvasTexture:()=>xU,CatmullRomCurve3:()=>c6,CineonToneMapping:()=>ffe,CircleBufferGeometry:()=>F1,CircleGeometry:()=>F1,ClampToEdgeWrapping:()=>Jo,Clock:()=>mM,Color:()=>ne,ColorKeyframeTrack:()=>M6,CompressedTexture:()=>a6,CompressedTextureLoader:()=>aht,ConeBufferGeometry:()=>B1,ConeGeometry:()=>B1,CubeCamera:()=>J3,CubeReflectionMapping:()=>nx,CubeRefractionMapping:()=>ix,CubeTexture:()=>H0,CubeTextureLoader:()=>TU,CubeUVReflectionMapping:()=>xM,CubeUVRefractionMapping:()=>z6,CubicBezierCurve:()=>cM,CubicBezierCurve3:()=>u6,CubicInterpolant:()=>SU,CullFaceBack:()=>Sut,CullFaceFront:()=>Vhe,CullFaceFrontBack:()=>dhr,CullFaceNone:()=>Hhe,Curve:()=>fs,CurvePath:()=>wU,CustomBlending:()=>qhe,CustomToneMapping:()=>dfe,CylinderBufferGeometry:()=>om,CylinderGeometry:()=>om,Cylindrical:()=>mht,DataTexture:()=>Jd,DataTexture2DArray:()=>tM,DataTexture3D:()=>r6,DataTextureLoader:()=>CU,DataUtils:()=>Tht,DecrementStencilOp:()=>Thr,DecrementWrapStencilOp:()=>Ahr,DefaultLoadingManager:()=>ipe,DepthFormat:()=>z0,DepthStencilFormat:()=>k1,DepthTexture:()=>nM,DirectionalLight:()=>I6,DirectionalLightHelper:()=>xht,DiscreteInterpolant:()=>MU,DodecahedronBufferGeometry:()=>H1,DodecahedronGeometry:()=>H1,DoubleSide:()=>L1,DstAlphaFactor:()=>Khe,DstColorFactor:()=>Jhe,DynamicBufferAttribute:()=>H0r,DynamicCopyUsage:()=>Uhr,DynamicDrawUsage:()=>Y3,DynamicReadUsage:()=>Bhr,EdgesGeometry:()=>s6,EdgesHelper:()=>J0r,EllipseCurve:()=>V1,EqualDepth:()=>ife,EqualStencilFunc:()=>khr,EquirectangularReflectionMapping:()=>YP,EquirectangularRefractionMapping:()=>jP,Euler:()=>tm,EventDispatcher:()=>Us,ExtrudeBufferGeometry:()=>hh,ExtrudeGeometry:()=>hh,FaceColors:()=>P0r,FileLoader:()=>Jc,FlatShading:()=>Aht,Float16BufferAttribute:()=>dU,Float32Attribute:()=>X0r,Float32BufferAttribute:()=>xe,Float64Attribute:()=>$0r,Float64BufferAttribute:()=>mU,FloatType:()=>jd,Fog:()=>z1,FogExp2:()=>O1,Font:()=>u_r,FontLoader:()=>c_r,FramebufferTexture:()=>vU,FrontSide:()=>I1,Frustum:()=>N1,GLBufferAttribute:()=>qU,GLSL1:()=>Ghr,GLSL3:()=>Kut,GreaterDepth:()=>afe,GreaterEqualDepth:()=>ofe,GreaterEqualStencilFunc:()=>Ohr,GreaterStencilFunc:()=>Nhr,GridHelper:()=>YU,Group:()=>Xd,HalfFloatType:()=>C1,HemisphereLight:()=>T6,HemisphereLightHelper:()=>yht,HemisphereLightProbe:()=>OU,IcosahedronBufferGeometry:()=>G1,IcosahedronGeometry:()=>G1,ImageBitmapLoader:()=>NU,ImageLoader:()=>ex,ImageUtils:()=>Kf,ImmediateRenderObject:()=>h_r,IncrementStencilOp:()=>Ehr,IncrementWrapStencilOp:()=>Chr,InstancedBufferAttribute:()=>rm,InstancedBufferGeometry:()=>N6,InstancedInterleavedBuffer:()=>UU,InstancedMesh:()=>i6,Int16Attribute:()=>G0r,Int16BufferAttribute:()=>fU,Int32Attribute:()=>Y0r,Int32BufferAttribute:()=>pU,Int8Attribute:()=>V0r,Int8BufferAttribute:()=>cU,IntType:()=>_fe,InterleavedBuffer:()=>em,InterleavedBufferAttribute:()=>tp,Interpolant:()=>fh,InterpolateDiscrete:()=>KP,InterpolateLinear:()=>ZP,InterpolateSmooth:()=>rU,InvertStencilOp:()=>Phr,JSONLoader:()=>i_r,KeepStencilOp:()=>nU,KeyframeTrack:()=>Dl,LOD:()=>_U,LatheBufferGeometry:()=>W1,LatheGeometry:()=>W1,Layers:()=>X3,LensFlare:()=>a_r,LessDepth:()=>nfe,LessEqualDepth:()=>iU,LessEqualStencilFunc:()=>Rhr,LessStencilFunc:()=>Lhr,Light:()=>Ol,LightProbe:()=>rx,Line:()=>ch,Line3:()=>GU,LineBasicMaterial:()=>Gi,LineCurve:()=>U1,LineCurve3:()=>bU,LineDashedMaterial:()=>w6,LineLoop:()=>o6,LinePieces:()=>C0r,LineSegments:()=>Aa,LineStrip:()=>T0r,LinearEncoding:()=>Qd,LinearFilter:()=>ii,LinearInterpolant:()=>S6,LinearMipMapLinearFilter:()=>xhr,LinearMipMapNearestFilter:()=>vhr,LinearMipmapLinearFilter:()=>ox,LinearMipmapNearestFilter:()=>Lht,LinearToneMapping:()=>ufe,Loader:()=>ea,LoaderUtils:()=>dM,LoadingManager:()=>E6,LoopOnce:()=>Pfe,LoopPingPong:()=>Lfe,LoopRepeat:()=>Ife,LuminanceAlphaFormat:()=>wfe,LuminanceFormat:()=>bfe,MOUSE:()=>K0,Material:()=>qi,MaterialLoader:()=>kU,Math:()=>ifr,MathUtils:()=>ifr,Matrix3:()=>ki,Matrix4:()=>Me,MaxEquation:()=>Aut,Mesh:()=>ti,MeshBasicMaterial:()=>sh,MeshDepthMaterial:()=>eM,MeshDistanceMaterial:()=>rM,MeshFaceMaterial:()=>L0r,MeshLambertMaterial:()=>x6,MeshMatcapMaterial:()=>b6,MeshNormalMaterial:()=>v6,MeshPhongMaterial:()=>_6,MeshPhysicalMaterial:()=>g6,MeshStandardMaterial:()=>pM,MeshToonMaterial:()=>y6,MinEquation:()=>Cut,MirroredRepeatWrapping:()=>$P,MixOperation:()=>lfe,MultiMaterial:()=>k0r,MultiplyBlending:()=>Tut,MultiplyOperation:()=>O6,NearestFilter:()=>Li,NearestMipMapLinearFilter:()=>yhr,NearestMipMapNearestFilter:()=>_hr,NearestMipmapLinearFilter:()=>aU,NearestMipmapNearestFilter:()=>oU,NeverDepth:()=>efe,NeverStencilFunc:()=>Ihr,NoBlending:()=>$d,NoColors:()=>A0r,NoToneMapping:()=>Kd,NormalAnimationBlendMode:()=>$U,NormalBlending:()=>V3,NotEqualDepth:()=>sfe,NotEqualStencilFunc:()=>Dhr,NumberKeyframeTrack:()=>Z1,Object3D:()=>or,ObjectLoader:()=>sht,ObjectSpaceNormalMap:()=>Dfe,OctahedronBufferGeometry:()=>W0,OctahedronGeometry:()=>W0,OneFactor:()=>jhe,OneMinusDstAlphaFactor:()=>Zhe,OneMinusDstColorFactor:()=>Qhe,OneMinusSrcAlphaFactor:()=>Iht,OneMinusSrcColorFactor:()=>$he,OrthographicCamera:()=>D1,PCFShadowMap:()=>Cht,PCFSoftShadowMap:()=>Uhe,PMREMGenerator:()=>e6,ParametricGeometry:()=>s_r,Particle:()=>N0r,ParticleBasicMaterial:()=>z0r,ParticleSystem:()=>D0r,ParticleSystemMaterial:()=>F0r,Path:()=>q1,PerspectiveCamera:()=>Ui,Plane:()=>$c,PlaneBufferGeometry:()=>V0,PlaneGeometry:()=>V0,PlaneHelper:()=>Sht,PointCloud:()=>R0r,PointCloudMaterial:()=>O0r,PointLight:()=>P6,PointLightHelper:()=>_ht,Points:()=>im,PointsMaterial:()=>nm,PolarGridHelper:()=>vht,PolyhedronBufferGeometry:()=>uh,PolyhedronGeometry:()=>uh,PositionalAudio:()=>uht,PropertyBinding:()=>Cr,PropertyMixer:()=>BU,QuadraticBezierCurve:()=>uM,QuadraticBezierCurve3:()=>hM,Quaternion:()=>yi,QuaternionKeyframeTrack:()=>X0,QuaternionLinearInterpolant:()=>EU,REVISION:()=>jU,RGBADepthPacking:()=>Nfe,RGBAFormat:()=>Qo,RGBAIntegerFormat:()=>Cfe,RGBA_ASTC_10x10_Format:()=>Yut,RGBA_ASTC_10x5_Format:()=>qut,RGBA_ASTC_10x6_Format:()=>Gut,RGBA_ASTC_10x8_Format:()=>Wut,RGBA_ASTC_12x10_Format:()=>jut,RGBA_ASTC_12x12_Format:()=>Xut,RGBA_ASTC_4x4_Format:()=>Dut,RGBA_ASTC_5x4_Format:()=>Out,RGBA_ASTC_5x5_Format:()=>zut,RGBA_ASTC_6x5_Format:()=>Fut,RGBA_ASTC_6x6_Format:()=>But,RGBA_ASTC_8x5_Format:()=>Hut,RGBA_ASTC_8x6_Format:()=>Vut,RGBA_ASTC_8x8_Format:()=>Uut,RGBA_BPTC_Format:()=>$ut,RGBA_ETC2_EAC_Format:()=>Nut,RGBA_PVRTC_2BPPV1_Format:()=>kut,RGBA_PVRTC_4BPPV1_Format:()=>Lut,RGBA_S3TC_DXT1_Format:()=>QV,RGBA_S3TC_DXT3_Format:()=>tU,RGBA_S3TC_DXT5_Format:()=>eU,RGB_ETC1_Format:()=>Afe,RGB_ETC2_Format:()=>Rut,RGB_PVRTC_2BPPV1_Format:()=>Iut,RGB_PVRTC_4BPPV1_Format:()=>Put,RGB_S3TC_DXT1_Format:()=>JV,RGFormat:()=>Efe,RGIntegerFormat:()=>Tfe,RawShaderMaterial:()=>U0,Ray:()=>Jf,Raycaster:()=>pht,RectAreaLight:()=>k6,RedFormat:()=>Sfe,RedIntegerFormat:()=>Mfe,ReinhardToneMapping:()=>hfe,RepeatWrapping:()=>XP,ReplaceStencilOp:()=>Mhr,ReverseSubtractEquation:()=>Whe,RingBufferGeometry:()=>Y1,RingGeometry:()=>Y1,Scene:()=>q0,SceneUtils:()=>o_r,ShaderChunk:()=>hr,ShaderLib:()=>ah,ShaderMaterial:()=>lh,ShadowMaterial:()=>m6,Shape:()=>Kc,ShapeBufferGeometry:()=>Y0,ShapeGeometry:()=>Y0,ShapePath:()=>Eht,ShapeUtils:()=>Zc,ShortType:()=>gfe,Skeleton:()=>lM,SkeletonHelper:()=>WU,SkinnedMesh:()=>aM,SmoothShading:()=>ghr,Sphere:()=>Zf,SphereBufferGeometry:()=>j0,SphereGeometry:()=>j0,Spherical:()=>_M,SphericalHarmonics3:()=>R6,SplineCurve:()=>fM,SpotLight:()=>A6,SpotLightHelper:()=>ght,Sprite:()=>oM,SpriteMaterial:()=>iM,SrcAlphaFactor:()=>Pht,SrcAlphaSaturateFactor:()=>tfe,SrcColorFactor:()=>Xhe,StaticCopyUsage:()=>Vhr,StaticDrawUsage:()=>W3,StaticReadUsage:()=>Fhr,StereoCamera:()=>lht,StreamCopyUsage:()=>qhr,StreamDrawUsage:()=>zhr,StreamReadUsage:()=>Hhr,StringKeyframeTrack:()=>sm,SubtractEquation:()=>Ghe,SubtractiveBlending:()=>Eut,TOUCH:()=>Z0,TangentSpaceNormalMap:()=>ax,TetrahedronBufferGeometry:()=>j1,TetrahedronGeometry:()=>j1,TextGeometry:()=>l_r,Texture:()=>vi,TextureLoader:()=>AU,TorusBufferGeometry:()=>X1,TorusGeometry:()=>X1,TorusKnotBufferGeometry:()=>$1,TorusKnotGeometry:()=>$1,Triangle:()=>oi,TriangleFanDrawMode:()=>whr,TriangleStripDrawMode:()=>bhr,TrianglesDrawMode:()=>kfe,TubeBufferGeometry:()=>K1,TubeGeometry:()=>K1,UVMapping:()=>XU,Uint16Attribute:()=>W0r,Uint16BufferAttribute:()=>$3,Uint32Attribute:()=>j0r,Uint32BufferAttribute:()=>K3,Uint8Attribute:()=>U0r,Uint8BufferAttribute:()=>uU,Uint8ClampedAttribute:()=>q0r,Uint8ClampedBufferAttribute:()=>hU,Uniform:()=>gM,UniformsLib:()=>re,UniformsUtils:()=>Vfe,UnsignedByteType:()=>Zd,UnsignedInt248Type:()=>A1,UnsignedIntType:()=>VP,UnsignedShort4444Type:()=>yfe,UnsignedShort5551Type:()=>vfe,UnsignedShortType:()=>G3,VSMShadowMap:()=>F3,Vector2:()=>Lt,Vector3:()=>j,Vector4:()=>en,VectorKeyframeTrack:()=>J1,Vertex:()=>B0r,VertexColors:()=>I0r,VideoTexture:()=>yU,WebGL1Renderer:()=>gU,WebGLCubeRenderTarget:()=>Q3,WebGLMultipleRenderTargets:()=>lU,WebGLMultisampleRenderTarget:()=>j3,WebGLRenderTarget:()=>us,WebGLRenderTargetCube:()=>r_r,WebGLRenderer:()=>rn,WebGLUtils:()=>Qfe,WireframeGeometry:()=>d6,WireframeHelper:()=>Q0r,WrapAroundEnding:()=>JP,XHRLoader:()=>t_r,ZeroCurvatureEnding:()=>E1,ZeroFactor:()=>Yhe,ZeroSlopeEnding:()=>T1,ZeroStencilOp:()=>Shr,_SRGBAFormat:()=>sU,sRGBEncoding:()=>Wn});var jU="137",K0={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},Z0={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Hhe=0,Sut=1,Vhe=2,dhr=3,mhr=0,Cht=1,Uhe=2,F3=3,I1=0,Ii=1,L1=2,Aht=1,ghr=2,$d=0,V3=1,Mut=2,Eut=3,Tut=4,qhe=5,M1=100,Ghe=101,Whe=102,Cut=103,Aut=104,Yhe=200,jhe=201,Xhe=202,$he=203,Pht=204,Iht=205,Khe=206,Zhe=207,Jhe=208,Qhe=209,tfe=210,efe=0,rfe=1,nfe=2,iU=3,ife=4,ofe=5,afe=6,sfe=7,O6=0,lfe=1,cfe=2,Kd=0,ufe=1,hfe=2,ffe=3,pfe=4,dfe=5,XU=300,nx=301,ix=302,YP=303,jP=304,xM=306,z6=307,XP=1e3,Jo=1001,$P=1002,Li=1003,oU=1004,_hr=1004,aU=1005,yhr=1005,ii=1006,Lht=1007,vhr=1007,ox=1008,xhr=1008,Zd=1009,mfe=1010,gfe=1011,G3=1012,_fe=1013,VP=1014,jd=1015,C1=1016,yfe=1017,vfe=1018,A1=1020,xfe=1021,Qo=1023,bfe=1024,wfe=1025,z0=1026,k1=1027,Sfe=1028,Mfe=1029,Efe=1030,Tfe=1031,Cfe=1033,JV=33776,QV=33777,tU=33778,eU=33779,Put=35840,Iut=35841,Lut=35842,kut=35843,Afe=36196,Rut=37492,Nut=37496,Dut=37808,Out=37809,zut=37810,Fut=37811,But=37812,Hut=37813,Vut=37814,Uut=37815,qut=37816,Gut=37817,Wut=37818,Yut=37819,jut=37820,Xut=37821,$ut=36492,Pfe=2200,Ife=2201,Lfe=2202,KP=2300,ZP=2301,rU=2302,E1=2400,T1=2401,JP=2402,$U=2500,kht=2501,kfe=0,bhr=1,whr=2,Qd=3e3,Wn=3001,Rfe=3200,Nfe=3201,ax=0,Dfe=1,Shr=0,nU=7680,Mhr=7681,Ehr=7682,Thr=7683,Chr=34055,Ahr=34056,Phr=5386,Ihr=512,Lhr=513,khr=514,Rhr=515,Nhr=516,Dhr=517,Ohr=518,Ofe=519,W3=35044,Y3=35048,zhr=35040,Fhr=35045,Bhr=35049,Hhr=35041,Vhr=35046,Uhr=35050,qhr=35042,Ghr="100",Kut="300 es",sU=1035,Us=class{addEventListener(t,r){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(r)===-1&&n[t].push(r)}hasEventListener(t,r){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(r)!==-1}removeEventListener(t,r){if(this._listeners===void 0)return;let i=this._listeners[t];if(i!==void 0){let o=i.indexOf(r);o!==-1&&i.splice(o,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let i=n.slice(0);for(let o=0,a=i.length;o<a;o++)i[o].call(this,t);t.target=null}}},Ko=[];for(let e=0;e<256;e++)Ko[e]=(e<16?"0":"")+e.toString(16);var uV=1234567,P1=Math.PI/180,QP=180/Math.PI;function Nl(){let e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,r=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Ko[e&255]+Ko[e>>8&255]+Ko[e>>16&255]+Ko[e>>24&255]+"-"+Ko[t&255]+Ko[t>>8&255]+"-"+Ko[t>>16&15|64]+Ko[t>>24&255]+"-"+Ko[r&63|128]+Ko[r>>8&255]+"-"+Ko[r>>16&255]+Ko[r>>24&255]+Ko[n&255]+Ko[n>>8&255]+Ko[n>>16&255]+Ko[n>>24&255]).toUpperCase()}function Zo(e,t,r){return Math.max(t,Math.min(r,e))}function Rht(e,t){return(e%t+t)%t}function Whr(e,t,r,n,i){return n+(e-t)*(i-n)/(r-t)}function Yhr(e,t,r){return e!==t?(r-e)/(t-e):0}function UP(e,t,r){return(1-r)*e+r*t}function jhr(e,t,r,n){return UP(e,t,1-Math.exp(-r*n))}function Xhr(e,t=1){return t-Math.abs(Rht(e,t*2)-t)}function $hr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*(3-2*e))}function Khr(e,t,r){return e<=t?0:e>=r?1:(e=(e-t)/(r-t),e*e*e*(e*(e*6-15)+10))}function Zhr(e,t){return e+Math.floor(Math.random()*(t-e+1))}function Jhr(e,t){return e+Math.random()*(t-e)}function Qhr(e){return e*(.5-Math.random())}function tfr(e){return e!==void 0&&(uV=e%2147483647),uV=uV*16807%2147483647,(uV-1)/2147483646}function efr(e){return e*P1}function rfr(e){return e*QP}function Zut(e){return(e&e-1)===0&&e!==0}function zfe(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Ffe(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function nfr(e,t,r,n,i){let o=Math.cos,a=Math.sin,s=o(r/2),l=a(r/2),c=o((t+n)/2),u=a((t+n)/2),h=o((t-n)/2),f=a((t-n)/2),p=o((n-t)/2),d=a((n-t)/2);switch(i){case"XYX":e.set(s*u,l*h,l*f,s*c);break;case"YZY":e.set(l*f,s*u,l*h,s*c);break;case"ZXZ":e.set(l*h,l*f,s*u,s*c);break;case"XZX":e.set(s*u,l*d,l*p,s*c);break;case"YXY":e.set(l*p,s*u,l*d,s*c);break;case"ZYZ":e.set(l*d,l*p,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}var ifr=Object.freeze({__proto__:null,DEG2RAD:P1,RAD2DEG:QP,generateUUID:Nl,clamp:Zo,euclideanModulo:Rht,mapLinear:Whr,inverseLerp:Yhr,lerp:UP,damp:jhr,pingpong:Xhr,smoothstep:$hr,smootherstep:Khr,randInt:Zhr,randFloat:Jhr,randFloatSpread:Qhr,seededRandom:tfr,degToRad:efr,radToDeg:rfr,isPowerOfTwo:Zut,ceilPowerOfTwo:zfe,floorPowerOfTwo:Ffe,setQuaternionFromProperEuler:nfr}),Lt=class{constructor(t=0,r=0){this.x=t,this.y=r}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,r){return this.x=t,this.y=r,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let r=this.x,n=this.y,i=t.elements;return this.x=i[0]*r+i[3]*n+i[6],this.y=i[1]*r+i[4]*n+i[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let r=this.x-t.x,n=this.y-t.y;return r*r+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this}rotateAround(t,r){let n=Math.cos(r),i=Math.sin(r),o=this.x-t.x,a=this.y-t.y;return this.x=o*n-a*i+t.x,this.y=o*i+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};Lt.prototype.isVector2=!0;var ki=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,r,n,i,o,a,s,l,c){let u=this.elements;return u[0]=t,u[1]=i,u[2]=s,u[3]=r,u[4]=o,u[5]=l,u[6]=n,u[7]=a,u[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let r=this.elements,n=t.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],this}extractBasis(t,r,n){return t.setFromMatrix3Column(this,0),r.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let r=t.elements;return this.set(r[0],r[4],r[8],r[1],r[5],r[9],r[2],r[6],r[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,r){let n=t.elements,i=r.elements,o=this.elements,a=n[0],s=n[3],l=n[6],c=n[1],u=n[4],h=n[7],f=n[2],p=n[5],d=n[8],g=i[0],_=i[3],y=i[6],x=i[1],b=i[4],S=i[7],C=i[2],P=i[5],k=i[8];return o[0]=a*g+s*x+l*C,o[3]=a*_+s*b+l*P,o[6]=a*y+s*S+l*k,o[1]=c*g+u*x+h*C,o[4]=c*_+u*b+h*P,o[7]=c*y+u*S+h*k,o[2]=f*g+p*x+d*C,o[5]=f*_+p*b+d*P,o[8]=f*y+p*S+d*k,this}multiplyScalar(t){let r=this.elements;return r[0]*=t,r[3]*=t,r[6]*=t,r[1]*=t,r[4]*=t,r[7]*=t,r[2]*=t,r[5]*=t,r[8]*=t,this}determinant(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8];return r*a*u-r*s*c-n*o*u+n*s*l+i*o*c-i*a*l}invert(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=u*a-s*c,f=s*l-u*o,p=c*o-a*l,d=r*h+n*f+i*p;if(d===0)return this.set(0,0,0,0,0,0,0,0,0);let g=1/d;return t[0]=h*g,t[1]=(i*c-u*n)*g,t[2]=(s*n-i*a)*g,t[3]=f*g,t[4]=(u*r-i*l)*g,t[5]=(i*o-s*r)*g,t[6]=p*g,t[7]=(n*l-c*r)*g,t[8]=(a*r-n*o)*g,this}transpose(){let t,r=this.elements;return t=r[1],r[1]=r[3],r[3]=t,t=r[2],r[2]=r[6],r[6]=t,t=r[5],r[5]=r[7],r[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let r=this.elements;return t[0]=r[0],t[1]=r[3],t[2]=r[6],t[3]=r[1],t[4]=r[4],t[5]=r[7],t[6]=r[2],t[7]=r[5],t[8]=r[8],this}setUvTransform(t,r,n,i,o,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+t,-i*c,i*l,-i*(-c*a+l*s)+s+r,0,0,1),this}scale(t,r){let n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=r,n[4]*=r,n[7]*=r,this}rotate(t){let r=Math.cos(t),n=Math.sin(t),i=this.elements,o=i[0],a=i[3],s=i[6],l=i[1],c=i[4],u=i[7];return i[0]=r*o+n*l,i[3]=r*a+n*c,i[6]=r*s+n*u,i[1]=-n*o+r*l,i[4]=-n*a+r*c,i[7]=-n*s+r*u,this}translate(t,r){let n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=r*n[2],n[4]+=r*n[5],n[7]+=r*n[8],this}equals(t){let r=this.elements,n=t.elements;for(let i=0;i<9;i++)if(r[i]!==n[i])return!1;return!0}fromArray(t,r=0){for(let n=0;n<9;n++)this.elements[n]=t[n+r];return this}toArray(t=[],r=0){let n=this.elements;return t[r]=n[0],t[r+1]=n[1],t[r+2]=n[2],t[r+3]=n[3],t[r+4]=n[4],t[r+5]=n[5],t[r+6]=n[6],t[r+7]=n[7],t[r+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}};ki.prototype.isMatrix3=!0;function Bfe(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}var ofr={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function B3(e,t){return new ofr[e](t)}function t6(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}var Hfe={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},nh={h:0,s:0,l:0},hV={h:0,s:0,l:0};function Gct(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*6*(2/3-r):e}function U3(e){return e<.04045?e*.0773993808:Math.pow(e*.9478672986+.0521327014,2.4)}function Wct(e){return e<.0031308?e*12.92:1.055*Math.pow(e,.41666)-.055}var ne=class{constructor(t,r,n){return r===void 0&&n===void 0?this.set(t):this.setRGB(t,r,n)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this}setRGB(t,r,n){return this.r=t,this.g=r,this.b=n,this}setHSL(t,r,n){if(t=Rht(t,1),r=Zo(r,0,1),n=Zo(n,0,1),r===0)this.r=this.g=this.b=n;else{let i=n<=.5?n*(1+r):n+r-n*r,o=2*n-i;this.r=Gct(o,i,t+1/3),this.g=Gct(o,i,t),this.b=Gct(o,i,t-1/3)}return this}setStyle(t){function r(i){i!==void 0&&parseFloat(i)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let n;if(n=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){let i,o=n[1],a=n[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))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,r(i[4]),this;if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))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,r(i[4]),this;break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let s=parseFloat(i[1])/360,l=parseInt(i[2],10)/100,c=parseInt(i[3],10)/100;return r(i[4]),this.setHSL(s,l,c)}break}}else if(n=/^\#([A-Fa-f\d]+)$/.exec(t)){let i=n[1],o=i.length;if(o===3)return this.r=parseInt(i.charAt(0)+i.charAt(0),16)/255,this.g=parseInt(i.charAt(1)+i.charAt(1),16)/255,this.b=parseInt(i.charAt(2)+i.charAt(2),16)/255,this;if(o===6)return this.r=parseInt(i.charAt(0)+i.charAt(1),16)/255,this.g=parseInt(i.charAt(2)+i.charAt(3),16)/255,this.b=parseInt(i.charAt(4)+i.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let r=Hfe[t.toLowerCase()];return r!==void 0?this.setHex(r):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=U3(t.r),this.g=U3(t.g),this.b=U3(t.b),this}copyLinearToSRGB(t){return this.r=Wct(t.r),this.g=Wct(t.g),this.b=Wct(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){let r=this.r,n=this.g,i=this.b,o=Math.max(r,n,i),a=Math.min(r,n,i),s,l,c=(a+o)/2;if(a===o)s=0,l=0;else{let u=o-a;switch(l=c<=.5?u/(o+a):u/(2-o-a),o){case r:s=(n-i)/u+(n<i?6:0);break;case n:s=(i-r)/u+2;break;case i:s=(r-n)/u+4;break}s/=6}return t.h=s,t.s=l,t.l=c,t}getStyle(){return"rgb("+(this.r*255|0)+","+(this.g*255|0)+","+(this.b*255|0)+")"}offsetHSL(t,r,n){return this.getHSL(nh),nh.h+=t,nh.s+=r,nh.l+=n,this.setHSL(nh.h,nh.s,nh.l),this}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,r){return this.r=t.r+r.r,this.g=t.g+r.g,this.b=t.b+r.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,r){return this.r+=(t.r-this.r)*r,this.g+=(t.g-this.g)*r,this.b+=(t.b-this.b)*r,this}lerpColors(t,r,n){return this.r=t.r+(r.r-t.r)*n,this.g=t.g+(r.g-t.g)*n,this.b=t.b+(r.b-t.b)*n,this}lerpHSL(t,r){this.getHSL(nh),t.getHSL(hV);let n=UP(nh.h,hV.h,r),i=UP(nh.s,hV.s,r),o=UP(nh.l,hV.l,r);return this.setHSL(n,i,o),this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,r=0){return this.r=t[r],this.g=t[r+1],this.b=t[r+2],this}toArray(t=[],r=0){return t[r]=this.r,t[r+1]=this.g,t[r+2]=this.b,t}fromBufferAttribute(t,r){return this.r=t.getX(r),this.g=t.getY(r),this.b=t.getZ(r),t.normalized===!0&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}};ne.NAMES=Hfe;ne.prototype.isColor=!0;ne.prototype.r=1;ne.prototype.g=1;ne.prototype.b=1;var v3,Kf=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement=="undefined")return t.src;let r;if(t instanceof HTMLCanvasElement)r=t;else{v3===void 0&&(v3=t6("canvas")),v3.width=t.width,v3.height=t.height;let n=v3.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),r=v3}return r.width>2048||r.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),r.toDataURL("image/jpeg",.6)):r.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement!="undefined"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&t instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&t instanceof ImageBitmap){let r=t6("canvas");r.width=t.width,r.height=t.height;let n=r.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let i=n.getImageData(0,0,t.width,t.height),o=i.data;for(let a=0;a<o.length;a++)o[a]=U3(o[a]/255)*255;return n.putImageData(i,0,0),r}else if(t.data){let r=t.data.slice(0);for(let n=0;n<r.length;n++)r instanceof Uint8Array||r instanceof Uint8ClampedArray?r[n]=Math.floor(U3(r[n]/255)*255):r[n]=U3(r[n]);return{data:r,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},afr=0,vi=class extends Us{constructor(t=vi.DEFAULT_IMAGE,r=vi.DEFAULT_MAPPING,n=Jo,i=Jo,o=ii,a=ox,s=Qo,l=Zd,c=1,u=Qd){super(),Object.defineProperty(this,"id",{value:afr++}),this.uuid=Nl(),this.name="",this.image=t,this.mipmaps=[],this.mapping=r,this.wrapS=n,this.wrapT=i,this.magFilter=o,this.minFilter=a,this.anisotropy=c,this.format=s,this.internalFormat=null,this.type=l,this.offset=new Lt(0,0),this.repeat=new Lt(1,1),this.center=new Lt(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new ki,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(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.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){let r=t===void 0||typeof t=="string";if(!r&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let 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(this.image!==void 0){let i=this.image;if(i.uuid===void 0&&(i.uuid=Nl()),!r&&t.images[i.uuid]===void 0){let o;if(Array.isArray(i)){o=[];for(let a=0,s=i.length;a<s;a++)i[a].isDataTexture?o.push(Yct(i[a].image)):o.push(Yct(i[a]))}else o=Yct(i);t.images[i.uuid]={uuid:i.uuid,url:o}}n.image=i.uuid}return JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData),r||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==XU)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case XP:t.x=t.x-Math.floor(t.x);break;case Jo:t.x=t.x<0?0:1;break;case $P:Math.abs(Math.floor(t.x)%2)===1?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x);break}if(t.y<0||t.y>1)switch(this.wrapT){case XP:t.y=t.y-Math.floor(t.y);break;case Jo:t.y=t.y<0?0:1;break;case $P:Math.abs(Math.floor(t.y)%2)===1?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y);break}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){t===!0&&this.version++}};vi.DEFAULT_IMAGE=void 0;vi.DEFAULT_MAPPING=XU;vi.prototype.isTexture=!0;function Yct(e){return typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap?Kf.getDataURL(e):e.data?{data:Array.prototype.slice.call(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var en=class{constructor(t=0,r=0,n=0,i=1){this.x=t,this.y=r,this.z=n,this.w=i}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,r,n,i){return this.x=t,this.y=r,this.z=n,this.w=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;case 3:this.w=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this.w=t.w+r.w,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this.w+=t.w*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this.w=t.w-r.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let r=this.x,n=this.y,i=this.z,o=this.w,a=t.elements;return this.x=a[0]*r+a[4]*n+a[8]*i+a[12]*o,this.y=a[1]*r+a[5]*n+a[9]*i+a[13]*o,this.z=a[2]*r+a[6]*n+a[10]*i+a[14]*o,this.w=a[3]*r+a[7]*n+a[11]*i+a[15]*o,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let r=Math.sqrt(1-t.w*t.w);return r<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/r,this.y=t.y/r,this.z=t.z/r),this}setAxisAngleFromRotationMatrix(t){let r,n,i,o,l=t.elements,c=l[0],u=l[4],h=l[8],f=l[1],p=l[5],d=l[9],g=l[2],_=l[6],y=l[10];if(Math.abs(u-f)<.01&&Math.abs(h-g)<.01&&Math.abs(d-_)<.01){if(Math.abs(u+f)<.1&&Math.abs(h+g)<.1&&Math.abs(d+_)<.1&&Math.abs(c+p+y-3)<.1)return this.set(1,0,0,0),this;r=Math.PI;let b=(c+1)/2,S=(p+1)/2,C=(y+1)/2,P=(u+f)/4,k=(h+g)/4,O=(d+_)/4;return b>S&&b>C?b<.01?(n=0,i=.707106781,o=.707106781):(n=Math.sqrt(b),i=P/n,o=k/n):S>C?S<.01?(n=.707106781,i=0,o=.707106781):(i=Math.sqrt(S),n=P/i,o=O/i):C<.01?(n=.707106781,i=.707106781,o=0):(o=Math.sqrt(C),n=k/o,i=O/o),this.set(n,i,o,r),this}let x=Math.sqrt((_-d)*(_-d)+(h-g)*(h-g)+(f-u)*(f-u));return Math.abs(x)<.001&&(x=1),this.x=(_-d)/x,this.y=(h-g)/x,this.z=(f-u)/x,this.w=Math.acos((c+p+y-1)/2),this}min(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(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(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this.z=Math.max(t.z,Math.min(r.z,this.z)),this.w=Math.max(t.w,Math.min(r.w,this.w)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this.z=Math.max(t,Math.min(r,this.z)),this.w=Math.max(t,Math.min(r,this.w)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this.w+=(t.w-this.w)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this.w=t.w+(r.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this.w=t[r+3],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t[r+3]=this.w,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this.w=t.getW(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};en.prototype.isVector4=!0;var us=class extends Us{constructor(t,r,n={}){super(),this.width=t,this.height=r,this.depth=1,this.scissor=new en(0,0,t,r),this.scissorTest=!1,this.viewport=new en(0,0,t,r),this.texture=new vi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:r,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:ii,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,r,n=1){(this.width!==t||this.height!==r||this.depth!==n)&&(this.width=t,this.height=r,this.depth=n,this.texture.image.width=t,this.texture.image.height=r,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,r),this.scissor.set(0,0,t,r)}clone(){return new this.constructor().copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image=Object.assign({},t.texture.image),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};us.prototype.isWebGLRenderTarget=!0;var lU=class extends us{constructor(t,r,n){super(t,r);let i=this.texture;this.texture=[];for(let o=0;o<n;o++)this.texture[o]=i.clone()}setSize(t,r,n=1){if(this.width!==t||this.height!==r||this.depth!==n){this.width=t,this.height=r,this.depth=n;for(let i=0,o=this.texture.length;i<o;i++)this.texture[i].image.width=t,this.texture[i].image.height=r,this.texture[i].image.depth=n;this.dispose()}return this.viewport.set(0,0,t,r),this.scissor.set(0,0,t,r),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let r=0,n=t.texture.length;r<n;r++)this.texture[r]=t.texture[r].clone();return this}};lU.prototype.isWebGLMultipleRenderTargets=!0;var j3=class extends us{constructor(t,r,n={}){super(t,r,n),this.samples=4,this.ignoreDepthForMultisampleCopy=n.ignoreDepth!==void 0?n.ignoreDepth:!0,this.useRenderToTexture=n.useRenderToTexture!==void 0?n.useRenderToTexture:!1,this.useRenderbuffer=this.useRenderToTexture===!1}copy(t){return super.copy.call(this,t),this.samples=t.samples,this.useRenderToTexture=t.useRenderToTexture,this.useRenderbuffer=t.useRenderbuffer,this}};j3.prototype.isWebGLMultisampleRenderTarget=!0;var yi=class{constructor(t=0,r=0,n=0,i=1){this._x=t,this._y=r,this._z=n,this._w=i}static slerp(t,r,n,i){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),n.slerpQuaternions(t,r,i)}static slerpFlat(t,r,n,i,o,a,s){let l=n[i+0],c=n[i+1],u=n[i+2],h=n[i+3],f=o[a+0],p=o[a+1],d=o[a+2],g=o[a+3];if(s===0){t[r+0]=l,t[r+1]=c,t[r+2]=u,t[r+3]=h;return}if(s===1){t[r+0]=f,t[r+1]=p,t[r+2]=d,t[r+3]=g;return}if(h!==g||l!==f||c!==p||u!==d){let _=1-s,y=l*f+c*p+u*d+h*g,x=y>=0?1:-1,b=1-y*y;if(b>Number.EPSILON){let C=Math.sqrt(b),P=Math.atan2(C,y*x);_=Math.sin(_*P)/C,s=Math.sin(s*P)/C}let S=s*x;if(l=l*_+f*S,c=c*_+p*S,u=u*_+d*S,h=h*_+g*S,_===1-s){let C=1/Math.sqrt(l*l+c*c+u*u+h*h);l*=C,c*=C,u*=C,h*=C}}t[r]=l,t[r+1]=c,t[r+2]=u,t[r+3]=h}static multiplyQuaternionsFlat(t,r,n,i,o,a){let s=n[i],l=n[i+1],c=n[i+2],u=n[i+3],h=o[a],f=o[a+1],p=o[a+2],d=o[a+3];return t[r]=s*d+u*h+l*p-c*f,t[r+1]=l*d+u*f+c*h-s*p,t[r+2]=c*d+u*p+s*f-l*h,t[r+3]=u*d-s*h-l*f-c*p,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,r,n,i){return this._x=t,this._y=r,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,r){if(!(t&&t.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=t._x,i=t._y,o=t._z,a=t._order,s=Math.cos,l=Math.sin,c=s(n/2),u=s(i/2),h=s(o/2),f=l(n/2),p=l(i/2),d=l(o/2);switch(a){case"XYZ":this._x=f*u*h+c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h-f*p*d;break;case"YXZ":this._x=f*u*h+c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h+f*p*d;break;case"ZXY":this._x=f*u*h-c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h-f*p*d;break;case"ZYX":this._x=f*u*h-c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h+f*p*d;break;case"YZX":this._x=f*u*h+c*p*d,this._y=c*p*h+f*u*d,this._z=c*u*d-f*p*h,this._w=c*u*h-f*p*d;break;case"XZY":this._x=f*u*h-c*p*d,this._y=c*p*h-f*u*d,this._z=c*u*d+f*p*h,this._w=c*u*h+f*p*d;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return r!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,r){let n=r/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(t){let r=t.elements,n=r[0],i=r[4],o=r[8],a=r[1],s=r[5],l=r[9],c=r[2],u=r[6],h=r[10],f=n+s+h;if(f>0){let p=.5/Math.sqrt(f+1);this._w=.25/p,this._x=(u-l)*p,this._y=(o-c)*p,this._z=(a-i)*p}else if(n>s&&n>h){let p=2*Math.sqrt(1+n-s-h);this._w=(u-l)/p,this._x=.25*p,this._y=(i+a)/p,this._z=(o+c)/p}else if(s>h){let p=2*Math.sqrt(1+s-n-h);this._w=(o-c)/p,this._x=(i+a)/p,this._y=.25*p,this._z=(l+u)/p}else{let p=2*Math.sqrt(1+h-n-s);this._w=(a-i)/p,this._x=(o+c)/p,this._y=(l+u)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,r){let n=t.dot(r)+1;return n<Number.EPSILON?(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*r.z-t.z*r.y,this._y=t.z*r.x-t.x*r.z,this._z=t.x*r.y-t.y*r.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Zo(this.dot(t),-1,1)))}rotateTowards(t,r){let n=this.angleTo(t);if(n===0)return this;let i=Math.min(1,r/n);return this.slerp(t,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return t===0?(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(t,r){return r!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,r)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,r){let n=t._x,i=t._y,o=t._z,a=t._w,s=r._x,l=r._y,c=r._z,u=r._w;return this._x=n*u+a*s+i*c-o*l,this._y=i*u+a*l+o*s-n*c,this._z=o*u+a*c+n*l-i*s,this._w=a*u-n*s-i*l-o*c,this._onChangeCallback(),this}slerp(t,r){if(r===0)return this;if(r===1)return this.copy(t);let n=this._x,i=this._y,o=this._z,a=this._w,s=a*t._w+n*t._x+i*t._y+o*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=a,this._x=n,this._y=i,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let p=1-r;return this._w=p*a+r*this._w,this._x=p*n+r*this._x,this._y=p*i+r*this._y,this._z=p*o+r*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),u=Math.atan2(c,s),h=Math.sin((1-r)*u)/c,f=Math.sin(r*u)/c;return this._w=a*h+this._w*f,this._x=n*h+this._x*f,this._y=i*h+this._y*f,this._z=o*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(t,r,n){return this.copy(t).slerp(r,n)}random(){let t=Math.random(),r=Math.sqrt(1-t),n=Math.sqrt(t),i=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(r*Math.cos(i),n*Math.sin(o),n*Math.cos(o),r*Math.sin(i))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,r=0){return this._x=t[r],this._y=t[r+1],this._z=t[r+2],this._w=t[r+3],this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._w,t}fromBufferAttribute(t,r){return this._x=t.getX(r),this._y=t.getY(r),this._z=t.getZ(r),this._w=t.getW(r),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};yi.prototype.isQuaternion=!0;var j=class{constructor(t=0,r=0,n=0){this.x=t,this.y=r,this.z=n}set(t,r,n){return n===void 0&&(n=this.z),this.x=t,this.y=r,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,r){switch(t){case 0:this.x=r;break;case 1:this.y=r;break;case 2:this.z=r;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(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(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,r){return r!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,r)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,r){return this.x=t.x+r.x,this.y=t.y+r.y,this.z=t.z+r.z,this}addScaledVector(t,r){return this.x+=t.x*r,this.y+=t.y*r,this.z+=t.z*r,this}sub(t,r){return r!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,r)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,r){return this.x=t.x-r.x,this.y=t.y-r.y,this.z=t.z-r.z,this}multiply(t,r){return r!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,r)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,r){return this.x=t.x*r.x,this.y=t.y*r.y,this.z=t.z*r.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(yue.setFromEuler(t))}applyAxisAngle(t,r){return this.applyQuaternion(yue.setFromAxisAngle(t,r))}applyMatrix3(t){let r=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*r+o[3]*n+o[6]*i,this.y=o[1]*r+o[4]*n+o[7]*i,this.z=o[2]*r+o[5]*n+o[8]*i,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let r=this.x,n=this.y,i=this.z,o=t.elements,a=1/(o[3]*r+o[7]*n+o[11]*i+o[15]);return this.x=(o[0]*r+o[4]*n+o[8]*i+o[12])*a,this.y=(o[1]*r+o[5]*n+o[9]*i+o[13])*a,this.z=(o[2]*r+o[6]*n+o[10]*i+o[14])*a,this}applyQuaternion(t){let r=this.x,n=this.y,i=this.z,o=t.x,a=t.y,s=t.z,l=t.w,c=l*r+a*i-s*n,u=l*n+s*r-o*i,h=l*i+o*n-a*r,f=-o*r-a*n-s*i;return this.x=c*l+f*-o+u*-s-h*-a,this.y=u*l+f*-a+h*-o-c*-s,this.z=h*l+f*-s+c*-a-u*-o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let r=this.x,n=this.y,i=this.z,o=t.elements;return this.x=o[0]*r+o[4]*n+o[8]*i,this.y=o[1]*r+o[5]*n+o[9]*i,this.z=o[2]*r+o[6]*n+o[10]*i,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(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(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(t,r){return this.x=Math.max(t.x,Math.min(r.x,this.x)),this.y=Math.max(t.y,Math.min(r.y,this.y)),this.z=Math.max(t.z,Math.min(r.z,this.z)),this}clampScalar(t,r){return this.x=Math.max(t,Math.min(r,this.x)),this.y=Math.max(t,Math.min(r,this.y)),this.z=Math.max(t,Math.min(r,this.z)),this}clampLength(t,r){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(r,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,r){return this.x+=(t.x-this.x)*r,this.y+=(t.y-this.y)*r,this.z+=(t.z-this.z)*r,this}lerpVectors(t,r,n){return this.x=t.x+(r.x-t.x)*n,this.y=t.y+(r.y-t.y)*n,this.z=t.z+(r.z-t.z)*n,this}cross(t,r){return r!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,r)):this.crossVectors(this,t)}crossVectors(t,r){let n=t.x,i=t.y,o=t.z,a=r.x,s=r.y,l=r.z;return this.x=i*l-o*s,this.y=o*a-n*l,this.z=n*s-i*a,this}projectOnVector(t){let r=t.lengthSq();if(r===0)return this.set(0,0,0);let n=t.dot(this)/r;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return jct.copy(this).projectOnVector(t),this.sub(jct)}reflect(t){return this.sub(jct.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let r=Math.sqrt(this.lengthSq()*t.lengthSq());if(r===0)return Math.PI/2;let n=this.dot(t)/r;return Math.acos(Zo(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let r=this.x-t.x,n=this.y-t.y,i=this.z-t.z;return r*r+n*n+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,r,n){let i=Math.sin(r)*t;return this.x=i*Math.sin(n),this.y=Math.cos(r)*t,this.z=i*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,r,n){return this.x=t*Math.sin(r),this.y=n,this.z=t*Math.cos(r),this}setFromMatrixPosition(t){let r=t.elements;return this.x=r[12],this.y=r[13],this.z=r[14],this}setFromMatrixScale(t){let r=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),i=this.setFromMatrixColumn(t,2).length();return this.x=r,this.y=n,this.z=i,this}setFromMatrixColumn(t,r){return this.fromArray(t.elements,r*4)}setFromMatrix3Column(t,r){return this.fromArray(t.elements,r*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,r=0){return this.x=t[r],this.y=t[r+1],this.z=t[r+2],this}toArray(t=[],r=0){return t[r]=this.x,t[r+1]=this.y,t[r+2]=this.z,t}fromBufferAttribute(t,r,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(r),this.y=t.getY(r),this.z=t.getZ(r),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,r=Math.random()*Math.PI*2,n=Math.sqrt(1-TI(t,2));return this.x=n*Math.cos(r),this.y=n*Math.sin(r),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};j.prototype.isVector3=!0;var jct=new j,yue=new yi,ta=class{constructor(t=new j(1/0,1/0,1/0),r=new j(-1/0,-1/0,-1/0)){this.min=t,this.max=r}set(t,r){return this.min.copy(t),this.max.copy(r),this}setFromArray(t){let r=1/0,n=1/0,i=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.length;l<c;l+=3){let u=t[l],h=t[l+1],f=t[l+2];u<r&&(r=u),h<n&&(n=h),f<i&&(i=f),u>o&&(o=u),h>a&&(a=h),f>s&&(s=f)}return this.min.set(r,n,i),this.max.set(o,a,s),this}setFromBufferAttribute(t){let r=1/0,n=1/0,i=1/0,o=-1/0,a=-1/0,s=-1/0;for(let l=0,c=t.count;l<c;l++){let u=t.getX(l),h=t.getY(l),f=t.getZ(l);u<r&&(r=u),h<n&&(n=h),f<i&&(i=f),u>o&&(o=u),h>a&&(a=h),f>s&&(s=f)}return this.min.set(r,n,i),this.max.set(o,a,s),this}setFromPoints(t){this.makeEmpty();for(let r=0,n=t.length;r<n;r++)this.expandByPoint(t[r]);return this}setFromCenterAndSize(t,r){let n=m1.copy(r).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,r=!1){return this.makeEmpty(),this.expandByObject(t,r)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,r=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0)if(r&&n.attributes!=null&&n.attributes.position!==void 0){let o=n.attributes.position;for(let a=0,s=o.count;a<s;a++)m1.fromBufferAttribute(o,a).applyMatrix4(t.matrixWorld),this.expandByPoint(m1)}else n.boundingBox===null&&n.computeBoundingBox(),Xct.copy(n.boundingBox),Xct.applyMatrix4(t.matrixWorld),this.union(Xct);let i=t.children;for(let o=0,a=i.length;o<a;o++)this.expandByObject(i[o],r);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(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(t,r){return r.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(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,m1),m1.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let r,n;return t.normal.x>0?(r=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(r=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(r+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(r+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(r+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(r+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),r<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(LP),fV.subVectors(this.max,LP),x3.subVectors(t.a,LP),b3.subVectors(t.b,LP),w3.subVectors(t.c,LP),P0.subVectors(b3,x3),I0.subVectors(w3,b3),g1.subVectors(x3,w3);let r=[0,-P0.z,P0.y,0,-I0.z,I0.y,0,-g1.z,g1.y,P0.z,0,-P0.x,I0.z,0,-I0.x,g1.z,0,-g1.x,-P0.y,P0.x,0,-I0.y,I0.x,0,-g1.y,g1.x,0];return!$ct(r,x3,b3,w3,fV)||(r=[1,0,0,0,1,0,0,0,1],!$ct(r,x3,b3,w3,fV))?!1:(pV.crossVectors(P0,I0),r=[pV.x,pV.y,pV.z],$ct(r,x3,b3,w3,fV))}clampPoint(t,r){return r.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return m1.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(m1).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Vd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Vd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Vd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Vd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Vd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Vd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Vd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Vd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Vd),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};ta.prototype.isBox3=!0;var Vd=[new j,new j,new j,new j,new j,new j,new j,new j],m1=new j,Xct=new ta,x3=new j,b3=new j,w3=new j,P0=new j,I0=new j,g1=new j,LP=new j,fV=new j,pV=new j,_1=new j;function $ct(e,t,r,n,i){for(let o=0,a=e.length-3;o<=a;o+=3){_1.fromArray(e,o);let s=i.x*Math.abs(_1.x)+i.y*Math.abs(_1.y)+i.z*Math.abs(_1.z),l=t.dot(_1),c=r.dot(_1),u=n.dot(_1);if(Math.max(-Math.max(l,c,u),Math.min(l,c,u))>s)return!1}return!0}var sfr=new ta,vue=new j,dV=new j,Kct=new j,Zf=class{constructor(t=new j,r=-1){this.center=t,this.radius=r}set(t,r){return this.center.copy(t),this.radius=r,this}setFromPoints(t,r){let n=this.center;r!==void 0?n.copy(r):sfr.setFromPoints(t).getCenter(n);let i=0;for(let o=0,a=t.length;o<a;o++)i=Math.max(i,n.distanceToSquared(t[o]));return this.radius=Math.sqrt(i),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let r=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=r*r}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,r){let n=this.center.distanceToSquared(t);return r.copy(t),n>this.radius*this.radius&&(r.sub(this.center).normalize(),r.multiplyScalar(this.radius).add(this.center)),r}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){Kct.subVectors(t,this.center);let r=Kct.lengthSq();if(r>this.radius*this.radius){let n=Math.sqrt(r),i=(n-this.radius)*.5;this.center.add(Kct.multiplyScalar(i/n)),this.radius+=i}return this}union(t){return this.center.equals(t.center)===!0?dV.set(0,0,1).multiplyScalar(t.radius):dV.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(vue.copy(t.center).add(dV)),this.expandByPoint(vue.copy(t.center).sub(dV)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},Ud=new j,Zct=new j,mV=new j,L0=new j,Jct=new j,gV=new j,Qct=new j,Jf=class{constructor(t=new j,r=new j(0,0,-1)){this.origin=t,this.direction=r}set(t,r){return this.origin.copy(t),this.direction.copy(r),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,r){return r.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ud)),this}closestPointToPoint(t,r){r.subVectors(t,this.origin);let n=r.dot(this.direction);return n<0?r.copy(this.origin):r.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let r=Ud.subVectors(t,this.origin).dot(this.direction);return r<0?this.origin.distanceToSquared(t):(Ud.copy(this.direction).multiplyScalar(r).add(this.origin),Ud.distanceToSquared(t))}distanceSqToSegment(t,r,n,i){Zct.copy(t).add(r).multiplyScalar(.5),mV.copy(r).sub(t).normalize(),L0.copy(this.origin).sub(Zct);let o=t.distanceTo(r)*.5,a=-this.direction.dot(mV),s=L0.dot(this.direction),l=-L0.dot(mV),c=L0.lengthSq(),u=Math.abs(1-a*a),h,f,p,d;if(u>0)if(h=a*l-s,f=a*s-l,d=o*u,h>=0)if(f>=-d)if(f<=d){let g=1/u;h*=g,f*=g,p=h*(h+a*f+2*s)+f*(a*h+f+2*l)+c}else f=o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;else f=-o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;else f<=-d?(h=Math.max(0,-(-a*o+s)),f=h>0?-o:Math.min(Math.max(-o,-l),o),p=-h*h+f*(f+2*l)+c):f<=d?(h=0,f=Math.min(Math.max(-o,-l),o),p=f*(f+2*l)+c):(h=Math.max(0,-(a*o+s)),f=h>0?o:Math.min(Math.max(-o,-l),o),p=-h*h+f*(f+2*l)+c);else f=a>0?-o:o,h=Math.max(0,-(a*f+s)),p=-h*h+f*(f+2*l)+c;return n&&n.copy(this.direction).multiplyScalar(h).add(this.origin),i&&i.copy(mV).multiplyScalar(f).add(Zct),p}intersectSphere(t,r){Ud.subVectors(t.center,this.origin);let n=Ud.dot(this.direction),i=Ud.dot(Ud)-n*n,o=t.radius*t.radius;if(i>o)return null;let a=Math.sqrt(o-i),s=n-a,l=n+a;return s<0&&l<0?null:s<0?this.at(l,r):this.at(s,r)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let r=t.normal.dot(this.direction);if(r===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/r;return n>=0?n:null}intersectPlane(t,r){let n=this.distanceToPlane(t);return n===null?null:this.at(n,r)}intersectsPlane(t){let r=t.distanceToPoint(this.origin);return r===0||t.normal.dot(this.direction)*r<0}intersectBox(t,r){let n,i,o,a,s,l,c=1/this.direction.x,u=1/this.direction.y,h=1/this.direction.z,f=this.origin;return c>=0?(n=(t.min.x-f.x)*c,i=(t.max.x-f.x)*c):(n=(t.max.x-f.x)*c,i=(t.min.x-f.x)*c),u>=0?(o=(t.min.y-f.y)*u,a=(t.max.y-f.y)*u):(o=(t.max.y-f.y)*u,a=(t.min.y-f.y)*u),n>a||o>i||((o>n||n!==n)&&(n=o),(a<i||i!==i)&&(i=a),h>=0?(s=(t.min.z-f.z)*h,l=(t.max.z-f.z)*h):(s=(t.max.z-f.z)*h,l=(t.min.z-f.z)*h),n>l||s>i)||((s>n||n!==n)&&(n=s),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,r)}intersectsBox(t){return this.intersectBox(t,Ud)!==null}intersectTriangle(t,r,n,i,o){Jct.subVectors(r,t),gV.subVectors(n,t),Qct.crossVectors(Jct,gV);let a=this.direction.dot(Qct),s;if(a>0){if(i)return null;s=1}else if(a<0)s=-1,a=-a;else return null;L0.subVectors(this.origin,t);let l=s*this.direction.dot(gV.crossVectors(L0,gV));if(l<0)return null;let c=s*this.direction.dot(Jct.cross(L0));if(c<0||l+c>a)return null;let u=-s*L0.dot(Qct);return u<0?null:this.at(u/a,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},Me=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,r,n,i,o,a,s,l,c,u,h,f,p,d,g,_){let y=this.elements;return y[0]=t,y[4]=r,y[8]=n,y[12]=i,y[1]=o,y[5]=a,y[9]=s,y[13]=l,y[2]=c,y[6]=u,y[10]=h,y[14]=f,y[3]=p,y[7]=d,y[11]=g,y[15]=_,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Me().fromArray(this.elements)}copy(t){let r=this.elements,n=t.elements;return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=n[3],r[4]=n[4],r[5]=n[5],r[6]=n[6],r[7]=n[7],r[8]=n[8],r[9]=n[9],r[10]=n[10],r[11]=n[11],r[12]=n[12],r[13]=n[13],r[14]=n[14],r[15]=n[15],this}copyPosition(t){let r=this.elements,n=t.elements;return r[12]=n[12],r[13]=n[13],r[14]=n[14],this}setFromMatrix3(t){let r=t.elements;return this.set(r[0],r[3],r[6],0,r[1],r[4],r[7],0,r[2],r[5],r[8],0,0,0,0,1),this}extractBasis(t,r,n){return t.setFromMatrixColumn(this,0),r.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,r,n){return this.set(t.x,r.x,n.x,0,t.y,r.y,n.y,0,t.z,r.z,n.z,0,0,0,0,1),this}extractRotation(t){let r=this.elements,n=t.elements,i=1/S3.setFromMatrixColumn(t,0).length(),o=1/S3.setFromMatrixColumn(t,1).length(),a=1/S3.setFromMatrixColumn(t,2).length();return r[0]=n[0]*i,r[1]=n[1]*i,r[2]=n[2]*i,r[3]=0,r[4]=n[4]*o,r[5]=n[5]*o,r[6]=n[6]*o,r[7]=0,r[8]=n[8]*a,r[9]=n[9]*a,r[10]=n[10]*a,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let r=this.elements,n=t.x,i=t.y,o=t.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(i),c=Math.sin(i),u=Math.cos(o),h=Math.sin(o);if(t.order==="XYZ"){let f=a*u,p=a*h,d=s*u,g=s*h;r[0]=l*u,r[4]=-l*h,r[8]=c,r[1]=p+d*c,r[5]=f-g*c,r[9]=-s*l,r[2]=g-f*c,r[6]=d+p*c,r[10]=a*l}else if(t.order==="YXZ"){let f=l*u,p=l*h,d=c*u,g=c*h;r[0]=f+g*s,r[4]=d*s-p,r[8]=a*c,r[1]=a*h,r[5]=a*u,r[9]=-s,r[2]=p*s-d,r[6]=g+f*s,r[10]=a*l}else if(t.order==="ZXY"){let f=l*u,p=l*h,d=c*u,g=c*h;r[0]=f-g*s,r[4]=-a*h,r[8]=d+p*s,r[1]=p+d*s,r[5]=a*u,r[9]=g-f*s,r[2]=-a*c,r[6]=s,r[10]=a*l}else if(t.order==="ZYX"){let f=a*u,p=a*h,d=s*u,g=s*h;r[0]=l*u,r[4]=d*c-p,r[8]=f*c+g,r[1]=l*h,r[5]=g*c+f,r[9]=p*c-d,r[2]=-c,r[6]=s*l,r[10]=a*l}else if(t.order==="YZX"){let f=a*l,p=a*c,d=s*l,g=s*c;r[0]=l*u,r[4]=g-f*h,r[8]=d*h+p,r[1]=h,r[5]=a*u,r[9]=-s*u,r[2]=-c*u,r[6]=p*h+d,r[10]=f-g*h}else if(t.order==="XZY"){let f=a*l,p=a*c,d=s*l,g=s*c;r[0]=l*u,r[4]=-h,r[8]=c*u,r[1]=f*h+g,r[5]=a*u,r[9]=p*h-d,r[2]=d*h-p,r[6]=s*u,r[10]=g*h+f}return r[3]=0,r[7]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,this}makeRotationFromQuaternion(t){return this.compose(lfr,t,cfr)}lookAt(t,r,n){let i=this.elements;return kl.subVectors(t,r),kl.lengthSq()===0&&(kl.z=1),kl.normalize(),k0.crossVectors(n,kl),k0.lengthSq()===0&&(Math.abs(n.z)===1?kl.x+=1e-4:kl.z+=1e-4,kl.normalize(),k0.crossVectors(n,kl)),k0.normalize(),_V.crossVectors(kl,k0),i[0]=k0.x,i[4]=_V.x,i[8]=kl.x,i[1]=k0.y,i[5]=_V.y,i[9]=kl.y,i[2]=k0.z,i[6]=_V.z,i[10]=kl.z,this}multiply(t,r){return r!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,r)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,r){let n=t.elements,i=r.elements,o=this.elements,a=n[0],s=n[4],l=n[8],c=n[12],u=n[1],h=n[5],f=n[9],p=n[13],d=n[2],g=n[6],_=n[10],y=n[14],x=n[3],b=n[7],S=n[11],C=n[15],P=i[0],k=i[4],O=i[8],D=i[12],B=i[1],I=i[5],L=i[9],R=i[13],F=i[2],z=i[6],U=i[10],W=i[14],Z=i[3],rt=i[7],ot=i[11],st=i[15];return o[0]=a*P+s*B+l*F+c*Z,o[4]=a*k+s*I+l*z+c*rt,o[8]=a*O+s*L+l*U+c*ot,o[12]=a*D+s*R+l*W+c*st,o[1]=u*P+h*B+f*F+p*Z,o[5]=u*k+h*I+f*z+p*rt,o[9]=u*O+h*L+f*U+p*ot,o[13]=u*D+h*R+f*W+p*st,o[2]=d*P+g*B+_*F+y*Z,o[6]=d*k+g*I+_*z+y*rt,o[10]=d*O+g*L+_*U+y*ot,o[14]=d*D+g*R+_*W+y*st,o[3]=x*P+b*B+S*F+C*Z,o[7]=x*k+b*I+S*z+C*rt,o[11]=x*O+b*L+S*U+C*ot,o[15]=x*D+b*R+S*W+C*st,this}multiplyScalar(t){let r=this.elements;return r[0]*=t,r[4]*=t,r[8]*=t,r[12]*=t,r[1]*=t,r[5]*=t,r[9]*=t,r[13]*=t,r[2]*=t,r[6]*=t,r[10]*=t,r[14]*=t,r[3]*=t,r[7]*=t,r[11]*=t,r[15]*=t,this}determinant(){let t=this.elements,r=t[0],n=t[4],i=t[8],o=t[12],a=t[1],s=t[5],l=t[9],c=t[13],u=t[2],h=t[6],f=t[10],p=t[14],d=t[3],g=t[7],_=t[11],y=t[15];return d*(+o*l*h-i*c*h-o*s*f+n*c*f+i*s*p-n*l*p)+g*(+r*l*p-r*c*f+o*a*f-i*a*p+i*c*u-o*l*u)+_*(+r*c*h-r*s*p-o*a*h+n*a*p+o*s*u-n*c*u)+y*(-i*s*u-r*l*h+r*s*f+i*a*h-n*a*f+n*l*u)}transpose(){let t=this.elements,r;return r=t[1],t[1]=t[4],t[4]=r,r=t[2],t[2]=t[8],t[8]=r,r=t[6],t[6]=t[9],t[9]=r,r=t[3],t[3]=t[12],t[12]=r,r=t[7],t[7]=t[13],t[13]=r,r=t[11],t[11]=t[14],t[14]=r,this}setPosition(t,r,n){let i=this.elements;return t.isVector3?(i[12]=t.x,i[13]=t.y,i[14]=t.z):(i[12]=t,i[13]=r,i[14]=n),this}invert(){let t=this.elements,r=t[0],n=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],p=t[11],d=t[12],g=t[13],_=t[14],y=t[15],x=h*_*c-g*f*c+g*l*p-s*_*p-h*l*y+s*f*y,b=d*f*c-u*_*c-d*l*p+a*_*p+u*l*y-a*f*y,S=u*g*c-d*h*c+d*s*p-a*g*p-u*s*y+a*h*y,C=d*h*l-u*g*l-d*s*f+a*g*f+u*s*_-a*h*_,P=r*x+n*b+i*S+o*C;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let k=1/P;return t[0]=x*k,t[1]=(g*f*o-h*_*o-g*i*p+n*_*p+h*i*y-n*f*y)*k,t[2]=(s*_*o-g*l*o+g*i*c-n*_*c-s*i*y+n*l*y)*k,t[3]=(h*l*o-s*f*o-h*i*c+n*f*c+s*i*p-n*l*p)*k,t[4]=b*k,t[5]=(u*_*o-d*f*o+d*i*p-r*_*p-u*i*y+r*f*y)*k,t[6]=(d*l*o-a*_*o-d*i*c+r*_*c+a*i*y-r*l*y)*k,t[7]=(a*f*o-u*l*o+u*i*c-r*f*c-a*i*p+r*l*p)*k,t[8]=S*k,t[9]=(d*h*o-u*g*o-d*n*p+r*g*p+u*n*y-r*h*y)*k,t[10]=(a*g*o-d*s*o+d*n*c-r*g*c-a*n*y+r*s*y)*k,t[11]=(u*s*o-a*h*o-u*n*c+r*h*c+a*n*p-r*s*p)*k,t[12]=C*k,t[13]=(u*g*i-d*h*i+d*n*f-r*g*f-u*n*_+r*h*_)*k,t[14]=(d*s*i-a*g*i-d*n*l+r*g*l+a*n*_-r*s*_)*k,t[15]=(a*h*i-u*s*i+u*n*l-r*h*l-a*n*f+r*s*f)*k,this}scale(t){let r=this.elements,n=t.x,i=t.y,o=t.z;return r[0]*=n,r[4]*=i,r[8]*=o,r[1]*=n,r[5]*=i,r[9]*=o,r[2]*=n,r[6]*=i,r[10]*=o,r[3]*=n,r[7]*=i,r[11]*=o,this}getMaxScaleOnAxis(){let t=this.elements,r=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(r,n,i))}makeTranslation(t,r,n){return this.set(1,0,0,t,0,1,0,r,0,0,1,n,0,0,0,1),this}makeRotationX(t){let r=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,r,-n,0,0,n,r,0,0,0,0,1),this}makeRotationY(t){let r=Math.cos(t),n=Math.sin(t);return this.set(r,0,n,0,0,1,0,0,-n,0,r,0,0,0,0,1),this}makeRotationZ(t){let r=Math.cos(t),n=Math.sin(t);return this.set(r,-n,0,0,n,r,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,r){let n=Math.cos(r),i=Math.sin(r),o=1-n,a=t.x,s=t.y,l=t.z,c=o*a,u=o*s;return this.set(c*a+n,c*s-i*l,c*l+i*s,0,c*s+i*l,u*s+n,u*l-i*a,0,c*l-i*s,u*l+i*a,o*l*l+n,0,0,0,0,1),this}makeScale(t,r,n){return this.set(t,0,0,0,0,r,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,r,n,i,o,a){return this.set(1,n,o,0,t,1,a,0,r,i,1,0,0,0,0,1),this}compose(t,r,n){let i=this.elements,o=r._x,a=r._y,s=r._z,l=r._w,c=o+o,u=a+a,h=s+s,f=o*c,p=o*u,d=o*h,g=a*u,_=a*h,y=s*h,x=l*c,b=l*u,S=l*h,C=n.x,P=n.y,k=n.z;return i[0]=(1-(g+y))*C,i[1]=(p+S)*C,i[2]=(d-b)*C,i[3]=0,i[4]=(p-S)*P,i[5]=(1-(f+y))*P,i[6]=(_+x)*P,i[7]=0,i[8]=(d+b)*k,i[9]=(_-x)*k,i[10]=(1-(f+g))*k,i[11]=0,i[12]=t.x,i[13]=t.y,i[14]=t.z,i[15]=1,this}decompose(t,r,n){let i=this.elements,o=S3.set(i[0],i[1],i[2]).length(),a=S3.set(i[4],i[5],i[6]).length(),s=S3.set(i[8],i[9],i[10]).length();this.determinant()<0&&(o=-o),t.x=i[12],t.y=i[13],t.z=i[14],ih.copy(this);let c=1/o,u=1/a,h=1/s;return ih.elements[0]*=c,ih.elements[1]*=c,ih.elements[2]*=c,ih.elements[4]*=u,ih.elements[5]*=u,ih.elements[6]*=u,ih.elements[8]*=h,ih.elements[9]*=h,ih.elements[10]*=h,r.setFromRotationMatrix(ih),n.x=o,n.y=a,n.z=s,this}makePerspective(t,r,n,i,o,a){a===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let s=this.elements,l=2*o/(r-t),c=2*o/(n-i),u=(r+t)/(r-t),h=(n+i)/(n-i),f=-(a+o)/(a-o),p=-2*a*o/(a-o);return s[0]=l,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=c,s[9]=h,s[13]=0,s[2]=0,s[6]=0,s[10]=f,s[14]=p,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(t,r,n,i,o,a){let s=this.elements,l=1/(r-t),c=1/(n-i),u=1/(a-o),h=(r+t)*l,f=(n+i)*c,p=(a+o)*u;return s[0]=2*l,s[4]=0,s[8]=0,s[12]=-h,s[1]=0,s[5]=2*c,s[9]=0,s[13]=-f,s[2]=0,s[6]=0,s[10]=-2*u,s[14]=-p,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(t){let r=this.elements,n=t.elements;for(let i=0;i<16;i++)if(r[i]!==n[i])return!1;return!0}fromArray(t,r=0){for(let n=0;n<16;n++)this.elements[n]=t[n+r];return this}toArray(t=[],r=0){let n=this.elements;return t[r]=n[0],t[r+1]=n[1],t[r+2]=n[2],t[r+3]=n[3],t[r+4]=n[4],t[r+5]=n[5],t[r+6]=n[6],t[r+7]=n[7],t[r+8]=n[8],t[r+9]=n[9],t[r+10]=n[10],t[r+11]=n[11],t[r+12]=n[12],t[r+13]=n[13],t[r+14]=n[14],t[r+15]=n[15],t}};Me.prototype.isMatrix4=!0;var S3=new j,ih=new Me,lfr=new j(0,0,0),cfr=new j(1,1,1),k0=new j,_V=new j,kl=new j,xue=new Me,bue=new yi,tm=class{constructor(t=0,r=0,n=0,i=tm.DefaultOrder){this._x=t,this._y=r,this._z=n,this._order=i}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,r,n,i=this._order){return this._x=t,this._y=r,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,r=this._order,n=!0){let i=t.elements,o=i[0],a=i[4],s=i[8],l=i[1],c=i[5],u=i[9],h=i[2],f=i[6],p=i[10];switch(r){case"XYZ":this._y=Math.asin(Zo(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,p),this._z=Math.atan2(-a,o)):(this._x=Math.atan2(f,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Zo(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-h,o),this._z=0);break;case"ZXY":this._x=Math.asin(Zo(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,p),this._z=Math.atan2(-a,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Zo(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-a,c));break;case"YZX":this._z=Math.asin(Zo(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-u,c),this._y=Math.atan2(-h,o)):(this._x=0,this._y=Math.atan2(s,p));break;case"XZY":this._z=Math.asin(-Zo(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(f,c),this._y=Math.atan2(s,o)):(this._x=Math.atan2(-u,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+r)}return this._order=r,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,r,n){return xue.makeRotationFromQuaternion(t),this.setFromRotationMatrix(xue,r,n)}setFromVector3(t,r=this._order){return this.set(t.x,t.y,t.z,r)}reorder(t){return bue.setFromEuler(this),this.setFromQuaternion(bue,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],t[3]!==void 0&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],r=0){return t[r]=this._x,t[r+1]=this._y,t[r+2]=this._z,t[r+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new j(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};tm.prototype.isEuler=!0;tm.DefaultOrder="XYZ";tm.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var X3=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},ufr=0,wue=new j,M3=new yi,qd=new Me,yV=new j,kP=new j,hfr=new j,ffr=new yi,Sue=new j(1,0,0),Mue=new j(0,1,0),Eue=new j(0,0,1),pfr={type:"added"},Tue={type:"removed"},or=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:ufr++}),this.uuid=Nl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=or.DefaultUp.clone();let t=new j,r=new tm,n=new yi,i=new j(1,1,1);function o(){n.setFromEuler(r,!1)}function a(){r.setFromQuaternion(n,void 0,!1)}r._onChange(o),n._onChange(a),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:r},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Me},normalMatrix:{value:new ki}}),this.matrix=new Me,this.matrixWorld=new Me,this.matrixAutoUpdate=or.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new X3,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,r){this.quaternion.setFromAxisAngle(t,r)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,r){return M3.setFromAxisAngle(t,r),this.quaternion.multiply(M3),this}rotateOnWorldAxis(t,r){return M3.setFromAxisAngle(t,r),this.quaternion.premultiply(M3),this}rotateX(t){return this.rotateOnAxis(Sue,t)}rotateY(t){return this.rotateOnAxis(Mue,t)}rotateZ(t){return this.rotateOnAxis(Eue,t)}translateOnAxis(t,r){return wue.copy(t).applyQuaternion(this.quaternion),this.position.add(wue.multiplyScalar(r)),this}translateX(t){return this.translateOnAxis(Sue,t)}translateY(t){return this.translateOnAxis(Mue,t)}translateZ(t){return this.translateOnAxis(Eue,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(qd.copy(this.matrixWorld).invert())}lookAt(t,r,n){t.isVector3?yV.copy(t):yV.set(t,r,n);let i=this.parent;this.updateWorldMatrix(!0,!1),kP.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?qd.lookAt(kP,yV,this.up):qd.lookAt(yV,kP,this.up),this.quaternion.setFromRotationMatrix(qd),i&&(qd.extractRotation(i.matrixWorld),M3.setFromRotationMatrix(qd),this.quaternion.premultiply(M3.invert()))}add(t){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.add(arguments[r]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.parent!==null&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(pfr)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}let r=this.children.indexOf(t);return r!==-1&&(t.parent=null,this.children.splice(r,1),t.dispatchEvent(Tue)),this}removeFromParent(){let t=this.parent;return t!==null&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){let r=this.children[t];r.parent=null,r.dispatchEvent(Tue)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),qd.copy(this.matrixWorld).invert(),t.parent!==null&&(t.parent.updateWorldMatrix(!0,!1),qd.multiply(t.parent.matrixWorld)),t.applyMatrix4(qd),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,r){if(this[t]===r)return this;for(let n=0,i=this.children.length;n<i;n++){let a=this.children[n].getObjectByProperty(t,r);if(a!==void 0)return a}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kP,t,hfr),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kP,ffr,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let r=this.matrixWorld.elements;return t.set(r[8],r[9],r[10]).normalize()}raycast(){}traverse(t){t(this);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverse(t)}traverseVisible(t){if(this.visible===!1)return;t(this);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].traverseVisible(t)}traverseAncestors(t){let r=this.parent;r!==null&&(t(r),r.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let r=this.children;for(let n=0,i=r.length;n<i;n++)r[n].updateMatrixWorld(t)}updateWorldMatrix(t,r){let n=this.parent;if(t===!0&&n!==null&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),r===!0){let i=this.children;for(let o=0,a=i.length;o<a;o++)i[o].updateWorldMatrix(!1,!0)}}toJSON(t){let r=t===void 0||typeof t=="string",n={};r&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});let i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),JSON.stringify(this.userData)!=="{}"&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON()));function o(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(t)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&(i.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=o(t.geometries,this.geometry);let s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){let l=s.shapes;if(Array.isArray(l))for(let c=0,u=l.length;c<u;c++){let h=l[c];o(t.shapes,h)}else o(t.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(o(t.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let s=[];for(let l=0,c=this.material.length;l<c;l++)s.push(o(t.materials,this.material[l]));i.material=s}else i.material=o(t.materials,this.material);if(this.children.length>0){i.children=[];for(let s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(t).object)}if(this.animations.length>0){i.animations=[];for(let s=0;s<this.animations.length;s++){let l=this.animations[s];i.animations.push(o(t.animations,l))}}if(r){let s=a(t.geometries),l=a(t.materials),c=a(t.textures),u=a(t.images),h=a(t.shapes),f=a(t.skeletons),p=a(t.animations);s.length>0&&(n.geometries=s),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),u.length>0&&(n.images=u),h.length>0&&(n.shapes=h),f.length>0&&(n.skeletons=f),p.length>0&&(n.animations=p)}return n.object=i,n;function a(s){let l=[];for(let c in s){let u=s[c];delete u.metadata,l.push(u)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,r=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,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)),r===!0)for(let n=0;n<t.children.length;n++){let i=t.children[n];this.add(i.clone())}return this}};or.DefaultUp=new j(0,1,0);or.DefaultMatrixAutoUpdate=!0;or.prototype.isObject3D=!0;var oh=new j,Gd=new j,tut=new j,Wd=new j,E3=new j,T3=new j,Cue=new j,eut=new j,rut=new j,nut=new j,oi=class{constructor(t=new j,r=new j,n=new j){this.a=t,this.b=r,this.c=n}static getNormal(t,r,n,i){i.subVectors(n,r),oh.subVectors(t,r),i.cross(oh);let o=i.lengthSq();return o>0?i.multiplyScalar(1/Math.sqrt(o)):i.set(0,0,0)}static getBarycoord(t,r,n,i,o){oh.subVectors(i,r),Gd.subVectors(n,r),tut.subVectors(t,r);let a=oh.dot(oh),s=oh.dot(Gd),l=oh.dot(tut),c=Gd.dot(Gd),u=Gd.dot(tut),h=a*c-s*s;if(h===0)return o.set(-2,-1,-1);let f=1/h,p=(c*l-s*u)*f,d=(a*u-s*l)*f;return o.set(1-p-d,d,p)}static containsPoint(t,r,n,i){return this.getBarycoord(t,r,n,i,Wd),Wd.x>=0&&Wd.y>=0&&Wd.x+Wd.y<=1}static getUV(t,r,n,i,o,a,s,l){return this.getBarycoord(t,r,n,i,Wd),l.set(0,0),l.addScaledVector(o,Wd.x),l.addScaledVector(a,Wd.y),l.addScaledVector(s,Wd.z),l}static isFrontFacing(t,r,n,i){return oh.subVectors(n,r),Gd.subVectors(t,r),oh.cross(Gd).dot(i)<0}set(t,r,n){return this.a.copy(t),this.b.copy(r),this.c.copy(n),this}setFromPointsAndIndices(t,r,n,i){return this.a.copy(t[r]),this.b.copy(t[n]),this.c.copy(t[i]),this}setFromAttributeAndIndices(t,r,n,i){return this.a.fromBufferAttribute(t,r),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,i),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return oh.subVectors(this.c,this.b),Gd.subVectors(this.a,this.b),oh.cross(Gd).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return oi.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,r){return oi.getBarycoord(t,this.a,this.b,this.c,r)}getUV(t,r,n,i,o){return oi.getUV(t,this.a,this.b,this.c,r,n,i,o)}containsPoint(t){return oi.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return oi.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,r){let n=this.a,i=this.b,o=this.c,a,s;E3.subVectors(i,n),T3.subVectors(o,n),eut.subVectors(t,n);let l=E3.dot(eut),c=T3.dot(eut);if(l<=0&&c<=0)return r.copy(n);rut.subVectors(t,i);let u=E3.dot(rut),h=T3.dot(rut);if(u>=0&&h<=u)return r.copy(i);let f=l*h-u*c;if(f<=0&&l>=0&&u<=0)return a=l/(l-u),r.copy(n).addScaledVector(E3,a);nut.subVectors(t,o);let p=E3.dot(nut),d=T3.dot(nut);if(d>=0&&p<=d)return r.copy(o);let g=p*c-l*d;if(g<=0&&c>=0&&d<=0)return s=c/(c-d),r.copy(n).addScaledVector(T3,s);let _=u*d-p*h;if(_<=0&&h-u>=0&&p-d>=0)return Cue.subVectors(o,i),s=(h-u)/(h-u+(p-d)),r.copy(i).addScaledVector(Cue,s);let y=1/(_+g+f);return a=g*y,s=f*y,r.copy(n).addScaledVector(E3,a).addScaledVector(T3,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},dfr=0,qi=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:dfr++}),this.uuid=Nl(),this.name="",this.type="Material",this.fog=!0,this.blending=V3,this.side=I1,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Pht,this.blendDst=Iht,this.blendEquation=M1,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=iU,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Ofe,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=nU,this.stencilZFail=nU,this.stencilZPass=nU,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.alphaWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let r in t){let n=t[r];if(n===void 0){console.warn("THREE.Material: '"+r+"' parameter is undefined.");continue}if(r==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===Aht;continue}let i=this[r];if(i===void 0){console.warn("THREE."+this.type+": '"+r+"' is not a property of this material.");continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[r]=n}}toJSON(t){let r=t===void 0||typeof t=="string";r&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==V3&&(n.blending=this.blending),this.side!==I1&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.alphaWrite=this.alphaWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function i(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(r){let o=i(t.textures),a=i(t.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,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;let r=t.clippingPlanes,n=null;if(r!==null){let i=r.length;n=new Array(i);for(let o=0;o!==i;++o)n[o]=r[o].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.alphaWrite=t.alphaWrite,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.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}};qi.prototype.isMaterial=!0;var sh=class extends qi{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new ne(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(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}};sh.prototype.isMeshBasicMaterial=!0;var In=new j,vV=new Lt,Je=class{constructor(t,r,n){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=t,this.itemSize=r,this.count=t!==void 0?t.length/r:0,this.normalized=n===!0,this.usage=W3,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(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(t,r,n){t*=this.itemSize,n*=r.itemSize;for(let i=0,o=this.itemSize;i<o;i++)this.array[t+i]=r.array[n+i];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",i),a=new ne),r[n++]=a.r,r[n++]=a.g,r[n++]=a.b}return this}copyVector2sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",i),a=new Lt),r[n++]=a.x,r[n++]=a.y}return this}copyVector3sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",i),a=new j),r[n++]=a.x,r[n++]=a.y,r[n++]=a.z}return this}copyVector4sArray(t){let r=this.array,n=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];a===void 0&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",i),a=new en),r[n++]=a.x,r[n++]=a.y,r[n++]=a.z,r[n++]=a.w}return this}applyMatrix3(t){if(this.itemSize===2)for(let r=0,n=this.count;r<n;r++)vV.fromBufferAttribute(this,r),vV.applyMatrix3(t),this.setXY(r,vV.x,vV.y);else if(this.itemSize===3)for(let r=0,n=this.count;r<n;r++)In.fromBufferAttribute(this,r),In.applyMatrix3(t),this.setXYZ(r,In.x,In.y,In.z);return this}applyMatrix4(t){for(let r=0,n=this.count;r<n;r++)In.x=this.getX(r),In.y=this.getY(r),In.z=this.getZ(r),In.applyMatrix4(t),this.setXYZ(r,In.x,In.y,In.z);return this}applyNormalMatrix(t){for(let r=0,n=this.count;r<n;r++)In.x=this.getX(r),In.y=this.getY(r),In.z=this.getZ(r),In.applyNormalMatrix(t),this.setXYZ(r,In.x,In.y,In.z);return this}transformDirection(t){for(let r=0,n=this.count;r<n;r++)In.x=this.getX(r),In.y=this.getY(r),In.z=this.getZ(r),In.transformDirection(t),this.setXYZ(r,In.x,In.y,In.z);return this}set(t,r=0){return this.array.set(t,r),this}getX(t){return this.array[t*this.itemSize]}setX(t,r){return this.array[t*this.itemSize]=r,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,r){return this.array[t*this.itemSize+1]=r,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,r){return this.array[t*this.itemSize+2]=r,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,r){return this.array[t*this.itemSize+3]=r,this}setXY(t,r,n){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this}setXYZ(t,r,n,i){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this.array[t+2]=i,this}setXYZW(t,r,n,i,o){return t*=this.itemSize,this.array[t+0]=r,this.array[t+1]=n,this.array[t+2]=i,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==W3&&(t.usage=this.usage),(this.updateRange.offset!==0||this.updateRange.count!==-1)&&(t.updateRange=this.updateRange),t}};Je.prototype.isBufferAttribute=!0;var cU=class extends Je{constructor(t,r,n){super(new Int8Array(t),r,n)}},uU=class extends Je{constructor(t,r,n){super(new Uint8Array(t),r,n)}},hU=class extends Je{constructor(t,r,n){super(new Uint8ClampedArray(t),r,n)}},fU=class extends Je{constructor(t,r,n){super(new Int16Array(t),r,n)}},$3=class extends Je{constructor(t,r,n){super(new Uint16Array(t),r,n)}},pU=class extends Je{constructor(t,r,n){super(new Int32Array(t),r,n)}},K3=class extends Je{constructor(t,r,n){super(new Uint32Array(t),r,n)}},dU=class extends Je{constructor(t,r,n){super(new Uint16Array(t),r,n)}};dU.prototype.isFloat16BufferAttribute=!0;var xe=class extends Je{constructor(t,r,n){super(new Float32Array(t),r,n)}},mU=class extends Je{constructor(t,r,n){super(new Float64Array(t),r,n)}},mfr=0,Xc=new Me,iut=new or,C3=new j,Rl=new ta,RP=new ta,Lo=new j,Pe=class extends Us{constructor(){super(),Object.defineProperty(this,"id",{value:mfr++}),this.uuid=Nl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(Bfe(t)?K3:$3)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,r){return this.attributes[t]=r,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,r,n=0){this.groups.push({start:t,count:r,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,r){this.drawRange.start=t,this.drawRange.count=r}applyMatrix4(t){let r=this.attributes.position;r!==void 0&&(r.applyMatrix4(t),r.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new ki().getNormalMatrix(t);n.applyNormalMatrix(o),n.needsUpdate=!0}let i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(t),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Xc.makeRotationFromQuaternion(t),this.applyMatrix4(Xc),this}rotateX(t){return Xc.makeRotationX(t),this.applyMatrix4(Xc),this}rotateY(t){return Xc.makeRotationY(t),this.applyMatrix4(Xc),this}rotateZ(t){return Xc.makeRotationZ(t),this.applyMatrix4(Xc),this}translate(t,r,n){return Xc.makeTranslation(t,r,n),this.applyMatrix4(Xc),this}scale(t,r,n){return Xc.makeScale(t,r,n),this.applyMatrix4(Xc),this}lookAt(t){return iut.lookAt(t),iut.updateMatrix(),this.applyMatrix4(iut.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(C3).negate(),this.translate(C3.x,C3.y,C3.z),this}setFromPoints(t){let r=[];for(let n=0,i=t.length;n<i;n++){let o=t[n];r.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new xe(r,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ta);let t=this.attributes.position,r=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new j(-1/0,-1/0,-1/0),new j(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),r)for(let n=0,i=r.length;n<i;n++){let o=r[n];Rl.setFromBufferAttribute(o),this.morphTargetsRelative?(Lo.addVectors(this.boundingBox.min,Rl.min),this.boundingBox.expandByPoint(Lo),Lo.addVectors(this.boundingBox.max,Rl.max),this.boundingBox.expandByPoint(Lo)):(this.boundingBox.expandByPoint(Rl.min),this.boundingBox.expandByPoint(Rl.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Zf);let t=this.attributes.position,r=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new j,1/0);return}if(t){let n=this.boundingSphere.center;if(Rl.setFromBufferAttribute(t),r)for(let o=0,a=r.length;o<a;o++){let s=r[o];RP.setFromBufferAttribute(s),this.morphTargetsRelative?(Lo.addVectors(Rl.min,RP.min),Rl.expandByPoint(Lo),Lo.addVectors(Rl.max,RP.max),Rl.expandByPoint(Lo)):(Rl.expandByPoint(RP.min),Rl.expandByPoint(RP.max))}Rl.getCenter(n);let i=0;for(let o=0,a=t.count;o<a;o++)Lo.fromBufferAttribute(t,o),i=Math.max(i,n.distanceToSquared(Lo));if(r)for(let o=0,a=r.length;o<a;o++){let s=r[o],l=this.morphTargetsRelative;for(let c=0,u=s.count;c<u;c++)Lo.fromBufferAttribute(s,c),l&&(C3.fromBufferAttribute(t,c),Lo.add(C3)),i=Math.max(i,n.distanceToSquared(Lo))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,r=this.attributes;if(t===null||r.position===void 0||r.normal===void 0||r.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=t.array,i=r.position.array,o=r.normal.array,a=r.uv.array,s=i.length/3;r.tangent===void 0&&this.setAttribute("tangent",new Je(new Float32Array(4*s),4));let l=r.tangent.array,c=[],u=[];for(let B=0;B<s;B++)c[B]=new j,u[B]=new j;let h=new j,f=new j,p=new j,d=new Lt,g=new Lt,_=new Lt,y=new j,x=new j;function b(B,I,L){h.fromArray(i,B*3),f.fromArray(i,I*3),p.fromArray(i,L*3),d.fromArray(a,B*2),g.fromArray(a,I*2),_.fromArray(a,L*2),f.sub(h),p.sub(h),g.sub(d),_.sub(d);let R=1/(g.x*_.y-_.x*g.y);!isFinite(R)||(y.copy(f).multiplyScalar(_.y).addScaledVector(p,-g.y).multiplyScalar(R),x.copy(p).multiplyScalar(g.x).addScaledVector(f,-_.x).multiplyScalar(R),c[B].add(y),c[I].add(y),c[L].add(y),u[B].add(x),u[I].add(x),u[L].add(x))}let S=this.groups;S.length===0&&(S=[{start:0,count:n.length}]);for(let B=0,I=S.length;B<I;++B){let L=S[B],R=L.start,F=L.count;for(let z=R,U=R+F;z<U;z+=3)b(n[z+0],n[z+1],n[z+2])}let C=new j,P=new j,k=new j,O=new j;function D(B){k.fromArray(o,B*3),O.copy(k);let I=c[B];C.copy(I),C.sub(k.multiplyScalar(k.dot(I))).normalize(),P.crossVectors(O,I);let R=P.dot(u[B])<0?-1:1;l[B*4]=C.x,l[B*4+1]=C.y,l[B*4+2]=C.z,l[B*4+3]=R}for(let B=0,I=S.length;B<I;++B){let L=S[B],R=L.start,F=L.count;for(let z=R,U=R+F;z<U;z+=3)D(n[z+0]),D(n[z+1]),D(n[z+2])}}computeVertexNormals(){let t=this.index,r=this.getAttribute("position");if(r!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Je(new Float32Array(r.count*3),3),this.setAttribute("normal",n);else for(let f=0,p=n.count;f<p;f++)n.setXYZ(f,0,0,0);let i=new j,o=new j,a=new j,s=new j,l=new j,c=new j,u=new j,h=new j;if(t)for(let f=0,p=t.count;f<p;f+=3){let d=t.getX(f+0),g=t.getX(f+1),_=t.getX(f+2);i.fromBufferAttribute(r,d),o.fromBufferAttribute(r,g),a.fromBufferAttribute(r,_),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),s.fromBufferAttribute(n,d),l.fromBufferAttribute(n,g),c.fromBufferAttribute(n,_),s.add(u),l.add(u),c.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(_,c.x,c.y,c.z)}else for(let f=0,p=r.count;f<p;f+=3)i.fromBufferAttribute(r,f+0),o.fromBufferAttribute(r,f+1),a.fromBufferAttribute(r,f+2),u.subVectors(a,o),h.subVectors(i,o),u.cross(h),n.setXYZ(f+0,u.x,u.y,u.z),n.setXYZ(f+1,u.x,u.y,u.z),n.setXYZ(f+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(t,r){if(!(t&&t.isBufferGeometry)){console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);return}r===void 0&&(r=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));let n=this.attributes;for(let i in n){if(t.attributes[i]===void 0)continue;let a=n[i].array,s=t.attributes[i],l=s.array,c=s.itemSize*r,u=Math.min(l.length,a.length-c);for(let h=0,f=c;h<u;h++,f++)a[f]=l[h]}return this}normalizeNormals(){let t=this.attributes.normal;for(let r=0,n=t.count;r<n;r++)Lo.fromBufferAttribute(t,r),Lo.normalize(),t.setXYZ(r,Lo.x,Lo.y,Lo.z)}toNonIndexed(){function t(s,l){let c=s.array,u=s.itemSize,h=s.normalized,f=new c.constructor(l.length*u),p=0,d=0;for(let g=0,_=l.length;g<_;g++){s.isInterleavedBufferAttribute?p=l[g]*s.data.stride+s.offset:p=l[g]*u;for(let y=0;y<u;y++)f[d++]=c[p++]}return new Je(f,u,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let r=new Pe,n=this.index.array,i=this.attributes;for(let s in i){let l=i[s],c=t(l,n);r.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let u=0,h=c.length;u<h;u++){let f=c[u],p=t(f,n);l.push(p)}r.morphAttributes[s]=l}r.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];r.addGroup(c.start,c.count,c.materialIndex)}return r}toJSON(){let t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let r=this.index;r!==null&&(t.data.index={type:r.array.constructor.name,array:Array.prototype.slice.call(r.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let i={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],u=[];for(let h=0,f=c.length;h<f;h++){let p=c[h];u.push(p.toJSON(t.data))}u.length>0&&(i[l]=u,o=!0)}o&&(t.data.morphAttributes=i,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let r={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(r));let i=t.attributes;for(let c in i){let u=i[c];this.setAttribute(c,u.clone(r))}let o=t.morphAttributes;for(let c in o){let u=[],h=o[c];for(let f=0,p=h.length;f<p;f++)u.push(h[f].clone(r));this.morphAttributes[c]=u}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let c=0,u=a.length;c<u;c++){let h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}let s=t.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,t.parameters!==void 0&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}};Pe.prototype.isBufferGeometry=!0;var Aue=new Me,A3=new Jf,out=new Zf,R0=new j,N0=new j,D0=new j,aut=new j,sut=new j,lut=new j,xV=new j,bV=new j,wV=new j,SV=new Lt,MV=new Lt,EV=new Lt,cut=new j,TV=new j,ti=class extends or{constructor(t=new Pe,r=new sh){super(),this.type="Mesh",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,r){let n=this.geometry,i=this.material,o=this.matrixWorld;if(i===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),out.copy(n.boundingSphere),out.applyMatrix4(o),t.ray.intersectsSphere(out)===!1)||(Aue.copy(o).invert(),A3.copy(t.ray).applyMatrix4(Aue),n.boundingBox!==null&&A3.intersectsBox(n.boundingBox)===!1))return;let a;if(n.isBufferGeometry){let s=n.index,l=n.attributes.position,c=n.morphAttributes.position,u=n.morphTargetsRelative,h=n.attributes.uv,f=n.attributes.uv2,p=n.groups,d=n.drawRange;if(s!==null)if(Array.isArray(i))for(let g=0,_=p.length;g<_;g++){let y=p[g],x=i[y.materialIndex],b=Math.max(y.start,d.start),S=Math.min(s.count,Math.min(y.start+y.count,d.start+d.count));for(let C=b,P=S;C<P;C+=3){let k=s.getX(C),O=s.getX(C+1),D=s.getX(C+2);a=CV(this,x,t,A3,l,c,u,h,f,k,O,D),a&&(a.faceIndex=Math.floor(C/3),a.face.materialIndex=y.materialIndex,r.push(a))}}else{let g=Math.max(0,d.start),_=Math.min(s.count,d.start+d.count);for(let y=g,x=_;y<x;y+=3){let b=s.getX(y),S=s.getX(y+1),C=s.getX(y+2);a=CV(this,i,t,A3,l,c,u,h,f,b,S,C),a&&(a.faceIndex=Math.floor(y/3),r.push(a))}}else if(l!==void 0)if(Array.isArray(i))for(let g=0,_=p.length;g<_;g++){let y=p[g],x=i[y.materialIndex],b=Math.max(y.start,d.start),S=Math.min(l.count,Math.min(y.start+y.count,d.start+d.count));for(let C=b,P=S;C<P;C+=3){let k=C,O=C+1,D=C+2;a=CV(this,x,t,A3,l,c,u,h,f,k,O,D),a&&(a.faceIndex=Math.floor(C/3),a.face.materialIndex=y.materialIndex,r.push(a))}}else{let g=Math.max(0,d.start),_=Math.min(l.count,d.start+d.count);for(let y=g,x=_;y<x;y+=3){let b=y,S=y+1,C=y+2;a=CV(this,i,t,A3,l,c,u,h,f,b,S,C),a&&(a.faceIndex=Math.floor(y/3),r.push(a))}}}else n.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}};ti.prototype.isMesh=!0;function gfr(e,t,r,n,i,o,a,s){let l;if(t.side===Ii?l=n.intersectTriangle(a,o,i,!0,s):l=n.intersectTriangle(i,o,a,t.side!==L1,s),l===null)return null;TV.copy(s),TV.applyMatrix4(e.matrixWorld);let c=r.ray.origin.distanceTo(TV);return c<r.near||c>r.far?null:{distance:c,point:TV.clone(),object:e}}function CV(e,t,r,n,i,o,a,s,l,c,u,h){R0.fromBufferAttribute(i,c),N0.fromBufferAttribute(i,u),D0.fromBufferAttribute(i,h);let f=e.morphTargetInfluences;if(o&&f){xV.set(0,0,0),bV.set(0,0,0),wV.set(0,0,0);for(let d=0,g=o.length;d<g;d++){let _=f[d],y=o[d];_!==0&&(aut.fromBufferAttribute(y,c),sut.fromBufferAttribute(y,u),lut.fromBufferAttribute(y,h),a?(xV.addScaledVector(aut,_),bV.addScaledVector(sut,_),wV.addScaledVector(lut,_)):(xV.addScaledVector(aut.sub(R0),_),bV.addScaledVector(sut.sub(N0),_),wV.addScaledVector(lut.sub(D0),_)))}R0.add(xV),N0.add(bV),D0.add(wV)}e.isSkinnedMesh&&(e.boneTransform(c,R0),e.boneTransform(u,N0),e.boneTransform(h,D0));let p=gfr(e,t,r,n,R0,N0,D0,cut);if(p){s&&(SV.fromBufferAttribute(s,c),MV.fromBufferAttribute(s,u),EV.fromBufferAttribute(s,h),p.uv=oi.getUV(cut,R0,N0,D0,SV,MV,EV,new Lt)),l&&(SV.fromBufferAttribute(l,c),MV.fromBufferAttribute(l,u),EV.fromBufferAttribute(l,h),p.uv2=oi.getUV(cut,R0,N0,D0,SV,MV,EV,new Lt));let d={a:c,b:u,c:h,normal:new j,materialIndex:0};oi.getNormal(R0,N0,D0,d.normal),p.face=d}return p}var Qf=class extends Pe{constructor(t=1,r=1,n=1,i=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:r,depth:n,widthSegments:i,heightSegments:o,depthSegments:a};let s=this;i=Math.floor(i),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],u=[],h=[],f=0,p=0;d("z","y","x",-1,-1,n,r,t,a,o,0),d("z","y","x",1,-1,n,r,-t,a,o,1),d("x","z","y",1,1,t,n,r,i,a,2),d("x","z","y",1,-1,t,n,-r,i,a,3),d("x","y","z",1,-1,t,r,n,i,o,4),d("x","y","z",-1,-1,t,r,-n,i,o,5),this.setIndex(l),this.setAttribute("position",new xe(c,3)),this.setAttribute("normal",new xe(u,3)),this.setAttribute("uv",new xe(h,2));function d(g,_,y,x,b,S,C,P,k,O,D){let B=S/k,I=C/O,L=S/2,R=C/2,F=P/2,z=k+1,U=O+1,W=0,Z=0,rt=new j;for(let ot=0;ot<U;ot++){let st=ot*I-R;for(let St=0;St<z;St++){let bt=St*B-L;rt[g]=bt*x,rt[_]=st*b,rt[y]=F,c.push(rt.x,rt.y,rt.z),rt[g]=0,rt[_]=0,rt[y]=P>0?1:-1,u.push(rt.x,rt.y,rt.z),h.push(St/k),h.push(1-ot/O),W+=1}}for(let ot=0;ot<O;ot++)for(let st=0;st<k;st++){let St=f+st+z*ot,bt=f+st+z*(ot+1),Mt=f+(st+1)+z*(ot+1),lt=f+(st+1)+z*ot;l.push(St,bt,lt),l.push(bt,Mt,lt),Z+=6}s.addGroup(p,Z,D),p+=Z,f+=W}}static fromJSON(t){return new Qf(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function Z3(e){let t={};for(let r in e){t[r]={};for(let n in e[r]){let i=e[r][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[r][n]=i.clone():Array.isArray(i)?t[r][n]=i.slice():t[r][n]=i}}return t}function Ta(e){let t={};for(let r=0;r<e.length;r++){let n=Z3(e[r]);for(let i in n)t[i]=n[i]}return t}var Vfe={clone:Z3,merge:Ta},_fr=`void main() {
	gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
}`,yfr=`void main() {
	gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
}`,lh=class extends qi{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader=_fr,this.fragmentShader=yfr,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,t!==void 0&&(t.attributes!==void 0&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=Z3(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){let r=super.toJSON(t);r.glslVersion=this.glslVersion,r.uniforms={};for(let i in this.uniforms){let a=this.uniforms[i].value;a&&a.isTexture?r.uniforms[i]={type:"t",value:a.toJSON(t).uuid}:a&&a.isColor?r.uniforms[i]={type:"c",value:a.getHex()}:a&&a.isVector2?r.uniforms[i]={type:"v2",value:a.toArray()}:a&&a.isVector3?r.uniforms[i]={type:"v3",value:a.toArray()}:a&&a.isVector4?r.uniforms[i]={type:"v4",value:a.toArray()}:a&&a.isMatrix3?r.uniforms[i]={type:"m3",value:a.toArray()}:a&&a.isMatrix4?r.uniforms[i]={type:"m4",value:a.toArray()}:r.uniforms[i]={value:a}}Object.keys(this.defines).length>0&&(r.defines=this.defines),r.vertexShader=this.vertexShader,r.fragmentShader=this.fragmentShader;let n={};for(let i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(r.extensions=n),r}};lh.prototype.isShaderMaterial=!0;var R1=class extends or{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new Me,this.projectionMatrix=new Me,this.projectionMatrixInverse=new Me}copy(t,r){return super.copy(t,r),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let r=this.matrixWorld.elements;return t.set(-r[8],-r[9],-r[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,r){super.updateWorldMatrix(t,r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};R1.prototype.isCamera=!0;var Ui=class extends R1{constructor(t=50,r=1,n=.1,i=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=r,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,r){return super.copy(t,r),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=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let r=.5*this.getFilmHeight()/t;this.fov=QP*2*Math.atan(r),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(P1*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return QP*2*Math.atan(Math.tan(P1*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,r,n,i,o,a){this.aspect=t/r,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,r=t*Math.tan(P1*.5*this.fov)/this.zoom,n=2*r,i=this.aspect*n,o=-.5*i,a=this.view;if(this.view!==null&&this.view.enabled){let l=a.fullWidth,c=a.fullHeight;o+=a.offsetX*i/l,r-=a.offsetY*n/c,i*=a.width/l,n*=a.height/c}let s=this.filmOffset;s!==0&&(o+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+i,r,r-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let r=super.toJSON(t);return r.object.fov=this.fov,r.object.zoom=this.zoom,r.object.near=this.near,r.object.far=this.far,r.object.focus=this.focus,r.object.aspect=this.aspect,this.view!==null&&(r.object.view=Object.assign({},this.view)),r.object.filmGauge=this.filmGauge,r.object.filmOffset=this.filmOffset,r}};Ui.prototype.isPerspectiveCamera=!0;var P3=90,I3=1,J3=class extends or{constructor(t,r,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let i=new Ui(P3,I3,t,r);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new j(1,0,0)),this.add(i);let o=new Ui(P3,I3,t,r);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new j(-1,0,0)),this.add(o);let a=new Ui(P3,I3,t,r);a.layers=this.layers,a.up.set(0,0,1),a.lookAt(new j(0,1,0)),this.add(a);let s=new Ui(P3,I3,t,r);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new j(0,-1,0)),this.add(s);let l=new Ui(P3,I3,t,r);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new j(0,0,1)),this.add(l);let c=new Ui(P3,I3,t,r);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new j(0,0,-1)),this.add(c)}update(t,r){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[i,o,a,s,l,c]=this.children,u=t.xr.enabled,h=t.getRenderTarget();t.xr.enabled=!1;let f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(r,i),t.setRenderTarget(n,1),t.render(r,o),t.setRenderTarget(n,2),t.render(r,a),t.setRenderTarget(n,3),t.render(r,s),t.setRenderTarget(n,4),t.render(r,l),n.texture.generateMipmaps=f,t.setRenderTarget(n,5),t.render(r,c),t.setRenderTarget(h),t.xr.enabled=u,n.texture.needsPMREMUpdate=!0}},H0=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u){t=t!==void 0?t:[],r=r!==void 0?r:nx,super(t,r,n,i,o,a,s,l,c,u),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};H0.prototype.isCubeTexture=!0;var Q3=class extends us{constructor(t,r,n){Number.isInteger(r)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),r=n),super(t,t,r),r=r||{},this.texture=new H0(void 0,r.mapping,r.wrapS,r.wrapT,r.magFilter,r.minFilter,r.format,r.type,r.anisotropy,r.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=r.generateMipmaps!==void 0?r.generateMipmaps:!1,this.texture.minFilter=r.minFilter!==void 0?r.minFilter:ii}fromEquirectangularTexture(t,r){this.texture.type=r.type,this.texture.format=Qo,this.texture.encoding=r.encoding,this.texture.generateMipmaps=r.generateMipmaps,this.texture.minFilter=r.minFilter,this.texture.magFilter=r.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:`

				varying vec3 vWorldDirection;

				vec3 transformDirection( in vec3 dir, in mat4 matrix ) {

					return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );

				}

				void main() {

					vWorldDirection = transformDirection( position, modelMatrix );

					#include <begin_vertex>
					#include <project_vertex>

				}
			`,fragmentShader:`

				uniform sampler2D tEquirect;

				varying vec3 vWorldDirection;

				#include <common>

				void main() {

					vec3 direction = normalize( vWorldDirection );

					vec2 sampleUV = equirectUv( direction );

					gl_FragColor = texture2D( tEquirect, sampleUV );

				}
			`},i=new Qf(5,5,5),o=new lh({name:"CubemapFromEquirect",uniforms:Z3(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ii,blending:$d});o.uniforms.tEquirect.value=r;let a=new ti(i,o),s=r.minFilter;return r.minFilter===ox&&(r.minFilter=ii),new J3(1,10,this).update(t,a),r.minFilter=s,a.geometry.dispose(),a.material.dispose(),this}clear(t,r,n,i){let o=t.getRenderTarget();for(let a=0;a<6;a++)t.setRenderTarget(this,a),t.clear(r,n,i);t.setRenderTarget(o)}};Q3.prototype.isWebGLCubeRenderTarget=!0;var uut=new j,vfr=new j,xfr=new ki,$c=class{constructor(t=new j(1,0,0),r=0){this.normal=t,this.constant=r}set(t,r){return this.normal.copy(t),this.constant=r,this}setComponents(t,r,n,i){return this.normal.set(t,r,n),this.constant=i,this}setFromNormalAndCoplanarPoint(t,r){return this.normal.copy(t),this.constant=-r.dot(this.normal),this}setFromCoplanarPoints(t,r,n){let i=uut.subVectors(n,r).cross(vfr.subVectors(t,r)).normalize();return this.setFromNormalAndCoplanarPoint(i,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,r){return r.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,r){let n=t.delta(uut),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(t.start)===0?r.copy(t.start):null;let o=-(t.start.dot(this.normal)+this.constant)/i;return o<0||o>1?null:r.copy(n).multiplyScalar(o).add(t.start)}intersectsLine(t){let r=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return r<0&&n>0||n<0&&r>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,r){let n=r||xfr.getNormalMatrix(t),i=this.coplanarPoint(uut).applyMatrix4(t),o=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}};$c.prototype.isPlane=!0;var L3=new Zf,AV=new j,N1=class{constructor(t=new $c,r=new $c,n=new $c,i=new $c,o=new $c,a=new $c){this.planes=[t,r,n,i,o,a]}set(t,r,n,i,o,a){let s=this.planes;return s[0].copy(t),s[1].copy(r),s[2].copy(n),s[3].copy(i),s[4].copy(o),s[5].copy(a),this}copy(t){let r=this.planes;for(let n=0;n<6;n++)r[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let r=this.planes,n=t.elements,i=n[0],o=n[1],a=n[2],s=n[3],l=n[4],c=n[5],u=n[6],h=n[7],f=n[8],p=n[9],d=n[10],g=n[11],_=n[12],y=n[13],x=n[14],b=n[15];return r[0].setComponents(s-i,h-l,g-f,b-_).normalize(),r[1].setComponents(s+i,h+l,g+f,b+_).normalize(),r[2].setComponents(s+o,h+c,g+p,b+y).normalize(),r[3].setComponents(s-o,h-c,g-p,b-y).normalize(),r[4].setComponents(s-a,h-u,g-d,b-x).normalize(),r[5].setComponents(s+a,h+u,g+d,b+x).normalize(),this}intersectsObject(t){let r=t.geometry;return r.boundingSphere===null&&r.computeBoundingSphere(),L3.copy(r.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(L3)}intersectsSprite(t){return L3.center.set(0,0,0),L3.radius=.7071067811865476,L3.applyMatrix4(t.matrixWorld),this.intersectsSphere(L3)}intersectsSphere(t){let r=this.planes,n=t.center,i=-t.radius;for(let o=0;o<6;o++)if(r[o].distanceToPoint(n)<i)return!1;return!0}intersectsBox(t){let r=this.planes;for(let n=0;n<6;n++){let i=r[n];if(AV.x=i.normal.x>0?t.max.x:t.min.x,AV.y=i.normal.y>0?t.max.y:t.min.y,AV.z=i.normal.z>0?t.max.z:t.min.z,i.distanceToPoint(AV)<0)return!1}return!0}containsPoint(t){let r=this.planes;for(let n=0;n<6;n++)if(r[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function Ufe(){let e=null,t=!1,r=null,n=null;function i(o,a){r(o,a),n=e.requestAnimationFrame(i)}return{start:function(){t!==!0&&r!==null&&(n=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(o){r=o},setContext:function(o){e=o}}}function bfr(e,t){let r=t.isWebGL2,n=new WeakMap;function i(c,u){let h=c.array,f=c.usage,p=e.createBuffer();e.bindBuffer(u,p),e.bufferData(u,h,f),c.onUploadCallback();let d=5126;return h instanceof Float32Array?d=5126:h instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):h instanceof Uint16Array?c.isFloat16BufferAttribute?r?d=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):d=5123:h instanceof Int16Array?d=5122:h instanceof Uint32Array?d=5125:h instanceof Int32Array?d=5124:h instanceof Int8Array?d=5120:(h instanceof Uint8Array||h instanceof Uint8ClampedArray)&&(d=5121),{buffer:p,type:d,bytesPerElement:h.BYTES_PER_ELEMENT,version:c.version}}function o(c,u,h){let f=u.array,p=u.updateRange;e.bindBuffer(h,c),p.count===-1?e.bufferSubData(h,0,f):(r?e.bufferSubData(h,p.offset*f.BYTES_PER_ELEMENT,f,p.offset,p.count):e.bufferSubData(h,p.offset*f.BYTES_PER_ELEMENT,f.subarray(p.offset,p.offset+p.count)),p.count=-1)}function a(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function s(c){c.isInterleavedBufferAttribute&&(c=c.data);let u=n.get(c);u&&(e.deleteBuffer(u.buffer),n.delete(c))}function l(c,u){if(c.isGLBufferAttribute){let f=n.get(c);(!f||f.version<c.version)&&n.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version});return}c.isInterleavedBufferAttribute&&(c=c.data);let h=n.get(c);h===void 0?n.set(c,i(c,u)):h.version<c.version&&(o(h.buffer,c,u),h.version=c.version)}return{get:a,remove:s,update:l}}var V0=class extends Pe{constructor(t=1,r=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:r,widthSegments:n,heightSegments:i};let o=t/2,a=r/2,s=Math.floor(n),l=Math.floor(i),c=s+1,u=l+1,h=t/s,f=r/l,p=[],d=[],g=[],_=[];for(let y=0;y<u;y++){let x=y*f-a;for(let b=0;b<c;b++){let S=b*h-o;d.push(S,-x,0),g.push(0,0,1),_.push(b/s),_.push(1-y/l)}}for(let y=0;y<l;y++)for(let x=0;x<s;x++){let b=x+c*y,S=x+c*(y+1),C=x+1+c*(y+1),P=x+1+c*y;p.push(b,S,P),p.push(S,C,P)}this.setIndex(p),this.setAttribute("position",new xe(d,3)),this.setAttribute("normal",new xe(g,3)),this.setAttribute("uv",new xe(_,2))}static fromJSON(t){return new V0(t.width,t.height,t.widthSegments,t.heightSegments)}},wfr=`#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, vUv ).g;
#endif`,Sfr=`#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,Mfr=`#ifdef USE_ALPHATEST
	if ( diffuseColor.a < alphaTest ) discard;
#endif`,Efr=`#ifdef USE_ALPHATEST
	uniform float alphaTest;
#endif`,Tfr=`#ifdef USE_AOMAP
	float ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;
	reflectedLight.indirectDiffuse *= ambientOcclusion;
	#if defined( USE_ENVMAP ) && defined( STANDARD )
		float dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );
		reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );
	#endif
#endif`,Cfr=`#ifdef USE_AOMAP
	uniform sampler2D aoMap;
	uniform float aoMapIntensity;
#endif`,Afr="vec3 transformed = vec3( position );",Pfr=`vec3 objectNormal = vec3( normal );
#ifdef USE_TANGENT
	vec3 objectTangent = vec3( tangent.xyz );
#endif`,Ifr=`vec3 BRDF_Lambert( const in vec3 diffuseColor ) {
	return RECIPROCAL_PI * diffuseColor;
}
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {
	float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );
	return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );
}
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {
	float a2 = pow2( alpha );
	float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );
	float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );
	return 0.5 / max( gv + gl, EPSILON );
}
float D_GGX( const in float alpha, const in float dotNH ) {
	float a2 = pow2( alpha );
	float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;
	return RECIPROCAL_PI * a2 / pow2( denom );
}
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {
	float alpha = pow2( roughness );
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( f0, f90, dotVH );
	float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );
	float D = D_GGX( alpha, dotNH );
	return F * ( V * D );
}
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {
	const float LUT_SIZE = 64.0;
	const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;
	const float LUT_BIAS = 0.5 / LUT_SIZE;
	float dotNV = saturate( dot( N, V ) );
	vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );
	uv = uv * LUT_SCALE + LUT_BIAS;
	return uv;
}
float LTC_ClippedSphereFormFactor( const in vec3 f ) {
	float l = length( f );
	return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );
}
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {
	float x = dot( v1, v2 );
	float y = abs( x );
	float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;
	float b = 3.4175940 + ( 4.1616724 + y ) * y;
	float v = a / b;
	float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;
	return cross( v1, v2 ) * theta_sintheta;
}
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {
	vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];
	vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];
	vec3 lightNormal = cross( v1, v2 );
	if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );
	vec3 T1, T2;
	T1 = normalize( V - N * dot( V, N ) );
	T2 = - cross( N, T1 );
	mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );
	vec3 coords[ 4 ];
	coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );
	coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );
	coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );
	coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );
	coords[ 0 ] = normalize( coords[ 0 ] );
	coords[ 1 ] = normalize( coords[ 1 ] );
	coords[ 2 ] = normalize( coords[ 2 ] );
	coords[ 3 ] = normalize( coords[ 3 ] );
	vec3 vectorFormFactor = vec3( 0.0 );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );
	vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );
	float result = LTC_ClippedSphereFormFactor( vectorFormFactor );
	return vec3( result );
}
float G_BlinnPhong_Implicit( ) {
	return 0.25;
}
float D_BlinnPhong( const in float shininess, const in float dotNH ) {
	return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );
}
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNH = saturate( dot( normal, halfDir ) );
	float dotVH = saturate( dot( viewDir, halfDir ) );
	vec3 F = F_Schlick( specularColor, 1.0, dotVH );
	float G = G_BlinnPhong_Implicit( );
	float D = D_BlinnPhong( shininess, dotNH );
	return F * ( G * D );
}
#if defined( USE_SHEEN )
float D_Charlie( float roughness, float dotNH ) {
	float alpha = pow2( roughness );
	float invAlpha = 1.0 / alpha;
	float cos2h = dotNH * dotNH;
	float sin2h = max( 1.0 - cos2h, 0.0078125 );
	return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );
}
float V_Neubelt( float dotNV, float dotNL ) {
	return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );
}
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {
	vec3 halfDir = normalize( lightDir + viewDir );
	float dotNL = saturate( dot( normal, lightDir ) );
	float dotNV = saturate( dot( normal, viewDir ) );
	float dotNH = saturate( dot( normal, halfDir ) );
	float D = D_Charlie( sheenRoughness, dotNH );
	float V = V_Neubelt( dotNV, dotNL );
	return sheenColor * ( D * V );
}
#endif`,Lfr=`#ifdef USE_BUMPMAP
	uniform sampler2D bumpMap;
	uniform float bumpScale;
	vec2 dHdxy_fwd() {
		vec2 dSTdx = dFdx( vUv );
		vec2 dSTdy = dFdy( vUv );
		float Hll = bumpScale * texture2D( bumpMap, vUv ).x;
		float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;
		float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;
		return vec2( dBx, dBy );
	}
	vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {
		vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );
		vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );
		vec3 vN = surf_norm;
		vec3 R1 = cross( vSigmaY, vN );
		vec3 R2 = cross( vN, vSigmaX );
		float fDet = dot( vSigmaX, R1 ) * faceDirection;
		vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );
		return normalize( abs( fDet ) * surf_norm - vGrad );
	}
#endif`,kfr=`#if NUM_CLIPPING_PLANES > 0
	vec4 plane;
	#pragma unroll_loop_start
	for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {
		plane = clippingPlanes[ i ];
		if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;
	}
	#pragma unroll_loop_end
	#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES
		bool clipped = true;
		#pragma unroll_loop_start
		for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {
			plane = clippingPlanes[ i ];
			clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;
		}
		#pragma unroll_loop_end
		if ( clipped ) discard;
	#endif
#endif`,Rfr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
	uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];
#endif`,Nfr=`#if NUM_CLIPPING_PLANES > 0
	varying vec3 vClipPosition;
#endif`,Dfr=`#if NUM_CLIPPING_PLANES > 0
	vClipPosition = - mvPosition.xyz;
#endif`,Ofr=`#if defined( USE_COLOR_ALPHA )
	diffuseColor *= vColor;
#elif defined( USE_COLOR )
	diffuseColor.rgb *= vColor;
#endif`,zfr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR )
	varying vec3 vColor;
#endif`,Ffr=`#if defined( USE_COLOR_ALPHA )
	varying vec4 vColor;
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	varying vec3 vColor;
#endif`,Bfr=`#if defined( USE_COLOR_ALPHA )
	vColor = vec4( 1.0 );
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )
	vColor = vec3( 1.0 );
#endif
#ifdef USE_COLOR
	vColor *= color;
#endif
#ifdef USE_INSTANCING_COLOR
	vColor.xyz *= instanceColor.xyz;
#endif`,Hfr=`#define PI 3.141592653589793
#define PI2 6.283185307179586
#define PI_HALF 1.5707963267948966
#define RECIPROCAL_PI 0.3183098861837907
#define RECIPROCAL_PI2 0.15915494309189535
#define EPSILON 1e-6
#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
#define whiteComplement( a ) ( 1.0 - saturate( a ) )
float pow2( const in float x ) { return x*x; }
float pow3( const in float x ) { return x*x*x; }
float pow4( const in float x ) { float x2 = x*x; return x2*x2; }
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }
float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }
highp float rand( const in vec2 uv ) {
	const highp float a = 12.9898, b = 78.233, c = 43758.5453;
	highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );
	return fract( sin( sn ) * c );
}
#ifdef HIGH_PRECISION
	float precisionSafeLength( vec3 v ) { return length( v ); }
#else
	float precisionSafeLength( vec3 v ) {
		float maxComponent = max3( abs( v ) );
		return length( v / maxComponent ) * maxComponent;
	}
#endif
struct IncidentLight {
	vec3 color;
	vec3 direction;
	bool visible;
};
struct ReflectedLight {
	vec3 directDiffuse;
	vec3 directSpecular;
	vec3 indirectDiffuse;
	vec3 indirectSpecular;
};
struct GeometricContext {
	vec3 position;
	vec3 normal;
	vec3 viewDir;
#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal;
#endif
};
vec3 transformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );
}
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {
	return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );
}
mat3 transposeMat3( const in mat3 m ) {
	mat3 tmp;
	tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );
	tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );
	tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );
	return tmp;
}
float linearToRelativeLuminance( const in vec3 color ) {
	vec3 weights = vec3( 0.2126, 0.7152, 0.0722 );
	return dot( weights, color.rgb );
}
bool isPerspectiveMatrix( mat4 m ) {
	return m[ 2 ][ 3 ] == - 1.0;
}
vec2 equirectUv( in vec3 dir ) {
	float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;
	float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;
	return vec2( u, v );
}`,Vfr=`#ifdef ENVMAP_TYPE_CUBE_UV
	#define cubeUV_maxMipLevel 8.0
	#define cubeUV_minMipLevel 4.0
	#define cubeUV_maxTileSize 256.0
	#define cubeUV_minTileSize 16.0
	float getFace( vec3 direction ) {
		vec3 absDirection = abs( direction );
		float face = - 1.0;
		if ( absDirection.x > absDirection.z ) {
			if ( absDirection.x > absDirection.y )
				face = direction.x > 0.0 ? 0.0 : 3.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		} else {
			if ( absDirection.z > absDirection.y )
				face = direction.z > 0.0 ? 2.0 : 5.0;
			else
				face = direction.y > 0.0 ? 1.0 : 4.0;
		}
		return face;
	}
	vec2 getUV( vec3 direction, float face ) {
		vec2 uv;
		if ( face == 0.0 ) {
			uv = vec2( direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 1.0 ) {
			uv = vec2( - direction.x, - direction.z ) / abs( direction.y );
		} else if ( face == 2.0 ) {
			uv = vec2( - direction.x, direction.y ) / abs( direction.z );
		} else if ( face == 3.0 ) {
			uv = vec2( - direction.z, direction.y ) / abs( direction.x );
		} else if ( face == 4.0 ) {
			uv = vec2( - direction.x, direction.z ) / abs( direction.y );
		} else {
			uv = vec2( direction.x, direction.y ) / abs( direction.z );
		}
		return 0.5 * ( uv + 1.0 );
	}
	vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {
		float face = getFace( direction );
		float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );
		mipInt = max( mipInt, cubeUV_minMipLevel );
		float faceSize = exp2( mipInt );
		float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );
		vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;
		if ( face > 2.0 ) {
			uv.y += faceSize;
			face -= 3.0;
		}
		uv.x += face * faceSize;
		if ( mipInt < cubeUV_maxMipLevel ) {
			uv.y += 2.0 * cubeUV_maxTileSize;
		}
		uv.y += filterInt * 2.0 * cubeUV_minTileSize;
		uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );
		uv *= texelSize;
		return texture2D( envMap, uv ).rgb;
	}
	#define r0 1.0
	#define v0 0.339
	#define m0 - 2.0
	#define r1 0.8
	#define v1 0.276
	#define m1 - 1.0
	#define r4 0.4
	#define v4 0.046
	#define m4 2.0
	#define r5 0.305
	#define v5 0.016
	#define m5 3.0
	#define r6 0.21
	#define v6 0.0038
	#define m6 4.0
	float roughnessToMip( float roughness ) {
		float mip = 0.0;
		if ( roughness >= r1 ) {
			mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;
		} else if ( roughness >= r4 ) {
			mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;
		} else if ( roughness >= r5 ) {
			mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;
		} else if ( roughness >= r6 ) {
			mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;
		} else {
			mip = - 2.0 * log2( 1.16 * roughness );		}
		return mip;
	}
	vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {
		float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );
		float mipF = fract( mip );
		float mipInt = floor( mip );
		vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );
		if ( mipF == 0.0 ) {
			return vec4( color0, 1.0 );
		} else {
			vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );
			return vec4( mix( color0, color1, mipF ), 1.0 );
		}
	}
#endif`,Ufr=`vec3 transformedNormal = objectNormal;
#ifdef USE_INSTANCING
	mat3 m = mat3( instanceMatrix );
	transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );
	transformedNormal = m * transformedNormal;
#endif
transformedNormal = normalMatrix * transformedNormal;
#ifdef FLIP_SIDED
	transformedNormal = - transformedNormal;
#endif
#ifdef USE_TANGENT
	vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#ifdef FLIP_SIDED
		transformedTangent = - transformedTangent;
	#endif
#endif`,qfr=`#ifdef USE_DISPLACEMENTMAP
	uniform sampler2D displacementMap;
	uniform float displacementScale;
	uniform float displacementBias;
#endif`,Gfr=`#ifdef USE_DISPLACEMENTMAP
	transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );
#endif`,Wfr=`#ifdef USE_EMISSIVEMAP
	vec4 emissiveColor = texture2D( emissiveMap, vUv );
	totalEmissiveRadiance *= emissiveColor.rgb;
#endif`,Yfr=`#ifdef USE_EMISSIVEMAP
	uniform sampler2D emissiveMap;
#endif`,jfr="gl_FragColor = linearToOutputTexel( gl_FragColor );",Xfr=`vec4 LinearToLinear( in vec4 value ) {
	return value;
}
vec4 LinearTosRGB( in vec4 value ) {
	return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );
}`,$fr=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vec3 cameraToFrag;
		if ( isOrthographic ) {
			cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToFrag = normalize( vWorldPosition - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vec3 reflectVec = reflect( cameraToFrag, worldNormal );
		#else
			vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );
		#endif
	#else
		vec3 reflectVec = vReflect;
	#endif
	#ifdef ENVMAP_TYPE_CUBE
		vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );
	#elif defined( ENVMAP_TYPE_CUBE_UV )
		vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );
	#else
		vec4 envColor = vec4( 0.0 );
	#endif
	#ifdef ENVMAP_BLENDING_MULTIPLY
		outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_MIX )
		outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );
	#elif defined( ENVMAP_BLENDING_ADD )
		outgoingLight += envColor.xyz * specularStrength * reflectivity;
	#endif
#endif`,Kfr=`#ifdef USE_ENVMAP
	uniform float envMapIntensity;
	uniform float flipEnvMap;
	#ifdef ENVMAP_TYPE_CUBE
		uniform samplerCube envMap;
	#else
		uniform sampler2D envMap;
	#endif
	
#endif`,Zfr=`#ifdef USE_ENVMAP
	uniform float reflectivity;
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		varying vec3 vWorldPosition;
		uniform float refractionRatio;
	#else
		varying vec3 vReflect;
	#endif
#endif`,Jfr=`#ifdef USE_ENVMAP
	#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )
		#define ENV_WORLDPOS
	#endif
	#ifdef ENV_WORLDPOS
		
		varying vec3 vWorldPosition;
	#else
		varying vec3 vReflect;
		uniform float refractionRatio;
	#endif
#endif`,Qfr=`#ifdef USE_ENVMAP
	#ifdef ENV_WORLDPOS
		vWorldPosition = worldPosition.xyz;
	#else
		vec3 cameraToVertex;
		if ( isOrthographic ) {
			cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );
		} else {
			cameraToVertex = normalize( worldPosition.xyz - cameraPosition );
		}
		vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		#ifdef ENVMAP_MODE_REFLECTION
			vReflect = reflect( cameraToVertex, worldNormal );
		#else
			vReflect = refract( cameraToVertex, worldNormal, refractionRatio );
		#endif
	#endif
#endif`,tpr=`#ifdef USE_FOG
	vFogDepth = - mvPosition.z;
#endif`,epr=`#ifdef USE_FOG
	varying float vFogDepth;
#endif`,rpr=`#ifdef USE_FOG
	#ifdef FOG_EXP2
		float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );
	#else
		float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );
	#endif
	gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );
#endif`,npr=`#ifdef USE_FOG
	uniform vec3 fogColor;
	varying float vFogDepth;
	#ifdef FOG_EXP2
		uniform float fogDensity;
	#else
		uniform float fogNear;
		uniform float fogFar;
	#endif
#endif`,ipr=`#ifdef USE_GRADIENTMAP
	uniform sampler2D gradientMap;
#endif
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {
	float dotNL = dot( normal, lightDirection );
	vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );
	#ifdef USE_GRADIENTMAP
		return vec3( texture2D( gradientMap, coord ).r );
	#else
		return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );
	#endif
}`,opr=`#ifdef USE_LIGHTMAP
	vec4 lightMapTexel = texture2D( lightMap, vUv2 );
	vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
	#ifndef PHYSICALLY_CORRECT_LIGHTS
		lightMapIrradiance *= PI;
	#endif
	reflectedLight.indirectDiffuse += lightMapIrradiance;
#endif`,apr=`#ifdef USE_LIGHTMAP
	uniform sampler2D lightMap;
	uniform float lightMapIntensity;
#endif`,spr=`vec3 diffuse = vec3( 1.0 );
GeometricContext geometry;
geometry.position = mvPosition.xyz;
geometry.normal = normalize( transformedNormal );
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );
GeometricContext backGeometry;
backGeometry.position = geometry.position;
backGeometry.normal = -geometry.normal;
backGeometry.viewDir = geometry.viewDir;
vLightFront = vec3( 0.0 );
vIndirectFront = vec3( 0.0 );
#ifdef DOUBLE_SIDED
	vLightBack = vec3( 0.0 );
	vIndirectBack = vec3( 0.0 );
#endif
IncidentLight directLight;
float dotNL;
vec3 directLightColor_Diffuse;
vIndirectFront += getAmbientLightIrradiance( ambientLightColor );
vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );
#ifdef DOUBLE_SIDED
	vIndirectBack += getAmbientLightIrradiance( ambientLightColor );
	vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );
#endif
#if NUM_POINT_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		getPointLightInfo( pointLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_SPOT_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		getSpotLightInfo( spotLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_DIR_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		getDirectionalLightInfo( directionalLights[ i ], geometry, directLight );
		dotNL = dot( geometry.normal, directLight.direction );
		directLightColor_Diffuse = directLight.color;
		vLightFront += saturate( dotNL ) * directLightColor_Diffuse;
		#ifdef DOUBLE_SIDED
			vLightBack += saturate( - dotNL ) * directLightColor_Diffuse;
		#endif
	}
	#pragma unroll_loop_end
#endif
#if NUM_HEMI_LIGHTS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
		vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );
		#ifdef DOUBLE_SIDED
			vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );
		#endif
	}
	#pragma unroll_loop_end
#endif`,lpr=`uniform bool receiveShadow;
uniform vec3 ambientLightColor;
uniform vec3 lightProbe[ 9 ];
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {
	float x = normal.x, y = normal.y, z = normal.z;
	vec3 result = shCoefficients[ 0 ] * 0.886227;
	result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;
	result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;
	result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;
	result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;
	result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;
	result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );
	result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;
	result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );
	return result;
}
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {
	vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
	vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );
	return irradiance;
}
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {
	vec3 irradiance = ambientLightColor;
	return irradiance;
}
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {
	#if defined ( PHYSICALLY_CORRECT_LIGHTS )
		float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );
		if ( cutoffDistance > 0.0 ) {
			distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );
		}
		return distanceFalloff;
	#else
		if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {
			return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );
		}
		return 1.0;
	#endif
}
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {
	return smoothstep( coneCosine, penumbraCosine, angleCosine );
}
#if NUM_DIR_LIGHTS > 0
	struct DirectionalLight {
		vec3 direction;
		vec3 color;
	};
	uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];
	void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {
		light.color = directionalLight.color;
		light.direction = directionalLight.direction;
		light.visible = true;
	}
#endif
#if NUM_POINT_LIGHTS > 0
	struct PointLight {
		vec3 position;
		vec3 color;
		float distance;
		float decay;
	};
	uniform PointLight pointLights[ NUM_POINT_LIGHTS ];
	void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {
		vec3 lVector = pointLight.position - geometry.position;
		light.direction = normalize( lVector );
		float lightDistance = length( lVector );
		light.color = pointLight.color;
		light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );
		light.visible = ( light.color != vec3( 0.0 ) );
	}
#endif
#if NUM_SPOT_LIGHTS > 0
	struct SpotLight {
		vec3 position;
		vec3 direction;
		vec3 color;
		float distance;
		float decay;
		float coneCos;
		float penumbraCos;
	};
	uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];
	void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {
		vec3 lVector = spotLight.position - geometry.position;
		light.direction = normalize( lVector );
		float angleCos = dot( light.direction, spotLight.direction );
		float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );
		if ( spotAttenuation > 0.0 ) {
			float lightDistance = length( lVector );
			light.color = spotLight.color * spotAttenuation;
			light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );
			light.visible = ( light.color != vec3( 0.0 ) );
		} else {
			light.color = vec3( 0.0 );
			light.visible = false;
		}
	}
#endif
#if NUM_RECT_AREA_LIGHTS > 0
	struct RectAreaLight {
		vec3 color;
		vec3 position;
		vec3 halfWidth;
		vec3 halfHeight;
	};
	uniform sampler2D ltc_1;	uniform sampler2D ltc_2;
	uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];
#endif
#if NUM_HEMI_LIGHTS > 0
	struct HemisphereLight {
		vec3 direction;
		vec3 skyColor;
		vec3 groundColor;
	};
	uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];
	vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {
		float dotNL = dot( normal, hemiLight.direction );
		float hemiDiffuseWeight = 0.5 * dotNL + 0.5;
		vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );
		return irradiance;
	}
#endif`,cpr=`#if defined( USE_ENVMAP )
	#ifdef ENVMAP_MODE_REFRACTION
		uniform float refractionRatio;
	#endif
	vec3 getIBLIrradiance( const in vec3 normal ) {
		#if defined( ENVMAP_TYPE_CUBE_UV )
			vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );
			return PI * envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
	vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {
		#if defined( ENVMAP_TYPE_CUBE_UV )
			vec3 reflectVec;
			#ifdef ENVMAP_MODE_REFLECTION
				reflectVec = reflect( - viewDir, normal );
				reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );
			#else
				reflectVec = refract( - viewDir, normal, refractionRatio );
			#endif
			reflectVec = inverseTransformDirection( reflectVec, viewMatrix );
			vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );
			return envMapColor.rgb * envMapIntensity;
		#else
			return vec3( 0.0 );
		#endif
	}
#endif`,upr=`ToonMaterial material;
material.diffuseColor = diffuseColor.rgb;`,hpr=`varying vec3 vViewPosition;
struct ToonMaterial {
	vec3 diffuseColor;
};
void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_Toon
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Toon
#define Material_LightProbeLOD( material )	(0)`,fpr=`BlinnPhongMaterial material;
material.diffuseColor = diffuseColor.rgb;
material.specularColor = specular;
material.specularShininess = shininess;
material.specularStrength = specularStrength;`,ppr=`varying vec3 vViewPosition;
struct BlinnPhongMaterial {
	vec3 diffuseColor;
	vec3 specularColor;
	float specularShininess;
	float specularStrength;
};
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
	reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;
}
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
#define RE_Direct				RE_Direct_BlinnPhong
#define RE_IndirectDiffuse		RE_IndirectDiffuse_BlinnPhong
#define Material_LightProbeLOD( material )	(0)`,dpr=`PhysicalMaterial material;
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );
vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;
material.roughness = min( material.roughness, 1.0 );
#ifdef IOR
	#ifdef SPECULAR
		float specularIntensityFactor = specularIntensity;
		vec3 specularColorFactor = specularColor;
		#ifdef USE_SPECULARINTENSITYMAP
			specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;
		#endif
		#ifdef USE_SPECULARCOLORMAP
			specularColorFactor *= texture2D( specularColorMap, vUv ).rgb;
		#endif
		material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );
	#else
		float specularIntensityFactor = 1.0;
		vec3 specularColorFactor = vec3( 1.0 );
		material.specularF90 = 1.0;
	#endif
	material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );
#else
	material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );
	material.specularF90 = 1.0;
#endif
#ifdef USE_CLEARCOAT
	material.clearcoat = clearcoat;
	material.clearcoatRoughness = clearcoatRoughness;
	material.clearcoatF0 = vec3( 0.04 );
	material.clearcoatF90 = 1.0;
	#ifdef USE_CLEARCOATMAP
		material.clearcoat *= texture2D( clearcoatMap, vUv ).x;
	#endif
	#ifdef USE_CLEARCOAT_ROUGHNESSMAP
		material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;
	#endif
	material.clearcoat = saturate( material.clearcoat );	material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );
	material.clearcoatRoughness += geometryRoughness;
	material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );
#endif
#ifdef USE_SHEEN
	material.sheenColor = sheenColor;
	#ifdef USE_SHEENCOLORMAP
		material.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;
	#endif
	material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );
	#ifdef USE_SHEENROUGHNESSMAP
		material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;
	#endif
#endif`,mpr=`struct PhysicalMaterial {
	vec3 diffuseColor;
	float roughness;
	vec3 specularColor;
	float specularF90;
	#ifdef USE_CLEARCOAT
		float clearcoat;
		float clearcoatRoughness;
		vec3 clearcoatF0;
		float clearcoatF90;
	#endif
	#ifdef USE_SHEEN
		vec3 sheenColor;
		float sheenRoughness;
	#endif
};
vec3 clearcoatSpecular = vec3( 0.0 );
vec3 sheenSpecular = vec3( 0.0 );
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {
	float dotNV = saturate( dot( normal, viewDir ) );
	float r2 = roughness * roughness;
	float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;
	float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;
	float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );
	return saturate( DG * RECIPROCAL_PI );
}
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {
	float dotNV = saturate( dot( normal, viewDir ) );
	const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );
	const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );
	vec4 r = roughness * c0 + c1;
	float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;
	vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;
	return fab;
}
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	return specularColor * fab.x + specularF90 * fab.y;
}
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {
	vec2 fab = DFGApprox( normal, viewDir, roughness );
	vec3 FssEss = specularColor * fab.x + specularF90 * fab.y;
	float Ess = fab.x + fab.y;
	float Ems = 1.0 - Ess;
	vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;	vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );
	singleScatter += FssEss;
	multiScatter += Fms * Ems;
}
#if NUM_RECT_AREA_LIGHTS > 0
	void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
		vec3 normal = geometry.normal;
		vec3 viewDir = geometry.viewDir;
		vec3 position = geometry.position;
		vec3 lightPos = rectAreaLight.position;
		vec3 halfWidth = rectAreaLight.halfWidth;
		vec3 halfHeight = rectAreaLight.halfHeight;
		vec3 lightColor = rectAreaLight.color;
		float roughness = material.roughness;
		vec3 rectCoords[ 4 ];
		rectCoords[ 0 ] = lightPos + halfWidth - halfHeight;		rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;
		rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;
		rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;
		vec2 uv = LTC_Uv( normal, viewDir, roughness );
		vec4 t1 = texture2D( ltc_1, uv );
		vec4 t2 = texture2D( ltc_2, uv );
		mat3 mInv = mat3(
			vec3( t1.x, 0, t1.y ),
			vec3(    0, 1,    0 ),
			vec3( t1.z, 0, t1.w )
		);
		vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );
		reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );
		reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );
	}
#endif
void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	float dotNL = saturate( dot( geometry.normal, directLight.direction ) );
	vec3 irradiance = dotNL * directLight.color;
	#ifdef USE_CLEARCOAT
		float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );
		vec3 ccIrradiance = dotNLcc * directLight.color;
		clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );
	#endif
	reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );
	reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {
	reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );
}
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {
	#ifdef USE_CLEARCOAT
		clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );
	#endif
	#ifdef USE_SHEEN
		sheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );
	#endif
	vec3 singleScattering = vec3( 0.0 );
	vec3 multiScattering = vec3( 0.0 );
	vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;
	computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );
	vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );
	reflectedLight.indirectSpecular += radiance * singleScattering;
	reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;
	reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;
}
#define RE_Direct				RE_Direct_Physical
#define RE_Direct_RectArea		RE_Direct_RectArea_Physical
#define RE_IndirectDiffuse		RE_IndirectDiffuse_Physical
#define RE_IndirectSpecular		RE_IndirectSpecular_Physical
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {
	return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );
}`,gpr=`
GeometricContext geometry;
geometry.position = - vViewPosition;
geometry.normal = normal;
geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );
#ifdef USE_CLEARCOAT
	geometry.clearcoatNormal = clearcoatNormal;
#endif
IncidentLight directLight;
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )
	PointLight pointLight;
	#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {
		pointLight = pointLights[ i ];
		getPointLightInfo( pointLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )
		pointLightShadow = pointLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )
	SpotLight spotLight;
	#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {
		spotLight = spotLights[ i ];
		getSpotLightInfo( spotLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )
		spotLightShadow = spotLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )
	DirectionalLight directionalLight;
	#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLightShadow;
	#endif
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {
		directionalLight = directionalLights[ i ];
		getDirectionalLightInfo( directionalLight, geometry, directLight );
		#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )
		directionalLightShadow = directionalLightShadows[ i ];
		directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
		#endif
		RE_Direct( directLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )
	RectAreaLight rectAreaLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {
		rectAreaLight = rectAreaLights[ i ];
		RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );
	}
	#pragma unroll_loop_end
#endif
#if defined( RE_IndirectDiffuse )
	vec3 iblIrradiance = vec3( 0.0 );
	vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );
	irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
	#if ( NUM_HEMI_LIGHTS > 0 )
		#pragma unroll_loop_start
		for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {
			irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );
		}
		#pragma unroll_loop_end
	#endif
#endif
#if defined( RE_IndirectSpecular )
	vec3 radiance = vec3( 0.0 );
	vec3 clearcoatRadiance = vec3( 0.0 );
#endif`,_pr=`#if defined( RE_IndirectDiffuse )
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel = texture2D( lightMap, vUv2 );
		vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;
		#ifndef PHYSICALLY_CORRECT_LIGHTS
			lightMapIrradiance *= PI;
		#endif
		irradiance += lightMapIrradiance;
	#endif
	#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )
		iblIrradiance += getIBLIrradiance( geometry.normal );
	#endif
#endif
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )
	radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );
	#ifdef USE_CLEARCOAT
		clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );
	#endif
#endif`,ypr=`#if defined( RE_IndirectDiffuse )
	RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );
#endif
#if defined( RE_IndirectSpecular )
	RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );
#endif`,vpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;
#endif`,xpr=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )
	uniform float logDepthBufFC;
	varying float vFragDepth;
	varying float vIsPerspective;
#endif`,bpr=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		varying float vFragDepth;
		varying float vIsPerspective;
	#else
		uniform float logDepthBufFC;
	#endif
#endif`,wpr=`#ifdef USE_LOGDEPTHBUF
	#ifdef USE_LOGDEPTHBUF_EXT
		vFragDepth = 1.0 + gl_Position.w;
		vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
	#else
		if ( isPerspectiveMatrix( projectionMatrix ) ) {
			gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;
			gl_Position.z *= gl_Position.w;
		}
	#endif
#endif`,Spr=`#ifdef USE_MAP
	vec4 sampledDiffuseColor = texture2D( map, vUv );
	#ifdef DECODE_VIDEO_TEXTURE
		sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );
	#endif
	diffuseColor *= sampledDiffuseColor;
#endif`,Mpr=`#ifdef USE_MAP
	uniform sampler2D map;
#endif`,Epr=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;
#endif
#ifdef USE_MAP
	diffuseColor *= texture2D( map, uv );
#endif
#ifdef USE_ALPHAMAP
	diffuseColor.a *= texture2D( alphaMap, uv ).g;
#endif`,Tpr=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP )
	uniform mat3 uvTransform;
#endif
#ifdef USE_MAP
	uniform sampler2D map;
#endif
#ifdef USE_ALPHAMAP
	uniform sampler2D alphaMap;
#endif`,Cpr=`float metalnessFactor = metalness;
#ifdef USE_METALNESSMAP
	vec4 texelMetalness = texture2D( metalnessMap, vUv );
	metalnessFactor *= texelMetalness.b;
#endif`,Apr=`#ifdef USE_METALNESSMAP
	uniform sampler2D metalnessMap;
#endif`,Ppr=`#ifdef USE_MORPHNORMALS
	objectNormal *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];
		}
	#else
		objectNormal += morphNormal0 * morphTargetInfluences[ 0 ];
		objectNormal += morphNormal1 * morphTargetInfluences[ 1 ];
		objectNormal += morphNormal2 * morphTargetInfluences[ 2 ];
		objectNormal += morphNormal3 * morphTargetInfluences[ 3 ];
	#endif
#endif`,Ipr=`#ifdef USE_MORPHTARGETS
	uniform float morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];
		uniform sampler2DArray morphTargetsTexture;
		uniform vec2 morphTargetsTextureSize;
		vec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {
			float texelIndex = float( vertexIndex * stride + offset );
			float y = floor( texelIndex / morphTargetsTextureSize.x );
			float x = texelIndex - y * morphTargetsTextureSize.x;
			vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );
			return texture( morphTargetsTexture, morphUV ).xyz;
		}
	#else
		#ifndef USE_MORPHNORMALS
			uniform float morphTargetInfluences[ 8 ];
		#else
			uniform float morphTargetInfluences[ 4 ];
		#endif
	#endif
#endif`,Lpr=`#ifdef USE_MORPHTARGETS
	transformed *= morphTargetBaseInfluence;
	#ifdef MORPHTARGETS_TEXTURE
		for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {
			#ifndef USE_MORPHNORMALS
				if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];
			#else
				if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];
			#endif
		}
	#else
		transformed += morphTarget0 * morphTargetInfluences[ 0 ];
		transformed += morphTarget1 * morphTargetInfluences[ 1 ];
		transformed += morphTarget2 * morphTargetInfluences[ 2 ];
		transformed += morphTarget3 * morphTargetInfluences[ 3 ];
		#ifndef USE_MORPHNORMALS
			transformed += morphTarget4 * morphTargetInfluences[ 4 ];
			transformed += morphTarget5 * morphTargetInfluences[ 5 ];
			transformed += morphTarget6 * morphTargetInfluences[ 6 ];
			transformed += morphTarget7 * morphTargetInfluences[ 7 ];
		#endif
	#endif
#endif`,kpr=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;
#ifdef FLAT_SHADED
	vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );
	vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );
	vec3 normal = normalize( cross( fdx, fdy ) );
#else
	vec3 normal = normalize( vNormal );
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	#ifdef USE_TANGENT
		vec3 tangent = normalize( vTangent );
		vec3 bitangent = normalize( vBitangent );
		#ifdef DOUBLE_SIDED
			tangent = tangent * faceDirection;
			bitangent = bitangent * faceDirection;
		#endif
		#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )
			mat3 vTBN = mat3( tangent, bitangent, normal );
		#endif
	#endif
#endif
vec3 geometryNormal = normal;`,Rpr=`#ifdef OBJECTSPACE_NORMALMAP
	normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
	#ifdef FLIP_SIDED
		normal = - normal;
	#endif
	#ifdef DOUBLE_SIDED
		normal = normal * faceDirection;
	#endif
	normal = normalize( normalMatrix * normal );
#elif defined( TANGENTSPACE_NORMALMAP )
	vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;
	mapN.xy *= normalScale;
	#ifdef USE_TANGENT
		normal = normalize( vTBN * mapN );
	#else
		normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );
	#endif
#elif defined( USE_BUMPMAP )
	normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );
#endif`,Npr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Dpr=`#ifndef FLAT_SHADED
	varying vec3 vNormal;
	#ifdef USE_TANGENT
		varying vec3 vTangent;
		varying vec3 vBitangent;
	#endif
#endif`,Opr=`#ifndef FLAT_SHADED
	vNormal = normalize( transformedNormal );
	#ifdef USE_TANGENT
		vTangent = normalize( transformedTangent );
		vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );
	#endif
#endif`,zpr=`#ifdef USE_NORMALMAP
	uniform sampler2D normalMap;
	uniform vec2 normalScale;
#endif
#ifdef OBJECTSPACE_NORMALMAP
	uniform mat3 normalMatrix;
#endif
#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )
	vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {
		vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );
		vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );
		vec2 st0 = dFdx( vUv.st );
		vec2 st1 = dFdy( vUv.st );
		vec3 N = surf_norm;
		vec3 q1perp = cross( q1, N );
		vec3 q0perp = cross( N, q0 );
		vec3 T = q1perp * st0.x + q0perp * st1.x;
		vec3 B = q1perp * st0.y + q0perp * st1.y;
		float det = max( dot( T, T ), dot( B, B ) );
		float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );
		return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );
	}
#endif`,Fpr=`#ifdef USE_CLEARCOAT
	vec3 clearcoatNormal = geometryNormal;
#endif`,Bpr=`#ifdef USE_CLEARCOAT_NORMALMAP
	vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;
	clearcoatMapN.xy *= clearcoatNormalScale;
	#ifdef USE_TANGENT
		clearcoatNormal = normalize( vTBN * clearcoatMapN );
	#else
		clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );
	#endif
#endif`,Hpr=`#ifdef USE_CLEARCOATMAP
	uniform sampler2D clearcoatMap;
#endif
#ifdef USE_CLEARCOAT_ROUGHNESSMAP
	uniform sampler2D clearcoatRoughnessMap;
#endif
#ifdef USE_CLEARCOAT_NORMALMAP
	uniform sampler2D clearcoatNormalMap;
	uniform vec2 clearcoatNormalScale;
#endif`,Vpr=`#ifdef OPAQUE
diffuseColor.a = 1.0;
#endif
#ifdef USE_TRANSMISSION
diffuseColor.a *= transmissionAlpha + 0.1;
#endif
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,Upr=`vec3 packNormalToRGB( const in vec3 normal ) {
	return normalize( normal ) * 0.5 + 0.5;
}
vec3 unpackRGBToNormal( const in vec3 rgb ) {
	return 2.0 * rgb.xyz - 1.0;
}
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );
const float ShiftRight8 = 1. / 256.;
vec4 packDepthToRGBA( const in float v ) {
	vec4 r = vec4( fract( v * PackFactors ), v );
	r.yzw -= r.xyz * ShiftRight8;	return r * PackUpscale;
}
float unpackRGBAToDepth( const in vec4 v ) {
	return dot( v, UnpackFactors );
}
vec4 pack2HalfToRGBA( vec2 v ) {
	vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );
	return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );
}
vec2 unpackRGBATo2Half( vec4 v ) {
	return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );
}
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {
	return ( viewZ + near ) / ( near - far );
}
float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {
	return linearClipZ * ( near - far ) - near;
}
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {
	return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );
}
float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {
	return ( near * far ) / ( ( far - near ) * invClipZ - far );
}`,qpr=`#ifdef PREMULTIPLIED_ALPHA
	gl_FragColor.rgb *= gl_FragColor.a;
#endif`,Gpr=`vec4 mvPosition = vec4( transformed, 1.0 );
#ifdef USE_INSTANCING
	mvPosition = instanceMatrix * mvPosition;
#endif
mvPosition = modelViewMatrix * mvPosition;
gl_Position = projectionMatrix * mvPosition;`,Wpr=`#ifdef DITHERING
	gl_FragColor.rgb = dithering( gl_FragColor.rgb );
#endif`,Ypr=`#ifdef DITHERING
	vec3 dithering( vec3 color ) {
		float grid_position = rand( gl_FragCoord.xy );
		vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );
		dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );
		return color + dither_shift_RGB;
	}
#endif`,jpr=`float roughnessFactor = roughness;
#ifdef USE_ROUGHNESSMAP
	vec4 texelRoughness = texture2D( roughnessMap, vUv );
	roughnessFactor *= texelRoughness.g;
#endif`,Xpr=`#ifdef USE_ROUGHNESSMAP
	uniform sampler2D roughnessMap;
#endif`,$pr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];
		varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
	float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {
		return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );
	}
	vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {
		return unpackRGBATo2Half( texture2D( shadow, uv ) );
	}
	float VSMShadow (sampler2D shadow, vec2 uv, float compare ){
		float occlusion = 1.0;
		vec2 distribution = texture2DDistribution( shadow, uv );
		float hard_shadow = step( compare , distribution.x );
		if (hard_shadow != 1.0 ) {
			float distance = compare - distribution.x ;
			float variance = max( 0.00000, distribution.y * distribution.y );
			float softness_probability = variance / (variance + distance * distance );			softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );			occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );
		}
		return occlusion;
	}
	float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {
		float shadow = 1.0;
		shadowCoord.xyz /= shadowCoord.w;
		shadowCoord.z += shadowBias;
		bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );
		bool inFrustum = all( inFrustumVec );
		bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );
		bool frustumTest = all( frustumTestVec );
		if ( frustumTest ) {
		#if defined( SHADOWMAP_TYPE_PCF )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx0 = - texelSize.x * shadowRadius;
			float dy0 = - texelSize.y * shadowRadius;
			float dx1 = + texelSize.x * shadowRadius;
			float dy1 = + texelSize.y * shadowRadius;
			float dx2 = dx0 / 2.0;
			float dy2 = dy0 / 2.0;
			float dx3 = dx1 / 2.0;
			float dy3 = dy1 / 2.0;
			shadow = (
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )
			) * ( 1.0 / 17.0 );
		#elif defined( SHADOWMAP_TYPE_PCF_SOFT )
			vec2 texelSize = vec2( 1.0 ) / shadowMapSize;
			float dx = texelSize.x;
			float dy = texelSize.y;
			vec2 uv = shadowCoord.xy;
			vec2 f = fract( uv * shadowMapSize + 0.5 );
			uv -= f * texelSize;
			shadow = (
				texture2DCompare( shadowMap, uv, shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +
				texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),
					 f.x ) +
				mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), 
					 texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),
					 f.y ) +
				mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), 
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),
						  f.x ),
					 mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), 
						  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),
						  f.x ),
					 f.y )
			) * ( 1.0 / 9.0 );
		#elif defined( SHADOWMAP_TYPE_VSM )
			shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );
		#else
			shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );
		#endif
		}
		return shadow;
	}
	vec2 cubeToUV( vec3 v, float texelSizeY ) {
		vec3 absV = abs( v );
		float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );
		absV *= scaleToCube;
		v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );
		vec2 planar = v.xy;
		float almostATexel = 1.5 * texelSizeY;
		float almostOne = 1.0 - almostATexel;
		if ( absV.z >= almostOne ) {
			if ( v.z > 0.0 )
				planar.x = 4.0 - v.x;
		} else if ( absV.x >= almostOne ) {
			float signX = sign( v.x );
			planar.x = v.z * signX + 2.0 * signX;
		} else if ( absV.y >= almostOne ) {
			float signY = sign( v.y );
			planar.x = v.x + 2.0 * signY + 2.0;
			planar.y = v.z * signY - 2.0;
		}
		return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );
	}
	float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {
		vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );
		vec3 lightToPosition = shadowCoord.xyz;
		float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );		dp += shadowBias;
		vec3 bd3D = normalize( lightToPosition );
		#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )
			vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;
			return (
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +
				texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )
			) * ( 1.0 / 9.0 );
		#else
			return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );
		#endif
	}
#endif`,Kpr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
		uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];
		varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];
		struct DirectionalLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
		uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];
		varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];
		struct SpotLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
		};
		uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
		uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];
		varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];
		struct PointLightShadow {
			float shadowBias;
			float shadowNormalBias;
			float shadowRadius;
			vec2 shadowMapSize;
			float shadowCameraNear;
			float shadowCameraFar;
		};
		uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];
	#endif
#endif`,Zpr=`#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0
		vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );
		vec4 shadowWorldPosition;
	#endif
	#if NUM_DIR_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );
		vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );
		vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );
		vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;
	}
	#pragma unroll_loop_end
	#endif
#endif`,Jpr=`float getShadowMask() {
	float shadow = 1.0;
	#ifdef USE_SHADOWMAP
	#if NUM_DIR_LIGHT_SHADOWS > 0
	DirectionalLightShadow directionalLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {
		directionalLight = directionalLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_SPOT_LIGHT_SHADOWS > 0
	SpotLightShadow spotLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {
		spotLight = spotLightShadows[ i ];
		shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#if NUM_POINT_LIGHT_SHADOWS > 0
	PointLightShadow pointLight;
	#pragma unroll_loop_start
	for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {
		pointLight = pointLightShadows[ i ];
		shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;
	}
	#pragma unroll_loop_end
	#endif
	#endif
	return shadow;
}`,Qpr=`#ifdef USE_SKINNING
	mat4 boneMatX = getBoneMatrix( skinIndex.x );
	mat4 boneMatY = getBoneMatrix( skinIndex.y );
	mat4 boneMatZ = getBoneMatrix( skinIndex.z );
	mat4 boneMatW = getBoneMatrix( skinIndex.w );
#endif`,tdr=`#ifdef USE_SKINNING
	uniform mat4 bindMatrix;
	uniform mat4 bindMatrixInverse;
	#ifdef BONE_TEXTURE
		uniform highp sampler2D boneTexture;
		uniform int boneTextureSize;
		mat4 getBoneMatrix( const in float i ) {
			float j = i * 4.0;
			float x = mod( j, float( boneTextureSize ) );
			float y = floor( j / float( boneTextureSize ) );
			float dx = 1.0 / float( boneTextureSize );
			float dy = 1.0 / float( boneTextureSize );
			y = dy * ( y + 0.5 );
			vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );
			vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );
			vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );
			vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );
			mat4 bone = mat4( v1, v2, v3, v4 );
			return bone;
		}
	#else
		uniform mat4 boneMatrices[ MAX_BONES ];
		mat4 getBoneMatrix( const in float i ) {
			mat4 bone = boneMatrices[ int(i) ];
			return bone;
		}
	#endif
#endif`,edr=`#ifdef USE_SKINNING
	vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );
	vec4 skinned = vec4( 0.0 );
	skinned += boneMatX * skinVertex * skinWeight.x;
	skinned += boneMatY * skinVertex * skinWeight.y;
	skinned += boneMatZ * skinVertex * skinWeight.z;
	skinned += boneMatW * skinVertex * skinWeight.w;
	transformed = ( bindMatrixInverse * skinned ).xyz;
#endif`,rdr=`#ifdef USE_SKINNING
	mat4 skinMatrix = mat4( 0.0 );
	skinMatrix += skinWeight.x * boneMatX;
	skinMatrix += skinWeight.y * boneMatY;
	skinMatrix += skinWeight.z * boneMatZ;
	skinMatrix += skinWeight.w * boneMatW;
	skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;
	objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;
	#ifdef USE_TANGENT
		objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;
	#endif
#endif`,ndr=`float specularStrength;
#ifdef USE_SPECULARMAP
	vec4 texelSpecular = texture2D( specularMap, vUv );
	specularStrength = texelSpecular.r;
#else
	specularStrength = 1.0;
#endif`,idr=`#ifdef USE_SPECULARMAP
	uniform sampler2D specularMap;
#endif`,odr=`#if defined( TONE_MAPPING )
	gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );
#endif`,adr=`#ifndef saturate
#define saturate( a ) clamp( a, 0.0, 1.0 )
#endif
uniform float toneMappingExposure;
vec3 LinearToneMapping( vec3 color ) {
	return toneMappingExposure * color;
}
vec3 ReinhardToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	return saturate( color / ( vec3( 1.0 ) + color ) );
}
vec3 OptimizedCineonToneMapping( vec3 color ) {
	color *= toneMappingExposure;
	color = max( vec3( 0.0 ), color - 0.004 );
	return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );
}
vec3 RRTAndODTFit( vec3 v ) {
	vec3 a = v * ( v + 0.0245786 ) - 0.000090537;
	vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;
	return a / b;
}
vec3 ACESFilmicToneMapping( vec3 color ) {
	const mat3 ACESInputMat = mat3(
		vec3( 0.59719, 0.07600, 0.02840 ),		vec3( 0.35458, 0.90834, 0.13383 ),
		vec3( 0.04823, 0.01566, 0.83777 )
	);
	const mat3 ACESOutputMat = mat3(
		vec3(  1.60475, -0.10208, -0.00327 ),		vec3( -0.53108,  1.10813, -0.07276 ),
		vec3( -0.07367, -0.00605,  1.07602 )
	);
	color *= toneMappingExposure / 0.6;
	color = ACESInputMat * color;
	color = RRTAndODTFit( color );
	color = ACESOutputMat * color;
	return saturate( color );
}
vec3 CustomToneMapping( vec3 color ) { return color; }`,sdr=`#ifdef USE_TRANSMISSION
	float transmissionAlpha = 1.0;
	float transmissionFactor = transmission;
	float thicknessFactor = thickness;
	#ifdef USE_TRANSMISSIONMAP
		transmissionFactor *= texture2D( transmissionMap, vUv ).r;
	#endif
	#ifdef USE_THICKNESSMAP
		thicknessFactor *= texture2D( thicknessMap, vUv ).g;
	#endif
	vec3 pos = vWorldPosition;
	vec3 v = normalize( cameraPosition - pos );
	vec3 n = inverseTransformDirection( normal, viewMatrix );
	vec4 transmission = getIBLVolumeRefraction(
		n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,
		pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,
		attenuationColor, attenuationDistance );
	totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );
	transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );
#endif`,ldr=`#ifdef USE_TRANSMISSION
	uniform float transmission;
	uniform float thickness;
	uniform float attenuationDistance;
	uniform vec3 attenuationColor;
	#ifdef USE_TRANSMISSIONMAP
		uniform sampler2D transmissionMap;
	#endif
	#ifdef USE_THICKNESSMAP
		uniform sampler2D thicknessMap;
	#endif
	uniform vec2 transmissionSamplerSize;
	uniform sampler2D transmissionSamplerMap;
	uniform mat4 modelMatrix;
	uniform mat4 projectionMatrix;
	varying vec3 vWorldPosition;
	vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {
		vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );
		vec3 modelScale;
		modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );
		modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );
		modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );
		return normalize( refractionVector ) * thickness * modelScale;
	}
	float applyIorToRoughness( const in float roughness, const in float ior ) {
		return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );
	}
	vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {
		float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );
		#ifdef TEXTURE_LOD_EXT
			return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );
		#else
			return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );
		#endif
	}
	vec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {
		if ( attenuationDistance == 0.0 ) {
			return radiance;
		} else {
			vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;
			vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );			return transmittance * radiance;
		}
	}
	vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,
		const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,
		const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,
		const in vec3 attenuationColor, const in float attenuationDistance ) {
		vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );
		vec3 refractedRayExit = position + transmissionRay;
		vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );
		vec2 refractionCoords = ndcPos.xy / ndcPos.w;
		refractionCoords += 1.0;
		refractionCoords /= 2.0;
		vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );
		vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );
		vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );
		return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );
	}
#endif`,cdr=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )
	varying vec2 vUv;
#endif`,udr=`#ifdef USE_UV
	#ifdef UVS_VERTEX_ONLY
		vec2 vUv;
	#else
		varying vec2 vUv;
	#endif
	uniform mat3 uvTransform;
#endif`,hdr=`#ifdef USE_UV
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
#endif`,fdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	varying vec2 vUv2;
#endif`,pdr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	attribute vec2 uv2;
	varying vec2 vUv2;
	uniform mat3 uv2Transform;
#endif`,ddr=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )
	vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;
#endif`,mdr=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )
	vec4 worldPosition = vec4( transformed, 1.0 );
	#ifdef USE_INSTANCING
		worldPosition = instanceMatrix * worldPosition;
	#endif
	worldPosition = modelMatrix * worldPosition;
#endif`,gdr=`varying vec2 vUv;
uniform mat3 uvTransform;
void main() {
	vUv = ( uvTransform * vec3( uv, 1 ) ).xy;
	gl_Position = vec4( position.xy, 1.0, 1.0 );
}`,_dr=`uniform sampler2D t2D;
varying vec2 vUv;
void main() {
	gl_FragColor = texture2D( t2D, vUv );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,ydr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
	gl_Position.z = gl_Position.w;
}`,vdr=`#include <envmap_common_pars_fragment>
uniform float opacity;
varying vec3 vWorldDirection;
#include <cube_uv_reflection_fragment>
void main() {
	vec3 vReflect = vWorldDirection;
	#include <envmap_fragment>
	gl_FragColor = envColor;
	gl_FragColor.a *= opacity;
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,xdr=`#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
varying vec2 vHighPrecisionZW;
void main() {
	#include <uv_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vHighPrecisionZW = gl_Position.zw;
}`,bdr=`#if DEPTH_PACKING == 3200
	uniform float opacity;
#endif
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
varying vec2 vHighPrecisionZW;
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#if DEPTH_PACKING == 3200
		diffuseColor.a = opacity;
	#endif
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <logdepthbuf_fragment>
	float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;
	#if DEPTH_PACKING == 3200
		gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );
	#elif DEPTH_PACKING == 3201
		gl_FragColor = packDepthToRGBA( fragCoordZ );
	#endif
}`,wdr=`#define DISTANCE
varying vec3 vWorldPosition;
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <skinbase_vertex>
	#ifdef USE_DISPLACEMENTMAP
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <clipping_planes_vertex>
	vWorldPosition = worldPosition.xyz;
}`,Sdr=`#define DISTANCE
uniform vec3 referencePosition;
uniform float nearDistance;
uniform float farDistance;
varying vec3 vWorldPosition;
#include <common>
#include <packing>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <clipping_planes_pars_fragment>
void main () {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( 1.0 );
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	float dist = length( vWorldPosition - referencePosition );
	dist = ( dist - nearDistance ) / ( farDistance - nearDistance );
	dist = saturate( dist );
	gl_FragColor = packDepthToRGBA( dist );
}`,Mdr=`varying vec3 vWorldDirection;
#include <common>
void main() {
	vWorldDirection = transformDirection( position, modelMatrix );
	#include <begin_vertex>
	#include <project_vertex>
}`,Edr=`uniform sampler2D tEquirect;
varying vec3 vWorldDirection;
#include <common>
void main() {
	vec3 direction = normalize( vWorldDirection );
	vec2 sampleUV = equirectUv( direction );
	gl_FragColor = texture2D( tEquirect, sampleUV );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
}`,Tdr=`uniform float scale;
attribute float lineDistance;
varying float vLineDistance;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	vLineDistance = scale * lineDistance;
	#include <color_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,Cdr=`uniform vec3 diffuse;
uniform float opacity;
uniform float dashSize;
uniform float totalSize;
varying float vLineDistance;
#include <common>
#include <color_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	if ( mod( vLineDistance, totalSize ) > dashSize ) {
		discard;
	}
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <color_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,Adr=`#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )
		#include <beginnormal_vertex>
		#include <morphnormal_vertex>
		#include <skinbase_vertex>
		#include <skinnormal_vertex>
		#include <defaultnormal_vertex>
	#endif
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <fog_vertex>
}`,Pdr=`uniform vec3 diffuse;
uniform float opacity;
#ifndef FLAT_SHADED
	varying vec3 vNormal;
#endif
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	#ifdef USE_LIGHTMAP
		vec4 lightMapTexel= texture2D( lightMap, vUv2 );
		reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;
	#else
		reflectedLight.indirectDiffuse += vec3( 1.0 );
	#endif
	#include <aomap_fragment>
	reflectedLight.indirectDiffuse *= diffuseColor.rgb;
	vec3 outgoingLight = reflectedLight.indirectDiffuse;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Idr=`#define LAMBERT
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
	varying vec3 vLightBack;
	varying vec3 vIndirectBack;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <envmap_pars_vertex>
#include <bsdfs>
#include <lights_pars_begin>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <lights_lambert_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Ldr=`uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
varying vec3 vLightFront;
varying vec3 vIndirectFront;
#ifdef DOUBLE_SIDED
	varying vec3 vLightBack;
	varying vec3 vIndirectBack;
#endif
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <fog_pars_fragment>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	#include <emissivemap_fragment>
	#ifdef DOUBLE_SIDED
		reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;
	#else
		reflectedLight.indirectDiffuse += vIndirectFront;
	#endif
	#include <lightmap_fragment>
	reflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );
	#ifdef DOUBLE_SIDED
		reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;
	#else
		reflectedLight.directDiffuse = vLightFront;
	#endif
	reflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,kdr=`#define MATCAP
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <color_pars_vertex>
#include <displacementmap_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
	vViewPosition = - mvPosition.xyz;
}`,Rdr=`#define MATCAP
uniform vec3 diffuse;
uniform float opacity;
uniform sampler2D matcap;
varying vec3 vViewPosition;
#include <common>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	vec3 viewDir = normalize( vViewPosition );
	vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );
	vec3 y = cross( viewDir, x );
	vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;
	#ifdef USE_MATCAP
		vec4 matcapColor = texture2D( matcap, uv );
	#else
		vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );
	#endif
	vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Ndr=`#define NORMAL
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	varying vec3 vViewPosition;
#endif
#include <common>
#include <uv_pars_vertex>
#include <displacementmap_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	vViewPosition = - mvPosition.xyz;
#endif
}`,Ddr=`#define NORMAL
uniform float opacity;
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )
	varying vec3 vViewPosition;
#endif
#include <packing>
#include <uv_pars_fragment>
#include <normal_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	#include <logdepthbuf_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	gl_FragColor = vec4( packNormalToRGB( normal ), opacity );
}`,Odr=`#define PHONG
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <envmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <envmap_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,zdr=`#define PHONG
uniform vec3 diffuse;
uniform vec3 emissive;
uniform vec3 specular;
uniform float shininess;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_pars_fragment>
#include <cube_uv_reflection_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_phong_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <specularmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <specularmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_phong_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;
	#include <envmap_fragment>
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Fdr=`#define STANDARD
varying vec3 vViewPosition;
#ifdef USE_TRANSMISSION
	varying vec3 vWorldPosition;
#endif
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
#ifdef USE_TRANSMISSION
	vWorldPosition = worldPosition.xyz;
#endif
}`,Bdr=`#define STANDARD
#ifdef PHYSICAL
	#define IOR
	#define SPECULAR
#endif
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float roughness;
uniform float metalness;
uniform float opacity;
#ifdef IOR
	uniform float ior;
#endif
#ifdef SPECULAR
	uniform float specularIntensity;
	uniform vec3 specularColor;
	#ifdef USE_SPECULARINTENSITYMAP
		uniform sampler2D specularIntensityMap;
	#endif
	#ifdef USE_SPECULARCOLORMAP
		uniform sampler2D specularColorMap;
	#endif
#endif
#ifdef USE_CLEARCOAT
	uniform float clearcoat;
	uniform float clearcoatRoughness;
#endif
#ifdef USE_SHEEN
	uniform vec3 sheenColor;
	uniform float sheenRoughness;
	#ifdef USE_SHEENCOLORMAP
		uniform sampler2D sheenColorMap;
	#endif
	#ifdef USE_SHEENROUGHNESSMAP
		uniform sampler2D sheenRoughnessMap;
	#endif
#endif
varying vec3 vViewPosition;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <bsdfs>
#include <cube_uv_reflection_fragment>
#include <envmap_common_pars_fragment>
#include <envmap_physical_pars_fragment>
#include <fog_pars_fragment>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_physical_pars_fragment>
#include <transmission_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <clearcoat_pars_fragment>
#include <roughnessmap_pars_fragment>
#include <metalnessmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <roughnessmap_fragment>
	#include <metalnessmap_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <clearcoat_normal_fragment_begin>
	#include <clearcoat_normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_physical_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;
	vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;
	#include <transmission_fragment>
	vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;
	#ifdef USE_SHEEN
		float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );
		outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;
	#endif
	#ifdef USE_CLEARCOAT
		float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );
		vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );
		outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;
	#endif
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Hdr=`#define TOON
varying vec3 vViewPosition;
#include <common>
#include <uv_pars_vertex>
#include <uv2_pars_vertex>
#include <displacementmap_pars_vertex>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <normal_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	#include <uv2_vertex>
	#include <color_vertex>
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <normal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <displacementmap_vertex>
	#include <project_vertex>
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	vViewPosition = - mvPosition.xyz;
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Vdr=`#define TOON
uniform vec3 diffuse;
uniform vec3 emissive;
uniform float opacity;
#include <common>
#include <packing>
#include <dithering_pars_fragment>
#include <color_pars_fragment>
#include <uv_pars_fragment>
#include <uv2_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <aomap_pars_fragment>
#include <lightmap_pars_fragment>
#include <emissivemap_pars_fragment>
#include <gradientmap_pars_fragment>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <normal_pars_fragment>
#include <lights_toon_pars_fragment>
#include <shadowmap_pars_fragment>
#include <bumpmap_pars_fragment>
#include <normalmap_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec4 diffuseColor = vec4( diffuse, opacity );
	ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );
	vec3 totalEmissiveRadiance = emissive;
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <color_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	#include <normal_fragment_begin>
	#include <normal_fragment_maps>
	#include <emissivemap_fragment>
	#include <lights_toon_fragment>
	#include <lights_fragment_begin>
	#include <lights_fragment_maps>
	#include <lights_fragment_end>
	#include <aomap_fragment>
	vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
	#include <dithering_fragment>
}`,Udr=`uniform float size;
uniform float scale;
#include <common>
#include <color_pars_vertex>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <color_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <project_vertex>
	gl_PointSize = size;
	#ifdef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );
	#endif
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <worldpos_vertex>
	#include <fog_vertex>
}`,qdr=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <color_pars_fragment>
#include <map_particle_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_particle_fragment>
	#include <color_fragment>
	#include <alphatest_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
	#include <premultiplied_alpha_fragment>
}`,Gdr=`#include <common>
#include <fog_pars_vertex>
#include <morphtarget_pars_vertex>
#include <skinning_pars_vertex>
#include <shadowmap_pars_vertex>
void main() {
	#include <beginnormal_vertex>
	#include <morphnormal_vertex>
	#include <skinbase_vertex>
	#include <skinnormal_vertex>
	#include <defaultnormal_vertex>
	#include <begin_vertex>
	#include <morphtarget_vertex>
	#include <skinning_vertex>
	#include <project_vertex>
	#include <worldpos_vertex>
	#include <shadowmap_vertex>
	#include <fog_vertex>
}`,Wdr=`uniform vec3 color;
uniform float opacity;
#include <common>
#include <packing>
#include <fog_pars_fragment>
#include <bsdfs>
#include <lights_pars_begin>
#include <shadowmap_pars_fragment>
#include <shadowmask_pars_fragment>
void main() {
	gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
}`,Ydr=`uniform float rotation;
uniform vec2 center;
#include <common>
#include <uv_pars_vertex>
#include <fog_pars_vertex>
#include <logdepthbuf_pars_vertex>
#include <clipping_planes_pars_vertex>
void main() {
	#include <uv_vertex>
	vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );
	vec2 scale;
	scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );
	scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );
	#ifndef USE_SIZEATTENUATION
		bool isPerspective = isPerspectiveMatrix( projectionMatrix );
		if ( isPerspective ) scale *= - mvPosition.z;
	#endif
	vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;
	vec2 rotatedPosition;
	rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;
	rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;
	mvPosition.xy += rotatedPosition;
	gl_Position = projectionMatrix * mvPosition;
	#include <logdepthbuf_vertex>
	#include <clipping_planes_vertex>
	#include <fog_vertex>
}`,jdr=`uniform vec3 diffuse;
uniform float opacity;
#include <common>
#include <uv_pars_fragment>
#include <map_pars_fragment>
#include <alphamap_pars_fragment>
#include <alphatest_pars_fragment>
#include <fog_pars_fragment>
#include <logdepthbuf_pars_fragment>
#include <clipping_planes_pars_fragment>
void main() {
	#include <clipping_planes_fragment>
	vec3 outgoingLight = vec3( 0.0 );
	vec4 diffuseColor = vec4( diffuse, opacity );
	#include <logdepthbuf_fragment>
	#include <map_fragment>
	#include <alphamap_fragment>
	#include <alphatest_fragment>
	outgoingLight = diffuseColor.rgb;
	#include <output_fragment>
	#include <tonemapping_fragment>
	#include <encodings_fragment>
	#include <fog_fragment>
}`,hr={alphamap_fragment:wfr,alphamap_pars_fragment:Sfr,alphatest_fragment:Mfr,alphatest_pars_fragment:Efr,aomap_fragment:Tfr,aomap_pars_fragment:Cfr,begin_vertex:Afr,beginnormal_vertex:Pfr,bsdfs:Ifr,bumpmap_pars_fragment:Lfr,clipping_planes_fragment:kfr,clipping_planes_pars_fragment:Rfr,clipping_planes_pars_vertex:Nfr,clipping_planes_vertex:Dfr,color_fragment:Ofr,color_pars_fragment:zfr,color_pars_vertex:Ffr,color_vertex:Bfr,common:Hfr,cube_uv_reflection_fragment:Vfr,defaultnormal_vertex:Ufr,displacementmap_pars_vertex:qfr,displacementmap_vertex:Gfr,emissivemap_fragment:Wfr,emissivemap_pars_fragment:Yfr,encodings_fragment:jfr,encodings_pars_fragment:Xfr,envmap_fragment:$fr,envmap_common_pars_fragment:Kfr,envmap_pars_fragment:Zfr,envmap_pars_vertex:Jfr,envmap_physical_pars_fragment:cpr,envmap_vertex:Qfr,fog_vertex:tpr,fog_pars_vertex:epr,fog_fragment:rpr,fog_pars_fragment:npr,gradientmap_pars_fragment:ipr,lightmap_fragment:opr,lightmap_pars_fragment:apr,lights_lambert_vertex:spr,lights_pars_begin:lpr,lights_toon_fragment:upr,lights_toon_pars_fragment:hpr,lights_phong_fragment:fpr,lights_phong_pars_fragment:ppr,lights_physical_fragment:dpr,lights_physical_pars_fragment:mpr,lights_fragment_begin:gpr,lights_fragment_maps:_pr,lights_fragment_end:ypr,logdepthbuf_fragment:vpr,logdepthbuf_pars_fragment:xpr,logdepthbuf_pars_vertex:bpr,logdepthbuf_vertex:wpr,map_fragment:Spr,map_pars_fragment:Mpr,map_particle_fragment:Epr,map_particle_pars_fragment:Tpr,metalnessmap_fragment:Cpr,metalnessmap_pars_fragment:Apr,morphnormal_vertex:Ppr,morphtarget_pars_vertex:Ipr,morphtarget_vertex:Lpr,normal_fragment_begin:kpr,normal_fragment_maps:Rpr,normal_pars_fragment:Npr,normal_pars_vertex:Dpr,normal_vertex:Opr,normalmap_pars_fragment:zpr,clearcoat_normal_fragment_begin:Fpr,clearcoat_normal_fragment_maps:Bpr,clearcoat_pars_fragment:Hpr,output_fragment:Vpr,packing:Upr,premultiplied_alpha_fragment:qpr,project_vertex:Gpr,dithering_fragment:Wpr,dithering_pars_fragment:Ypr,roughnessmap_fragment:jpr,roughnessmap_pars_fragment:Xpr,shadowmap_pars_fragment:$pr,shadowmap_pars_vertex:Kpr,shadowmap_vertex:Zpr,shadowmask_pars_fragment:Jpr,skinbase_vertex:Qpr,skinning_pars_vertex:tdr,skinning_vertex:edr,skinnormal_vertex:rdr,specularmap_fragment:ndr,specularmap_pars_fragment:idr,tonemapping_fragment:odr,tonemapping_pars_fragment:adr,transmission_fragment:sdr,transmission_pars_fragment:ldr,uv_pars_fragment:cdr,uv_pars_vertex:udr,uv_vertex:hdr,uv2_pars_fragment:fdr,uv2_pars_vertex:pdr,uv2_vertex:ddr,worldpos_vertex:mdr,background_vert:gdr,background_frag:_dr,cube_vert:ydr,cube_frag:vdr,depth_vert:xdr,depth_frag:bdr,distanceRGBA_vert:wdr,distanceRGBA_frag:Sdr,equirect_vert:Mdr,equirect_frag:Edr,linedashed_vert:Tdr,linedashed_frag:Cdr,meshbasic_vert:Adr,meshbasic_frag:Pdr,meshlambert_vert:Idr,meshlambert_frag:Ldr,meshmatcap_vert:kdr,meshmatcap_frag:Rdr,meshnormal_vert:Ndr,meshnormal_frag:Ddr,meshphong_vert:Odr,meshphong_frag:zdr,meshphysical_vert:Fdr,meshphysical_frag:Bdr,meshtoon_vert:Hdr,meshtoon_frag:Vdr,points_vert:Udr,points_frag:qdr,shadow_vert:Gdr,shadow_frag:Wdr,sprite_vert:Ydr,sprite_frag:jdr},re={common:{diffuse:{value:new ne(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new ki},uv2Transform:{value:new ki},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Lt(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 ne(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new ne(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ki}},sprite:{diffuse:{value:new ne(16777215)},opacity:{value:1},center:{value:new Lt(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new ki}}},ah={basic:{uniforms:Ta([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.fog]),vertexShader:hr.meshbasic_vert,fragmentShader:hr.meshbasic_frag},lambert:{uniforms:Ta([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.fog,re.lights,{emissive:{value:new ne(0)}}]),vertexShader:hr.meshlambert_vert,fragmentShader:hr.meshlambert_frag},phong:{uniforms:Ta([re.common,re.specularmap,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.fog,re.lights,{emissive:{value:new ne(0)},specular:{value:new ne(1118481)},shininess:{value:30}}]),vertexShader:hr.meshphong_vert,fragmentShader:hr.meshphong_frag},standard:{uniforms:Ta([re.common,re.envmap,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.roughnessmap,re.metalnessmap,re.fog,re.lights,{emissive:{value:new ne(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:hr.meshphysical_vert,fragmentShader:hr.meshphysical_frag},toon:{uniforms:Ta([re.common,re.aomap,re.lightmap,re.emissivemap,re.bumpmap,re.normalmap,re.displacementmap,re.gradientmap,re.fog,re.lights,{emissive:{value:new ne(0)}}]),vertexShader:hr.meshtoon_vert,fragmentShader:hr.meshtoon_frag},matcap:{uniforms:Ta([re.common,re.bumpmap,re.normalmap,re.displacementmap,re.fog,{matcap:{value:null}}]),vertexShader:hr.meshmatcap_vert,fragmentShader:hr.meshmatcap_frag},points:{uniforms:Ta([re.points,re.fog]),vertexShader:hr.points_vert,fragmentShader:hr.points_frag},dashed:{uniforms:Ta([re.common,re.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:hr.linedashed_vert,fragmentShader:hr.linedashed_frag},depth:{uniforms:Ta([re.common,re.displacementmap]),vertexShader:hr.depth_vert,fragmentShader:hr.depth_frag},normal:{uniforms:Ta([re.common,re.bumpmap,re.normalmap,re.displacementmap,{opacity:{value:1}}]),vertexShader:hr.meshnormal_vert,fragmentShader:hr.meshnormal_frag},sprite:{uniforms:Ta([re.sprite,re.fog]),vertexShader:hr.sprite_vert,fragmentShader:hr.sprite_frag},background:{uniforms:{uvTransform:{value:new ki},t2D:{value:null}},vertexShader:hr.background_vert,fragmentShader:hr.background_frag},cube:{uniforms:Ta([re.envmap,{opacity:{value:1}}]),vertexShader:hr.cube_vert,fragmentShader:hr.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:hr.equirect_vert,fragmentShader:hr.equirect_frag},distanceRGBA:{uniforms:Ta([re.common,re.displacementmap,{referencePosition:{value:new j},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:hr.distanceRGBA_vert,fragmentShader:hr.distanceRGBA_frag},shadow:{uniforms:Ta([re.lights,re.fog,{color:{value:new ne(0)},opacity:{value:1}}]),vertexShader:hr.shadow_vert,fragmentShader:hr.shadow_frag}};ah.physical={uniforms:Ta([ah.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Lt(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new ne(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Lt},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new ne(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new ne(1,1,1)},specularColorMap:{value:null}}]),vertexShader:hr.meshphysical_vert,fragmentShader:hr.meshphysical_frag};function Xdr(e,t,r,n,i,o){let a=new ne(0),s=i===!0?0:1,l,c,u=null,h=0,f=null;function p(g,_){let y=!1,x=_.isScene===!0?_.background:null;x&&x.isTexture&&(x=t.get(x));let b=e.xr,S=b.getSession&&b.getSession();S&&S.environmentBlendMode==="additive"&&(x=null),x===null?d(a,s):x&&x.isColor&&(d(x,1),y=!0),(e.autoClear||y)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),x&&(x.isCubeTexture||x.mapping===xM)?(c===void 0&&(c=new ti(new Qf(1,1,1),new lh({name:"BackgroundCubeMaterial",uniforms:Z3(ah.cube.uniforms),vertexShader:ah.cube.vertexShader,fragmentShader:ah.cube.fragmentShader,side:Ii,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(C,P,k){this.matrixWorld.copyPosition(k.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),c.material.uniforms.envMap.value=x,c.material.uniforms.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,(u!==x||h!==x.version||f!==e.toneMapping)&&(c.material.needsUpdate=!0,u=x,h=x.version,f=e.toneMapping),g.unshift(c,c.geometry,c.material,0,0,null)):x&&x.isTexture&&(l===void 0&&(l=new ti(new V0(2,2),new lh({name:"BackgroundMaterial",uniforms:Z3(ah.background.uniforms),vertexShader:ah.background.vertexShader,fragmentShader:ah.background.fragmentShader,side:I1,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(l)),l.material.uniforms.t2D.value=x,x.matrixAutoUpdate===!0&&x.updateMatrix(),l.material.uniforms.uvTransform.value.copy(x.matrix),(u!==x||h!==x.version||f!==e.toneMapping)&&(l.material.needsUpdate=!0,u=x,h=x.version,f=e.toneMapping),g.unshift(l,l.geometry,l.material,0,0,null))}function d(g,_){r.buffers.color.setClear(g.r,g.g,g.b,_,o)}return{getClearColor:function(){return a},setClearColor:function(g,_=1){a.set(g),s=_,d(a,s)},getClearAlpha:function(){return s},setClearAlpha:function(g){s=g,d(a,s)},render:p}}function $dr(e,t,r,n){let i=e.getParameter(34921),o=n.isWebGL2?null:t.get("OES_vertex_array_object"),a=n.isWebGL2||o!==null,s={},l=g(null),c=l;function u(R,F,z,U,W){let Z=!1;if(a){let rt=d(U,z,F);c!==rt&&(c=rt,f(c.object)),Z=_(U,W),Z&&y(U,W)}else{let rt=F.wireframe===!0;(c.geometry!==U.id||c.program!==z.id||c.wireframe!==rt)&&(c.geometry=U.id,c.program=z.id,c.wireframe=rt,Z=!0)}R.isInstancedMesh===!0&&(Z=!0),W!==null&&r.update(W,34963),Z&&(k(R,F,z,U),W!==null&&e.bindBuffer(34963,r.get(W).buffer))}function h(){return n.isWebGL2?e.createVertexArray():o.createVertexArrayOES()}function f(R){return n.isWebGL2?e.bindVertexArray(R):o.bindVertexArrayOES(R)}function p(R){return n.isWebGL2?e.deleteVertexArray(R):o.deleteVertexArrayOES(R)}function d(R,F,z){let U=z.wireframe===!0,W=s[R.id];W===void 0&&(W={},s[R.id]=W);let Z=W[F.id];Z===void 0&&(Z={},W[F.id]=Z);let rt=Z[U];return rt===void 0&&(rt=g(h()),Z[U]=rt),rt}function g(R){let F=[],z=[],U=[];for(let W=0;W<i;W++)F[W]=0,z[W]=0,U[W]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:F,enabledAttributes:z,attributeDivisors:U,object:R,attributes:{},index:null}}function _(R,F){let z=c.attributes,U=R.attributes,W=0;for(let Z in U){let rt=z[Z],ot=U[Z];if(rt===void 0||rt.attribute!==ot||rt.data!==ot.data)return!0;W++}return c.attributesNum!==W||c.index!==F}function y(R,F){let z={},U=R.attributes,W=0;for(let Z in U){let rt=U[Z],ot={};ot.attribute=rt,rt.data&&(ot.data=rt.data),z[Z]=ot,W++}c.attributes=z,c.attributesNum=W,c.index=F}function x(){let R=c.newAttributes;for(let F=0,z=R.length;F<z;F++)R[F]=0}function b(R){S(R,0)}function S(R,F){let z=c.newAttributes,U=c.enabledAttributes,W=c.attributeDivisors;z[R]=1,U[R]===0&&(e.enableVertexAttribArray(R),U[R]=1),W[R]!==F&&((n.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](R,F),W[R]=F)}function C(){let R=c.newAttributes,F=c.enabledAttributes;for(let z=0,U=F.length;z<U;z++)F[z]!==R[z]&&(e.disableVertexAttribArray(z),F[z]=0)}function P(R,F,z,U,W,Z){n.isWebGL2===!0&&(z===5124||z===5125)?e.vertexAttribIPointer(R,F,z,W,Z):e.vertexAttribPointer(R,F,z,U,W,Z)}function k(R,F,z,U){if(n.isWebGL2===!1&&(R.isInstancedMesh||U.isInstancedBufferGeometry)&&t.get("ANGLE_instanced_arrays")===null)return;x();let W=U.attributes,Z=z.getAttributes(),rt=F.defaultAttributeValues;for(let ot in Z){let st=Z[ot];if(st.location>=0){let St=W[ot];if(St===void 0&&(ot==="instanceMatrix"&&R.instanceMatrix&&(St=R.instanceMatrix),ot==="instanceColor"&&R.instanceColor&&(St=R.instanceColor)),St!==void 0){let bt=St.normalized,Mt=St.itemSize,lt=r.get(St);if(lt===void 0)continue;let Kt=lt.buffer,_t=lt.type,ct=lt.bytesPerElement;if(St.isInterleavedBufferAttribute){let X=St.data,et=X.stride,dt=St.offset;if(X&&X.isInstancedInterleavedBuffer){for(let q=0;q<st.locationSize;q++)S(st.location+q,X.meshPerAttribute);R.isInstancedMesh!==!0&&U._maxInstanceCount===void 0&&(U._maxInstanceCount=X.meshPerAttribute*X.count)}else for(let q=0;q<st.locationSize;q++)b(st.location+q);e.bindBuffer(34962,Kt);for(let q=0;q<st.locationSize;q++)P(st.location+q,Mt/st.locationSize,_t,bt,et*ct,(dt+Mt/st.locationSize*q)*ct)}else{if(St.isInstancedBufferAttribute){for(let X=0;X<st.locationSize;X++)S(st.location+X,St.meshPerAttribute);R.isInstancedMesh!==!0&&U._maxInstanceCount===void 0&&(U._maxInstanceCount=St.meshPerAttribute*St.count)}else for(let X=0;X<st.locationSize;X++)b(st.location+X);e.bindBuffer(34962,Kt);for(let X=0;X<st.locationSize;X++)P(st.location+X,Mt/st.locationSize,_t,bt,Mt*ct,Mt/st.locationSize*X*ct)}}else if(rt!==void 0){let bt=rt[ot];if(bt!==void 0)switch(bt.length){case 2:e.vertexAttrib2fv(st.location,bt);break;case 3:e.vertexAttrib3fv(st.location,bt);break;case 4:e.vertexAttrib4fv(st.location,bt);break;default:e.vertexAttrib1fv(st.location,bt)}}}}C()}function O(){I();for(let R in s){let F=s[R];for(let z in F){let U=F[z];for(let W in U)p(U[W].object),delete U[W];delete F[z]}delete s[R]}}function D(R){if(s[R.id]===void 0)return;let F=s[R.id];for(let z in F){let U=F[z];for(let W in U)p(U[W].object),delete U[W];delete F[z]}delete s[R.id]}function B(R){for(let F in s){let z=s[F];if(z[R.id]===void 0)continue;let U=z[R.id];for(let W in U)p(U[W].object),delete U[W];delete z[R.id]}}function I(){L(),c!==l&&(c=l,f(c.object))}function L(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:u,reset:I,resetDefaultState:L,dispose:O,releaseStatesOfGeometry:D,releaseStatesOfProgram:B,initAttributes:x,enableAttribute:b,disableUnusedAttributes:C}}function Kdr(e,t,r,n){let i=n.isWebGL2,o;function a(c){o=c}function s(c,u){e.drawArrays(o,c,u),r.update(u,o,1)}function l(c,u,h){if(h===0)return;let f,p;if(i)f=e,p="drawArraysInstanced";else if(f=t.get("ANGLE_instanced_arrays"),p="drawArraysInstancedANGLE",f===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}f[p](o,c,u,h),r.update(u,o,h)}this.setMode=a,this.render=s,this.renderInstances=l}function Zdr(e,t,r){let n;function i(){if(n!==void 0)return n;if(t.has("EXT_texture_filter_anisotropic")===!0){let k=t.get("EXT_texture_filter_anisotropic");n=e.getParameter(k.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function o(k){if(k==="highp"){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";k="mediump"}return k==="mediump"&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let a=typeof WebGL2RenderingContext!="undefined"&&e instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext!="undefined"&&e instanceof WebGL2ComputeRenderingContext,s=r.precision!==void 0?r.precision:"highp",l=o(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);let c=a||t.has("WEBGL_draw_buffers"),u=r.logarithmicDepthBuffer===!0,h=e.getParameter(34930),f=e.getParameter(35660),p=e.getParameter(3379),d=e.getParameter(34076),g=e.getParameter(34921),_=e.getParameter(36347),y=e.getParameter(36348),x=e.getParameter(36349),b=f>0,S=a||t.has("OES_texture_float"),C=b&&S,P=a?e.getParameter(36183):0;return{isWebGL2:a,drawBuffers:c,getMaxAnisotropy:i,getMaxPrecision:o,precision:s,logarithmicDepthBuffer:u,maxTextures:h,maxVertexTextures:f,maxTextureSize:p,maxCubemapSize:d,maxAttributes:g,maxVertexUniforms:_,maxVaryings:y,maxFragmentUniforms:x,vertexTextures:b,floatFragmentTextures:S,floatVertexTextures:C,maxSamples:P}}function Jdr(e){let t=this,r=null,n=0,i=!1,o=!1,a=new $c,s=new ki,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f,p){let d=h.length!==0||f||n!==0||i;return i=f,r=u(h,p,0),n=h.length,d},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1,c()},this.setState=function(h,f,p){let d=h.clippingPlanes,g=h.clipIntersection,_=h.clipShadows,y=e.get(h);if(!i||d===null||d.length===0||o&&!_)o?u(null):c();else{let x=o?0:n,b=x*4,S=y.clippingState||null;l.value=S,S=u(d,f,b,p);for(let C=0;C!==b;++C)S[C]=r[C];y.clippingState=S,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=x}};function c(){l.value!==r&&(l.value=r,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function u(h,f,p,d){let g=h!==null?h.length:0,_=null;if(g!==0){if(_=l.value,d!==!0||_===null){let y=p+g*4,x=f.matrixWorldInverse;s.getNormalMatrix(x),(_===null||_.length<y)&&(_=new Float32Array(y));for(let b=0,S=p;b!==g;++b,S+=4)a.copy(h[b]).applyMatrix4(x,s),a.normal.toArray(_,S),_[S+3]=a.constant}l.value=_,l.needsUpdate=!0}return t.numPlanes=g,t.numIntersection=0,_}}function Qdr(e){let t=new WeakMap;function r(a,s){return s===YP?a.mapping=nx:s===jP&&(a.mapping=ix),a}function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let s=a.mapping;if(s===YP||s===jP)if(t.has(a)){let l=t.get(a).texture;return r(l,a.mapping)}else{let l=a.image;if(l&&l.height>0){let c=new Q3(l.height/2);return c.fromEquirectangularTexture(e,a),t.set(a,c),a.addEventListener("dispose",i),r(c.texture,a.mapping)}else return null}}return a}function i(a){let s=a.target;s.removeEventListener("dispose",i);let l=t.get(s);l!==void 0&&(t.delete(s),l.dispose())}function o(){t=new WeakMap}return{get:n,dispose:o}}var D1=class extends R1{constructor(t=-1,r=1,n=1,i=-1,o=.1,a=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=r,this.top=n,this.bottom=i,this.near=o,this.far=a,this.updateProjectionMatrix()}copy(t,r){return super.copy(t,r),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,r,n,i,o,a){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=r,this.view.offsetX=n,this.view.offsetY=i,this.view.width=o,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),r=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2,o=n-t,a=n+t,s=i+r,l=i-r;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,u=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,a=o+c*this.view.width,s-=u*this.view.offsetY,l=s-u*this.view.height}this.projectionMatrix.makeOrthographic(o,a,s,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let r=super.toJSON(t);return r.object.zoom=this.zoom,r.object.left=this.left,r.object.right=this.right,r.object.top=this.top,r.object.bottom=this.bottom,r.object.near=this.near,r.object.far=this.far,this.view!==null&&(r.object.view=Object.assign({},this.view)),r}};D1.prototype.isOrthographicCamera=!0;var U0=class extends lh{constructor(t){super(t),this.type="RawShaderMaterial"}};U0.prototype.isRawShaderMaterial=!0;var q3=4,F0=8,$f=Math.pow(2,F0),qfe=[.125,.215,.35,.446,.526,.582],Gfe=F0-q3+1+qfe.length,k3=20,hut=new D1,{_lodPlanes:NP,_sizeLods:Pue,_sigmas:PV}=tmr(),Iue=new ne,fut=null,S1=(1+Math.sqrt(5))/2,R3=1/S1,Lue=[new j(1,1,1),new j(-1,1,1),new j(1,1,-1),new j(-1,1,-1),new j(0,S1,R3),new j(0,S1,-R3),new j(R3,0,S1),new j(-R3,0,S1),new j(S1,R3,0),new j(-S1,R3,0)],e6=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=emr(k3),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,r=0,n=.1,i=100){fut=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(t,n,i,o),r>0&&this._blur(o,0,0,r),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t,r=null){return this._fromTexture(t,r)}fromCubemap(t,r=null){return this._fromTexture(t,r)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=Nue(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Rue(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let t=0;t<NP.length;t++)NP[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(fut),t.scissorTest=!1,IV(t,0,0,t.width,t.height)}_fromTexture(t,r){fut=this._renderer.getRenderTarget();let n=r||this._allocateTargets(t);return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(t){let r={magFilter:ii,minFilter:ii,generateMipmaps:!1,type:C1,format:Qo,encoding:Qd,depthBuffer:!1},n=kue(r);return n.depthBuffer=!t,this._pingPongRenderTarget===null&&(this._pingPongRenderTarget=kue(r)),n}_compileMaterial(t){let r=new ti(NP[0],t);this._renderer.compile(r,hut)}_sceneToCubeUV(t,r,n,i){let s=new Ui(90,1,r,n),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],u=this._renderer,h=u.autoClear,f=u.toneMapping;u.getClearColor(Iue),u.toneMapping=Kd,u.autoClear=!1;let p=new sh({name:"PMREM.Background",side:Ii,depthWrite:!1,depthTest:!1}),d=new ti(new Qf,p),g=!1,_=t.background;_?_.isColor&&(p.color.copy(_),t.background=null,g=!0):(p.color.copy(Iue),g=!0);for(let y=0;y<6;y++){let x=y%3;x===0?(s.up.set(0,l[y],0),s.lookAt(c[y],0,0)):x===1?(s.up.set(0,0,l[y]),s.lookAt(0,c[y],0)):(s.up.set(0,l[y],0),s.lookAt(0,0,c[y])),IV(i,x*$f,y>2?$f:0,$f,$f),u.setRenderTarget(i),g&&u.render(d,s),u.render(t,s)}d.geometry.dispose(),d.material.dispose(),u.toneMapping=f,u.autoClear=h,t.background=_}_textureToCubeUV(t,r){let n=this._renderer,i=t.mapping===nx||t.mapping===ix;i?(this._cubemapShader===null&&(this._cubemapShader=Nue()),this._cubemapShader.uniforms.flipEnvMap.value=t.isRenderTargetTexture===!1?-1:1):this._equirectShader===null&&(this._equirectShader=Rue());let o=i?this._cubemapShader:this._equirectShader,a=new ti(NP[0],o),s=o.uniforms;s.envMap.value=t,i||s.texelSize.value.set(1/t.image.width,1/t.image.height),IV(r,0,0,3*$f,2*$f),n.setRenderTarget(r),n.render(a,hut)}_applyPMREM(t){let r=this._renderer,n=r.autoClear;r.autoClear=!1;for(let i=1;i<Gfe;i++){let o=Math.sqrt(PV[i]*PV[i]-PV[i-1]*PV[i-1]),a=Lue[(i-1)%Lue.length];this._blur(t,i-1,i,o,a)}r.autoClear=n}_blur(t,r,n,i,o){let a=this._pingPongRenderTarget;this._halfBlur(t,a,r,n,i,"latitudinal",o),this._halfBlur(a,t,n,n,i,"longitudinal",o)}_halfBlur(t,r,n,i,o,a,s){let l=this._renderer,c=this._blurMaterial;a!=="latitudinal"&&a!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");let u=3,h=new ti(NP[i],c),f=c.uniforms,p=Pue[n]-1,d=isFinite(o)?Math.PI/(2*p):2*Math.PI/(2*k3-1),g=o/d,_=isFinite(o)?1+Math.floor(u*g):k3;_>k3&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${_} samples when the maximum is set to ${k3}`);let y=[],x=0;for(let P=0;P<k3;++P){let k=P/g,O=Math.exp(-k*k/2);y.push(O),P===0?x+=O:P<_&&(x+=2*O)}for(let P=0;P<y.length;P++)y[P]=y[P]/x;f.envMap.value=t.texture,f.samples.value=_,f.weights.value=y,f.latitudinal.value=a==="latitudinal",s&&(f.poleAxis.value=s),f.dTheta.value=d,f.mipInt.value=F0-n;let b=Pue[i],S=3*Math.max(0,$f-2*b),C=(i===0?0:2*$f)+2*b*(i>F0-q3?i-F0+q3:0);IV(r,S,C,3*b,2*b),l.setRenderTarget(r),l.render(h,hut)}};function tmr(){let e=[],t=[],r=[],n=F0;for(let i=0;i<Gfe;i++){let o=Math.pow(2,n);t.push(o);let a=1/o;i>F0-q3?a=qfe[i-F0+q3-1]:i===0&&(a=0),r.push(a);let s=1/(o-1),l=-s/2,c=1+s/2,u=[l,l,c,l,c,c,l,l,c,c,l,c],h=6,f=6,p=3,d=2,g=1,_=new Float32Array(p*f*h),y=new Float32Array(d*f*h),x=new Float32Array(g*f*h);for(let S=0;S<h;S++){let C=S%3*2/3-1,P=S>2?0:-1,k=[C,P,0,C+2/3,P,0,C+2/3,P+1,0,C,P,0,C+2/3,P+1,0,C,P+1,0];_.set(k,p*f*S),y.set(u,d*f*S);let O=[S,S,S,S,S,S];x.set(O,g*f*S)}let b=new Pe;b.setAttribute("position",new Je(_,p)),b.setAttribute("uv",new Je(y,d)),b.setAttribute("faceIndex",new Je(x,g)),e.push(b),n>q3&&n--}return{_lodPlanes:e,_sizeLods:t,_sigmas:r}}function kue(e){let t=new us(3*$f,3*$f,e);return t.texture.mapping=xM,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function IV(e,t,r,n,i){e.viewport.set(t,r,n,i),e.scissor.set(t,r,n,i)}function emr(e){let t=new Float32Array(e),r=new j(0,1,0);return new U0({name:"SphericalGaussianBlur",defines:{n:e},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform int samples;
			uniform float weights[ n ];
			uniform bool latitudinal;
			uniform float dTheta;
			uniform float mipInt;
			uniform vec3 poleAxis;

			#define ENVMAP_TYPE_CUBE_UV
			#include <cube_uv_reflection_fragment>

			vec3 getSample( float theta, vec3 axis ) {

				float cosTheta = cos( theta );
				// Rodrigues' axis-angle rotation
				vec3 sampleDirection = vOutputDirection * cosTheta
					+ cross( axis, vOutputDirection ) * sin( theta )
					+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );

				return bilinearCubeUV( envMap, sampleDirection, mipInt );

			}

			void main() {

				vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );

				if ( all( equal( axis, vec3( 0.0 ) ) ) ) {

					axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );

				}

				axis = normalize( axis );

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );
				gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );

				for ( int i = 1; i < n; i++ ) {

					if ( i >= samples ) {

						break;

					}

					float theta = dTheta * float( i );
					gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );
					gl_FragColor.rgb += weights[ i ] * getSample( theta, axis );

				}

			}
		`,blending:$d,depthTest:!1,depthWrite:!1})}function Rue(){let e=new Lt(1,1);return new U0({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:e}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			varying vec3 vOutputDirection;

			uniform sampler2D envMap;
			uniform vec2 texelSize;

			#include <common>

			void main() {

				gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );

				vec3 outputDirection = normalize( vOutputDirection );
				vec2 uv = equirectUv( outputDirection );

				vec2 f = fract( uv / texelSize - 0.5 );
				uv -= f * texelSize;
				vec3 tl = texture2D ( envMap, uv ).rgb;
				uv.x += texelSize.x;
				vec3 tr = texture2D ( envMap, uv ).rgb;
				uv.y += texelSize.y;
				vec3 br = texture2D ( envMap, uv ).rgb;
				uv.x -= texelSize.x;
				vec3 bl = texture2D ( envMap, uv ).rgb;

				vec3 tm = mix( tl, tr, f.x );
				vec3 bm = mix( bl, br, f.x );
				gl_FragColor.rgb = mix( tm, bm, f.y );

			}
		`,blending:$d,depthTest:!1,depthWrite:!1})}function Nue(){return new U0({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Nht(),fragmentShader:`

			precision mediump float;
			precision mediump int;

			uniform float flipEnvMap;

			varying vec3 vOutputDirection;

			uniform samplerCube envMap;

			void main() {

				gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );

			}
		`,blending:$d,depthTest:!1,depthWrite:!1})}function Nht(){return`

		precision mediump float;
		precision mediump int;

		attribute vec3 position;
		attribute vec2 uv;
		attribute float faceIndex;

		varying vec3 vOutputDirection;

		// RH coordinate system; PMREM face-indexing convention
		vec3 getDirection( vec2 uv, float face ) {

			uv = 2.0 * uv - 1.0;

			vec3 direction = vec3( uv, 1.0 );

			if ( face == 0.0 ) {

				direction = direction.zyx; // ( 1, v, u ) pos x

			} else if ( face == 1.0 ) {

				direction = direction.xzy;
				direction.xz *= -1.0; // ( -u, 1, -v ) pos y

			} else if ( face == 2.0 ) {

				direction.x *= -1.0; // ( -u, v, 1 ) pos z

			} else if ( face == 3.0 ) {

				direction = direction.zyx;
				direction.xz *= -1.0; // ( -1, v, -u ) neg x

			} else if ( face == 4.0 ) {

				direction = direction.xzy;
				direction.xy *= -1.0; // ( -u, -1, v ) neg y

			} else if ( face == 5.0 ) {

				direction.z *= -1.0; // ( u, v, -1 ) neg z

			}

			return direction;

		}

		void main() {

			vOutputDirection = getDirection( uv, faceIndex );
			gl_Position = vec4( position, 1.0 );

		}
	`}function rmr(e){let t=new WeakMap,r=null;function n(s){if(s&&s.isTexture){let l=s.mapping,c=l===YP||l===jP,u=l===nx||l===ix;if(c||u)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let h=t.get(s);return r===null&&(r=new e6(e)),h=c?r.fromEquirectangular(s,h):r.fromCubemap(s,h),t.set(s,h),h.texture}else{if(t.has(s))return t.get(s).texture;{let h=s.image;if(c&&h&&h.height>0||u&&h&&i(h)){r===null&&(r=new e6(e));let f=c?r.fromEquirectangular(s):r.fromCubemap(s);return t.set(s,f),s.addEventListener("dispose",o),f.texture}else return null}}}return s}function i(s){let l=0,c=6;for(let u=0;u<c;u++)s[u]!==void 0&&l++;return l===c}function o(s){let l=s.target;l.removeEventListener("dispose",o);let c=t.get(l);c!==void 0&&(t.delete(l),c.dispose())}function a(){t=new WeakMap,r!==null&&(r.dispose(),r=null)}return{get:n,dispose:a}}function nmr(e){let t={};function r(n){if(t[n]!==void 0)return t[n];let i;switch(n){case"WEBGL_depth_texture":i=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=e.getExtension(n)}return t[n]=i,i}return{has:function(n){return r(n)!==null},init:function(n){n.isWebGL2?r("EXT_color_buffer_float"):(r("WEBGL_depth_texture"),r("OES_texture_float"),r("OES_texture_half_float"),r("OES_texture_half_float_linear"),r("OES_standard_derivatives"),r("OES_element_index_uint"),r("OES_vertex_array_object"),r("ANGLE_instanced_arrays")),r("OES_texture_float_linear"),r("EXT_color_buffer_half_float"),r("WEBGL_multisampled_render_to_texture")},get:function(n){let i=r(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function imr(e,t,r,n){let i={},o=new WeakMap;function a(h){let f=h.target;f.index!==null&&t.remove(f.index);for(let d in f.attributes)t.remove(f.attributes[d]);f.removeEventListener("dispose",a),delete i[f.id];let p=o.get(f);p&&(t.remove(p),o.delete(f)),n.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,r.memory.geometries--}function s(h,f){return i[f.id]===!0||(f.addEventListener("dispose",a),i[f.id]=!0,r.memory.geometries++),f}function l(h){let f=h.attributes;for(let d in f)t.update(f[d],34962);let p=h.morphAttributes;for(let d in p){let g=p[d];for(let _=0,y=g.length;_<y;_++)t.update(g[_],34962)}}function c(h){let f=[],p=h.index,d=h.attributes.position,g=0;if(p!==null){let x=p.array;g=p.version;for(let b=0,S=x.length;b<S;b+=3){let C=x[b+0],P=x[b+1],k=x[b+2];f.push(C,P,P,k,k,C)}}else{let x=d.array;g=d.version;for(let b=0,S=x.length/3-1;b<S;b+=3){let C=b+0,P=b+1,k=b+2;f.push(C,P,P,k,k,C)}}let _=new(Bfe(f)?K3:$3)(f,1);_.version=g;let y=o.get(h);y&&t.remove(y),o.set(h,_)}function u(h){let f=o.get(h);if(f){let p=h.index;p!==null&&f.version<p.version&&c(h)}else c(h);return o.get(h)}return{get:s,update:l,getWireframeAttribute:u}}function omr(e,t,r,n){let i=n.isWebGL2,o;function a(f){o=f}let s,l;function c(f){s=f.type,l=f.bytesPerElement}function u(f,p){e.drawElements(o,p,s,f*l),r.update(p,o,1)}function h(f,p,d){if(d===0)return;let g,_;if(i)g=e,_="drawElementsInstanced";else if(g=t.get("ANGLE_instanced_arrays"),_="drawElementsInstancedANGLE",g===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}g[_](o,p,s,f*l,d),r.update(p,o,d)}this.setMode=a,this.setIndex=c,this.render=u,this.renderInstances=h}function amr(e){let t={geometries:0,textures:0},r={frame:0,calls:0,triangles:0,points:0,lines:0};function n(o,a,s){switch(r.calls++,a){case 4:r.triangles+=s*(o/3);break;case 1:r.lines+=s*(o/2);break;case 3:r.lines+=s*(o-1);break;case 2:r.lines+=s*o;break;case 0:r.points+=s*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",a);break}}function i(){r.frame++,r.calls=0,r.triangles=0,r.points=0,r.lines=0}return{memory:t,render:r,programs:null,autoReset:!0,reset:i,update:n}}var tM=class extends vi{constructor(t=null,r=1,n=1,i=1){super(null),this.image={data:t,width:r,height:n,depth:i},this.magFilter=Li,this.minFilter=Li,this.wrapR=Jo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};tM.prototype.isDataTexture2DArray=!0;function smr(e,t){return e[0]-t[0]}function lmr(e,t){return Math.abs(t[1])-Math.abs(e[1])}function Due(e,t){let r=1,n=t.isInterleavedBufferAttribute?t.data.array:t.array;n instanceof Int8Array?r=127:n instanceof Int16Array?r=32767:n instanceof Int32Array?r=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",n),e.divideScalar(r)}function cmr(e,t,r){let n={},i=new Float32Array(8),o=new WeakMap,a=new j,s=[];for(let c=0;c<8;c++)s[c]=[c,0];function l(c,u,h,f){let p=c.morphTargetInfluences;if(t.isWebGL2===!0){let d=u.morphAttributes.position.length,g=o.get(u);if(g===void 0||g.count!==d){let L=function(){B.dispose(),o.delete(u),u.removeEventListener("dispose",L)};g!==void 0&&g.texture.dispose();let x=u.morphAttributes.normal!==void 0,b=u.morphAttributes.position,S=u.morphAttributes.normal||[],C=u.attributes.position.count,P=x===!0?2:1,k=C*P,O=1;k>t.maxTextureSize&&(O=Math.ceil(k/t.maxTextureSize),k=t.maxTextureSize);let D=new Float32Array(k*O*4*d),B=new tM(D,k,O,d);B.format=Qo,B.type=jd,B.needsUpdate=!0;let I=P*4;for(let R=0;R<d;R++){let F=b[R],z=S[R],U=k*O*4*R;for(let W=0;W<F.count;W++){a.fromBufferAttribute(F,W),F.normalized===!0&&Due(a,F);let Z=W*I;D[U+Z+0]=a.x,D[U+Z+1]=a.y,D[U+Z+2]=a.z,D[U+Z+3]=0,x===!0&&(a.fromBufferAttribute(z,W),z.normalized===!0&&Due(a,z),D[U+Z+4]=a.x,D[U+Z+5]=a.y,D[U+Z+6]=a.z,D[U+Z+7]=0)}}g={count:d,texture:B,size:new Lt(k,O)},o.set(u,g),u.addEventListener("dispose",L)}let _=0;for(let x=0;x<p.length;x++)_+=p[x];let y=u.morphTargetsRelative?1:1-_;f.getUniforms().setValue(e,"morphTargetBaseInfluence",y),f.getUniforms().setValue(e,"morphTargetInfluences",p),f.getUniforms().setValue(e,"morphTargetsTexture",g.texture,r),f.getUniforms().setValue(e,"morphTargetsTextureSize",g.size)}else{let d=p===void 0?0:p.length,g=n[u.id];if(g===void 0||g.length!==d){g=[];for(let S=0;S<d;S++)g[S]=[S,0];n[u.id]=g}for(let S=0;S<d;S++){let C=g[S];C[0]=S,C[1]=p[S]}g.sort(lmr);for(let S=0;S<8;S++)S<d&&g[S][1]?(s[S][0]=g[S][0],s[S][1]=g[S][1]):(s[S][0]=Number.MAX_SAFE_INTEGER,s[S][1]=0);s.sort(smr);let _=u.morphAttributes.position,y=u.morphAttributes.normal,x=0;for(let S=0;S<8;S++){let C=s[S],P=C[0],k=C[1];P!==Number.MAX_SAFE_INTEGER&&k?(_&&u.getAttribute("morphTarget"+S)!==_[P]&&u.setAttribute("morphTarget"+S,_[P]),y&&u.getAttribute("morphNormal"+S)!==y[P]&&u.setAttribute("morphNormal"+S,y[P]),i[S]=k,x+=k):(_&&u.hasAttribute("morphTarget"+S)===!0&&u.deleteAttribute("morphTarget"+S),y&&u.hasAttribute("morphNormal"+S)===!0&&u.deleteAttribute("morphNormal"+S),i[S]=0)}let b=u.morphTargetsRelative?1:1-x;f.getUniforms().setValue(e,"morphTargetBaseInfluence",b),f.getUniforms().setValue(e,"morphTargetInfluences",i)}}return{update:l}}function umr(e,t,r,n){let i=new WeakMap;function o(l){let c=n.render.frame,u=l.geometry,h=t.get(l,u);return i.get(h)!==c&&(t.update(h),i.set(h,c)),l.isInstancedMesh&&(l.hasEventListener("dispose",s)===!1&&l.addEventListener("dispose",s),r.update(l.instanceMatrix,34962),l.instanceColor!==null&&r.update(l.instanceColor,34962)),h}function a(){i=new WeakMap}function s(l){let c=l.target;c.removeEventListener("dispose",s),r.remove(c.instanceMatrix),c.instanceColor!==null&&r.remove(c.instanceColor)}return{update:o,dispose:a}}var r6=class extends vi{constructor(t=null,r=1,n=1,i=1){super(null),this.image={data:t,width:r,height:n,depth:i},this.magFilter=Li,this.minFilter=Li,this.wrapR=Jo,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};r6.prototype.isDataTexture3D=!0;var Wfe=new vi,Yfe=new tM,jfe=new r6,Xfe=new H0,Oue=[],zue=[],Fue=new Float32Array(16),Bue=new Float32Array(9),Hue=new Float32Array(4);function bM(e,t,r){let n=e[0];if(n<=0||n>0)return e;let i=t*r,o=Oue[i];if(o===void 0&&(o=new Float32Array(i),Oue[i]=o),t!==0){n.toArray(o,0);for(let a=1,s=0;a!==t;++a)s+=r,e[a].toArray(o,s)}return o}function hs(e,t){if(e.length!==t.length)return!1;for(let r=0,n=e.length;r<n;r++)if(e[r]!==t[r])return!1;return!0}function Ca(e,t){for(let r=0,n=t.length;r<n;r++)e[r]=t[r]}function KU(e,t){let r=zue[t];r===void 0&&(r=new Int32Array(t),zue[t]=r);for(let n=0;n!==t;++n)r[n]=e.allocateTextureUnit();return r}function hmr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1f(this.addr,t),r[0]=t)}function fmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y)&&(e.uniform2f(this.addr,t.x,t.y),r[0]=t.x,r[1]=t.y);else{if(hs(r,t))return;e.uniform2fv(this.addr,t),Ca(r,t)}}function pmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z)&&(e.uniform3f(this.addr,t.x,t.y,t.z),r[0]=t.x,r[1]=t.y,r[2]=t.z);else if(t.r!==void 0)(r[0]!==t.r||r[1]!==t.g||r[2]!==t.b)&&(e.uniform3f(this.addr,t.r,t.g,t.b),r[0]=t.r,r[1]=t.g,r[2]=t.b);else{if(hs(r,t))return;e.uniform3fv(this.addr,t),Ca(r,t)}}function dmr(e,t){let r=this.cache;if(t.x!==void 0)(r[0]!==t.x||r[1]!==t.y||r[2]!==t.z||r[3]!==t.w)&&(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),r[0]=t.x,r[1]=t.y,r[2]=t.z,r[3]=t.w);else{if(hs(r,t))return;e.uniform4fv(this.addr,t),Ca(r,t)}}function mmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix2fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Hue.set(n),e.uniformMatrix2fv(this.addr,!1,Hue),Ca(r,n)}}function gmr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix3fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Bue.set(n),e.uniformMatrix3fv(this.addr,!1,Bue),Ca(r,n)}}function _mr(e,t){let r=this.cache,n=t.elements;if(n===void 0){if(hs(r,t))return;e.uniformMatrix4fv(this.addr,!1,t),Ca(r,t)}else{if(hs(r,n))return;Fue.set(n),e.uniformMatrix4fv(this.addr,!1,Fue),Ca(r,n)}}function ymr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1i(this.addr,t),r[0]=t)}function vmr(e,t){let r=this.cache;hs(r,t)||(e.uniform2iv(this.addr,t),Ca(r,t))}function xmr(e,t){let r=this.cache;hs(r,t)||(e.uniform3iv(this.addr,t),Ca(r,t))}function bmr(e,t){let r=this.cache;hs(r,t)||(e.uniform4iv(this.addr,t),Ca(r,t))}function wmr(e,t){let r=this.cache;r[0]!==t&&(e.uniform1ui(this.addr,t),r[0]=t)}function Smr(e,t){let r=this.cache;hs(r,t)||(e.uniform2uiv(this.addr,t),Ca(r,t))}function Mmr(e,t){let r=this.cache;hs(r,t)||(e.uniform3uiv(this.addr,t),Ca(r,t))}function Emr(e,t){let r=this.cache;hs(r,t)||(e.uniform4uiv(this.addr,t),Ca(r,t))}function Tmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTexture2D(t||Wfe,i)}function Cmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture3D(t||jfe,i)}function Amr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.safeSetTextureCube(t||Xfe,i)}function Pmr(e,t,r){let n=this.cache,i=r.allocateTextureUnit();n[0]!==i&&(e.uniform1i(this.addr,i),n[0]=i),r.setTexture2DArray(t||Yfe,i)}function Imr(e){switch(e){case 5126:return hmr;case 35664:return fmr;case 35665:return pmr;case 35666:return dmr;case 35674:return mmr;case 35675:return gmr;case 35676:return _mr;case 5124:case 35670:return ymr;case 35667:case 35671:return vmr;case 35668:case 35672:return xmr;case 35669:case 35673:return bmr;case 5125:return wmr;case 36294:return Smr;case 36295:return Mmr;case 36296:return Emr;case 35678:case 36198:case 36298:case 36306:case 35682:return Tmr;case 35679:case 36299:case 36307:return Cmr;case 35680:case 36300:case 36308:case 36293:return Amr;case 36289:case 36303:case 36311:case 36292:return Pmr}}function Lmr(e,t){e.uniform1fv(this.addr,t)}function kmr(e,t){let r=bM(t,this.size,2);e.uniform2fv(this.addr,r)}function Rmr(e,t){let r=bM(t,this.size,3);e.uniform3fv(this.addr,r)}function Nmr(e,t){let r=bM(t,this.size,4);e.uniform4fv(this.addr,r)}function Dmr(e,t){let r=bM(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,r)}function Omr(e,t){let r=bM(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,r)}function zmr(e,t){let r=bM(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,r)}function Fmr(e,t){e.uniform1iv(this.addr,t)}function Bmr(e,t){e.uniform2iv(this.addr,t)}function Hmr(e,t){e.uniform3iv(this.addr,t)}function Vmr(e,t){e.uniform4iv(this.addr,t)}function Umr(e,t){e.uniform1uiv(this.addr,t)}function qmr(e,t){e.uniform2uiv(this.addr,t)}function Gmr(e,t){e.uniform3uiv(this.addr,t)}function Wmr(e,t){e.uniform4uiv(this.addr,t)}function Ymr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTexture2D(t[o]||Wfe,i[o])}function jmr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture3D(t[o]||jfe,i[o])}function Xmr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.safeSetTextureCube(t[o]||Xfe,i[o])}function $mr(e,t,r){let n=t.length,i=KU(r,n);e.uniform1iv(this.addr,i);for(let o=0;o!==n;++o)r.setTexture2DArray(t[o]||Yfe,i[o])}function Kmr(e){switch(e){case 5126:return Lmr;case 35664:return kmr;case 35665:return Rmr;case 35666:return Nmr;case 35674:return Dmr;case 35675:return Omr;case 35676:return zmr;case 5124:case 35670:return Fmr;case 35667:case 35671:return Bmr;case 35668:case 35672:return Hmr;case 35669:case 35673:return Vmr;case 5125:return Umr;case 36294:return qmr;case 36295:return Gmr;case 36296:return Wmr;case 35678:case 36198:case 36298:case 36306:case 35682:return Ymr;case 35679:case 36299:case 36307:return jmr;case 35680:case 36300:case 36308:case 36293:return Xmr;case 36289:case 36303:case 36311:case 36292:return $mr}}function Zmr(e,t,r){this.id=e,this.addr=r,this.cache=[],this.setValue=Imr(t.type)}function $fe(e,t,r){this.id=e,this.addr=r,this.cache=[],this.size=t.size,this.setValue=Kmr(t.type)}$fe.prototype.updateCache=function(e){let t=this.cache;e instanceof Float32Array&&t.length!==e.length&&(this.cache=new Float32Array(e.length)),Ca(t,e)};function Kfe(e){this.id=e,this.seq=[],this.map={}}Kfe.prototype.setValue=function(e,t,r){let n=this.seq;for(let i=0,o=n.length;i!==o;++i){let a=n[i];a.setValue(e,t[a.id],r)}};var put=/(\w+)(\])?(\[|\.)?/g;function Vue(e,t){e.seq.push(t),e.map[t.id]=t}function Jmr(e,t,r){let n=e.name,i=n.length;for(put.lastIndex=0;;){let o=put.exec(n),a=put.lastIndex,s=o[1],l=o[2]==="]",c=o[3];if(l&&(s=s|0),c===void 0||c==="["&&a+2===i){Vue(r,c===void 0?new Zmr(s,e,t):new $fe(s,e,t));break}else{let h=r.map[s];h===void 0&&(h=new Kfe(s),Vue(r,h)),r=h}}}function B0(e,t){this.seq=[],this.map={};let r=e.getProgramParameter(t,35718);for(let n=0;n<r;++n){let i=e.getActiveUniform(t,n),o=e.getUniformLocation(t,i.name);Jmr(i,o,this)}}B0.prototype.setValue=function(e,t,r,n){let i=this.map[t];i!==void 0&&i.setValue(e,r,n)};B0.prototype.setOptional=function(e,t,r){let n=t[r];n!==void 0&&this.setValue(e,r,n)};B0.upload=function(e,t,r,n){for(let i=0,o=t.length;i!==o;++i){let a=t[i],s=r[a.id];s.needsUpdate!==!1&&a.setValue(e,s.value,n)}};B0.seqWithValue=function(e,t){let r=[];for(let n=0,i=e.length;n!==i;++n){let o=e[n];o.id in t&&r.push(o)}return r};function Uue(e,t,r){let n=e.createShader(t);return e.shaderSource(n,r),e.compileShader(n),n}var Qmr=0;function tgr(e){let t=e.split(`
`);for(let r=0;r<t.length;r++)t[r]=r+1+": "+t[r];return t.join(`
`)}function egr(e){switch(e){case Qd:return["Linear","( value )"];case Wn:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}function que(e,t,r){let n=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();return n&&i===""?"":r.toUpperCase()+`

`+i+`

`+tgr(e.getShaderSource(t))}function rgr(e,t){let r=egr(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+r[0]+r[1]+"; }"}function ngr(e,t){let r;switch(t){case ufe:r="Linear";break;case hfe:r="Reinhard";break;case ffe:r="OptimizedCineon";break;case pfe:r="ACESFilmic";break;case dfe:r="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),r="Linear"}return"vec3 "+e+"( vec3 color ) { return "+r+"ToneMapping( color ); }"}function igr(e){return[e.extensionDerivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||e.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(HP).join(`
`)}function ogr(e){let t=[];for(let r in e){let n=e[r];n!==!1&&t.push("#define "+r+" "+n)}return t.join(`
`)}function agr(e,t){let r={},n=e.getProgramParameter(t,35721);for(let i=0;i<n;i++){let o=e.getActiveAttrib(t,i),a=o.name,s=1;o.type===35674&&(s=2),o.type===35675&&(s=3),o.type===35676&&(s=4),r[a]={type:o.type,location:e.getAttribLocation(t,a),locationSize:s}}return r}function HP(e){return e!==""}function Gue(e,t){return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function Wue(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var sgr=/^[ \t]*#include +<([\w\d./]+)>/gm;function Jut(e){return e.replace(sgr,lgr)}function lgr(e,t){let r=hr[t];if(r===void 0)throw new Error("Can not resolve #include <"+t+">");return Jut(r)}var cgr=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,ugr=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Yue(e){return e.replace(ugr,Zfe).replace(cgr,hgr)}function hgr(e,t,r,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Zfe(e,t,r,n)}function Zfe(e,t,r,n){let i="";for(let o=parseInt(t);o<parseInt(r);o++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return i}function jue(e){let t="precision "+e.precision+` float;
precision `+e.precision+" int;";return e.precision==="highp"?t+=`
#define HIGH_PRECISION`:e.precision==="mediump"?t+=`
#define MEDIUM_PRECISION`:e.precision==="lowp"&&(t+=`
#define LOW_PRECISION`),t}function fgr(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===Cht?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===Uhe?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===F3&&(t="SHADOWMAP_TYPE_VSM"),t}function pgr(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case nx:case ix:t="ENVMAP_TYPE_CUBE";break;case xM:case z6:t="ENVMAP_TYPE_CUBE_UV";break}return t}function dgr(e){let t="ENVMAP_MODE_REFLECTION";if(e.envMap)switch(e.envMapMode){case ix:case z6:t="ENVMAP_MODE_REFRACTION";break}return t}function mgr(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case O6:t="ENVMAP_BLENDING_MULTIPLY";break;case lfe:t="ENVMAP_BLENDING_MIX";break;case cfe:t="ENVMAP_BLENDING_ADD";break}return t}function ggr(e,t,r,n){let i=e.getContext(),o=r.defines,a=r.vertexShader,s=r.fragmentShader,l=fgr(r),c=pgr(r),u=dgr(r),h=mgr(r),f=r.isWebGL2?"":igr(r),p=ogr(o),d=i.createProgram(),g,_,y=r.glslVersion?"#version "+r.glslVersion+`
`:"";r.isRawShaderMaterial?(g=[p].filter(HP).join(`
`),g.length>0&&(g+=`
`),_=[f,p].filter(HP).join(`
`),_.length>0&&(_+=`
`)):(g=[jue(r),"#define SHADER_NAME "+r.shaderName,p,r.instancing?"#define USE_INSTANCING":"",r.instancingColor?"#define USE_INSTANCING_COLOR":"",r.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+r.maxBones,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+u:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.displacementMap&&r.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.flatShading?"#define FLAT_SHADED":"",r.skinning?"#define USE_SKINNING":"",r.useVertexTexture?"#define BONE_TEXTURE":"",r.morphTargets?"#define USE_MORPHTARGETS":"",r.morphNormals&&r.flatShading===!1?"#define USE_MORPHNORMALS":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",r.morphTargets&&r.isWebGL2?"#define MORPHTARGETS_COUNT "+r.morphTargetsCount:"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.sizeAttenuation?"#define USE_SIZEATTENUATION":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.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","#ifdef USE_INSTANCING_COLOR","	attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","	attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","	attribute vec4 color;","#elif defined( USE_COLOR )","	attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","	attribute vec3 morphTarget0;","	attribute vec3 morphTarget1;","	attribute vec3 morphTarget2;","	attribute vec3 morphTarget3;","	#ifdef USE_MORPHNORMALS","		attribute vec3 morphNormal0;","		attribute vec3 morphNormal1;","		attribute vec3 morphNormal2;","		attribute vec3 morphNormal3;","	#else","		attribute vec3 morphTarget4;","		attribute vec3 morphTarget5;","		attribute vec3 morphTarget6;","		attribute vec3 morphTarget7;","	#endif","#endif","#ifdef USE_SKINNING","	attribute vec4 skinIndex;","	attribute vec4 skinWeight;","#endif",`
`].filter(HP).join(`
`),_=[f,jue(r),"#define SHADER_NAME "+r.shaderName,p,r.useFog&&r.fog?"#define USE_FOG":"",r.useFog&&r.fogExp2?"#define FOG_EXP2":"",r.map?"#define USE_MAP":"",r.matcap?"#define USE_MATCAP":"",r.envMap?"#define USE_ENVMAP":"",r.envMap?"#define "+c:"",r.envMap?"#define "+u:"",r.envMap?"#define "+h:"",r.lightMap?"#define USE_LIGHTMAP":"",r.aoMap?"#define USE_AOMAP":"",r.emissiveMap?"#define USE_EMISSIVEMAP":"",r.bumpMap?"#define USE_BUMPMAP":"",r.normalMap?"#define USE_NORMALMAP":"",r.normalMap&&r.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",r.normalMap&&r.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",r.clearcoat?"#define USE_CLEARCOAT":"",r.clearcoatMap?"#define USE_CLEARCOATMAP":"",r.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",r.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",r.specularMap?"#define USE_SPECULARMAP":"",r.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",r.specularColorMap?"#define USE_SPECULARCOLORMAP":"",r.roughnessMap?"#define USE_ROUGHNESSMAP":"",r.metalnessMap?"#define USE_METALNESSMAP":"",r.alphaMap?"#define USE_ALPHAMAP":"",r.alphaTest?"#define USE_ALPHATEST":"",r.sheen?"#define USE_SHEEN":"",r.sheenColorMap?"#define USE_SHEENCOLORMAP":"",r.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",r.transmission?"#define USE_TRANSMISSION":"",r.transmissionMap?"#define USE_TRANSMISSIONMAP":"",r.thicknessMap?"#define USE_THICKNESSMAP":"",r.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",r.vertexTangents?"#define USE_TANGENT":"",r.vertexColors||r.instancingColor?"#define USE_COLOR":"",r.vertexAlphas?"#define USE_COLOR_ALPHA":"",r.vertexUvs?"#define USE_UV":"",r.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",r.gradientMap?"#define USE_GRADIENTMAP":"",r.flatShading?"#define FLAT_SHADED":"",r.doubleSided?"#define DOUBLE_SIDED":"",r.flipSided?"#define FLIP_SIDED":"",r.shadowMapEnabled?"#define USE_SHADOWMAP":"",r.shadowMapEnabled?"#define "+l:"",r.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",r.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",r.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",r.logarithmicDepthBuffer&&r.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensionShaderTextureLOD||r.envMap)&&r.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",r.toneMapping!==Kd?"#define TONE_MAPPING":"",r.toneMapping!==Kd?hr.tonemapping_pars_fragment:"",r.toneMapping!==Kd?ngr("toneMapping",r.toneMapping):"",r.dithering?"#define DITHERING":"",r.alphaWrite?"":"#define OPAQUE",hr.encodings_pars_fragment,rgr("linearToOutputTexel",r.outputEncoding),r.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"",`
`].filter(HP).join(`
`)),a=Jut(a),a=Gue(a,r),a=Wue(a,r),s=Jut(s),s=Gue(s,r),s=Wue(s,r),a=Yue(a),s=Yue(s),r.isWebGL2&&r.isRawShaderMaterial!==!0&&(y=`#version 300 es
`,g=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(`
`)+`
`+g,_=["#define varying in",r.glslVersion===Kut?"":"layout(location = 0) out highp vec4 pc_fragColor;",r.glslVersion===Kut?"":"#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(`
`)+`
`+_);let x=y+g+a,b=y+_+s,S=Uue(i,35633,x),C=Uue(i,35632,b);if(i.attachShader(d,S),i.attachShader(d,C),r.index0AttributeName!==void 0?i.bindAttribLocation(d,0,r.index0AttributeName):r.morphTargets===!0&&i.bindAttribLocation(d,0,"position"),i.linkProgram(d),e.debug.checkShaderErrors){let O=i.getProgramInfoLog(d).trim(),D=i.getShaderInfoLog(S).trim(),B=i.getShaderInfoLog(C).trim(),I=!0,L=!0;if(i.getProgramParameter(d,35714)===!1){I=!1;let R=que(i,S,"vertex"),F=que(i,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(d,35715)+`

Program Info Log: `+O+`
`+R+`
`+F)}else O!==""?console.warn("THREE.WebGLProgram: Program Info Log:",O):(D===""||B==="")&&(L=!1);L&&(this.diagnostics={runnable:I,programLog:O,vertexShader:{log:D,prefix:g},fragmentShader:{log:B,prefix:_}})}i.deleteShader(S),i.deleteShader(C);let P;this.getUniforms=function(){return P===void 0&&(P=new B0(i,d)),P};let k;return this.getAttributes=function(){return k===void 0&&(k=agr(i,d)),k},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(d),this.program=void 0},this.name=r.shaderName,this.id=Qmr++,this.cacheKey=t,this.usedTimes=1,this.program=d,this.vertexShader=S,this.fragmentShader=C,this}var _gr=0,Qut=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let r=t.vertexShader,n=t.fragmentShader,i=this._getShaderStage(r),o=this._getShaderStage(n),a=this._getShaderCacheForMaterial(t);return a.has(i)===!1&&(a.add(i),i.usedTimes++),a.has(o)===!1&&(a.add(o),o.usedTimes++),this}remove(t){let r=this.materialCache.get(t);for(let n of r)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let r=this.materialCache;return r.has(t)===!1&&r.set(t,new Set),r.get(t)}_getShaderStage(t){let r=this.shaderCache;if(r.has(t)===!1){let n=new tht;r.set(t,n)}return r.get(t)}},tht=class{constructor(){this.id=_gr++,this.usedTimes=0}};function ygr(e,t,r,n,i,o,a){let s=new X3,l=new Qut,c=[],u=i.isWebGL2,h=i.logarithmicDepthBuffer,f=i.floatVertexTextures,p=i.maxVertexUniforms,d=i.vertexTextures,g=i.precision,_={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function y(I){let R=I.skeleton.bones;if(f)return 1024;{let z=Math.floor((p-20)/4),U=Math.min(z,R.length);return U<R.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+R.length+" bones. This GPU supports "+U+"."),0):U}}function x(I,L,R,F,z){let U=F.fog,W=I.isMeshStandardMaterial?F.environment:null,Z=(I.isMeshStandardMaterial?r:t).get(I.envMap||W),rt=_[I.type],ot=z.isSkinnedMesh?y(z):0;I.precision!==null&&(g=i.getMaxPrecision(I.precision),g!==I.precision&&console.warn("THREE.WebGLProgram.getParameters:",I.precision,"not supported, using",g,"instead."));let st,St,bt,Mt;if(rt){let X=ah[rt];st=X.vertexShader,St=X.fragmentShader}else st=I.vertexShader,St=I.fragmentShader,l.update(I),bt=l.getVertexShaderID(I),Mt=l.getFragmentShaderID(I);let lt=e.getRenderTarget(),Kt=I.alphaTest>0,_t=I.clearcoat>0;return{isWebGL2:u,shaderID:rt,shaderName:I.type,vertexShader:st,fragmentShader:St,defines:I.defines,customVertexShaderID:bt,customFragmentShaderID:Mt,isRawShaderMaterial:I.isRawShaderMaterial===!0,glslVersion:I.glslVersion,precision:g,instancing:z.isInstancedMesh===!0,instancingColor:z.isInstancedMesh===!0&&z.instanceColor!==null,supportsVertexTextures:d,outputEncoding:lt===null?e.outputEncoding:lt.isXRRenderTarget===!0?lt.texture.encoding:Qd,map:!!I.map,matcap:!!I.matcap,envMap:!!Z,envMapMode:Z&&Z.mapping,envMapCubeUV:!!Z&&(Z.mapping===xM||Z.mapping===z6),lightMap:!!I.lightMap,aoMap:!!I.aoMap,emissiveMap:!!I.emissiveMap,bumpMap:!!I.bumpMap,normalMap:!!I.normalMap,objectSpaceNormalMap:I.normalMapType===Dfe,tangentSpaceNormalMap:I.normalMapType===ax,decodeVideoTexture:!!I.map&&I.map.isVideoTexture===!0&&I.map.encoding===Wn,clearcoat:_t,clearcoatMap:_t&&!!I.clearcoatMap,clearcoatRoughnessMap:_t&&!!I.clearcoatRoughnessMap,clearcoatNormalMap:_t&&!!I.clearcoatNormalMap,displacementMap:!!I.displacementMap,roughnessMap:!!I.roughnessMap,metalnessMap:!!I.metalnessMap,specularMap:!!I.specularMap,specularIntensityMap:!!I.specularIntensityMap,specularColorMap:!!I.specularColorMap,alphaMap:!!I.alphaMap,alphaTest:Kt,alphaWrite:I.alphaWrite||I.transparent,gradientMap:!!I.gradientMap,sheen:I.sheen>0,sheenColorMap:!!I.sheenColorMap,sheenRoughnessMap:!!I.sheenRoughnessMap,transmission:I.transmission>0,transmissionMap:!!I.transmissionMap,thicknessMap:!!I.thicknessMap,combine:I.combine,vertexTangents:!!I.normalMap&&!!z.geometry&&!!z.geometry.attributes.tangent,vertexColors:I.vertexColors,vertexAlphas:I.vertexColors===!0&&!!z.geometry&&!!z.geometry.attributes.color&&z.geometry.attributes.color.itemSize===4,vertexUvs:!!I.map||!!I.bumpMap||!!I.normalMap||!!I.specularMap||!!I.alphaMap||!!I.emissiveMap||!!I.roughnessMap||!!I.metalnessMap||!!I.clearcoatMap||!!I.clearcoatRoughnessMap||!!I.clearcoatNormalMap||!!I.displacementMap||!!I.transmissionMap||!!I.thicknessMap||!!I.specularIntensityMap||!!I.specularColorMap||!!I.sheenColorMap||!!I.sheenRoughnessMap,uvsVertexOnly:!(!!I.map||!!I.bumpMap||!!I.normalMap||!!I.specularMap||!!I.alphaMap||!!I.emissiveMap||!!I.roughnessMap||!!I.metalnessMap||!!I.clearcoatNormalMap||I.transmission>0||!!I.transmissionMap||!!I.thicknessMap||!!I.specularIntensityMap||!!I.specularColorMap||I.sheen>0||!!I.sheenColorMap||!!I.sheenRoughnessMap)&&!!I.displacementMap,fog:!!U,useFog:I.fog,fogExp2:U&&U.isFogExp2,flatShading:!!I.flatShading,sizeAttenuation:I.sizeAttenuation,logarithmicDepthBuffer:h,skinning:z.isSkinnedMesh===!0&&ot>0,maxBones:ot,useVertexTexture:f,morphTargets:!!z.geometry&&!!z.geometry.morphAttributes.position,morphNormals:!!z.geometry&&!!z.geometry.morphAttributes.normal,morphTargetsCount:!!z.geometry&&!!z.geometry.morphAttributes.position?z.geometry.morphAttributes.position.length:0,numDirLights:L.directional.length,numPointLights:L.point.length,numSpotLights:L.spot.length,numRectAreaLights:L.rectArea.length,numHemiLights:L.hemi.length,numDirLightShadows:L.directionalShadowMap.length,numPointLightShadows:L.pointShadowMap.length,numSpotLightShadows:L.spotShadowMap.length,numClippingPlanes:a.numPlanes,numClipIntersection:a.numIntersection,dithering:I.dithering,shadowMapEnabled:e.shadowMap.enabled&&R.length>0,shadowMapType:e.shadowMap.type,toneMapping:I.toneMapped?e.toneMapping:Kd,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:I.premultipliedAlpha,doubleSided:I.side===L1,flipSided:I.side===Ii,depthPacking:I.depthPacking!==void 0?I.depthPacking:!1,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:u||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||n.has("EXT_shader_texture_lod"),customProgramCacheKey:I.customProgramCacheKey()}}function b(I){let L=[];if(I.shaderID?L.push(I.shaderID):(L.push(I.customVertexShaderID),L.push(I.customFragmentShaderID)),I.defines!==void 0)for(let R in I.defines)L.push(R),L.push(I.defines[R]);return I.isRawShaderMaterial===!1&&(S(L,I),C(L,I),L.push(e.outputEncoding)),L.push(I.customProgramCacheKey),L.join()}function S(I,L){I.push(L.precision),I.push(L.outputEncoding),I.push(L.envMapMode),I.push(L.combine),I.push(L.vertexUvs),I.push(L.fogExp2),I.push(L.sizeAttenuation),I.push(L.maxBones),I.push(L.morphTargetsCount),I.push(L.numDirLights),I.push(L.numPointLights),I.push(L.numSpotLights),I.push(L.numHemiLights),I.push(L.numRectAreaLights),I.push(L.numDirLightShadows),I.push(L.numPointLightShadows),I.push(L.numSpotLightShadows),I.push(L.shadowMapType),I.push(L.toneMapping),I.push(L.numClippingPlanes),I.push(L.numClipIntersection),I.push(L.alphaWrite)}function C(I,L){s.disableAll(),L.isWebGL2&&s.enable(0),L.supportsVertexTextures&&s.enable(1),L.instancing&&s.enable(2),L.instancingColor&&s.enable(3),L.map&&s.enable(4),L.matcap&&s.enable(5),L.envMap&&s.enable(6),L.envMapCubeUV&&s.enable(7),L.lightMap&&s.enable(8),L.aoMap&&s.enable(9),L.emissiveMap&&s.enable(10),L.bumpMap&&s.enable(11),L.normalMap&&s.enable(12),L.objectSpaceNormalMap&&s.enable(13),L.tangentSpaceNormalMap&&s.enable(14),L.clearcoat&&s.enable(15),L.clearcoatMap&&s.enable(16),L.clearcoatRoughnessMap&&s.enable(17),L.clearcoatNormalMap&&s.enable(18),L.displacementMap&&s.enable(19),L.specularMap&&s.enable(20),L.roughnessMap&&s.enable(21),L.metalnessMap&&s.enable(22),L.gradientMap&&s.enable(23),L.alphaMap&&s.enable(24),L.alphaTest&&s.enable(25),L.vertexColors&&s.enable(26),L.vertexAlphas&&s.enable(27),L.vertexUvs&&s.enable(28),L.vertexTangents&&s.enable(29),L.uvsVertexOnly&&s.enable(30),L.fog&&s.enable(31),I.push(s.mask),s.disableAll(),L.useFog&&s.enable(0),L.flatShading&&s.enable(1),L.logarithmicDepthBuffer&&s.enable(2),L.skinning&&s.enable(3),L.useVertexTexture&&s.enable(4),L.morphTargets&&s.enable(5),L.morphNormals&&s.enable(6),L.premultipliedAlpha&&s.enable(7),L.shadowMapEnabled&&s.enable(8),L.physicallyCorrectLights&&s.enable(9),L.doubleSided&&s.enable(10),L.flipSided&&s.enable(11),L.depthPacking&&s.enable(12),L.dithering&&s.enable(13),L.specularIntensityMap&&s.enable(14),L.specularColorMap&&s.enable(15),L.transmission&&s.enable(16),L.transmissionMap&&s.enable(17),L.thicknessMap&&s.enable(18),L.sheen&&s.enable(19),L.sheenColorMap&&s.enable(20),L.sheenRoughnessMap&&s.enable(21),L.decodeVideoTexture&&s.enable(22),I.push(s.mask)}function P(I){let L=_[I.type],R;if(L){let F=ah[L];R=Vfe.clone(F.uniforms)}else R=I.uniforms;return R}function k(I,L){let R;for(let F=0,z=c.length;F<z;F++){let U=c[F];if(U.cacheKey===L){R=U,++R.usedTimes;break}}return R===void 0&&(R=new ggr(e,L,I,o),c.push(R)),R}function O(I){if(--I.usedTimes===0){let L=c.indexOf(I);c[L]=c[c.length-1],c.pop(),I.destroy()}}function D(I){l.remove(I)}function B(){l.dispose()}return{getParameters:x,getProgramCacheKey:b,getUniforms:P,acquireProgram:k,releaseProgram:O,releaseShaderCache:D,programs:c,dispose:B}}function vgr(){let e=new WeakMap;function t(o){let a=e.get(o);return a===void 0&&(a={},e.set(o,a)),a}function r(o){e.delete(o)}function n(o,a,s){e.get(o)[a]=s}function i(){e=new WeakMap}return{get:t,remove:r,update:n,dispose:i}}function xgr(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Xue(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function $ue(){let e=[],t=0,r=[],n=[],i=[];function o(){t=0,r.length=0,n.length=0,i.length=0}function a(h,f,p,d,g,_){let y=e[t];return y===void 0?(y={id:h.id,object:h,geometry:f,material:p,groupOrder:d,renderOrder:h.renderOrder,z:g,group:_},e[t]=y):(y.id=h.id,y.object=h,y.geometry=f,y.material=p,y.groupOrder=d,y.renderOrder=h.renderOrder,y.z=g,y.group=_),t++,y}function s(h,f,p,d,g,_){let y=a(h,f,p,d,g,_);p.transmission>0?n.push(y):p.transparent===!0?i.push(y):r.push(y)}function l(h,f,p,d,g,_){let y=a(h,f,p,d,g,_);p.transmission>0?n.unshift(y):p.transparent===!0?i.unshift(y):r.unshift(y)}function c(h,f){r.length>1&&r.sort(h||xgr),n.length>1&&n.sort(f||Xue),i.length>1&&i.sort(f||Xue)}function u(){for(let h=t,f=e.length;h<f;h++){let p=e[h];if(p.id===null)break;p.id=null,p.object=null,p.geometry=null,p.material=null,p.group=null}}return{opaque:r,transmissive:n,transparent:i,init:o,push:s,unshift:l,finish:u,sort:c}}function bgr(){let e=new WeakMap;function t(n,i){let o;return e.has(n)===!1?(o=new $ue,e.set(n,[o])):i>=e.get(n).length?(o=new $ue,e.get(n).push(o)):o=e.get(n)[i],o}function r(){e=new WeakMap}return{get:t,dispose:r}}function wgr(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let r;switch(t.type){case"DirectionalLight":r={direction:new j,color:new ne};break;case"SpotLight":r={position:new j,direction:new j,color:new ne,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":r={position:new j,color:new ne,distance:0,decay:0};break;case"HemisphereLight":r={direction:new j,skyColor:new ne,groundColor:new ne};break;case"RectAreaLight":r={color:new ne,position:new j,halfWidth:new j,halfHeight:new j};break}return e[t.id]=r,r}}}function Sgr(){let e={};return{get:function(t){if(e[t.id]!==void 0)return e[t.id];let r;switch(t.type){case"DirectionalLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt};break;case"SpotLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt};break;case"PointLight":r={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Lt,shadowCameraNear:1,shadowCameraFar:1e3};break}return e[t.id]=r,r}}}var Mgr=0;function Egr(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Tgr(e,t){let r=new wgr,n=Sgr(),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:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let u=0;u<9;u++)i.probe.push(new j);let o=new j,a=new Me,s=new Me;function l(u,h){let f=0,p=0,d=0;for(let D=0;D<9;D++)i.probe[D].set(0,0,0);let g=0,_=0,y=0,x=0,b=0,S=0,C=0,P=0;u.sort(Egr);let k=h!==!0?Math.PI:1;for(let D=0,B=u.length;D<B;D++){let I=u[D],L=I.color,R=I.intensity,F=I.distance,z=I.shadow&&I.shadow.map?I.shadow.map.texture:null;if(I.isAmbientLight)f+=L.r*R*k,p+=L.g*R*k,d+=L.b*R*k;else if(I.isLightProbe)for(let U=0;U<9;U++)i.probe[U].addScaledVector(I.sh.coefficients[U],R);else if(I.isDirectionalLight){let U=r.get(I);if(U.color.copy(I.color).multiplyScalar(I.intensity*k),I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,i.directionalShadow[g]=Z,i.directionalShadowMap[g]=z,i.directionalShadowMatrix[g]=I.shadow.matrix,S++}i.directional[g]=U,g++}else if(I.isSpotLight){let U=r.get(I);if(U.position.setFromMatrixPosition(I.matrixWorld),U.color.copy(L).multiplyScalar(R*k),U.distance=F,U.coneCos=Math.cos(I.angle),U.penumbraCos=Math.cos(I.angle*(1-I.penumbra)),U.decay=I.decay,I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,i.spotShadow[y]=Z,i.spotShadowMap[y]=z,i.spotShadowMatrix[y]=I.shadow.matrix,P++}i.spot[y]=U,y++}else if(I.isRectAreaLight){let U=r.get(I);U.color.copy(L).multiplyScalar(R),U.halfWidth.set(I.width*.5,0,0),U.halfHeight.set(0,I.height*.5,0),i.rectArea[x]=U,x++}else if(I.isPointLight){let U=r.get(I);if(U.color.copy(I.color).multiplyScalar(I.intensity*k),U.distance=I.distance,U.decay=I.decay,I.castShadow){let W=I.shadow,Z=n.get(I);Z.shadowBias=W.bias,Z.shadowNormalBias=W.normalBias,Z.shadowRadius=W.radius,Z.shadowMapSize=W.mapSize,Z.shadowCameraNear=W.camera.near,Z.shadowCameraFar=W.camera.far,i.pointShadow[_]=Z,i.pointShadowMap[_]=z,i.pointShadowMatrix[_]=I.shadow.matrix,C++}i.point[_]=U,_++}else if(I.isHemisphereLight){let U=r.get(I);U.skyColor.copy(I.color).multiplyScalar(R*k),U.groundColor.copy(I.groundColor).multiplyScalar(R*k),i.hemi[b]=U,b++}}x>0&&(t.isWebGL2||e.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=re.LTC_FLOAT_1,i.rectAreaLTC2=re.LTC_FLOAT_2):e.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=re.LTC_HALF_1,i.rectAreaLTC2=re.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=p,i.ambient[2]=d;let O=i.hash;(O.directionalLength!==g||O.pointLength!==_||O.spotLength!==y||O.rectAreaLength!==x||O.hemiLength!==b||O.numDirectionalShadows!==S||O.numPointShadows!==C||O.numSpotShadows!==P)&&(i.directional.length=g,i.spot.length=y,i.rectArea.length=x,i.point.length=_,i.hemi.length=b,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=C,i.pointShadowMap.length=C,i.spotShadow.length=P,i.spotShadowMap.length=P,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=C,i.spotShadowMatrix.length=P,O.directionalLength=g,O.pointLength=_,O.spotLength=y,O.rectAreaLength=x,O.hemiLength=b,O.numDirectionalShadows=S,O.numPointShadows=C,O.numSpotShadows=P,i.version=Mgr++)}function c(u,h){let f=0,p=0,d=0,g=0,_=0,y=h.matrixWorldInverse;for(let x=0,b=u.length;x<b;x++){let S=u[x];if(S.isDirectionalLight){let C=i.directional[f];C.direction.setFromMatrixPosition(S.matrixWorld),o.setFromMatrixPosition(S.target.matrixWorld),C.direction.sub(o),C.direction.transformDirection(y),f++}else if(S.isSpotLight){let C=i.spot[d];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),C.direction.setFromMatrixPosition(S.matrixWorld),o.setFromMatrixPosition(S.target.matrixWorld),C.direction.sub(o),C.direction.transformDirection(y),d++}else if(S.isRectAreaLight){let C=i.rectArea[g];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),s.identity(),a.copy(S.matrixWorld),a.premultiply(y),s.extractRotation(a),C.halfWidth.set(S.width*.5,0,0),C.halfHeight.set(0,S.height*.5,0),C.halfWidth.applyMatrix4(s),C.halfHeight.applyMatrix4(s),g++}else if(S.isPointLight){let C=i.point[p];C.position.setFromMatrixPosition(S.matrixWorld),C.position.applyMatrix4(y),p++}else if(S.isHemisphereLight){let C=i.hemi[_];C.direction.setFromMatrixPosition(S.matrixWorld),C.direction.transformDirection(y),C.direction.normalize(),_++}}}return{setup:l,setupView:c,state:i}}function Kue(e,t){let r=new Tgr(e,t),n=[],i=[];function o(){n.length=0,i.length=0}function a(h){n.push(h)}function s(h){i.push(h)}function l(h){r.setup(n,h)}function c(h){r.setupView(n,h)}return{init:o,state:{lightsArray:n,shadowsArray:i,lights:r},setupLights:l,setupLightsView:c,pushLight:a,pushShadow:s}}function Cgr(e,t){let r=new WeakMap;function n(o,a=0){let s;return r.has(o)===!1?(s=new Kue(e,t),r.set(o,[s])):a>=r.get(o).length?(s=new Kue(e,t),r.get(o).push(s)):s=r.get(o)[a],s}function i(){r=new WeakMap}return{get:n,dispose:i}}var eM=class extends qi{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=Rfe,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,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}};eM.prototype.isMeshDepthMaterial=!0;var rM=class extends qi{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new j,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}};rM.prototype.isMeshDistanceMaterial=!0;var Agr=`void main() {
	gl_Position = vec4( position, 1.0 );
}`,Pgr=`uniform sampler2D shadow_pass;
uniform vec2 resolution;
uniform float radius;
#include <packing>
void main() {
	const float samples = float( VSM_SAMPLES );
	float mean = 0.0;
	float squared_mean = 0.0;
	float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );
	float uvStart = samples <= 1.0 ? 0.0 : - 1.0;
	for ( float i = 0.0; i < samples; i ++ ) {
		float uvOffset = uvStart + i * uvStride;
		#ifdef HORIZONTAL_PASS
			vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );
			mean += distribution.x;
			squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;
		#else
			float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );
			mean += depth;
			squared_mean += depth * depth;
		#endif
	}
	mean = mean / samples;
	squared_mean = squared_mean / samples;
	float std_dev = sqrt( squared_mean - mean * mean );
	gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );
}`;function Jfe(e,t,r){let n=new N1,i=new Lt,o=new Lt,a=new en,s=new eM({depthPacking:Nfe}),l=new rM,c={},u=r.maxTextureSize,h={0:Ii,1:I1,2:L1},f=new lh({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Lt},radius:{value:4}},vertexShader:Agr,fragmentShader:Pgr}),p=f.clone();p.defines.HORIZONTAL_PASS=1;let d=new Pe;d.setAttribute("position",new Je(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let g=new ti(d,f),_=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=Cht,this.render=function(S,C,P){if(_.enabled===!1||_.autoUpdate===!1&&_.needsUpdate===!1||S.length===0)return;let k=e.getRenderTarget(),O=e.getActiveCubeFace(),D=e.getActiveMipmapLevel(),B=e.state;B.setBlending($d),B.buffers.color.setClear(1,1,1,1),B.buffers.depth.setTest(!0),B.setScissorTest(!1);for(let I=0,L=S.length;I<L;I++){let R=S[I],F=R.shadow;if(F===void 0){console.warn("THREE.WebGLShadowMap:",R,"has no shadow.");continue}if(F.autoUpdate===!1&&F.needsUpdate===!1)continue;i.copy(F.mapSize);let z=F.getFrameExtents();if(i.multiply(z),o.copy(F.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/z.x),i.x=o.x*z.x,F.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/z.y),i.y=o.y*z.y,F.mapSize.y=o.y)),F.map===null&&!F.isPointLightShadow&&this.type===F3){let W={minFilter:ii,magFilter:ii,format:Qo};F.map=new us(i.x,i.y,W),F.map.texture.name=R.name+".shadowMap",F.mapPass=new us(i.x,i.y,W),F.camera.updateProjectionMatrix()}if(F.map===null){let W={minFilter:Li,magFilter:Li,format:Qo};F.map=new us(i.x,i.y,W),F.map.texture.name=R.name+".shadowMap",F.camera.updateProjectionMatrix()}e.setRenderTarget(F.map),e.clear();let U=F.getViewportCount();for(let W=0;W<U;W++){let Z=F.getViewport(W);a.set(o.x*Z.x,o.y*Z.y,o.x*Z.z,o.y*Z.w),B.viewport(a),F.updateMatrices(R,W),n=F.getFrustum(),b(C,P,F.camera,R,this.type)}!F.isPointLightShadow&&this.type===F3&&y(F,P),F.needsUpdate=!1}_.needsUpdate=!1,e.setRenderTarget(k,O,D)};function y(S,C){let P=t.update(g);f.defines.VSM_SAMPLES!==S.blurSamples&&(f.defines.VSM_SAMPLES=S.blurSamples,p.defines.VSM_SAMPLES=S.blurSamples,f.needsUpdate=!0,p.needsUpdate=!0),f.uniforms.shadow_pass.value=S.map.texture,f.uniforms.resolution.value=S.mapSize,f.uniforms.radius.value=S.radius,e.setRenderTarget(S.mapPass),e.clear(),e.renderBufferDirect(C,null,P,f,g,null),p.uniforms.shadow_pass.value=S.mapPass.texture,p.uniforms.resolution.value=S.mapSize,p.uniforms.radius.value=S.radius,e.setRenderTarget(S.map),e.clear(),e.renderBufferDirect(C,null,P,p,g,null)}function x(S,C,P,k,O,D,B){let I=null,L=k.isPointLight===!0?S.customDistanceMaterial:S.customDepthMaterial;if(L!==void 0?I=L:I=k.isPointLight===!0?l:s,e.localClippingEnabled&&P.clipShadows===!0&&P.clippingPlanes.length!==0||P.displacementMap&&P.displacementScale!==0||P.alphaMap&&P.alphaTest>0){let R=I.uuid,F=P.uuid,z=c[R];z===void 0&&(z={},c[R]=z);let U=z[F];U===void 0&&(U=I.clone(),z[F]=U),I=U}return I.visible=P.visible,I.wireframe=P.wireframe,B===F3?I.side=P.shadowSide!==null?P.shadowSide:P.side:I.side=P.shadowSide!==null?P.shadowSide:h[P.side],I.alphaMap=P.alphaMap,I.alphaTest=P.alphaTest,I.clipShadows=P.clipShadows,I.clippingPlanes=P.clippingPlanes,I.clipIntersection=P.clipIntersection,I.displacementMap=P.displacementMap,I.displacementScale=P.displacementScale,I.displacementBias=P.displacementBias,I.wireframeLinewidth=P.wireframeLinewidth,I.linewidth=P.linewidth,k.isPointLight===!0&&I.isMeshDistanceMaterial===!0&&(I.referencePosition.setFromMatrixPosition(k.matrixWorld),I.nearDistance=O,I.farDistance=D),I}function b(S,C,P,k,O){if(S.visible===!1)return;if(S.layers.test(C.layers)&&(S.isMesh||S.isLine||S.isPoints)&&(S.castShadow||S.receiveShadow&&O===F3)&&(!S.frustumCulled||n.intersectsObject(S))){S.modelViewMatrix.multiplyMatrices(P.matrixWorldInverse,S.matrixWorld);let I=t.update(S),L=S.material;if(Array.isArray(L)){let R=I.groups;for(let F=0,z=R.length;F<z;F++){let U=R[F],W=L[U.materialIndex];if(W&&W.visible){let Z=x(S,I,W,k,P.near,P.far,O);e.renderBufferDirect(P,null,I,Z,S,U)}}}else if(L.visible){let R=x(S,I,L,k,P.near,P.far,O);e.renderBufferDirect(P,null,I,R,S,null)}}let B=S.children;for(let I=0,L=B.length;I<L;I++)b(B[I],C,P,k,O)}}function Igr(e,t,r){let n=r.isWebGL2;function i(){let at=!1,se=new en,Qt=null,Ce=new en(0,0,0,0);return{setMask:function(Pt){Qt!==Pt&&!at&&(e.colorMask(Pt,Pt,Pt,Pt),Qt=Pt)},setLocked:function(Pt){at=Pt},setClear:function(Pt,Nt,ze,yn,Wi){Wi===!0&&(Pt*=yn,Nt*=yn,ze*=yn),se.set(Pt,Nt,ze,yn),Ce.equals(se)===!1&&(e.clearColor(Pt,Nt,ze,yn),Ce.copy(se))},reset:function(){at=!1,Qt=null,Ce.set(-1,0,0,0)}}}function o(){let at=!1,se=null,Qt=null,Ce=null;return{setTest:function(Pt){Pt?lt(2929):Kt(2929)},setMask:function(Pt){se!==Pt&&!at&&(e.depthMask(Pt),se=Pt)},setFunc:function(Pt){if(Qt!==Pt){if(Pt)switch(Pt){case efe:e.depthFunc(512);break;case rfe:e.depthFunc(519);break;case nfe:e.depthFunc(513);break;case iU:e.depthFunc(515);break;case ife:e.depthFunc(514);break;case ofe:e.depthFunc(518);break;case afe:e.depthFunc(516);break;case sfe:e.depthFunc(517);break;default:e.depthFunc(515)}else e.depthFunc(515);Qt=Pt}},setLocked:function(Pt){at=Pt},setClear:function(Pt){Ce!==Pt&&(e.clearDepth(Pt),Ce=Pt)},reset:function(){at=!1,se=null,Qt=null,Ce=null}}}function a(){let at=!1,se=null,Qt=null,Ce=null,Pt=null,Nt=null,ze=null,yn=null,Wi=null;return{setTest:function(Ar){at||(Ar?lt(2960):Kt(2960))},setMask:function(Ar){se!==Ar&&!at&&(e.stencilMask(Ar),se=Ar)},setFunc:function(Ar,Pa,ho){(Qt!==Ar||Ce!==Pa||Pt!==ho)&&(e.stencilFunc(Ar,Pa,ho),Qt=Ar,Ce=Pa,Pt=ho)},setOp:function(Ar,Pa,ho){(Nt!==Ar||ze!==Pa||yn!==ho)&&(e.stencilOp(Ar,Pa,ho),Nt=Ar,ze=Pa,yn=ho)},setLocked:function(Ar){at=Ar},setClear:function(Ar){Wi!==Ar&&(e.clearStencil(Ar),Wi=Ar)},reset:function(){at=!1,se=null,Qt=null,Ce=null,Pt=null,Nt=null,ze=null,yn=null,Wi=null}}}let s=new i,l=new o,c=new a,u={},h={},f=new WeakMap,p=[],d=null,g=!1,_=null,y=null,x=null,b=null,S=null,C=null,P=null,k=!1,O=null,D=null,B=null,I=null,L=null,R=e.getParameter(35661),F=!1,z=0,U=e.getParameter(7938);U.indexOf("WebGL")!==-1?(z=parseFloat(/^WebGL (\d)/.exec(U)[1]),F=z>=1):U.indexOf("OpenGL ES")!==-1&&(z=parseFloat(/^OpenGL ES (\d)/.exec(U)[1]),F=z>=2);let W=null,Z={},rt=e.getParameter(3088),ot=e.getParameter(2978),st=new en().fromArray(rt),St=new en().fromArray(ot);function bt(at,se,Qt){let Ce=new Uint8Array(4),Pt=e.createTexture();e.bindTexture(at,Pt),e.texParameteri(at,10241,9728),e.texParameteri(at,10240,9728);for(let Nt=0;Nt<Qt;Nt++)e.texImage2D(se+Nt,0,6408,1,1,0,6408,5121,Ce);return Pt}let Mt={};Mt[3553]=bt(3553,3553,1),Mt[34067]=bt(34067,34069,6),s.setClear(0,0,0,1),l.setClear(1),c.setClear(0),lt(2929),l.setFunc(iU),ht(!1),wt(Sut),lt(2884),q($d);function lt(at){u[at]!==!0&&(e.enable(at),u[at]=!0)}function Kt(at){u[at]!==!1&&(e.disable(at),u[at]=!1)}function _t(at,se){return h[at]!==se?(e.bindFramebuffer(at,se),h[at]=se,n&&(at===36009&&(h[36160]=se),at===36160&&(h[36009]=se)),!0):!1}function ct(at,se){let Qt=p,Ce=!1;if(at)if(Qt=f.get(se),Qt===void 0&&(Qt=[],f.set(se,Qt)),at.isWebGLMultipleRenderTargets){let Pt=at.texture;if(Qt.length!==Pt.length||Qt[0]!==36064){for(let Nt=0,ze=Pt.length;Nt<ze;Nt++)Qt[Nt]=36064+Nt;Qt.length=Pt.length,Ce=!0}}else Qt[0]!==36064&&(Qt[0]=36064,Ce=!0);else Qt[0]!==1029&&(Qt[0]=1029,Ce=!0);Ce&&(r.isWebGL2?e.drawBuffers(Qt):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(Qt))}function X(at){return d!==at?(e.useProgram(at),d=at,!0):!1}let et={[M1]:32774,[Ghe]:32778,[Whe]:32779};if(n)et[Cut]=32775,et[Aut]=32776;else{let at=t.get("EXT_blend_minmax");at!==null&&(et[Cut]=at.MIN_EXT,et[Aut]=at.MAX_EXT)}let dt={[Yhe]:0,[jhe]:1,[Xhe]:768,[Pht]:770,[tfe]:776,[Jhe]:774,[Khe]:772,[$he]:769,[Iht]:771,[Qhe]:775,[Zhe]:773};function q(at,se,Qt,Ce,Pt,Nt,ze,yn){if(at===$d){g===!0&&(Kt(3042),g=!1);return}if(g===!1&&(lt(3042),g=!0),at!==qhe){if(at!==_||yn!==k){if((y!==M1||S!==M1)&&(e.blendEquation(32774),y=M1,S=M1),yn)switch(at){case V3:e.blendFuncSeparate(1,771,1,771);break;case Mut:e.blendFunc(1,1);break;case Eut:e.blendFuncSeparate(0,769,0,1);break;case Tut:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",at);break}else switch(at){case V3:e.blendFuncSeparate(770,771,1,771);break;case Mut:e.blendFunc(770,1);break;case Eut:e.blendFuncSeparate(0,769,0,1);break;case Tut:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",at);break}x=null,b=null,C=null,P=null,_=at,k=yn}return}Pt=Pt||se,Nt=Nt||Qt,ze=ze||Ce,(se!==y||Pt!==S)&&(e.blendEquationSeparate(et[se],et[Pt]),y=se,S=Pt),(Qt!==x||Ce!==b||Nt!==C||ze!==P)&&(e.blendFuncSeparate(dt[Qt],dt[Ce],dt[Nt],dt[ze]),x=Qt,b=Ce,C=Nt,P=ze),_=at,k=null}function pt(at,se){at.side===L1?Kt(2884):lt(2884);let Qt=at.side===Ii;se&&(Qt=!Qt),ht(Qt),at.blending===V3&&at.transparent===!1?q($d):q(at.blending,at.blendEquation,at.blendSrc,at.blendDst,at.blendEquationAlpha,at.blendSrcAlpha,at.blendDstAlpha,at.premultipliedAlpha),l.setFunc(at.depthFunc),l.setTest(at.depthTest),l.setMask(at.depthWrite),s.setMask(at.colorWrite);let Ce=at.stencilWrite;c.setTest(Ce),Ce&&(c.setMask(at.stencilWriteMask),c.setFunc(at.stencilFunc,at.stencilRef,at.stencilFuncMask),c.setOp(at.stencilFail,at.stencilZFail,at.stencilZPass)),ie(at.polygonOffset,at.polygonOffsetFactor,at.polygonOffsetUnits),at.alphaToCoverage===!0?lt(32926):Kt(32926)}function ht(at){O!==at&&(at?e.frontFace(2304):e.frontFace(2305),O=at)}function wt(at){at!==Hhe?(lt(2884),at!==D&&(at===Sut?e.cullFace(1029):at===Vhe?e.cullFace(1028):e.cullFace(1032))):Kt(2884),D=at}function kt(at){at!==B&&(F&&e.lineWidth(at),B=at)}function ie(at,se,Qt){at?(lt(32823),(I!==se||L!==Qt)&&(e.polygonOffset(se,Qt),I=se,L=Qt)):Kt(32823)}function ee(at){at?lt(3089):Kt(3089)}function Le(at){at===void 0&&(at=33984+R-1),W!==at&&(e.activeTexture(at),W=at)}function ar(at,se){W===null&&Le();let Qt=Z[W];Qt===void 0&&(Qt={type:void 0,texture:void 0},Z[W]=Qt),(Qt.type!==at||Qt.texture!==se)&&(e.bindTexture(at,se||Mt[at]),Qt.type=at,Qt.texture=se)}function fr(){let at=Z[W];at!==void 0&&at.type!==void 0&&(e.bindTexture(at.type,null),at.type=void 0,at.texture=void 0)}function tt(){try{e.compressedTexImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function $(){try{e.texSubImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function It(){try{e.texSubImage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function $t(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function he(){try{e.texStorage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function Tt(){try{e.texStorage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function be(){try{e.texImage2D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function nt(){try{e.texImage3D.apply(e,arguments)}catch(at){console.error("THREE.WebGLState:",at)}}function Ct(at){st.equals(at)===!1&&(e.scissor(at.x,at.y,at.z,at.w),st.copy(at))}function Wt(at){St.equals(at)===!1&&(e.viewport(at.x,at.y,at.z,at.w),St.copy(at))}function fe(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),n===!0&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),u={},W=null,Z={},h={},f=new WeakMap,p=[],d=null,g=!1,_=null,y=null,x=null,b=null,S=null,C=null,P=null,k=!1,O=null,D=null,B=null,I=null,L=null,st.set(0,0,e.canvas.width,e.canvas.height),St.set(0,0,e.canvas.width,e.canvas.height),s.reset(),l.reset(),c.reset()}return{buffers:{color:s,depth:l,stencil:c},enable:lt,disable:Kt,bindFramebuffer:_t,drawBuffers:ct,useProgram:X,setBlending:q,setMaterial:pt,setFlipSided:ht,setCullFace:wt,setLineWidth:kt,setPolygonOffset:ie,setScissorTest:ee,activeTexture:Le,bindTexture:ar,unbindTexture:fr,compressedTexImage2D:tt,texImage2D:be,texImage3D:nt,texStorage2D:he,texStorage3D:Tt,texSubImage2D:$,texSubImage3D:It,compressedTexSubImage2D:$t,scissor:Ct,viewport:Wt,reset:fe}}function Lgr(e,t,r,n,i,o,a){let s=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,h=i.maxSamples,p=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,d=new WeakMap,g,_=!1;try{_=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(tt){}function y(tt,$){return _?new OffscreenCanvas(tt,$):t6("canvas")}function x(tt,$,It,$t){let he=1;if((tt.width>$t||tt.height>$t)&&(he=$t/Math.max(tt.width,tt.height)),he<1||$===!0)if(typeof HTMLImageElement!="undefined"&&tt instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&tt instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&tt instanceof ImageBitmap){let Tt=$?Ffe:Math.floor,be=Tt(he*tt.width),nt=Tt(he*tt.height);g===void 0&&(g=y(be,nt));let Ct=It?y(be,nt):g;return Ct.width=be,Ct.height=nt,Ct.getContext("2d").drawImage(tt,0,0,be,nt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+tt.width+"x"+tt.height+") to ("+be+"x"+nt+")."),Ct}else return"data"in tt&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+tt.width+"x"+tt.height+")."),tt;return tt}function b(tt){return Zut(tt.width)&&Zut(tt.height)}function S(tt){return s?!1:tt.wrapS!==Jo||tt.wrapT!==Jo||tt.minFilter!==Li&&tt.minFilter!==ii}function C(tt,$){return tt.generateMipmaps&&$&&tt.minFilter!==Li&&tt.minFilter!==ii}function P(tt){e.generateMipmap(tt)}function k(tt,$,It,$t,he=!1){if(s===!1)return $;if(tt!==null){if(e[tt]!==void 0)return e[tt];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+tt+"'")}let Tt=$;return $===6403&&(It===5126&&(Tt=33326),It===5131&&(Tt=33325),It===5121&&(Tt=33321)),$===33319&&(It===5126&&(Tt=33328),It===5131&&(Tt=33327),It===5121&&(Tt=33323)),$===6408&&(It===5126&&(Tt=34836),It===5131&&(Tt=34842),It===5121&&(Tt=$t===Wn&&he===!1?35907:32856),It===32819&&(Tt=32854),It===32820&&(Tt=32855)),(Tt===33325||Tt===33326||Tt===33327||Tt===33328||Tt===34842||Tt===34836)&&t.get("EXT_color_buffer_float"),Tt}function O(tt,$,It){return C(tt,It)===!0||tt.isFramebufferTexture&&tt.minFilter!==Li&&tt.minFilter!==ii?Math.log2(Math.max($.width,$.height))+1:tt.mipmaps!==void 0&&tt.mipmaps.length>0?tt.mipmaps.length:tt.isCompressedTexture&&Array.isArray(tt.image)?$.mipmaps.length:1}function D(tt){return tt===Li||tt===oU||tt===aU?9728:9729}function B(tt){let $=tt.target;$.removeEventListener("dispose",B),L($),$.isVideoTexture&&d.delete($),a.memory.textures--}function I(tt){let $=tt.target;$.removeEventListener("dispose",I),R($)}function L(tt){let $=n.get(tt);$.__webglInit!==void 0&&(e.deleteTexture($.__webglTexture),n.remove(tt))}function R(tt){let $=tt.texture,It=n.get(tt),$t=n.get($);if(!!tt){if($t.__webglTexture!==void 0&&(e.deleteTexture($t.__webglTexture),a.memory.textures--),tt.depthTexture&&tt.depthTexture.dispose(),tt.isWebGLCubeRenderTarget)for(let he=0;he<6;he++)e.deleteFramebuffer(It.__webglFramebuffer[he]),It.__webglDepthbuffer&&e.deleteRenderbuffer(It.__webglDepthbuffer[he]);else e.deleteFramebuffer(It.__webglFramebuffer),It.__webglDepthbuffer&&e.deleteRenderbuffer(It.__webglDepthbuffer),It.__webglMultisampledFramebuffer&&e.deleteFramebuffer(It.__webglMultisampledFramebuffer),It.__webglColorRenderbuffer&&e.deleteRenderbuffer(It.__webglColorRenderbuffer),It.__webglDepthRenderbuffer&&e.deleteRenderbuffer(It.__webglDepthRenderbuffer);if(tt.isWebGLMultipleRenderTargets)for(let he=0,Tt=$.length;he<Tt;he++){let be=n.get($[he]);be.__webglTexture&&(e.deleteTexture(be.__webglTexture),a.memory.textures--),n.remove($[he])}n.remove($),n.remove(tt)}}let F=0;function z(){F=0}function U(){let tt=F;return tt>=l&&console.warn("THREE.WebGLTextures: Trying to use "+tt+" texture units while this GPU supports only "+l),F+=1,tt}function W(tt,$){let It=n.get(tt);if(tt.isVideoTexture&&kt(tt),tt.version>0&&It.__version!==tt.version){let $t=tt.image;if($t===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if($t.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{lt(It,tt,$);return}}r.activeTexture(33984+$),r.bindTexture(3553,It.__webglTexture)}function Z(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){lt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(35866,It.__webglTexture)}function rt(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){lt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(32879,It.__webglTexture)}function ot(tt,$){let It=n.get(tt);if(tt.version>0&&It.__version!==tt.version){Kt(It,tt,$);return}r.activeTexture(33984+$),r.bindTexture(34067,It.__webglTexture)}let st={[XP]:10497,[Jo]:33071,[$P]:33648},St={[Li]:9728,[oU]:9984,[aU]:9986,[ii]:9729,[Lht]:9985,[ox]:9987};function bt(tt,$,It){if(It?(e.texParameteri(tt,10242,st[$.wrapS]),e.texParameteri(tt,10243,st[$.wrapT]),(tt===32879||tt===35866)&&e.texParameteri(tt,32882,st[$.wrapR]),e.texParameteri(tt,10240,St[$.magFilter]),e.texParameteri(tt,10241,St[$.minFilter])):(e.texParameteri(tt,10242,33071),e.texParameteri(tt,10243,33071),(tt===32879||tt===35866)&&e.texParameteri(tt,32882,33071),($.wrapS!==Jo||$.wrapT!==Jo)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(tt,10240,D($.magFilter)),e.texParameteri(tt,10241,D($.minFilter)),$.minFilter!==Li&&$.minFilter!==ii&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let $t=t.get("EXT_texture_filter_anisotropic");if($.type===jd&&t.has("OES_texture_float_linear")===!1||s===!1&&$.type===C1&&t.has("OES_texture_half_float_linear")===!1)return;($.anisotropy>1||n.get($).__currentAnisotropy)&&(e.texParameterf(tt,$t.TEXTURE_MAX_ANISOTROPY_EXT,Math.min($.anisotropy,i.getMaxAnisotropy())),n.get($).__currentAnisotropy=$.anisotropy)}}function Mt(tt,$){tt.__webglInit===void 0&&(tt.__webglInit=!0,$.addEventListener("dispose",B),tt.__webglTexture=e.createTexture(),a.memory.textures++)}function lt(tt,$,It){let $t=3553;$.isDataTexture2DArray&&($t=35866),$.isDataTexture3D&&($t=32879),Mt(tt,$),r.activeTexture(33984+It),r.bindTexture($t,tt.__webglTexture),e.pixelStorei(37440,$.flipY),e.pixelStorei(37441,$.premultiplyAlpha),e.pixelStorei(3317,$.unpackAlignment),e.pixelStorei(37443,0);let he=S($)&&b($.image)===!1,Tt=x($.image,he,!1,u);Tt=ie($,Tt);let be=b(Tt)||s,nt=o.convert($.format,$.encoding),Ct=o.convert($.type),Wt=k($.internalFormat,nt,Ct,$.encoding,$.isVideoTexture);bt($t,$,be);let fe,at=$.mipmaps,se=s&&$.isVideoTexture!==!0,Qt=tt.__version===void 0,Ce=O($,Tt,be);if($.isDepthTexture)Wt=6402,s?$.type===jd?Wt=36012:$.type===VP?Wt=33190:$.type===A1?Wt=35056:Wt=33189:$.type===jd&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),$.format===z0&&Wt===6402&&$.type!==G3&&$.type!==VP&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),$.type=G3,Ct=o.convert($.type)),$.format===k1&&Wt===6402&&(Wt=34041,$.type!==A1&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),$.type=A1,Ct=o.convert($.type))),se&&Qt?r.texStorage2D(3553,1,Wt,Tt.width,Tt.height):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,null);else if($.isDataTexture)if(at.length>0&&be){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],se?r.texSubImage2D(3553,0,0,0,fe.width,fe.height,nt,Ct,fe.data):r.texImage2D(3553,Pt,Wt,fe.width,fe.height,0,nt,Ct,fe.data);$.generateMipmaps=!1}else se?(Qt&&r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height),r.texSubImage2D(3553,0,0,0,Tt.width,Tt.height,nt,Ct,Tt.data)):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,Tt.data);else if($.isCompressedTexture){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],$.format!==Qo?nt!==null?se?r.compressedTexSubImage2D(3553,Pt,0,0,fe.width,fe.height,nt,fe.data):r.compressedTexImage2D(3553,Pt,Wt,fe.width,fe.height,0,fe.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):se?r.texSubImage2D(3553,Pt,0,0,fe.width,fe.height,nt,Ct,fe.data):r.texImage2D(3553,Pt,Wt,fe.width,fe.height,0,nt,Ct,fe.data)}else if($.isDataTexture2DArray)se?(Qt&&r.texStorage3D(35866,Ce,Wt,Tt.width,Tt.height,Tt.depth),r.texSubImage3D(35866,0,0,0,0,Tt.width,Tt.height,Tt.depth,nt,Ct,Tt.data)):r.texImage3D(35866,0,Wt,Tt.width,Tt.height,Tt.depth,0,nt,Ct,Tt.data);else if($.isDataTexture3D)se?(Qt&&r.texStorage3D(32879,Ce,Wt,Tt.width,Tt.height,Tt.depth),r.texSubImage3D(32879,0,0,0,0,Tt.width,Tt.height,Tt.depth,nt,Ct,Tt.data)):r.texImage3D(32879,0,Wt,Tt.width,Tt.height,Tt.depth,0,nt,Ct,Tt.data);else if($.isFramebufferTexture)se&&Qt?r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height):r.texImage2D(3553,0,Wt,Tt.width,Tt.height,0,nt,Ct,null);else if(at.length>0&&be){se&&Qt&&r.texStorage2D(3553,Ce,Wt,at[0].width,at[0].height);for(let Pt=0,Nt=at.length;Pt<Nt;Pt++)fe=at[Pt],se?r.texSubImage2D(3553,Pt,0,0,nt,Ct,fe):r.texImage2D(3553,Pt,Wt,nt,Ct,fe);$.generateMipmaps=!1}else se?(Qt&&r.texStorage2D(3553,Ce,Wt,Tt.width,Tt.height),r.texSubImage2D(3553,0,0,0,nt,Ct,Tt)):r.texImage2D(3553,0,Wt,nt,Ct,Tt);C($,be)&&P($t),tt.__version=$.version,$.onUpdate&&$.onUpdate($)}function Kt(tt,$,It){if($.image.length!==6)return;Mt(tt,$),r.activeTexture(33984+It),r.bindTexture(34067,tt.__webglTexture),e.pixelStorei(37440,$.flipY),e.pixelStorei(37441,$.premultiplyAlpha),e.pixelStorei(3317,$.unpackAlignment),e.pixelStorei(37443,0);let $t=$&&($.isCompressedTexture||$.image[0].isCompressedTexture),he=$.image[0]&&$.image[0].isDataTexture,Tt=[];for(let Pt=0;Pt<6;Pt++)!$t&&!he?Tt[Pt]=x($.image[Pt],!1,!0,c):Tt[Pt]=he?$.image[Pt].image:$.image[Pt],Tt[Pt]=ie($,Tt[Pt]);let be=Tt[0],nt=b(be)||s,Ct=o.convert($.format,$.encoding),Wt=o.convert($.type),fe=k($.internalFormat,Ct,Wt,$.encoding),at=s&&$.isVideoTexture!==!0,se=tt.__version===void 0,Qt=O($,be,nt);bt(34067,$,nt);let Ce;if($t){at&&se&&r.texStorage2D(34067,Qt,fe,be.width,be.height);for(let Pt=0;Pt<6;Pt++){Ce=Tt[Pt].mipmaps;for(let Nt=0;Nt<Ce.length;Nt++){let ze=Ce[Nt];$.format!==Qo?Ct!==null?at?r.compressedTexSubImage2D(34069+Pt,Nt,0,0,ze.width,ze.height,Ct,ze.data):r.compressedTexImage2D(34069+Pt,Nt,fe,ze.width,ze.height,0,ze.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):at?r.texSubImage2D(34069+Pt,Nt,0,0,ze.width,ze.height,Ct,Wt,ze.data):r.texImage2D(34069+Pt,Nt,fe,ze.width,ze.height,0,Ct,Wt,ze.data)}}}else{Ce=$.mipmaps,at&&se&&(Ce.length>0&&Qt++,r.texStorage2D(34067,Qt,fe,Tt[0].width,Tt[0].height));for(let Pt=0;Pt<6;Pt++)if(he){at?r.texSubImage2D(34069+Pt,0,0,0,Tt[Pt].width,Tt[Pt].height,Ct,Wt,Tt[Pt].data):r.texImage2D(34069+Pt,0,fe,Tt[Pt].width,Tt[Pt].height,0,Ct,Wt,Tt[Pt].data);for(let Nt=0;Nt<Ce.length;Nt++){let yn=Ce[Nt].image[Pt].image;at?r.texSubImage2D(34069+Pt,Nt+1,0,0,yn.width,yn.height,Ct,Wt,yn.data):r.texImage2D(34069+Pt,Nt+1,fe,yn.width,yn.height,0,Ct,Wt,yn.data)}}else{at?r.texSubImage2D(34069+Pt,0,0,0,Ct,Wt,Tt[Pt]):r.texImage2D(34069+Pt,0,fe,Ct,Wt,Tt[Pt]);for(let Nt=0;Nt<Ce.length;Nt++){let ze=Ce[Nt];at?r.texSubImage2D(34069+Pt,Nt+1,0,0,Ct,Wt,ze.image[Pt]):r.texImage2D(34069+Pt,Nt+1,fe,Ct,Wt,ze.image[Pt])}}}C($,nt)&&P(34067),tt.__version=$.version,$.onUpdate&&$.onUpdate($)}function _t(tt,$,It,$t,he){let Tt=o.convert(It.format,It.encoding),be=o.convert(It.type),nt=k(It.internalFormat,Tt,be,It.encoding);n.get($).__hasExternalTextures||(he===32879||he===35866?r.texImage3D(he,0,nt,$.width,$.height,$.depth,0,Tt,be,null):r.texImage2D(he,0,nt,$.width,$.height,0,Tt,be,null)),r.bindFramebuffer(36160,tt),$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,$t,he,n.get(It).__webglTexture,0,wt($)):e.framebufferTexture2D(36160,$t,he,n.get(It).__webglTexture,0),r.bindFramebuffer(36160,null)}function ct(tt,$,It){if(e.bindRenderbuffer(36161,tt),$.depthBuffer&&!$.stencilBuffer){let $t=33189;if(It||$.useRenderToTexture){let he=$.depthTexture;he&&he.isDepthTexture&&(he.type===jd?$t=36012:he.type===VP&&($t=33190));let Tt=wt($);$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,Tt,$t,$.width,$.height):e.renderbufferStorageMultisample(36161,Tt,$t,$.width,$.height)}else e.renderbufferStorage(36161,$t,$.width,$.height);e.framebufferRenderbuffer(36160,36096,36161,tt)}else if($.depthBuffer&&$.stencilBuffer){let $t=wt($);It&&$.useRenderbuffer?e.renderbufferStorageMultisample(36161,$t,35056,$.width,$.height):$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,$t,35056,$.width,$.height):e.renderbufferStorage(36161,34041,$.width,$.height),e.framebufferRenderbuffer(36160,33306,36161,tt)}else{let $t=$.isWebGLMultipleRenderTargets===!0?$.texture[0]:$.texture,he=o.convert($t.format,$t.encoding),Tt=o.convert($t.type),be=k($t.internalFormat,he,Tt,$t.encoding),nt=wt($);It&&$.useRenderbuffer?e.renderbufferStorageMultisample(36161,nt,be,$.width,$.height):$.useRenderToTexture?p.renderbufferStorageMultisampleEXT(36161,nt,be,$.width,$.height):e.renderbufferStorage(36161,be,$.width,$.height)}e.bindRenderbuffer(36161,null)}function X(tt,$){if($&&$.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(r.bindFramebuffer(36160,tt),!($.depthTexture&&$.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get($.depthTexture).__webglTexture||$.depthTexture.image.width!==$.width||$.depthTexture.image.height!==$.height)&&($.depthTexture.image.width=$.width,$.depthTexture.image.height=$.height,$.depthTexture.needsUpdate=!0),W($.depthTexture,0);let $t=n.get($.depthTexture).__webglTexture,he=wt($);if($.depthTexture.format===z0)$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,36096,3553,$t,0,he):e.framebufferTexture2D(36160,36096,3553,$t,0);else if($.depthTexture.format===k1)$.useRenderToTexture?p.framebufferTexture2DMultisampleEXT(36160,33306,3553,$t,0,he):e.framebufferTexture2D(36160,33306,3553,$t,0);else throw new Error("Unknown depthTexture format")}function et(tt){let $=n.get(tt),It=tt.isWebGLCubeRenderTarget===!0;if(tt.depthTexture&&!$.__autoAllocateDepthBuffer){if(It)throw new Error("target.depthTexture not supported in Cube render targets");X($.__webglFramebuffer,tt)}else if(It){$.__webglDepthbuffer=[];for(let $t=0;$t<6;$t++)r.bindFramebuffer(36160,$.__webglFramebuffer[$t]),$.__webglDepthbuffer[$t]=e.createRenderbuffer(),ct($.__webglDepthbuffer[$t],tt,!1)}else r.bindFramebuffer(36160,$.__webglFramebuffer),$.__webglDepthbuffer=e.createRenderbuffer(),ct($.__webglDepthbuffer,tt,!1);r.bindFramebuffer(36160,null)}function dt(tt,$,It){let $t=n.get(tt);$!==void 0&&_t($t.__webglFramebuffer,tt,tt.texture,36064,3553),It!==void 0&&et(tt)}function q(tt){let $=tt.texture,It=n.get(tt),$t=n.get($);tt.addEventListener("dispose",I),tt.isWebGLMultipleRenderTargets!==!0&&($t.__webglTexture===void 0&&($t.__webglTexture=e.createTexture()),$t.__version=$.version,a.memory.textures++);let he=tt.isWebGLCubeRenderTarget===!0,Tt=tt.isWebGLMultipleRenderTargets===!0,be=$.isDataTexture3D||$.isDataTexture2DArray,nt=b(tt)||s;if(he){It.__webglFramebuffer=[];for(let Ct=0;Ct<6;Ct++)It.__webglFramebuffer[Ct]=e.createFramebuffer()}else if(It.__webglFramebuffer=e.createFramebuffer(),Tt)if(i.drawBuffers){let Ct=tt.texture;for(let Wt=0,fe=Ct.length;Wt<fe;Wt++){let at=n.get(Ct[Wt]);at.__webglTexture===void 0&&(at.__webglTexture=e.createTexture(),a.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(tt.useRenderbuffer)if(s){It.__webglMultisampledFramebuffer=e.createFramebuffer(),It.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,It.__webglColorRenderbuffer);let Ct=o.convert($.format,$.encoding),Wt=o.convert($.type),fe=k($.internalFormat,Ct,Wt,$.encoding),at=wt(tt);e.renderbufferStorageMultisample(36161,at,fe,tt.width,tt.height),r.bindFramebuffer(36160,It.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,It.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),tt.depthBuffer&&(It.__webglDepthRenderbuffer=e.createRenderbuffer(),ct(It.__webglDepthRenderbuffer,tt,!0)),r.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(he){r.bindTexture(34067,$t.__webglTexture),bt(34067,$,nt);for(let Ct=0;Ct<6;Ct++)_t(It.__webglFramebuffer[Ct],tt,$,36064,34069+Ct);C($,nt)&&P(34067),r.unbindTexture()}else if(Tt){let Ct=tt.texture;for(let Wt=0,fe=Ct.length;Wt<fe;Wt++){let at=Ct[Wt],se=n.get(at);r.bindTexture(3553,se.__webglTexture),bt(3553,at,nt),_t(It.__webglFramebuffer,tt,at,36064+Wt,3553),C(at,nt)&&P(3553)}r.unbindTexture()}else{let Ct=3553;be&&(s?Ct=$.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),r.bindTexture(Ct,$t.__webglTexture),bt(Ct,$,nt),_t(It.__webglFramebuffer,tt,$,36064,Ct),C($,nt)&&P(Ct),r.unbindTexture()}tt.depthBuffer&&et(tt)}function pt(tt){let $=b(tt)||s,It=tt.isWebGLMultipleRenderTargets===!0?tt.texture:[tt.texture];for(let $t=0,he=It.length;$t<he;$t++){let Tt=It[$t];if(C(Tt,$)){let be=tt.isWebGLCubeRenderTarget?34067:3553,nt=n.get(Tt).__webglTexture;r.bindTexture(be,nt),P(be),r.unbindTexture()}}}function ht(tt){if(tt.useRenderbuffer)if(s){let $=tt.width,It=tt.height,$t=16384,he=[36064],Tt=tt.stencilBuffer?33306:36096;tt.depthBuffer&&he.push(Tt),tt.ignoreDepthForMultisampleCopy||(tt.depthBuffer&&($t|=256),tt.stencilBuffer&&($t|=1024));let be=n.get(tt);r.bindFramebuffer(36008,be.__webglMultisampledFramebuffer),r.bindFramebuffer(36009,be.__webglFramebuffer),tt.ignoreDepthForMultisampleCopy&&(e.invalidateFramebuffer(36008,[Tt]),e.invalidateFramebuffer(36009,[Tt])),e.blitFramebuffer(0,0,$,It,0,0,$,It,$t,9728),e.invalidateFramebuffer(36008,he),r.bindFramebuffer(36008,null),r.bindFramebuffer(36009,be.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")}function wt(tt){return s&&(tt.useRenderbuffer||tt.useRenderToTexture)?Math.min(h,tt.samples):0}function kt(tt){let $=a.render.frame;d.get(tt)!==$&&(d.set(tt,$),tt.update())}function ie(tt,$){let It=tt.encoding,$t=tt.format,he=tt.type;return tt.isCompressedTexture===!0||tt.isVideoTexture===!0||tt.format===sU||It!==Qd&&(It===Wn?s===!1?t.has("EXT_sRGB")===!0&&$t===Qo?(tt.format=sU,tt.minFilter=ii,tt.generateMipmaps=!1):$=Kf.sRGBToLinear($):($t!==Qo||he!==Zd)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",It)),$}let ee=!1,Le=!1;function ar(tt,$){tt&&tt.isWebGLRenderTarget&&(ee===!1&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),ee=!0),tt=tt.texture),W(tt,$)}function fr(tt,$){tt&&tt.isWebGLCubeRenderTarget&&(Le===!1&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),Le=!0),tt=tt.texture),ot(tt,$)}this.allocateTextureUnit=U,this.resetTextureUnits=z,this.setTexture2D=W,this.setTexture2DArray=Z,this.setTexture3D=rt,this.setTextureCube=ot,this.rebindTextures=dt,this.setupRenderTarget=q,this.updateRenderTargetMipmap=pt,this.updateMultisampleRenderTarget=ht,this.setupDepthRenderbuffer=et,this.setupFrameBufferTexture=_t,this.safeSetTexture2D=ar,this.safeSetTextureCube=fr}function Qfe(e,t,r){let n=r.isWebGL2;function i(o,a=null){let s;if(o===Zd)return 5121;if(o===yfe)return 32819;if(o===vfe)return 32820;if(o===mfe)return 5120;if(o===gfe)return 5122;if(o===G3)return 5123;if(o===_fe)return 5124;if(o===VP)return 5125;if(o===jd)return 5126;if(o===C1)return n?5131:(s=t.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(o===xfe)return 6406;if(o===Qo)return 6408;if(o===bfe)return 6409;if(o===wfe)return 6410;if(o===z0)return 6402;if(o===k1)return 34041;if(o===Sfe)return 6403;if(o===sU)return s=t.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(o===Mfe)return 36244;if(o===Efe)return 33319;if(o===Tfe)return 33320;if(o===Cfe)return 36249;if(o===JV||o===QV||o===tU||o===eU)if(a===Wn)if(s=t.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(o===JV)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===tU)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===eU)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=t.get("WEBGL_compressed_texture_s3tc"),s!==null){if(o===JV)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===QV)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===tU)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===eU)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(o===Put||o===Iut||o===Lut||o===kut)if(s=t.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(o===Put)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===Iut)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===Lut)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===kut)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(o===Afe)return s=t.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===Rut||o===Nut)if(s=t.get("WEBGL_compressed_texture_etc"),s!==null){if(o===Rut)return a===Wn?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(o===Nut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(o===Dut||o===Out||o===zut||o===Fut||o===But||o===Hut||o===Vut||o===Uut||o===qut||o===Gut||o===Wut||o===Yut||o===jut||o===Xut)if(s=t.get("WEBGL_compressed_texture_astc"),s!==null){if(o===Dut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===Out)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===zut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===Fut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===But)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===Hut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===Vut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===Uut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===qut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===Gut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===Wut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===Yut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===jut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===Xut)return a===Wn?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(o===$ut)if(s=t.get("EXT_texture_compression_bptc"),s!==null){if(o===$ut)return a===Wn?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT}else return null;if(o===A1)return n?34042:(s=t.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null)}return{convert:i}}var n6=class extends Ui{constructor(t=[]){super(),this.cameras=t}};n6.prototype.isArrayCamera=!0;var Xd=class extends or{constructor(){super(),this.type="Group"}};Xd.prototype.isGroup=!0;var kgr={type:"move"},qP=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Xd,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Xd,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new j,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new j),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Xd,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new j,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new j),this._grip}dispatchEvent(t){return this._targetRay!==null&&this._targetRay.dispatchEvent(t),this._grip!==null&&this._grip.dispatchEvent(t),this._hand!==null&&this._hand.dispatchEvent(t),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(t,r,n){let i=null,o=null,a=null,s=this._targetRay,l=this._grip,c=this._hand;if(t&&r.session.visibilityState!=="visible-blurred")if(s!==null&&(i=r.getPose(t.targetRaySpace,n),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(kgr))),c&&t.hand){a=!0;for(let g of t.hand.values()){let _=r.getJointPose(g,n);if(c.joints[g.jointName]===void 0){let x=new Xd;x.matrixAutoUpdate=!1,x.visible=!1,c.joints[g.jointName]=x,c.add(x)}let y=c.joints[g.jointName];_!==null&&(y.matrix.fromArray(_.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.jointRadius=_.radius),y.visible=_!==null}let u=c.joints["index-finger-tip"],h=c.joints["thumb-tip"],f=u.position.distanceTo(h.position),p=.02,d=.005;c.inputState.pinching&&f>p+d?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&f<=p-d&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(o=r.getPose(t.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=a!==null),this}},nM=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u){if(u=u!==void 0?u:z0,u!==z0&&u!==k1)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&u===z0&&(n=G3),n===void 0&&u===k1&&(n=A1),super(null,i,o,a,s,l,u,n,c),this.image={width:t,height:r},this.magFilter=s!==void 0?s:Li,this.minFilter=l!==void 0?l:Li,this.flipY=!1,this.generateMipmaps=!1}};nM.prototype.isDepthTexture=!0;var eht=class extends Us{constructor(t,r){super();let n=this,i=null,o=1,a=null,s="local-floor",l=t.extensions.has("WEBGL_multisampled_render_to_texture"),c=null,u=null,h=null,f=null,p=!1,d=null,g=r.getContextAttributes(),_=null,y=null,x=[],b=new Map,S=new Ui;S.layers.enable(1),S.viewport=new en;let C=new Ui;C.layers.enable(2),C.viewport=new en;let P=[S,C],k=new n6;k.layers.enable(1),k.layers.enable(2);let O=null,D=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getTargetRaySpace()},this.getControllerGrip=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getGripSpace()},this.getHand=function(ot){let st=x[ot];return st===void 0&&(st=new qP,x[ot]=st),st.getHandSpace()};function B(ot){let st=b.get(ot.inputSource);st&&st.dispatchEvent({type:ot.type,data:ot.inputSource})}function I(){b.forEach(function(ot,st){ot.disconnect(st)}),b.clear(),O=null,D=null,t.setRenderTarget(_),f=null,h=null,u=null,i=null,y=null,rt.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(ot){o=ot,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(ot){s=ot,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:f},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return i},this.setSession=function(ot){return Ri(this,null,function*(){if(i=ot,i!==null){if(_=t.getRenderTarget(),i.addEventListener("select",B),i.addEventListener("selectstart",B),i.addEventListener("selectend",B),i.addEventListener("squeeze",B),i.addEventListener("squeezestart",B),i.addEventListener("squeezeend",B),i.addEventListener("end",I),i.addEventListener("inputsourceschange",L),g.xrCompatible!==!0&&(yield r.makeXRCompatible()),i.renderState.layers===void 0||t.capabilities.isWebGL2===!1){let st={antialias:i.renderState.layers===void 0?g.antialias:!0,alpha:g.alpha,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:o};f=new XRWebGLLayer(i,r,st),i.updateRenderState({baseLayer:f}),y=new us(f.framebufferWidth,f.framebufferHeight,{format:Qo,type:Zd,encoding:t.outputEncoding})}else{p=g.antialias;let st=null,St=null,bt=null;g.depth&&(bt=g.stencil?35056:33190,st=g.stencil?k1:z0,St=g.stencil?A1:G3);let Mt={colorFormat:t.outputEncoding===Wn?35907:32856,depthFormat:bt,scaleFactor:o};u=new XRWebGLBinding(i,r),h=u.createProjectionLayer(Mt),i.updateRenderState({layers:[h]}),p?y=new j3(h.textureWidth,h.textureHeight,{format:Qo,type:Zd,depthTexture:new nM(h.textureWidth,h.textureHeight,St,void 0,void 0,void 0,void 0,void 0,void 0,st),stencilBuffer:g.stencil,ignoreDepth:h.ignoreDepthValues,useRenderToTexture:l,encoding:t.outputEncoding}):y=new us(h.textureWidth,h.textureHeight,{format:Qo,type:Zd,depthTexture:new nM(h.textureWidth,h.textureHeight,St,void 0,void 0,void 0,void 0,void 0,void 0,st),stencilBuffer:g.stencil,ignoreDepth:h.ignoreDepthValues,encoding:t.outputEncoding})}y.isXRRenderTarget=!0,this.setFoveation(1),a=yield i.requestReferenceSpace(s),rt.setContext(i),rt.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function L(ot){let st=i.inputSources;for(let St=0;St<x.length;St++)b.set(st[St],x[St]);for(let St=0;St<ot.removed.length;St++){let bt=ot.removed[St],Mt=b.get(bt);Mt&&(Mt.dispatchEvent({type:"disconnected",data:bt}),b.delete(bt))}for(let St=0;St<ot.added.length;St++){let bt=ot.added[St],Mt=b.get(bt);Mt&&Mt.dispatchEvent({type:"connected",data:bt})}}let R=new j,F=new j;function z(ot,st,St){R.setFromMatrixPosition(st.matrixWorld),F.setFromMatrixPosition(St.matrixWorld);let bt=R.distanceTo(F),Mt=st.projectionMatrix.elements,lt=St.projectionMatrix.elements,Kt=Mt[14]/(Mt[10]-1),_t=Mt[14]/(Mt[10]+1),ct=(Mt[9]+1)/Mt[5],X=(Mt[9]-1)/Mt[5],et=(Mt[8]-1)/Mt[0],dt=(lt[8]+1)/lt[0],q=Kt*et,pt=Kt*dt,ht=bt/(-et+dt),wt=ht*-et;st.matrixWorld.decompose(ot.position,ot.quaternion,ot.scale),ot.translateX(wt),ot.translateZ(ht),ot.matrixWorld.compose(ot.position,ot.quaternion,ot.scale),ot.matrixWorldInverse.copy(ot.matrixWorld).invert();let kt=Kt+ht,ie=_t+ht,ee=q-wt,Le=pt+(bt-wt),ar=ct*_t/ie*kt,fr=X*_t/ie*kt;ot.projectionMatrix.makePerspective(ee,Le,ar,fr,kt,ie)}function U(ot,st){st===null?ot.matrixWorld.copy(ot.matrix):ot.matrixWorld.multiplyMatrices(st.matrixWorld,ot.matrix),ot.matrixWorldInverse.copy(ot.matrixWorld).invert()}this.updateCamera=function(ot){if(i===null)return;k.near=C.near=S.near=ot.near,k.far=C.far=S.far=ot.far,(O!==k.near||D!==k.far)&&(i.updateRenderState({depthNear:k.near,depthFar:k.far}),O=k.near,D=k.far);let st=ot.parent,St=k.cameras;U(k,st);for(let Mt=0;Mt<St.length;Mt++)U(St[Mt],st);k.matrixWorld.decompose(k.position,k.quaternion,k.scale),ot.position.copy(k.position),ot.quaternion.copy(k.quaternion),ot.scale.copy(k.scale),ot.matrix.copy(k.matrix),ot.matrixWorld.copy(k.matrixWorld);let bt=ot.children;for(let Mt=0,lt=bt.length;Mt<lt;Mt++)bt[Mt].updateMatrixWorld(!0);St.length===2?z(k,S,C):k.projectionMatrix.copy(S.projectionMatrix)},this.getCamera=function(){return k},this.getFoveation=function(){if(h!==null)return h.fixedFoveation;if(f!==null)return f.fixedFoveation},this.setFoveation=function(ot){h!==null&&(h.fixedFoveation=ot),f!==null&&f.fixedFoveation!==void 0&&(f.fixedFoveation=ot)};let W=null;function Z(ot,st){if(c=st.getViewerPose(a),d=st,c!==null){let bt=c.views;f!==null&&(t.setRenderTargetFramebuffer(y,f.framebuffer),t.setRenderTarget(y));let Mt=!1;bt.length!==k.cameras.length&&(k.cameras.length=0,Mt=!0);for(let lt=0;lt<bt.length;lt++){let Kt=bt[lt],_t=null;if(f!==null)_t=f.getViewport(Kt);else{let X=u.getViewSubImage(h,Kt);_t=X.viewport,lt===0&&(t.setRenderTargetTextures(y,X.colorTexture,h.ignoreDepthValues?void 0:X.depthStencilTexture),t.setRenderTarget(y))}let ct=P[lt];ct.matrix.fromArray(Kt.transform.matrix),ct.projectionMatrix.fromArray(Kt.projectionMatrix),ct.viewport.set(_t.x,_t.y,_t.width,_t.height),lt===0&&k.matrix.copy(ct.matrix),Mt===!0&&k.cameras.push(ct)}}let St=i.inputSources;for(let bt=0;bt<x.length;bt++){let Mt=x[bt],lt=St[bt];Mt.update(lt,st,a)}W&&W(ot,st),d=null}let rt=new Ufe;rt.setAnimationLoop(Z),this.setAnimationLoop=function(ot){W=ot},this.dispose=function(){}}};function Rgr(e){function t(y,x){y.fogColor.value.copy(x.color),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)}function r(y,x,b,S,C){x.isMeshBasicMaterial?n(y,x):x.isMeshLambertMaterial?(n(y,x),l(y,x)):x.isMeshToonMaterial?(n(y,x),u(y,x)):x.isMeshPhongMaterial?(n(y,x),c(y,x)):x.isMeshStandardMaterial?(n(y,x),x.isMeshPhysicalMaterial?f(y,x,C):h(y,x)):x.isMeshMatcapMaterial?(n(y,x),p(y,x)):x.isMeshDepthMaterial?(n(y,x),d(y,x)):x.isMeshDistanceMaterial?(n(y,x),g(y,x)):x.isMeshNormalMaterial?(n(y,x),_(y,x)):x.isLineBasicMaterial?(i(y,x),x.isLineDashedMaterial&&o(y,x)):x.isPointsMaterial?a(y,x,b,S):x.isSpriteMaterial?s(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}function n(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let b=e.get(x).envMap;b&&(y.envMap.value=b,y.flipEnvMap.value=b.isCubeTexture&&b.isRenderTargetTexture===!1?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap&&(y.lightMap.value=x.lightMap,y.lightMapIntensity.value=x.lightMapIntensity),x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity);let S;x.map?S=x.map:x.specularMap?S=x.specularMap:x.displacementMap?S=x.displacementMap:x.normalMap?S=x.normalMap:x.bumpMap?S=x.bumpMap:x.roughnessMap?S=x.roughnessMap:x.metalnessMap?S=x.metalnessMap:x.alphaMap?S=x.alphaMap:x.emissiveMap?S=x.emissiveMap:x.clearcoatMap?S=x.clearcoatMap:x.clearcoatNormalMap?S=x.clearcoatNormalMap:x.clearcoatRoughnessMap?S=x.clearcoatRoughnessMap:x.specularIntensityMap?S=x.specularIntensityMap:x.specularColorMap?S=x.specularColorMap:x.transmissionMap?S=x.transmissionMap:x.thicknessMap?S=x.thicknessMap:x.sheenColorMap?S=x.sheenColorMap:x.sheenRoughnessMap&&(S=x.sheenRoughnessMap),S!==void 0&&(S.isWebGLRenderTarget&&(S=S.texture),S.matrixAutoUpdate===!0&&S.updateMatrix(),y.uvTransform.value.copy(S.matrix));let C;x.aoMap?C=x.aoMap:x.lightMap&&(C=x.lightMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),y.uv2Transform.value.copy(C.matrix))}function i(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}function o(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}function a(y,x,b,S){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*b,y.scale.value=S*.5,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let C;x.map?C=x.map:x.alphaMap&&(C=x.alphaMap),C!==void 0&&(C.matrixAutoUpdate===!0&&C.updateMatrix(),y.uvTransform.value.copy(C.matrix))}function s(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let b;x.map?b=x.map:x.alphaMap&&(b=x.alphaMap),b!==void 0&&(b.matrixAutoUpdate===!0&&b.updateMatrix(),y.uvTransform.value.copy(b.matrix))}function l(y,x){x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap)}function c(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function u(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function h(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),e.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}function f(y,x,b){h(y,x),y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===Ii&&y.clearcoatNormalScale.value.negate())),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=b.texture,y.transmissionSamplerSize.value.set(b.width,b.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}function p(y,x){x.matcap&&(y.matcap.value=x.matcap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function d(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}function g(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}function _(y,x){x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===Ii&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===Ii&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}return{refreshFogUniforms:t,refreshMaterialUniforms:r}}function Ngr(){let e=t6("canvas");return e.style.display="block",e}function rn(e={}){let t=e.canvas!==void 0?e.canvas:Ngr(),r=e.context!==void 0?e.context:null,n=e.alpha!==void 0?e.alpha:!1,i=e.depth!==void 0?e.depth:!0,o=e.stencil!==void 0?e.stencil:!0,a=e.antialias!==void 0?e.antialias:!1,s=e.premultipliedAlpha!==void 0?e.premultipliedAlpha:!0,l=e.preserveDrawingBuffer!==void 0?e.preserveDrawingBuffer:!1,c=e.powerPreference!==void 0?e.powerPreference:"default",u=e.failIfMajorPerformanceCaveat!==void 0?e.failIfMajorPerformanceCaveat:!1,h=null,f=null,p=[],d=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Qd,this.physicallyCorrectLights=!1,this.toneMapping=Kd,this.toneMappingExposure=1;let g=this,_=!1,y=0,x=0,b=null,S=-1,C=null,P=new en,k=new en,O=null,D=t.width,B=t.height,I=1,L=null,R=null,F=new en(0,0,D,B),z=new en(0,0,D,B),U=!1,W=new N1,Z=!1,rt=!1,ot=null,st=new Me,St=new j,bt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function Mt(){return b===null?I:1}let lt=r;function Kt(K,gt){for(let Et=0;Et<K.length;Et++){let xt=K[Et],Ft=t.getContext(xt,gt);if(Ft!==null)return Ft}return null}try{let K={alpha:!0,depth:i,stencil:o,antialias:a,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${jU}`),t.addEventListener("webglcontextlost",fe,!1),t.addEventListener("webglcontextrestored",at,!1),lt===null){let gt=["webgl2","webgl","experimental-webgl"];if(g.isWebGL1Renderer===!0&&gt.shift(),lt=Kt(gt,K),lt===null)throw Kt(gt)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}lt.getShaderPrecisionFormat===void 0&&(lt.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(K){throw console.error("THREE.WebGLRenderer: "+K.message),K}let _t,ct,X,et,dt,q,pt,ht,wt,kt,ie,ee,Le,ar,fr,tt,$,It,$t,he,Tt,be,nt;function Ct(){_t=new nmr(lt),ct=new Zdr(lt,_t,e),_t.init(ct),be=new Qfe(lt,_t,ct),X=new Igr(lt,_t,ct),et=new amr(lt),dt=new vgr,q=new Lgr(lt,_t,X,dt,ct,be,et),pt=new Qdr(g),ht=new rmr(g),wt=new bfr(lt,ct),nt=new $dr(lt,_t,wt,ct),kt=new imr(lt,wt,et,nt),ie=new umr(lt,kt,wt,et),$t=new cmr(lt,ct,q),tt=new Jdr(dt),ee=new ygr(g,pt,ht,_t,ct,nt,tt),Le=new Rgr(dt),ar=new bgr,fr=new Cgr(_t,ct),It=new Xdr(g,pt,X,ie,n,s),$=new Jfe(g,ie,ct),he=new Kdr(lt,_t,et,ct),Tt=new omr(lt,_t,et,ct),et.programs=ee.programs,g.capabilities=ct,g.extensions=_t,g.properties=dt,g.renderLists=ar,g.shadowMap=$,g.state=X,g.info=et}Ct();let Wt=new eht(g,lt);this.xr=Wt,this.getContext=function(){return lt},this.getContextAttributes=function(){return lt.getContextAttributes()},this.forceContextLoss=function(){let K=_t.get("WEBGL_lose_context");K&&K.loseContext()},this.forceContextRestore=function(){let K=_t.get("WEBGL_lose_context");K&&K.restoreContext()},this.getPixelRatio=function(){return I},this.setPixelRatio=function(K){K!==void 0&&(I=K,this.setSize(D,B,!1))},this.getSize=function(K){return K.set(D,B)},this.setSize=function(K,gt,Et){if(Wt.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}D=K,B=gt,t.width=Math.floor(K*I),t.height=Math.floor(gt*I),Et!==!1&&(t.style.width=K+"px",t.style.height=gt+"px"),this.setViewport(0,0,K,gt)},this.getDrawingBufferSize=function(K){return K.set(D*I,B*I).floor()},this.setDrawingBufferSize=function(K,gt,Et){D=K,B=gt,I=Et,t.width=Math.floor(K*Et),t.height=Math.floor(gt*Et),this.setViewport(0,0,K,gt)},this.getCurrentViewport=function(K){return K.copy(P)},this.getViewport=function(K){return K.copy(F)},this.setViewport=function(K,gt,Et,xt){K.isVector4?F.set(K.x,K.y,K.z,K.w):F.set(K,gt,Et,xt),X.viewport(P.copy(F).multiplyScalar(I).floor())},this.getScissor=function(K){return K.copy(z)},this.setScissor=function(K,gt,Et,xt){K.isVector4?z.set(K.x,K.y,K.z,K.w):z.set(K,gt,Et,xt),X.scissor(k.copy(z).multiplyScalar(I).floor())},this.getScissorTest=function(){return U},this.setScissorTest=function(K){X.setScissorTest(U=K)},this.setOpaqueSort=function(K){L=K},this.setTransparentSort=function(K){R=K},this.getClearColor=function(K){return K.copy(It.getClearColor())},this.setClearColor=function(){It.setClearColor.apply(It,arguments)},this.getClearAlpha=function(){return It.getClearAlpha()},this.setClearAlpha=function(){It.setClearAlpha.apply(It,arguments)},this.clear=function(K,gt,Et){let xt=0;(K===void 0||K)&&(xt|=16384),(gt===void 0||gt)&&(xt|=256),(Et===void 0||Et)&&(xt|=1024),lt.clear(xt)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",fe,!1),t.removeEventListener("webglcontextrestored",at,!1),ar.dispose(),fr.dispose(),dt.dispose(),pt.dispose(),ht.dispose(),ie.dispose(),nt.dispose(),ee.dispose(),Wt.dispose(),Wt.removeEventListener("sessionstart",ze),Wt.removeEventListener("sessionend",yn),ot&&(ot.dispose(),ot=null),Wi.stop()};function fe(K){K.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function at(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;let K=et.autoReset,gt=$.enabled,Et=$.autoUpdate,xt=$.needsUpdate,Ft=$.type;Ct(),et.autoReset=K,$.enabled=gt,$.autoUpdate=Et,$.needsUpdate=xt,$.type=Ft}function se(K){let gt=K.target;gt.removeEventListener("dispose",se),Qt(gt)}function Qt(K){Ce(K),dt.remove(K)}function Ce(K){let gt=dt.get(K).programs;gt!==void 0&&(gt.forEach(function(Et){ee.releaseProgram(Et)}),K.isShaderMaterial&&ee.releaseShaderCache(K))}this.renderBufferDirect=function(K,gt,Et,xt,Ft,Ve){gt===null&&(gt=bt);let Ue=Ft.isMesh&&Ft.matrixWorld.determinant()<0,tr=cn(K,gt,Et,xt,Ft);X.setMaterial(xt,Ue);let Ke=Et.index,Xr=Et.attributes.position;if(Ke===null){if(Xr===void 0||Xr.count===0)return}else if(Ke.count===0)return;let _r=1;xt.wireframe===!0&&(Ke=kt.getWireframeAttribute(Et),_r=2),nt.setup(Ft,xt,tr,Et,Ke);let Pr,jn=he;Ke!==null&&(Pr=wt.get(Ke),jn=Tt,jn.setIndex(Pr));let np=Ke!==null?Ke.count:Xr.count,um=Et.drawRange.start*_r,mr=Et.drawRange.count*_r,Fl=Ve!==null?Ve.start*_r:0,Xn=Ve!==null?Ve.count*_r:1/0,Bl=Math.max(um,Fl),ux=Math.min(np,um+mr,Fl+Xn)-1,Hl=Math.max(0,ux-Bl+1);if(Hl!==0){if(Ft.isMesh)xt.wireframe===!0?(X.setLineWidth(xt.wireframeLinewidth*Mt()),jn.setMode(1)):jn.setMode(4);else if(Ft.isLine){let Vl=xt.linewidth;Vl===void 0&&(Vl=1),X.setLineWidth(Vl*Mt()),Ft.isLineSegments?jn.setMode(1):Ft.isLineLoop?jn.setMode(2):jn.setMode(3)}else Ft.isPoints?jn.setMode(0):Ft.isSprite&&jn.setMode(4);if(Ft.isInstancedMesh)jn.renderInstances(Bl,Hl,Ft.count);else if(Et.isInstancedBufferGeometry){let Vl=Math.min(Et.instanceCount,Et._maxInstanceCount);jn.renderInstances(Bl,Hl,Vl)}else jn.render(Bl,Hl)}},this.compile=function(K,gt){f=fr.get(K),f.init(),d.push(f),K.traverseVisible(function(Et){Et.isLight&&Et.layers.test(gt.layers)&&(f.pushLight(Et),Et.castShadow&&f.pushShadow(Et))}),f.setupLights(g.physicallyCorrectLights),K.traverse(function(Et){let xt=Et.material;if(xt)if(Array.isArray(xt))for(let Ft=0;Ft<xt.length;Ft++){let Ve=xt[Ft];cm(Ve,K,Et)}else cm(xt,K,Et)}),d.pop(),f=null};let Pt=null;function Nt(K){Pt&&Pt(K)}function ze(){Wi.stop()}function yn(){Wi.start()}let Wi=new Ufe;Wi.setAnimationLoop(Nt),typeof window!="undefined"&&Wi.setContext(window),this.setAnimationLoop=function(K){Pt=K,Wt.setAnimationLoop(K),K===null?Wi.stop():Wi.start()},Wt.addEventListener("sessionstart",ze),Wt.addEventListener("sessionend",yn),this.render=function(K,gt){if(gt!==void 0&&gt.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(_===!0)return;K.autoUpdate===!0&&K.updateMatrixWorld(),gt.parent===null&&gt.updateMatrixWorld(),Wt.enabled===!0&&Wt.isPresenting===!0&&(Wt.cameraAutoUpdate===!0&&Wt.updateCamera(gt),gt=Wt.getCamera()),K.isScene===!0&&K.onBeforeRender(g,K,gt,b),f=fr.get(K,d.length),f.init(),d.push(f),st.multiplyMatrices(gt.projectionMatrix,gt.matrixWorldInverse),W.setFromProjectionMatrix(st),rt=this.localClippingEnabled,Z=tt.init(this.clippingPlanes,rt,gt),h=ar.get(K,p.length),h.init(),p.push(h),Ar(K,gt,0,g.sortObjects),h.finish(),g.sortObjects===!0&&h.sort(L,R),Z===!0&&tt.beginShadows();let Et=f.state.shadowsArray;if($.render(Et,K,gt),Z===!0&&tt.endShadows(),this.info.autoReset===!0&&this.info.reset(),It.render(h,K),f.setupLights(g.physicallyCorrectLights),gt.isArrayCamera){let xt=gt.cameras;for(let Ft=0,Ve=xt.length;Ft<Ve;Ft++){let Ue=xt[Ft];Pa(h,K,Ue,Ue.viewport)}}else Pa(h,K,gt);b!==null&&(q.updateMultisampleRenderTarget(b),q.updateRenderTargetMipmap(b)),K.isScene===!0&&K.onAfterRender(g,K,gt),X.buffers.depth.setTest(!0),X.buffers.depth.setMask(!0),X.buffers.color.setMask(!0),X.setPolygonOffset(!1),nt.resetDefaultState(),S=-1,C=null,d.pop(),d.length>0?f=d[d.length-1]:f=null,p.pop(),p.length>0?h=p[p.length-1]:h=null};function Ar(K,gt,Et,xt){if(K.visible===!1)return;if(K.layers.test(gt.layers)){if(K.isGroup)Et=K.renderOrder;else if(K.isLOD)K.autoUpdate===!0&&K.update(gt);else if(K.isLight)f.pushLight(K),K.castShadow&&f.pushShadow(K);else if(K.isSprite){if(!K.frustumCulled||W.intersectsSprite(K)){xt&&St.setFromMatrixPosition(K.matrixWorld).applyMatrix4(st);let Ue=ie.update(K),tr=K.material;tr.visible&&h.push(K,Ue,tr,Et,St.z,null)}}else if((K.isMesh||K.isLine||K.isPoints)&&(K.isSkinnedMesh&&K.skeleton.frame!==et.render.frame&&(K.skeleton.update(),K.skeleton.frame=et.render.frame),!K.frustumCulled||W.intersectsObject(K))){xt&&St.setFromMatrixPosition(K.matrixWorld).applyMatrix4(st);let Ue=ie.update(K),tr=K.material;if(Array.isArray(tr)){let Ke=Ue.groups;for(let Xr=0,_r=Ke.length;Xr<_r;Xr++){let Pr=Ke[Xr],jn=tr[Pr.materialIndex];jn&&jn.visible&&h.push(K,Ue,jn,Et,St.z,Pr)}}else tr.visible&&h.push(K,Ue,tr,Et,St.z,null)}}let Ve=K.children;for(let Ue=0,tr=Ve.length;Ue<tr;Ue++)Ar(Ve[Ue],gt,Et,xt)}function Pa(K,gt,Et,xt){let Ft=K.opaque,Ve=K.transmissive,Ue=K.transparent;f.setupLightsView(Et),Ve.length>0&&ho(Ft,gt,Et),xt&&X.viewport(P.copy(xt)),Ft.length>0&&Ia(Ft,gt,Et),Ve.length>0&&Ia(Ve,gt,Et),Ue.length>0&&Ia(Ue,gt,Et)}function ho(K,gt,Et){if(ot===null){let Ue=a===!0&&ct.isWebGL2===!0?j3:us;ot=new Ue(1024,1024,{generateMipmaps:!0,type:be.convert(C1)!==null?C1:Zd,minFilter:ox,magFilter:Li,wrapS:Jo,wrapT:Jo,useRenderToTexture:_t.has("WEBGL_multisampled_render_to_texture")})}let xt=g.getRenderTarget();g.setRenderTarget(ot),g.clear();let Ft=g.toneMapping;g.toneMapping=Kd,Ia(K,gt,Et),g.toneMapping=Ft,q.updateMultisampleRenderTarget(ot),q.updateRenderTargetMipmap(ot),g.setRenderTarget(xt)}function Ia(K,gt,Et){let xt=gt.isScene===!0?gt.overrideMaterial:null;for(let Ft=0,Ve=K.length;Ft<Ve;Ft++){let Ue=K[Ft],tr=Ue.object,Ke=Ue.geometry,Xr=xt===null?Ue.material:xt,_r=Ue.group;tr.layers.test(Et.layers)&&lx(tr,gt,Et,Ke,Xr,_r)}}function lx(K,gt,Et,xt,Ft,Ve){K.onBeforeRender(g,gt,Et,xt,Ft,Ve),K.modelViewMatrix.multiplyMatrices(Et.matrixWorldInverse,K.matrixWorld),K.normalMatrix.getNormalMatrix(K.modelViewMatrix),Ft.onBeforeRender(g,gt,Et,xt,K,Ve),Ft.transparent===!0&&Ft.side===L1?(Ft.side=Ii,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=I1,Ft.needsUpdate=!0,g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),Ft.side=L1):g.renderBufferDirect(Et,gt,xt,Ft,K,Ve),K.onAfterRender(g,gt,Et,xt,Ft,Ve)}function cm(K,gt,Et){gt.isScene!==!0&&(gt=bt);let xt=dt.get(K),Ft=f.state.lights,Ve=f.state.shadowsArray,Ue=Ft.state.version,tr=ee.getParameters(K,Ft.state,Ve,gt,Et),Ke=ee.getProgramCacheKey(tr),Xr=xt.programs;xt.environment=K.isMeshStandardMaterial?gt.environment:null,xt.fog=gt.fog,xt.envMap=(K.isMeshStandardMaterial?ht:pt).get(K.envMap||xt.environment),Xr===void 0&&(K.addEventListener("dispose",se),Xr=new Map,xt.programs=Xr);let _r=Xr.get(Ke);if(_r!==void 0){if(xt.currentProgram===_r&&xt.lightsStateVersion===Ue)return J0(K,tr),_r}else tr.uniforms=ee.getUniforms(K),K.onBuild(Et,tr,g),K.onBeforeCompile(tr,g),_r=ee.acquireProgram(tr,Ke),Xr.set(Ke,_r),xt.uniforms=tr.uniforms;let Pr=xt.uniforms;(!K.isShaderMaterial&&!K.isRawShaderMaterial||K.clipping===!0)&&(Pr.clippingPlanes=tt.uniform),J0(K,tr),xt.needsLights=rp(K),xt.lightsStateVersion=Ue,xt.needsLights&&(Pr.ambientLightColor.value=Ft.state.ambient,Pr.lightProbe.value=Ft.state.probe,Pr.directionalLights.value=Ft.state.directional,Pr.directionalLightShadows.value=Ft.state.directionalShadow,Pr.spotLights.value=Ft.state.spot,Pr.spotLightShadows.value=Ft.state.spotShadow,Pr.rectAreaLights.value=Ft.state.rectArea,Pr.ltc_1.value=Ft.state.rectAreaLTC1,Pr.ltc_2.value=Ft.state.rectAreaLTC2,Pr.pointLights.value=Ft.state.point,Pr.pointLightShadows.value=Ft.state.pointShadow,Pr.hemisphereLights.value=Ft.state.hemi,Pr.directionalShadowMap.value=Ft.state.directionalShadowMap,Pr.directionalShadowMatrix.value=Ft.state.directionalShadowMatrix,Pr.spotShadowMap.value=Ft.state.spotShadowMap,Pr.spotShadowMatrix.value=Ft.state.spotShadowMatrix,Pr.pointShadowMap.value=Ft.state.pointShadowMap,Pr.pointShadowMatrix.value=Ft.state.pointShadowMatrix);let jn=_r.getUniforms(),np=B0.seqWithValue(jn.seq,Pr);return xt.currentProgram=_r,xt.uniformsList=np,_r}function J0(K,gt){let Et=dt.get(K);Et.outputEncoding=gt.outputEncoding,Et.instancing=gt.instancing,Et.skinning=gt.skinning,Et.morphTargets=gt.morphTargets,Et.morphNormals=gt.morphNormals,Et.morphTargetsCount=gt.morphTargetsCount,Et.numClippingPlanes=gt.numClippingPlanes,Et.numIntersection=gt.numClipIntersection,Et.vertexAlphas=gt.vertexAlphas,Et.vertexTangents=gt.vertexTangents,Et.toneMapping=gt.toneMapping}function cn(K,gt,Et,xt,Ft){gt.isScene!==!0&&(gt=bt),q.resetTextureUnits();let Ve=gt.fog,Ue=xt.isMeshStandardMaterial?gt.environment:null,tr=b===null?g.outputEncoding:b.isXRRenderTarget===!0?b.texture.encoding:Qd,Ke=(xt.isMeshStandardMaterial?ht:pt).get(xt.envMap||Ue),Xr=xt.vertexColors===!0&&!!Et.attributes.color&&Et.attributes.color.itemSize===4,_r=!!xt.normalMap&&!!Et.attributes.tangent,Pr=!!Et.morphAttributes.position,jn=!!Et.morphAttributes.normal,np=Et.morphAttributes.position?Et.morphAttributes.position.length:0,um=xt.toneMapped?g.toneMapping:Kd,mr=dt.get(xt),Fl=f.state.lights;if(Z===!0&&(rt===!0||K!==C)){let qs=K===C&&xt.id===S;tt.setState(xt,K,qs)}let Xn=!1;xt.version===mr.__version?(mr.needsLights&&mr.lightsStateVersion!==Fl.state.version||mr.outputEncoding!==tr||Ft.isInstancedMesh&&mr.instancing===!1||!Ft.isInstancedMesh&&mr.instancing===!0||Ft.isSkinnedMesh&&mr.skinning===!1||!Ft.isSkinnedMesh&&mr.skinning===!0||mr.envMap!==Ke||xt.fog&&mr.fog!==Ve||mr.numClippingPlanes!==void 0&&(mr.numClippingPlanes!==tt.numPlanes||mr.numIntersection!==tt.numIntersection)||mr.vertexAlphas!==Xr||mr.vertexTangents!==_r||mr.morphTargets!==Pr||mr.morphNormals!==jn||mr.toneMapping!==um||ct.isWebGL2===!0&&mr.morphTargetsCount!==np)&&(Xn=!0):(Xn=!0,mr.__version=xt.version);let Bl=mr.currentProgram;Xn===!0&&(Bl=cm(xt,gt,Ft));let ux=!1,Hl=!1,Vl=!1,Yi=Bl.getUniforms(),hm=mr.uniforms;if(X.useProgram(Bl.program)&&(ux=!0,Hl=!0,Vl=!0),xt.id!==S&&(S=xt.id,Hl=!0),ux||C!==K){if(Yi.setValue(lt,"projectionMatrix",K.projectionMatrix),ct.logarithmicDepthBuffer&&Yi.setValue(lt,"logDepthBufFC",2/(Math.log(K.far+1)/Math.LN2)),C!==K&&(C=K,Hl=!0,Vl=!0),xt.isShaderMaterial||xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshStandardMaterial||xt.envMap){let qs=Yi.map.cameraPosition;qs!==void 0&&qs.setValue(lt,St.setFromMatrixPosition(K.matrixWorld))}(xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshLambertMaterial||xt.isMeshBasicMaterial||xt.isMeshStandardMaterial||xt.isShaderMaterial)&&Yi.setValue(lt,"isOrthographic",K.isOrthographicCamera===!0),(xt.isMeshPhongMaterial||xt.isMeshToonMaterial||xt.isMeshLambertMaterial||xt.isMeshBasicMaterial||xt.isMeshStandardMaterial||xt.isShaderMaterial||xt.isShadowMaterial||Ft.isSkinnedMesh)&&Yi.setValue(lt,"viewMatrix",K.matrixWorldInverse)}if(Ft.isSkinnedMesh){Yi.setOptional(lt,Ft,"bindMatrix"),Yi.setOptional(lt,Ft,"bindMatrixInverse");let qs=Ft.skeleton;qs&&(ct.floatVertexTextures?(qs.boneTexture===null&&qs.computeBoneTexture(),Yi.setValue(lt,"boneTexture",qs.boneTexture,q),Yi.setValue(lt,"boneTextureSize",qs.boneTextureSize)):Yi.setOptional(lt,qs,"boneMatrices"))}return!!Et&&(Et.morphAttributes.position!==void 0||Et.morphAttributes.normal!==void 0)&&$t.update(Ft,Et,xt,Bl),(Hl||mr.receiveShadow!==Ft.receiveShadow)&&(mr.receiveShadow=Ft.receiveShadow,Yi.setValue(lt,"receiveShadow",Ft.receiveShadow)),Hl&&(Yi.setValue(lt,"toneMappingExposure",g.toneMappingExposure),mr.needsLights&&cx(hm,Vl),Ve&&xt.fog&&Le.refreshFogUniforms(hm,Ve),Le.refreshMaterialUniforms(hm,xt,I,B,ot),B0.upload(lt,mr.uniformsList,hm,q)),xt.isShaderMaterial&&xt.uniformsNeedUpdate===!0&&(B0.upload(lt,mr.uniformsList,hm,q),xt.uniformsNeedUpdate=!1),xt.isSpriteMaterial&&Yi.setValue(lt,"center",Ft.center),Yi.setValue(lt,"modelViewMatrix",Ft.modelViewMatrix),Yi.setValue(lt,"normalMatrix",Ft.normalMatrix),Yi.setValue(lt,"modelMatrix",Ft.matrixWorld),Bl}function cx(K,gt){K.ambientLightColor.needsUpdate=gt,K.lightProbe.needsUpdate=gt,K.directionalLights.needsUpdate=gt,K.directionalLightShadows.needsUpdate=gt,K.pointLights.needsUpdate=gt,K.pointLightShadows.needsUpdate=gt,K.spotLights.needsUpdate=gt,K.spotLightShadows.needsUpdate=gt,K.rectAreaLights.needsUpdate=gt,K.hemisphereLights.needsUpdate=gt}function rp(K){return K.isMeshLambertMaterial||K.isMeshToonMaterial||K.isMeshPhongMaterial||K.isMeshStandardMaterial||K.isShadowMaterial||K.isShaderMaterial&&K.lights===!0}this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return b},this.setRenderTargetTextures=function(K,gt,Et){dt.get(K.texture).__webglTexture=gt,dt.get(K.depthTexture).__webglTexture=Et;let xt=dt.get(K);xt.__hasExternalTextures=!0,xt.__hasExternalTextures&&(xt.__autoAllocateDepthBuffer=Et===void 0,xt.__autoAllocateDepthBuffer||K.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),K.useRenderToTexture=!1,K.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(K,gt){let Et=dt.get(K);Et.__webglFramebuffer=gt,Et.__useDefaultFramebuffer=gt===void 0},this.setRenderTarget=function(K,gt=0,Et=0){b=K,y=gt,x=Et;let xt=!0;if(K){let Ke=dt.get(K);Ke.__useDefaultFramebuffer!==void 0?(X.bindFramebuffer(36160,null),xt=!1):Ke.__webglFramebuffer===void 0?q.setupRenderTarget(K):Ke.__hasExternalTextures&&q.rebindTextures(K,dt.get(K.texture).__webglTexture,dt.get(K.depthTexture).__webglTexture)}let Ft=null,Ve=!1,Ue=!1;if(K){let Ke=K.texture;(Ke.isDataTexture3D||Ke.isDataTexture2DArray)&&(Ue=!0);let Xr=dt.get(K).__webglFramebuffer;K.isWebGLCubeRenderTarget?(Ft=Xr[gt],Ve=!0):K.useRenderbuffer?Ft=dt.get(K).__webglMultisampledFramebuffer:Ft=Xr,P.copy(K.viewport),k.copy(K.scissor),O=K.scissorTest}else P.copy(F).multiplyScalar(I).floor(),k.copy(z).multiplyScalar(I).floor(),O=U;if(X.bindFramebuffer(36160,Ft)&&ct.drawBuffers&&xt&&X.drawBuffers(K,Ft),X.viewport(P),X.scissor(k),X.setScissorTest(O),Ve){let Ke=dt.get(K.texture);lt.framebufferTexture2D(36160,36064,34069+gt,Ke.__webglTexture,Et)}else if(Ue){let Ke=dt.get(K.texture),Xr=gt||0;lt.framebufferTextureLayer(36160,36064,Ke.__webglTexture,Et||0,Xr)}S=-1},this.readRenderTargetPixels=function(K,gt,Et,xt,Ft,Ve,Ue){if(!(K&&K.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let tr=dt.get(K).__webglFramebuffer;if(K.isWebGLCubeRenderTarget&&Ue!==void 0&&(tr=tr[Ue]),tr){X.bindFramebuffer(36160,tr);try{let Ke=K.texture,Xr=Ke.format,_r=Ke.type;if(Xr!==Qo&&be.convert(Xr)!==lt.getParameter(35739)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}let Pr=_r===C1&&(_t.has("EXT_color_buffer_half_float")||ct.isWebGL2&&_t.has("EXT_color_buffer_float"));if(_r!==Zd&&be.convert(_r)!==lt.getParameter(35738)&&!(_r===jd&&(ct.isWebGL2||_t.has("OES_texture_float")||_t.has("WEBGL_color_buffer_float")))&&!Pr){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}lt.checkFramebufferStatus(36160)===36053?gt>=0&&gt<=K.width-xt&&Et>=0&&Et<=K.height-Ft&&lt.readPixels(gt,Et,xt,Ft,be.convert(Xr),be.convert(_r),Ve):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let Ke=b!==null?dt.get(b).__webglFramebuffer:null;X.bindFramebuffer(36160,Ke)}}},this.copyFramebufferToTexture=function(K,gt,Et=0){if(gt.isFramebufferTexture!==!0){console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");return}let xt=Math.pow(2,-Et),Ft=Math.floor(gt.image.width*xt),Ve=Math.floor(gt.image.height*xt);q.setTexture2D(gt,0),lt.copyTexSubImage2D(3553,Et,0,0,K.x,K.y,Ft,Ve),X.unbindTexture()},this.copyTextureToTexture=function(K,gt,Et,xt=0){let Ft=gt.image.width,Ve=gt.image.height,Ue=be.convert(Et.format),tr=be.convert(Et.type);q.setTexture2D(Et,0),lt.pixelStorei(37440,Et.flipY),lt.pixelStorei(37441,Et.premultiplyAlpha),lt.pixelStorei(3317,Et.unpackAlignment),gt.isDataTexture?lt.texSubImage2D(3553,xt,K.x,K.y,Ft,Ve,Ue,tr,gt.image.data):gt.isCompressedTexture?lt.compressedTexSubImage2D(3553,xt,K.x,K.y,gt.mipmaps[0].width,gt.mipmaps[0].height,Ue,gt.mipmaps[0].data):lt.texSubImage2D(3553,xt,K.x,K.y,Ue,tr,gt.image),xt===0&&Et.generateMipmaps&&lt.generateMipmap(3553),X.unbindTexture()},this.copyTextureToTexture3D=function(K,gt,Et,xt,Ft=0){if(g.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Ve=K.max.x-K.min.x+1,Ue=K.max.y-K.min.y+1,tr=K.max.z-K.min.z+1,Ke=be.convert(xt.format),Xr=be.convert(xt.type),_r;if(xt.isDataTexture3D)q.setTexture3D(xt,0),_r=32879;else if(xt.isDataTexture2DArray)q.setTexture2DArray(xt,0),_r=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}lt.pixelStorei(37440,xt.flipY),lt.pixelStorei(37441,xt.premultiplyAlpha),lt.pixelStorei(3317,xt.unpackAlignment);let Pr=lt.getParameter(3314),jn=lt.getParameter(32878),np=lt.getParameter(3316),um=lt.getParameter(3315),mr=lt.getParameter(32877),Fl=Et.isCompressedTexture?Et.mipmaps[0]:Et.image;lt.pixelStorei(3314,Fl.width),lt.pixelStorei(32878,Fl.height),lt.pixelStorei(3316,K.min.x),lt.pixelStorei(3315,K.min.y),lt.pixelStorei(32877,K.min.z),Et.isDataTexture||Et.isDataTexture3D?lt.texSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Xr,Fl.data):Et.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),lt.compressedTexSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Fl.data)):lt.texSubImage3D(_r,Ft,gt.x,gt.y,gt.z,Ve,Ue,tr,Ke,Xr,Fl),lt.pixelStorei(3314,Pr),lt.pixelStorei(32878,jn),lt.pixelStorei(3316,np),lt.pixelStorei(3315,um),lt.pixelStorei(32877,mr),Ft===0&&xt.generateMipmaps&&lt.generateMipmap(_r),X.unbindTexture()},this.initTexture=function(K){q.setTexture2D(K,0),X.unbindTexture()},this.resetState=function(){y=0,x=0,b=null,X.reset(),nt.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}rn.prototype.isWebGLRenderer=!0;var gU=class extends rn{};gU.prototype.isWebGL1Renderer=!0;var O1=class{constructor(t,r=25e-5){this.name="",this.color=new ne(t),this.density=r}clone(){return new O1(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};O1.prototype.isFogExp2=!0;var z1=class{constructor(t,r=1,n=1e3){this.name="",this.color=new ne(t),this.near=r,this.far=n}clone(){return new z1(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};z1.prototype.isFog=!0;var q0=class extends or{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,r){return super.copy(t,r),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let r=super.toJSON(t);return this.fog!==null&&(r.object.fog=this.fog.toJSON()),r}};q0.prototype.isScene=!0;var em=class{constructor(t,r){this.array=t,this.stride=r,this.count=t!==void 0?t.length/r:0,this.usage=W3,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Nl()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,r,n){t*=this.stride,n*=r.stride;for(let i=0,o=this.stride;i<o;i++)this.array[t+i]=r.array[n+i];return this}set(t,r=0){return this.array.set(t,r),this}clone(t){t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Nl()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let r=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(r,this.stride);return n.setUsage(this.usage),n}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return t.arrayBuffers===void 0&&(t.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Nl()),t.arrayBuffers[this.array.buffer._uuid]===void 0&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};em.prototype.isInterleavedBuffer=!0;var Ai=new j,tp=class{constructor(t,r,n,i=!1){this.name="",this.data=t,this.itemSize=r,this.offset=n,this.normalized=i===!0}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let r=0,n=this.data.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.applyMatrix4(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}applyNormalMatrix(t){for(let r=0,n=this.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.applyNormalMatrix(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}transformDirection(t){for(let r=0,n=this.count;r<n;r++)Ai.x=this.getX(r),Ai.y=this.getY(r),Ai.z=this.getZ(r),Ai.transformDirection(t),this.setXYZ(r,Ai.x,Ai.y,Ai.z);return this}setX(t,r){return this.data.array[t*this.data.stride+this.offset]=r,this}setY(t,r){return this.data.array[t*this.data.stride+this.offset+1]=r,this}setZ(t,r){return this.data.array[t*this.data.stride+this.offset+2]=r,this}setW(t,r){return this.data.array[t*this.data.stride+this.offset+3]=r,this}getX(t){return this.data.array[t*this.data.stride+this.offset]}getY(t){return this.data.array[t*this.data.stride+this.offset+1]}getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}getW(t){return this.data.array[t*this.data.stride+this.offset+3]}setXY(t,r,n){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this}setXYZ(t,r,n,i){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this.data.array[t+2]=i,this}setXYZW(t,r,n,i,o){return t=t*this.data.stride+this.offset,this.data.array[t+0]=r,this.data.array[t+1]=n,this.data.array[t+2]=i,this.data.array[t+3]=o,this}clone(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)r.push(this.data.array[i+o])}return new Je(new this.array.constructor(r),this.itemSize,this.normalized)}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new tp(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(t===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");let r=[];for(let n=0;n<this.count;n++){let i=n*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)r.push(this.data.array[i+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:r,normalized:this.normalized}}else return t.interleavedBuffers===void 0&&(t.interleavedBuffers={}),t.interleavedBuffers[this.data.uuid]===void 0&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}};tp.prototype.isInterleavedBufferAttribute=!0;var iM=class extends qi{constructor(t){super(),this.type="SpriteMaterial",this.color=new ne(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}};iM.prototype.isSpriteMaterial=!0;var N3,DP=new j,D3=new j,O3=new j,z3=new Lt,OP=new Lt,tpe=new Me,LV=new j,zP=new j,kV=new j,Zue=new Lt,dut=new Lt,Jue=new Lt,oM=class extends or{constructor(t){if(super(),this.type="Sprite",N3===void 0){N3=new Pe;let r=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new em(r,5);N3.setIndex([0,1,2,0,2,3]),N3.setAttribute("position",new tp(n,3,0,!1)),N3.setAttribute("uv",new tp(n,2,3,!1))}this.geometry=N3,this.material=t!==void 0?t:new iM,this.center=new Lt(.5,.5)}raycast(t,r){t.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),D3.setFromMatrixScale(this.matrixWorld),tpe.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),O3.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&D3.multiplyScalar(-O3.z);let n=this.material.rotation,i,o;n!==0&&(o=Math.cos(n),i=Math.sin(n));let a=this.center;RV(LV.set(-.5,-.5,0),O3,a,D3,i,o),RV(zP.set(.5,-.5,0),O3,a,D3,i,o),RV(kV.set(.5,.5,0),O3,a,D3,i,o),Zue.set(0,0),dut.set(1,0),Jue.set(1,1);let s=t.ray.intersectTriangle(LV,zP,kV,!1,DP);if(s===null&&(RV(zP.set(-.5,.5,0),O3,a,D3,i,o),dut.set(0,1),s=t.ray.intersectTriangle(LV,kV,zP,!1,DP),s===null))return;let l=t.ray.origin.distanceTo(DP);l<t.near||l>t.far||r.push({distance:l,point:DP.clone(),uv:oi.getUV(DP,LV,zP,kV,Zue,dut,Jue,new Lt),face:null,object:this})}copy(t){return super.copy(t),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}};oM.prototype.isSprite=!0;function RV(e,t,r,n,i,o){z3.subVectors(e,r).addScalar(.5).multiply(n),i!==void 0?(OP.x=o*z3.x-i*z3.y,OP.y=i*z3.x+o*z3.y):OP.copy(z3),e.copy(t),e.x+=OP.x,e.y+=OP.y,e.applyMatrix4(tpe)}var NV=new j,Que=new j,_U=class extends or{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);let r=t.levels;for(let n=0,i=r.length;n<i;n++){let o=r[n];this.addLevel(o.object.clone(),o.distance)}return this.autoUpdate=t.autoUpdate,this}addLevel(t,r=0){r=Math.abs(r);let n=this.levels,i;for(i=0;i<n.length&&!(r<n[i].distance);i++);return n.splice(i,0,{distance:r,object:t}),this.add(t),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(t){let r=this.levels;if(r.length>0){let n,i;for(n=1,i=r.length;n<i&&!(t<r[n].distance);n++);return r[n-1].object}return null}raycast(t,r){if(this.levels.length>0){NV.setFromMatrixPosition(this.matrixWorld);let i=t.ray.origin.distanceTo(NV);this.getObjectForDistance(i).raycast(t,r)}}update(t){let r=this.levels;if(r.length>1){NV.setFromMatrixPosition(t.matrixWorld),Que.setFromMatrixPosition(this.matrixWorld);let n=NV.distanceTo(Que)/t.zoom;r[0].object.visible=!0;let i,o;for(i=1,o=r.length;i<o&&n>=r[i].distance;i++)r[i-1].object.visible=!1,r[i].object.visible=!0;for(this._currentLevel=i-1;i<o;i++)r[i].object.visible=!1}}toJSON(t){let r=super.toJSON(t);this.autoUpdate===!1&&(r.object.autoUpdate=!1),r.object.levels=[];let n=this.levels;for(let i=0,o=n.length;i<o;i++){let a=n[i];r.object.levels.push({object:a.object.uuid,distance:a.distance})}return r}},the=new j,ehe=new en,rhe=new en,Dgr=new j,nhe=new Me,aM=class extends ti{constructor(t,r){super(t,r),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Me,this.bindMatrixInverse=new Me}copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,r){this.skeleton=t,r===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),r=this.matrixWorld),this.bindMatrix.copy(r),this.bindMatrixInverse.copy(r).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let t=new en,r=this.geometry.attributes.skinWeight;for(let n=0,i=r.count;n<i;n++){t.x=r.getX(n),t.y=r.getY(n),t.z=r.getZ(n),t.w=r.getW(n);let o=1/t.manhattanLength();o!==1/0?t.multiplyScalar(o):t.set(1,0,0,0),r.setXYZW(n,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),this.bindMode==="attached"?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode==="detached"?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,r){let n=this.skeleton,i=this.geometry;ehe.fromBufferAttribute(i.attributes.skinIndex,t),rhe.fromBufferAttribute(i.attributes.skinWeight,t),the.copy(r).applyMatrix4(this.bindMatrix),r.set(0,0,0);for(let o=0;o<4;o++){let a=rhe.getComponent(o);if(a!==0){let s=ehe.getComponent(o);nhe.multiplyMatrices(n.bones[s].matrixWorld,n.boneInverses[s]),r.addScaledVector(Dgr.copy(the).applyMatrix4(nhe),a)}}return r.applyMatrix4(this.bindMatrixInverse)}};aM.prototype.isSkinnedMesh=!0;var sM=class extends or{constructor(){super(),this.type="Bone"}};sM.prototype.isBone=!0;var Jd=class extends vi{constructor(t=null,r=1,n=1,i,o,a,s,l,c=Li,u=Li,h,f){super(null,a,s,l,c,u,i,o,h,f),this.image={data:t,width:r,height:n},this.magFilter=c,this.minFilter=u,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};Jd.prototype.isDataTexture=!0;var ihe=new Me,Ogr=new Me,lM=class{constructor(t=[],r=[]){this.uuid=Nl(),this.bones=t.slice(0),this.boneInverses=r,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){let t=this.bones,r=this.boneInverses;if(this.boneMatrices=new Float32Array(t.length*16),r.length===0)this.calculateInverses();else if(t.length!==r.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Me)}}calculateInverses(){this.boneInverses.length=0;for(let t=0,r=this.bones.length;t<r;t++){let n=new Me;this.bones[t]&&n.copy(this.bones[t].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let t=0,r=this.bones.length;t<r;t++){let n=this.bones[t];n&&n.matrixWorld.copy(this.boneInverses[t]).invert()}for(let t=0,r=this.bones.length;t<r;t++){let n=this.bones[t];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){let t=this.bones,r=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let o=0,a=t.length;o<a;o++){let s=t[o]?t[o].matrixWorld:Ogr;ihe.multiplyMatrices(s,r[o]),ihe.toArray(n,o*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new lM(this.bones,this.boneInverses)}computeBoneTexture(){let t=Math.sqrt(this.bones.length*4);t=zfe(t),t=Math.max(t,4);let r=new Float32Array(t*t*4);r.set(this.boneMatrices);let n=new Jd(r,t,t,Qo,jd);return n.needsUpdate=!0,this.boneMatrices=r,this.boneTexture=n,this.boneTextureSize=t,this}getBoneByName(t){for(let r=0,n=this.bones.length;r<n;r++){let i=this.bones[r];if(i.name===t)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(t,r){this.uuid=t.uuid;for(let n=0,i=t.bones.length;n<i;n++){let o=t.bones[n],a=r[o];a===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",o),a=new sM),this.bones.push(a),this.boneInverses.push(new Me().fromArray(t.boneInverses[n]))}return this.init(),this}toJSON(){let t={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};t.uuid=this.uuid;let r=this.bones,n=this.boneInverses;for(let i=0,o=r.length;i<o;i++){let a=r[i];t.bones.push(a.uuid);let s=n[i];t.boneInverses.push(s.toArray())}return t}},rm=class extends Je{constructor(t,r,n,i=1){typeof n=="number"&&(i=n,n=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(t,r,n),this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){let t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}};rm.prototype.isInstancedBufferAttribute=!0;var ohe=new Me,ahe=new Me,DV=[],FP=new ti,i6=class extends ti{constructor(t,r,n){super(t,r),this.instanceMatrix=new rm(new Float32Array(n*16),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1}copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix),t.instanceColor!==null&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,r){r.fromArray(this.instanceColor.array,t*3)}getMatrixAt(t,r){r.fromArray(this.instanceMatrix.array,t*16)}raycast(t,r){let n=this.matrixWorld,i=this.count;if(FP.geometry=this.geometry,FP.material=this.material,FP.material!==void 0)for(let o=0;o<i;o++){this.getMatrixAt(o,ohe),ahe.multiplyMatrices(n,ohe),FP.matrixWorld=ahe,FP.raycast(t,DV);for(let a=0,s=DV.length;a<s;a++){let l=DV[a];l.instanceId=o,l.object=this,r.push(l)}DV.length=0}}setColorAt(t,r){this.instanceColor===null&&(this.instanceColor=new rm(new Float32Array(this.instanceMatrix.count*3),3)),r.toArray(this.instanceColor.array,t*3)}setMatrixAt(t,r){r.toArray(this.instanceMatrix.array,t*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}};i6.prototype.isInstancedMesh=!0;var Gi=class extends qi{constructor(t){super(),this.type="LineBasicMaterial",this.color=new ne(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this}};Gi.prototype.isLineBasicMaterial=!0;var she=new j,lhe=new j,che=new Me,mut=new Jf,OV=new Zf,ch=class extends or{constructor(t=new Pe,r=new Gi){super(),this.type="Line",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(t.index===null){let r=t.attributes.position,n=[0];for(let i=1,o=r.count;i<o;i++)she.fromBufferAttribute(r,i-1),lhe.fromBufferAttribute(r,i),n[i]=n[i-1],n[i]+=she.distanceTo(lhe);t.setAttribute("lineDistance",new xe(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(t,r){let n=this.geometry,i=this.matrixWorld,o=t.params.Line.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),OV.copy(n.boundingSphere),OV.applyMatrix4(i),OV.radius+=o,t.ray.intersectsSphere(OV)===!1)return;che.copy(i).invert(),mut.copy(t.ray).applyMatrix4(che);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,c=new j,u=new j,h=new j,f=new j,p=this.isLineSegments?2:1;if(n.isBufferGeometry){let d=n.index,_=n.attributes.position;if(d!==null){let y=Math.max(0,a.start),x=Math.min(d.count,a.start+a.count);for(let b=y,S=x-1;b<S;b+=p){let C=d.getX(b),P=d.getX(b+1);if(c.fromBufferAttribute(_,C),u.fromBufferAttribute(_,P),mut.distanceSqToSegment(c,u,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);let O=t.ray.origin.distanceTo(f);O<t.near||O>t.far||r.push({distance:O,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}else{let y=Math.max(0,a.start),x=Math.min(_.count,a.start+a.count);for(let b=y,S=x-1;b<S;b+=p){if(c.fromBufferAttribute(_,b),u.fromBufferAttribute(_,b+1),mut.distanceSqToSegment(c,u,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);let P=t.ray.origin.distanceTo(f);P<t.near||P>t.far||r.push({distance:P,point:h.clone().applyMatrix4(this.matrixWorld),index:b,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};ch.prototype.isLine=!0;var uhe=new j,hhe=new j,Aa=class extends ch{constructor(t,r){super(t,r),this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(t.index===null){let r=t.attributes.position,n=[];for(let i=0,o=r.count;i<o;i+=2)uhe.fromBufferAttribute(r,i),hhe.fromBufferAttribute(r,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+uhe.distanceTo(hhe);t.setAttribute("lineDistance",new xe(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}};Aa.prototype.isLineSegments=!0;var o6=class extends ch{constructor(t,r){super(t,r),this.type="LineLoop"}};o6.prototype.isLineLoop=!0;var nm=class extends qi{constructor(t){super(),this.type="PointsMaterial",this.color=new ne(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this}};nm.prototype.isPointsMaterial=!0;var fhe=new Me,rht=new Jf,zV=new Zf,FV=new j,im=class extends or{constructor(t=new Pe,r=new nm){super(),this.type="Points",this.geometry=t,this.material=r,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}raycast(t,r){let n=this.geometry,i=this.matrixWorld,o=t.params.Points.threshold,a=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),zV.copy(n.boundingSphere),zV.applyMatrix4(i),zV.radius+=o,t.ray.intersectsSphere(zV)===!1)return;fhe.copy(i).invert(),rht.copy(t.ray).applyMatrix4(fhe);let s=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s;if(n.isBufferGeometry){let c=n.index,h=n.attributes.position;if(c!==null){let f=Math.max(0,a.start),p=Math.min(c.count,a.start+a.count);for(let d=f,g=p;d<g;d++){let _=c.getX(d);FV.fromBufferAttribute(h,_),phe(FV,_,l,i,t,r,this)}}else{let f=Math.max(0,a.start),p=Math.min(h.count,a.start+a.count);for(let d=f,g=p;d<g;d++)FV.fromBufferAttribute(h,d),phe(FV,d,l,i,t,r,this)}}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let r=t.morphAttributes,n=Object.keys(r);if(n.length>0){let i=r[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,a=i.length;o<a;o++){let s=i[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}else{let r=t.morphTargets;r!==void 0&&r.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};im.prototype.isPoints=!0;function phe(e,t,r,n,i,o,a){let s=rht.distanceSqToPoint(e);if(s<r){let l=new j;rht.closestPointToPoint(e,l),l.applyMatrix4(n);let c=i.ray.origin.distanceTo(l);if(c<i.near||c>i.far)return;o.push({distance:c,distanceToRay:Math.sqrt(s),point:l,index:t,face:null,object:a})}}var yU=class extends vi{constructor(t,r,n,i,o,a,s,l,c){super(t,r,n,i,o,a,s,l,c),this.minFilter=a!==void 0?a:ii,this.magFilter=o!==void 0?o:ii,this.generateMipmaps=!1;let u=this;function h(){u.needsUpdate=!0,t.requestVideoFrameCallback(h)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(h)}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};yU.prototype.isVideoTexture=!0;var vU=class extends vi{constructor(t,r,n){super({width:t,height:r}),this.format=n,this.magFilter=Li,this.minFilter=Li,this.generateMipmaps=!1,this.needsUpdate=!0}};vU.prototype.isFramebufferTexture=!0;var a6=class extends vi{constructor(t,r,n,i,o,a,s,l,c,u,h,f){super(null,a,s,l,c,u,i,o,h,f),this.image={width:r,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}};a6.prototype.isCompressedTexture=!0;var xU=class extends vi{constructor(t,r,n,i,o,a,s,l,c){super(t,r,n,i,o,a,s,l,c),this.needsUpdate=!0}};xU.prototype.isCanvasTexture=!0;var F1=class extends Pe{constructor(t=1,r=8,n=0,i=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:r,thetaStart:n,thetaLength:i},r=Math.max(3,r);let o=[],a=[],s=[],l=[],c=new j,u=new Lt;a.push(0,0,0),s.push(0,0,1),l.push(.5,.5);for(let h=0,f=3;h<=r;h++,f+=3){let p=n+h/r*i;c.x=t*Math.cos(p),c.y=t*Math.sin(p),a.push(c.x,c.y,c.z),s.push(0,0,1),u.x=(a[f]/t+1)/2,u.y=(a[f+1]/t+1)/2,l.push(u.x,u.y)}for(let h=1;h<=r;h++)o.push(h,h+1,0);this.setIndex(o),this.setAttribute("position",new xe(a,3)),this.setAttribute("normal",new xe(s,3)),this.setAttribute("uv",new xe(l,2))}static fromJSON(t){return new F1(t.radius,t.segments,t.thetaStart,t.thetaLength)}},om=class extends Pe{constructor(t=1,r=1,n=1,i=8,o=1,a=!1,s=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:r,height:n,radialSegments:i,heightSegments:o,openEnded:a,thetaStart:s,thetaLength:l};let c=this;i=Math.floor(i),o=Math.floor(o);let u=[],h=[],f=[],p=[],d=0,g=[],_=n/2,y=0;x(),a===!1&&(t>0&&b(!0),r>0&&b(!1)),this.setIndex(u),this.setAttribute("position",new xe(h,3)),this.setAttribute("normal",new xe(f,3)),this.setAttribute("uv",new xe(p,2));function x(){let S=new j,C=new j,P=0,k=(r-t)/n;for(let O=0;O<=o;O++){let D=[],B=O/o,I=B*(r-t)+t;for(let L=0;L<=i;L++){let R=L/i,F=R*l+s,z=Math.sin(F),U=Math.cos(F);C.x=I*z,C.y=-B*n+_,C.z=I*U,h.push(C.x,C.y,C.z),S.set(z,k,U).normalize(),f.push(S.x,S.y,S.z),p.push(R,1-B),D.push(d++)}g.push(D)}for(let O=0;O<i;O++)for(let D=0;D<o;D++){let B=g[D][O],I=g[D+1][O],L=g[D+1][O+1],R=g[D][O+1];u.push(B,I,R),u.push(I,L,R),P+=6}c.addGroup(y,P,0),y+=P}function b(S){let C=d,P=new Lt,k=new j,O=0,D=S===!0?t:r,B=S===!0?1:-1;for(let L=1;L<=i;L++)h.push(0,_*B,0),f.push(0,B,0),p.push(.5,.5),d++;let I=d;for(let L=0;L<=i;L++){let F=L/i*l+s,z=Math.cos(F),U=Math.sin(F);k.x=D*U,k.y=_*B,k.z=D*z,h.push(k.x,k.y,k.z),f.push(0,B,0),P.x=z*.5+.5,P.y=U*.5*B+.5,p.push(P.x,P.y),d++}for(let L=0;L<i;L++){let R=C+L,F=I+L;S===!0?u.push(F,F+1,R):u.push(F+1,F,R),O+=3}c.addGroup(y,O,S===!0?1:2),y+=O}}static fromJSON(t){return new om(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},B1=class extends om{constructor(t=1,r=1,n=8,i=1,o=!1,a=0,s=Math.PI*2){super(0,t,r,n,i,o,a,s),this.type="ConeGeometry",this.parameters={radius:t,height:r,radialSegments:n,heightSegments:i,openEnded:o,thetaStart:a,thetaLength:s}}static fromJSON(t){return new B1(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}},uh=class extends Pe{constructor(t=[],r=[],n=1,i=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:r,radius:n,detail:i};let o=[],a=[];s(i),c(n),u(),this.setAttribute("position",new xe(o,3)),this.setAttribute("normal",new xe(o.slice(),3)),this.setAttribute("uv",new xe(a,2)),i===0?this.computeVertexNormals():this.normalizeNormals();function s(x){let b=new j,S=new j,C=new j;for(let P=0;P<r.length;P+=3)p(r[P+0],b),p(r[P+1],S),p(r[P+2],C),l(b,S,C,x)}function l(x,b,S,C){let P=C+1,k=[];for(let O=0;O<=P;O++){k[O]=[];let D=x.clone().lerp(S,O/P),B=b.clone().lerp(S,O/P),I=P-O;for(let L=0;L<=I;L++)L===0&&O===P?k[O][L]=D:k[O][L]=D.clone().lerp(B,L/I)}for(let O=0;O<P;O++)for(let D=0;D<2*(P-O)-1;D++){let B=Math.floor(D/2);D%2===0?(f(k[O][B+1]),f(k[O+1][B]),f(k[O][B])):(f(k[O][B+1]),f(k[O+1][B+1]),f(k[O+1][B]))}}function c(x){let b=new j;for(let S=0;S<o.length;S+=3)b.x=o[S+0],b.y=o[S+1],b.z=o[S+2],b.normalize().multiplyScalar(x),o[S+0]=b.x,o[S+1]=b.y,o[S+2]=b.z}function u(){let x=new j;for(let b=0;b<o.length;b+=3){x.x=o[b+0],x.y=o[b+1],x.z=o[b+2];let S=_(x)/2/Math.PI+.5,C=y(x)/Math.PI+.5;a.push(S,1-C)}d(),h()}function h(){for(let x=0;x<a.length;x+=6){let b=a[x+0],S=a[x+2],C=a[x+4],P=Math.max(b,S,C),k=Math.min(b,S,C);P>.9&&k<.1&&(b<.2&&(a[x+0]+=1),S<.2&&(a[x+2]+=1),C<.2&&(a[x+4]+=1))}}function f(x){o.push(x.x,x.y,x.z)}function p(x,b){let S=x*3;b.x=t[S+0],b.y=t[S+1],b.z=t[S+2]}function d(){let x=new j,b=new j,S=new j,C=new j,P=new Lt,k=new Lt,O=new Lt;for(let D=0,B=0;D<o.length;D+=9,B+=6){x.set(o[D+0],o[D+1],o[D+2]),b.set(o[D+3],o[D+4],o[D+5]),S.set(o[D+6],o[D+7],o[D+8]),P.set(a[B+0],a[B+1]),k.set(a[B+2],a[B+3]),O.set(a[B+4],a[B+5]),C.copy(x).add(b).add(S).divideScalar(3);let I=_(C);g(P,B+0,x,I),g(k,B+2,b,I),g(O,B+4,S,I)}}function g(x,b,S,C){C<0&&x.x===1&&(a[b]=x.x-1),S.x===0&&S.z===0&&(a[b]=C/2/Math.PI+.5)}function _(x){return Math.atan2(x.z,-x.x)}function y(x){return Math.atan2(-x.y,Math.sqrt(x.x*x.x+x.z*x.z))}}static fromJSON(t){return new uh(t.vertices,t.indices,t.radius,t.details)}},H1=class extends uh{constructor(t=1,r=0){let n=(1+Math.sqrt(5))/2,i=1/n,o=[-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],a=[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];super(o,a,t,r),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new H1(t.radius,t.detail)}},BV=new j,HV=new j,gut=new j,VV=new oi,s6=class extends Pe{constructor(t=null,r=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:r},t!==null){let i=Math.pow(10,4),o=Math.cos(P1*r),a=t.getIndex(),s=t.getAttribute("position"),l=a?a.count:s.count,c=[0,0,0],u=["a","b","c"],h=new Array(3),f={},p=[];for(let d=0;d<l;d+=3){a?(c[0]=a.getX(d),c[1]=a.getX(d+1),c[2]=a.getX(d+2)):(c[0]=d,c[1]=d+1,c[2]=d+2);let{a:g,b:_,c:y}=VV;if(g.fromBufferAttribute(s,c[0]),_.fromBufferAttribute(s,c[1]),y.fromBufferAttribute(s,c[2]),VV.getNormal(gut),h[0]=`${Math.round(g.x*i)},${Math.round(g.y*i)},${Math.round(g.z*i)}`,h[1]=`${Math.round(_.x*i)},${Math.round(_.y*i)},${Math.round(_.z*i)}`,h[2]=`${Math.round(y.x*i)},${Math.round(y.y*i)},${Math.round(y.z*i)}`,!(h[0]===h[1]||h[1]===h[2]||h[2]===h[0]))for(let x=0;x<3;x++){let b=(x+1)%3,S=h[x],C=h[b],P=VV[u[x]],k=VV[u[b]],O=`${S}_${C}`,D=`${C}_${S}`;D in f&&f[D]?(gut.dot(f[D].normal)<=o&&(p.push(P.x,P.y,P.z),p.push(k.x,k.y,k.z)),f[D]=null):O in f||(f[O]={index0:c[x],index1:c[b],normal:gut.clone()})}}for(let d in f)if(f[d]){let{index0:g,index1:_}=f[d];BV.fromBufferAttribute(s,g),HV.fromBufferAttribute(s,_),p.push(BV.x,BV.y,BV.z),p.push(HV.x,HV.y,HV.z)}this.setAttribute("position",new xe(p,3))}}},fs=class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,r){let n=this.getUtoTmapping(t);return this.getPoint(n,r)}getPoints(t=5){let r=[];for(let n=0;n<=t;n++)r.push(this.getPoint(n/t));return r}getSpacedPoints(t=5){let r=[];for(let n=0;n<=t;n++)r.push(this.getPointAt(n/t));return r}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let r=[],n,i=this.getPoint(0),o=0;r.push(0);for(let a=1;a<=t;a++)n=this.getPoint(a/t),o+=n.distanceTo(i),r.push(o),i=n;return this.cacheArcLengths=r,r}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,r){let n=this.getLengths(),i=0,o=n.length,a;r?a=r:a=t*n[o-1];let s=0,l=o-1,c;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),c=n[i]-a,c<0)s=i+1;else if(c>0)l=i-1;else{l=i;break}if(i=l,n[i]===a)return i/(o-1);let u=n[i],f=n[i+1]-u,p=(a-u)/f;return(i+p)/(o-1)}getTangent(t,r){let i=t-1e-4,o=t+1e-4;i<0&&(i=0),o>1&&(o=1);let a=this.getPoint(i),s=this.getPoint(o),l=r||(a.isVector2?new Lt:new j);return l.copy(s).sub(a).normalize(),l}getTangentAt(t,r){let n=this.getUtoTmapping(t);return this.getTangent(n,r)}computeFrenetFrames(t,r){let n=new j,i=[],o=[],a=[],s=new j,l=new Me;for(let p=0;p<=t;p++){let d=p/t;i[p]=this.getTangentAt(d,new j)}o[0]=new j,a[0]=new j;let c=Number.MAX_VALUE,u=Math.abs(i[0].x),h=Math.abs(i[0].y),f=Math.abs(i[0].z);u<=c&&(c=u,n.set(1,0,0)),h<=c&&(c=h,n.set(0,1,0)),f<=c&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),o[0].crossVectors(i[0],s),a[0].crossVectors(i[0],o[0]);for(let p=1;p<=t;p++){if(o[p]=o[p-1].clone(),a[p]=a[p-1].clone(),s.crossVectors(i[p-1],i[p]),s.length()>Number.EPSILON){s.normalize();let d=Math.acos(Zo(i[p-1].dot(i[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(s,d))}a[p].crossVectors(i[p],o[p])}if(r===!0){let p=Math.acos(Zo(o[0].dot(o[t]),-1,1));p/=t,i[0].dot(s.crossVectors(o[0],o[t]))>0&&(p=-p);for(let d=1;d<=t;d++)o[d].applyMatrix4(l.makeRotationAxis(i[d],p*d)),a[d].crossVectors(i[d],o[d])}return{tangents:i,normals:o,binormals:a}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}},V1=class extends fs{constructor(t=0,r=0,n=1,i=1,o=0,a=Math.PI*2,s=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=r,this.xRadius=n,this.yRadius=i,this.aStartAngle=o,this.aEndAngle=a,this.aClockwise=s,this.aRotation=l}getPoint(t,r){let n=r||new Lt,i=Math.PI*2,o=this.aEndAngle-this.aStartAngle,a=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=i;for(;o>i;)o-=i;o<Number.EPSILON&&(a?o=0:o=i),this.aClockwise===!0&&!a&&(o===i?o=-i:o=o-i);let s=this.aStartAngle+t*o,l=this.aX+this.xRadius*Math.cos(s),c=this.aY+this.yRadius*Math.sin(s);if(this.aRotation!==0){let u=Math.cos(this.aRotation),h=Math.sin(this.aRotation),f=l-this.aX,p=c-this.aY;l=f*u-p*h+this.aX,c=f*h+p*u+this.aY}return n.set(l,c)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){let t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}};V1.prototype.isEllipseCurve=!0;var l6=class extends V1{constructor(t,r,n,i,o,a){super(t,r,n,n,i,o,a),this.type="ArcCurve"}};l6.prototype.isArcCurve=!0;function Dht(){let e=0,t=0,r=0,n=0;function i(o,a,s,l){e=o,t=s,r=-3*o+3*a-2*s-l,n=2*o-2*a+s+l}return{initCatmullRom:function(o,a,s,l,c){i(a,s,c*(s-o),c*(l-a))},initNonuniformCatmullRom:function(o,a,s,l,c,u,h){let f=(a-o)/c-(s-o)/(c+u)+(s-a)/u,p=(s-a)/u-(l-a)/(u+h)+(l-s)/h;f*=u,p*=u,i(a,s,f,p)},calc:function(o){let a=o*o,s=a*o;return e+t*o+r*a+n*s}}}var UV=new j,_ut=new Dht,yut=new Dht,vut=new Dht,c6=class extends fs{constructor(t=[],r=!1,n="centripetal",i=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=r,this.curveType=n,this.tension=i}getPoint(t,r=new j){let n=r,i=this.points,o=i.length,a=(o-(this.closed?0:1))*t,s=Math.floor(a),l=a-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/o)+1)*o:l===0&&s===o-1&&(s=o-2,l=1);let c,u;this.closed||s>0?c=i[(s-1)%o]:(UV.subVectors(i[0],i[1]).add(i[0]),c=UV);let h=i[s%o],f=i[(s+1)%o];if(this.closed||s+2<o?u=i[(s+2)%o]:(UV.subVectors(i[o-1],i[o-2]).add(i[o-1]),u=UV),this.curveType==="centripetal"||this.curveType==="chordal"){let p=this.curveType==="chordal"?.5:.25,d=Math.pow(c.distanceToSquared(h),p),g=Math.pow(h.distanceToSquared(f),p),_=Math.pow(f.distanceToSquared(u),p);g<1e-4&&(g=1),d<1e-4&&(d=g),_<1e-4&&(_=g),_ut.initNonuniformCatmullRom(c.x,h.x,f.x,u.x,d,g,_),yut.initNonuniformCatmullRom(c.y,h.y,f.y,u.y,d,g,_),vut.initNonuniformCatmullRom(c.z,h.z,f.z,u.z,d,g,_)}else this.curveType==="catmullrom"&&(_ut.initCatmullRom(c.x,h.x,f.x,u.x,this.tension),yut.initCatmullRom(c.y,h.y,f.y,u.y,this.tension),vut.initCatmullRom(c.z,h.z,f.z,u.z,this.tension));return n.set(_ut.calc(l),yut.calc(l),vut.calc(l)),n}copy(t){super.copy(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(i.clone())}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){let t=super.toJSON();t.points=[];for(let r=0,n=this.points.length;r<n;r++){let i=this.points[r];t.points.push(i.toArray())}return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(new j().fromArray(i))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}};c6.prototype.isCatmullRomCurve3=!0;function dhe(e,t,r,n,i){let o=(n-t)*.5,a=(i-r)*.5,s=e*e,l=e*s;return(2*r-2*n+o+a)*l+(-3*r+3*n-2*o-a)*s+o*e+r}function zgr(e,t){let r=1-e;return r*r*t}function Fgr(e,t){return 2*(1-e)*e*t}function Bgr(e,t){return e*e*t}function GP(e,t,r,n){return zgr(e,t)+Fgr(e,r)+Bgr(e,n)}function Hgr(e,t){let r=1-e;return r*r*r*t}function Vgr(e,t){let r=1-e;return 3*r*r*e*t}function Ugr(e,t){return 3*(1-e)*e*e*t}function qgr(e,t){return e*e*e*t}function WP(e,t,r,n,i){return Hgr(e,t)+Vgr(e,r)+Ugr(e,n)+qgr(e,i)}var cM=class extends fs{constructor(t=new Lt,r=new Lt,n=new Lt,i=new Lt){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=r,this.v2=n,this.v3=i}getPoint(t,r=new Lt){let n=r,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(WP(t,i.x,o.x,a.x,s.x),WP(t,i.y,o.y,a.y,s.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};cM.prototype.isCubicBezierCurve=!0;var u6=class extends fs{constructor(t=new j,r=new j,n=new j,i=new j){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=r,this.v2=n,this.v3=i}getPoint(t,r=new j){let n=r,i=this.v0,o=this.v1,a=this.v2,s=this.v3;return n.set(WP(t,i.x,o.x,a.x,s.x),WP(t,i.y,o.y,a.y,s.y),WP(t,i.z,o.z,a.z,s.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};u6.prototype.isCubicBezierCurve3=!0;var U1=class extends fs{constructor(t=new Lt,r=new Lt){super(),this.type="LineCurve",this.v1=t,this.v2=r}getPoint(t,r=new Lt){let n=r;return t===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,r){return this.getPoint(t,r)}getTangent(t,r){let n=r||new Lt;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};U1.prototype.isLineCurve=!0;var bU=class extends fs{constructor(t=new j,r=new j){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=r}getPoint(t,r=new j){let n=r;return t===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(t).add(this.v1)),n}getPointAt(t,r){return this.getPoint(t,r)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}},uM=class extends fs{constructor(t=new Lt,r=new Lt,n=new Lt){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=r,this.v2=n}getPoint(t,r=new Lt){let n=r,i=this.v0,o=this.v1,a=this.v2;return n.set(GP(t,i.x,o.x,a.x),GP(t,i.y,o.y,a.y)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};uM.prototype.isQuadraticBezierCurve=!0;var hM=class extends fs{constructor(t=new j,r=new j,n=new j){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=r,this.v2=n}getPoint(t,r=new j){let n=r,i=this.v0,o=this.v1,a=this.v2;return n.set(GP(t,i.x,o.x,a.x),GP(t,i.y,o.y,a.y),GP(t,i.z,o.z,a.z)),n}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};hM.prototype.isQuadraticBezierCurve3=!0;var fM=class extends fs{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,r=new Lt){let n=r,i=this.points,o=(i.length-1)*t,a=Math.floor(o),s=o-a,l=i[a===0?a:a-1],c=i[a],u=i[a>i.length-2?i.length-1:a+1],h=i[a>i.length-3?i.length-1:a+2];return n.set(dhe(s,l.x,c.x,u.x,h.x),dhe(s,l.y,c.y,u.y,h.y)),n}copy(t){super.copy(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(i.clone())}return this}toJSON(){let t=super.toJSON();t.points=[];for(let r=0,n=this.points.length;r<n;r++){let i=this.points[r];t.points.push(i.toArray())}return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let r=0,n=t.points.length;r<n;r++){let i=t.points[r];this.points.push(new Lt().fromArray(i))}return this}};fM.prototype.isSplineCurve=!0;var Oht=Object.freeze({__proto__:null,ArcCurve:l6,CatmullRomCurve3:c6,CubicBezierCurve:cM,CubicBezierCurve3:u6,EllipseCurve:V1,LineCurve:U1,LineCurve3:bU,QuadraticBezierCurve:uM,QuadraticBezierCurve3:hM,SplineCurve:fM}),wU=class extends fs{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){let t=this.curves[0].getPoint(0),r=this.curves[this.curves.length-1].getPoint(1);t.equals(r)||this.curves.push(new U1(r,t))}getPoint(t,r){let n=t*this.getLength(),i=this.getCurveLengths(),o=0;for(;o<i.length;){if(i[o]>=n){let a=i[o]-n,s=this.curves[o],l=s.getLength(),c=l===0?0:1-a/l;return s.getPointAt(c,r)}o++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],r=0;for(let n=0,i=this.curves.length;n<i;n++)r+=this.curves[n].getLength(),t.push(r);return this.cacheLengths=t,t}getSpacedPoints(t=40){let r=[];for(let n=0;n<=t;n++)r.push(this.getPoint(n/t));return this.autoClose&&r.push(r[0]),r}getPoints(t=12){let r=[],n;for(let i=0,o=this.curves;i<o.length;i++){let a=o[i],s=a&&a.isEllipseCurve?t*2:a&&(a.isLineCurve||a.isLineCurve3)?1:a&&a.isSplineCurve?t*a.points.length:t,l=a.getPoints(s);for(let c=0;c<l.length;c++){let u=l[c];n&&n.equals(u)||(r.push(u),n=u)}}return this.autoClose&&r.length>1&&!r[r.length-1].equals(r[0])&&r.push(r[0]),r}copy(t){super.copy(t),this.curves=[];for(let r=0,n=t.curves.length;r<n;r++){let i=t.curves[r];this.curves.push(i.clone())}return this.autoClose=t.autoClose,this}toJSON(){let t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let r=0,n=this.curves.length;r<n;r++){let i=this.curves[r];t.curves.push(i.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let r=0,n=t.curves.length;r<n;r++){let i=t.curves[r];this.curves.push(new Oht[i.type]().fromJSON(i))}return this}},q1=class extends wU{constructor(t){super(),this.type="Path",this.currentPoint=new Lt,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let r=1,n=t.length;r<n;r++)this.lineTo(t[r].x,t[r].y);return this}moveTo(t,r){return this.currentPoint.set(t,r),this}lineTo(t,r){let n=new U1(this.currentPoint.clone(),new Lt(t,r));return this.curves.push(n),this.currentPoint.set(t,r),this}quadraticCurveTo(t,r,n,i){let o=new uM(this.currentPoint.clone(),new Lt(t,r),new Lt(n,i));return this.curves.push(o),this.currentPoint.set(n,i),this}bezierCurveTo(t,r,n,i,o,a){let s=new cM(this.currentPoint.clone(),new Lt(t,r),new Lt(n,i),new Lt(o,a));return this.curves.push(s),this.currentPoint.set(o,a),this}splineThru(t){let r=[this.currentPoint.clone()].concat(t),n=new fM(r);return this.curves.push(n),this.currentPoint.copy(t[t.length-1]),this}arc(t,r,n,i,o,a){let s=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(t+s,r+l,n,i,o,a),this}absarc(t,r,n,i,o,a){return this.absellipse(t,r,n,n,i,o,a),this}ellipse(t,r,n,i,o,a,s,l){let c=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(t+c,r+u,n,i,o,a,s,l),this}absellipse(t,r,n,i,o,a,s,l){let c=new V1(t,r,n,i,o,a,s,l);if(this.curves.length>0){let h=c.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(c);let u=c.getPoint(1);return this.currentPoint.copy(u),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}},Kc=class extends q1{constructor(t){super(t),this.uuid=Nl(),this.type="Shape",this.holes=[]}getPointsHoles(t){let r=[];for(let n=0,i=this.holes.length;n<i;n++)r[n]=this.holes[n].getPoints(t);return r}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let r=0,n=t.holes.length;r<n;r++){let i=t.holes[r];this.holes.push(i.clone())}return this}toJSON(){let t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let r=0,n=this.holes.length;r<n;r++){let i=this.holes[r];t.holes.push(i.toJSON())}return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let r=0,n=t.holes.length;r<n;r++){let i=t.holes[r];this.holes.push(new q1().fromJSON(i))}return this}},Ggr={triangulate:function(e,t,r=2){let n=t&&t.length,i=n?t[0]*r:e.length,o=epe(e,0,i,r,!0),a=[];if(!o||o.next===o.prev)return a;let s,l,c,u,h,f,p;if(n&&(o=$gr(e,t,o,r)),e.length>80*r){s=c=e[0],l=u=e[1];for(let d=r;d<i;d+=r)h=e[d],f=e[d+1],h<s&&(s=h),f<l&&(l=f),h>c&&(c=h),f>u&&(u=f);p=Math.max(c-s,u-l),p=p!==0?1/p:0}return h6(o,a,r,s,l,p),a}};function epe(e,t,r,n,i){let o,a;if(i===a0r(e,t,r,n)>0)for(o=t;o<r;o+=n)a=mhe(o,e[o],e[o+1],a);else for(o=r-n;o>=t;o-=n)a=mhe(o,e[o],e[o+1],a);return a&&ZU(a,a.next)&&(p6(a),a=a.next),a}function G0(e,t){if(!e)return e;t||(t=e);let r=e,n;do if(n=!1,!r.steiner&&(ZU(r,r.next)||ai(r.prev,r,r.next)===0)){if(p6(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function h6(e,t,r,n,i,o,a){if(!e)return;!a&&o&&t0r(e,n,i,o);let s=e,l,c;for(;e.prev!==e.next;){if(l=e.prev,c=e.next,o?Ygr(e,n,i,o):Wgr(e)){t.push(l.i/r),t.push(e.i/r),t.push(c.i/r),p6(e),e=c.next,s=c.next;continue}if(e=c,e===s){a?a===1?(e=jgr(G0(e),t,r),h6(e,t,r,n,i,o,2)):a===2&&Xgr(e,t,r,n,i,o):h6(G0(e),t,r,n,i,o,1);break}}}function Wgr(e){let t=e.prev,r=e,n=e.next;if(ai(t,r,n)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(H3(t.x,t.y,r.x,r.y,n.x,n.y,i.x,i.y)&&ai(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function Ygr(e,t,r,n){let i=e.prev,o=e,a=e.next;if(ai(i,o,a)>=0)return!1;let s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,c=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,u=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,h=nht(s,l,t,r,n),f=nht(c,u,t,r,n),p=e.prevZ,d=e.nextZ;for(;p&&p.z>=h&&d&&d.z<=f;){if(p!==e.prev&&p!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ai(p.prev,p,p.next)>=0||(p=p.prevZ,d!==e.prev&&d!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ai(d.prev,d,d.next)>=0))return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==e.prev&&p!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,p.x,p.y)&&ai(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==e.prev&&d!==e.next&&H3(i.x,i.y,o.x,o.y,a.x,a.y,d.x,d.y)&&ai(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function jgr(e,t,r){let n=e;do{let i=n.prev,o=n.next.next;!ZU(i,o)&&rpe(i,n,n.next,o)&&f6(i,o)&&f6(o,i)&&(t.push(i.i/r),t.push(n.i/r),t.push(o.i/r),p6(n),p6(n.next),n=e=o),n=n.next}while(n!==e);return G0(n)}function Xgr(e,t,r,n,i,o){let a=e;do{let s=a.next.next;for(;s!==a.prev;){if(a.i!==s.i&&n0r(a,s)){let l=npe(a,s);a=G0(a,a.next),l=G0(l,l.next),h6(a,t,r,n,i,o),h6(l,t,r,n,i,o);return}s=s.next}a=a.next}while(a!==e)}function $gr(e,t,r,n){let i=[],o,a,s,l,c;for(o=0,a=t.length;o<a;o++)s=t[o]*n,l=o<a-1?t[o+1]*n:e.length,c=epe(e,s,l,n,!1),c===c.next&&(c.steiner=!0),i.push(r0r(c));for(i.sort(Kgr),o=0;o<i.length;o++)Zgr(i[o],r),r=G0(r,r.next);return r}function Kgr(e,t){return e.x-t.x}function Zgr(e,t){if(t=Jgr(e,t),t){let r=npe(t,e);G0(t,t.next),G0(r,r.next)}}function Jgr(e,t){let r=t,n=e.x,i=e.y,o=-1/0,a;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){let f=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(f<=n&&f>o){if(o=f,f===n){if(i===r.y)return r;if(i===r.next.y)return r.next}a=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!a)return null;if(n===o)return a;let s=a,l=a.x,c=a.y,u=1/0,h;r=a;do n>=r.x&&r.x>=l&&n!==r.x&&H3(i<c?n:o,i,l,c,i<c?o:n,i,r.x,r.y)&&(h=Math.abs(i-r.y)/(n-r.x),f6(r,e)&&(h<u||h===u&&(r.x>a.x||r.x===a.x&&Qgr(a,r)))&&(a=r,u=h)),r=r.next;while(r!==s);return a}function Qgr(e,t){return ai(e.prev,e,t.prev)<0&&ai(t.next,e,e.next)<0}function t0r(e,t,r,n){let i=e;do i.z===null&&(i.z=nht(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,e0r(i)}function e0r(e){let t,r,n,i,o,a,s,l,c=1;do{for(r=e,e=null,o=null,a=0;r;){for(a++,n=r,s=0,t=0;t<c&&(s++,n=n.nextZ,!!n);t++);for(l=c;s>0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(i=r,r=r.nextZ,s--):(i=n,n=n.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;r=n}o.nextZ=null,c*=2}while(a>1);return e}function nht(e,t,r,n,i){return e=32767*(e-r)*i,t=32767*(t-n)*i,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function r0r(e){let t=e,r=e;do(t.x<r.x||t.x===r.x&&t.y<r.y)&&(r=t),t=t.next;while(t!==e);return r}function H3(e,t,r,n,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(n-s)-(r-a)*(t-s)>=0&&(r-a)*(o-s)-(i-a)*(n-s)>=0}function n0r(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!i0r(e,t)&&(f6(e,t)&&f6(t,e)&&o0r(e,t)&&(ai(e.prev,e,t.prev)||ai(e,t.prev,t))||ZU(e,t)&&ai(e.prev,e,e.next)>0&&ai(t.prev,t,t.next)>0)}function ai(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function ZU(e,t){return e.x===t.x&&e.y===t.y}function rpe(e,t,r,n){let i=GV(ai(e,t,r)),o=GV(ai(e,t,n)),a=GV(ai(r,n,e)),s=GV(ai(r,n,t));return!!(i!==o&&a!==s||i===0&&qV(e,r,t)||o===0&&qV(e,n,t)||a===0&&qV(r,e,n)||s===0&&qV(r,t,n))}function qV(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function GV(e){return e>0?1:e<0?-1:0}function i0r(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&rpe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function f6(e,t){return ai(e.prev,e,e.next)<0?ai(e,t,e.next)>=0&&ai(e,e.prev,t)>=0:ai(e,t,e.prev)<0||ai(e,e.next,t)<0}function o0r(e,t){let r=e,n=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do r.y>o!=r.next.y>o&&r.next.y!==r.y&&i<(r.next.x-r.x)*(o-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function npe(e,t){let r=new iht(e.i,e.x,e.y),n=new iht(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,o.next=n,n.prev=o,n}function mhe(e,t,r,n){let i=new iht(e,t,r);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function p6(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function iht(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function a0r(e,t,r,n){let i=0;for(let o=t,a=r-n;o<r;o+=n)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}var Zc=class{static area(t){let r=t.length,n=0;for(let i=r-1,o=0;o<r;i=o++)n+=t[i].x*t[o].y-t[o].x*t[i].y;return n*.5}static isClockWise(t){return Zc.area(t)<0}static triangulateShape(t,r){let n=[],i=[],o=[];ghe(t),_he(n,t);let a=t.length;r.forEach(ghe);for(let l=0;l<r.length;l++)i.push(a),a+=r[l].length,_he(n,r[l]);let s=Ggr.triangulate(n,i);for(let l=0;l<s.length;l+=3)o.push(s.slice(l,l+3));return o}};function ghe(e){let t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function _he(e,t){for(let r=0;r<t.length;r++)e.push(t[r].x),e.push(t[r].y)}var hh=class extends Pe{constructor(t=new Kc([new Lt(.5,.5),new Lt(-.5,.5),new Lt(-.5,-.5),new Lt(.5,-.5)]),r={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:r},t=Array.isArray(t)?t:[t];let n=this,i=[],o=[];for(let s=0,l=t.length;s<l;s++){let c=t[s];a(c)}this.setAttribute("position",new xe(i,3)),this.setAttribute("uv",new xe(o,2)),this.computeVertexNormals();function a(s){let l=[],c=r.curveSegments!==void 0?r.curveSegments:12,u=r.steps!==void 0?r.steps:1,h=r.depth!==void 0?r.depth:1,f=r.bevelEnabled!==void 0?r.bevelEnabled:!0,p=r.bevelThickness!==void 0?r.bevelThickness:.2,d=r.bevelSize!==void 0?r.bevelSize:p-.1,g=r.bevelOffset!==void 0?r.bevelOffset:0,_=r.bevelSegments!==void 0?r.bevelSegments:3,y=r.extrudePath,x=r.UVGenerator!==void 0?r.UVGenerator:s0r;r.amount!==void 0&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),h=r.amount);let b,S=!1,C,P,k,O;y&&(b=y.getSpacedPoints(u),S=!0,f=!1,C=y.computeFrenetFrames(u,!1),P=new j,k=new j,O=new j),f||(_=0,p=0,d=0,g=0);let D=s.extractPoints(c),B=D.shape,I=D.holes;if(!Zc.isClockWise(B)){B=B.reverse();for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];Zc.isClockWise(ht)&&(I[q]=ht.reverse())}}let R=Zc.triangulateShape(B,I),F=B;for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];B=B.concat(ht)}function z(q,pt,ht){return pt||console.error("THREE.ExtrudeGeometry: vec does not exist"),pt.clone().multiplyScalar(ht).add(q)}let U=B.length,W=R.length;function Z(q,pt,ht){let wt,kt,ie,ee=q.x-pt.x,Le=q.y-pt.y,ar=ht.x-q.x,fr=ht.y-q.y,tt=ee*ee+Le*Le,$=ee*fr-Le*ar;if(Math.abs($)>Number.EPSILON){let It=Math.sqrt(tt),$t=Math.sqrt(ar*ar+fr*fr),he=pt.x-Le/It,Tt=pt.y+ee/It,be=ht.x-fr/$t,nt=ht.y+ar/$t,Ct=((be-he)*fr-(nt-Tt)*ar)/(ee*fr-Le*ar);wt=he+ee*Ct-q.x,kt=Tt+Le*Ct-q.y;let Wt=wt*wt+kt*kt;if(Wt<=2)return new Lt(wt,kt);ie=Math.sqrt(Wt/2)}else{let It=!1;ee>Number.EPSILON?ar>Number.EPSILON&&(It=!0):ee<-Number.EPSILON?ar<-Number.EPSILON&&(It=!0):Math.sign(Le)===Math.sign(fr)&&(It=!0),It?(wt=-Le,kt=ee,ie=Math.sqrt(tt)):(wt=ee,kt=Le,ie=Math.sqrt(tt/2))}return new Lt(wt/ie,kt/ie)}let rt=[];for(let q=0,pt=F.length,ht=pt-1,wt=q+1;q<pt;q++,ht++,wt++)ht===pt&&(ht=0),wt===pt&&(wt=0),rt[q]=Z(F[q],F[ht],F[wt]);let ot=[],st,St=rt.concat();for(let q=0,pt=I.length;q<pt;q++){let ht=I[q];st=[];for(let wt=0,kt=ht.length,ie=kt-1,ee=wt+1;wt<kt;wt++,ie++,ee++)ie===kt&&(ie=0),ee===kt&&(ee=0),st[wt]=Z(ht[wt],ht[ie],ht[ee]);ot.push(st),St=St.concat(st)}for(let q=0;q<_;q++){let pt=q/_,ht=p*Math.cos(pt*Math.PI/2),wt=d*Math.sin(pt*Math.PI/2)+g;for(let kt=0,ie=F.length;kt<ie;kt++){let ee=z(F[kt],rt[kt],wt);_t(ee.x,ee.y,-ht)}for(let kt=0,ie=I.length;kt<ie;kt++){let ee=I[kt];st=ot[kt];for(let Le=0,ar=ee.length;Le<ar;Le++){let fr=z(ee[Le],st[Le],wt);_t(fr.x,fr.y,-ht)}}}let bt=d+g;for(let q=0;q<U;q++){let pt=f?z(B[q],St[q],bt):B[q];S?(k.copy(C.normals[0]).multiplyScalar(pt.x),P.copy(C.binormals[0]).multiplyScalar(pt.y),O.copy(b[0]).add(k).add(P),_t(O.x,O.y,O.z)):_t(pt.x,pt.y,0)}for(let q=1;q<=u;q++)for(let pt=0;pt<U;pt++){let ht=f?z(B[pt],St[pt],bt):B[pt];S?(k.copy(C.normals[q]).multiplyScalar(ht.x),P.copy(C.binormals[q]).multiplyScalar(ht.y),O.copy(b[q]).add(k).add(P),_t(O.x,O.y,O.z)):_t(ht.x,ht.y,h/u*q)}for(let q=_-1;q>=0;q--){let pt=q/_,ht=p*Math.cos(pt*Math.PI/2),wt=d*Math.sin(pt*Math.PI/2)+g;for(let kt=0,ie=F.length;kt<ie;kt++){let ee=z(F[kt],rt[kt],wt);_t(ee.x,ee.y,h+ht)}for(let kt=0,ie=I.length;kt<ie;kt++){let ee=I[kt];st=ot[kt];for(let Le=0,ar=ee.length;Le<ar;Le++){let fr=z(ee[Le],st[Le],wt);S?_t(fr.x,fr.y+b[u-1].y,b[u-1].x+ht):_t(fr.x,fr.y,h+ht)}}}Mt(),lt();function Mt(){let q=i.length/3;if(f){let pt=0,ht=U*pt;for(let wt=0;wt<W;wt++){let kt=R[wt];ct(kt[2]+ht,kt[1]+ht,kt[0]+ht)}pt=u+_*2,ht=U*pt;for(let wt=0;wt<W;wt++){let kt=R[wt];ct(kt[0]+ht,kt[1]+ht,kt[2]+ht)}}else{for(let pt=0;pt<W;pt++){let ht=R[pt];ct(ht[2],ht[1],ht[0])}for(let pt=0;pt<W;pt++){let ht=R[pt];ct(ht[0]+U*u,ht[1]+U*u,ht[2]+U*u)}}n.addGroup(q,i.length/3-q,0)}function lt(){let q=i.length/3,pt=0;Kt(F,pt),pt+=F.length;for(let ht=0,wt=I.length;ht<wt;ht++){let kt=I[ht];Kt(kt,pt),pt+=kt.length}n.addGroup(q,i.length/3-q,1)}function Kt(q,pt){let ht=q.length;for(;--ht>=0;){let wt=ht,kt=ht-1;kt<0&&(kt=q.length-1);for(let ie=0,ee=u+_*2;ie<ee;ie++){let Le=U*ie,ar=U*(ie+1),fr=pt+wt+Le,tt=pt+kt+Le,$=pt+kt+ar,It=pt+wt+ar;X(fr,tt,$,It)}}}function _t(q,pt,ht){l.push(q),l.push(pt),l.push(ht)}function ct(q,pt,ht){et(q),et(pt),et(ht);let wt=i.length/3,kt=x.generateTopUV(n,i,wt-3,wt-2,wt-1);dt(kt[0]),dt(kt[1]),dt(kt[2])}function X(q,pt,ht,wt){et(q),et(pt),et(wt),et(pt),et(ht),et(wt);let kt=i.length/3,ie=x.generateSideWallUV(n,i,kt-6,kt-3,kt-2,kt-1);dt(ie[0]),dt(ie[1]),dt(ie[3]),dt(ie[1]),dt(ie[2]),dt(ie[3])}function et(q){i.push(l[q*3+0]),i.push(l[q*3+1]),i.push(l[q*3+2])}function dt(q){o.push(q.x),o.push(q.y)}}}toJSON(){let t=super.toJSON(),r=this.parameters.shapes,n=this.parameters.options;return l0r(r,n,t)}static fromJSON(t,r){let n=[];for(let o=0,a=t.shapes.length;o<a;o++){let s=r[t.shapes[o]];n.push(s)}let i=t.options.extrudePath;return i!==void 0&&(t.options.extrudePath=new Oht[i.type]().fromJSON(i)),new hh(n,t.options)}},s0r={generateTopUV:function(e,t,r,n,i){let o=t[r*3],a=t[r*3+1],s=t[n*3],l=t[n*3+1],c=t[i*3],u=t[i*3+1];return[new Lt(o,a),new Lt(s,l),new Lt(c,u)]},generateSideWallUV:function(e,t,r,n,i,o){let a=t[r*3],s=t[r*3+1],l=t[r*3+2],c=t[n*3],u=t[n*3+1],h=t[n*3+2],f=t[i*3],p=t[i*3+1],d=t[i*3+2],g=t[o*3],_=t[o*3+1],y=t[o*3+2];return Math.abs(s-u)<Math.abs(a-c)?[new Lt(a,1-l),new Lt(c,1-h),new Lt(f,1-d),new Lt(g,1-y)]:[new Lt(s,1-l),new Lt(u,1-h),new Lt(p,1-d),new Lt(_,1-y)]}};function l0r(e,t,r){if(r.shapes=[],Array.isArray(e))for(let n=0,i=e.length;n<i;n++){let o=e[n];r.shapes.push(o.uuid)}else r.shapes.push(e.uuid);return t.extrudePath!==void 0&&(r.options.extrudePath=t.extrudePath.toJSON()),r}var G1=class extends uh{constructor(t=1,r=0){let 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],o=[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];super(i,o,t,r),this.type="IcosahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new G1(t.radius,t.detail)}},W1=class extends Pe{constructor(t=[new Lt(0,.5),new Lt(.5,0),new Lt(0,-.5)],r=12,n=0,i=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:t,segments:r,phiStart:n,phiLength:i},r=Math.floor(r),i=Zo(i,0,Math.PI*2);let o=[],a=[],s=[],l=[],c=[],u=1/r,h=new j,f=new Lt,p=new j,d=new j,g=new j,_=0,y=0;for(let x=0;x<=t.length-1;x++)switch(x){case 0:_=t[x+1].x-t[x].x,y=t[x+1].y-t[x].y,p.x=y*1,p.y=-_,p.z=y*0,g.copy(p),p.normalize(),l.push(p.x,p.y,p.z);break;case t.length-1:l.push(g.x,g.y,g.z);break;default:_=t[x+1].x-t[x].x,y=t[x+1].y-t[x].y,p.x=y*1,p.y=-_,p.z=y*0,d.copy(p),p.x+=g.x,p.y+=g.y,p.z+=g.z,p.normalize(),l.push(p.x,p.y,p.z),g.copy(d)}for(let x=0;x<=r;x++){let b=n+x*u*i,S=Math.sin(b),C=Math.cos(b);for(let P=0;P<=t.length-1;P++){h.x=t[P].x*S,h.y=t[P].y,h.z=t[P].x*C,a.push(h.x,h.y,h.z),f.x=x/r,f.y=P/(t.length-1),s.push(f.x,f.y);let k=l[3*P+0]*S,O=l[3*P+1],D=l[3*P+0]*C;c.push(k,O,D)}}for(let x=0;x<r;x++)for(let b=0;b<t.length-1;b++){let S=b+x*t.length,C=S,P=S+t.length,k=S+t.length+1,O=S+1;o.push(C,P,O),o.push(k,O,P)}this.setIndex(o),this.setAttribute("position",new xe(a,3)),this.setAttribute("uv",new xe(s,2)),this.setAttribute("normal",new xe(c,3))}static fromJSON(t){return new W1(t.points,t.segments,t.phiStart,t.phiLength)}},W0=class extends uh{constructor(t=1,r=0){let n=[1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],i=[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2];super(n,i,t,r),this.type="OctahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new W0(t.radius,t.detail)}},Y1=class extends Pe{constructor(t=.5,r=1,n=8,i=1,o=0,a=Math.PI*2){super(),this.type="RingGeometry",this.parameters={innerRadius:t,outerRadius:r,thetaSegments:n,phiSegments:i,thetaStart:o,thetaLength:a},n=Math.max(3,n),i=Math.max(1,i);let s=[],l=[],c=[],u=[],h=t,f=(r-t)/i,p=new j,d=new Lt;for(let g=0;g<=i;g++){for(let _=0;_<=n;_++){let y=o+_/n*a;p.x=h*Math.cos(y),p.y=h*Math.sin(y),l.push(p.x,p.y,p.z),c.push(0,0,1),d.x=(p.x/r+1)/2,d.y=(p.y/r+1)/2,u.push(d.x,d.y)}h+=f}for(let g=0;g<i;g++){let _=g*(n+1);for(let y=0;y<n;y++){let x=y+_,b=x,S=x+n+1,C=x+n+2,P=x+1;s.push(b,S,P),s.push(S,C,P)}}this.setIndex(s),this.setAttribute("position",new xe(l,3)),this.setAttribute("normal",new xe(c,3)),this.setAttribute("uv",new xe(u,2))}static fromJSON(t){return new Y1(t.innerRadius,t.outerRadius,t.thetaSegments,t.phiSegments,t.thetaStart,t.thetaLength)}},Y0=class extends Pe{constructor(t=new Kc([new Lt(0,.5),new Lt(-.5,-.5),new Lt(.5,-.5)]),r=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:r};let n=[],i=[],o=[],a=[],s=0,l=0;if(Array.isArray(t)===!1)c(t);else for(let u=0;u<t.length;u++)c(t[u]),this.addGroup(s,l,u),s+=l,l=0;this.setIndex(n),this.setAttribute("position",new xe(i,3)),this.setAttribute("normal",new xe(o,3)),this.setAttribute("uv",new xe(a,2));function c(u){let h=i.length/3,f=u.extractPoints(r),p=f.shape,d=f.holes;Zc.isClockWise(p)===!1&&(p=p.reverse());for(let _=0,y=d.length;_<y;_++){let x=d[_];Zc.isClockWise(x)===!0&&(d[_]=x.reverse())}let g=Zc.triangulateShape(p,d);for(let _=0,y=d.length;_<y;_++){let x=d[_];p=p.concat(x)}for(let _=0,y=p.length;_<y;_++){let x=p[_];i.push(x.x,x.y,0),o.push(0,0,1),a.push(x.x,x.y)}for(let _=0,y=g.length;_<y;_++){let x=g[_],b=x[0]+h,S=x[1]+h,C=x[2]+h;n.push(b,S,C),l+=3}}}toJSON(){let t=super.toJSON(),r=this.parameters.shapes;return c0r(r,t)}static fromJSON(t,r){let n=[];for(let i=0,o=t.shapes.length;i<o;i++){let a=r[t.shapes[i]];n.push(a)}return new Y0(n,t.curveSegments)}};function c0r(e,t){if(t.shapes=[],Array.isArray(e))for(let r=0,n=e.length;r<n;r++){let i=e[r];t.shapes.push(i.uuid)}else t.shapes.push(e.uuid);return t}var j0=class extends Pe{constructor(t=1,r=32,n=16,i=0,o=Math.PI*2,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:r,heightSegments:n,phiStart:i,phiLength:o,thetaStart:a,thetaLength:s},r=Math.max(3,Math.floor(r)),n=Math.max(2,Math.floor(n));let l=Math.min(a+s,Math.PI),c=0,u=[],h=new j,f=new j,p=[],d=[],g=[],_=[];for(let y=0;y<=n;y++){let x=[],b=y/n,S=0;y==0&&a==0?S=.5/r:y==n&&l==Math.PI&&(S=-.5/r);for(let C=0;C<=r;C++){let P=C/r;h.x=-t*Math.cos(i+P*o)*Math.sin(a+b*s),h.y=t*Math.cos(a+b*s),h.z=t*Math.sin(i+P*o)*Math.sin(a+b*s),d.push(h.x,h.y,h.z),f.copy(h).normalize(),g.push(f.x,f.y,f.z),_.push(P+S,1-b),x.push(c++)}u.push(x)}for(let y=0;y<n;y++)for(let x=0;x<r;x++){let b=u[y][x+1],S=u[y][x],C=u[y+1][x],P=u[y+1][x+1];(y!==0||a>0)&&p.push(b,S,P),(y!==n-1||l<Math.PI)&&p.push(S,C,P)}this.setIndex(p),this.setAttribute("position",new xe(d,3)),this.setAttribute("normal",new xe(g,3)),this.setAttribute("uv",new xe(_,2))}static fromJSON(t){return new j0(t.radius,t.widthSegments,t.heightSegments,t.phiStart,t.phiLength,t.thetaStart,t.thetaLength)}},j1=class extends uh{constructor(t=1,r=0){let n=[1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],i=[2,1,0,0,3,2,1,3,0,2,3,1];super(n,i,t,r),this.type="TetrahedronGeometry",this.parameters={radius:t,detail:r}}static fromJSON(t){return new j1(t.radius,t.detail)}},X1=class extends Pe{constructor(t=1,r=.4,n=8,i=6,o=Math.PI*2){super(),this.type="TorusGeometry",this.parameters={radius:t,tube:r,radialSegments:n,tubularSegments:i,arc:o},n=Math.floor(n),i=Math.floor(i);let a=[],s=[],l=[],c=[],u=new j,h=new j,f=new j;for(let p=0;p<=n;p++)for(let d=0;d<=i;d++){let g=d/i*o,_=p/n*Math.PI*2;h.x=(t+r*Math.cos(_))*Math.cos(g),h.y=(t+r*Math.cos(_))*Math.sin(g),h.z=r*Math.sin(_),s.push(h.x,h.y,h.z),u.x=t*Math.cos(g),u.y=t*Math.sin(g),f.subVectors(h,u).normalize(),l.push(f.x,f.y,f.z),c.push(d/i),c.push(p/n)}for(let p=1;p<=n;p++)for(let d=1;d<=i;d++){let g=(i+1)*p+d-1,_=(i+1)*(p-1)+d-1,y=(i+1)*(p-1)+d,x=(i+1)*p+d;a.push(g,_,x),a.push(_,y,x)}this.setIndex(a),this.setAttribute("position",new xe(s,3)),this.setAttribute("normal",new xe(l,3)),this.setAttribute("uv",new xe(c,2))}static fromJSON(t){return new X1(t.radius,t.tube,t.radialSegments,t.tubularSegments,t.arc)}},$1=class extends Pe{constructor(t=1,r=.4,n=64,i=8,o=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:t,tube:r,tubularSegments:n,radialSegments:i,p:o,q:a},n=Math.floor(n),i=Math.floor(i);let s=[],l=[],c=[],u=[],h=new j,f=new j,p=new j,d=new j,g=new j,_=new j,y=new j;for(let b=0;b<=n;++b){let S=b/n*o*Math.PI*2;x(S,o,a,t,p),x(S+.01,o,a,t,d),_.subVectors(d,p),y.addVectors(d,p),g.crossVectors(_,y),y.crossVectors(g,_),g.normalize(),y.normalize();for(let C=0;C<=i;++C){let P=C/i*Math.PI*2,k=-r*Math.cos(P),O=r*Math.sin(P);h.x=p.x+(k*y.x+O*g.x),h.y=p.y+(k*y.y+O*g.y),h.z=p.z+(k*y.z+O*g.z),l.push(h.x,h.y,h.z),f.subVectors(h,p).normalize(),c.push(f.x,f.y,f.z),u.push(b/n),u.push(C/i)}}for(let b=1;b<=n;b++)for(let S=1;S<=i;S++){let C=(i+1)*(b-1)+(S-1),P=(i+1)*b+(S-1),k=(i+1)*b+S,O=(i+1)*(b-1)+S;s.push(C,P,O),s.push(P,k,O)}this.setIndex(s),this.setAttribute("position",new xe(l,3)),this.setAttribute("normal",new xe(c,3)),this.setAttribute("uv",new xe(u,2));function x(b,S,C,P,k){let O=Math.cos(b),D=Math.sin(b),B=C/S*b,I=Math.cos(B);k.x=P*(2+I)*.5*O,k.y=P*(2+I)*D*.5,k.z=P*Math.sin(B)*.5}}static fromJSON(t){return new $1(t.radius,t.tube,t.tubularSegments,t.radialSegments,t.p,t.q)}},K1=class extends Pe{constructor(t=new hM(new j(-1,-1,0),new j(-1,1,0),new j(1,1,0)),r=64,n=1,i=8,o=!1){super(),this.type="TubeGeometry",this.parameters={path:t,tubularSegments:r,radius:n,radialSegments:i,closed:o};let a=t.computeFrenetFrames(r,o);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;let s=new j,l=new j,c=new Lt,u=new j,h=[],f=[],p=[],d=[];g(),this.setIndex(d),this.setAttribute("position",new xe(h,3)),this.setAttribute("normal",new xe(f,3)),this.setAttribute("uv",new xe(p,2));function g(){for(let b=0;b<r;b++)_(b);_(o===!1?r:0),x(),y()}function _(b){u=t.getPointAt(b/r,u);let S=a.normals[b],C=a.binormals[b];for(let P=0;P<=i;P++){let k=P/i*Math.PI*2,O=Math.sin(k),D=-Math.cos(k);l.x=D*S.x+O*C.x,l.y=D*S.y+O*C.y,l.z=D*S.z+O*C.z,l.normalize(),f.push(l.x,l.y,l.z),s.x=u.x+n*l.x,s.y=u.y+n*l.y,s.z=u.z+n*l.z,h.push(s.x,s.y,s.z)}}function y(){for(let b=1;b<=r;b++)for(let S=1;S<=i;S++){let C=(i+1)*(b-1)+(S-1),P=(i+1)*b+(S-1),k=(i+1)*b+S,O=(i+1)*(b-1)+S;d.push(C,P,O),d.push(P,k,O)}}function x(){for(let b=0;b<=r;b++)for(let S=0;S<=i;S++)c.x=b/r,c.y=S/i,p.push(c.x,c.y)}}toJSON(){let t=super.toJSON();return t.path=this.parameters.path.toJSON(),t}static fromJSON(t){return new K1(new Oht[t.path.type]().fromJSON(t.path),t.tubularSegments,t.radius,t.radialSegments,t.closed)}},d6=class extends Pe{constructor(t=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:t},t!==null){let r=[],n=new Set,i=new j,o=new j;if(t.index!==null){let a=t.attributes.position,s=t.index,l=t.groups;l.length===0&&(l=[{start:0,count:s.count,materialIndex:0}]);for(let c=0,u=l.length;c<u;++c){let h=l[c],f=h.start,p=h.count;for(let d=f,g=f+p;d<g;d+=3)for(let _=0;_<3;_++){let y=s.getX(d+_),x=s.getX(d+(_+1)%3);i.fromBufferAttribute(a,y),o.fromBufferAttribute(a,x),yhe(i,o,n)===!0&&(r.push(i.x,i.y,i.z),r.push(o.x,o.y,o.z))}}}else{let a=t.attributes.position;for(let s=0,l=a.count/3;s<l;s++)for(let c=0;c<3;c++){let u=3*s+c,h=3*s+(c+1)%3;i.fromBufferAttribute(a,u),o.fromBufferAttribute(a,h),yhe(i,o,n)===!0&&(r.push(i.x,i.y,i.z),r.push(o.x,o.y,o.z))}}this.setAttribute("position",new xe(r,3))}}};function yhe(e,t,r){let n=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return r.has(n)===!0||r.has(i)===!0?!1:(r.add(n,i),!0)}var vhe=Object.freeze({__proto__:null,BoxGeometry:Qf,BoxBufferGeometry:Qf,CircleGeometry:F1,CircleBufferGeometry:F1,ConeGeometry:B1,ConeBufferGeometry:B1,CylinderGeometry:om,CylinderBufferGeometry:om,DodecahedronGeometry:H1,DodecahedronBufferGeometry:H1,EdgesGeometry:s6,ExtrudeGeometry:hh,ExtrudeBufferGeometry:hh,IcosahedronGeometry:G1,IcosahedronBufferGeometry:G1,LatheGeometry:W1,LatheBufferGeometry:W1,OctahedronGeometry:W0,OctahedronBufferGeometry:W0,PlaneGeometry:V0,PlaneBufferGeometry:V0,PolyhedronGeometry:uh,PolyhedronBufferGeometry:uh,RingGeometry:Y1,RingBufferGeometry:Y1,ShapeGeometry:Y0,ShapeBufferGeometry:Y0,SphereGeometry:j0,SphereBufferGeometry:j0,TetrahedronGeometry:j1,TetrahedronBufferGeometry:j1,TorusGeometry:X1,TorusBufferGeometry:X1,TorusKnotGeometry:$1,TorusKnotBufferGeometry:$1,TubeGeometry:K1,TubeBufferGeometry:K1,WireframeGeometry:d6}),m6=class extends qi{constructor(t){super(),this.type="ShadowMaterial",this.color=new ne(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}};m6.prototype.isShadowMaterial=!0;var pM=class extends qi{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new ne(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 ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}};pM.prototype.isMeshStandardMaterial=!0;var g6=class extends pM{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Lt(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Zo(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(r){this.ior=(1+.4*r)/(1-.4*r)}}),this.sheenColor=new ne(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new ne(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new ne(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(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.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}};g6.prototype.isMeshPhysicalMaterial=!0;var _6=class extends qi{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new ne(16777215),this.specular=new ne(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}};_6.prototype.isMeshPhongMaterial=!0;var y6=class extends qi{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new ne(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),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.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};y6.prototype.isMeshToonMaterial=!0;var v6=class extends qi{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}};v6.prototype.isMeshNormalMaterial=!0;var x6=class extends qi{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new ne(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new ne(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=O6,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(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}};x6.prototype.isMeshLambertMaterial=!0;var b6=class extends qi{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new ne(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ax,this.normalScale=new Lt(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}};b6.prototype.isMeshMatcapMaterial=!0;var w6=class extends Gi{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}};w6.prototype.isLineDashedMaterial=!0;var u0r=Object.freeze({__proto__:null,ShadowMaterial:m6,SpriteMaterial:iM,RawShaderMaterial:U0,ShaderMaterial:lh,PointsMaterial:nm,MeshPhysicalMaterial:g6,MeshStandardMaterial:pM,MeshPhongMaterial:_6,MeshToonMaterial:y6,MeshNormalMaterial:v6,MeshLambertMaterial:x6,MeshDepthMaterial:eM,MeshDistanceMaterial:rM,MeshBasicMaterial:sh,MeshMatcapMaterial:b6,LineDashedMaterial:w6,LineBasicMaterial:Gi,Material:qi}),Yn={arraySlice:function(e,t,r){return Yn.isTypedArray(e)?new e.constructor(e.subarray(t,r!==void 0?r:e.length)):e.slice(t,r)},convertArray:function(e,t,r){return!e||!r&&e.constructor===t?e:typeof t.BYTES_PER_ELEMENT=="number"?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){function t(i,o){return e[i]-e[o]}let r=e.length,n=new Array(r);for(let i=0;i!==r;++i)n[i]=i;return n.sort(t),n},sortedArray:function(e,t,r){let n=e.length,i=new e.constructor(n);for(let o=0,a=0;a!==n;++o){let s=r[o]*t;for(let l=0;l!==t;++l)i[a++]=e[s+l]}return i},flattenJSON:function(e,t,r,n){let i=1,o=e[0];for(;o!==void 0&&o[n]===void 0;)o=e[i++];if(o===void 0)return;let a=o[n];if(a!==void 0)if(Array.isArray(a))do a=o[n],a!==void 0&&(t.push(o.time),r.push.apply(r,a)),o=e[i++];while(o!==void 0);else if(a.toArray!==void 0)do a=o[n],a!==void 0&&(t.push(o.time),a.toArray(r,r.length)),o=e[i++];while(o!==void 0);else do a=o[n],a!==void 0&&(t.push(o.time),r.push(a)),o=e[i++];while(o!==void 0)},subclip:function(e,t,r,n,i=30){let o=e.clone();o.name=t;let a=[];for(let l=0;l<o.tracks.length;++l){let c=o.tracks[l],u=c.getValueSize(),h=[],f=[];for(let p=0;p<c.times.length;++p){let d=c.times[p]*i;if(!(d<r||d>=n)){h.push(c.times[p]);for(let g=0;g<u;++g)f.push(c.values[p*u+g])}}h.length!==0&&(c.times=Yn.convertArray(h,c.times.constructor),c.values=Yn.convertArray(f,c.values.constructor),a.push(c))}o.tracks=a;let s=1/0;for(let l=0;l<o.tracks.length;++l)s>o.tracks[l].times[0]&&(s=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*s);return o.resetDuration(),o},makeClipAdditive:function(e,t=0,r=e,n=30){n<=0&&(n=30);let i=r.tracks.length,o=t/n;for(let a=0;a<i;++a){let s=r.tracks[a],l=s.ValueTypeName;if(l==="bool"||l==="string")continue;let c=e.tracks.find(function(y){return y.name===s.name&&y.ValueTypeName===l});if(c===void 0)continue;let u=0,h=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=h/3);let f=0,p=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(f=p/3);let d=s.times.length-1,g;if(o<=s.times[0]){let y=u,x=h-u;g=Yn.arraySlice(s.values,y,x)}else if(o>=s.times[d]){let y=d*h+u,x=y+h-u;g=Yn.arraySlice(s.values,y,x)}else{let y=s.createInterpolant(),x=u,b=h-u;y.evaluate(o),g=Yn.arraySlice(y.resultBuffer,x,b)}l==="quaternion"&&new yi().fromArray(g).normalize().conjugate().toArray(g);let _=c.times.length;for(let y=0;y<_;++y){let x=y*p+f;if(l==="quaternion")yi.multiplyQuaternionsFlat(c.values,x,g,0,c.values,x);else{let b=p-f*2;for(let S=0;S<b;++S)c.values[x+S]-=g[S]}}}return e.blendMode=kht,e}},fh=class{constructor(t,r,n,i){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new r.constructor(n),this.sampleValues=r,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){let r=this.parameterPositions,n=this._cachedIndex,i=r[n],o=r[n-1];t:{e:{let a;r:{n:if(!(t<i)){for(let s=n+2;;){if(i===void 0){if(t<o)break n;return n=r.length,this._cachedIndex=n,this.afterEnd_(n-1,t,o)}if(n===s)break;if(o=i,i=r[++n],t<i)break e}a=r.length;break r}if(!(t>=o)){let s=r[1];t<s&&(n=2,o=s);for(let l=n-2;;){if(o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(n===l)break;if(i=o,o=r[--n-1],t>=o)break e}a=n,n=0;break r}break t}for(;n<a;){let s=n+a>>>1;t<r[s]?a=s:n=s+1}if(i=r[n],o=r[n-1],o===void 0)return this._cachedIndex=0,this.beforeStart_(0,t,i);if(i===void 0)return n=r.length,this._cachedIndex=n,this.afterEnd_(n-1,o,t)}this._cachedIndex=n,this.intervalChanged_(n,o,i)}return this.interpolate_(n,o,t,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let r=this.resultBuffer,n=this.sampleValues,i=this.valueSize,o=t*i;for(let a=0;a!==i;++a)r[a]=n[o+a];return r}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};fh.prototype.beforeStart_=fh.prototype.copySampleValue_;fh.prototype.afterEnd_=fh.prototype.copySampleValue_;var SU=class extends fh{constructor(t,r,n,i){super(t,r,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:E1,endingEnd:E1}}intervalChanged_(t,r,n){let i=this.parameterPositions,o=t-2,a=t+1,s=i[o],l=i[a];if(s===void 0)switch(this.getSettings_().endingStart){case T1:o=t,s=2*r-n;break;case JP:o=i.length-2,s=r+i[o]-i[o+1];break;default:o=t,s=n}if(l===void 0)switch(this.getSettings_().endingEnd){case T1:a=t,l=2*n-r;break;case JP:a=1,l=n+i[1]-i[0];break;default:a=t-1,l=r}let c=(n-r)*.5,u=this.valueSize;this._weightPrev=c/(r-s),this._weightNext=c/(l-n),this._offsetPrev=o*u,this._offsetNext=a*u}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,u=this._offsetPrev,h=this._offsetNext,f=this._weightPrev,p=this._weightNext,d=(n-r)/(i-r),g=d*d,_=g*d,y=-f*_+2*f*g-f*d,x=(1+f)*_+(-1.5-2*f)*g+(-.5+f)*d+1,b=(-1-p)*_+(1.5+p)*g+.5*d,S=p*_-p*g;for(let C=0;C!==s;++C)o[C]=y*a[u+C]+x*a[c+C]+b*a[l+C]+S*a[h+C];return o}},S6=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=t*s,c=l-s,u=(n-r)/(i-r),h=1-u;for(let f=0;f!==s;++f)o[f]=a[c+f]*h+a[l+f]*u;return o}},MU=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t){return this.copySampleValue_(t-1)}},Dl=class{constructor(t,r,n,i){if(t===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(r===void 0||r.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Yn.convertArray(r,this.TimeBufferType),this.values=Yn.convertArray(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(t){let r=t.constructor,n;if(r.toJSON!==this.toJSON)n=r.toJSON(t);else{n={name:t.name,times:Yn.convertArray(t.times,Array),values:Yn.convertArray(t.values,Array)};let i=t.getInterpolation();i!==t.DefaultInterpolation&&(n.interpolation=i)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new MU(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new S6(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new SU(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let r;switch(t){case KP:r=this.InterpolantFactoryMethodDiscrete;break;case ZP:r=this.InterpolantFactoryMethodLinear;break;case rU:r=this.InterpolantFactoryMethodSmooth;break}if(r===void 0){let n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(t!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=r,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return KP;case this.InterpolantFactoryMethodLinear:return ZP;case this.InterpolantFactoryMethodSmooth:return rU}}getValueSize(){return this.values.length/this.times.length}shift(t){if(t!==0){let r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]+=t}return this}scale(t){if(t!==1){let r=this.times;for(let n=0,i=r.length;n!==i;++n)r[n]*=t}return this}trim(t,r){let n=this.times,i=n.length,o=0,a=i-1;for(;o!==i&&n[o]<t;)++o;for(;a!==-1&&n[a]>r;)--a;if(++a,o!==0||a!==i){o>=a&&(a=Math.max(a,1),o=a-1);let s=this.getValueSize();this.times=Yn.arraySlice(n,o,a),this.values=Yn.arraySlice(this.values,o*s,a*s)}return this}validate(){let t=!0,r=this.getValueSize();r-Math.floor(r)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,i=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let a=null;for(let s=0;s!==o;s++){let l=n[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),t=!1;break}if(a!==null&&a>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,a),t=!1;break}a=l}if(i!==void 0&&Yn.isTypedArray(i))for(let s=0,l=i.length;s!==l;++s){let c=i[s];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,c),t=!1;break}}return t}optimize(){let t=Yn.arraySlice(this.times),r=Yn.arraySlice(this.values),n=this.getValueSize(),i=this.getInterpolation()===rU,o=t.length-1,a=1;for(let s=1;s<o;++s){let l=!1,c=t[s],u=t[s+1];if(c!==u&&(s!==1||c!==t[0]))if(i)l=!0;else{let h=s*n,f=h-n,p=h+n;for(let d=0;d!==n;++d){let g=r[h+d];if(g!==r[f+d]||g!==r[p+d]){l=!0;break}}}if(l){if(s!==a){t[a]=t[s];let h=s*n,f=a*n;for(let p=0;p!==n;++p)r[f+p]=r[h+p]}++a}}if(o>0){t[a]=t[o];for(let s=o*n,l=a*n,c=0;c!==n;++c)r[l+c]=r[s+c];++a}return a!==t.length?(this.times=Yn.arraySlice(t,0,a),this.values=Yn.arraySlice(r,0,a*n)):(this.times=t,this.values=r),this}clone(){let t=Yn.arraySlice(this.times,0),r=Yn.arraySlice(this.values,0),n=this.constructor,i=new n(this.name,t,r);return i.createInterpolant=this.createInterpolant,i}};Dl.prototype.TimeBufferType=Float32Array;Dl.prototype.ValueBufferType=Float32Array;Dl.prototype.DefaultInterpolation=ZP;var am=class extends Dl{};am.prototype.ValueTypeName="bool";am.prototype.ValueBufferType=Array;am.prototype.DefaultInterpolation=KP;am.prototype.InterpolantFactoryMethodLinear=void 0;am.prototype.InterpolantFactoryMethodSmooth=void 0;var M6=class extends Dl{};M6.prototype.ValueTypeName="color";var Z1=class extends Dl{};Z1.prototype.ValueTypeName="number";var EU=class extends fh{constructor(t,r,n,i){super(t,r,n,i)}interpolate_(t,r,n,i){let o=this.resultBuffer,a=this.sampleValues,s=this.valueSize,l=(n-r)/(i-r),c=t*s;for(let u=c+s;c!==u;c+=4)yi.slerpFlat(o,0,a,c-s,a,c,l);return o}},X0=class extends Dl{InterpolantFactoryMethodLinear(t){return new EU(this.times,this.values,this.getValueSize(),t)}};X0.prototype.ValueTypeName="quaternion";X0.prototype.DefaultInterpolation=ZP;X0.prototype.InterpolantFactoryMethodSmooth=void 0;var sm=class extends Dl{};sm.prototype.ValueTypeName="string";sm.prototype.ValueBufferType=Array;sm.prototype.DefaultInterpolation=KP;sm.prototype.InterpolantFactoryMethodLinear=void 0;sm.prototype.InterpolantFactoryMethodSmooth=void 0;var J1=class extends Dl{};J1.prototype.ValueTypeName="vector";var Q1=class{constructor(t,r=-1,n,i=$U){this.name=t,this.tracks=n,this.duration=r,this.blendMode=i,this.uuid=Nl(),this.duration<0&&this.resetDuration()}static parse(t){let r=[],n=t.tracks,i=1/(t.fps||1);for(let a=0,s=n.length;a!==s;++a)r.push(f0r(n[a]).scale(i));let o=new this(t.name,t.duration,r,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){let r=[],n=t.tracks,i={name:t.name,duration:t.duration,tracks:r,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,a=n.length;o!==a;++o)r.push(Dl.toJSON(n[o]));return i}static CreateFromMorphTargetSequence(t,r,n,i){let o=r.length,a=[];for(let s=0;s<o;s++){let l=[],c=[];l.push((s+o-1)%o,s,(s+1)%o),c.push(0,1,0);let u=Yn.getKeyframeOrder(l);l=Yn.sortedArray(l,1,u),c=Yn.sortedArray(c,1,u),!i&&l[0]===0&&(l.push(o),c.push(c[0])),a.push(new Z1(".morphTargetInfluences["+r[s].name+"]",l,c).scale(1/n))}return new this(t,-1,a)}static findByName(t,r){let n=t;if(!Array.isArray(t)){let i=t;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===r)return n[i];return null}static CreateClipsFromMorphTargetSequences(t,r,n){let i={},o=/^([\w-]*?)([\d]+)$/;for(let s=0,l=t.length;s<l;s++){let c=t[s],u=c.name.match(o);if(u&&u.length>1){let h=u[1],f=i[h];f||(i[h]=f=[]),f.push(c)}}let a=[];for(let s in i)a.push(this.CreateFromMorphTargetSequence(s,i[s],r,n));return a}static parseAnimation(t,r){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(h,f,p,d,g){if(p.length!==0){let _=[],y=[];Yn.flattenJSON(p,_,y,d),_.length!==0&&g.push(new h(f,_,y))}},i=[],o=t.name||"default",a=t.fps||30,s=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let h=0;h<c.length;h++){let f=c[h].keys;if(!(!f||f.length===0))if(f[0].morphTargets){let p={},d;for(d=0;d<f.length;d++)if(f[d].morphTargets)for(let g=0;g<f[d].morphTargets.length;g++)p[f[d].morphTargets[g]]=-1;for(let g in p){let _=[],y=[];for(let x=0;x!==f[d].morphTargets.length;++x){let b=f[d];_.push(b.time),y.push(b.morphTarget===g?1:0)}i.push(new Z1(".morphTargetInfluence["+g+"]",_,y))}l=p.length*(a||1)}else{let p=".bones["+r[h].name+"]";n(J1,p+".position",f,"pos",i),n(X0,p+".quaternion",f,"rot",i),n(J1,p+".scale",f,"scl",i)}}return i.length===0?null:new this(o,l,i,s)}resetDuration(){let t=this.tracks,r=0;for(let n=0,i=t.length;n!==i;++n){let o=this.tracks[n];r=Math.max(r,o.times[o.times.length-1])}return this.duration=r,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let r=0;r<this.tracks.length;r++)t=t&&this.tracks[r].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){let t=[];for(let r=0;r<this.tracks.length;r++)t.push(this.tracks[r].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}};function h0r(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return Z1;case"vector":case"vector2":case"vector3":case"vector4":return J1;case"color":return M6;case"quaternion":return X0;case"bool":case"boolean":return am;case"string":return sm}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}function f0r(e){if(e.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=h0r(e.type);if(e.times===void 0){let r=[],n=[];Yn.flattenJSON(e.keys,r,n,"value"),e.times=r,e.values=n}return t.parse!==void 0?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}var tx={enabled:!1,files:{},add:function(e,t){this.enabled!==!1&&(this.files[e]=t)},get:function(e){if(this.enabled!==!1)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}},E6=class{constructor(t,r,n){let i=this,o=!1,a=0,s=0,l,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=r,this.onError=n,this.itemStart=function(u){s++,o===!1&&i.onStart!==void 0&&i.onStart(u,a,s),o=!0},this.itemEnd=function(u){a++,i.onProgress!==void 0&&i.onProgress(u,a,s),a===s&&(o=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(u){i.onError!==void 0&&i.onError(u)},this.resolveURL=function(u){return l?l(u):u},this.setURLModifier=function(u){return l=u,this},this.addHandler=function(u,h){return c.push(u,h),this},this.removeHandler=function(u){let h=c.indexOf(u);return h!==-1&&c.splice(h,2),this},this.getHandler=function(u){for(let h=0,f=c.length;h<f;h+=2){let p=c[h],d=c[h+1];if(p.global&&(p.lastIndex=0),p.test(u))return d}return null}}},ipe=new E6,ea=class{constructor(t){this.manager=t!==void 0?t:ipe,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,r){let n=this;return new Promise(function(i,o){n.load(t,i,r,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}},Yd={},Jc=class extends ea{constructor(t){super(t)}load(t,r,n,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=tx.get(t);if(o!==void 0)return this.manager.itemStart(t),setTimeout(()=>{r&&r(o),this.manager.itemEnd(t)},0),o;if(Yd[t]!==void 0){Yd[t].push({onLoad:r,onProgress:n,onError:i});return}Yd[t]=[],Yd[t].push({onLoad:r,onProgress:n,onError:i});let a=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(a).then(c=>{if(c.status===200||c.status===0){if(c.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||c.body.getReader===void 0)return c;let u=Yd[t],h=c.body.getReader(),f=c.headers.get("Content-Length"),p=f?parseInt(f):0,d=p!==0,g=0,_=new ReadableStream({start(y){x();function x(){h.read().then(({done:b,value:S})=>{if(b)y.close();else{g+=S.byteLength;let C=new ProgressEvent("progress",{lengthComputable:d,loaded:g,total:p});for(let P=0,k=u.length;P<k;P++){let O=u[P];O.onProgress&&O.onProgress(C)}y.enqueue(S),x()}})}}});return new Response(_)}else throw Error(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(u=>new DOMParser().parseFromString(u,s));case"json":return c.json();default:if(s===void 0)return c.text();{let h=/charset="?([^;"\s]*)"?/i.exec(s),f=h&&h[1]?h[1].toLowerCase():void 0,p=new TextDecoder(f);return c.arrayBuffer().then(d=>p.decode(d))}}}).then(c=>{tx.add(t,c);let u=Yd[t];delete Yd[t];for(let h=0,f=u.length;h<f;h++){let p=u[h];p.onLoad&&p.onLoad(c)}}).catch(c=>{let u=Yd[t];if(u===void 0)throw this.manager.itemError(t),c;delete Yd[t];for(let h=0,f=u.length;h<f;h++){let p=u[h];p.onError&&p.onError(c)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}},oht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r=[];for(let n=0;n<t.length;n++){let i=Q1.parse(t[n]);r.push(i)}return r}},aht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=[],s=new a6,l=new Jc(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(o.withCredentials);let c=0;function u(h){l.load(t[h],function(f){let p=o.parse(f,!0);a[h]={width:p.width,height:p.height,format:p.format,mipmaps:p.mipmaps},c+=1,c===6&&(p.mipmapCount===1&&(s.minFilter=ii),s.image=a,s.format=p.format,s.needsUpdate=!0,r&&r(s))},n,i)}if(Array.isArray(t))for(let h=0,f=t.length;h<f;++h)u(h);else l.load(t,function(h){let f=o.parse(h,!0);if(f.isCubemap){let p=f.mipmaps.length/f.mipmapCount;for(let d=0;d<p;d++){a[d]={mipmaps:[]};for(let g=0;g<f.mipmapCount;g++)a[d].mipmaps.push(f.mipmaps[d*f.mipmapCount+g]),a[d].format=f.format,a[d].width=f.width,a[d].height=f.height}s.image=a}else s.image.width=f.width,s.image.height=f.height,s.mipmaps=f.mipmaps;f.mipmapCount===1&&(s.minFilter=ii),s.format=f.format,s.needsUpdate=!0,r&&r(s)},n,i);return s}},ex=class extends ea{constructor(t){super(t)}load(t,r,n,i){this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=tx.get(t);if(a!==void 0)return o.manager.itemStart(t),setTimeout(function(){r&&r(a),o.manager.itemEnd(t)},0),a;let s=t6("img");function l(){u(),tx.add(t,this),r&&r(this),o.manager.itemEnd(t)}function c(h){u(),i&&i(h),o.manager.itemError(t),o.manager.itemEnd(t)}function u(){s.removeEventListener("load",l,!1),s.removeEventListener("error",c,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",c,!1),t.substr(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),o.manager.itemStart(t),s.src=t,s}},TU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new H0,a=new ex(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;function l(c){a.load(t[c],function(u){o.images[c]=u,s++,s===6&&(o.needsUpdate=!0,r&&r(o))},void 0,i)}for(let c=0;c<t.length;++c)l(c);return o}},CU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jd,s=new Jc(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(o.withCredentials),s.load(t,function(l){let c=o.parse(l);!c||(c.image!==void 0?a.image=c.image:c.data!==void 0&&(a.image.width=c.width,a.image.height=c.height,a.image.data=c.data),a.wrapS=c.wrapS!==void 0?c.wrapS:Jo,a.wrapT=c.wrapT!==void 0?c.wrapT:Jo,a.magFilter=c.magFilter!==void 0?c.magFilter:ii,a.minFilter=c.minFilter!==void 0?c.minFilter:ii,a.anisotropy=c.anisotropy!==void 0?c.anisotropy:1,c.encoding!==void 0&&(a.encoding=c.encoding),c.flipY!==void 0&&(a.flipY=c.flipY),c.format!==void 0&&(a.format=c.format),c.type!==void 0&&(a.type=c.type),c.mipmaps!==void 0&&(a.mipmaps=c.mipmaps,a.minFilter=ox),c.mipmapCount===1&&(a.minFilter=ii),c.generateMipmaps!==void 0&&(a.generateMipmaps=c.generateMipmaps),a.needsUpdate=!0,r&&r(a,c))},n,i),a}},AU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=new vi,a=new ex(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(t,function(s){o.image=s,o.needsUpdate=!0,r!==void 0&&r(o)},n,i),o}},Ol=class extends or{constructor(t,r=1){super(),this.type="Light",this.color=new ne(t),this.intensity=r}dispose(){}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let r=super.toJSON(t);return r.object.color=this.color.getHex(),r.object.intensity=this.intensity,this.groundColor!==void 0&&(r.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(r.object.distance=this.distance),this.angle!==void 0&&(r.object.angle=this.angle),this.decay!==void 0&&(r.object.decay=this.decay),this.penumbra!==void 0&&(r.object.penumbra=this.penumbra),this.shadow!==void 0&&(r.object.shadow=this.shadow.toJSON()),r}};Ol.prototype.isLight=!0;var T6=class extends Ol{constructor(t,r,n){super(t,n),this.type="HemisphereLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.groundColor=new ne(r)}copy(t){return Ol.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}};T6.prototype.isHemisphereLight=!0;var xhe=new Me,bhe=new j,whe=new j,C6=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Lt(512,512),this.map=null,this.mapPass=null,this.matrix=new Me,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new N1,this._frameExtents=new Lt(1,1),this._viewportCount=1,this._viewports=[new en(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let r=this.camera,n=this.matrix;bhe.setFromMatrixPosition(t.matrixWorld),r.position.copy(bhe),whe.setFromMatrixPosition(t.target.matrixWorld),r.lookAt(whe),r.updateMatrixWorld(),xhe.multiplyMatrices(r.projectionMatrix,r.matrixWorldInverse),this._frustum.setFromProjectionMatrix(xhe),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(r.projectionMatrix),n.multiply(r.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){let t={};return this.bias!==0&&(t.bias=this.bias),this.normalBias!==0&&(t.normalBias=this.normalBias),this.radius!==1&&(t.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}},PU=class extends C6{constructor(){super(new Ui(50,1,.5,500)),this.focus=1}updateMatrices(t){let r=this.camera,n=QP*2*t.angle*this.focus,i=this.mapSize.width/this.mapSize.height,o=t.distance||r.far;(n!==r.fov||i!==r.aspect||o!==r.far)&&(r.fov=n,r.aspect=i,r.far=o,r.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}};PU.prototype.isSpotLightShadow=!0;var A6=class extends Ol{constructor(t,r,n=0,i=Math.PI/3,o=0,a=1){super(t,r),this.type="SpotLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.target=new or,this.distance=n,this.angle=i,this.penumbra=o,this.decay=a,this.shadow=new PU}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};A6.prototype.isSpotLight=!0;var She=new Me,BP=new j,xut=new j,IU=class extends C6{constructor(){super(new Ui(90,1,.5,500)),this._frameExtents=new Lt(4,2),this._viewportCount=6,this._viewports=[new en(2,1,1,1),new en(0,1,1,1),new en(3,1,1,1),new en(1,1,1,1),new en(3,0,1,1),new en(1,0,1,1)],this._cubeDirections=[new j(1,0,0),new j(-1,0,0),new j(0,0,1),new j(0,0,-1),new j(0,1,0),new j(0,-1,0)],this._cubeUps=[new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,1,0),new j(0,0,1),new j(0,0,-1)]}updateMatrices(t,r=0){let n=this.camera,i=this.matrix,o=t.distance||n.far;o!==n.far&&(n.far=o,n.updateProjectionMatrix()),BP.setFromMatrixPosition(t.matrixWorld),n.position.copy(BP),xut.copy(n.position),xut.add(this._cubeDirections[r]),n.up.copy(this._cubeUps[r]),n.lookAt(xut),n.updateMatrixWorld(),i.makeTranslation(-BP.x,-BP.y,-BP.z),She.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(She)}};IU.prototype.isPointLightShadow=!0;var P6=class extends Ol{constructor(t,r,n=0,i=1){super(t,r),this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new IU}get power(){return this.intensity*4*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}};P6.prototype.isPointLight=!0;var LU=class extends C6{constructor(){super(new D1(-5,5,5,-5,.5,500))}};LU.prototype.isDirectionalLightShadow=!0;var I6=class extends Ol{constructor(t,r){super(t,r),this.type="DirectionalLight",this.position.copy(or.DefaultUp),this.updateMatrix(),this.target=new or,this.shadow=new LU}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}};I6.prototype.isDirectionalLight=!0;var L6=class extends Ol{constructor(t,r){super(t,r),this.type="AmbientLight"}};L6.prototype.isAmbientLight=!0;var k6=class extends Ol{constructor(t,r,n=10,i=10){super(t,r),this.type="RectAreaLight",this.width=n,this.height=i}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){let r=super.toJSON(t);return r.object.width=this.width,r.object.height=this.height,r}};k6.prototype.isRectAreaLight=!0;var R6=class{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new j)}set(t){for(let r=0;r<9;r++)this.coefficients[r].copy(t[r]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,r){let n=t.x,i=t.y,o=t.z,a=this.coefficients;return r.copy(a[0]).multiplyScalar(.282095),r.addScaledVector(a[1],.488603*i),r.addScaledVector(a[2],.488603*o),r.addScaledVector(a[3],.488603*n),r.addScaledVector(a[4],1.092548*(n*i)),r.addScaledVector(a[5],1.092548*(i*o)),r.addScaledVector(a[6],.315392*(3*o*o-1)),r.addScaledVector(a[7],1.092548*(n*o)),r.addScaledVector(a[8],.546274*(n*n-i*i)),r}getIrradianceAt(t,r){let n=t.x,i=t.y,o=t.z,a=this.coefficients;return r.copy(a[0]).multiplyScalar(.886227),r.addScaledVector(a[1],2*.511664*i),r.addScaledVector(a[2],2*.511664*o),r.addScaledVector(a[3],2*.511664*n),r.addScaledVector(a[4],2*.429043*n*i),r.addScaledVector(a[5],2*.429043*i*o),r.addScaledVector(a[6],.743125*o*o-.247708),r.addScaledVector(a[7],2*.429043*n*o),r.addScaledVector(a[8],.429043*(n*n-i*i)),r}add(t){for(let r=0;r<9;r++)this.coefficients[r].add(t.coefficients[r]);return this}addScaledSH(t,r){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(t.coefficients[n],r);return this}scale(t){for(let r=0;r<9;r++)this.coefficients[r].multiplyScalar(t);return this}lerp(t,r){for(let n=0;n<9;n++)this.coefficients[n].lerp(t.coefficients[n],r);return this}equals(t){for(let r=0;r<9;r++)if(!this.coefficients[r].equals(t.coefficients[r]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return new this.constructor().copy(this)}fromArray(t,r=0){let n=this.coefficients;for(let i=0;i<9;i++)n[i].fromArray(t,r+i*3);return this}toArray(t=[],r=0){let n=this.coefficients;for(let i=0;i<9;i++)n[i].toArray(t,r+i*3);return t}static getBasisAt(t,r){let n=t.x,i=t.y,o=t.z;r[0]=.282095,r[1]=.488603*i,r[2]=.488603*o,r[3]=.488603*n,r[4]=1.092548*n*i,r[5]=1.092548*i*o,r[6]=.315392*(3*o*o-1),r[7]=1.092548*n*o,r[8]=.546274*(n*n-i*i)}};R6.prototype.isSphericalHarmonics3=!0;var rx=class extends Ol{constructor(t=new R6,r=1){super(void 0,r),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){let r=super.toJSON(t);return r.object.sh=this.sh.toArray(),r}};rx.prototype.isLightProbe=!0;var kU=class extends ea{constructor(t){super(t),this.textures={}}load(t,r,n,i){let o=this,a=new Jc(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r=this.textures;function n(o){return r[o]===void 0&&console.warn("THREE.MaterialLoader: Undefined texture",o),r[o]}let i=new u0r[t.type];if(t.uuid!==void 0&&(i.uuid=t.uuid),t.name!==void 0&&(i.name=t.name),t.color!==void 0&&i.color!==void 0&&i.color.setHex(t.color),t.roughness!==void 0&&(i.roughness=t.roughness),t.metalness!==void 0&&(i.metalness=t.metalness),t.sheen!==void 0&&(i.sheen=t.sheen),t.sheenColor!==void 0&&(i.sheenColor=new ne().setHex(t.sheenColor)),t.sheenRoughness!==void 0&&(i.sheenRoughness=t.sheenRoughness),t.emissive!==void 0&&i.emissive!==void 0&&i.emissive.setHex(t.emissive),t.specular!==void 0&&i.specular!==void 0&&i.specular.setHex(t.specular),t.specularIntensity!==void 0&&(i.specularIntensity=t.specularIntensity),t.specularColor!==void 0&&i.specularColor!==void 0&&i.specularColor.setHex(t.specularColor),t.shininess!==void 0&&(i.shininess=t.shininess),t.clearcoat!==void 0&&(i.clearcoat=t.clearcoat),t.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=t.clearcoatRoughness),t.transmission!==void 0&&(i.transmission=t.transmission),t.thickness!==void 0&&(i.thickness=t.thickness),t.attenuationDistance!==void 0&&(i.attenuationDistance=t.attenuationDistance),t.attenuationColor!==void 0&&i.attenuationColor!==void 0&&i.attenuationColor.setHex(t.attenuationColor),t.fog!==void 0&&(i.fog=t.fog),t.flatShading!==void 0&&(i.flatShading=t.flatShading),t.blending!==void 0&&(i.blending=t.blending),t.combine!==void 0&&(i.combine=t.combine),t.side!==void 0&&(i.side=t.side),t.shadowSide!==void 0&&(i.shadowSide=t.shadowSide),t.opacity!==void 0&&(i.opacity=t.opacity),t.transparent!==void 0&&(i.transparent=t.transparent),t.alphaTest!==void 0&&(i.alphaTest=t.alphaTest),t.depthTest!==void 0&&(i.depthTest=t.depthTest),t.depthWrite!==void 0&&(i.depthWrite=t.depthWrite),t.colorWrite!==void 0&&(i.colorWrite=t.colorWrite),t.alphaWrite!==void 0&&(i.alphaWrite=t.alphaWrite),t.stencilWrite!==void 0&&(i.stencilWrite=t.stencilWrite),t.stencilWriteMask!==void 0&&(i.stencilWriteMask=t.stencilWriteMask),t.stencilFunc!==void 0&&(i.stencilFunc=t.stencilFunc),t.stencilRef!==void 0&&(i.stencilRef=t.stencilRef),t.stencilFuncMask!==void 0&&(i.stencilFuncMask=t.stencilFuncMask),t.stencilFail!==void 0&&(i.stencilFail=t.stencilFail),t.stencilZFail!==void 0&&(i.stencilZFail=t.stencilZFail),t.stencilZPass!==void 0&&(i.stencilZPass=t.stencilZPass),t.wireframe!==void 0&&(i.wireframe=t.wireframe),t.wireframeLinewidth!==void 0&&(i.wireframeLinewidth=t.wireframeLinewidth),t.wireframeLinecap!==void 0&&(i.wireframeLinecap=t.wireframeLinecap),t.wireframeLinejoin!==void 0&&(i.wireframeLinejoin=t.wireframeLinejoin),t.rotation!==void 0&&(i.rotation=t.rotation),t.linewidth!==1&&(i.linewidth=t.linewidth),t.dashSize!==void 0&&(i.dashSize=t.dashSize),t.gapSize!==void 0&&(i.gapSize=t.gapSize),t.scale!==void 0&&(i.scale=t.scale),t.polygonOffset!==void 0&&(i.polygonOffset=t.polygonOffset),t.polygonOffsetFactor!==void 0&&(i.polygonOffsetFactor=t.polygonOffsetFactor),t.polygonOffsetUnits!==void 0&&(i.polygonOffsetUnits=t.polygonOffsetUnits),t.dithering!==void 0&&(i.dithering=t.dithering),t.alphaToCoverage!==void 0&&(i.alphaToCoverage=t.alphaToCoverage),t.premultipliedAlpha!==void 0&&(i.premultipliedAlpha=t.premultipliedAlpha),t.visible!==void 0&&(i.visible=t.visible),t.toneMapped!==void 0&&(i.toneMapped=t.toneMapped),t.userData!==void 0&&(i.userData=t.userData),t.vertexColors!==void 0&&(typeof t.vertexColors=="number"?i.vertexColors=t.vertexColors>0:i.vertexColors=t.vertexColors),t.uniforms!==void 0)for(let o in t.uniforms){let a=t.uniforms[o];switch(i.uniforms[o]={},a.type){case"t":i.uniforms[o].value=n(a.value);break;case"c":i.uniforms[o].value=new ne().setHex(a.value);break;case"v2":i.uniforms[o].value=new Lt().fromArray(a.value);break;case"v3":i.uniforms[o].value=new j().fromArray(a.value);break;case"v4":i.uniforms[o].value=new en().fromArray(a.value);break;case"m3":i.uniforms[o].value=new ki().fromArray(a.value);break;case"m4":i.uniforms[o].value=new Me().fromArray(a.value);break;default:i.uniforms[o].value=a.value}}if(t.defines!==void 0&&(i.defines=t.defines),t.vertexShader!==void 0&&(i.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(i.fragmentShader=t.fragmentShader),t.extensions!==void 0)for(let o in t.extensions)i.extensions[o]=t.extensions[o];if(t.shading!==void 0&&(i.flatShading=t.shading===1),t.size!==void 0&&(i.size=t.size),t.sizeAttenuation!==void 0&&(i.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(i.map=n(t.map)),t.matcap!==void 0&&(i.matcap=n(t.matcap)),t.alphaMap!==void 0&&(i.alphaMap=n(t.alphaMap)),t.bumpMap!==void 0&&(i.bumpMap=n(t.bumpMap)),t.bumpScale!==void 0&&(i.bumpScale=t.bumpScale),t.normalMap!==void 0&&(i.normalMap=n(t.normalMap)),t.normalMapType!==void 0&&(i.normalMapType=t.normalMapType),t.normalScale!==void 0){let o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),i.normalScale=new Lt().fromArray(o)}return t.displacementMap!==void 0&&(i.displacementMap=n(t.displacementMap)),t.displacementScale!==void 0&&(i.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(i.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(i.roughnessMap=n(t.roughnessMap)),t.metalnessMap!==void 0&&(i.metalnessMap=n(t.metalnessMap)),t.emissiveMap!==void 0&&(i.emissiveMap=n(t.emissiveMap)),t.emissiveIntensity!==void 0&&(i.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(i.specularMap=n(t.specularMap)),t.specularIntensityMap!==void 0&&(i.specularIntensityMap=n(t.specularIntensityMap)),t.specularColorMap!==void 0&&(i.specularColorMap=n(t.specularColorMap)),t.envMap!==void 0&&(i.envMap=n(t.envMap)),t.envMapIntensity!==void 0&&(i.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(i.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(i.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(i.lightMap=n(t.lightMap)),t.lightMapIntensity!==void 0&&(i.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(i.aoMap=n(t.aoMap)),t.aoMapIntensity!==void 0&&(i.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(i.gradientMap=n(t.gradientMap)),t.clearcoatMap!==void 0&&(i.clearcoatMap=n(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(i.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(i.clearcoatNormalMap=n(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(i.clearcoatNormalScale=new Lt().fromArray(t.clearcoatNormalScale)),t.transmissionMap!==void 0&&(i.transmissionMap=n(t.transmissionMap)),t.thicknessMap!==void 0&&(i.thicknessMap=n(t.thicknessMap)),t.sheenColorMap!==void 0&&(i.sheenColorMap=n(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(i.sheenRoughnessMap=n(t.sheenRoughnessMap)),i}setTextures(t){return this.textures=t,this}},dM=class{static decodeText(t){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(t);let r="";for(let n=0,i=t.length;n<i;n++)r+=String.fromCharCode(t[n]);try{return decodeURIComponent(escape(r))}catch(n){return r}}static extractUrlBase(t){let r=t.lastIndexOf("/");return r===-1?"./":t.substr(0,r+1)}static resolveURL(t,r){return typeof t!="string"||t===""?"":(/^https?:\/\//i.test(r)&&/^\//.test(t)&&(r=r.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:r+t)}},N6=class extends Pe{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}clone(){return new this.constructor().copy(this)}toJSON(){let t=super.toJSON(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}};N6.prototype.isInstancedBufferGeometry=!0;var RU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(o.manager);a.setPath(o.path),a.setRequestHeader(o.requestHeader),a.setWithCredentials(o.withCredentials),a.load(t,function(s){try{r(o.parse(JSON.parse(s)))}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}parse(t){let r={},n={};function i(p,d){if(r[d]!==void 0)return r[d];let _=p.interleavedBuffers[d],y=o(p,_.buffer),x=B3(_.type,y),b=new em(x,_.stride);return b.uuid=_.uuid,r[d]=b,b}function o(p,d){if(n[d]!==void 0)return n[d];let _=p.arrayBuffers[d],y=new Uint32Array(_).buffer;return n[d]=y,y}let a=t.isInstancedBufferGeometry?new N6:new Pe,s=t.data.index;if(s!==void 0){let p=B3(s.type,s.array);a.setIndex(new Je(p,1))}let l=t.data.attributes;for(let p in l){let d=l[p],g;if(d.isInterleavedBufferAttribute){let _=i(t.data,d.data);g=new tp(_,d.itemSize,d.offset,d.normalized)}else{let _=B3(d.type,d.array),y=d.isInstancedBufferAttribute?rm:Je;g=new y(_,d.itemSize,d.normalized)}d.name!==void 0&&(g.name=d.name),d.usage!==void 0&&g.setUsage(d.usage),d.updateRange!==void 0&&(g.updateRange.offset=d.updateRange.offset,g.updateRange.count=d.updateRange.count),a.setAttribute(p,g)}let c=t.data.morphAttributes;if(c)for(let p in c){let d=c[p],g=[];for(let _=0,y=d.length;_<y;_++){let x=d[_],b;if(x.isInterleavedBufferAttribute){let S=i(t.data,x.data);b=new tp(S,x.itemSize,x.offset,x.normalized)}else{let S=B3(x.type,x.array);b=new Je(S,x.itemSize,x.normalized)}x.name!==void 0&&(b.name=x.name),g.push(b)}a.morphAttributes[p]=g}t.data.morphTargetsRelative&&(a.morphTargetsRelative=!0);let h=t.data.groups||t.data.drawcalls||t.data.offsets;if(h!==void 0)for(let p=0,d=h.length;p!==d;++p){let g=h[p];a.addGroup(g.start,g.count,g.materialIndex)}let f=t.data.boundingSphere;if(f!==void 0){let p=new j;f.center!==void 0&&p.fromArray(f.center),a.boundingSphere=new Zf(p,f.radius)}return t.name&&(a.name=t.name),t.userData&&(a.userData=t.userData),a}},sht=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=this.path===""?dM.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||a;let s=new Jc(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(l){let c=null;try{c=JSON.parse(l)}catch(h){i!==void 0&&i(h),console.error("THREE:ObjectLoader: Can't parse "+t+".",h.message);return}let u=c.metadata;if(u===void 0||u.type===void 0||u.type.toLowerCase()==="geometry"){console.error("THREE.ObjectLoader: Can't load "+t);return}o.parse(c,r)},n,i)}loadAsync(t,r){return Ri(this,null,function*(){let n=this,i=this.path===""?dM.extractUrlBase(t):this.path;this.resourcePath=this.resourcePath||i;let o=new Jc(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials);let a=yield o.loadAsync(t,r),s=JSON.parse(a),l=s.metadata;if(l===void 0||l.type===void 0||l.type.toLowerCase()==="geometry")throw new Error("THREE.ObjectLoader: Can't load "+t);return yield n.parseAsync(s)})}parse(t,r){let n=this.parseAnimations(t.animations),i=this.parseShapes(t.shapes),o=this.parseGeometries(t.geometries,i),a=this.parseImages(t.images,function(){r!==void 0&&r(c)}),s=this.parseTextures(t.textures,a),l=this.parseMaterials(t.materials,s),c=this.parseObject(t.object,o,l,s,n),u=this.parseSkeletons(t.skeletons,c);if(this.bindSkeletons(c,u),r!==void 0){let h=!1;for(let f in a)if(a[f]instanceof HTMLImageElement){h=!0;break}h===!1&&r(c)}return c}parseAsync(t){return Ri(this,null,function*(){let r=this.parseAnimations(t.animations),n=this.parseShapes(t.shapes),i=this.parseGeometries(t.geometries,n),o=yield this.parseImagesAsync(t.images),a=this.parseTextures(t.textures,o),s=this.parseMaterials(t.materials,a),l=this.parseObject(t.object,i,s,a,r),c=this.parseSkeletons(t.skeletons,l);return this.bindSkeletons(l,c),l})}parseShapes(t){let r={};if(t!==void 0)for(let n=0,i=t.length;n<i;n++){let o=new Kc().fromJSON(t[n]);r[o.uuid]=o}return r}parseSkeletons(t,r){let n={},i={};if(r.traverse(function(o){o.isBone&&(i[o.uuid]=o)}),t!==void 0)for(let o=0,a=t.length;o<a;o++){let s=new lM().fromJSON(t[o],i);n[s.uuid]=s}return n}parseGeometries(t,r){let n={};if(t!==void 0){let i=new RU;for(let o=0,a=t.length;o<a;o++){let s,l=t[o];switch(l.type){case"BufferGeometry":case"InstancedBufferGeometry":s=i.parse(l);break;case"Geometry":console.error("THREE.ObjectLoader: The legacy Geometry type is no longer supported.");break;default:l.type in vhe?s=vhe[l.type].fromJSON(l,r):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${l.type}"`)}s.uuid=l.uuid,l.name!==void 0&&(s.name=l.name),s.isBufferGeometry===!0&&l.userData!==void 0&&(s.userData=l.userData),n[l.uuid]=s}}return n}parseMaterials(t,r){let n={},i={};if(t!==void 0){let o=new kU;o.setTextures(r);for(let a=0,s=t.length;a<s;a++){let l=t[a];if(l.type==="MultiMaterial"){let c=[];for(let u=0;u<l.materials.length;u++){let h=l.materials[u];n[h.uuid]===void 0&&(n[h.uuid]=o.parse(h)),c.push(n[h.uuid])}i[l.uuid]=c}else n[l.uuid]===void 0&&(n[l.uuid]=o.parse(l)),i[l.uuid]=n[l.uuid]}}return i}parseAnimations(t){let r={};if(t!==void 0)for(let n=0;n<t.length;n++){let i=t[n],o=Q1.parse(i);r[o.uuid]=o}return r}parseImages(t,r){let n=this,i={},o;function a(l){return n.manager.itemStart(l),o.load(l,function(){n.manager.itemEnd(l)},void 0,function(){n.manager.itemError(l),n.manager.itemEnd(l)})}function s(l){if(typeof l=="string"){let c=l,u=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(c)?c:n.resourcePath+c;return a(u)}else return l.data?{data:B3(l.type,l.data),width:l.width,height:l.height}:null}if(t!==void 0&&t.length>0){let l=new E6(r);o=new ex(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,u=t.length;c<u;c++){let h=t[c],f=h.url;if(Array.isArray(f)){i[h.uuid]=[];for(let p=0,d=f.length;p<d;p++){let g=f[p],_=s(g);_!==null&&(_ instanceof HTMLImageElement?i[h.uuid].push(_):i[h.uuid].push(new Jd(_.data,_.width,_.height)))}}else{let p=s(h.url);p!==null&&(i[h.uuid]=p)}}}return i}parseImagesAsync(t){return Ri(this,null,function*(){let r=this,n={},i;function o(a){return Ri(this,null,function*(){if(typeof a=="string"){let s=a,l=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(s)?s:r.resourcePath+s;return yield i.loadAsync(l)}else return a.data?{data:B3(a.type,a.data),width:a.width,height:a.height}:null})}if(t!==void 0&&t.length>0){i=new ex(this.manager),i.setCrossOrigin(this.crossOrigin);for(let a=0,s=t.length;a<s;a++){let l=t[a],c=l.url;if(Array.isArray(c)){n[l.uuid]=[];for(let u=0,h=c.length;u<h;u++){let f=c[u],p=yield o(f);p!==null&&(p instanceof HTMLImageElement?n[l.uuid].push(p):n[l.uuid].push(new Jd(p.data,p.width,p.height)))}}else{let u=yield o(l.url);u!==null&&(n[l.uuid]=u)}}}return n})}parseTextures(t,r){function n(o,a){return typeof o=="number"?o:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",o),a[o])}let i={};if(t!==void 0)for(let o=0,a=t.length;o<a;o++){let s=t[o];s.image===void 0&&console.warn('THREE.ObjectLoader: No "image" specified for',s.uuid),r[s.image]===void 0&&console.warn("THREE.ObjectLoader: Undefined image",s.image);let l,c=r[s.image];Array.isArray(c)?(l=new H0(c),c.length===6&&(l.needsUpdate=!0)):(c&&c.data?l=new Jd(c.data,c.width,c.height):l=new vi(c),c&&(l.needsUpdate=!0)),l.uuid=s.uuid,s.name!==void 0&&(l.name=s.name),s.mapping!==void 0&&(l.mapping=n(s.mapping,p0r)),s.offset!==void 0&&l.offset.fromArray(s.offset),s.repeat!==void 0&&l.repeat.fromArray(s.repeat),s.center!==void 0&&l.center.fromArray(s.center),s.rotation!==void 0&&(l.rotation=s.rotation),s.wrap!==void 0&&(l.wrapS=n(s.wrap[0],Mhe),l.wrapT=n(s.wrap[1],Mhe)),s.format!==void 0&&(l.format=s.format),s.type!==void 0&&(l.type=s.type),s.encoding!==void 0&&(l.encoding=s.encoding),s.minFilter!==void 0&&(l.minFilter=n(s.minFilter,Ehe)),s.magFilter!==void 0&&(l.magFilter=n(s.magFilter,Ehe)),s.anisotropy!==void 0&&(l.anisotropy=s.anisotropy),s.flipY!==void 0&&(l.flipY=s.flipY),s.premultiplyAlpha!==void 0&&(l.premultiplyAlpha=s.premultiplyAlpha),s.unpackAlignment!==void 0&&(l.unpackAlignment=s.unpackAlignment),s.userData!==void 0&&(l.userData=s.userData),i[s.uuid]=l}return i}parseObject(t,r,n,i,o){let a;function s(f){return r[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined geometry",f),r[f]}function l(f){if(f!==void 0){if(Array.isArray(f)){let p=[];for(let d=0,g=f.length;d<g;d++){let _=f[d];n[_]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",_),p.push(n[_])}return p}return n[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined material",f),n[f]}}function c(f){return i[f]===void 0&&console.warn("THREE.ObjectLoader: Undefined texture",f),i[f]}let u,h;switch(t.type){case"Scene":a=new q0,t.background!==void 0&&(Number.isInteger(t.background)?a.background=new ne(t.background):a.background=c(t.background)),t.environment!==void 0&&(a.environment=c(t.environment)),t.fog!==void 0&&(t.fog.type==="Fog"?a.fog=new z1(t.fog.color,t.fog.near,t.fog.far):t.fog.type==="FogExp2"&&(a.fog=new O1(t.fog.color,t.fog.density)));break;case"PerspectiveCamera":a=new Ui(t.fov,t.aspect,t.near,t.far),t.focus!==void 0&&(a.focus=t.focus),t.zoom!==void 0&&(a.zoom=t.zoom),t.filmGauge!==void 0&&(a.filmGauge=t.filmGauge),t.filmOffset!==void 0&&(a.filmOffset=t.filmOffset),t.view!==void 0&&(a.view=Object.assign({},t.view));break;case"OrthographicCamera":a=new D1(t.left,t.right,t.top,t.bottom,t.near,t.far),t.zoom!==void 0&&(a.zoom=t.zoom),t.view!==void 0&&(a.view=Object.assign({},t.view));break;case"AmbientLight":a=new L6(t.color,t.intensity);break;case"DirectionalLight":a=new I6(t.color,t.intensity);break;case"PointLight":a=new P6(t.color,t.intensity,t.distance,t.decay);break;case"RectAreaLight":a=new k6(t.color,t.intensity,t.width,t.height);break;case"SpotLight":a=new A6(t.color,t.intensity,t.distance,t.angle,t.penumbra,t.decay);break;case"HemisphereLight":a=new T6(t.color,t.groundColor,t.intensity);break;case"LightProbe":a=new rx().fromJSON(t);break;case"SkinnedMesh":u=s(t.geometry),h=l(t.material),a=new aM(u,h),t.bindMode!==void 0&&(a.bindMode=t.bindMode),t.bindMatrix!==void 0&&a.bindMatrix.fromArray(t.bindMatrix),t.skeleton!==void 0&&(a.skeleton=t.skeleton);break;case"Mesh":u=s(t.geometry),h=l(t.material),a=new ti(u,h);break;case"InstancedMesh":u=s(t.geometry),h=l(t.material);let f=t.count,p=t.instanceMatrix,d=t.instanceColor;a=new i6(u,h,f),a.instanceMatrix=new rm(new Float32Array(p.array),16),d!==void 0&&(a.instanceColor=new rm(new Float32Array(d.array),d.itemSize));break;case"LOD":a=new _U;break;case"Line":a=new ch(s(t.geometry),l(t.material));break;case"LineLoop":a=new o6(s(t.geometry),l(t.material));break;case"LineSegments":a=new Aa(s(t.geometry),l(t.material));break;case"PointCloud":case"Points":a=new im(s(t.geometry),l(t.material));break;case"Sprite":a=new oM(l(t.material));break;case"Group":a=new Xd;break;case"Bone":a=new sM;break;default:a=new or}if(a.uuid=t.uuid,t.name!==void 0&&(a.name=t.name),t.matrix!==void 0?(a.matrix.fromArray(t.matrix),t.matrixAutoUpdate!==void 0&&(a.matrixAutoUpdate=t.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(t.position!==void 0&&a.position.fromArray(t.position),t.rotation!==void 0&&a.rotation.fromArray(t.rotation),t.quaternion!==void 0&&a.quaternion.fromArray(t.quaternion),t.scale!==void 0&&a.scale.fromArray(t.scale)),t.castShadow!==void 0&&(a.castShadow=t.castShadow),t.receiveShadow!==void 0&&(a.receiveShadow=t.receiveShadow),t.shadow&&(t.shadow.bias!==void 0&&(a.shadow.bias=t.shadow.bias),t.shadow.normalBias!==void 0&&(a.shadow.normalBias=t.shadow.normalBias),t.shadow.radius!==void 0&&(a.shadow.radius=t.shadow.radius),t.shadow.mapSize!==void 0&&a.shadow.mapSize.fromArray(t.shadow.mapSize),t.shadow.camera!==void 0&&(a.shadow.camera=this.parseObject(t.shadow.camera))),t.visible!==void 0&&(a.visible=t.visible),t.frustumCulled!==void 0&&(a.frustumCulled=t.frustumCulled),t.renderOrder!==void 0&&(a.renderOrder=t.renderOrder),t.userData!==void 0&&(a.userData=t.userData),t.layers!==void 0&&(a.layers.mask=t.layers),t.children!==void 0){let f=t.children;for(let p=0;p<f.length;p++)a.add(this.parseObject(f[p],r,n,i,o))}if(t.animations!==void 0){let f=t.animations;for(let p=0;p<f.length;p++){let d=f[p];a.animations.push(o[d])}}if(t.type==="LOD"){t.autoUpdate!==void 0&&(a.autoUpdate=t.autoUpdate);let f=t.levels;for(let p=0;p<f.length;p++){let d=f[p],g=a.getObjectByProperty("uuid",d.object);g!==void 0&&a.addLevel(g,d.distance)}}return a}bindSkeletons(t,r){Object.keys(r).length!==0&&t.traverse(function(n){if(n.isSkinnedMesh===!0&&n.skeleton!==void 0){let i=r[n.skeleton];i===void 0?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",n.skeleton):n.bind(i,n.bindMatrix)}})}setTexturePath(t){return console.warn("THREE.ObjectLoader: .setTexturePath() has been renamed to .setResourcePath()."),this.setResourcePath(t)}},p0r={UVMapping:XU,CubeReflectionMapping:nx,CubeRefractionMapping:ix,EquirectangularReflectionMapping:YP,EquirectangularRefractionMapping:jP,CubeUVReflectionMapping:xM,CubeUVRefractionMapping:z6},Mhe={RepeatWrapping:XP,ClampToEdgeWrapping:Jo,MirroredRepeatWrapping:$P},Ehe={NearestFilter:Li,NearestMipmapNearestFilter:oU,NearestMipmapLinearFilter:aU,LinearFilter:ii,LinearMipmapNearestFilter:Lht,LinearMipmapLinearFilter:ox},NU=class extends ea{constructor(t){super(t),typeof createImageBitmap=="undefined"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,r,n,i){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,a=tx.get(t);if(a!==void 0)return o.manager.itemStart(t),setTimeout(function(){r&&r(a),o.manager.itemEnd(t)},0),a;let s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader,fetch(t,s).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){tx.add(t,l),r&&r(l),o.manager.itemEnd(t)}).catch(function(l){i&&i(l),o.manager.itemError(t),o.manager.itemEnd(t)}),o.manager.itemStart(t)}};NU.prototype.isImageBitmapLoader=!0;var WV,zht={getContext:function(){return WV===void 0&&(WV=new(window.AudioContext||window.webkitAudioContext)),WV},setContext:function(e){WV=e}},DU=class extends ea{constructor(t){super(t)}load(t,r,n,i){let o=this,a=new Jc(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(t,function(s){try{let l=s.slice(0);zht.getContext().decodeAudioData(l,function(u){r(u)})}catch(l){i?i(l):console.error(l),o.manager.itemError(t)}},n,i)}},OU=class extends rx{constructor(t,r,n=1){super(void 0,n);let i=new ne().set(t),o=new ne().set(r),a=new j(i.r,i.g,i.b),s=new j(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(s).multiplyScalar(l),this.sh.coefficients[1].copy(a).sub(s).multiplyScalar(c)}};OU.prototype.isHemisphereLightProbe=!0;var zU=class extends rx{constructor(t,r=1){super(void 0,r);let n=new ne().set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};zU.prototype.isAmbientLightProbe=!0;var The=new Me,Che=new Me,y1=new Me,lht=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ui,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ui,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){let r=this._cache;if(r.focus!==t.focus||r.fov!==t.fov||r.aspect!==t.aspect*this.aspect||r.near!==t.near||r.far!==t.far||r.zoom!==t.zoom||r.eyeSep!==this.eyeSep){r.focus=t.focus,r.fov=t.fov,r.aspect=t.aspect*this.aspect,r.near=t.near,r.far=t.far,r.zoom=t.zoom,r.eyeSep=this.eyeSep,y1.copy(t.projectionMatrix);let i=r.eyeSep/2,o=i*r.near/r.focus,a=r.near*Math.tan(P1*r.fov*.5)/r.zoom,s,l;Che.elements[12]=-i,The.elements[12]=i,s=-a*r.aspect+o,l=a*r.aspect+o,y1.elements[0]=2*r.near/(l-s),y1.elements[8]=(l+s)/(l-s),this.cameraL.projectionMatrix.copy(y1),s=-a*r.aspect-o,l=a*r.aspect-o,y1.elements[0]=2*r.near/(l-s),y1.elements[8]=(l+s)/(l-s),this.cameraR.projectionMatrix.copy(y1)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(Che),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(The)}},mM=class{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Ahe(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let r=Ahe();t=(r-this.oldTime)/1e3,this.oldTime=r,this.elapsedTime+=t}return t}};function Ahe(){return(typeof performance=="undefined"?Date:performance).now()}var v1=new j,Phe=new yi,d0r=new j,x1=new j,cht=class extends or{constructor(){super(),this.type="AudioListener",this.context=zht.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new mM}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);let r=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(v1,Phe,d0r),x1.set(0,0,-1).applyQuaternion(Phe),r.positionX){let i=this.context.currentTime+this.timeDelta;r.positionX.linearRampToValueAtTime(v1.x,i),r.positionY.linearRampToValueAtTime(v1.y,i),r.positionZ.linearRampToValueAtTime(v1.z,i),r.forwardX.linearRampToValueAtTime(x1.x,i),r.forwardY.linearRampToValueAtTime(x1.y,i),r.forwardZ.linearRampToValueAtTime(x1.z,i),r.upX.linearRampToValueAtTime(n.x,i),r.upY.linearRampToValueAtTime(n.y,i),r.upZ.linearRampToValueAtTime(n.z,i)}else r.setPosition(v1.x,v1.y,v1.z),r.setOrientation(x1.x,x1.y,x1.z,n.x,n.y,n.z)}},D6=class extends or{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;let r=this.context.createBufferSource();return r.buffer=this.buffer,r.loop=this.loop,r.loopStart=this.loopStart,r.loopEnd=this.loopEnd,r.onended=this.onEnded.bind(this),r.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=r,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,r=this.filters.length;t<r;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,r=this.filters.length;t<r;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),this._connected===!0?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,this.source.detune!==void 0)return this.isPlaying===!0&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.playbackRate=t,this.isPlaying===!0&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return this.hasPlaybackControl===!1?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.loop=t,this.isPlaying===!0&&(this.source.loop=this.loop),this}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}},b1=new j,Ihe=new yi,m0r=new j,w1=new j,uht=class extends D6{constructor(t){super(t),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(t){return this.panner.refDistance=t,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(t){return this.panner.rolloffFactor=t,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(t){return this.panner.distanceModel=t,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(t){return this.panner.maxDistance=t,this}setDirectionalCone(t,r,n){return this.panner.coneInnerAngle=t,this.panner.coneOuterAngle=r,this.panner.coneOuterGain=n,this}updateMatrixWorld(t){if(super.updateMatrixWorld(t),this.hasPlaybackControl===!0&&this.isPlaying===!1)return;this.matrixWorld.decompose(b1,Ihe,m0r),w1.set(0,0,1).applyQuaternion(Ihe);let r=this.panner;if(r.positionX){let n=this.context.currentTime+this.listener.timeDelta;r.positionX.linearRampToValueAtTime(b1.x,n),r.positionY.linearRampToValueAtTime(b1.y,n),r.positionZ.linearRampToValueAtTime(b1.z,n),r.orientationX.linearRampToValueAtTime(w1.x,n),r.orientationY.linearRampToValueAtTime(w1.y,n),r.orientationZ.linearRampToValueAtTime(w1.z,n)}else r.setPosition(b1.x,b1.y,b1.z),r.setOrientation(w1.x,w1.y,w1.z)}},FU=class{constructor(t,r=2048){this.analyser=t.context.createAnalyser(),this.analyser.fftSize=r,this.data=new Uint8Array(this.analyser.frequencyBinCount),t.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let t=0,r=this.getFrequencyData();for(let n=0;n<r.length;n++)t+=r[n];return t/r.length}},BU=class{constructor(t,r,n){this.binding=t,this.valueSize=n;let i,o,a;switch(r){case"quaternion":i=this._slerp,o=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(n*6),this._workIndex=5;break;case"string":case"bool":i=this._select,o=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(n*5);break;default:i=this._lerp,o=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(n*5)}this._mixBufferRegion=i,this._mixBufferRegionAdditive=o,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,r){let n=this.buffer,i=this.valueSize,o=t*i+i,a=this.cumulativeWeight;if(a===0){for(let s=0;s!==i;++s)n[o+s]=n[s];a=r}else{a+=r;let s=r/a;this._mixBufferRegion(n,o,0,s,i)}this.cumulativeWeight=a}accumulateAdditive(t){let r=this.buffer,n=this.valueSize,i=n*this._addIndex;this.cumulativeWeightAdditive===0&&this._setIdentity(),this._mixBufferRegionAdditive(r,i,0,t,n),this.cumulativeWeightAdditive+=t}apply(t){let r=this.valueSize,n=this.buffer,i=t*r+r,o=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1){let l=r*this._origIndex;this._mixBufferRegion(n,i,l,1-o,r)}a>0&&this._mixBufferRegionAdditive(n,i,this._addIndex*r,1,r);for(let l=r,c=r+r;l!==c;++l)if(n[l]!==n[l+r]){s.setValue(n,i);break}}saveOriginalState(){let t=this.binding,r=this.buffer,n=this.valueSize,i=n*this._origIndex;t.getValue(r,i);for(let o=n,a=i;o!==a;++o)r[o]=r[i+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,r=t+this.valueSize;for(let n=t;n<r;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let t=this._origIndex*this.valueSize,r=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[r+n]=this.buffer[t+n]}_select(t,r,n,i,o){if(i>=.5)for(let a=0;a!==o;++a)t[r+a]=t[n+a]}_slerp(t,r,n,i){yi.slerpFlat(t,r,t,r,t,n,i)}_slerpAdditive(t,r,n,i,o){let a=this._workIndex*o;yi.multiplyQuaternionsFlat(t,a,t,r,t,n),yi.slerpFlat(t,r,t,r,t,a,i)}_lerp(t,r,n,i,o){let a=1-i;for(let s=0;s!==o;++s){let l=r+s;t[l]=t[l]*a+t[n+s]*i}}_lerpAdditive(t,r,n,i,o){for(let a=0;a!==o;++a){let s=r+a;t[s]=t[s]+t[n+a]*i}}},Fht="\\[\\]\\.:\\/",g0r=new RegExp("["+Fht+"]","g"),Bht="[^"+Fht+"]",_0r="[^"+Fht.replace("\\.","")+"]",y0r=/((?:WC+[\/:])*)/.source.replace("WC",Bht),v0r=/(WCOD+)?/.source.replace("WCOD",_0r),x0r=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Bht),b0r=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Bht),w0r=new RegExp("^"+y0r+v0r+x0r+b0r+"$"),S0r=["material","materials","bones"],hht=class{constructor(t,r,n){let i=n||Cr.parseTrackName(r);this._targetGroup=t,this._bindings=t.subscribe_(r,i)}getValue(t,r){this.bind();let n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(t,r)}setValue(t,r){let n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,o=n.length;i!==o;++i)n[i].setValue(t,r)}bind(){let t=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=t.length;r!==n;++r)t[r].bind()}unbind(){let t=this._bindings;for(let r=this._targetGroup.nCachedObjects_,n=t.length;r!==n;++r)t[r].unbind()}},Cr=class{constructor(t,r,n){this.path=r,this.parsedPath=n||Cr.parseTrackName(r),this.node=Cr.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,r,n){return t&&t.isAnimationObjectGroup?new Cr.Composite(t,r,n):new Cr(t,r,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(g0r,"")}static parseTrackName(t){let r=w0r.exec(t);if(!r)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let n={nodeName:r[2],objectName:r[3],objectIndex:r[4],propertyName:r[5],propertyIndex:r[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){let o=n.nodeName.substring(i+1);S0r.indexOf(o)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=o)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,r){if(!r||r===""||r==="."||r===-1||r===t.name||r===t.uuid)return t;if(t.skeleton){let n=t.skeleton.getBoneByName(r);if(n!==void 0)return n}if(t.children){let n=function(o){for(let a=0;a<o.length;a++){let s=o[a];if(s.name===r||s.uuid===r)return s;let l=n(s.children);if(l)return l}return null},i=n(t.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,r){t[r]=this.targetObject[this.propertyName]}_getValue_array(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)t[r++]=n[i]}_getValue_arrayElement(t,r){t[r]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,r){this.resolvedProperty.toArray(t,r)}_setValue_direct(t,r){this.targetObject[this.propertyName]=t[r]}_setValue_direct_setNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,r){this.targetObject[this.propertyName]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++]}_setValue_array_setNeedsUpdate(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,r){let n=this.resolvedProperty;for(let i=0,o=n.length;i!==o;++i)n[i]=t[r++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,r){this.resolvedProperty[this.propertyIndex]=t[r]}_setValue_arrayElement_setNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty[this.propertyIndex]=t[r],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,r){this.resolvedProperty.fromArray(t,r)}_setValue_fromArray_setNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,r){this.resolvedProperty.fromArray(t,r),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,r){this.bind(),this.getValue(t,r)}_setValue_unbound(t,r){this.bind(),this.setValue(t,r)}bind(){let t=this.node,r=this.parsedPath,n=r.objectName,i=r.propertyName,o=r.propertyIndex;if(t||(t=Cr.findNode(this.rootNode,r.nodeName)||this.rootNode,this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t){console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");return}if(n){let c=r.objectIndex;switch(n){case"materials":if(!t.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!t.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}t=t.material.materials;break;case"bones":if(!t.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}t=t.skeleton.bones;for(let u=0;u<t.length;u++)if(t[u].name===c){c=u;break}break;default:if(t[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}t=t[n]}if(c!==void 0){if(t[c]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);return}t=t[c]}}let a=t[i];if(a===void 0){let c=r.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+c+"."+i+" but it wasn't found.",t);return}let s=this.Versioning.None;this.targetObject=t,t.needsUpdate!==void 0?s=this.Versioning.NeedsUpdate:t.matrixWorldNeedsUpdate!==void 0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(o!==void 0){if(i==="morphTargetInfluences"){if(!t.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(t.geometry.isBufferGeometry){if(!t.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}t.morphTargetDictionary[o]!==void 0&&(o=t.morphTargetDictionary[o])}else{console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);return}}l=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=o}else a.fromArray!==void 0&&a.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(l=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}};Cr.Composite=hht;Cr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};Cr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};Cr.prototype.GetterByBindingType=[Cr.prototype._getValue_direct,Cr.prototype._getValue_array,Cr.prototype._getValue_arrayElement,Cr.prototype._getValue_toArray];Cr.prototype.SetterByBindingTypeAndVersioning=[[Cr.prototype._setValue_direct,Cr.prototype._setValue_direct_setNeedsUpdate,Cr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_array,Cr.prototype._setValue_array_setNeedsUpdate,Cr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_arrayElement,Cr.prototype._setValue_arrayElement_setNeedsUpdate,Cr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Cr.prototype._setValue_fromArray,Cr.prototype._setValue_fromArray_setNeedsUpdate,Cr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];var HU=class{constructor(){this.uuid=Nl(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;let t={};this._indicesByUUID=t;for(let n=0,i=arguments.length;n!==i;++n)t[arguments[n].uuid]=n;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};let r=this;this.stats={objects:{get total(){return r._objects.length},get inUse(){return this.total-r.nCachedObjects_}},get bindingsPerObject(){return r._bindings.length}}}add(){let t=this._objects,r=this._indicesByUUID,n=this._paths,i=this._parsedPaths,o=this._bindings,a=o.length,s,l=t.length,c=this.nCachedObjects_;for(let u=0,h=arguments.length;u!==h;++u){let f=arguments[u],p=f.uuid,d=r[p];if(d===void 0){d=l++,r[p]=d,t.push(f);for(let g=0,_=a;g!==_;++g)o[g].push(new Cr(f,n[g],i[g]))}else if(d<c){s=t[d];let g=--c,_=t[g];r[_.uuid]=d,t[d]=_,r[p]=g,t[g]=f;for(let y=0,x=a;y!==x;++y){let b=o[y],S=b[g],C=b[d];b[d]=S,C===void 0&&(C=new Cr(f,n[y],i[y])),b[g]=C}}else t[d]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=c}remove(){let t=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length,o=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){let l=arguments[a],c=l.uuid,u=r[c];if(u!==void 0&&u>=o){let h=o++,f=t[h];r[f.uuid]=u,t[u]=f,r[c]=h,t[h]=l;for(let p=0,d=i;p!==d;++p){let g=n[p],_=g[h],y=g[u];g[u]=_,g[h]=y}}}this.nCachedObjects_=o}uncache(){let t=this._objects,r=this._indicesByUUID,n=this._bindings,i=n.length,o=this.nCachedObjects_,a=t.length;for(let s=0,l=arguments.length;s!==l;++s){let c=arguments[s],u=c.uuid,h=r[u];if(h!==void 0)if(delete r[u],h<o){let f=--o,p=t[f],d=--a,g=t[d];r[p.uuid]=h,t[h]=p,r[g.uuid]=f,t[f]=g,t.pop();for(let _=0,y=i;_!==y;++_){let x=n[_],b=x[f],S=x[d];x[h]=b,x[f]=S,x.pop()}}else{let f=--a,p=t[f];f>0&&(r[p.uuid]=h),t[h]=p,t.pop();for(let d=0,g=i;d!==g;++d){let _=n[d];_[h]=_[f],_.pop()}}}this.nCachedObjects_=o}subscribe_(t,r){let n=this._bindingsIndicesByPath,i=n[t],o=this._bindings;if(i!==void 0)return o[i];let a=this._paths,s=this._parsedPaths,l=this._objects,c=l.length,u=this.nCachedObjects_,h=new Array(c);i=o.length,n[t]=i,a.push(t),s.push(r),o.push(h);for(let f=u,p=l.length;f!==p;++f){let d=l[f];h[f]=new Cr(d,t,r)}return h}unsubscribe_(t){let r=this._bindingsIndicesByPath,n=r[t];if(n!==void 0){let i=this._paths,o=this._parsedPaths,a=this._bindings,s=a.length-1,l=a[s],c=t[s];r[c]=n,a[n]=l,a.pop(),o[n]=o[s],o.pop(),i[n]=i[s],i.pop()}}};HU.prototype.isAnimationObjectGroup=!0;var fht=class{constructor(t,r,n=null,i=r.blendMode){this._mixer=t,this._clip=r,this._localRoot=n,this.blendMode=i;let o=r.tracks,a=o.length,s=new Array(a),l={endingStart:E1,endingEnd:E1};for(let c=0;c!==a;++c){let u=o[c].createInterpolant(null);s[c]=u,u.settings=l}this._interpolantSettings=l,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=Ife,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,r){return this.loop=t,this.repetitions=r,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,r,n){if(t.fadeOut(r),this.fadeIn(r),n){let i=this._clip.duration,o=t._clip.duration,a=o/i,s=i/o;t.warp(1,a,r),this.warp(s,1,r)}return this}crossFadeTo(t,r,n){return t.crossFadeFrom(this,r,n)}stopFading(){let t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,r,n){let i=this._mixer,o=i.time,a=this.timeScale,s=this._timeScaleInterpolant;s===null&&(s=i._lendControlInterpolant(),this._timeScaleInterpolant=s);let l=s.parameterPositions,c=s.sampleValues;return l[0]=o,l[1]=o+n,c[0]=t/a,c[1]=r/a,this}stopWarping(){let t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,r,n,i){if(!this.enabled){this._updateWeight(t);return}let o=this._startTime;if(o!==null){let l=(t-o)*n;if(l<0||n===0)return;this._startTime=null,r=n*l}r*=this._updateTimeScale(t);let a=this._updateTime(r),s=this._updateWeight(t);if(s>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case kht:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulateAdditive(s);break;case $U:default:for(let u=0,h=l.length;u!==h;++u)l[u].evaluate(a),c[u].accumulate(i,s)}}}_updateWeight(t){let r=0;if(this.enabled){r=this.weight;let n=this._weightInterpolant;if(n!==null){let i=n.evaluate(t)[0];r*=i,t>n.parameterPositions[1]&&(this.stopFading(),i===0&&(this.enabled=!1))}}return this._effectiveWeight=r,r}_updateTimeScale(t){let r=0;if(!this.paused){r=this.timeScale;let n=this._timeScaleInterpolant;n!==null&&(r*=n.evaluate(t)[0],t>n.parameterPositions[1]&&(this.stopWarping(),r===0?this.paused=!0:this.timeScale=r))}return this._effectiveTimeScale=r,r}_updateTime(t){let r=this._clip.duration,n=this.loop,i=this.time+t,o=this._loopCount,a=n===Lfe;if(t===0)return o===-1?i:a&&(o&1)===1?r-i:i;if(n===Pfe){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));t:{if(i>=r)i=r;else if(i<0)i=0;else{this.time=i;break t}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(o===-1&&(t>=0?(o=0,this._setEndings(!0,this.repetitions===0,a)):this._setEndings(this.repetitions===0,!0,a)),i>=r||i<0){let s=Math.floor(i/r);i-=r*s,o+=Math.abs(s);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,i=t>0?r:0,this.time=i,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(l===1){let c=t<0;this._setEndings(c,!c,a)}else this._setEndings(!1,!1,a);this._loopCount=o,this.time=i,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:s})}}else this.time=i;if(a&&(o&1)===1)return r-i}return i}_setEndings(t,r,n){let i=this._interpolantSettings;n?(i.endingStart=T1,i.endingEnd=T1):(t?i.endingStart=this.zeroSlopeAtStart?T1:E1:i.endingStart=JP,r?i.endingEnd=this.zeroSlopeAtEnd?T1:E1:i.endingEnd=JP)}_scheduleFading(t,r,n){let i=this._mixer,o=i.time,a=this._weightInterpolant;a===null&&(a=i._lendControlInterpolant(),this._weightInterpolant=a);let s=a.parameterPositions,l=a.sampleValues;return s[0]=o,l[0]=r,s[1]=o+t,l[1]=n,this}},VU=class extends Us{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,r){let n=t._localRoot||this._root,i=t._clip.tracks,o=i.length,a=t._propertyBindings,s=t._interpolants,l=n.uuid,c=this._bindingsByRootAndName,u=c[l];u===void 0&&(u={},c[l]=u);for(let h=0;h!==o;++h){let f=i[h],p=f.name,d=u[p];if(d!==void 0)++d.referenceCount,a[h]=d;else{if(d=a[h],d!==void 0){d._cacheIndex===null&&(++d.referenceCount,this._addInactiveBinding(d,l,p));continue}let g=r&&r._propertyBindings[h].binding.parsedPath;d=new BU(Cr.create(n,p,g),f.ValueTypeName,f.getValueSize()),++d.referenceCount,this._addInactiveBinding(d,l,p),a[h]=d}s[h].resultBuffer=d.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){let n=(t._localRoot||this._root).uuid,i=t._clip.uuid,o=this._actionsByClip[i];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,i,n)}let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let 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(t){let r=t._cacheIndex;return r!==null&&r<this._nActiveActions}_addInactiveAction(t,r,n){let i=this._actions,o=this._actionsByClip,a=o[r];if(a===void 0)a={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[r]=a;else{let s=a.knownActions;t._byClipCacheIndex=s.length,s.push(t)}t._cacheIndex=i.length,i.push(t),a.actionByRoot[n]=t}_removeInactiveAction(t){let r=this._actions,n=r[r.length-1],i=t._cacheIndex;n._cacheIndex=i,r[i]=n,r.pop(),t._cacheIndex=null;let o=t._clip.uuid,a=this._actionsByClip,s=a[o],l=s.knownActions,c=l[l.length-1],u=t._byClipCacheIndex;c._byClipCacheIndex=u,l[u]=c,l.pop(),t._byClipCacheIndex=null;let h=s.actionByRoot,f=(t._localRoot||this._root).uuid;delete h[f],l.length===0&&delete a[o],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){let r=t._propertyBindings;for(let n=0,i=r.length;n!==i;++n){let o=r[n];--o.referenceCount===0&&this._removeInactiveBinding(o)}}_lendAction(t){let r=this._actions,n=t._cacheIndex,i=this._nActiveActions++,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_takeBackAction(t){let r=this._actions,n=t._cacheIndex,i=--this._nActiveActions,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_addInactiveBinding(t,r,n){let i=this._bindingsByRootAndName,o=this._bindings,a=i[r];a===void 0&&(a={},i[r]=a),a[n]=t,t._cacheIndex=o.length,o.push(t)}_removeInactiveBinding(t){let r=this._bindings,n=t.binding,i=n.rootNode.uuid,o=n.path,a=this._bindingsByRootAndName,s=a[i],l=r[r.length-1],c=t._cacheIndex;l._cacheIndex=c,r[c]=l,r.pop(),delete s[o],Object.keys(s).length===0&&delete a[i]}_lendBinding(t){let r=this._bindings,n=t._cacheIndex,i=this._nActiveBindings++,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_takeBackBinding(t){let r=this._bindings,n=t._cacheIndex,i=--this._nActiveBindings,o=r[i];t._cacheIndex=i,r[i]=t,o._cacheIndex=n,r[n]=o}_lendControlInterpolant(){let t=this._controlInterpolants,r=this._nActiveControlInterpolants++,n=t[r];return n===void 0&&(n=new S6(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),n.__cacheIndex=r,t[r]=n),n}_takeBackControlInterpolant(t){let r=this._controlInterpolants,n=t.__cacheIndex,i=--this._nActiveControlInterpolants,o=r[i];t.__cacheIndex=i,r[i]=t,o.__cacheIndex=n,r[n]=o}clipAction(t,r,n){let i=r||this._root,o=i.uuid,a=typeof t=="string"?Q1.findByName(i,t):t,s=a!==null?a.uuid:t,l=this._actionsByClip[s],c=null;if(n===void 0&&(a!==null?n=a.blendMode:n=$U),l!==void 0){let h=l.actionByRoot[o];if(h!==void 0&&h.blendMode===n)return h;c=l.knownActions[0],a===null&&(a=c._clip)}if(a===null)return null;let u=new fht(this,a,r,n);return this._bindAction(u,c),this._addInactiveAction(u,s,o),u}existingAction(t,r){let n=r||this._root,i=n.uuid,o=typeof t=="string"?Q1.findByName(n,t):t,a=o?o.uuid:t,s=this._actionsByClip[a];return s!==void 0&&s.actionByRoot[i]||null}stopAllAction(){let t=this._actions,r=this._nActiveActions;for(let n=r-1;n>=0;--n)t[n].stop();return this}update(t){t*=this.timeScale;let r=this._actions,n=this._nActiveActions,i=this.time+=t,o=Math.sign(t),a=this._accuIndex^=1;for(let c=0;c!==n;++c)r[c]._update(i,t,o,a);let s=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)s[c].apply(a);return this}setTime(t){this.time=0;for(let r=0;r<this._actions.length;r++)this._actions[r].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){let r=this._actions,n=t.uuid,i=this._actionsByClip,o=i[n];if(o!==void 0){let a=o.knownActions;for(let s=0,l=a.length;s!==l;++s){let c=a[s];this._deactivateAction(c);let u=c._cacheIndex,h=r[r.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,h._cacheIndex=u,r[u]=h,r.pop(),this._removeInactiveBindingsForAction(c)}delete i[n]}}uncacheRoot(t){let r=t.uuid,n=this._actionsByClip;for(let a in n){let s=n[a].actionByRoot,l=s[r];l!==void 0&&(this._deactivateAction(l),this._removeInactiveAction(l))}let i=this._bindingsByRootAndName,o=i[r];if(o!==void 0)for(let a in o){let s=o[a];s.restoreOriginalState(),this._removeInactiveBinding(s)}}uncacheAction(t,r){let n=this.existingAction(t,r);n!==null&&(this._deactivateAction(n),this._removeInactiveAction(n))}};VU.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var gM=class{constructor(t){typeof t=="string"&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new gM(this.value.clone===void 0?this.value:this.value.clone())}},UU=class extends em{constructor(t,r,n=1){super(t,r),this.meshPerAttribute=n}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){let r=super.clone(t);return r.meshPerAttribute=this.meshPerAttribute,r}toJSON(t){let r=super.toJSON(t);return r.isInstancedInterleavedBuffer=!0,r.meshPerAttribute=this.meshPerAttribute,r}};UU.prototype.isInstancedInterleavedBuffer=!0;var qU=class{constructor(t,r,n,i,o){this.buffer=t,this.type=r,this.itemSize=n,this.elementSize=i,this.count=o,this.version=0}set needsUpdate(t){t===!0&&this.version++}setBuffer(t){return this.buffer=t,this}setType(t,r){return this.type=t,this.elementSize=r,this}setItemSize(t){return this.itemSize=t,this}setCount(t){return this.count=t,this}};qU.prototype.isGLBufferAttribute=!0;var pht=class{constructor(t,r,n=0,i=1/0){this.ray=new Jf(t,r),this.near=n,this.far=i,this.camera=null,this.layers=new X3,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,r){this.ray.set(t,r)}setFromCamera(t,r){r&&r.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(r.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(r).sub(this.ray.origin).normalize(),this.camera=r):r&&r.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(r.near+r.far)/(r.near-r.far)).unproject(r),this.ray.direction.set(0,0,-1).transformDirection(r.matrixWorld),this.camera=r):console.error("THREE.Raycaster: Unsupported camera type: "+r.type)}intersectObject(t,r=!0,n=[]){return dht(t,this,n,r),n.sort(Lhe),n}intersectObjects(t,r=!0,n=[]){for(let i=0,o=t.length;i<o;i++)dht(t[i],this,n,r);return n.sort(Lhe),n}};function Lhe(e,t){return e.distance-t.distance}function dht(e,t,r,n){if(e.layers.test(t.layers)&&e.raycast(t,r),n===!0){let i=e.children;for(let o=0,a=i.length;o<a;o++)dht(i[o],t,r,!0)}}var _M=class{constructor(t=1,r=0,n=0){return this.radius=t,this.phi=r,this.theta=n,this}set(t,r,n){return this.radius=t,this.phi=r,this.theta=n,this}copy(t){return this.radius=t.radius,this.phi=t.phi,this.theta=t.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,r,n){return this.radius=Math.sqrt(t*t+r*r+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(t,n),this.phi=Math.acos(Zo(r/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}},mht=class{constructor(t=1,r=0,n=0){return this.radius=t,this.theta=r,this.y=n,this}set(t,r,n){return this.radius=t,this.theta=r,this.y=n,this}copy(t){return this.radius=t.radius,this.theta=t.theta,this.y=t.y,this}setFromVector3(t){return this.setFromCartesianCoords(t.x,t.y,t.z)}setFromCartesianCoords(t,r,n){return this.radius=Math.sqrt(t*t+n*n),this.theta=Math.atan2(t,n),this.y=r,this}clone(){return new this.constructor().copy(this)}},khe=new Lt,$0=class{constructor(t=new Lt(1/0,1/0),r=new Lt(-1/0,-1/0)){this.min=t,this.max=r}set(t,r){return this.min.copy(t),this.max.copy(r),this}setFromPoints(t){this.makeEmpty();for(let r=0,n=t.length;r<n;r++)this.expandByPoint(t[r]);return this}setFromCenterAndSize(t,r){let n=khe.copy(r).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(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(t,r){return r.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,r){return r.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return khe.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};$0.prototype.isBox2=!0;var Rhe=new j,YV=new j,GU=class{constructor(t=new j,r=new j){this.start=t,this.end=r}set(t,r){return this.start.copy(t),this.end.copy(r),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,r){return this.delta(r).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,r){Rhe.subVectors(t,this.start),YV.subVectors(this.end,this.start);let n=YV.dot(YV),o=YV.dot(Rhe)/n;return r&&(o=Zo(o,0,1)),o}closestPointToPoint(t,r,n){let i=this.closestPointToPointParameter(t,r);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},Nhe=new j,ght=class extends or{constructor(t,r){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=r;let n=new Pe,i=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let a=0,s=1,l=32;a<l;a++,s++){let c=a/l*Math.PI*2,u=s/l*Math.PI*2;i.push(Math.cos(c),Math.sin(c),1,Math.cos(u),Math.sin(u),1)}n.setAttribute("position",new xe(i,3));let o=new Gi({fog:!1,toneMapped:!1});this.cone=new Aa(n,o),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateMatrixWorld();let t=this.light.distance?this.light.distance:1e3,r=t*Math.tan(this.light.angle);this.cone.scale.set(r,r,t),Nhe.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Nhe),this.color!==void 0?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}},O0=new j,jV=new Me,but=new Me,WU=class extends Aa{constructor(t){let r=ope(t),n=new Pe,i=[],o=[],a=new ne(0,0,1),s=new ne(0,1,0);for(let c=0;c<r.length;c++){let u=r[c];u.parent&&u.parent.isBone&&(i.push(0,0,0),i.push(0,0,0),o.push(a.r,a.g,a.b),o.push(s.r,s.g,s.b))}n.setAttribute("position",new xe(i,3)),n.setAttribute("color",new xe(o,3));let l=new Gi({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0});super(n,l),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=r,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){let r=this.bones,n=this.geometry,i=n.getAttribute("position");but.copy(this.root.matrixWorld).invert();for(let o=0,a=0;o<r.length;o++){let s=r[o];s.parent&&s.parent.isBone&&(jV.multiplyMatrices(but,s.matrixWorld),O0.setFromMatrixPosition(jV),i.setXYZ(a,O0.x,O0.y,O0.z),jV.multiplyMatrices(but,s.parent.matrixWorld),O0.setFromMatrixPosition(jV),i.setXYZ(a+1,O0.x,O0.y,O0.z),a+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}};function ope(e){let t=[];e&&e.isBone&&t.push(e);for(let r=0;r<e.children.length;r++)t.push.apply(t,ope(e.children[r]));return t}var _ht=class extends ti{constructor(t,r,n){let i=new j0(r,4,2),o=new sh({wireframe:!0,fog:!1,toneMapped:!1});super(i,o),this.light=t,this.light.updateMatrixWorld(),this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.color!==void 0?this.material.color.set(this.color):this.material.color.copy(this.light.color)}},M0r=new j,Dhe=new ne,Ohe=new ne,yht=class extends or{constructor(t,r,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n;let i=new W0(r);i.rotateY(Math.PI*.5),this.material=new sh({wireframe:!0,fog:!1,toneMapped:!1}),this.color===void 0&&(this.material.vertexColors=!0);let o=i.getAttribute("position"),a=new Float32Array(o.count*3);i.setAttribute("color",new Je(a,3)),this.add(new ti(i,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){let t=this.children[0];if(this.color!==void 0)this.material.color.set(this.color);else{let r=t.geometry.getAttribute("color");Dhe.copy(this.light.color),Ohe.copy(this.light.groundColor);for(let n=0,i=r.count;n<i;n++){let o=n<i/2?Dhe:Ohe;r.setXYZ(n,o.r,o.g,o.b)}r.needsUpdate=!0}t.lookAt(M0r.setFromMatrixPosition(this.light.matrixWorld).negate())}},YU=class extends Aa{constructor(t=10,r=10,n=4473924,i=8947848){n=new ne(n),i=new ne(i);let o=r/2,a=t/r,s=t/2,l=[],c=[];for(let f=0,p=0,d=-s;f<=r;f++,d+=a){l.push(-s,0,d,s,0,d),l.push(d,0,-s,d,0,s);let g=f===o?n:i;g.toArray(c,p),p+=3,g.toArray(c,p),p+=3,g.toArray(c,p),p+=3,g.toArray(c,p),p+=3}let u=new Pe;u.setAttribute("position",new xe(l,3)),u.setAttribute("color",new xe(c,3));let h=new Gi({vertexColors:!0,toneMapped:!1});super(u,h),this.type="GridHelper"}},vht=class extends Aa{constructor(t=10,r=16,n=8,i=64,o=4473924,a=8947848){o=new ne(o),a=new ne(a);let s=[],l=[];for(let h=0;h<=r;h++){let f=h/r*(Math.PI*2),p=Math.sin(f)*t,d=Math.cos(f)*t;s.push(0,0,0),s.push(p,0,d);let g=h&1?o:a;l.push(g.r,g.g,g.b),l.push(g.r,g.g,g.b)}for(let h=0;h<=n;h++){let f=h&1?o:a,p=t-t/n*h;for(let d=0;d<i;d++){let g=d/i*(Math.PI*2),_=Math.sin(g)*p,y=Math.cos(g)*p;s.push(_,0,y),l.push(f.r,f.g,f.b),g=(d+1)/i*(Math.PI*2),_=Math.sin(g)*p,y=Math.cos(g)*p,s.push(_,0,y),l.push(f.r,f.g,f.b)}}let c=new Pe;c.setAttribute("position",new xe(s,3)),c.setAttribute("color",new xe(l,3));let u=new Gi({vertexColors:!0,toneMapped:!1});super(c,u),this.type="PolarGridHelper"}},zhe=new j,XV=new j,Fhe=new j,xht=class extends or{constructor(t,r,n){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,r===void 0&&(r=1);let i=new Pe;i.setAttribute("position",new xe([-r,r,0,r,r,0,r,-r,0,-r,-r,0,-r,r,0],3));let o=new Gi({fog:!1,toneMapped:!1});this.lightPlane=new ch(i,o),this.add(this.lightPlane),i=new Pe,i.setAttribute("position",new xe([0,0,0,0,0,1],3)),this.targetLine=new ch(i,o),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){zhe.setFromMatrixPosition(this.light.matrixWorld),XV.setFromMatrixPosition(this.light.target.matrixWorld),Fhe.subVectors(XV,zhe),this.lightPlane.lookAt(XV),this.color!==void 0?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(XV),this.targetLine.scale.z=Fhe.length()}},$V=new j,_i=new R1,bht=class extends Aa{constructor(t){let r=new Pe,n=new Gi({color:16777215,vertexColors:!0,toneMapped:!1}),i=[],o=[],a={},s=new ne(16755200),l=new ne(16711680),c=new ne(43775),u=new ne(16777215),h=new ne(3355443);f("n1","n2",s),f("n2","n4",s),f("n4","n3",s),f("n3","n1",s),f("f1","f2",s),f("f2","f4",s),f("f4","f3",s),f("f3","f1",s),f("n1","f1",s),f("n2","f2",s),f("n3","f3",s),f("n4","f4",s),f("p","n1",l),f("p","n2",l),f("p","n3",l),f("p","n4",l),f("u1","u2",c),f("u2","u3",c),f("u3","u1",c),f("c","t",u),f("p","c",h),f("cn1","cn2",h),f("cn3","cn4",h),f("cf1","cf2",h),f("cf3","cf4",h);function f(d,g,_){p(d,_),p(g,_)}function p(d,g){i.push(0,0,0),o.push(g.r,g.g,g.b),a[d]===void 0&&(a[d]=[]),a[d].push(i.length/3-1)}r.setAttribute("position",new xe(i,3)),r.setAttribute("color",new xe(o,3)),super(r,n),this.type="CameraHelper",this.camera=t,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update()}update(){let t=this.geometry,r=this.pointMap,n=1,i=1;_i.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),Pi("c",r,t,_i,0,0,-1),Pi("t",r,t,_i,0,0,1),Pi("n1",r,t,_i,-n,-i,-1),Pi("n2",r,t,_i,n,-i,-1),Pi("n3",r,t,_i,-n,i,-1),Pi("n4",r,t,_i,n,i,-1),Pi("f1",r,t,_i,-n,-i,1),Pi("f2",r,t,_i,n,-i,1),Pi("f3",r,t,_i,-n,i,1),Pi("f4",r,t,_i,n,i,1),Pi("u1",r,t,_i,n*.7,i*1.1,-1),Pi("u2",r,t,_i,-n*.7,i*1.1,-1),Pi("u3",r,t,_i,0,i*2,-1),Pi("cf1",r,t,_i,-n,0,1),Pi("cf2",r,t,_i,n,0,1),Pi("cf3",r,t,_i,0,-i,1),Pi("cf4",r,t,_i,0,i,1),Pi("cn1",r,t,_i,-n,0,-1),Pi("cn2",r,t,_i,n,0,-1),Pi("cn3",r,t,_i,0,-i,-1),Pi("cn4",r,t,_i,0,i,-1),t.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}};function Pi(e,t,r,n,i,o,a){$V.set(i,o,a).unproject(n);let s=t[e];if(s!==void 0){let l=r.getAttribute("position");for(let c=0,u=s.length;c<u;c++)l.setXYZ(s[c],$V.x,$V.y,$V.z)}}var KV=new ta,yM=class extends Aa{constructor(t,r=16776960){let n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=new Float32Array(8*3),o=new Pe;o.setIndex(new Je(n,1)),o.setAttribute("position",new Je(i,3)),super(o,new Gi({color:r,toneMapped:!1})),this.object=t,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(t){if(t!==void 0&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),this.object!==void 0&&KV.setFromObject(this.object),KV.isEmpty())return;let r=KV.min,n=KV.max,i=this.geometry.attributes.position,o=i.array;o[0]=n.x,o[1]=n.y,o[2]=n.z,o[3]=r.x,o[4]=n.y,o[5]=n.z,o[6]=r.x,o[7]=r.y,o[8]=n.z,o[9]=n.x,o[10]=r.y,o[11]=n.z,o[12]=n.x,o[13]=n.y,o[14]=r.z,o[15]=r.x,o[16]=n.y,o[17]=r.z,o[18]=r.x,o[19]=r.y,o[20]=r.z,o[21]=n.x,o[22]=r.y,o[23]=r.z,i.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(t){return this.object=t,this.update(),this}copy(t){return Aa.prototype.copy.call(this,t),this.object=t.object,this}},wht=class extends Aa{constructor(t,r=16776960){let n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),i=[1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],o=new Pe;o.setIndex(new Je(n,1)),o.setAttribute("position",new xe(i,3)),super(o,new Gi({color:r,toneMapped:!1})),this.box=t,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(t){let r=this.box;r.isEmpty()||(r.getCenter(this.position),r.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(t))}},Sht=class extends ch{constructor(t,r=1,n=16776960){let i=n,o=[1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],a=new Pe;a.setAttribute("position",new xe(o,3)),a.computeBoundingSphere(),super(a,new Gi({color:i,toneMapped:!1})),this.type="PlaneHelper",this.plane=t,this.size=r;let s=[1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],l=new Pe;l.setAttribute("position",new xe(s,3)),l.computeBoundingSphere(),this.add(new ti(l,new sh({color:i,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(t){let r=-this.plane.constant;Math.abs(r)<1e-8&&(r=1e-8),this.scale.set(.5*this.size,.5*this.size,r),this.children[0].material.side=r<0?Ii:I1,this.lookAt(this.plane.normal),super.updateMatrixWorld(t)}},Bhe=new j,ZV,wut,Mht=class extends or{constructor(t=new j(0,0,1),r=new j(0,0,0),n=1,i=16776960,o=n*.2,a=o*.2){super(),this.type="ArrowHelper",ZV===void 0&&(ZV=new Pe,ZV.setAttribute("position",new xe([0,0,0,0,1,0],3)),wut=new om(0,.5,1,5,1),wut.translate(0,-.5,0)),this.position.copy(r),this.line=new ch(ZV,new Gi({color:i,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ti(wut,new sh({color:i,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(t),this.setLength(n,o,a)}setDirection(t){if(t.y>.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{Bhe.set(t.z,0,-t.x).normalize();let r=Math.acos(t.y);this.quaternion.setFromAxisAngle(Bhe,r)}}setLength(t,r=t*.2,n=r*.2){this.line.scale.set(1,Math.max(1e-4,t-r),1),this.line.updateMatrix(),this.cone.scale.set(n,r,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}},vM=class extends Aa{constructor(t=1){let r=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new Pe;i.setAttribute("position",new xe(r,3)),i.setAttribute("color",new xe(n,3));let o=new Gi({vertexColors:!0,toneMapped:!1});super(i,o),this.type="AxesHelper"}setColors(t,r,n){let i=new ne,o=this.geometry.attributes.color.array;return i.set(t),i.toArray(o,0),i.toArray(o,3),i.set(r),i.toArray(o,6),i.toArray(o,9),i.set(n),i.toArray(o,12),i.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},Eht=class{constructor(){this.type="ShapePath",this.color=new ne,this.subPaths=[],this.currentPath=null}moveTo(t,r){return this.currentPath=new q1,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,r),this}lineTo(t,r){return this.currentPath.lineTo(t,r),this}quadraticCurveTo(t,r,n,i){return this.currentPath.quadraticCurveTo(t,r,n,i),this}bezierCurveTo(t,r,n,i,o,a){return this.currentPath.bezierCurveTo(t,r,n,i,o,a),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t,r){function n(x){let b=[];for(let S=0,C=x.length;S<C;S++){let P=x[S],k=new Kc;k.curves=P.curves,b.push(k)}return b}function i(x,b){let S=b.length,C=!1;for(let P=S-1,k=0;k<S;P=k++){let O=b[P],D=b[k],B=D.x-O.x,I=D.y-O.y;if(Math.abs(I)>Number.EPSILON){if(I<0&&(O=b[k],B=-B,D=b[P],I=-I),x.y<O.y||x.y>D.y)continue;if(x.y===O.y){if(x.x===O.x)return!0}else{let L=I*(x.x-O.x)-B*(x.y-O.y);if(L===0)return!0;if(L<0)continue;C=!C}}else{if(x.y!==O.y)continue;if(D.x<=x.x&&x.x<=O.x||O.x<=x.x&&x.x<=D.x)return!0}}return C}let o=Zc.isClockWise,a=this.subPaths;if(a.length===0)return[];if(r===!0)return n(a);let s,l,c,u=[];if(a.length===1)return l=a[0],c=new Kc,c.curves=l.curves,u.push(c),u;let h=!o(a[0].getPoints());h=t?!h:h;let f=[],p=[],d=[],g=0,_;p[g]=void 0,d[g]=[];for(let x=0,b=a.length;x<b;x++)l=a[x],_=l.getPoints(),s=o(_),s=t?!s:s,s?(!h&&p[g]&&g++,p[g]={s:new Kc,p:_},p[g].s.curves=l.curves,h&&g++,d[g]=[]):d[g].push({h:l,p:_[0]});if(!p[0])return n(a);if(p.length>1){let x=!1,b=[];for(let S=0,C=p.length;S<C;S++)f[S]=[];for(let S=0,C=p.length;S<C;S++){let P=d[S];for(let k=0;k<P.length;k++){let O=P[k],D=!0;for(let B=0;B<p.length;B++)i(O.p,p[B].p)&&(S!==B&&b.push({froms:S,tos:B,hole:k}),D?(D=!1,f[B].push(O)):x=!0);D&&f[S].push(O)}}b.length>0&&(x||(d=f))}let y;for(let x=0,b=p.length;x<b;x++){c=p[x].s,u.push(c),y=d[x];for(let S=0,C=y.length;S<C;S++)c.holes.push(y[S].h)}return u}},ape=new Float32Array(1),E0r=new Int32Array(ape.buffer),Tht=class{static toHalfFloat(t){t>65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),t=65504),ape[0]=t;let r=E0r[0],n=r>>16&32768,i=r>>12&2047,o=r>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&r&8388607,n):o<113?(i|=2048,n|=(i>>114-o)+(i>>113-o&1),n):(n|=o-112<<10|i>>1,n+=i&1,n)}},T0r=0,C0r=1,A0r=0,P0r=1,I0r=2;function L0r(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function k0r(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}function R0r(e,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new im(e,t)}function N0r(e){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new oM(e)}function D0r(e,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new im(e,t)}function O0r(e){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function z0r(e){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function F0r(e){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new nm(e)}function B0r(e,t,r){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new j(e,t,r)}function H0r(e,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new Je(e,t).setUsage(Y3)}function V0r(e,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new cU(e,t)}function U0r(e,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new uU(e,t)}function q0r(e,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new hU(e,t)}function G0r(e,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new fU(e,t)}function W0r(e,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new $3(e,t)}function Y0r(e,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new pU(e,t)}function j0r(e,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new K3(e,t)}function X0r(e,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new xe(e,t)}function $0r(e,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new mU(e,t)}fs.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(fs.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e};q1.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)};function K0r(e){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new vM(e)}function Z0r(e,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new yM(e,t)}function J0r(e,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Aa(new s6(e.geometry),new Gi({color:t!==void 0?t:16777215}))}YU.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};WU.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Q0r(e,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Aa(new d6(e.geometry),new Gi({color:t!==void 0?t:16777215}))}ea.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),dM.extractUrlBase(e)};ea.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function t_r(e){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Jc(e)}function e_r(e){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new CU(e)}$0.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)};$0.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};$0.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};$0.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)};ta.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)};ta.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};ta.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};ta.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)};ta.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)};Zf.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};N1.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)};GU.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)};ki.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)};ki.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)};ki.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};ki.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)};ki.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};ki.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()};Me.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)};Me.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)};Me.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new j().setFromMatrixColumn(this,3)};Me.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)};Me.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};Me.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};Me.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)};Me.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};Me.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};Me.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};Me.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};Me.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};Me.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)};Me.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};Me.prototype.makeFrustum=function(e,t,r,n,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,n,r,i,o)};Me.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()};$c.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)};yi.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)};yi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};Jf.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)};Jf.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)};Jf.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)};oi.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};oi.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)};oi.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)};oi.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)};oi.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)};oi.barycoordFromPoint=function(e,t,r,n,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),oi.getBarycoord(e,t,r,n,i)};oi.normal=function(e,t,r,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),oi.getNormal(e,t,r,n)};Kc.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)};Kc.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new hh(this,e)};Kc.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Y0(this,e)};Lt.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};Lt.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)};Lt.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};j.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};j.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};j.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)};j.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)};j.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)};j.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)};j.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};j.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)};j.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};en.prototype.fromAttribute=function(e,t,r){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,r)};en.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};or.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)};or.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};or.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)};or.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};or.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)};Object.defineProperties(or.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});ti.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(ti.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),kfe},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});aM.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Ui.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),t!==void 0&&(this.filmGauge=t),this.setFocalLength(e)};Object.defineProperties(Ol.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}});Object.defineProperties(Je.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Y3},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Y3)}}});Je.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(e===!0?Y3:W3),this};Je.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Je.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};Pe.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)};Pe.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(t&&t.isBufferAttribute)&&!(t&&t.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Je(arguments[1],arguments[2]))):e==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t)};Pe.prototype.addDrawCall=function(e,t,r){r!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)};Pe.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};Pe.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};Pe.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)};Pe.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)};Object.defineProperties(Pe.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});em.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(e===!0?Y3:W3),this};em.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};hh.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};hh.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};hh.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};q0.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};gM.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(qi.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new ne}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===Aht}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(lh.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}});rn.prototype.clearTarget=function(e,t,r,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,r,n)};rn.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)};rn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};rn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};rn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};rn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};rn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};rn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};rn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};rn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};rn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};rn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};rn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};rn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};rn.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)};rn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};rn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};rn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};rn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};rn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};rn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};rn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};rn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};rn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};rn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(rn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=e===!0?Wn:Qd}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}});Object.defineProperties(Jfe.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function r_r(e,t,r){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Q3(e,r)}Object.defineProperties(us.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}});D6.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return new DU().load(e,function(n){t.setBuffer(n)}),this};FU.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};J3.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)};J3.prototype.clear=function(e,t,r,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,r,n)};Kf.crossOrigin=void 0;Kf.loadTexture=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let i=new AU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Kf.loadTextureCube=function(e,t,r,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let i=new TU;i.setCrossOrigin(this.crossOrigin);let o=i.load(e,r,void 0,n);return t&&(o.mapping=t),o};Kf.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};Kf.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function n_r(){console.error("THREE.CanvasRenderer has been removed")}function i_r(){console.error("THREE.JSONLoader has been removed.")}var o_r={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function a_r(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function s_r(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Pe}function l_r(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Pe}function c_r(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function u_r(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function h_r(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:jU}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=jU);var spe={type:"change"},Hht={type:"start"},lpe={type:"end"},JU=class extends Us{constructor(t,r){super(),r===void 0&&console.warn('THREE.OrbitControls: The second parameter "domElement" is now mandatory.'),r===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),this.object=t,this.domElement=r,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new j,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:K0.ROTATE,MIDDLE:K0.DOLLY,RIGHT:K0.PAN},this.touches={ONE:Z0.ROTATE,TWO:Z0.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return s.phi},this.getAzimuthalAngle=function(){return s.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(nt){nt.addEventListener("keydown",fr),this._domElementKeyEvents=nt},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(spe),n.update(),o=i.NONE},this.update=function(){let nt=new j,Ct=new yi().setFromUnitVectors(t.up,new j(0,1,0)),Wt=Ct.clone().invert(),fe=new j,at=new yi,se=2*Math.PI;return function(){let Ce=n.object.position;nt.copy(Ce).sub(n.target),nt.applyQuaternion(Ct),s.setFromVector3(nt),n.autoRotate&&o===i.NONE&&D(k()),n.enableDamping?(s.theta+=l.theta*n.dampingFactor,s.phi+=l.phi*n.dampingFactor):(s.theta+=l.theta,s.phi+=l.phi);let Pt=n.minAzimuthAngle,Nt=n.maxAzimuthAngle;return isFinite(Pt)&&isFinite(Nt)&&(Pt<-Math.PI?Pt+=se:Pt>Math.PI&&(Pt-=se),Nt<-Math.PI?Nt+=se:Nt>Math.PI&&(Nt-=se),Pt<=Nt?s.theta=Math.max(Pt,Math.min(Nt,s.theta)):s.theta=s.theta>(Pt+Nt)/2?Math.max(Pt,s.theta):Math.min(Nt,s.theta)),s.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,s.phi)),s.makeSafe(),s.radius*=c,s.radius=Math.max(n.minDistance,Math.min(n.maxDistance,s.radius)),n.enableDamping===!0?n.target.addScaledVector(u,n.dampingFactor):n.target.add(u),nt.setFromSpherical(s),nt.applyQuaternion(Wt),Ce.copy(n.target).add(nt),n.object.lookAt(n.target),n.enableDamping===!0?(l.theta*=1-n.dampingFactor,l.phi*=1-n.dampingFactor,u.multiplyScalar(1-n.dampingFactor)):(l.set(0,0,0),u.set(0,0,0)),c=1,h||fe.distanceToSquared(n.object.position)>a||8*(1-at.dot(n.object.quaternion))>a?(n.dispatchEvent(spe),fe.copy(n.object.position),at.copy(n.object.quaternion),h=!1,!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",It),n.domElement.removeEventListener("pointerdown",ht),n.domElement.removeEventListener("pointercancel",ie),n.domElement.removeEventListener("wheel",ar),n.domElement.removeEventListener("pointermove",wt),n.domElement.removeEventListener("pointerup",kt),n._domElementKeyEvents!==null&&n._domElementKeyEvents.removeEventListener("keydown",fr)};let n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},o=i.NONE,a=1e-6,s=new _M,l=new _M,c=1,u=new j,h=!1,f=new Lt,p=new Lt,d=new Lt,g=new Lt,_=new Lt,y=new Lt,x=new Lt,b=new Lt,S=new Lt,C=[],P={};function k(){return 2*Math.PI/60/60*n.autoRotateSpeed}function O(){return Math.pow(.95,n.zoomSpeed)}function D(nt){l.theta-=nt}function B(nt){l.phi-=nt}let I=function(){let nt=new j;return function(Wt,fe){nt.setFromMatrixColumn(fe,0),nt.multiplyScalar(-Wt),u.add(nt)}}(),L=function(){let nt=new j;return function(Wt,fe){n.screenSpacePanning===!0?nt.setFromMatrixColumn(fe,1):(nt.setFromMatrixColumn(fe,0),nt.crossVectors(n.object.up,nt)),nt.multiplyScalar(Wt),u.add(nt)}}(),R=function(){let nt=new j;return function(Wt,fe){let at=n.domElement;if(n.object.isPerspectiveCamera){let se=n.object.position;nt.copy(se).sub(n.target);let Qt=nt.length();Qt*=Math.tan(n.object.fov/2*Math.PI/180),I(2*Wt*Qt/at.clientHeight,n.object.matrix),L(2*fe*Qt/at.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(I(Wt*(n.object.right-n.object.left)/n.object.zoom/at.clientWidth,n.object.matrix),L(fe*(n.object.top-n.object.bottom)/n.object.zoom/at.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function F(nt){n.object.isPerspectiveCamera?c/=nt:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*nt)),n.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function z(nt){n.object.isPerspectiveCamera?c*=nt:n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/nt)),n.object.updateProjectionMatrix(),h=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function U(nt){f.set(nt.clientX,nt.clientY)}function W(nt){x.set(nt.clientX,nt.clientY)}function Z(nt){g.set(nt.clientX,nt.clientY)}function rt(nt){p.set(nt.clientX,nt.clientY),d.subVectors(p,f).multiplyScalar(n.rotateSpeed);let Ct=n.domElement;D(2*Math.PI*d.x/Ct.clientHeight),B(2*Math.PI*d.y/Ct.clientHeight),f.copy(p),n.update()}function ot(nt){b.set(nt.clientX,nt.clientY),S.subVectors(b,x),S.y>0?F(O()):S.y<0&&z(O()),x.copy(b),n.update()}function st(nt){_.set(nt.clientX,nt.clientY),y.subVectors(_,g).multiplyScalar(n.panSpeed),R(y.x,y.y),g.copy(_),n.update()}function St(nt){nt.deltaY<0?z(O()):nt.deltaY>0&&F(O()),n.update()}function bt(nt){let Ct=!1;switch(nt.code){case n.keys.UP:R(0,n.keyPanSpeed),Ct=!0;break;case n.keys.BOTTOM:R(0,-n.keyPanSpeed),Ct=!0;break;case n.keys.LEFT:R(n.keyPanSpeed,0),Ct=!0;break;case n.keys.RIGHT:R(-n.keyPanSpeed,0),Ct=!0;break}Ct&&(nt.preventDefault(),n.update())}function Mt(){if(C.length===1)f.set(C[0].pageX,C[0].pageY);else{let nt=.5*(C[0].pageX+C[1].pageX),Ct=.5*(C[0].pageY+C[1].pageY);f.set(nt,Ct)}}function lt(){if(C.length===1)g.set(C[0].pageX,C[0].pageY);else{let nt=.5*(C[0].pageX+C[1].pageX),Ct=.5*(C[0].pageY+C[1].pageY);g.set(nt,Ct)}}function Kt(){let nt=C[0].pageX-C[1].pageX,Ct=C[0].pageY-C[1].pageY,Wt=Math.sqrt(nt*nt+Ct*Ct);x.set(0,Wt)}function _t(){n.enableZoom&&Kt(),n.enablePan&&lt()}function ct(){n.enableZoom&&Kt(),n.enableRotate&&Mt()}function X(nt){if(C.length==1)p.set(nt.pageX,nt.pageY);else{let Wt=be(nt),fe=.5*(nt.pageX+Wt.x),at=.5*(nt.pageY+Wt.y);p.set(fe,at)}d.subVectors(p,f).multiplyScalar(n.rotateSpeed);let Ct=n.domElement;D(2*Math.PI*d.x/Ct.clientHeight),B(2*Math.PI*d.y/Ct.clientHeight),f.copy(p)}function et(nt){if(C.length===1)_.set(nt.pageX,nt.pageY);else{let Ct=be(nt),Wt=.5*(nt.pageX+Ct.x),fe=.5*(nt.pageY+Ct.y);_.set(Wt,fe)}y.subVectors(_,g).multiplyScalar(n.panSpeed),R(y.x,y.y),g.copy(_)}function dt(nt){let Ct=be(nt),Wt=nt.pageX-Ct.x,fe=nt.pageY-Ct.y,at=Math.sqrt(Wt*Wt+fe*fe);b.set(0,at),S.set(0,Math.pow(b.y/x.y,n.zoomSpeed)),F(S.y),x.copy(b)}function q(nt){n.enableZoom&&dt(nt),n.enablePan&&et(nt)}function pt(nt){n.enableZoom&&dt(nt),n.enableRotate&&X(nt)}function ht(nt){n.enabled!==!1&&(C.length===0&&(n.domElement.setPointerCapture(nt.pointerId),n.domElement.addEventListener("pointermove",wt),n.domElement.addEventListener("pointerup",kt)),$t(nt),nt.pointerType==="touch"?tt(nt):ee(nt))}function wt(nt){n.enabled!==!1&&(nt.pointerType==="touch"?$(nt):Le(nt))}function kt(nt){he(nt),C.length===0&&(n.domElement.releasePointerCapture(nt.pointerId),n.domElement.removeEventListener("pointermove",wt),n.domElement.removeEventListener("pointerup",kt)),n.dispatchEvent(lpe),o=i.NONE}function ie(nt){he(nt)}function ee(nt){let Ct;switch(nt.button){case 0:Ct=n.mouseButtons.LEFT;break;case 1:Ct=n.mouseButtons.MIDDLE;break;case 2:Ct=n.mouseButtons.RIGHT;break;default:Ct=-1}switch(Ct){case K0.DOLLY:if(n.enableZoom===!1)return;W(nt),o=i.DOLLY;break;case K0.ROTATE:if(nt.ctrlKey||nt.metaKey||nt.shiftKey){if(n.enablePan===!1)return;Z(nt),o=i.PAN}else{if(n.enableRotate===!1)return;U(nt),o=i.ROTATE}break;case K0.PAN:if(nt.ctrlKey||nt.metaKey||nt.shiftKey){if(n.enableRotate===!1)return;U(nt),o=i.ROTATE}else{if(n.enablePan===!1)return;Z(nt),o=i.PAN}break;default:o=i.NONE}o!==i.NONE&&n.dispatchEvent(Hht)}function Le(nt){if(n.enabled!==!1)switch(o){case i.ROTATE:if(n.enableRotate===!1)return;rt(nt);break;case i.DOLLY:if(n.enableZoom===!1)return;ot(nt);break;case i.PAN:if(n.enablePan===!1)return;st(nt);break}}function ar(nt){n.enabled===!1||n.enableZoom===!1||o!==i.NONE||(nt.preventDefault(),n.dispatchEvent(Hht),St(nt),n.dispatchEvent(lpe))}function fr(nt){n.enabled===!1||n.enablePan===!1||bt(nt)}function tt(nt){switch(Tt(nt),C.length){case 1:switch(n.touches.ONE){case Z0.ROTATE:if(n.enableRotate===!1)return;Mt(),o=i.TOUCH_ROTATE;break;case Z0.PAN:if(n.enablePan===!1)return;lt(),o=i.TOUCH_PAN;break;default:o=i.NONE}break;case 2:switch(n.touches.TWO){case Z0.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;_t(),o=i.TOUCH_DOLLY_PAN;break;case Z0.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;ct(),o=i.TOUCH_DOLLY_ROTATE;break;default:o=i.NONE}break;default:o=i.NONE}o!==i.NONE&&n.dispatchEvent(Hht)}function $(nt){switch(Tt(nt),o){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;X(nt),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;et(nt),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;q(nt),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;pt(nt),n.update();break;default:o=i.NONE}}function It(nt){n.enabled!==!1&&nt.preventDefault()}function $t(nt){C.push(nt)}function he(nt){delete P[nt.pointerId];for(let Ct=0;Ct<C.length;Ct++)if(C[Ct].pointerId==nt.pointerId){C.splice(Ct,1);return}}function Tt(nt){let Ct=P[nt.pointerId];Ct===void 0&&(Ct=new Lt,P[nt.pointerId]=Ct),Ct.set(nt.pageX,nt.pageY)}function be(nt){let Ct=nt.pointerId===C[0].pointerId?C[1]:C[0];return P[Ct.pointerId]}n.domElement.addEventListener("contextmenu",It),n.domElement.addEventListener("pointerdown",ht),n.domElement.addEventListener("pointercancel",ie),n.domElement.addEventListener("wheel",ar,{passive:!1}),this.update()}};var F6=class extends Us{constructor(t){super(),this._lastMesh=null,this._clock=new mM,this._canvasSize=null,this._layersConfig=null,this._runColor=t}_isObject(t){var r=typeof t;return r=="object"&&t!=null&&!Array.isArray(t)}_applyDefaults(t,r){let n={},i=[t,r];for(let o=0;o<i.length;o++){let a=i[o];for(let s in a){let l=s in n;this._isObject(a[s])?n[s]=this._applyDefaults(n[s]||{},a[s]):l||(n[s]=a[s])}}return n}_createLayers(){if(!(!this._layersConfig||!this._scene||!this._lastMesh)){if(this._layersConfig.showBoundingBox){var t=new yM(this._lastMesh,new ne("rgb(0, 0, 255)"));this._scene.add(t)}if(this._layersConfig.showAxes){var r=new vM(5);this._scene.add(r)}}}setLayersConfig(t){this._layersConfig=this._applyDefaults(t,this._layersConfig||{})}_createWorld(t,r){var a,s,l,c;if(this.isReady())return;this._scene=new q0;var n=new wM[t.camera.cls](t.camera.fov,((a=this._canvasSize)==null?void 0:a.width)/((s=this._canvasSize)==null?void 0:s.height),t.camera.near,t.camera.far);this._camera=n,this.initCameraPosition=void 0,t.camera.position&&(this.initCameraPosition=new j().fromArray(t.camera.position)),this.initCameraLookAt=void 0,t.camera.lookAt&&(this.initCameraLookAt=new j().fromArray(t.camera.lookAt));var i=new JU(n,r);let o=i;o.lookSpeed=.4,o.movementSpeed=20,o.noFly=!0,o.lookVertical=!0,o.constrainVertical=!0,o.verticalMin=1,o.verticalMax=2,o.addEventListener("change",this._onCameraPositionChange.bind(this)),this._cameraControls=i,this._renderer=new rn({antialias:!0}),this._renderer.setPixelRatio(window.devicePixelRatio),this._renderer.setSize((l=this._canvasSize)==null?void 0:l.width,(c=this._canvasSize)==null?void 0:c.height),this._renderer.setClearColor(16777215,1)}_clearScene(){var t;if(this._scene)for(;this._scene.children.length>0;)this._scene.remove((t=this._scene)==null?void 0:t.children[0])}getRenderer(){return this._renderer}getCameraControls(){return this._cameraControls}isReady(){return!!this._camera&&!!this._cameraControls}getCameraPosition(){var t,r,n;return{far:(t=this._camera)==null?void 0:t.far,position:(r=this._camera)==null?void 0:r.position.clone(),target:(n=this._cameraControls)==null?void 0:n.target.clone()}}setCanvasSize(t){this._canvasSize=t}draw(){var r,n,i,o;this._animationFrameIndex&&cancelAnimationFrame(this._animationFrameIndex),this._camera&&(this._camera.aspect=((r=this._canvasSize)==null?void 0:r.width)/((n=this._canvasSize)==null?void 0:n.height),this._camera.updateProjectionMatrix()),this._renderer.setSize((i=this._canvasSize)==null?void 0:i.width,(o=this._canvasSize)==null?void 0:o.height);let t=function(){var a=this._clock.getDelta();this._cameraControls.update(a),this._animationFrameIndex=requestAnimationFrame(t),this._renderer.render(this._scene,this._camera)}.bind(this);t()}updateScene(t,r){let n={};"config"in t&&t.config&&(n=JSON.parse(t.config)),this.dispatchEvent({type:"beforeUpdateScene"});let i={camera:{cls:"PerspectiveCamera",fov:75,near:.1,far:1e3},lights:[{cls:"AmbientLight",color:"#ffffff",intensity:.75},{cls:"DirectionalLight",color:"#ffffff",intensity:.75,position:[0,-1,2]}]};n=this._applyDefaults(n,i),this._createWorld(n,r),this._clearScene(),this._createLights(this._scene,n),this._createGeometry(t,n),this._createLayers(),this.draw()}resetView(t){var n,i;if(!this.isReady())return;(n=this._cameraControls)==null||n.reset();let r;!t&&this._lastMesh&&(r=this._lastMesh),r&&(this._fitObjectToViewport(r),this._lastMesh=r),(i=this._cameraControls)==null||i.update()}_createGeometry(t,r){let n=t.mesh;n.vertices&&n.faces&&n.faces.length?this._createMesh(n,r):this._createPointCloud(n,r)}_createPointCloud(t,r){var h;let n=t.vertices,i=t.colors,o={material:{cls:"PointsMaterial",size:.005}};i&&i.length==n.length?o.material.vertexColors=!0:o.material.color=this._runColor;let a=this._applyDefaults(r,o),s=new Pe,l=new Float32Array(n.flat());if(s.setAttribute("position",new Je(l,3)),i&&i.length==n.length){let f=new Float32Array(i.flat());for(let p=0;p<f.length;p++)f[p]=f[p]/255;s.setAttribute("color",new Je(f,3))}var c=new wM[a.material.cls](a.material),u=new im(s,c);(h=this._scene)==null||h.add(u),this._lastMesh=u}setCameraViewpoint(t,r,n){this._silent=!0,this._camera&&(this._camera.far=r,this._camera.position.set(t.x,t.y,t.z),this._camera.lookAt(n.clone()),this._camera.updateProjectionMatrix()),this._cameraControls&&(this._cameraControls.target=n.clone(),this._cameraControls.update()),this._silent=!1}_onCameraPositionChange(t){this._silent||this.dispatchEvent({type:"cameraPositionChange",event:t})}_fitObjectToViewport(t){var p,d,g;let n=new ta,i=new j,o=new j;n.setFromObject(t),n.getCenter(i),n.getSize(o);let a=Math.max(o.x,o.y,o.z),s=((p=this._camera)==null?void 0:p.fov)*(Math.PI/180),l=Math.abs(a/(2*Math.tan(s/2)))*1.25,c=n.min.z,u=c<0?-c+l:l-c,h=(d=this.initCameraPosition)!=null?d:new j(i.x,i.y,l),f=(g=this.initCameraLookAt)!=null?g:i;this.setCameraViewpoint(h,u*3,f)}_createMesh(t,r){var f;let n=t.vertices,i=t.faces,o=t.colors,a=this._applyDefaults(r,{material:{cls:"MeshStandardMaterial",color:"#a0a0a0",roughness:1,metalness:0}}),s=new Pe,l=new Float32Array(n.flat());s.setAttribute("position",new Je(l,3));let c=new Uint16Array(i.flat());if(o&&o.length){let p=o.flat();for(let d=0;d<p.length;d++)p[d]=p[d]/255;s.setAttribute("color",new Je(new Float32Array(p),3)),a.material=a.material||{},a.material.vertexColors=!0}s.center(),s.computeBoundingSphere(),s.setIndex(new Je(c,1)),s.computeVertexNormals();let u=new wM[a.material.cls](a.material),h=new ti(s,u);h.castShadow=!0,h.receiveShadow=!0,(f=this._scene)==null||f.add(h),this._lastMesh=h}_createLights(t,r){for(let n=0;n<r.lights.length;n++){let i=r.lights[n],o=new wM[i.cls](i.color,i.intensity);i.position&&o.position.set(i.position[0],i.position[1],i.position[2]),t.add(o)}}};var Ln=class extends Gt(mt){constructor(){super(...arguments),this.selectedView="all",this.active=!1,this._colorScaleFunction=fn,this._steps=[],this._meshViewerAttached=!1,this._cameraPositionInitialized=!1,this._isMeshLoading=!1}get _runColor(){var t=this.run;return this._colorScaleFunction(t)}connectedCallback(){super.connectedCallback(),this._dataProvider=new IP(this.requestManager);let t=new F6(this._runColor);t.addEventListener("beforeUpdateScene",this._updateCanvasSize.bind(this)),t.addEventListener("cameraPositionChange",this._onCameraPositionChange.bind(this)),this._meshViewer=t}reload(){!this.active||!this._dataProvider||(this._isMeshLoading=!0,this._dataProvider.reload(this.run,this.tag,this.sample).then(t=>{!t||(this._steps=t,this._stepIndex=t.length-1)}).catch(t=>{if(!t||!t.code||t.code!=d1.CANCELLED)throw t=t||"Response processing failed.",new Error(t)}))}_updateScene(){var r;let t=this._currentStep;!t||!t.mesh||(this._meshViewer.updateScene(t,this),this._cameraPositionInitialized||(this._meshViewer.resetView(),this._cameraPositionInitialized=!0),this._meshViewerAttached||((r=this.shadowRoot)==null||r.appendChild(this._meshViewer.getRenderer().domElement),this._meshViewerAttached=!0))}_debouncedFetchMesh(){this.debounce("fetchMesh",()=>this._maybeFetchMesh(),100)}_maybeFetchMesh(){return Ri(this,null,function*(){let t=this._currentStep;if(!(!t||t.mesh||t.meshFetching)){t.meshFetching=!0,this._isMeshLoading=!0;try{let r=yield this._dataProvider.fetchData(t,this.run,this.tag,this.sample);t.mesh=r[0],this.notifyPath("_currentStep.mesh")}catch(r){if(!r||!r.code||r.code!=d1.CANCELLED)throw r=r||"Response processing failed.",new Error(r)}finally{this._isMeshLoading=!1,t.meshFetching=!1}}})}_onCameraPositionChange(){if(!this._meshViewer.isReady())return;let t=new CustomEvent("camera-position-change",{detail:this._meshViewer.getCameraPosition()});this.dispatchEvent(t)}setCameraViewpoint(t,r,n){this._meshViewer.setCameraViewpoint(t,r,n)}_updateCanvasSize(){let t=this.offsetWidth,r=t,n=this.$$(".tf-mesh-loader-header").offsetHeight,i={width:t,height:r-n};this._meshViewer.setCanvasSize(i)}redraw(){this._updateCanvasSize(),this.isConnected&&this._meshViewer.draw()}_hasAtLeastOneStep(t){return!!t&&t.length>0}_hasMultipleSteps(t){return!!t&&t.length>1}get _currentStep(){var t=this._steps,r=this._stepIndex;return t[r]||null}get _stepValue(){let t=this._currentStep;return t?t.step:0}get _currentWallTime(){let t=this._currentStep;return t?s2(t.wall_time):""}_getMaxStepIndex(t){return t.length-1}_getSampleText(t){return String(t+1)}_hasMultipleSamples(t){return t>1}_updateView(){var t=this.selectedView;this._meshViewer&&t=="all"&&this._meshViewer.resetView()}toLocaleString_(t){return t.toLocaleString()}};Ln.template=Q`
    <tf-card-heading color="[[_runColor]]" class="tf-mesh-loader-header">
      <template is="dom-if" if="[[_hasMultipleSamples(ofSamples)]]">
        <div>sample: [[_getSampleText(sample)]] of [[ofSamples]]</div>
      </template>
      <template is="dom-if" if="[[_hasAtLeastOneStep(_steps)]]">
        <div class="heading-row">
          <div class="heading-label">
            step
            <span style="font-weight: bold"
              >[[toLocaleString_(_stepValue)]]</span
            >
          </div>
          <div class="heading-label heading-right">
            <template is="dom-if" if="[[_currentWallTime]]">
              [[_currentWallTime]]
            </template>
          </div>
          <div class="label right">
            <paper-spinner-lite active hidden$="[[!_isMeshLoading]]">
            </paper-spinner-lite>
          </div>
        </div>
      </template>
      <template is="dom-if" if="[[_hasMultipleSteps(_steps)]]">
        <div>
          <paper-slider
            id="steps"
            immediate-value="{{_stepIndex}}"
            max="[[_getMaxStepIndex(_steps)]]"
            max-markers="[[_getMaxStepIndex(_steps)]]"
            snaps
            step="1"
            value="{{_stepIndex}}"
          ></paper-slider>
        </div>
      </template>
    </tf-card-heading>
    <style>
      paper-slider {
        width: 100%;
        margin-left: 1px;
        margin-right: 1px;
      }
      .tf-mesh-loader-header {
        display: block;
        height: 105px;
      }
      [hidden] {
        display: none;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],Ln.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],Ln.prototype,"tag",void 0);E([A({type:Number}),w("design:type",Number)],Ln.prototype,"sample",void 0);E([A({type:Number}),w("design:type",Number)],Ln.prototype,"ofSamples",void 0);E([A({type:String}),w("design:type",String)],Ln.prototype,"selectedView",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ln.prototype,"active",void 0);E([A({type:Object}),w("design:type",Ae)],Ln.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",F6)],Ln.prototype,"_meshViewer",void 0);E([A({type:Object}),w("design:type",IP)],Ln.prototype,"_dataProvider",void 0);E([A({type:Object}),w("design:type",Object)],Ln.prototype,"_colorScaleFunction",void 0);E([A({type:Array,notify:!0}),w("design:type",Array)],Ln.prototype,"_steps",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],Ln.prototype,"_stepIndex",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ln.prototype,"_meshViewerAttached",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ln.prototype,"_cameraPositionInitialized",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Ln.prototype,"_isMeshLoading",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],Ln.prototype,"_runColor",null);E([Bt("run","tag","active","_dataProvider","_meshViewer"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ln.prototype,"reload",null);E([Bt("_currentStep.*","_meshViewer"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ln.prototype,"_updateScene",null);E([Bt("_currentStep"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ln.prototype,"_debouncedFetchMesh",null);E([Rt("_steps","_stepIndex"),w("design:type",Object),w("design:paramtypes",[])],Ln.prototype,"_currentStep",null);E([Rt("_currentStep"),w("design:type",Number),w("design:paramtypes",[])],Ln.prototype,"_stepValue",null);E([Rt("_currentStep"),w("design:type",String),w("design:paramtypes",[])],Ln.prototype,"_currentWallTime",null);E([Bt("selectedView"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],Ln.prototype,"_updateView",null);Ln=E([yt("tf-mesh-loader")],Ln);var ph=class extends mt{constructor(){super(),this.reloadOnReady=!0,this._tagFilter=".*",this._selectedView="all",this._requestManager=new Ae,window.addEventListener("resize",()=>{this._handleWindowResize()},!1),this.reloadOnReady&&this.reload()}_getAllChildren(){var t;return Array.from((t=this.shadowRoot)==null?void 0:t.querySelectorAll("tf-mesh-loader"))}_onCameraPositionChanged(t){this._selectedView=="share"&&this._getAllChildren().forEach(r=>{t.target!=r&&r.setCameraViewpoint(t.detail.position,t.detail.far,t.detail.target)})}_shouldOpen(t){return t<=2}reload(){this._fetchTags().then(this._reloadMeshes.bind(this))}_handleWindowResize(){this._getAllChildren().forEach(t=>{t.redraw()})}_fetchTags(){let t=_e().pluginRoute("mesh","/tags");return this._requestManager.request(t).then(r=>{if(sx.isEqual(r,this._runToTagInfo))return;let n=sx.mapValues(r,o=>Object.keys(o)),i=$i(n);this._dataNotFound=i.length===0,this._runToTagInfo=r})}_reloadMeshes(){this._getAllChildren().forEach(t=>{t.reload()})}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=sx.mapValues(t,l=>Object.keys(l)),o=Ql(i,r,n);function a(l){let c=t[l.run][l.tag].samples;return sx.range(c).map(u=>Object.assign({},l,{sample:u,ofSamples:c}))}return o.map(l=>Object.assign({},l,{items:[].concat.apply([],l.items.map(a))}))}};ph.template=Q`
    <tf-dashboard-layout>
      <div slot="sidebar" class="all-controls">
        <div class="settings">
          <div class="sidebar-section view-control">
            <h3 class="title">Point of view</h3>
            <div>
              <paper-radio-group
                id="view-radio-group"
                selected="{{_selectedView}}"
              >
                <paper-radio-button id="all-radio-button" name="all">
                  Display all points
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="all-radio-button"
                  position="right"
                  offset="0"
                >
                  Zoom and center camera to display all points at once. Note,
                  that some points could be too far (i.e. too small) to be
                  visible.
                </paper-tooltip>
                <paper-radio-button id="user-radio-button" name="user">
                  Current view
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="user-radio-button"
                  position="right"
                  offset="0"
                >
                  Keep current camera position and zoom level.
                </paper-tooltip>
                <paper-radio-button id="share-radio-button" name="share">
                  Share viewpoint
                </paper-radio-button>
                <paper-tooltip
                  animation-delay="0"
                  for="share-radio-button"
                  position="right"
                  offset="0"
                >
                  Share viewpoint among all cameras.
                </paper-tooltip>
              </paper-radio-group>
            </div>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No point cloud data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any point cloud data to your event files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-mesh-loader
                  active="[[active]]"
                  selected-view="[[_selectedView]]"
                  run="[[item.run]]"
                  tag="[[item.tag]]"
                  sample="[[item.sample]]"
                  of-samples="[[item.ofSamples]]"
                  request-manager="[[_requestManager]]"
                  class="tf-mesh-loader-container"
                  on-camera-position-change="_onCameraPositionChanged"
                >
                </tf-mesh-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      paper-radio-button {
        display: block;
        padding: 5px;
      }
      .sidebar-section h3 {
        margin: 0;
        font-weight: normal;
        font-size: 14px;
        margin-bottom: 5px;
      }

      .runs-selector {
        flex-grow: 1;
      }

      tf-runs-selector {
        display: flex;
      }

      .view-control {
        display: block !important;
      }

      .view-control h3.title {
        padding-top: 16px;
        padding-bottom: 16px;
      }

      .allcontrols .view-control paper-radio-group {
        margin-top: 5px;
      }
      /* Layout must be horizontal, i.e. items arranged in a row. If items cannot fit in a row,
       * they should be moved to next line. All items must be square at all times. Minimum size of
       * the item is 480px. This means that maximum size of the item must be 480px + 479px = 959px.
       * */
      .horizontal {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
      }
      tf-mesh-loader {
        width: 480px;
        flex-basis: 480px;
        flex-grow: 1;
        display: block;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],ph.prototype,"reloadOnReady",void 0);E([A({type:Array}),w("design:type",Array)],ph.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ph.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ph.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ph.prototype,"_tagFilter",void 0);E([A({type:String,notify:!0}),w("design:type",String)],ph.prototype,"_selectedView",void 0);E([A({type:Object}),w("design:type",Object)],ph.prototype,"_requestManager",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter"),w("design:type",Array),w("design:paramtypes",[])],ph.prototype,"_categories",null);ph=E([yt("mesh-dashboard"),w("design:paramtypes",[])],ph);var QU=class extends Gt(mt){constructor(){super(...arguments),this._installCommand="pip install -U tensorboard-plugin-profile"}_copyInstallCommand(){return Ri(this,null,function*(){let t=()=>Ri(this,null,function*(){this.$.commandTextarea.select();try{yield navigator.clipboard.writeText(this._installCommand)}catch(i){if(!document.execCommand("copy"))return Promise.reject()}}),r=this.$.copiedMessage;try{yield t(),r.innerText="Copied."}catch(n){r.innerText="Failed to copy to clipboard."}})}_removeCopiedMessage(){let t=this.$.copiedMessage;t.innerText=""}};QU.template=Q`
    <div class="message">
      <h3>The profile plugin has moved.</h3>
      <p>
        Please install the new version of the profile plugin from PyPI by
        running the following command from the machine running TensorBoard:
      </p>
      <textarea
        id="commandTextarea"
        readonly=""
        rows="1"
        on-blur="_removeCopiedMessage"
      >
[[_installCommand]]</textarea
      >
      <div id="copyContainer">
        <span id="copiedMessage"></span>
        <paper-button raised="" on-tap="_copyInstallCommand"
          >Copy to clipboard</paper-button
        >
      </div>
    </div>

    <style>
      :host {
        display: flex;
      }

      .message {
        margin: 80px auto 0 auto;
        max-width: 540px;
      }
      #commandTextarea {
        margin-top: 1ex;
        padding: 1ex 1em;
        resize: vertical;
        width: 100%;
      }
      #copyContainer {
        display: flex;
      }
      #copiedMessage {
        align-self: center;
        flex-grow: 1;
        font-style: italic;
        padding-right: 1em;
        text-align: right;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],QU.prototype,"_installCommand",void 0);QU=E([yt("tf-profile-redirect-dashboard")],QU);var lm=Ee(Oe(),1);var zl=Ee(Oe(),1),tq=Ee(wl(),1);var nn=class extends mt{constructor(){super(...arguments),this._expanded=!1,this._runToPrCurveEntry={},this._previousRunToPrCurveEntry={},this._colorScaleFunction={scale:fn},this._canceller=new an,this._xComponentsCreationMethod=()=>{let t=new tq.Scales.Linear;return{scale:t,axis:new tq.Axes.Numeric(t,"bottom"),accessor:r=>r.recall}},this._yValueAccessor=t=>t.precision,this._tooltipColumns=(()=>{let t=Wu(e0),r=n=>isNaN(n)?"NaN":t(n);return[{title:"Run",evaluate:n=>n.dataset.metadata().name},{title:"Threshold",evaluate:n=>r(n.datum.thresholds)},{title:"Precision",evaluate:n=>r(n.datum.precision)},{title:"Recall",evaluate:n=>r(n.datum.recall)},{title:"TP",evaluate:n=>n.datum.true_positives},{title:"FP",evaluate:n=>n.datum.false_positives},{title:"TN",evaluate:n=>n.datum.true_negatives},{title:"FN",evaluate:n=>n.datum.false_negatives}]})(),this._seriesDataFields=["thresholds","precision","recall","true_positives","false_positives","true_negatives","false_negatives"],this._defaultXRange=[-.05,1.05],this._defaultYRange=[-.05,1.05],this._requestData=(t,r,n)=>{let o=_e().pluginRoute("pr_curves","/pr_curves");Promise.all(t.map(a=>{let s=a,l=this.tag,c=Mi(o,{tag:l,run:s});return this.requestManager.request(c).then(u=>void r({item:a,data:u}))})).finally(()=>void n())},this._smoothingEnabled=!1}_createProcessDataFunction(){return(t,r,n)=>{this.set("_runToDataOverTime",Object.assign({},this._runToDataOverTime,n))}}_computeRunColor(t){return fn(t)}connectedCallback(){super.connectedCallback(),this._attached=!0,this.reload()}_getChartDataLoader(){var t;return(t=this.shadowRoot)==null?void 0:t.querySelector("tf-line-chart-data-loader")}reload(){if(!!this._attached){if(this.runs.length===0){this.set("_runToDataOverTime",{});return}this._getChartDataLoader().reload()}}_setChartData(){var t=this._runToPrCurveEntry,r=this._previousRunToPrCurveEntry,n=this._setOfRelevantRuns;zl.forOwn(t,(i,o)=>{let a=r[o];if(!(a&&t[o].step===a.step)){if(!n[o]){this._clearSeriesData(o);return}this._updateSeriesDataForRun(o,i)}})}_updateSeriesDataForRun(t,r){let n=zl.reduce(this._seriesDataFields,(a,s)=>(a[s]=r[s].slice().reverse(),a),{}),i=new Array(n[this._seriesDataFields[0]].length);for(let a=0;a<i.length;a++)i[a]=zl.mapValues(n,s=>s[a]);let o=this._getChartDataLoader();o.setSeriesData(t,i),o.commitChanges()}_clearSeriesData(t){let r=this._getChartDataLoader();r.setSeriesData(t,[]),r.commitChanges()}_updateRunToPrCurveEntry(){var t=this._runToDataOverTime,r=this.runToStepCap;let n={};zl.forOwn(t,(i,o)=>{!i||!i.length||(n[o]=this._computeEntryClosestOrEqualToStepCap(r[o],i))}),this.set("_previousRunToPrCurveEntry",this._runToPrCurveEntry),this.set("_runToPrCurveEntry",n)}_notifyDataChange(){var t=this._runToDataOverTime;this.onDataChange&&this.onDataChange(t)}_computeEntryClosestOrEqualToStepCap(t,r){let n=Math.min(zl.sortedIndex(r.map(i=>i.step),t),r.length-1);return r[n]}get _runsWithStepAvailable(){var t=this.runs,r=this._runToPrCurveEntry;return zl.filter(t,n=>r[n]).sort()}get _setOfRelevantRuns(){var t=this._runsWithStepAvailable;let r={};return zl.forEach(t,n=>{r[n]=!0}),r}_computeCurrentStepForRun(t,r){let n=t[r];return n?n.step:null}_computeCurrentWallTimeForRun(t,r){let n=t[r];return n?new Date(n.wall_time*1e3).toString():null}_toggleExpanded(t){this.set("_expanded",!this._expanded),this.redraw()}_resetDomain(){this._getChartDataLoader().resetDomain()}redraw(){this._getChartDataLoader().redraw()}};nn.template=Q`
    <tf-card-heading
      tag="[[tag]]"
      display-name="[[tagMetadata.displayName]]"
      description="[[tagMetadata.description]]"
    ></tf-card-heading>

    <tf-line-chart-data-loader
      x-components-creation-method="[[_xComponentsCreationMethod]]"
      y-value-accessor="[[_yValueAccessor]]"
      tooltip-columns="[[_tooltipColumns]]"
      color-scale="[[_colorScaleFunction]]"
      default-x-range="[[_defaultXRange]]"
      default-y-range="[[_defaultYRange]]"
      smoothing-enabled="[[_smoothingEnabled]]"
      request-manager="[[requestManager]]"
      data-to-load="[[runs]]"
      data-series="[[runs]]"
      load-key="[[tag]]"
      request-data="[[_requestData]]"
      load-data-callback="[[_createProcessDataFunction()]]"
      active="[[active]]"
    ></tf-line-chart-data-loader>

    <div id="buttons-row">
      <paper-icon-button
        selected$="[[_expanded]]"
        icon="fullscreen"
        on-tap="_toggleExpanded"
      ></paper-icon-button>
      <paper-icon-button
        icon="settings-overscan"
        on-tap="_resetDomain"
        title="Reset axes to [0, 1]."
      ></paper-icon-button>
    </div>

    <div id="step-legend">
      <template is="dom-repeat" items="[[_runsWithStepAvailable]]" as="run">
        <div class="legend-row">
          <div
            class="color-box"
            style="background: [[_computeRunColor(run)]];"
          ></div>
          [[run]] is at
          <span class="step-label-text">
            step [[_computeCurrentStepForRun(_runToPrCurveEntry, run)]] </span
          ><br />
          <span class="wall-time-label-text">
            ([[_computeCurrentWallTimeForRun(_runToPrCurveEntry, run)]])
          </span>
        </div>
      </template>
    </div>

    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 500px;
        margin-right: 10px;
        margin-bottom: 25px;
      }
      :host([_expanded]) {
        width: 100%;
      }
      tf-line-chart-data-loader {
        height: 300px;
        position: relative;
      }
      :host([_expanded]) tf-line-chart-data-loader {
        height: 600px;
      }
      #buttons-row {
        display: flex;
        flex-direction: row;
      }
      #buttons-row paper-icon-button {
        color: #2196f3;
        border-radius: 100%;
        width: 32px;
        height: 32px;
        padding: 4px;
      }
      #buttons-row paper-icon-button[selected] {
        background: var(--tb-ui-light-accent);
      }
      #step-legend {
        box-sizing: border-box;
        font-size: 0.8em;
        max-height: 200px;
        overflow-y: auto;
        padding: 0 0 0 10px;
        width: 100%;
      }
      .legend-row {
        margin: 5px 0 5px 0;
        width: 100%;
      }
      .color-box {
        display: inline-block;
        border-radius: 1px;
        width: 10px;
        height: 10px;
      }
      .step-label-text {
        font-weight: bold;
      }
      .wall-time-label-text {
        color: #888;
        font-size: 0.8em;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],nn.prototype,"runs",void 0);E([A({type:String}),w("design:type",String)],nn.prototype,"tag",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"tagMetadata",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"runToStepCap",void 0);E([A({type:Object}),w("design:type",Ae)],nn.prototype,"requestManager",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"active",void 0);E([A({type:Boolean,reflectToAttribute:!0}),w("design:type",Boolean)],nn.prototype,"_expanded",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_runToPrCurveEntry",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_previousRunToPrCurveEntry",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_runToDataOverTime",void 0);E([A({type:Object}),w("design:type",Function)],nn.prototype,"onDataChange",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_colorScaleFunction",void 0);E([A({type:Object}),w("design:type",an)],nn.prototype,"_canceller",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"_attached",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_xComponentsCreationMethod",void 0);E([A({type:Object}),w("design:type",Object)],nn.prototype,"_yValueAccessor",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_tooltipColumns",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_seriesDataFields",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_defaultXRange",void 0);E([A({type:Array}),w("design:type",Array)],nn.prototype,"_defaultYRange",void 0);E([A({type:Object}),w("design:type",Function)],nn.prototype,"_requestData",void 0);E([A({type:Boolean}),w("design:type",Boolean)],nn.prototype,"_smoothingEnabled",void 0);E([Bt("runs","tag"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"reload",null);E([Bt("_runToPrCurveEntry","_previousRunToPrCurveEntry","_setOfRelevantRuns"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_setChartData",null);E([Bt("_runToDataOverTime","runToStepCap"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_updateRunToPrCurveEntry",null);E([Bt("_runToDataOverTime"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],nn.prototype,"_notifyDataChange",null);E([Rt("runs","_runToPrCurveEntry"),w("design:type",Array),w("design:paramtypes",[])],nn.prototype,"_runsWithStepAvailable",null);E([Rt("_runsWithStepAvailable"),w("design:type",Object),w("design:paramtypes",[])],nn.prototype,"_setOfRelevantRuns",null);nn=E([yt("tf-pr-curve-card")],nn);var SM=Ee(Oe(),1);var ep=class extends mt{constructor(){super(...arguments),this._runToStepIndex={}}_computeColorForRun(t){return fn(t)}_computeTimeTextForRun(t,r,n,i){let o=r[n];if(!SM.isNumber(o))return"";let a=t[n];if(!a)return"";let s=a[o][i];if(i==="step")return`step ${s}`;if(i==="relative")return s<1?`${(s*1e3).toFixed(2)} ms`:`${s.toFixed(2)} s`;if(i==="wall_time")return new Date(s*1e3).toString();throw new Error(`The display type of ${i} is not recognized.`)}_sliderValueChanged(t){let r=t.target.dataset.run,n=t.target.immediateValue,i=Object.assign({},this._runToStepIndex);isNaN(n)?delete i[r]:i[r]=t.target.immediateValue,this._runToStepIndex=i}_computeMaxStepIndexForRun(t,r){let n=t[r];return n&&n.length?n.length-1:0}_updateStepsForNewRuns(){var t=this.runToAvailableTimeEntries;let r=Object.assign({},this._runToStepIndex);SM.forOwn(t,(n,i)=>{SM.isNumber(r[i])||(r[i]=n.length-1)}),this._runToStepIndex=r}_getStep(t,r){return this._runToStepIndex?this._runToStepIndex[r]:0}_computeRunToStep(t,r){let n={};return SM.forOwn(r,(i,o)=>{let a=t[o];!a||(n[o]=a[i].step)}),n}get _runsWithSliders(){var t=this.runs,r=this.runToAvailableTimeEntries;return t.filter(n=>r[n])}};ep.template=Q`
    <template is="dom-repeat" items="[[_runsWithSliders]]" as="run">
      <div class="run-widget">
        <div class="run-display-container">
          <div
            class="run-color-box"
            style="background:[[_computeColorForRun(run)]];"
          ></div>
          <div class="run-text">[[run]]</div>
        </div>
        <div class="step-display-container">
          [[_computeTimeTextForRun(runToAvailableTimeEntries, _runToStepIndex,
          run, timeDisplayType)]]
        </div>
        <paper-slider
          data-run$="[[run]]"
          step="1"
          type="number"
          min="0"
          max="[[_computeMaxStepIndexForRun(runToAvailableTimeEntries, run)]]"
          value="[[_getStep(_runToStepIndex, run)]]"
          on-immediate-value-changed="_sliderValueChanged"
        ></paper-slider>
      </div>
    </template>
    <style>
      .run-widget {
        margin: 10px 0 0 0;
      }
      paper-slider {
        margin: -8px 0 0 -15px;
        width: 100%;
      }
      .step-display-container {
        font-size: 0.9em;
        margin: 0 15px 0 0;
      }
      .run-text {
        display: inline-block;
      }
      .run-color-box {
        width: 12px;
        height: 12px;
        border-radius: 3px;
        display: inline-block;
      }
    </style>
  `;E([A({type:Array}),w("design:type",Array)],ep.prototype,"runs",void 0);E([A({type:Object}),w("design:type",Object)],ep.prototype,"runToAvailableTimeEntries",void 0);E([A({type:Object,notify:!0,computed:"_computeRunToStep(runToAvailableTimeEntries, _runToStepIndex)"}),w("design:type",Object)],ep.prototype,"runToStep",void 0);E([A({type:String}),w("design:type",String)],ep.prototype,"timeDisplayType",void 0);E([A({type:Object}),w("design:type",Object)],ep.prototype,"_runToStepIndex",void 0);E([Bt("runToAvailableTimeEntries"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],ep.prototype,"_updateStepsForNewRuns",null);E([Rt("runs","runToAvailableTimeEntries"),w("design:type",Array),w("design:paramtypes",[])],ep.prototype,"_runsWithSliders",null);ep=E([yt("tf-pr-curve-steps-selector")],ep);var ko=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._timeDisplayType="step",this._selectedRuns=[],this._runToTagInfo={},this._tagToRunToData={},this._getCategoryItemKey=t=>t.tag,this._requestManager=new Ae,this._step=0}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){Promise.all([this._fetchTags()]).then(()=>{this._reloadCards()})}_shouldOpen(t){return t<=2}_fetchTags(){let t=_e().pluginRoute("pr_curves","/tags");return this._requestManager.request(t).then(r=>{if(lm.isEqual(r,this._runToTagInfo))return;let n=lm.mapValues(r,o=>lm.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadCards(){var t;lm.forEach((t=this.root)==null?void 0:t.querySelectorAll("tf-pr-curve-card"),r=>{r.reload()})}get _categories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i=lm.mapValues(t,o=>Object.keys(o));return hE(i,r,n)}get _relevantSelectedRuns(){var t=this._selectedRuns,r=this._runToTagInfo;return t.filter(n=>r[n])}_tagMetadata(t,r,n){let i={};r.forEach(a=>{i[a]=t[a][n]});let o=n.replace(/\/pr_curves$/,"");return oR(i,o)}_createDataChangeCallback(t){return r=>{this.set("_tagToRunToData",Mx(Kl({},this._tagToRunToData),{[t]:r}))}}get _runToAvailableTimeEntries(){var t=this._tagToRunToData;let r={};for(let[i,o]of Object.entries(t))for(let[a]of Object.entries(o))(r[a]==null||i<r[a])&&(r[a]=i);let n={};for(let[i,o]of Object.entries(r)){let a=t[o][i];n[i]=a.map(s=>({step:s.step,wall_time:s.wall_time,relative:s.wall_time-a[0].wall_time}))}return n}};ko.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <tf-option-selector
              id="time-type-selector"
              name="Time Display Type"
              selected-id="{{_timeDisplayType}}"
            >
              <paper-button id="step">step</paper-button>
              <!--
            -->
              <paper-button id="relative">relative</paper-button>
              <!--
            -->
              <paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
          <template is="dom-if" if="[[_runToAvailableTimeEntries]]">
            <div class="sidebar-section" id="steps-selector-container">
              <tf-pr-curve-steps-selector
                runs="[[_relevantSelectedRuns]]"
                run-to-step="{{_runToStep}}"
                run-to-available-time-entries="[[_runToAvailableTimeEntries]]"
                time-display-type="[[_timeDisplayType]]"
              >
              </tf-pr-curve-steps-selector>
            </div>
          </template>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No precision–recall curve data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>
                You haven’t written any precision–recall data to your event
                files.
              </li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>
            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
              get-category-item-key="[[_getCategoryItemKey]]"
            >
              <template>
                <tf-pr-curve-card
                  active="[[active]]"
                  runs="[[item.runs]]"
                  tag="[[item.tag]]"
                  tag-metadata="[[_tagMetadata(_runToTagInfo, item.runs, item.tag)]]"
                  request-manager="[[_requestManager]]"
                  run-to-step-cap="[[_runToStep]]"
                  on-data-change="[[_createDataChangeCallback(item.tag)]]"
                ></tf-pr-curve-card>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }

      /** Do not let the steps selector occlude the run selector. */
      #steps-selector-container {
        max-height: 60%;
        overflow-y: auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"reloadOnReady",void 0);E([A({type:String}),w("design:type",String)],ko.prototype,"_timeDisplayType",void 0);E([A({type:Array}),w("design:type",Array)],ko.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_runToTagInfo",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_tagToRunToData",void 0);E([A({type:Object,notify:!0}),w("design:type",Object)],ko.prototype,"_runToStep",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],ko.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],ko.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],ko.prototype,"_getCategoryItemKey",void 0);E([A({type:Object}),w("design:type",Ae)],ko.prototype,"_requestManager",void 0);E([A({type:Number,notify:!0}),w("design:type",Number)],ko.prototype,"_step",void 0);E([Rt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],ko.prototype,"_categories",null);E([Rt("_selectedRuns","_runToTagInfo"),w("design:type",Array),w("design:paramtypes",[])],ko.prototype,"_relevantSelectedRuns",null);E([Rt("_tagToRunToData"),w("design:type",Object),w("design:paramtypes",[])],ko.prototype,"_runToAvailableTimeEntries",null);ko=E([yt("tf-pr-curve-dashboard")],ko);var B6=Ee(Oe(),1);var uo=class extends Gt(nb){constructor(){super(...arguments),this.reloadOnReady=!0,this._showDownloadLinks=vp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}).call(this),this._smoothingWeight=_E("_smoothingWeight",{defaultValue:.6}).call(this),this._ignoreYOutliers=vp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0}).call(this),this._xType=Ed.STEP,this._selectedRuns=[],this._tagFilter="",this._categories=[],this._getCategoryItemKey=t=>t.tag,this._requestManager=new Ae(50),this._showDownloadLinksObserver=xp("_showDownloadLinks",{defaultValue:!1,useLocalStorage:!0}),this._smoothingWeightObserver=yE("_smoothingWeight",{defaultValue:.6}),this._ignoreYOutliersObserver=xp("_ignoreYOutliers",{defaultValue:!0,useLocalStorage:!0})}get _smoothingEnabled(){var t=this._smoothingWeight;return t>0}_getCategoryKey(t){return t.metadata.type==Na.SEARCH_RESULTS?"":t.name}_shouldOpen(t){return t<=2}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadCharts()})}_fetchTags(){let t=_e().pluginRoute("scalars","/tags");return this._requestManager.request(t).then(r=>{if(B6.isEqual(r,this._runToTagInfo))return;let n=B6.mapValues(r,o=>Object.keys(o)),i=$i(n);this.set("_dataNotFound",i.length===0),this.set("_runToTagInfo",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadCharts(){var t;(t=this.root)==null||t.querySelectorAll("tf-scalar-card").forEach(r=>{r.reload()})}_updateCategories(){var t=this._runToTagInfo,r=this._selectedRuns,n=this._tagFilter;let i,o=n,a=B6.mapValues(t,s=>Object.keys(s));i=hE(a,r,o),i.forEach(s=>{s.items=s.items.map(l=>({tag:l.tag,series:l.runs.map(c=>({run:c,tag:l.tag}))}))}),this.updateArrayProp("_categories",i,this._getCategoryKey)}_tagMetadata(t,r,n){let i=t.name,o=n.tag,a={};n.series.forEach(({run:u})=>{a[u]=r[u][o]});let s=o.replace(/\/scalar_summary$/,""),{description:l,displayName:c}=oR(a,s);return t.metadata.type==Na.PREFIX_GROUP&&c.startsWith(i+"/")&&(c=c.slice(i.length+1)),{description:l,displayName:c}}};uo.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="settings">
          <div class="sidebar-section">
            <div class="line-item">
              <paper-checkbox
                id="show-download-links"
                checked="{{_showDownloadLinks}}"
                >Show data download links</paper-checkbox
              >
            </div>
            <div class="line-item">
              <paper-checkbox
                id="ignore-y-outlier"
                checked="{{_ignoreYOutliers}}"
                >Ignore outliers in chart scaling</paper-checkbox
              >
            </div>
            <div id="tooltip-sorting">
              <div>Tooltip sorting method:</div>
              <paper-dropdown-menu
                no-label-float
                selected-item-label="{{_tooltipSortingMethod}}"
              >
                <paper-listbox
                  class="dropdown-content"
                  selected="0"
                  slot="dropdown-content"
                >
                  <paper-item>default</paper-item>
                  <paper-item>descending</paper-item>
                  <paper-item>ascending</paper-item>
                  <paper-item>nearest</paper-item>
                </paper-listbox>
              </paper-dropdown-menu>
            </div>
          </div>
          <div class="sidebar-section">
            <tf-smoothing-input
              weight="{{_smoothingWeight}}"
              step="0.001"
              min="0"
              max="0.999"
            ></tf-smoothing-input>
          </div>
          <div class="sidebar-section">
            <tf-option-selector
              id="x-type-selector"
              name="Horizontal Axis"
              selected-id="{{_xType}}"
            >
              <paper-button id="step">step</paper-button
              ><!--
            --><paper-button id="relative">relative</paper-button
              ><!--
            --><paper-button id="wall_time">wall</paper-button>
            </tf-option-selector>
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No scalar data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any scalar data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
              get-category-item-key="[[_getCategoryItemKey]]"
            >
              <template>
                <tf-scalar-card
                  active="[[active]]"
                  data-to-load="[[item.series]]"
                  ignore-y-outliers="[[_ignoreYOutliers]]"
                  multi-experiments="[[_getMultiExperiments(dataSelection)]]"
                  request-manager="[[_requestManager]]"
                  show-download-links="[[_showDownloadLinks]]"
                  smoothing-enabled="[[_smoothingEnabled]]"
                  smoothing-weight="[[_smoothingWeight]]"
                  tag-metadata="[[_tagMetadata(category, _runToTagInfo, item)]]"
                  tag="[[item.tag]]"
                  tooltip-sorting-method="[[_tooltipSortingMethod]]"
                  x-type="[[_xType]]"
                  batch-size="[[featureFlags.scalarsBatchSize]]"
                  in-colab="[[featureFlags.inColab]]"
                ></tf-scalar-card>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>

    <style include="dashboard-style"></style>
    <style>
      #tooltip-sorting {
        align-items: center;
        display: flex;
        font-size: 14px;
        margin-top: 15px;
      }

      #tooltip-sorting paper-dropdown-menu {
        margin-left: 10px;
        --paper-input-container-focus-color: var(--tb-orange-strong);
        width: 105px;
      }

      .line-item {
        display: block;
        padding-top: 5px;
      }
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
      .center {
        overflow-x: hidden;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"reloadOnReady",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"featureFlags",void 0);E([A({type:Boolean,notify:!0,observer:"_showDownloadLinksObserver"}),w("design:type",Boolean)],uo.prototype,"_showDownloadLinks",void 0);E([A({type:Number,notify:!0,observer:"_smoothingWeightObserver"}),w("design:type",Number)],uo.prototype,"_smoothingWeight",void 0);E([A({type:Boolean,observer:"_ignoreYOutliersObserver"}),w("design:type",Boolean)],uo.prototype,"_ignoreYOutliers",void 0);E([A({type:String}),w("design:type",String)],uo.prototype,"_xType",void 0);E([A({type:Array}),w("design:type",Array)],uo.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"_runToTagInfo",void 0);E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],uo.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],uo.prototype,"_categoriesDomReady",void 0);E([A({type:Array}),w("design:type",Array)],uo.prototype,"_categories",void 0);E([A({type:Object}),w("design:type",Object)],uo.prototype,"_getCategoryItemKey",void 0);E([A({type:Object}),w("design:type",Ae)],uo.prototype,"_requestManager",void 0);E([Rt("_smoothingWeight"),w("design:type",Boolean),w("design:paramtypes",[])],uo.prototype,"_smoothingEnabled",null);E([Bt("_runToTagInfo","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],uo.prototype,"_updateCategories",null);uo=E([yt("tf-scalar-dashboard")],uo);var cpe=Ee(Oe(),1);var dh=class extends Gt(mt){constructor(){super(...arguments),this._texts=[],this._canceller=new an}get _runColor(){var t=this.run;return fn(t)}_changeRunColor(){var t=this._runColor;this.updateStyles({"--tb-text-loader-outline":t})}attached(){this.reload()}reload(){if(!this.isAttached)return;this._canceller.cancelAll();let t=_e(),r=Mi(t.pluginRoute("text","/text"),{tag:this.tag,run:this.run,markdown:this.markdownEnabled?"true":"false"}),n=this._canceller.cancellable(i=>{if(i.cancelled)return;let o=i.value.map(a=>({wall_time:new Date(a.wall_time*1e3),step:a.step,text:a.text}));this.set("_texts",o.slice().reverse())});this.requestManager.request(r).then(n)}_formatStep(t){return xn(",")(t)}};dh.template=Q`
    <tf-card-heading run="[[run]]" tag="[[tag]]" color="[[_runColor]]">
    </tf-card-heading>
    <paper-material
      elevation="1"
      id="steps-container"
      class="container scrollbar"
    >
      <template is="dom-repeat" items="[[_texts]]">
        <paper-material elevation="1" class="step-container">
          step <span class="step-value">[[_formatStep(item.step)]]</span>
        </paper-material>
        <paper-material elevation="1" class="text">
          <tf-markdown-view html="[[item.text]]"></tf-markdown-view>
        </paper-material>
      </template>
    </paper-material>
    <style include="scrollbar-style"></style>
    <style>
      :host {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: auto;
        margin-right: 10px;
        margin-bottom: 15px;
      }
      .scrollbar {
        will-change: transform;
      }
      #steps-container {
        border-radius: 3px;
        border: 2px solid /* color computed and set as inline style */;
        display: block;
        max-height: 500px;
        overflow: auto;
        padding: 10px;
        border-color: var(--tb-text-loader-outline);
      }
      .text {
        background-color: inherit;
        border-radius: 0 3px 3px 3px;
        padding: 5px;
        word-break: break-word;
      }
      .step-container {
        background-color: var(--tb-ui-light-accent);
        border-bottom: none;
        border-radius: 3px 3px 0 0;
        border: 1px solid var(--tb-ui-border);
        display: inline-block;
        font-size: 12px;
        font-style: italic;
        margin-left: -1px; /* to correct for border */
        padding: 3px;
      }
      .step-container:not(:first-child) {
        margin-top: 15px;
      }

      tf-card-heading {
        margin-bottom: 10px;
      }
    </style>
  `;E([A({type:String}),w("design:type",String)],dh.prototype,"run",void 0);E([A({type:String}),w("design:type",String)],dh.prototype,"tag",void 0);E([A({type:Boolean}),w("design:type",Boolean)],dh.prototype,"markdownEnabled",void 0);E([A({type:Array}),w("design:type",Array)],dh.prototype,"_texts",void 0);E([A({type:Object}),w("design:type",Ae)],dh.prototype,"requestManager",void 0);E([A({type:Object}),w("design:type",an)],dh.prototype,"_canceller",void 0);E([Rt("run"),w("design:type",String),w("design:paramtypes",[])],dh.prototype,"_runColor",null);E([Bt("_runColor"),w("design:type",Function),w("design:paramtypes",[]),w("design:returntype",void 0)],dh.prototype,"_changeRunColor",null);dh=E([yt("tf-text-loader")],dh);var Qc=class extends Gt(mt){constructor(){super(...arguments),this.reloadOnReady=!0,this._markdownEnabled=vp("_markdownEnabled",{defaultValue:!0,useLocalStorage:!0}).call(this),this._requestManager=new Ae,this._markdownEnabledStorageObserver=xp("_markdownEnabled",{defaultValue:!0,useLocalStorage:!0})}static get observers(){return["_markdownEnabledObserver(_markdownEnabled)"]}ready(){super.ready(),this.reloadOnReady&&this.reload()}reload(){this._fetchTags().then(()=>{this._reloadTexts()})}_shouldOpen(t){return t<=2}_fetchTags(){let t=_e().pluginRoute("text","/tags");return this._requestManager.request(t).then(r=>{if(cpe.isEqual(r,this._runToTag))return;let n=$i(r);this.set("_dataNotFound",n.length===0),this.set("_runToTag",r),this.async(()=>{this.set("_categoriesDomReady",!0)})})}_reloadTexts(){var t;(t=this.root)==null||t.querySelectorAll("tf-text-loader").forEach(r=>{r.reload()})}get _categories(){var t=this._runToTag,r=this._selectedRuns,n=this._tagFilter;return Ql(t,r,n)}_markdownEnabledObserver(){this._reloadTexts()}};Qc.template=Q`
    <tf-dashboard-layout>
      <div class="sidebar" slot="sidebar">
        <div class="sidebar-section">
          <div class="line-item">
            <paper-checkbox checked="{{_markdownEnabled}}"
              >Enable Markdown</paper-checkbox
            >
          </div>
        </div>
        <div class="sidebar-section runs-selector">
          <tf-runs-selector selected-runs="{{_selectedRuns}}">
          </tf-runs-selector>
        </div>
      </div>
      <div class="center" slot="center">
        <template is="dom-if" if="[[_dataNotFound]]">
          <div class="no-data-warning">
            <h3>No text data was found.</h3>
            <p>Probable causes:</p>
            <ul>
              <li>You haven’t written any text data to your event files.</li>
              <li>TensorBoard can’t find your event files.</li>
            </ul>

            <p>
              If you’re new to using TensorBoard, and want to find out how to
              add data and set up your event files, check out the
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md"
                >README</a
              >
              and perhaps the
              <a
                href="https://www.tensorflow.org/get_started/summaries_and_tensorboard"
                >TensorBoard tutorial</a
              >.
            </p>

            <p>
              If you think TensorBoard is configured properly, please see
              <a
                href="https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"
                >the section of the README devoted to missing data problems</a
              >
              and consider filing an issue on GitHub.
            </p>
          </div>
        </template>
        <template is="dom-if" if="[[!_dataNotFound]]">
          <tf-tag-filterer tag-filter="{{_tagFilter}}"></tf-tag-filterer>
          <template is="dom-repeat" items="[[_categories]]" as="category">
            <tf-category-paginated-view
              category="[[category]]"
              initial-opened="[[_shouldOpen(index)]]"
            >
              <template>
                <tf-text-loader
                  active="[[active]]"
                  tag="[[item.tag]]"
                  run="[[item.run]]"
                  request-manager="[[_requestManager]]"
                  markdown-enabled="[[_markdownEnabled]]"
                ></tf-text-loader>
              </template>
            </tf-category-paginated-view>
          </template>
        </template>
      </div>
    </tf-dashboard-layout>
    <style include="dashboard-style"></style>
    <style>
      .no-data-warning {
        max-width: 540px;
        margin: 80px auto 0 auto;
      }
    </style>
  `;E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"reloadOnReady",void 0);E([A({type:Boolean,notify:!0,observer:"_markdownEnabledStorageObserver"}),w("design:type",Boolean)],Qc.prototype,"_markdownEnabled",void 0);E([A({type:Array}),w("design:type",Array)],Qc.prototype,"_selectedRuns",void 0);E([A({type:Object}),w("design:type",Object)],Qc.prototype,"_runToTag",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"_dataNotFound",void 0);E([A({type:String}),w("design:type",String)],Qc.prototype,"_tagFilter",void 0);E([A({type:Boolean}),w("design:type",Boolean)],Qc.prototype,"_categoriesDomReady",void 0);E([A({type:Object}),w("design:type",Object)],Qc.prototype,"_requestManager",void 0);E([Rt("_runToTag","_selectedRuns","_tagFilter","_categoriesDomReady"),w("design:type",Array),w("design:paramtypes",[])],Qc.prototype,"_categories",null);Qc=E([yt("tf-text-dashboard")],Qc);var Vht=class extends Gt(mt){};Vht.template=Q`
    <div class="message">
      <h3>The What-If Tool is no longer supported.</h3>
      <p>
        The
        <a href="https://pair-code.github.io/lit/"
          >Learning Interpretability Tool (LIT)</a
        >
        is an actively maintained alternative. Please follow the instructions
        <a href="https://pair-code.github.io/lit/setup/">here</a> to install and
        use this tool.
      </p>
      <style>
        :host {
          display: flex;
        }

        .message {
          margin: 80px auto 0 auto;
          max-width: 540px;
        }
        #commandTextarea {
          margin-top: 1ex;
          padding: 1ex 1em;
          resize: vertical;
          width: 100%;
        }
        #copyContainer {
          display: flex;
        }
        #copiedMessage {
          align-self: center;
          flex-grow: 1;
          font-style: italic;
          padding-right: 1em;
          text-align: right;
        }
      </style>
    </div>
  `;Vht=E([yt("tf-wit-redirect-dashboard")],Vht);var upe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_backend=RB}};upe=E([yt("tf-backend")],upe);var hpe=class extends mt{constructor(){super(...arguments),this._template=null,this.runsColorScale=fn}};hpe=E([yt("tf-color-scale")],hpe);var fpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_feature_flags=tW}};fpe=E([yt("tf-feature-flags")],fpe);var ppe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_globals=kW}};ppe=E([yt("tf-globals")],ppe);var Uht={};Ks(Uht,{TfDomRepeat:()=>Oi,addLimitListener:()=>UW,getLimit:()=>GW,removeLimitListener:()=>qW,setLimit:()=>s2e});var dpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_paginated_view=Uht}};dpe=E([yt("tf-paginated-view-store")],dpe);var mpe=class extends mt{constructor(){super(...arguments),this._template=null,this.tf_storage=OB}};mpe=E([yt("tf-storage")],mpe);})();
/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
/*!
 * isobject <https://github.com/jonschlinkert/isobject>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
/**
 * @fileoverview
 * @suppress {checkPrototypalTypes}
 * @license Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt The complete set of authors may be found
 * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may
 * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by
 * Google as part of the polymer project is also subject to an additional IP
 * rights grant found at http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
 * This code may only be used under the BSD style license found at
 * http://polymer.github.io/LICENSE.txt
 * The complete set of authors may be found at
 * http://polymer.github.io/AUTHORS.txt
 * The complete set of contributors may be found at
 * http://polymer.github.io/CONTRIBUTORS.txt
 * Code distributed by Google as part of the polymer project is also
 * subject to an additional IP rights grant found at
 * http://polymer.github.io/PATENTS.txt
 */
/**
 * @license
 * Copyright (c) 2021 Vaadin Ltd.
 * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
 */
/**
 * @license
 * Copyright 2010-2022 Three.js Authors
 * SPDX-License-Identifier: MIT
 */
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 *
 * @fileoverview manually add d3-selection-multi to d3 default bundle. Most of this code is
 * copied from d3-selection-multi@1.0.0.
 * See https://github.com/d3/d3-selection-multi/issues/11 for why we have to do this
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements a convenient thunk function to handle the common case
 * of creating a memoized function that takes its inputs from mutable class properties.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements a function memoizer using the Signature API.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 * @fileoverview Implements the Signature API to help in comparing when two
 * Plottable objects have "changed".
 *
 * Memoization in Plottable is complicated by mutable scales and datasets. We cannot simply
 * reference compare two e.g. scales since it may have internally mutated. To resolve this,
 * we write a recursive Signature interface that holds an immutable snapshot of whatever
 * state the scale/data was in at the time. Then on memoized function invocation we sign the
 * new inputs and compare the signatures to decide if we should recompute.
 *
 * We must hand-write a signature for each custom class we wish to support.
 */
/**
 * Copyright 2014-present Palantir Technologies
 * @license MIT
 */
/**
 * Copyright 2017-present Palantir Technologies
 * @license MIT
 */
/**
@license
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/

(()=>{var Iie=Object.create,kA=Object.defineProperty,Aie=Object.getOwnPropertyDescriptor,Rie=Object.getOwnPropertyNames,Pie=Object.getPrototypeOf,Oie=Object.prototype.hasOwnProperty,GV=(n,t)=>()=>(t||n((t={exports:{}}).exports,t),t.exports),FA=(n,t)=>{for(var e in t)kA(n,e,{get:t[e],enumerable:!0})},WV=(n,t,e)=>(e=null!=n?Iie(Pie(n)):{},((n,t,e,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of Rie(t))!Oie.call(n,r)&&undefined!==r&&kA(n,r,{get:()=>t[r],enumerable:!(i=Aie(t,r))||i.enumerable});return n})(!t&&n&&n.__esModule?e:kA(e,"default",{value:n,enumerable:!0}),n)),I4=GV((JUe,_C)=>{var r4,o4,s4,a4,l4,c4,d4,u4,p4,f4,m4,h4,g4,hC,QA,_4,b4,v4,Rm,y4,x4,C4,M4,w4,S4,E4,T4,D4,gC;!function(n){var t="object"==typeof global?global:"object"==typeof self?self:"object"==typeof this?this:{};function e(i,r){return i!==t&&("function"==typeof Object.create?Object.defineProperty(i,"__esModule",{value:!0}):i.__esModule=!0),function(o,s){return i[o]=r?r(o,s):s}}"function"==typeof define&&define.amd?define("tslib",["exports"],function(i){n(e(t,e(i)))}):n("object"==typeof _C&&"object"==typeof _C.exports?e(t,e(_C.exports)):e(t))}(function(n){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,r){i.__proto__=r}||function(i,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(i[o]=r[o])};r4=function(i,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=i}t(i,r),i.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)},o4=Object.assign||function(i){for(var r,o=1,s=arguments.length;o<s;o++)for(var a in r=arguments[o])Object.prototype.hasOwnProperty.call(r,a)&&(i[a]=r[a]);return i},s4=function(i,r){var o={};for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&r.indexOf(s)<0&&(o[s]=i[s]);if(null!=i&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(s=Object.getOwnPropertySymbols(i);a<s.length;a++)r.indexOf(s[a])<0&&Object.prototype.propertyIsEnumerable.call(i,s[a])&&(o[s[a]]=i[s[a]])}return o},a4=function(i,r,o,s){var c,a=arguments.length,l=a<3?r:null===s?s=Object.getOwnPropertyDescriptor(r,o):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(i,r,o,s);else for(var d=i.length-1;d>=0;d--)(c=i[d])&&(l=(a<3?c(l):a>3?c(r,o,l):c(r,o))||l);return a>3&&l&&Object.defineProperty(r,o,l),l},l4=function(i,r){return function(o,s){r(o,s,i)}},c4=function(i,r,o,s,a,l){function c(A){if(void 0!==A&&"function"!=typeof A)throw new TypeError("Function expected");return A}for(var m,d=s.kind,u="getter"===d?"get":"setter"===d?"set":"value",p=!r&&i?s.static?i:i.prototype:null,f=r||(p?Object.getOwnPropertyDescriptor(p,s.name):{}),b=!1,M=o.length-1;M>=0;M--){var y={};for(var x in s)y[x]="access"===x?{}:s[x];for(var x in s.access)y.access[x]=s.access[x];y.addInitializer=function(A){if(b)throw new TypeError("Cannot add initializers after decoration has completed");l.push(c(A||null))};var R=(0,o[M])("accessor"===d?{get:f.get,set:f.set}:f[u],y);if("accessor"===d){if(void 0===R)continue;if(null===R||"object"!=typeof R)throw new TypeError("Object expected");(m=c(R.get))&&(f.get=m),(m=c(R.set))&&(f.set=m),(m=c(R.init))&&a.push(m)}else(m=c(R))&&("field"===d?a.push(m):f[u]=m)}p&&Object.defineProperty(p,s.name,f),b=!0},d4=function(i,r,o){for(var s=arguments.length>2,a=0;a<r.length;a++)o=s?r[a].call(i,o):r[a].call(i);return s?o:void 0},u4=function(i){return"symbol"==typeof i?i:"".concat(i)},p4=function(i,r,o){return"symbol"==typeof r&&(r=r.description?"[".concat(r.description,"]"):""),Object.defineProperty(i,"name",{configurable:!0,value:o?"".concat(o," ",r):r})},f4=function(i,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(i,r)},m4=function(i,r,o,s){return new(o||(o=Promise))(function(l,c){function d(f){try{p(s.next(f))}catch(m){c(m)}}function u(f){try{p(s.throw(f))}catch(m){c(m)}}function p(f){f.done?l(f.value):function(l){return l instanceof o?l:new o(function(c){c(l)})}(f.value).then(d,u)}p((s=s.apply(i,r||[])).next())})},h4=function(i,r){var s,a,l,c,o={label:0,sent:function(){if(1&l[0])throw l[1];return l[1]},trys:[],ops:[]};return c={next:d(0),throw:d(1),return:d(2)},"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function d(p){return function(f){return function(p){if(s)throw new TypeError("Generator is already executing.");for(;c&&(c=0,p[0]&&(o=0)),o;)try{if(s=1,a&&(l=2&p[0]?a.return:p[0]?a.throw||((l=a.return)&&l.call(a),0):a.next)&&!(l=l.call(a,p[1])).done)return l;switch(a=0,l&&(p=[2&p[0],l.value]),p[0]){case 0:case 1:l=p;break;case 4:return o.label++,{value:p[1],done:!1};case 5:o.label++,a=p[1],p=[0];continue;case 7:p=o.ops.pop(),o.trys.pop();continue;default:if(!(l=(l=o.trys).length>0&&l[l.length-1])&&(6===p[0]||2===p[0])){o=0;continue}if(3===p[0]&&(!l||p[1]>l[0]&&p[1]<l[3])){o.label=p[1];break}if(6===p[0]&&o.label<l[1]){o.label=l[1],l=p;break}if(l&&o.label<l[2]){o.label=l[2],o.ops.push(p);break}l[2]&&o.ops.pop(),o.trys.pop();continue}p=r.call(i,o)}catch(f){p=[6,f],a=0}finally{s=l=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([p,f])}}},g4=function(i,r){for(var o in i)"default"!==o&&!Object.prototype.hasOwnProperty.call(r,o)&&gC(r,i,o)},gC=Object.create?function(i,r,o,s){void 0===s&&(s=o);var a=Object.getOwnPropertyDescriptor(r,o);(!a||("get"in a?!r.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return r[o]}}),Object.defineProperty(i,s,a)}:function(i,r,o,s){void 0===s&&(s=o),i[s]=r[o]},hC=function(i){var r="function"==typeof Symbol&&Symbol.iterator,o=r&&i[r],s=0;if(o)return o.call(i);if(i&&"number"==typeof i.length)return{next:function(){return i&&s>=i.length&&(i=void 0),{value:i&&i[s++],done:!i}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},QA=function(i,r){var o="function"==typeof Symbol&&i[Symbol.iterator];if(!o)return i;var a,c,s=o.call(i),l=[];try{for(;(void 0===r||r-- >0)&&!(a=s.next()).done;)l.push(a.value)}catch(d){c={error:d}}finally{try{a&&!a.done&&(o=s.return)&&o.call(s)}finally{if(c)throw c.error}}return l},_4=function(){for(var i=[],r=0;r<arguments.length;r++)i=i.concat(QA(arguments[r]));return i},b4=function(){for(var i=0,r=0,o=arguments.length;r<o;r++)i+=arguments[r].length;var s=Array(i),a=0;for(r=0;r<o;r++)for(var l=arguments[r],c=0,d=l.length;c<d;c++,a++)s[a]=l[c];return s},v4=function(i,r,o){if(o||2===arguments.length)for(var l,s=0,a=r.length;s<a;s++)(l||!(s in r))&&(l||(l=Array.prototype.slice.call(r,0,s)),l[s]=r[s]);return i.concat(l||Array.prototype.slice.call(r))},Rm=function(i){return this instanceof Rm?(this.v=i,this):new Rm(i)},y4=function(i,r,o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,s=o.apply(i,r||[]),l=[];return a={},c("next"),c("throw"),c("return"),a[Symbol.asyncIterator]=function(){return this},a;function c(b){s[b]&&(a[b]=function(M){return new Promise(function(y,x){l.push([b,M,y,x])>1||d(b,M)})})}function d(b,M){try{!function(b){b.value instanceof Rm?Promise.resolve(b.value.v).then(p,f):m(l[0][2],b)}(s[b](M))}catch(y){m(l[0][3],y)}}function p(b){d("next",b)}function f(b){d("throw",b)}function m(b,M){b(M),l.shift(),l.length&&d(l[0][0],l[0][1])}},x4=function(i){var r,o;return r={},s("next"),s("throw",function(a){throw a}),s("return"),r[Symbol.iterator]=function(){return this},r;function s(a,l){r[a]=i[a]?function(c){return(o=!o)?{value:Rm(i[a](c)),done:!1}:l?l(c):c}:l}},C4=function(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=i[Symbol.asyncIterator];return r?r.call(i):(i=hC(i),o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o);function s(l){o[l]=i[l]&&function(c){return new Promise(function(d,u){!function(l,c,d,u){Promise.resolve(u).then(function(p){l({value:p,done:d})},c)}(d,u,(c=i[l](c)).done,c.value)})}}},M4=function(i,r){return Object.defineProperty?Object.defineProperty(i,"raw",{value:r}):i.raw=r,i};var e=Object.create?function(i,r){Object.defineProperty(i,"default",{enumerable:!0,value:r})}:function(i,r){i.default=r};w4=function(i){if(i&&i.__esModule)return i;var r={};if(null!=i)for(var o in i)"default"!==o&&Object.prototype.hasOwnProperty.call(i,o)&&gC(r,i,o);return e(r,i),r},S4=function(i){return i&&i.__esModule?i:{default:i}},E4=function(i,r,o,s){if("a"===o&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?i!==r||!s:!r.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===o?s:"a"===o?s.call(i):s?s.value:r.get(i)},T4=function(i,r,o,s,a){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?i!==r||!a:!r.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?a.call(i,o):a?a.value=o:r.set(i,o),o},D4=function(i,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof i?r===i:i.has(r)},n("__extends",r4),n("__assign",o4),n("__rest",s4),n("__decorate",a4),n("__param",l4),n("__esDecorate",c4),n("__runInitializers",d4),n("__propKey",u4),n("__setFunctionName",p4),n("__metadata",f4),n("__awaiter",m4),n("__generator",h4),n("__exportStar",g4),n("__createBinding",gC),n("__values",hC),n("__read",QA),n("__spread",_4),n("__spreadArrays",b4),n("__spreadArray",v4),n("__await",Rm),n("__asyncGenerator",y4),n("__asyncDelegator",x4),n("__asyncValues",C4),n("__makeTemplateObject",M4),n("__importStar",w4),n("__importDefault",S4),n("__classPrivateFieldGet",E4),n("__classPrivateFieldSet",T4),n("__classPrivateFieldIn",D4)})}),iG=GV(lk=>{"use strict";var n,fu=lk&&lk.__spreadArray||function(n,t,e){if(e||2===arguments.length)for(var o,i=0,r=t.length;i<r;i++)(o||!(i in t))&&(o||(o=Array.prototype.slice.call(t,0,i)),o[i]=t[i]);return n.concat(o||Array.prototype.slice.call(t))};n=function(){!function(z){var ee=z.performance;function le(gt){ee&&ee.mark&&ee.mark(gt)}function E(gt,me){ee&&ee.measure&&ee.measure(gt,me)}le("Zone");var H=z.__Zone_symbol_prefix||"__zone_symbol__";function Y(gt){return H+gt}var J=!0===z[Y("forceDuplicateZoneCheck")];if(z.Zone){if(J||"function"!=typeof z.Zone.__symbol__)throw new Error("Zone already loaded.");return z.Zone}var se=function(){function gt(me,he){this._parent=me,this._name=he?he.name||"unnamed":"<root>",this._properties=he&&he.properties||{},this._zoneDelegate=new et(this,this._parent&&this._parent._zoneDelegate,he)}return gt.assertZonePatched=function(){if(z.Promise!==kn.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")},Object.defineProperty(gt,"root",{get:function(){for(var me=gt.current;me.parent;)me=me.parent;return me},enumerable:!1,configurable:!0}),Object.defineProperty(gt,"current",{get:function(){return rr.zone},enumerable:!1,configurable:!0}),Object.defineProperty(gt,"currentTask",{get:function(){return ys},enumerable:!1,configurable:!0}),gt.__load_patch=function(me,he,Re){if(void 0===Re&&(Re=!1),kn.hasOwnProperty(me)){if(!Re&&J)throw Error("Already loaded patch: "+me)}else if(!z["__Zone_disable_"+me]){var Sn="Zone:"+me;le(Sn),kn[me]=he(z,gt,pr),E(Sn,Sn)}},Object.defineProperty(gt.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(gt.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),gt.prototype.get=function(me){var he=this.getZoneWith(me);if(he)return he._properties[me]},gt.prototype.getZoneWith=function(me){for(var he=this;he;){if(he._properties.hasOwnProperty(me))return he;he=he._parent}return null},gt.prototype.fork=function(me){if(!me)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,me)},gt.prototype.wrap=function(me,he){if("function"!=typeof me)throw new Error("Expecting function got: "+me);var Re=this._zoneDelegate.intercept(this,me,he),Sn=this;return function(){return Sn.runGuarded(Re,this,arguments,he)}},gt.prototype.run=function(me,he,Re,Sn){rr={parent:rr,zone:this};try{return this._zoneDelegate.invoke(this,me,he,Re,Sn)}finally{rr=rr.parent}},gt.prototype.runGuarded=function(me,he,Re,Sn){void 0===he&&(he=null),rr={parent:rr,zone:this};try{try{return this._zoneDelegate.invoke(this,me,he,Re,Sn)}catch(mr){if(this._zoneDelegate.handleError(this,mr))throw mr}}finally{rr=rr.parent}},gt.prototype.runTask=function(me,he,Re){if(me.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(me.zone||Et).name+"; Execution: "+this.name+")");if(me.state!==pi||me.type!==fi&&me.type!==On){var Sn=me.state!=Wn;Sn&&me._transitionTo(Wn,Vn),me.runCount++;var mr=ys;ys=me,rr={parent:rr,zone:this};try{me.type==On&&me.data&&!me.data.isPeriodic&&(me.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,me,he,Re)}catch(ul){if(this._zoneDelegate.handleError(this,ul))throw ul}}finally{me.state!==pi&&me.state!==Ni&&(me.type==fi||me.data&&me.data.isPeriodic?Sn&&me._transitionTo(Vn,Wn):(me.runCount=0,this._updateTaskCount(me,-1),Sn&&me._transitionTo(pi,Wn,pi))),rr=rr.parent,ys=mr}}},gt.prototype.scheduleTask=function(me){if(me.zone&&me.zone!==this)for(var he=this;he;){if(he===me.zone)throw Error("can not reschedule task to ".concat(this.name," which is descendants of the original zone ").concat(me.zone.name));he=he.parent}me._transitionTo(Qn,pi);var Re=[];me._zoneDelegates=Re,me._zone=this;try{me=this._zoneDelegate.scheduleTask(this,me)}catch(Sn){throw me._transitionTo(Ni,Qn,pi),this._zoneDelegate.handleError(this,Sn),Sn}return me._zoneDelegates===Re&&this._updateTaskCount(me,1),me.state==Qn&&me._transitionTo(Vn,Qn),me},gt.prototype.scheduleMicroTask=function(me,he,Re,Sn){return this.scheduleTask(new qe(vn,me,he,Re,Sn,void 0))},gt.prototype.scheduleMacroTask=function(me,he,Re,Sn,mr){return this.scheduleTask(new qe(On,me,he,Re,Sn,mr))},gt.prototype.scheduleEventTask=function(me,he,Re,Sn,mr){return this.scheduleTask(new qe(fi,me,he,Re,Sn,mr))},gt.prototype.cancelTask=function(me){if(me.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(me.zone||Et).name+"; Execution: "+this.name+")");if(me.state===Vn||me.state===Wn){me._transitionTo(Ut,Vn,Wn);try{this._zoneDelegate.cancelTask(this,me)}catch(he){throw me._transitionTo(Ni,Ut),this._zoneDelegate.handleError(this,he),he}return this._updateTaskCount(me,-1),me._transitionTo(pi,Ut),me.runCount=0,me}},gt.prototype._updateTaskCount=function(me,he){var Re=me._zoneDelegates;-1==he&&(me._zoneDelegates=null);for(var Sn=0;Sn<Re.length;Sn++)Re[Sn]._updateTaskCount(me.type,he)},gt}();se.__symbol__=Y;var Gi,ze={name:"",onHasTask:function(gt,me,he,Re){return gt.hasTask(he,Re)},onScheduleTask:function(gt,me,he,Re){return gt.scheduleTask(he,Re)},onInvokeTask:function(gt,me,he,Re,Sn,mr){return gt.invokeTask(he,Re,Sn,mr)},onCancelTask:function(gt,me,he,Re){return gt.cancelTask(he,Re)}},et=function(){function gt(me,he,Re){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=me,this._parentDelegate=he,this._forkZS=Re&&(Re&&Re.onFork?Re:he._forkZS),this._forkDlgt=Re&&(Re.onFork?he:he._forkDlgt),this._forkCurrZone=Re&&(Re.onFork?this.zone:he._forkCurrZone),this._interceptZS=Re&&(Re.onIntercept?Re:he._interceptZS),this._interceptDlgt=Re&&(Re.onIntercept?he:he._interceptDlgt),this._interceptCurrZone=Re&&(Re.onIntercept?this.zone:he._interceptCurrZone),this._invokeZS=Re&&(Re.onInvoke?Re:he._invokeZS),this._invokeDlgt=Re&&(Re.onInvoke?he:he._invokeDlgt),this._invokeCurrZone=Re&&(Re.onInvoke?this.zone:he._invokeCurrZone),this._handleErrorZS=Re&&(Re.onHandleError?Re:he._handleErrorZS),this._handleErrorDlgt=Re&&(Re.onHandleError?he:he._handleErrorDlgt),this._handleErrorCurrZone=Re&&(Re.onHandleError?this.zone:he._handleErrorCurrZone),this._scheduleTaskZS=Re&&(Re.onScheduleTask?Re:he._scheduleTaskZS),this._scheduleTaskDlgt=Re&&(Re.onScheduleTask?he:he._scheduleTaskDlgt),this._scheduleTaskCurrZone=Re&&(Re.onScheduleTask?this.zone:he._scheduleTaskCurrZone),this._invokeTaskZS=Re&&(Re.onInvokeTask?Re:he._invokeTaskZS),this._invokeTaskDlgt=Re&&(Re.onInvokeTask?he:he._invokeTaskDlgt),this._invokeTaskCurrZone=Re&&(Re.onInvokeTask?this.zone:he._invokeTaskCurrZone),this._cancelTaskZS=Re&&(Re.onCancelTask?Re:he._cancelTaskZS),this._cancelTaskDlgt=Re&&(Re.onCancelTask?he:he._cancelTaskDlgt),this._cancelTaskCurrZone=Re&&(Re.onCancelTask?this.zone:he._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;var Sn=Re&&Re.onHasTask;(Sn||he&&he._hasTaskZS)&&(this._hasTaskZS=Sn?Re:ze,this._hasTaskDlgt=he,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=me,Re.onScheduleTask||(this._scheduleTaskZS=ze,this._scheduleTaskDlgt=he,this._scheduleTaskCurrZone=this.zone),Re.onInvokeTask||(this._invokeTaskZS=ze,this._invokeTaskDlgt=he,this._invokeTaskCurrZone=this.zone),Re.onCancelTask||(this._cancelTaskZS=ze,this._cancelTaskDlgt=he,this._cancelTaskCurrZone=this.zone))}return gt.prototype.fork=function(me,he){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,me,he):new se(me,he)},gt.prototype.intercept=function(me,he,Re){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,me,he,Re):he},gt.prototype.invoke=function(me,he,Re,Sn,mr){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,me,he,Re,Sn,mr):he.apply(Re,Sn)},gt.prototype.handleError=function(me,he){return!this._handleErrorZS||this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,me,he)},gt.prototype.scheduleTask=function(me,he){var Re=he;if(this._scheduleTaskZS)this._hasTaskZS&&Re._zoneDelegates.push(this._hasTaskDlgtOwner),(Re=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,me,he))||(Re=he);else if(he.scheduleFn)he.scheduleFn(he);else{if(he.type!=vn)throw new Error("Task is missing scheduleFn.");pn(he)}return Re},gt.prototype.invokeTask=function(me,he,Re,Sn){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,me,he,Re,Sn):he.callback.apply(Re,Sn)},gt.prototype.cancelTask=function(me,he){var Re;if(this._cancelTaskZS)Re=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,me,he);else{if(!he.cancelFn)throw Error("Task is not cancelable");Re=he.cancelFn(he)}return Re},gt.prototype.hasTask=function(me,he){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,me,he)}catch(Re){this.handleError(me,Re)}},gt.prototype._updateTaskCount=function(me,he){var Re=this._taskCounts,Sn=Re[me],mr=Re[me]=Sn+he;if(mr<0)throw new Error("More tasks executed then were scheduled.");0!=Sn&&0!=mr||this.hasTask(this.zone,{microTask:Re.microTask>0,macroTask:Re.macroTask>0,eventTask:Re.eventTask>0,change:me})},gt}(),qe=function(){function gt(me,he,Re,Sn,mr,ul){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=me,this.source=he,this.data=Sn,this.scheduleFn=mr,this.cancelFn=ul,!Re)throw new Error("callback is not defined");this.callback=Re;var tt=this;this.invoke=me===fi&&Sn&&Sn.useG?gt.invokeTask:function(){return gt.invokeTask.call(z,tt,this,arguments)}}return gt.invokeTask=function(me,he,Re){me||(me=this),Mr++;try{return me.runCount++,me.zone.runTask(me,he,Re)}finally{1==Mr&&Pn(),Mr--}},Object.defineProperty(gt.prototype,"zone",{get:function(){return this._zone},enumerable:!1,configurable:!0}),Object.defineProperty(gt.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),gt.prototype.cancelScheduleRequest=function(){this._transitionTo(pi,Qn)},gt.prototype._transitionTo=function(me,he,Re){if(this._state!==he&&this._state!==Re)throw new Error("".concat(this.type," '").concat(this.source,"': can not transition to '").concat(me,"', expecting state '").concat(he,"'").concat(Re?" or '"+Re+"'":"",", was '").concat(this._state,"'."));this._state=me,me==pi&&(this._zoneDelegates=null)},gt.prototype.toString=function(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)},gt.prototype.toJSON=function(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}},gt}(),rt=Y("setTimeout"),dt=Y("Promise"),St=Y("then"),Dt=[],cn=!1;function vi(gt){if(Gi||z[dt]&&(Gi=z[dt].resolve(0)),Gi){var me=Gi[St];me||(me=Gi.then),me.call(Gi,gt)}else z[rt](gt,0)}function pn(gt){0===Mr&&0===Dt.length&&vi(Pn),gt&&Dt.push(gt)}function Pn(){if(!cn){for(cn=!0;Dt.length;){var gt=Dt;Dt=[];for(var me=0;me<gt.length;me++){var he=gt[me];try{he.zone.runTask(he,null,null)}catch(Re){pr.onUnhandledError(Re)}}}pr.microtaskDrainDone(),cn=!1}}var Et={name:"NO ZONE"},pi="notScheduled",Qn="scheduling",Vn="scheduled",Wn="running",Ut="canceling",Ni="unknown",vn="microTask",On="macroTask",fi="eventTask",kn={},pr={symbol:Y,currentZoneFrame:function(){return rr},onUnhandledError:fr,microtaskDrainDone:fr,scheduleMicroTask:pn,showUncaughtError:function(){return!se[Y("ignoreConsoleErrorUncaughtError")]},patchEventTarget:function(){return[]},patchOnProperties:fr,patchMethod:function(){return fr},bindArguments:function(){return[]},patchThen:function(){return fr},patchMacroTask:function(){return fr},patchEventPrototype:function(){return fr},isIEOrEdge:function(){return!1},getGlobalObjects:function(){},ObjectDefineProperty:function(){return fr},ObjectGetOwnPropertyDescriptor:function(){},ObjectCreate:function(){},ArraySlice:function(){return[]},patchClass:function(){return fr},wrapWithCurrentZone:function(){return fr},filterProperties:function(){return[]},attachOriginToPatched:function(){return fr},_redefineProperty:function(){return fr},patchCallbacks:function(){return fr},nativeScheduleMicroTask:vi},rr={parent:null,zone:new se(null,null)},ys=null,Mr=0;function fr(){}E("Zone","Zone"),z.Zone=se}(typeof window<"u"&&window||typeof self<"u"&&self||global);var n=Object.getOwnPropertyDescriptor,t=Object.defineProperty,e=Object.getPrototypeOf,i=Object.create,r=Array.prototype.slice,o="addEventListener",s="removeEventListener",a=Zone.__symbol__(o),l=Zone.__symbol__(s),c="true",d="false",u=Zone.__symbol__("");function p(z,ee){return Zone.current.wrap(z,ee)}function f(z,ee,le,E,H){return Zone.current.scheduleMacroTask(z,ee,le,E,H)}var m=Zone.__symbol__,b=typeof window<"u",M=b?window:void 0,y=b&&M||"object"==typeof self&&self||global,x="removeAttribute";function R(z,ee){for(var le=z.length-1;le>=0;le--)"function"==typeof z[le]&&(z[le]=p(z[le],ee+"_"+le));return z}function V(z){return!z||!1!==z.writable&&!("function"==typeof z.get&&typeof z.set>"u")}var te=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,K=!("nw"in y)&&typeof y.process<"u"&&"[object process]"==={}.toString.call(y.process),xe=!K&&!te&&!(!b||!M.HTMLElement),Xe=typeof y.process<"u"&&"[object process]"==={}.toString.call(y.process)&&!te&&!(!b||!M.HTMLElement),De={},D=function(z){if(z=z||y.event){var ee=De[z.type];ee||(ee=De[z.type]=m("ON_PROPERTY"+z.type));var H,le=this||z.target||y,E=le[ee];return xe&&le===M&&"error"===z.type?!0===(H=E&&E.call(this,z.message,z.filename,z.lineno,z.colno,z.error))&&z.preventDefault():null!=(H=E&&E.apply(this,arguments))&&!H&&z.preventDefault(),H}};function re(z,ee,le){var E=n(z,ee);if(!E&&le&&n(le,ee)&&(E={enumerable:!0,configurable:!0}),E&&E.configurable){var Y=m("on"+ee+"patched");if(!z.hasOwnProperty(Y)||!z[Y]){delete E.writable,delete E.value;var J=E.get,se=E.set,ze=ee.slice(2),et=De[ze];et||(et=De[ze]=m("ON_PROPERTY"+ze)),E.set=function(qe){var rt=this;!rt&&z===y&&(rt=y),rt&&("function"==typeof rt[et]&&rt.removeEventListener(ze,D),se&&se.call(rt,null),rt[et]=qe,"function"==typeof qe&&rt.addEventListener(ze,D,!1))},E.get=function(){var qe=this;if(!qe&&z===y&&(qe=y),!qe)return null;var rt=qe[et];if(rt)return rt;if(J){var dt=J.call(this);if(dt)return E.set.call(this,dt),"function"==typeof qe[x]&&qe.removeAttribute(ee),dt}return null},t(z,ee,E),z[Y]=!0}}}function ce(z,ee,le){if(ee)for(var E=0;E<ee.length;E++)re(z,"on"+ee[E],le);else{var H=[];for(var Y in z)"on"==Y.slice(0,2)&&H.push(Y);for(var J=0;J<H.length;J++)re(z,H[J],le)}}var fe=m("originalInstance");function be(z){var ee=y[z];if(ee){y[m(z)]=ee,y[z]=function(){var H=R(arguments,z);switch(H.length){case 0:this[fe]=new ee;break;case 1:this[fe]=new ee(H[0]);break;case 2:this[fe]=new ee(H[0],H[1]);break;case 3:this[fe]=new ee(H[0],H[1],H[2]);break;case 4:this[fe]=new ee(H[0],H[1],H[2],H[3]);break;default:throw new Error("Arg list too long.")}},pe(y[z],ee);var E,le=new ee(function(){});for(E in le)"XMLHttpRequest"===z&&"responseBlob"===E||function(H){"function"==typeof le[H]?y[z].prototype[H]=function(){return this[fe][H].apply(this[fe],arguments)}:t(y[z].prototype,H,{set:function(Y){"function"==typeof Y?(this[fe][H]=p(Y,z+"."+H),pe(this[fe][H],Y)):this[fe][H]=Y},get:function(){return this[fe][H]}})}(E);for(E in ee)"prototype"!==E&&ee.hasOwnProperty(E)&&(y[z][E]=ee[E])}}function ne(z,ee,le){for(var E=z;E&&!E.hasOwnProperty(ee);)E=e(E);!E&&z[ee]&&(E=z);var H=m(ee),Y=null;if(E&&(!(Y=E[H])||!E.hasOwnProperty(H))&&(Y=E[H]=E[ee],V(E&&n(E,ee)))){var se=le(Y,H,ee);E[ee]=function(){return se(this,arguments)},pe(E[ee],Y)}return Y}function de(z,ee,le){var E=null;function H(Y){var J=Y.data;return J.args[J.cbIdx]=function(){Y.invoke.apply(this,arguments)},E.apply(J.target,J.args),Y}E=ne(z,ee,function(Y){return function(J,se){var ze=le(J,se);return ze.cbIdx>=0&&"function"==typeof se[ze.cbIdx]?f(ze.name,se[ze.cbIdx],ze,H):Y.apply(J,se)}})}function pe(z,ee){z[m("OriginalDelegate")]=ee}var je=!1,Ce=!1;function lt(){if(je)return Ce;je=!0;try{var z=M.navigator.userAgent;(-1!==z.indexOf("MSIE ")||-1!==z.indexOf("Trident/")||-1!==z.indexOf("Edge/"))&&(Ce=!0)}catch{}return Ce}Zone.__load_patch("ZoneAwarePromise",function(z,ee,le){var E=Object.getOwnPropertyDescriptor,H=Object.defineProperty,J=le.symbol,se=[],ze=!0===z[J("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")],et=J("Promise"),qe=J("then"),rt="__creationTrace__";le.onUnhandledError=function(tt){if(le.showUncaughtError()){var At=tt&&tt.rejection;At?console.error("Unhandled Promise rejection:",At instanceof Error?At.message:At,"; Zone:",tt.zone.name,"; Task:",tt.task&&tt.task.source,"; Value:",At,At instanceof Error?At.stack:void 0):console.error(tt)}},le.microtaskDrainDone=function(){for(var tt=function(){var At=se.shift();try{At.zone.runGuarded(function(){throw At.throwOriginal?At.rejection:At})}catch(Ct){!function(tt){le.onUnhandledError(tt);try{var At=ee[dt];"function"==typeof At&&At.call(this,tt)}catch{}}(Ct)}};se.length;)tt()};var dt=J("unhandledPromiseRejectionHandler");function Dt(tt){return tt&&tt.then}function cn(tt){return tt}function Gi(tt){return he.reject(tt)}var vi=J("state"),pn=J("value"),Pn=J("finally"),Et=J("parentPromiseValue"),pi=J("parentPromiseState"),Qn="Promise.then",Vn=null,Wn=!0,Ut=!1,Ni=0;function vn(tt,At){return function(Ct){try{pr(tt,At,Ct)}catch(Je){pr(tt,!1,Je)}}}var On=function(){var tt=!1;return function(Ct){return function(){tt||(tt=!0,Ct.apply(null,arguments))}}},fi="Promise resolved with itself",kn=J("currentTaskTrace");function pr(tt,At,Ct){var Je=On();if(tt===Ct)throw new TypeError(fi);if(tt[vi]===Vn){var Zt=null;try{("object"==typeof Ct||"function"==typeof Ct)&&(Zt=Ct&&Ct.then)}catch(ni){return Je(function(){pr(tt,!1,ni)})(),tt}if(At!==Ut&&Ct instanceof he&&Ct.hasOwnProperty(vi)&&Ct.hasOwnProperty(pn)&&Ct[vi]!==Vn)ys(Ct),pr(tt,Ct[vi],Ct[pn]);else if(At!==Ut&&"function"==typeof Zt)try{Zt.call(Ct,Je(vn(tt,At)),Je(vn(tt,!1)))}catch(ni){Je(function(){pr(tt,!1,ni)})()}else{tt[vi]=At;var Bn=tt[pn];if(tt[pn]=Ct,tt[Pn]===Pn&&At===Wn&&(tt[vi]=tt[pi],tt[pn]=tt[Et]),At===Ut&&Ct instanceof Error){var Rn=ee.currentTask&&ee.currentTask.data&&ee.currentTask.data[rt];Rn&&H(Ct,kn,{configurable:!0,enumerable:!1,writable:!0,value:Rn})}for(var Zn=0;Zn<Bn.length;)Mr(tt,Bn[Zn++],Bn[Zn++],Bn[Zn++],Bn[Zn++]);if(0==Bn.length&&At==Ut){tt[vi]=Ni;var Kn=Ct;try{throw new Error("Uncaught (in promise): "+function(tt){return tt&&tt.toString===Object.prototype.toString?(tt.constructor&&tt.constructor.name||"")+": "+JSON.stringify(tt):tt?tt.toString():Object.prototype.toString.call(tt)}(Ct)+(Ct&&Ct.stack?"\n"+Ct.stack:""))}catch(ni){Kn=ni}ze&&(Kn.throwOriginal=!0),Kn.rejection=Ct,Kn.promise=tt,Kn.zone=ee.current,Kn.task=ee.currentTask,se.push(Kn),le.scheduleMicroTask()}}}return tt}var rr=J("rejectionHandledHandler");function ys(tt){if(tt[vi]===Ni){try{var At=ee[rr];At&&"function"==typeof At&&At.call(this,{rejection:tt[pn],promise:tt})}catch{}tt[vi]=Ut;for(var Ct=0;Ct<se.length;Ct++)tt===se[Ct].promise&&se.splice(Ct,1)}}function Mr(tt,At,Ct,Je,Zt){ys(tt);var Bn=tt[vi],Rn=Bn?"function"==typeof Je?Je:cn:"function"==typeof Zt?Zt:Gi;At.scheduleMicroTask(Qn,function(){try{var Zn=tt[pn],Kn=!!Ct&&Pn===Ct[Pn];Kn&&(Ct[Et]=Zn,Ct[pi]=Bn);var ni=At.run(Rn,void 0,Kn&&Rn!==Gi&&Rn!==cn?[]:[Zn]);pr(Ct,!0,ni)}catch(yi){pr(Ct,!1,yi)}},Ct)}var gt=function(){},me=z.AggregateError,he=function(){function tt(At){var Ct=this;if(!(Ct instanceof tt))throw new Error("Must be an instanceof Promise.");Ct[vi]=Vn,Ct[pn]=[];try{var Je=On();At&&At(Je(vn(Ct,Wn)),Je(vn(Ct,Ut)))}catch(Zt){pr(Ct,!1,Zt)}}return tt.toString=function(){return"function ZoneAwarePromise() { [native code] }"},tt.resolve=function(At){return pr(new this(null),Wn,At)},tt.reject=function(At){return pr(new this(null),Ut,At)},tt.any=function(At){if(!At||"function"!=typeof At[Symbol.iterator])return Promise.reject(new me([],"All promises were rejected"));var Ct=[],Je=0;try{for(var Zt=0,Bn=At;Zt<Bn.length;Zt++)Je++,Ct.push(tt.resolve(Bn[Zt]))}catch{return Promise.reject(new me([],"All promises were rejected"))}if(0===Je)return Promise.reject(new me([],"All promises were rejected"));var Zn=!1,Kn=[];return new tt(function(ni,yi){for(var hr=0;hr<Ct.length;hr++)Ct[hr].then(function(Ro){Zn||(Zn=!0,ni(Ro))},function(Ro){Kn.push(Ro),0==--Je&&(Zn=!0,yi(new me(Kn,"All promises were rejected")))})})},tt.race=function(At){var Ct,Je,Zt=new this(function(yi,hr){Ct=yi,Je=hr});function Bn(yi){Ct(yi)}function Rn(yi){Je(yi)}for(var Zn=0,Kn=At;Zn<Kn.length;Zn++){var ni=Kn[Zn];Dt(ni)||(ni=this.resolve(ni)),ni.then(Bn,Rn)}return Zt},tt.all=function(At){return tt.allWithCallback(At)},tt.allSettled=function(At){return(this&&this.prototype instanceof tt?this:tt).allWithCallback(At,{thenCallback:function(Je){return{status:"fulfilled",value:Je}},errorCallback:function(Je){return{status:"rejected",reason:Je}}})},tt.allWithCallback=function(At,Ct){for(var Je,Zt,Bn=new this(function(Kr,vo){Je=Kr,Zt=vo}),Rn=2,Zn=0,Kn=[],ni=function(Kr){Dt(Kr)||(Kr=yi.resolve(Kr));var vo=Zn;try{Kr.then(function(Hr){Kn[vo]=Ct?Ct.thenCallback(Hr):Hr,0==--Rn&&Je(Kn)},function(Hr){Ct?(Kn[vo]=Ct.errorCallback(Hr),0==--Rn&&Je(Kn)):Zt(Hr)})}catch(Hr){Zt(Hr)}Rn++,Zn++},yi=this,hr=0,Ro=At;hr<Ro.length;hr++)ni(Ro[hr]);return 0==(Rn-=2)&&Je(Kn),Bn},Object.defineProperty(tt.prototype,Symbol.toStringTag,{get:function(){return"Promise"},enumerable:!1,configurable:!0}),Object.defineProperty(tt.prototype,Symbol.species,{get:function(){return tt},enumerable:!1,configurable:!0}),tt.prototype.then=function(At,Ct){var Je,Zt=null===(Je=this.constructor)||void 0===Je?void 0:Je[Symbol.species];(!Zt||"function"!=typeof Zt)&&(Zt=this.constructor||tt);var Bn=new Zt(gt),Rn=ee.current;return this[vi]==Vn?this[pn].push(Rn,Bn,At,Ct):Mr(this,Rn,Bn,At,Ct),Bn},tt.prototype.catch=function(At){return this.then(null,At)},tt.prototype.finally=function(At){var Ct,Je=null===(Ct=this.constructor)||void 0===Ct?void 0:Ct[Symbol.species];(!Je||"function"!=typeof Je)&&(Je=tt);var Zt=new Je(gt);Zt[Pn]=Pn;var Bn=ee.current;return this[vi]==Vn?this[pn].push(Bn,Zt,At,At):Mr(this,Bn,Zt,At,At),Zt},tt}();he.resolve=he.resolve,he.reject=he.reject,he.race=he.race,he.all=he.all;var Re=z[et]=z.Promise;z.Promise=he;var Sn=J("thenPatched");function mr(tt){var At=tt.prototype,Ct=E(At,"then");if(!Ct||!1!==Ct.writable&&Ct.configurable){var Je=At.then;At[qe]=Je,tt.prototype.then=function(Zt,Bn){var Rn=this;return new he(function(Kn,ni){Je.call(Rn,Kn,ni)}).then(Zt,Bn)},tt[Sn]=!0}}return le.patchThen=mr,Re&&(mr(Re),ne(z,"fetch",function(tt){return function(tt){return function(At,Ct){var Je=tt.apply(At,Ct);if(Je instanceof he)return Je;var Zt=Je.constructor;return Zt[Sn]||mr(Zt),Je}}(tt)})),Promise[ee.__symbol__("uncaughtPromiseErrors")]=se,he}),Zone.__load_patch("toString",function(z){var ee=Function.prototype.toString,le=m("OriginalDelegate"),E=m("Promise"),H=m("Error"),Y=function(){if("function"==typeof this){var et=this[le];if(et)return"function"==typeof et?ee.call(et):Object.prototype.toString.call(et);if(this===Promise){var qe=z[E];if(qe)return ee.call(qe)}if(this===Error){var rt=z[H];if(rt)return ee.call(rt)}}return ee.call(this)};Y[le]=ee,Function.prototype.toString=Y;var J=Object.prototype.toString;Object.prototype.toString=function(){return"function"==typeof Promise&&this instanceof Promise?"[object Promise]":J.call(this)}});var Mt=!1;if(typeof window<"u")try{var pt=Object.defineProperty({},"passive",{get:function(){Mt=!0}});window.addEventListener("test",pt,pt),window.removeEventListener("test",pt,pt)}catch{Mt=!1}var ti,ki,Fi,Z,L,Oe={useG:!0},An={},wt={},on=new RegExp("^"+u+"(\\w+)(true|false)$"),ve=m("propagationStopped");function mt(z,ee){var le=(ee?ee(z):z)+d,E=(ee?ee(z):z)+c,H=u+le,Y=u+E;An[z]={},An[z][d]=H,An[z][c]=Y}function ft(z,ee,le,E){var H=E&&E.add||o,Y=E&&E.rm||s,J=E&&E.listeners||"eventListeners",se=E&&E.rmAll||"removeAllListeners",ze=m(H),et="."+H+":",qe="prependListener",rt="."+qe+":",dt=function(Pn,Et,pi){if(!Pn.isRemoved){var Vn,Qn=Pn.callback;"object"==typeof Qn&&Qn.handleEvent&&(Pn.callback=function(Ni){return Qn.handleEvent(Ni)},Pn.originalDelegate=Qn);try{Pn.invoke(Pn,Et,[pi])}catch(Ni){Vn=Ni}var Wn=Pn.options;return Wn&&"object"==typeof Wn&&Wn.once&&Et[Y].call(Et,pi.type,Pn.originalDelegate?Pn.originalDelegate:Pn.callback,Wn),Vn}};function St(Pn,Et,pi){if(Et=Et||z.event){var Qn=Pn||Et.target||z,Vn=Qn[An[Et.type][pi?c:d]];if(Vn){var Wn=[];if(1===Vn.length)(Ut=dt(Vn[0],Qn,Et))&&Wn.push(Ut);else for(var Ni=Vn.slice(),vn=0;vn<Ni.length&&(!Et||!0!==Et[ve]);vn++){var Ut;(Ut=dt(Ni[vn],Qn,Et))&&Wn.push(Ut)}if(1===Wn.length)throw Wn[0];var On=function(fi){var kn=Wn[fi];ee.nativeScheduleMicroTask(function(){throw kn})};for(vn=0;vn<Wn.length;vn++)On(vn)}}}var Dt=function(Pn){return St(this,Pn,!1)},cn=function(Pn){return St(this,Pn,!0)};function Gi(Pn,Et){if(!Pn)return!1;var pi=!0;Et&&void 0!==Et.useG&&(pi=Et.useG);var Qn=Et&&Et.vh,Vn=!0;Et&&void 0!==Et.chkDup&&(Vn=Et.chkDup);var Wn=!1;Et&&void 0!==Et.rt&&(Wn=Et.rt);for(var Ut=Pn;Ut&&!Ut.hasOwnProperty(H);)Ut=e(Ut);if(!Ut&&Pn[H]&&(Ut=Pn),!Ut||Ut[ze])return!1;var rr,Ni=Et&&Et.eventNameToString,vn={},On=Ut[ze]=Ut[H],fi=Ut[m(Y)]=Ut[Y],kn=Ut[m(J)]=Ut[J],pr=Ut[m(se)]=Ut[se];Et&&Et.prepend&&(rr=Ut[m(Et.prepend)]=Ut[Et.prepend]);var Re=pi?function(Je){if(!vn.isExisting)return On.call(vn.target,vn.eventName,vn.capture?cn:Dt,vn.options)}:function(Je){return On.call(vn.target,vn.eventName,Je.invoke,vn.options)},Sn=pi?function(Je){if(!Je.isRemoved){var Zt=An[Je.eventName],Bn=void 0;Zt&&(Bn=Zt[Je.capture?c:d]);var Rn=Bn&&Je.target[Bn];if(Rn)for(var Zn=0;Zn<Rn.length;Zn++)if(Rn[Zn]===Je){Rn.splice(Zn,1),Je.isRemoved=!0,0===Rn.length&&(Je.allRemoved=!0,Je.target[Bn]=null);break}}if(Je.allRemoved)return fi.call(Je.target,Je.eventName,Je.capture?cn:Dt,Je.options)}:function(Je){return fi.call(Je.target,Je.eventName,Je.invoke,Je.options)},ul=Et&&Et.diff?Et.diff:function(Je,Zt){var Bn=typeof Zt;return"function"===Bn&&Je.callback===Zt||"object"===Bn&&Je.originalDelegate===Zt},tt=Zone[m("UNPATCHED_EVENTS")],At=z[m("PASSIVE_EVENTS")],Ct=function(Je,Zt,Bn,Rn,Zn,Kn){return void 0===Zn&&(Zn=!1),void 0===Kn&&(Kn=!1),function(){var ni=this||z,yi=arguments[0];Et&&Et.transferEventName&&(yi=Et.transferEventName(yi));var hr=arguments[1];if(!hr)return Je.apply(this,arguments);if(K&&"uncaughtException"===yi)return Je.apply(this,arguments);var Ro=!1;if("function"!=typeof hr){if(!hr.handleEvent)return Je.apply(this,arguments);Ro=!0}if(!Qn||Qn(Je,hr,ni,arguments)){var Kc=Mt&&!!At&&-1!==At.indexOf(yi),Kr=function(Je,Zt){return!Mt&&"object"==typeof Je&&Je?!!Je.capture:Mt&&Zt?"boolean"==typeof Je?{capture:Je,passive:!0}:Je?"object"==typeof Je&&!1!==Je.passive?Object.assign(Object.assign({},Je),{passive:!0}):Je:{passive:!0}:Je}(arguments[2],Kc);if(tt)for(var vo=0;vo<tt.length;vo++)if(yi===tt[vo])return Kc?Je.call(ni,yi,hr,Kr):Je.apply(this,arguments);var Hr=!!Kr&&("boolean"==typeof Kr||Kr.capture),Mm=!(!Kr||"object"!=typeof Kr)&&Kr.once,Die=Zone.current,OA=An[yi];OA||(mt(yi,Ni),OA=An[yi]);var HV=OA[Hr?c:d],wm=ni[HV],zV=!1;if(wm){if(zV=!0,Vn)for(vo=0;vo<wm.length;vo++)if(ul(wm[vo],hr))return}else wm=ni[HV]=[];var tC,UV=ni.constructor.name,jV=wt[UV];jV&&(tC=jV[yi]),tC||(tC=UV+Zt+(Ni?Ni(yi):yi)),vn.options=Kr,Mm&&(vn.options.once=!1),vn.target=ni,vn.capture=Hr,vn.eventName=yi,vn.isExisting=zV;var C_=pi?Oe:void 0;C_&&(C_.taskData=vn);var Qd=Die.scheduleEventTask(tC,hr,C_,Bn,Rn);if(vn.target=null,C_&&(C_.taskData=null),Mm&&(Kr.once=!0),!Mt&&"boolean"==typeof Qd.options||(Qd.options=Kr),Qd.target=ni,Qd.capture=Hr,Qd.eventName=yi,Ro&&(Qd.originalDelegate=hr),Kn?wm.unshift(Qd):wm.push(Qd),Zn)return ni}}};return Ut[H]=Ct(On,et,Re,Sn,Wn),rr&&(Ut[qe]=Ct(rr,rt,function(Je){return rr.call(vn.target,vn.eventName,Je.invoke,vn.options)},Sn,Wn,!0)),Ut[Y]=function(){var Je=this||z,Zt=arguments[0];Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));var Bn=arguments[2],Rn=!!Bn&&("boolean"==typeof Bn||Bn.capture),Zn=arguments[1];if(!Zn)return fi.apply(this,arguments);if(!Qn||Qn(fi,Zn,Je,arguments)){var ni,Kn=An[Zt];Kn&&(ni=Kn[Rn?c:d]);var yi=ni&&Je[ni];if(yi)for(var hr=0;hr<yi.length;hr++){var Ro=yi[hr];if(ul(Ro,Zn))return yi.splice(hr,1),Ro.isRemoved=!0,0===yi.length&&(Ro.allRemoved=!0,Je[ni]=null,"string"==typeof Zt)&&(Je[u+"ON_PROPERTY"+Zt]=null),Ro.zone.cancelTask(Ro),Wn?Je:void 0}return fi.apply(this,arguments)}},Ut[J]=function(){var Je=this||z,Zt=arguments[0];Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));for(var Bn=[],Rn=oe(Je,Ni?Ni(Zt):Zt),Zn=0;Zn<Rn.length;Zn++){var Kn=Rn[Zn];Bn.push(Kn.originalDelegate?Kn.originalDelegate:Kn.callback)}return Bn},Ut[se]=function(){var Je=this||z,Zt=arguments[0];if(Zt){Et&&Et.transferEventName&&(Zt=Et.transferEventName(Zt));var yi=An[Zt];if(yi){var Kc=Je[yi[d]],Kr=Je[yi[c]];if(Kc)for(var vo=Kc.slice(),Rn=0;Rn<vo.length;Rn++)this[Y].call(this,Zt,(Hr=vo[Rn]).originalDelegate?Hr.originalDelegate:Hr.callback,Hr.options);if(Kr)for(vo=Kr.slice(),Rn=0;Rn<vo.length;Rn++){var Hr;this[Y].call(this,Zt,(Hr=vo[Rn]).originalDelegate?Hr.originalDelegate:Hr.callback,Hr.options)}}}else{var Bn=Object.keys(Je);for(Rn=0;Rn<Bn.length;Rn++){var Kn=on.exec(Bn[Rn]),ni=Kn&&Kn[1];ni&&"removeListener"!==ni&&this[se].call(this,ni)}this[se].call(this,"removeListener")}if(Wn)return this},pe(Ut[H],On),pe(Ut[Y],fi),pr&&pe(Ut[se],pr),kn&&pe(Ut[J],kn),!0}for(var vi=[],pn=0;pn<le.length;pn++)vi[pn]=Gi(le[pn],E);return vi}function oe(z,ee){if(!ee){var le=[];for(var E in z){var H=on.exec(E),Y=H&&H[1];if(Y&&(!ee||Y===ee)){var J=z[E];if(J)for(var se=0;se<J.length;se++)le.push(J[se])}}return le}var ze=An[ee];ze||(mt(ee),ze=An[ee]);var et=z[ze[d]],qe=z[ze[c]];return et?qe?et.concat(qe):et.slice():qe?qe.slice():[]}function st(z,ee){var le=z.Event;le&&le.prototype&&ee.patchMethod(le.prototype,"stopImmediatePropagation",function(E){return function(H,Y){H[ve]=!0,E&&E.apply(H,Y)}})}function Ye(z,ee,le,E,H){var Y=Zone.__symbol__(E);if(!ee[Y]){var J=ee[Y]=ee[E];ee[E]=function(se,ze,et){return ze&&ze.prototype&&H.forEach(function(qe){var rt="".concat(le,".").concat(E,"::")+qe,dt=ze.prototype;try{if(dt.hasOwnProperty(qe)){var St=z.ObjectGetOwnPropertyDescriptor(dt,qe);St&&St.value?(St.value=z.wrapWithCurrentZone(St.value,rt),z._redefineProperty(ze.prototype,qe,St)):dt[qe]&&(dt[qe]=z.wrapWithCurrentZone(dt[qe],rt))}else dt[qe]&&(dt[qe]=z.wrapWithCurrentZone(dt[qe],rt))}catch{}}),J.call(ee,se,ze,et)},z.attachOriginToPatched(ee[E],J)}}function _t(z,ee,le){if(!le||0===le.length)return ee;var E=le.filter(function(Y){return Y.target===z});if(!E||0===E.length)return ee;var H=E[0].ignoreProperties;return ee.filter(function(Y){return-1===H.indexOf(Y)})}function ut(z,ee,le,E){z&&ce(z,_t(z,ee,le),E)}function sn(z){return Object.getOwnPropertyNames(z).filter(function(ee){return ee.startsWith("on")&&ee.length>2}).map(function(ee){return ee.substring(2)})}function vt(z,ee,le){var E=le.configurable;return mn(z,ee,le=Le(z,ee,le),E)}function en(z,ee){return z&&z[L]&&z[L][ee]}function Le(z,ee,le){return Object.isFrozen(le)||(le.configurable=!0),le.configurable||(!z[L]&&!Object.isFrozen(z)&&ki(z,L,{writable:!0,value:{}}),z[L]&&(z[L][ee]=!0)),le}function mn(z,ee,le,E){try{return ki(z,ee,le)}catch(J){if(!le.configurable)throw J;typeof E>"u"?delete le.configurable:le.configurable=E;try{return ki(z,ee,le)}catch(se){var H=!1;if(("createdCallback"===ee||"attachedCallback"===ee||"detachedCallback"===ee||"attributeChangedCallback"===ee)&&(H=!0),!H)throw se;var Y=null;try{Y=JSON.stringify(le)}catch{Y=le.toString()}console.log("Attempting to configure '".concat(ee,"' with descriptor '").concat(Y,"' on object '").concat(z,"' and got error, giving up: ").concat(se))}}}Zone.__load_patch("util",function(z,ee,le){var E=sn(z);le.patchOnProperties=ce,le.patchMethod=ne,le.bindArguments=R,le.patchMacroTask=de;var H=ee.__symbol__("BLACK_LISTED_EVENTS"),Y=ee.__symbol__("UNPATCHED_EVENTS");z[Y]&&(z[H]=z[Y]),z[H]&&(ee[H]=ee[Y]=z[H]),le.patchEventPrototype=st,le.patchEventTarget=ft,le.isIEOrEdge=lt,le.ObjectDefineProperty=t,le.ObjectGetOwnPropertyDescriptor=n,le.ObjectCreate=i,le.ArraySlice=r,le.patchClass=be,le.wrapWithCurrentZone=p,le.filterProperties=_t,le.attachOriginToPatched=pe,le._redefineProperty=Object.defineProperty,le.patchCallbacks=Ye,le.getGlobalObjects=function(){return{globalSources:wt,zoneSymbolEventNames:An,eventNames:E,isBrowser:xe,isMix:Xe,isNode:K,TRUE_STR:c,FALSE_STR:d,ZONE_SYMBOL_PREFIX:u,ADD_EVENT_LISTENER_STR:o,REMOVE_EVENT_LISTENER_STR:s}}});var z,zo=fu(fu(fu(fu(fu(fu(fu(fu([],["abort","animationcancel","animationend","animationiteration","auxclick","beforeinput","blur","cancel","canplay","canplaythrough","change","compositionstart","compositionupdate","compositionend","cuechange","click","close","contextmenu","curechange","dblclick","drag","dragend","dragenter","dragexit","dragleave","dragover","drop","durationchange","emptied","ended","error","focus","focusin","focusout","gotpointercapture","input","invalid","keydown","keypress","keyup","load","loadstart","loadeddata","loadedmetadata","lostpointercapture","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","mousewheel","orientationchange","pause","play","playing","pointercancel","pointerdown","pointerenter","pointerleave","pointerlockchange","mozpointerlockchange","webkitpointerlockerchange","pointerlockerror","mozpointerlockerror","webkitpointerlockerror","pointermove","pointout","pointerover","pointerup","progress","ratechange","reset","resize","scroll","seeked","seeking","select","selectionchange","selectstart","show","sort","stalled","submit","suspend","timeupdate","volumechange","touchcancel","touchmove","touchstart","touchend","transitioncancel","transitionend","waiting","wheel"],!0),["webglcontextrestored","webglcontextlost","webglcontextcreationerror"],!0),["autocomplete","autocompleteerror"],!0),["toggle"],!0),["afterscriptexecute","beforescriptexecute","DOMContentLoaded","freeze","fullscreenchange","mozfullscreenchange","webkitfullscreenchange","msfullscreenchange","fullscreenerror","mozfullscreenerror","webkitfullscreenerror","msfullscreenerror","readystatechange","visibilitychange","resume"],!0),["absolutedeviceorientation","afterinput","afterprint","appinstalled","beforeinstallprompt","beforeprint","beforeunload","devicelight","devicemotion","deviceorientation","deviceorientationabsolute","deviceproximity","hashchange","languagechange","message","mozbeforepaint","offline","online","paint","pageshow","pagehide","popstate","rejectionhandled","storage","unhandledrejection","unload","userproximity","vrdisplayconnected","vrdisplaydisconnected","vrdisplaypresentchange"],!0),["beforecopy","beforecut","beforepaste","copy","cut","paste","dragstart","loadend","animationstart","search","transitionrun","transitionstart","webkitanimationend","webkitanimationiteration","webkitanimationstart","webkittransitionend"],!0),["activate","afterupdate","ariarequest","beforeactivate","beforedeactivate","beforeeditfocus","beforeupdate","cellchange","controlselect","dataavailable","datasetchanged","datasetcomplete","errorupdate","filterchange","layoutcomplete","losecapture","move","moveend","movestart","propertychange","resizeend","resizestart","rowenter","rowexit","rowsdelete","rowsinserted","command","compassneedscalibration","deactivate","help","mscontentzoom","msmanipulationstatechanged","msgesturechange","msgesturedoubletap","msgestureend","msgesturehold","msgesturestart","msgesturetap","msgotpointercapture","msinertiastart","mslostpointercapture","mspointercancel","mspointerdown","mspointerenter","mspointerhover","mspointerleave","mspointermove","mspointerout","mspointerover","mspointerup","pointerout","mssitemodejumplistitemremoved","msthumbnailclick","stop","storagecommit"],!0);(z=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{})[("legacyPatch",(z.__Zone_symbol_prefix||"__zone_symbol__")+"legacyPatch")]=function(){var E=z.Zone;E.__load_patch("defineProperty",function(H,Y,J){J._redefineProperty=vt,ti=Zone.__symbol__,ki=Object[ti("defineProperty")]=Object.defineProperty,Fi=Object[ti("getOwnPropertyDescriptor")]=Object.getOwnPropertyDescriptor,Z=Object.create,L=ti("unconfigurables"),Object.defineProperty=function(z,ee,le){if(en(z,ee))throw new TypeError("Cannot assign to read only property '"+ee+"' of "+z);var E=le.configurable;return"prototype"!==ee&&(le=Le(z,ee,le)),mn(z,ee,le,E)},Object.defineProperties=function(z,ee){Object.keys(ee).forEach(function(J){Object.defineProperty(z,J,ee[J])});for(var le=0,E=Object.getOwnPropertySymbols(ee);le<E.length;le++){var H=E[le];Object.getOwnPropertyDescriptor(ee,H)?.enumerable&&Object.defineProperty(z,H,ee[H])}return z},Object.create=function(z,ee){return"object"==typeof ee&&!Object.isFrozen(ee)&&Object.keys(ee).forEach(function(le){ee[le]=Le(z,le,ee[le])}),Z(z,ee)},Object.getOwnPropertyDescriptor=function(z,ee){var le=Fi(z,ee);return le&&en(z,ee)&&(le.configurable=!1),le}}),E.__load_patch("registerElement",function(H,Y,J){!function(z,ee){var le=ee.getGlobalObjects();(le.isBrowser||le.isMix)&&"registerElement"in z.document&&ee.patchCallbacks(ee,document,"Document","registerElement",["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"])}(H,J)}),E.__load_patch("EventTargetLegacy",function(H,Y,J){(function(z,ee){var le=ee.getGlobalObjects(),E=le.eventNames,H=le.globalSources,Y=le.zoneSymbolEventNames,J=le.TRUE_STR,se=le.FALSE_STR,ze=le.ZONE_SYMBOL_PREFIX,qe="ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Window,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex,WebSocket".split(","),rt="EventTarget",dt=[],St=z.wtf,Dt="Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video".split(",");St?dt=Dt.map(function(Mr){return"HTML"+Mr+"Element"}).concat(qe):z[rt]?dt.push(rt):dt=qe;for(var cn=z.__Zone_disable_IE_check||!1,Gi=z.__Zone_enable_cross_context_check||!1,vi=ee.isIEOrEdge(),Pn="[object FunctionWrapper]",Et="function __BROWSERTOOLS_CONSOLE_SAFEFUNC() { [native code] }",pi={MSPointerCancel:"pointercancel",MSPointerDown:"pointerdown",MSPointerEnter:"pointerenter",MSPointerHover:"pointerhover",MSPointerLeave:"pointerleave",MSPointerMove:"pointermove",MSPointerOut:"pointerout",MSPointerOver:"pointerover",MSPointerUp:"pointerup"},Qn=0;Qn<E.length;Qn++){var Ni=ze+((Vn=E[Qn])+se),vn=ze+(Vn+J);Y[Vn]={},Y[Vn][se]=Ni,Y[Vn][J]=vn}for(Qn=0;Qn<Dt.length;Qn++)for(var On=Dt[Qn],fi=H[On]={},kn=0;kn<E.length;kn++){var Vn;fi[Vn=E[kn]]=On+".addEventListener:"+Vn}var rr=[];for(Qn=0;Qn<dt.length;Qn++){var ys=z[dt[Qn]];rr.push(ys&&ys.prototype)}ee.patchEventTarget(z,ee,rr,{vh:function(Mr,fr,gt,me){if(!cn&&vi)if(Gi)try{if((he=fr.toString())===Pn||he==Et)return Mr.apply(gt,me),!1}catch{return Mr.apply(gt,me),!1}else{var he;if((he=fr.toString())===Pn||he==Et)return Mr.apply(gt,me),!1}else if(Gi)try{fr.toString()}catch{return Mr.apply(gt,me),!1}return!0},transferEventName:function(Mr){return pi[Mr]||Mr}}),Zone[ee.symbol("patchEventTarget")]=!!z[rt]})(H,J),function(z,ee){var le=z.getGlobalObjects();if((!le.isNode||le.isMix)&&!function(z,ee){var le=z.getGlobalObjects();if((le.isBrowser||le.isMix)&&!z.ObjectGetOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&typeof Element<"u"){var Y=z.ObjectGetOwnPropertyDescriptor(Element.prototype,"onclick");if(Y&&!Y.configurable)return!1;if(Y){z.ObjectDefineProperty(Element.prototype,"onclick",{enumerable:!0,configurable:!0,get:function(){return!0}});var se=!!document.createElement("div").onclick;return z.ObjectDefineProperty(Element.prototype,"onclick",Y),se}}var ze=ee.XMLHttpRequest;if(!ze)return!1;var et="onreadystatechange",qe=ze.prototype,rt=z.ObjectGetOwnPropertyDescriptor(qe,et);if(rt)return z.ObjectDefineProperty(qe,et,{enumerable:!0,configurable:!0,get:function(){return!0}}),se=!!(dt=new ze).onreadystatechange,z.ObjectDefineProperty(qe,et,rt||{}),se;var St=z.symbol("fake");z.ObjectDefineProperty(qe,et,{enumerable:!0,configurable:!0,get:function(){return this[St]},set:function(vi){this[St]=vi}});var dt,Dt=function(){};return(dt=new ze).onreadystatechange=Dt,se=dt[St]===Dt,dt.onreadystatechange=null,se}(z,ee)){var Y=typeof WebSocket<"u";(function(z){for(var ee=z.symbol("unbound"),le=function(H){var Y=zo[H],J="on"+Y;self.addEventListener(Y,function(se){var et,qe,ze=se.target;for(qe=ze?ze.constructor.name+"."+J:"unknown."+J;ze;)ze[J]&&!ze[J][ee]&&((et=z.wrapWithCurrentZone(ze[J],qe))[ee]=ze[J],ze[J]=et),ze=ze.parentElement},!0)},E=0;E<zo.length;E++)le(E)})(z),z.patchClass("XMLHttpRequest"),Y&&function(z,ee){var le=z.getGlobalObjects(),E=le.ADD_EVENT_LISTENER_STR,H=le.REMOVE_EVENT_LISTENER_STR,Y=ee.WebSocket;ee.EventTarget||z.patchEventTarget(ee,z,[Y.prototype]),ee.WebSocket=function(ze,et){var rt,dt,qe=arguments.length>1?new Y(ze,et):new Y(ze),St=z.ObjectGetOwnPropertyDescriptor(qe,"onmessage");return St&&!1===St.configurable?(rt=z.ObjectCreate(qe),dt=qe,[E,H,"send","close"].forEach(function(Dt){rt[Dt]=function(){var cn=z.ArraySlice.call(arguments);if(Dt===E||Dt===H){var Gi=cn.length>0?cn[0]:void 0;if(Gi){var vi=Zone.__symbol__("ON_PROPERTY"+Gi);qe[vi]=rt[vi]}}return qe[Dt].apply(qe,cn)}})):rt=qe,z.patchOnProperties(rt,["close","error","message","open"],dt),rt};var J=ee.WebSocket;for(var se in Y)J[se]=Y[se]}(z,ee),Zone[z.symbol("patchEvents")]=!0}}(J,H)})};var vs=m("zoneTask");function dl(z,ee,le,E){var H=null,Y=null;le+=E;var J={};function se(et){var qe=et.data;return qe.args[0]=function(){return et.invoke.apply(this,arguments)},qe.handleId=H.apply(z,qe.args),et}function ze(et){return Y.call(z,et.data.handleId)}H=ne(z,ee+=E,function(et){return function(qe,rt){if("function"==typeof rt[0]){var dt={isPeriodic:"Interval"===E,delay:"Timeout"===E||"Interval"===E?rt[1]||0:void 0,args:rt},St=rt[0];rt[0]=function(){try{return St.apply(this,arguments)}finally{dt.isPeriodic||("number"==typeof dt.handleId?delete J[dt.handleId]:dt.handleId&&(dt.handleId[vs]=null))}};var Dt=f(ee,rt[0],dt,se,ze);if(!Dt)return Dt;var cn=Dt.data.handleId;return"number"==typeof cn?J[cn]=Dt:cn&&(cn[vs]=Dt),cn&&cn.ref&&cn.unref&&"function"==typeof cn.ref&&"function"==typeof cn.unref&&(Dt.ref=cn.ref.bind(cn),Dt.unref=cn.unref.bind(cn)),"number"==typeof cn||cn?cn:Dt}return et.apply(z,rt)}}),Y=ne(z,le,function(et){return function(qe,rt){var St,dt=rt[0];"number"==typeof dt?St=J[dt]:(St=dt&&dt[vs])||(St=dt),St&&"string"==typeof St.type?"notScheduled"!==St.state&&(St.cancelFn&&St.data.isPeriodic||0===St.runCount)&&("number"==typeof dt?delete J[dt]:dt&&(dt[vs]=null),St.zone.cancelTask(St)):et.apply(z,rt)}})}Zone.__load_patch("legacy",function(z){var ee=z[Zone.__symbol__("legacyPatch")];ee&&ee()}),Zone.__load_patch("queueMicrotask",function(z,ee,le){le.patchMethod(z,"queueMicrotask",function(E){return function(H,Y){ee.current.scheduleMicroTask("queueMicrotask",Y[0])}})}),Zone.__load_patch("timers",function(z){var le="clear";dl(z,"set",le,"Timeout"),dl(z,"set",le,"Interval"),dl(z,"set",le,"Immediate")}),Zone.__load_patch("requestAnimationFrame",function(z){dl(z,"request","cancel","AnimationFrame"),dl(z,"mozRequest","mozCancel","AnimationFrame"),dl(z,"webkitRequest","webkitCancel","AnimationFrame")}),Zone.__load_patch("blocking",function(z,ee){for(var le=["alert","prompt","confirm"],E=0;E<le.length;E++)ne(z,le[E],function(Y,J,se){return function(ze,et){return ee.current.run(Y,z,et,se)}})}),Zone.__load_patch("EventTarget",function(z,ee,le){(function(z,ee){ee.patchEventPrototype(z,ee)})(z,le),function(z,ee){if(!Zone[ee.symbol("patchEventTarget")]){for(var le=ee.getGlobalObjects(),E=le.eventNames,H=le.zoneSymbolEventNames,Y=le.TRUE_STR,J=le.FALSE_STR,se=le.ZONE_SYMBOL_PREFIX,ze=0;ze<E.length;ze++){var et=E[ze],dt=se+(et+J),St=se+(et+Y);H[et]={},H[et][J]=dt,H[et][Y]=St}var Dt=z.EventTarget;Dt&&Dt.prototype&&ee.patchEventTarget(z,ee,[Dt&&Dt.prototype])}}(z,le);var E=z.XMLHttpRequestEventTarget;E&&E.prototype&&le.patchEventTarget(z,le,[E.prototype])}),Zone.__load_patch("MutationObserver",function(z,ee,le){be("MutationObserver"),be("WebKitMutationObserver")}),Zone.__load_patch("IntersectionObserver",function(z,ee,le){be("IntersectionObserver")}),Zone.__load_patch("FileReader",function(z,ee,le){be("FileReader")}),Zone.__load_patch("on_property",function(z,ee,le){!function(z,ee){if((!K||Xe)&&!Zone[z.symbol("patchEvents")]){var le=ee.__Zone_ignore_on_properties,E=[];if(xe){var H=window;E=E.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);var Y=function(){try{var z=M.navigator.userAgent;if(-1!==z.indexOf("MSIE ")||-1!==z.indexOf("Trident/"))return!0}catch{}return!1}()?[{target:H,ignoreProperties:["error"]}]:[];ut(H,sn(H),le&&le.concat(Y),e(H))}E=E.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(var J=0;J<E.length;J++){var se=ee[E[J]];se&&se.prototype&&ut(se.prototype,sn(se.prototype),le)}}}(le,z)}),Zone.__load_patch("customElements",function(z,ee,le){!function(z,ee){var le=ee.getGlobalObjects();(le.isBrowser||le.isMix)&&z.customElements&&"customElements"in z&&ee.patchCallbacks(ee,z.customElements,"customElements","define",["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback"])}(z,le)}),Zone.__load_patch("XHR",function(z,ee){!function(et){var qe=et.XMLHttpRequest;if(qe){var rt=qe.prototype,St=rt[a],Dt=rt[l];if(!St){var cn=et.XMLHttpRequestEventTarget;if(cn){var Gi=cn.prototype;St=Gi[a],Dt=Gi[l]}}var vi="readystatechange",pn="scheduled",Qn=ne(rt,"open",function(){return function(On,fi){return On[E]=0==fi[2],On[J]=fi[1],Qn.apply(On,fi)}}),Wn=m("fetchTaskAborting"),Ut=m("fetchTaskScheduling"),Ni=ne(rt,"send",function(){return function(On,fi){if(!0===ee.current[Ut]||On[E])return Ni.apply(On,fi);var kn={target:On,url:On[J],isPeriodic:!1,args:fi,aborted:!1},pr=f("XMLHttpRequest.send",Et,kn,Pn,pi);On&&!0===On[se]&&!kn.aborted&&pr.state===pn&&pr.invoke()}}),vn=ne(rt,"abort",function(){return function(On,fi){var kn=function(On){return On[le]}(On);if(kn&&"string"==typeof kn.type){if(null==kn.cancelFn||kn.data&&kn.data.aborted)return;kn.zone.cancelTask(kn)}else if(!0===ee.current[Wn])return vn.apply(On,fi)}})}function Pn(On){var fi=On.data,kn=fi.target;kn[Y]=!1,kn[se]=!1;var pr=kn[H];St||(St=kn[a],Dt=kn[l]),pr&&Dt.call(kn,vi,pr);var rr=kn[H]=function(){if(kn.readyState===kn.DONE)if(!fi.aborted&&kn[Y]&&On.state===pn){var Mr=kn[ee.__symbol__("loadfalse")];if(0!==kn.status&&Mr&&Mr.length>0){var fr=On.invoke;On.invoke=function(){for(var gt=kn[ee.__symbol__("loadfalse")],me=0;me<gt.length;me++)gt[me]===On&&gt.splice(me,1);!fi.aborted&&On.state===pn&&fr.call(On)},Mr.push(On)}else On.invoke()}else!fi.aborted&&!1===kn[Y]&&(kn[se]=!0)};return St.call(kn,vi,rr),kn[le]||(kn[le]=On),Ni.apply(kn,fi.args),kn[Y]=!0,On}function Et(){}function pi(On){var fi=On.data;return fi.aborted=!0,vn.apply(fi.target,fi.args)}}(z);var le=m("xhrTask"),E=m("xhrSync"),H=m("xhrListener"),Y=m("xhrScheduled"),J=m("xhrURL"),se=m("xhrErrorBeforeScheduled")}),Zone.__load_patch("geolocation",function(z){z.navigator&&z.navigator.geolocation&&function(z,ee){for(var le=z.constructor.name,E=function(Y){var et,qe,J=ee[Y],se=z[J];if(se){if(!V(n(z,J)))return"continue";z[J]=(qe=function(){return et.apply(this,R(arguments,le+"."+J))},pe(qe,et=se),qe)}},H=0;H<ee.length;H++)E(H)}(z.navigator.geolocation,["getCurrentPosition","watchPosition"])}),Zone.__load_patch("PromiseRejectionEvent",function(z,ee){function le(E){return function(H){oe(z,E).forEach(function(J){var se=z.PromiseRejectionEvent;if(se){var ze=new se(E,{promise:H.promise,reason:H.rejection});J.invoke(ze)}})}}z.PromiseRejectionEvent&&(ee[m("unhandledPromiseRejectionHandler")]=le("unhandledrejection"),ee[m("rejectionHandledHandler")]=le("rejectionhandled"))})},"function"==typeof define&&define.amd?define(n):n()});function _n(n){return"function"==typeof n}function Sm(n){let e=n(i=>{Error.call(i),i.stack=(new Error).stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var nC=Sm(n=>function(e){n(this),this.message=e?`${e.length} errors occurred during unsubscription:\n${e.map((i,r)=>`${r+1}) ${i.toString()}`).join("\n  ")}`:"",this.name="UnsubscriptionError",this.errors=e});function Dp(n,t){if(n){let e=n.indexOf(t);0<=e&&n.splice(e,1)}}var Mn=class{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:i}=this;if(_n(i))try{i()}catch(o){t=o instanceof nC?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{qV(o)}catch(s){t=t??[],s instanceof nC?t=[...t,...s.errors]:t.push(s)}}if(t)throw new nC(t)}}add(t){var e;if(t&&t!==this)if(this.closed)qV(t);else{if(t instanceof Mn){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(e=this._finalizers)&&void 0!==e?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&Dp(e,t)}remove(t){let{_finalizers:e}=this;e&&Dp(e,t),t instanceof Mn&&t._removeParent(this)}};Mn.EMPTY=(()=>{let n=new Mn;return n.closed=!0,n})();var NA=Mn.EMPTY;function iC(n){return n instanceof Mn||n&&"closed"in n&&_n(n.remove)&&_n(n.add)&&_n(n.unsubscribe)}function qV(n){_n(n)?n():n.unsubscribe()}var pl={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},Em={setTimeout(n,t,...e){let{delegate:i}=Em;return i?.setTimeout?i.setTimeout(n,t,...e):setTimeout(n,t,...e)},clearTimeout(n){let{delegate:t}=Em;return(t?.clearTimeout||clearTimeout)(n)},delegate:void 0};function rC(n){Em.setTimeout(()=>{let{onUnhandledError:t}=pl;if(!t)throw n;t(n)})}function fl(){}var YV=LA("C",void 0,void 0);function LA(n,t,e){return{kind:n,value:t,error:e}}var Ip=null;function Tm(n){if(pl.useDeprecatedSynchronousErrorHandling){let t=!Ip;if(t&&(Ip={errorThrown:!1,error:null}),n(),t){let{errorThrown:e,error:i}=Ip;if(Ip=null,e)throw i}}else n()}var Ap=class extends Mn{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,iC(t)&&t.add(this)):this.destination=Lie}static create(t,e,i){return new ml(t,e,i)}next(t){this.isStopped?VA(LA("N",t,void 0),this):this._next(t)}error(t){this.isStopped?VA(LA("E",void 0,t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?VA(YV,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},Fie=Function.prototype.bind;function BA(n,t){return Fie.call(n,t)}var ml=class extends Ap{constructor(t,e,i){let r;if(super(),_n(t)||!t)r={next:t??void 0,error:e??void 0,complete:i??void 0};else{let o;this&&pl.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&BA(t.next,o),error:t.error&&BA(t.error,o),complete:t.complete&&BA(t.complete,o)}):r=t}this.destination=new class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(i){oC(i)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(i){oC(i)}else oC(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){oC(e)}}}(r)}};function oC(n){pl.useDeprecatedSynchronousErrorHandling?function(n){pl.useDeprecatedSynchronousErrorHandling&&Ip&&(Ip.errorThrown=!0,Ip.error=n)}(n):rC(n)}function VA(n,t){let{onStoppedNotification:e}=pl;e&&Em.setTimeout(()=>e(n,t))}var Lie={closed:!0,next:fl,error:function(n){throw n},complete:fl},Dm="function"==typeof Symbol&&Symbol.observable||"@@observable";function is(n){return n}function UA(n){return 0===n.length?is:1===n.length?n[0]:function(e){return n.reduce((i,r)=>r(i),e)}}var Kt=(()=>{class n{constructor(e){e&&(this._subscribe=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}subscribe(e,i,r){let o=function(n){return n&&n instanceof Ap||function(n){return n&&_n(n.next)&&_n(n.error)&&_n(n.complete)}(n)&&iC(n)}(e)?e:new ml(e,i,r);return Tm(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(i){e.error(i)}}forEach(e,i){return new(i=KV(i))((r,o)=>{let s=new ml({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(e)}[Dm](){return this}pipe(...e){return UA(e)(this)}toPromise(e){return new(e=KV(e))((i,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>i(o))})}}return n.create=t=>new n(t),n})();function KV(n){var t;return null!==(t=n??pl.Promise)&&void 0!==t?t:Promise}function jA(n){return _n(n?.lift)}function qt(n){return t=>{if(jA(t))return t.lift(function(e){try{return n(e,this)}catch(i){this.error(i)}});throw new TypeError("Unable to lift unknown Observable type")}}function Vt(n,t,e,i,r){return new M_(n,t,e,i,r)}var GA,M_=class extends Ap{constructor(t,e,i,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=i?function(){try{i()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}}},w_=class extends Kt{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,jA(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new Mn;let e=this.getSubject();t.add(this.source.subscribe(Vt(e,void 0,()=>{this._teardown(),e.complete()},i=>{this._teardown(),e.error(i)},()=>this._teardown()))),t.closed&&(this._connection=null,t=Mn.EMPTY)}return t}refCount(){return qt((n,t)=>{let e=null;n._refCount++;let i=Vt(t,void 0,void 0,void 0,()=>{if(!n||n._refCount<=0||0<--n._refCount)return void(e=null);let r=n._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});n.subscribe(i),i.closed||(e=n.connect())})(this)}},Im={schedule(n){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:i}=Im;i&&(t=i.requestAnimationFrame,e=i.cancelAnimationFrame);let r=t(o=>{e=void 0,n(o)});return new Mn(()=>e?.(r))},requestAnimationFrame(...n){let{delegate:t}=Im;return(t?.requestAnimationFrame||requestAnimationFrame)(...n)},cancelAnimationFrame(...n){let{delegate:t}=Im;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...n)},delegate:void 0},$V=Sm(n=>function(){n(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}),Ie=(()=>{class n extends Kt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let i=new sC(this,this);return i.operator=e,i}_throwIfClosed(){if(this.closed)throw new $V}next(e){Tm(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let i of this.currentObservers)i.next(e)}})}error(e){Tm(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:i}=this;for(;i.length;)i.shift().error(e)}})}complete(){Tm(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:i,isStopped:r,observers:o}=this;return i||r?NA:(this.currentObservers=null,o.push(e),new Mn(()=>{this.currentObservers=null,Dp(o,e)}))}_checkFinalizedStatuses(e){let{hasError:i,thrownError:r,isStopped:o}=this;i?e.error(r):o&&e.complete()}asObservable(){let e=new Kt;return e.source=this,e}}return n.create=(t,e)=>new sC(t,e),n})(),sC=class extends Ie{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.next)||void 0===i||i.call(e,t)}error(t){var e,i;null===(i=null===(e=this.destination)||void 0===e?void 0:e.error)||void 0===i||i.call(e,t)}complete(){var t,e;null===(e=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===e||e.call(t)}_subscribe(t){var e,i;return null!==(i=null===(e=this.source)||void 0===e?void 0:e.subscribe(t))&&void 0!==i?i:NA}},Ai=class extends Ie{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:i}=this;if(t)throw e;return this._throwIfClosed(),i}next(t){super.next(this._value=t)}},S_={now:()=>(S_.delegate||Date).now(),delegate:void 0},Rp=class extends Ie{constructor(t=1/0,e=1/0,i=S_){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=i,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:i,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(i.push(t),!r&&i.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:i,_buffer:r}=this,o=r.slice();for(let s=0;s<o.length&&!t.closed;s+=i?1:2)t.next(o[s]);return this._checkFinalizedStatuses(t),e}_trimBuffer(){let{_bufferSize:t,_timestampProvider:e,_buffer:i,_infiniteTimeWindow:r}=this,o=(r?1:2)*t;if(t<1/0&&o<i.length&&i.splice(0,i.length-o),!r){let s=e.now(),a=0;for(let l=1;l<i.length&&i[l]<=s;l+=2)a=l;a&&i.splice(0,a+1)}}},aC=class extends Mn{constructor(t,e){super()}schedule(t,e=0){return this}},E_={setInterval(n,t,...e){let{delegate:i}=E_;return i?.setInterval?i.setInterval(n,t,...e):setInterval(n,t,...e)},clearInterval(n){let{delegate:t}=E_;return(t?.clearInterval||clearInterval)(n)},delegate:void 0},nc=class extends aC{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){var i;if(this.closed)return this;this.state=t;let r=this.id,o=this.scheduler;return null!=r&&(this.id=this.recycleAsyncId(o,r,e)),this.pending=!0,this.delay=e,this.id=null!==(i=this.id)&&void 0!==i?i:this.requestAsyncId(o,this.id,e),this}requestAsyncId(t,e,i=0){return E_.setInterval(t.flush.bind(t,this),i)}recycleAsyncId(t,e,i=0){if(null!=i&&this.delay===i&&!1===this.pending)return e;null!=e&&E_.clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;let i=this._execute(t,e);if(i)return i;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let r,i=!1;try{this.work(t)}catch(o){i=!0,r=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),r}unsubscribe(){if(!this.closed){let{id:t,scheduler:e}=this,{actions:i}=e;this.work=this.state=this.scheduler=null,this.pending=!1,Dp(i,this),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null,super.unsubscribe()}}},Hie=1,WA={};function e4(n){return n in WA&&(delete WA[n],!0)}var t4={setImmediate(n){let t=Hie++;return WA[t]=!0,GA||(GA=Promise.resolve()),GA.then(()=>e4(t)&&n()),t},clearImmediate(n){e4(n)}},{setImmediate:zie,clearImmediate:Uie}=t4,T_={setImmediate(...n){let{delegate:t}=T_;return(t?.setImmediate||zie)(...n)},clearImmediate(n){let{delegate:t}=T_;return(t?.clearImmediate||Uie)(n)},delegate:void 0},Zd=class{constructor(t,e=Zd.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,i){return new this.schedulerActionCtor(this,t).schedule(i,e)}};Zd.now=S_.now;var ic=class extends Zd{constructor(t,e=Zd.now){super(t,e),this.actions=[],this._active=!1}flush(t){let i,{actions:e}=this;if(this._active)e.push(t);else{this._active=!0;do{if(i=t.execute(t.state,t.delay))break}while(t=e.shift());if(this._active=!1,i){for(;t=e.shift();)t.unsubscribe();throw i}}}},Am=new class extends ic{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let r,{actions:i}=this;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class extends nc{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=T_.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(T_.clearImmediate(e),t._scheduled=void 0)}}),Jc=new ic(nc),n4=Jc,qA=new class extends ic{}(class extends nc{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}schedule(t,e=0){return e>0?super.schedule(t,e):(this.delay=e,this.state=t,this.scheduler.flush(this),this)}execute(t,e){return e>0||this.closed?super.execute(t,e):this._execute(t,e)}requestAsyncId(t,e,i=0){return null!=i&&i>0||null==i&&this.delay>0?super.requestAsyncId(t,e,i):(t.flush(this),0)}}),YA=new class extends ic{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let r,{actions:i}=this;t=t||i.shift();do{if(r=t.execute(t.state,t.delay))break}while((t=i[0])&&t.id===e&&i.shift());if(this._active=!1,r){for(;(t=i[0])&&t.id===e&&i.shift();)t.unsubscribe();throw r}}}(class extends nc{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,i=0){return null!==i&&i>0?super.requestAsyncId(t,e,i):(t.actions.push(this),t._scheduled||(t._scheduled=Im.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,i=0){var r;if(null!=i?i>0:this.delay>0)return super.recycleAsyncId(t,e,i);let{actions:o}=t;null!=e&&(null===(r=o[o.length-1])||void 0===r?void 0:r.id)!==e&&(Im.cancelAnimationFrame(e),t._scheduled=void 0)}}),Jr=new Kt(n=>n.complete());function mC(n){return n&&_n(n.schedule)}function XA(n){return n[n.length-1]}function rc(n){return _n(XA(n))?n.pop():void 0}function oc(n){return mC(XA(n))?n.pop():void 0}var A4=WV(I4(),1),{__decorate:R4,__awaiter:P4,__await:bC,__asyncGenerator:O4,__asyncValues:k4}=A4.default,Pm=n=>n&&"number"==typeof n.length&&"function"!=typeof n;function vC(n){return _n(n?.then)}function yC(n){return _n(n[Dm])}function xC(n){return Symbol.asyncIterator&&_n(n?.[Symbol.asyncIterator])}function CC(n){return new TypeError(`You provided ${null!==n&&"object"==typeof n?"an invalid object":`'${n}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}var MC="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function wC(n){return _n(n?.[MC])}function SC(n){return O4(this,arguments,function*(){let e=n.getReader();try{for(;;){let{value:i,done:r}=yield bC(e.read());if(r)return yield bC(void 0);yield yield bC(i)}}finally{e.releaseLock()}})}function EC(n){return _n(n?.getReader)}function ii(n){if(n instanceof Kt)return n;if(null!=n){if(yC(n))return function(n){return new Kt(t=>{let e=n[Dm]();if(_n(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}(n);if(Pm(n))return function(n){return new Kt(t=>{for(let e=0;e<n.length&&!t.closed;e++)t.next(n[e]);t.complete()})}(n);if(vC(n))return function(n){return new Kt(t=>{n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,rC)})}(n);if(xC(n))return F4(n);if(wC(n))return function(n){return new Kt(t=>{for(let e of n)if(t.next(e),t.closed)return;t.complete()})}(n);if(EC(n))return function(n){return F4(SC(n))}(n)}throw CC(n)}function F4(n){return new Kt(t=>{(function(n,t){var e,i,r,o;return P4(this,void 0,void 0,function*(){try{for(e=k4(n);!(i=yield e.next()).done;)if(t.next(i.value),t.closed)return}catch(s){r={error:s}}finally{try{i&&!i.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})})(n,t).catch(e=>t.error(e))})}function xs(n,t,e,i=0,r=!1){let o=t.schedule(function(){e(),r?n.add(this.schedule(null,i)):this.unsubscribe()},i);if(n.add(o),!r)return o}function Pp(n,t=0){return qt((e,i)=>{e.subscribe(Vt(i,r=>xs(i,n,()=>i.next(r),t),()=>xs(i,n,()=>i.complete(),t),r=>xs(i,n,()=>i.error(r),t)))})}function TC(n,t=0){return qt((e,i)=>{i.add(n.schedule(()=>e.subscribe(i),t))})}function DC(n,t){if(!n)throw new Error("Iterable cannot be null");return new Kt(e=>{xs(e,t,()=>{let i=n[Symbol.asyncIterator]();xs(e,t,()=>{i.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function $r(n,t){return t?function(n,t){if(null!=n){if(yC(n))return function(n,t){return ii(n).pipe(TC(t),Pp(t))}(n,t);if(Pm(n))return function(n,t){return new Kt(e=>{let i=0;return t.schedule(function(){i===n.length?e.complete():(e.next(n[i++]),e.closed||this.schedule())})})}(n,t);if(vC(n))return function(n,t){return ii(n).pipe(TC(t),Pp(t))}(n,t);if(xC(n))return DC(n,t);if(wC(n))return function(n,t){return new Kt(e=>{let i;return xs(e,t,()=>{i=n[MC](),xs(e,t,()=>{let r,o;try{({value:r,done:o}=i.next())}catch(s){return void e.error(s)}o?e.complete():e.next(r)},0,!0)}),()=>_n(i?.return)&&i.return()})}(n,t);if(EC(n))return function(n,t){return DC(SC(n),t)}(n,t)}throw CC(n)}(n,t):ii(n)}function Ht(...n){return $r(n,oc(n))}function ea(n,t){let e=_n(n)?n:()=>n,i=r=>r.error(e());return new Kt(t?r=>t.schedule(i,0,r):i)}var wa=class{constructor(t,e,i){this.kind=t,this.value=e,this.error=i,this.hasValue="N"===t}observe(t){return ZA(this,t)}do(t,e,i){let{kind:r,value:o,error:s}=this;return"N"===r?t?.(o):"E"===r?e?.(s):i?.()}accept(t,e,i){var r;return _n(null===(r=t)||void 0===r?void 0:r.next)?this.observe(t):this.do(t,e,i)}toObservable(){let{kind:t,value:e,error:i}=this,r="N"===t?Ht(e):"E"===t?ea(()=>i):"C"===t?Jr:0;if(!r)throw new TypeError(`Unexpected notification kind ${t}`);return r}static createNext(t){return new wa("N",t)}static createError(t){return new wa("E",void 0,t)}static createComplete(){return wa.completeNotification}};function ZA(n,t){var e,i,r;let{kind:o,value:s,error:a}=n;if("string"!=typeof o)throw new TypeError('Invalid notification, missing "kind"');"N"===o?null===(e=t.next)||void 0===e||e.call(t,s):"E"===o?null===(i=t.error)||void 0===i||i.call(t,a):null===(r=t.complete)||void 0===r||r.call(t)}function D_(n){return!!n&&(n instanceof Kt||_n(n.lift)&&_n(n.subscribe))}wa.completeNotification=new wa("C");var Om=Sm(n=>function(){n(this),this.name="EmptyError",this.message="no elements in sequence"});function IC(n,t){let e="object"==typeof t;return new Promise((i,r)=>{let o=new ml({next:s=>{i(s),o.unsubscribe()},error:r,complete:()=>{e?i(t.defaultValue):r(new Om)}});n.subscribe(o)})}function N(n,t){return qt((e,i)=>{let r=0;e.subscribe(Vt(i,o=>{i.next(n.call(t,o,r++))}))})}var{isArray:Zie}=Array;function Kd(n){return N(t=>function(n,t){return Zie(t)?n(...t):n(t)}(n,t))}var{isArray:Jie}=Array,{getPrototypeOf:$ie,prototype:ere,keys:tre}=Object;function AC(n){if(1===n.length){let t=n[0];if(Jie(t))return{args:t,keys:null};if(function(n){return n&&"object"==typeof n&&$ie(n)===ere}(t)){let e=tre(t);return{args:e.map(i=>t[i]),keys:e}}}return{args:n,keys:null}}function RC(n,t){return n.reduce((e,i,r)=>(e[i]=t[r],e),{})}function dn(...n){let t=oc(n),e=rc(n),{args:i,keys:r}=AC(n);if(0===i.length)return $r([],t);let o=new Kt(KA(i,t,r?s=>RC(r,s):is));return e?o.pipe(Kd(e)):o}function KA(n,t,e=is){return i=>{j4(t,()=>{let{length:r}=n,o=new Array(r),s=r,a=r;for(let l=0;l<r;l++)j4(t,()=>{let c=$r(n[l],t),d=!1;c.subscribe(Vt(i,u=>{o[l]=u,d||(d=!0,a--),a||i.next(e(o.slice()))},()=>{--s||i.complete()}))},i)},i)}}function j4(n,t,e){n?xs(e,n,t):t()}function hn(n,t,e=1/0){return _n(t)?hn((i,r)=>N((o,s)=>t(i,o,r,s))(ii(n(i,r))),e):("number"==typeof t&&(e=t),qt((i,r)=>function(n,t,e,i,r,o,s,a){let l=[],c=0,d=0,u=!1,p=()=>{u&&!l.length&&!c&&t.complete()},f=b=>c<i?m(b):l.push(b),m=b=>{c++;let M=!1;ii(e(b,d++)).subscribe(Vt(t,y=>{t.next(y)},()=>{M=!0},void 0,()=>{if(M)try{for(c--;l.length&&c<i;){let y=l.shift();m(y)}p()}catch(y){t.error(y)}}))};return n.subscribe(Vt(t,f,()=>{u=!0,p()})),()=>{}}(i,r,n,e)))}function PC(n=1/0){return hn(is,n)}function Jd(...n){return PC(1)($r(n,oc(n)))}function ta(n){return new Kt(t=>{ii(n()).subscribe(t)})}function co(...n){let t=rc(n),{args:e,keys:i}=AC(n),r=new Kt(o=>{let{length:s}=e;if(!s)return void o.complete();let a=new Array(s),l=s,c=s;for(let d=0;d<s;d++){let u=!1;ii(e[d]).subscribe(Vt(o,p=>{u||(u=!0,c--),a[d]=p},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(i?RC(i,a):a),o.complete())}))}});return t?r.pipe(Kd(t)):r}var ire=["addListener","removeListener"],rre=["addEventListener","removeEventListener"],ore=["on","off"];function mi(n,t,e,i){if(_n(e)&&(i=e,e=void 0),i)return mi(n,t,e).pipe(Kd(i));let[r,o]=function(n){return _n(n.addEventListener)&&_n(n.removeEventListener)}(n)?rre.map(s=>a=>n[s](t,a,e)):function(n){return _n(n.addListener)&&_n(n.removeListener)}(n)?ire.map(q4(n,t)):function(n){return _n(n.on)&&_n(n.off)}(n)?ore.map(q4(n,t)):[];if(!r&&Pm(n))return hn(s=>mi(s,t,e))(ii(n));if(!r)throw new TypeError("Invalid event target");return new Kt(s=>{let a=(...l)=>s.next(1<l.length?l:l[0]);return r(a),()=>o(a)})}function q4(n,t){return e=>i=>n[e](t,i)}function na(n=0,t,e=n4){let i=-1;return null!=t&&(mC(t)?e=t:i=t),new Kt(r=>{let o=function(n){return n instanceof Date&&!isNaN(n)}(n)?+n-e.now():n;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=i?this.schedule(void 0,i):r.complete())},o)})}function tn(...n){let t=oc(n),e=function(n,t){return"number"==typeof XA(n)?n.pop():1/0}(n),i=n;return i.length?1===i.length?ii(i[0]):PC(e)($r(i,t)):Jr}var{isArray:cre}=Array;function OC(n){return 1===n.length&&cre(n[0])?n[0]:n}function ke(n,t){return qt((e,i)=>{let r=0;e.subscribe(Vt(i,o=>n.call(t,o,r++)&&i.next(o)))})}function sc(n,t=Jc){return function(n){return qt((t,e)=>{let i=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,i){i=!1;let c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(Vt(e,c=>{i=!0,r=c,o||ii(n()).subscribe(o=Vt(e,a,l))},()=>{s=!0,(!i||!o||o.closed)&&e.complete()}))})}(()=>na(n,t))}function zr(n){return qt((t,e)=>{let o,i=null,r=!1;i=t.subscribe(Vt(e,void 0,void 0,s=>{o=ii(n(s,zr(n)(t))),i?(i.unsubscribe(),i=null,o.subscribe(e)):r=!0})),r&&(i.unsubscribe(),i=null,o.subscribe(e))})}function eR(...n){let t=rc(n);return t?function(...n){return UA(n)}(eR(...n),Kd(t)):qt((e,i)=>{KA([e,...OC(n)])(i)})}function Li(...n){return eR(...n)}function wr(n,t=Jc){return qt((e,i)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,i.next(c)}};function l(){let c=s+n,d=t.now();if(d<c)return r=this.schedule(void 0,c-d),void i.add(r);a()}e.subscribe(Vt(i,c=>{o=c,s=t.now(),r||(r=t.schedule(l,n),i.add(r))},()=>{a(),i.complete()},void 0,()=>{o=r=null}))})}function Yt(n){return n<=0?()=>Jr:qt((t,e)=>{let i=0;t.subscribe(Vt(e,r=>{++i<=n&&(e.next(r),n<=i&&e.complete())}))})}function I_(){return qt((n,t)=>{n.subscribe(Vt(t,fl))})}function km(n,t){return t?e=>Jd(t.pipe(Yt(1),I_()),e.pipe(km(n))):hn((e,i)=>n(e,i).pipe(Yt(1),function(n){return N(()=>n)}(e)))}function Sa(n,t=Jc){let e=na(n,t);return km(()=>e)}function Yn(n,t=is){return n=n??dre,qt((e,i)=>{let r,o=!0;e.subscribe(Vt(i,s=>{let a=t(s);(o||!n(r,a))&&(o=!1,r=a,i.next(s))}))})}function dre(n,t){return n===t}function K4(n=ure){return qt((t,e)=>{let i=!1;t.subscribe(Vt(e,r=>{i=!0,e.next(r)},()=>i?e.complete():e.error(n())))})}function ure(){return new Om}function FC(n,t){return t?e=>e.pipe(FC((i,r)=>ii(n(i,r)).pipe(N((o,s)=>t(i,o,r,s))))):qt((e,i)=>{let r=0,o=null,s=!1;e.subscribe(Vt(i,a=>{o||(o=Vt(i,void 0,()=>{o=null,s&&i.complete()}),ii(n(a,r++)).subscribe(o))},()=>{s=!0,!o&&i.complete()}))})}function LC(n,t,e,i){return qt((r,o)=>{let s;t&&"function"!=typeof t?({duration:e,element:s,connector:i}=t):s=t;let a=new Map,l=m=>{a.forEach(m),m(o)},c=m=>l(b=>b.error(m)),d=0,u=!1,p=new M_(o,m=>{try{let b=n(m),M=a.get(b);if(!M){a.set(b,M=i?i():new Ie);let y=function(m,b){let M=new Kt(y=>{d++;let x=b.subscribe(y);return()=>{x.unsubscribe(),0==--d&&u&&p.unsubscribe()}});return M.key=m,M}(b,M);if(o.next(y),e){let x=Vt(M,()=>{M.complete(),x?.unsubscribe()},void 0,void 0,()=>a.delete(b));p.add(ii(e(y)).subscribe(x))}}M.next(s?s(m):m)}catch(b){c(b)}},()=>l(m=>m.complete()),c,()=>a.clear(),()=>(u=!0,0===d));r.subscribe(p)})}function Fm(){return qt((n,t)=>{let e,i=!1;n.subscribe(Vt(t,r=>{let o=e;e=r,i&&t.next([o,r]),i=!0}))})}function Cs(n={}){let{connector:t=(()=>new Ie),resetOnError:e=!0,resetOnComplete:i=!0,resetOnRefCountZero:r=!0}=n;return o=>{let s,a,l,c=0,d=!1,u=!1,p=()=>{a?.unsubscribe(),a=void 0},f=()=>{p(),s=l=void 0,d=u=!1},m=()=>{let b=s;f(),b?.unsubscribe()};return qt((b,M)=>{c++,!u&&!d&&p();let y=l=l??t();M.add(()=>{c--,0===c&&!u&&!d&&(a=aR(m,r))}),y.subscribe(M),!s&&c>0&&(s=new ml({next:x=>y.next(x),error:x=>{u=!0,p(),a=aR(f,e,x),y.error(x)},complete:()=>{d=!0,p(),a=aR(f,i),y.complete()}}),ii(b).subscribe(s))})(o)}}function aR(n,t,...e){if(!0===t)return void n();if(!1===t)return;let i=new ml({next:()=>{i.unsubscribe(),n()}});return t(...e).subscribe(i)}function Ms(n,t,e){let i,r=!1;return n&&"object"==typeof n?({bufferSize:i=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=n):i=n??1/0,Cs({connector:()=>new Rp(i,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function ia(n){return ke((t,e)=>n<=e)}function qn(...n){let t=oc(n);return qt((e,i)=>{(t?Jd(n,e,t):Jd(n,e)).subscribe(i)})}function Jn(n,t){return qt((e,i)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&i.complete();e.subscribe(Vt(i,l=>{r?.unsubscribe();let c=0,d=o++;ii(n(l,d)).subscribe(r=Vt(i,u=>i.next(t?t(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function ot(n){return qt((t,e)=>{ii(n).subscribe(Vt(e,()=>e.complete(),fl)),!e.closed&&t.subscribe(e)})}function A_(n,t=!1){return qt((e,i)=>{let r=0;e.subscribe(Vt(i,o=>{let s=n(o,r++);(s||t)&&i.next(o),!s&&i.complete()}))})}function Nt(n,t,e){let i=_n(n)||t||e?{next:n,error:t,complete:e}:n;return i?qt((r,o)=>{var s;null===(s=i.subscribe)||void 0===s||s.call(i);let a=!0;r.subscribe(Vt(o,l=>{var c;null===(c=i.next)||void 0===c||c.call(i,l),o.next(l)},()=>{var l;a=!1,null===(l=i.complete)||void 0===l||l.call(i),o.complete()},l=>{var c;a=!1,null===(c=i.error)||void 0===c||c.call(i,l),o.error(l)},()=>{var l,c;a&&(null===(l=i.unsubscribe)||void 0===l||l.call(i)),null===(c=i.finalize)||void 0===c||c.call(i)}))}):is}var lR={leading:!0,trailing:!1};function ac(n,t=Jc,e=lR){let i=na(n,t);return function(n,t=lR){return qt((e,i)=>{let{leading:r,trailing:o}=t,s=!1,a=null,l=null,c=!1,d=()=>{l?.unsubscribe(),l=null,o&&(f(),c&&i.complete())},u=()=>{l=null,c&&i.complete()},p=m=>l=ii(n(m)).subscribe(Vt(i,d,u)),f=()=>{if(s){s=!1;let m=a;a=null,i.next(m),!c&&p(m)}};e.subscribe(Vt(i,m=>{s=!0,a=m,(!l||l.closed)&&(r?f():p(m))},()=>{c=!0,(!(o&&s&&l)||l.closed)&&i.complete()}))})}(()=>i,e)}function Bt(...n){let t=rc(n);return qt((e,i)=>{let r=n.length,o=new Array(r),s=n.map(()=>!1),a=!1;for(let l=0;l<r;l++)ii(n[l]).subscribe(Vt(i,c=>{o[l]=c,!a&&!s[l]&&(s[l]=!0,(a=s.every(is))&&(s=null))},fl));e.subscribe(Vt(i,l=>{if(a){let c=[l,...o];i.next(t?t(...c):c)}}))})}function tr(n){for(let t in n)if(n[t]===tr)return t;throw Error("Could not find renamed property on target object.")}function cR(n,t){for(let e in t)t.hasOwnProperty(e)&&!n.hasOwnProperty(e)&&(n[e]=t[e])}function po(n){if("string"==typeof n)return n;if(Array.isArray(n))return"["+n.map(po).join(", ")+"]";if(null==n)return""+n;if(n.overriddenName)return`${n.overriddenName}`;if(n.name)return`${n.name}`;let t=n.toString();if(null==t)return""+t;let e=t.indexOf("\n");return-1===e?t:t.substring(0,e)}function AR(n,t){return null==n||""===n?null===t?"":t:null==t||""===t?n:n+" "+t}var pre=tr({__forward_ref__:tr});function $n(n){return n.__forward_ref__=$n,n.toString=function(){return po(this())},n}function Ri(n){return YH(n)?n():n}function YH(n){return"function"==typeof n&&n.hasOwnProperty(pre)&&n.__forward_ref__===$n}function XH(n){return n&&!!n.\u0275providers}var tb="https://g.co/ng/security#xss",yt=class extends Error{constructor(t,e){super(function(n,t){return`NG0${Math.abs(n)}${t?": "+t.trim():""}`}(t,e)),this.code=t}};function Un(n){return"string"==typeof n?n:null==n?"":String(n)}function LP(n){return"function"==typeof n?n.name||n.toString():"object"==typeof n&&null!=n&&"function"==typeof n.type?n.type.name||n.type.toString():Un(n)}function BP(n,t){throw new yt(-201,!1)}function QH(n,t,e,i){throw new Error(`ASSERTION ERROR: ${n}`+(null==i?"":` [Expected=> ${e} ${i} ${t} <=Actual]`))}function ue(n){return{token:n.token,providedIn:n.providedIn||null,factory:n.factory,value:void 0}}function U(n){return{providers:n.providers||[],imports:n.imports||[]}}function VP(n){return $4(n,JC)||$4(n,ZH)}function $4(n,t){return n.hasOwnProperty(t)?n[t]:null}function eH(n){return n&&(n.hasOwnProperty(RR)||n.hasOwnProperty(_re))?n[RR]:null}var PR,JC=tr({"\u0275prov":tr}),RR=tr({"\u0275inj":tr}),ZH=tr({ngInjectableDef:tr}),_re=tr({ngInjectorDef:tr}),xi=(()=>{return(n=xi||(xi={}))[n.Default=0]="Default",n[n.Host=1]="Host",n[n.Self=2]="Self",n[n.SkipSelf=4]="SkipSelf",n[n.Optional=8]="Optional",xi;var n})();function Ea(n){let t=PR;return PR=n,t}function KH(n,t,e){let i=VP(n);return i&&"root"==i.providedIn?void 0===i.value?i.value=i.factory():i.value:e&xi.Optional?null:void 0!==t?t:void BP(po(n))}var O_,Ur=(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)(),j_={},OR="__NG_DI_FLAG__",$C="ngTempTokenPath",yre="ngTokenPath",xre=/\n/gm,Cre="\u0275",tH="__source";function Nm(n){let t=O_;return O_=n,t}function Mre(n,t=xi.Default){if(void 0===O_)throw new yt(-203,!1);return null===O_?KH(n,void 0,t):O_.get(n,t&xi.Optional?null:void 0,t)}function k(n,t=xi.Default){return(PR||Mre)(Ri(n),t)}function JH(n){throw new yt(202,!1)}function ai(n,t=xi.Default){return k(n,wM(t))}function wM(n){return typeof n>"u"||"number"==typeof n?n:0|(n.optional&&8)|(n.host&&1)|(n.self&&2)|(n.skipSelf&&4)}function kR(n){let t=[];for(let e=0;e<n.length;e++){let i=Ri(n[e]);if(Array.isArray(i)){if(0===i.length)throw new yt(900,!1);let r,o=xi.Default;for(let s=0;s<i.length;s++){let a=i[s],l=wre(a);"number"==typeof l?-1===l?r=a.token:o|=l:r=a}t.push(k(r,o))}else t.push(k(i))}return t}function nb(n,t){return n[OR]=t,n.prototype[OR]=t,n}function wre(n){return n[OR]}function ou(n){return{toString:n}.toString()}var k_=(()=>{return(n=k_||(k_={}))[n.OnPush=0]="OnPush",n[n.Default=1]="Default",k_;var n})(),ra=(()=>{return(n=ra||(ra={}))[n.Emulated=0]="Emulated",n[n.None=2]="None",n[n.ShadowDom=3]="ShadowDom",ra;var n})(),$c={},Vi=[],SM=tr({"\u0275cmp":tr}),HP=tr({"\u0275dir":tr}),zP=tr({"\u0275pipe":tr}),$H=tr({"\u0275mod":tr}),ed=tr({"\u0275fac":tr}),F_=tr({__NG_ELEMENT_ID__:tr}),Tre=0;function O(n){return ou(()=>{let t=t5(n),e={...t,decls:n.decls,vars:n.vars,template:n.template,consts:n.consts||null,ngContentSelectors:n.ngContentSelectors,onPush:n.changeDetection===k_.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&n.dependencies||null,getStandaloneInjector:null,data:n.data||{},encapsulation:n.encapsulation||ra.Emulated,id:"c"+Tre++,styles:n.styles||Vi,_:null,schemas:n.schemas||null,tView:null};n5(e);let i=n.dependencies;return e.directiveDefs=eM(i,!1),e.pipeDefs=eM(i,!0),e})}function ib(n,t,e){let i=n.\u0275cmp;i.directiveDefs=eM(t,!1),i.pipeDefs=eM(e,!0)}function Dre(n){return Da(n)||tu(n)}function Ire(n){return null!==n}function G(n){return ou(()=>({type:n.type,bootstrap:n.bootstrap||Vi,declarations:n.declarations||Vi,imports:n.imports||Vi,exports:n.exports||Vi,transitiveCompileScopes:null,schemas:n.schemas||null,id:n.id||null}))}function nH(n,t){if(null==n)return $c;let e={};for(let i in n)if(n.hasOwnProperty(i)){let r=n[i],o=r;Array.isArray(r)&&(o=r[1],r=r[0]),e[r]=i,t&&(t[r]=o)}return e}function we(n){return ou(()=>{let t=t5(n);return n5(t),t})}function Km(n){return{type:n.type,name:n.name,factory:null,pure:!1!==n.pure,standalone:!0===n.standalone,onDestroy:n.type.prototype.ngOnDestroy||null}}function Da(n){return n[SM]||null}function tu(n){return n[HP]||null}function nu(n){return n[zP]||null}function e5(n){let t=Da(n)||tu(n)||nu(n);return null!==t&&t.standalone}function Gm(n,t){let e=n[$H]||null;if(!e&&!0===t)throw new Error(`Type ${po(n)} does not have '\u0275mod' property.`);return e}function t5(n){let t={};return{type:n.type,providersResolver:null,factory:null,hostBindings:n.hostBindings||null,hostVars:n.hostVars||0,hostAttrs:n.hostAttrs||null,contentQueries:n.contentQueries||null,declaredInputs:t,exportAs:n.exportAs||null,standalone:!0===n.standalone,selectors:n.selectors||Vi,viewQuery:n.viewQuery||null,features:n.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:nH(n.inputs,t),outputs:nH(n.outputs)}}function n5(n){n.features?.forEach(t=>t(n))}function eM(n,t){if(!n)return null;let e=t?nu:Dre;return()=>("function"==typeof n?n():n).map(i=>e(i)).filter(Ire)}var su=0,Fn=1,ri=2,Gr=3,_l=4,Fp=5,Ss=6,G_=7,Es=8,tM=9,nM=10,oi=11,FR=12,W_=13,iH=14,Jm=15,bl=16,rb=17,Lm=18,cc=19,EM=20,i5=21,Wr=22,UP=1,r5=2,jP=7,iM=8,Wm=9,ws=10;function Np(n){return Array.isArray(n)&&"object"==typeof n[UP]}function nd(n){return Array.isArray(n)&&!0===n[UP]}function GP(n){return 0!=(4&n.flags)}function TM(n){return n.componentOffset>-1}function DM(n){return 1==(1&n.flags)}function vl(n){return!!n.template}function Are(n){return 0!=(256&n[ri])}function Bp(n,t){return n.hasOwnProperty(ed)?n[ed]:null}var NR=class{constructor(t,e,i){this.previousValue=t,this.currentValue=e,this.firstChange=i}isFirstChange(){return this.firstChange}};function Gt(){return o5}function o5(n){return n.type.prototype.ngOnChanges&&(n.setInput=Pre),Rre}function Rre(){let n=a5(this),t=n?.current;if(t){let e=n.previous;if(e===$c)n.previous=t;else for(let i in t)e[i]=t[i];n.current=null,this.ngOnChanges(t)}}function Pre(n,t,e,i){let r=this.declaredInputs[e],o=a5(n)||function(n,t){return n[s5]=t}(n,{previous:$c,current:null}),s=o.current||(o.current={}),a=o.previous,l=a[r];s[r]=new NR(l&&l.currentValue,t,a===$c),n[i]=t}Gt.ngInherit=!0;var s5="__ngSimpleChanges__";function a5(n){return n[s5]||null}var Ta=function(n,t,e){},l5="svg",c5="math";function Ra(n){for(;Array.isArray(n);)n=n[su];return n}function IM(n,t){return Ra(t[n])}function oa(n,t){return Ra(t[n.index])}function d5(n,t){return n.data[t]}function $m(n,t){return n[t]}function id(n,t){let e=t[n];return Np(e)?e:e[su]}function rM(n){return 64==(64&n[ri])}function iu(n,t){return null==t?null:n[t]}function u5(n){n[Lm]=0}function WP(n,t){n[Fp]+=t;let e=n,i=n[Gr];for(;null!==i&&(1===t&&1===e[Fp]||-1===t&&0===e[Fp]);)i[Fp]+=t,e=i,i=i[Gr]}var jn={lFrame:v5(null),bindingsEnabled:!0};function p5(){return jn.bindingsEnabled}function Ze(){return jn.lFrame.lView}function Ei(){return jn.lFrame.tView}function X(n){return jn.lFrame.contextLView=n,n[Es]}function Q(n){return jn.lFrame.contextLView=null,n}function Po(){let n=f5();for(;null!==n&&64===n.type;)n=n.parent;return n}function f5(){return jn.lFrame.currentTNode}function q_(){let n=jn.lFrame,t=n.currentTNode;return n.isParent?t:t.parent}function dc(n,t){let e=jn.lFrame;e.currentTNode=n,e.isParent=t}function qP(){return jn.lFrame.isParent}function YP(){jn.lFrame.isParent=!1}function os(){let n=jn.lFrame,t=n.bindingRootIndex;return-1===t&&(t=n.bindingRootIndex=n.tView.bindingStartIndex),t}function rd(){return jn.lFrame.bindingIndex}function m5(n){return jn.lFrame.bindingIndex=n}function eh(){return jn.lFrame.bindingIndex++}function od(n){let t=jn.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+n,e}function h5(n){jn.lFrame.inI18n=n}function Gre(n,t){let e=jn.lFrame;e.bindingIndex=e.bindingRootIndex=n,LR(t)}function LR(n){jn.lFrame.currentDirectiveIndex=n}function XP(n){let t=jn.lFrame.currentDirectiveIndex;return-1===t?null:n[t]}function g5(){return jn.lFrame.currentQueryIndex}function QP(n){jn.lFrame.currentQueryIndex=n}function qre(n){let t=n[Fn];return 2===t.type?t.declTNode:1===t.type?n[Ss]:null}function _5(n,t,e){if(e&xi.SkipSelf){let r=t,o=n;for(;!(r=r.parent,null!==r||e&xi.Host||(r=qre(o),null===r||(o=o[Jm],10&r.type))););if(null===r)return!1;t=r,n=o}let i=jn.lFrame=b5();return i.currentTNode=t,i.lView=n,!0}function ZP(n){let t=b5(),e=n[Fn];jn.lFrame=t,t.currentTNode=e.firstChild,t.lView=n,t.tView=e,t.contextLView=n,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function b5(){let n=jn.lFrame,t=null===n?null:n.child;return null===t?v5(n):t}function v5(n){let t={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:n,child:null,inI18n:!1};return null!==n&&(n.child=t),t}function y5(){let n=jn.lFrame;return jn.lFrame=n.parent,n.currentTNode=null,n.lView=null,n}var x5=y5;function KP(){let n=y5();n.isParent=!0,n.tView=null,n.selectedIndex=-1,n.contextLView=null,n.elementDepthCount=0,n.currentDirectiveIndex=-1,n.currentNamespace=null,n.bindingRootIndex=-1,n.bindingIndex=-1,n.currentQueryIndex=0}function ss(){return jn.lFrame.selectedIndex}function Vp(n){jn.lFrame.selectedIndex=n}function kr(){let n=jn.lFrame;return d5(n.tView,n.selectedIndex)}function Nn(){jn.lFrame.currentNamespace=l5}function Oo(){jn.lFrame.currentNamespace=null}function AM(n,t){for(let e=t.directiveStart,i=t.directiveEnd;e<i;e++){let o=n.data[e].type.prototype,{ngAfterContentInit:s,ngAfterContentChecked:a,ngAfterViewInit:l,ngAfterViewChecked:c,ngOnDestroy:d}=o;s&&(n.contentHooks??(n.contentHooks=[])).push(-e,s),a&&((n.contentHooks??(n.contentHooks=[])).push(e,a),(n.contentCheckHooks??(n.contentCheckHooks=[])).push(e,a)),l&&(n.viewHooks??(n.viewHooks=[])).push(-e,l),c&&((n.viewHooks??(n.viewHooks=[])).push(e,c),(n.viewCheckHooks??(n.viewCheckHooks=[])).push(e,c)),null!=d&&(n.destroyHooks??(n.destroyHooks=[])).push(e,d)}}function jC(n,t,e){C5(n,t,3,e)}function GC(n,t,e,i){(3&n[ri])===e&&C5(n,t,e,i)}function dR(n,t){let e=n[ri];(3&e)===t&&(e&=2047,e+=1,n[ri]=e)}function C5(n,t,e,i){let o=i??-1,s=t.length-1,a=0;for(let l=void 0!==i?65535&n[Lm]:0;l<s;l++)if("number"==typeof t[l+1]){if(a=t[l],null!=i&&a>=i)break}else t[l]<0&&(n[Lm]+=65536),(a<o||-1==o)&&($re(n,e,t,l),n[Lm]=(4294901760&n[Lm])+l+2),l++}function $re(n,t,e,i){let r=e[i]<0,o=e[i+1],a=n[r?-e[i]:e[i]];if(r){if(n[ri]>>11<n[Lm]>>16&&(3&n[ri])===t){n[ri]+=2048,Ta(4,a,o);try{o.call(a)}finally{Ta(5,a,o)}}}else{Ta(4,a,o);try{o.call(a)}finally{Ta(5,a,o)}}}var jm=-1,Hp=class{constructor(t,e,i){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=i}};function BR(n,t,e){let i=0;for(;i<e.length;){let r=e[i];if("number"==typeof r){if(0!==r)break;i++;let o=e[i++],s=e[i++],a=e[i++];n.setAttribute(t,s,a,o)}else{let o=r,s=e[++i];ioe(o)?n.setProperty(t,o,s):n.setAttribute(t,o,s),i++}}return i}function M5(n){return 3===n||4===n||6===n}function ioe(n){return 64===n.charCodeAt(0)}function Y_(n,t){if(null!==t&&0!==t.length)if(null===n||0===n.length)n=t.slice();else{let e=-1;for(let i=0;i<t.length;i++){let r=t[i];"number"==typeof r?e=r:0===e||oH(n,e,r,null,-1===e||2===e?t[++i]:null)}}return n}function oH(n,t,e,i,r){let o=0,s=n.length;if(-1===t)s=-1;else for(;o<n.length;){let a=n[o++];if("number"==typeof a){if(a===t){s=-1;break}if(a>t){s=o-1;break}}}for(;o<n.length;){let a=n[o];if("number"==typeof a)break;if(a===e){if(null===i)return void(null!==r&&(n[o+1]=r));if(i===n[o+1])return void(n[o+2]=r)}o++,null!==i&&o++,null!==r&&o++}-1!==s&&(n.splice(s,0,t),o=s+1),n.splice(o++,0,e),null!==i&&n.splice(o++,0,i),null!==r&&n.splice(o++,0,r)}function w5(n){return n!==jm}function oM(n){return 32767&n}function sM(n,t){let e=function(n){return n>>16}(n),i=t;for(;e>0;)i=i[Jm],e--;return i}var VR=!0;function aM(n){let t=VR;return VR=n,t}var S5=255,E5=5,soe=0,lc={};function lM(n,t){let e=T5(n,t);if(-1!==e)return e;let i=t[Fn];i.firstCreatePass&&(n.injectorIndex=t.length,uR(i.data,n),uR(t,null),uR(i.blueprint,null));let r=JP(n,t),o=n.injectorIndex;if(w5(r)){let s=oM(r),a=sM(r,t),l=a[Fn].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function uR(n,t){n.push(0,0,0,0,0,0,0,0,t)}function T5(n,t){return-1===n.injectorIndex||n.parent&&n.parent.injectorIndex===n.injectorIndex||null===t[n.injectorIndex+8]?-1:n.injectorIndex}function JP(n,t){if(n.parent&&-1!==n.parent.injectorIndex)return n.parent.injectorIndex;let e=0,i=null,r=t;for(;null!==r;){if(i=P5(r),null===i)return jm;if(e++,r=r[Jm],-1!==i.injectorIndex)return i.injectorIndex|e<<16}return jm}function HR(n,t,e){!function(n,t,e){let i;"string"==typeof e?i=e.charCodeAt(0)||0:e.hasOwnProperty(F_)&&(i=e[F_]),null==i&&(i=e[F_]=soe++);let r=i&S5;t.data[n+(r>>E5)]|=1<<r}(n,t,e)}function D5(n,t,e){if(e&xi.Optional||void 0!==n)return n;BP()}function I5(n,t,e,i){if(e&xi.Optional&&void 0===i&&(i=null),0==(e&(xi.Self|xi.Host))){let r=n[tM],o=Ea(void 0);try{return r?r.get(t,i,e&xi.Optional):KH(t,i,e&xi.Optional)}finally{Ea(o)}}return D5(i,0,e)}function A5(n,t,e,i=xi.Default,r){if(null!==n){if(1024&t[ri]){let s=function(n,t,e,i,r){let o=n,s=t;for(;null!==o&&null!==s&&1024&s[ri]&&!(256&s[ri]);){let a=R5(o,s,e,i|xi.Self,lc);if(a!==lc)return a;let l=o.parent;if(!l){let c=s[i5];if(c){let d=c.get(e,lc,i);if(d!==lc)return d}l=P5(s),s=s[Jm]}o=l}return r}(n,t,e,i,lc);if(s!==lc)return s}let o=R5(n,t,e,i,lc);if(o!==lc)return o}return I5(t,e,i,r)}function R5(n,t,e,i,r){let o=function(n){if("string"==typeof n)return n.charCodeAt(0)||0;let t=n.hasOwnProperty(F_)?n[F_]:void 0;return"number"==typeof t?t>=0?t&S5:uoe:t}(e);if("function"==typeof o){if(!_5(t,n,i))return i&xi.Host?D5(r,0,i):I5(t,e,i,r);try{let s=o(i);if(null!=s||i&xi.Optional)return s;BP()}finally{x5()}}else if("number"==typeof o){let s=null,a=T5(n,t),l=jm,c=i&xi.Host?t[bl][Ss]:null;for((-1===a||i&xi.SkipSelf)&&(l=-1===a?JP(n,t):t[a+8],l!==jm&&aH(i,!1)?(s=t[Fn],a=oM(l),t=sM(l,t)):a=-1);-1!==a;){let d=t[Fn];if(sH(o,a,d.data)){let u=coe(a,t,e,s,i,c);if(u!==lc)return u}l=t[a+8],l!==jm&&aH(i,t[Fn].data[a+8]===c)&&sH(o,a,t)?(s=d,a=oM(l),t=sM(l,t)):a=-1}}return r}function coe(n,t,e,i,r,o){let s=t[Fn],a=s.data[n+8],d=WC(a,s,e,null==i?TM(a)&&VR:i!=s&&0!=(3&a.type),r&xi.Host&&o===a);return null!==d?zp(t,s,d,a):lc}function WC(n,t,e,i,r){let o=n.providerIndexes,s=t.data,a=1048575&o,l=n.directiveStart,d=o>>20,p=r?a+d:n.directiveEnd;for(let f=i?a:a+d;f<p;f++){let m=s[f];if(f<l&&e===m||f>=l&&m.type===e)return f}if(r){let f=s[l];if(f&&vl(f)&&f.type===e)return l}return null}function zp(n,t,e,i){let r=n[e],o=t.data;if(function(n){return n instanceof Hp}(r)){let s=r;s.resolving&&function(n,t){throw new yt(-200,`Circular dependency in DI detected for ${n}`)}(LP(o[e]));let a=aM(s.canSeeViewProviders);s.resolving=!0;let l=s.injectImpl?Ea(s.injectImpl):null;_5(n,i,xi.Default);try{r=n[e]=s.factory(void 0,o,n,i),t.firstCreatePass&&e>=i.directiveStart&&function(n,t,e){let{ngOnChanges:i,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(i){let s=o5(t);(e.preOrderHooks??(e.preOrderHooks=[])).push(n,s),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,s)}r&&(e.preOrderHooks??(e.preOrderHooks=[])).push(0-n,r),o&&((e.preOrderHooks??(e.preOrderHooks=[])).push(n,o),(e.preOrderCheckHooks??(e.preOrderCheckHooks=[])).push(n,o))}(e,o[e],t)}finally{null!==l&&Ea(l),aM(a),s.resolving=!1,x5()}}return r}function sH(n,t,e){return!!(e[t+(n>>E5)]&1<<n)}function aH(n,t){return!(n&xi.Self||n&xi.Host&&t)}var Lp=class{constructor(t,e){this._tNode=t,this._lView=e}get(t,e,i){return A5(this._tNode,this._lView,t,wM(i),e)}};function uoe(){return new Lp(Po(),Ze())}function Xn(n){return ou(()=>{let t=n.prototype.constructor,e=t[ed]||zR(t),i=Object.prototype,r=Object.getPrototypeOf(n.prototype).constructor;for(;r&&r!==i;){let o=r[ed]||zR(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function zR(n){return YH(n)?()=>{let t=zR(Ri(n));return t&&t()}:Bp(n)}function P5(n){let t=n[Fn],e=t.type;return 2===e?t.declTNode:1===e?n[Ss]:null}function yo(n){return function(n,t){if("class"===t)return n.classes;if("style"===t)return n.styles;let e=n.attrs;if(e){let i=e.length,r=0;for(;r<i;){let o=e[r];if(M5(o))break;if(0===o)r+=2;else if("number"==typeof o)for(r++;r<i&&"string"==typeof e[r];)r++;else{if(o===t)return e[r+1];r+=2}}}return null}(Po(),n)}var Bm="__annotations__",Vm="__parameters__",Hm="__prop__metadata__";function ob(n,t,e,i,r){return ou(()=>{let o=$P(t);function s(...a){if(this instanceof s)return o.call(this,...a),this;let l=new s(...a);return function(d){return r&&r(d,...a),(d.hasOwnProperty(Bm)?d[Bm]:Object.defineProperty(d,Bm,{value:[]})[Bm]).push(l),i&&i(d),d}}return e&&(s.prototype=Object.create(e.prototype)),s.prototype.ngMetadataName=n,s.annotationCls=s,s})}function $P(n){return function(...e){if(n){let i=n(...e);for(let r in i)this[r]=i[r]}}}function th(n,t,e){return ou(()=>{let i=$P(t);function r(...o){if(this instanceof r)return i.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,d){let u=l.hasOwnProperty(Vm)?l[Vm]:Object.defineProperty(l,Vm,{value:[]})[Vm];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=n,r.annotationCls=r,r})}function au(n,t,e,i){return ou(()=>{let r=$P(t);function o(...s){if(this instanceof o)return r.apply(this,s),this;let a=new o(...s);return function(c,d){let u=c.constructor,p=u.hasOwnProperty(Hm)?u[Hm]:Object.defineProperty(u,Hm,{value:{}})[Hm];p[d]=p.hasOwnProperty(d)&&p[d]||[],p[d].unshift(a),i&&i(c,d,...s)}}return e&&(o.prototype=Object.create(e.prototype)),o.prototype.ngMetadataName=n,o.annotationCls=o,o})}var foe=th("Attribute",n=>({attributeName:n,__NG_ELEMENT_ID__:()=>yo(n)})),ie=class{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ue({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}},qm=(new ie("AnalyzeForEntryComponents"),class{});function Ia(n){let t=Ur.ng;if(t&&t.\u0275compilerFacade)return t.\u0275compilerFacade;throw new Error("JIT compiler unavailable")}au("ContentChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!1,descendants:!1,emitDistinctChangesOnly:!0,...t}),qm),au("ContentChild",(n,t={})=>({selector:n,first:!0,isViewQuery:!1,descendants:!0,...t}),qm),au("ViewChildren",(n,t={})=>({selector:n,first:!1,isViewQuery:!0,descendants:!0,emitDistinctChangesOnly:!0,...t}),qm),au("ViewChild",(n,t)=>({selector:n,first:!0,isViewQuery:!0,descendants:!0,...t}),qm);var moe=Function;function R_(n){return"function"==typeof n}function $d(n){return n.flat(Number.POSITIVE_INFINITY)}function eO(n,t){n.forEach(e=>Array.isArray(e)?eO(e,t):t(e))}function k5(n,t,e){t>=n.length?n.push(e):n.splice(t,0,e)}function cM(n,t){return t>=n.length-1?n.pop():n.splice(t,1)[0]}function N_(n,t){let e=[];for(let i=0;i<n;i++)e.push(t);return e}function sa(n,t,e){let i=sb(n,t);return i>=0?n[1|i]=e:(i=~i,function(n,t,e,i){let r=n.length;if(r==t)n.push(e,i);else if(1===r)n.push(i,n[0]),n[0]=e;else{for(r--,n.push(n[r-1],n[r]);r>t;)n[r]=n[r-2],r--;n[t]=e,n[t+1]=i}}(n,i,t,e)),i}function pR(n,t){let e=sb(n,t);if(e>=0)return n[1|e]}function sb(n,t){return function(n,t,e){let i=0,r=n.length>>1;for(;r!==i;){let o=i+(r-i>>1),s=n[o<<1];if(t===s)return o<<1;s>t?r=o:i=o+1}return~(r<<1)}(n,t)}var boe=/^function\s+\S+\(\)\s*{[\s\S]+\.apply\(this,\s*(arguments|(?:[^()]+\(\[\],)?[^()]+\(arguments\).*)\)/,voe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{/,yoe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(/,xoe=/^class\s+[A-Za-z\d$_]*\s*extends\s+[^{]+{[\s\S]*constructor\s*\(\)\s*{[^}]*super\(\.\.\.arguments\)/,UR=class{constructor(t){this._reflect=t||Ur.Reflect}factory(t){return(...e)=>new t(...e)}_zipTypesAndAnnotations(t,e){let i;i=N_(typeof t>"u"?e.length:t.length);for(let r=0;r<i.length;r++)i[r]=typeof t>"u"?[]:t[r]&&t[r]!=Object?[t[r]]:[],e&&null!=e[r]&&(i[r]=i[r].concat(e[r]));return i}_ownParameters(t,e){let i=t.toString();if(boe.test(n=i)||xoe.test(n)||voe.test(n)&&!yoe.test(n))return null;var n;if(t.parameters&&t.parameters!==e.parameters)return t.parameters;let r=t.ctorParameters;if(r&&r!==e.ctorParameters){let a="function"==typeof r?r():r,l=a.map(d=>d&&d.type),c=a.map(d=>d&&fR(d.decorators));return this._zipTypesAndAnnotations(l,c)}let o=t.hasOwnProperty(Vm)&&t[Vm],s=this._reflect&&this._reflect.getOwnMetadata&&this._reflect.getOwnMetadata("design:paramtypes",t);return s||o?this._zipTypesAndAnnotations(s,o):N_(t.length)}parameters(t){if(!R_(t))return[];let e=BC(t),i=this._ownParameters(t,e);return!i&&e!==Object&&(i=this.parameters(e)),i||[]}_ownAnnotations(t,e){if(t.annotations&&t.annotations!==e.annotations){let i=t.annotations;return"function"==typeof i&&i.annotations&&(i=i.annotations),i}return t.decorators&&t.decorators!==e.decorators?fR(t.decorators):t.hasOwnProperty(Bm)?t[Bm]:null}annotations(t){if(!R_(t))return[];let e=BC(t),i=this._ownAnnotations(t,e)||[];return(e!==Object?this.annotations(e):[]).concat(i)}_ownPropMetadata(t,e){if(t.propMetadata&&t.propMetadata!==e.propMetadata){let i=t.propMetadata;return"function"==typeof i&&i.propMetadata&&(i=i.propMetadata),i}if(t.propDecorators&&t.propDecorators!==e.propDecorators){let i=t.propDecorators,r={};return Object.keys(i).forEach(o=>{r[o]=fR(i[o])}),r}return t.hasOwnProperty(Hm)?t[Hm]:null}propMetadata(t){if(!R_(t))return{};let e=BC(t),i={};if(e!==Object){let o=this.propMetadata(e);Object.keys(o).forEach(s=>{i[s]=o[s]})}let r=this._ownPropMetadata(t,e);return r&&Object.keys(r).forEach(o=>{let s=[];i.hasOwnProperty(o)&&s.push(...i[o]),s.push(...r[o]),i[o]=s}),i}ownPropMetadata(t){return R_(t)&&this._ownPropMetadata(t,BC(t))||{}}hasLifecycleHook(t,e){return t instanceof moe&&e in t.prototype}};function fR(n){return n?n.map(t=>new(0,t.type.annotationCls)(...t.args?t.args:[])):[]}function BC(n){let t=n.prototype?Object.getPrototypeOf(n.prototype):null;return(t?t.constructor:null)||Object}var nh=nb(th("Inject",n=>({token:n})),-1),Ts=nb(th("Optional"),8),Moe=nb(th("Self"),2),sd=nb(th("SkipSelf"),4),woe=nb(th("Host"),1),lH=null;function tO(){return lH=lH||new UR}function RM(n){return F5(tO().parameters(n))}function F5(n){return n.map(t=>function(n){let t={token:null,attribute:null,host:!1,optional:!1,self:!1,skipSelf:!1};if(Array.isArray(n)&&n.length>0)for(let e=0;e<n.length;e++){let i=n[e];if(void 0===i)continue;let r=Object.getPrototypeOf(i);if(i instanceof Ts||"Optional"===r.ngMetadataName)t.optional=!0;else if(i instanceof sd||"SkipSelf"===r.ngMetadataName)t.skipSelf=!0;else if(i instanceof Moe||"Self"===r.ngMetadataName)t.self=!0;else if(i instanceof woe||"Host"===r.ngMetadataName)t.host=!0;else if(i instanceof nh)t.token=i.token;else if(i instanceof foe){if(void 0===i.attributeName)throw new yt(204,!1);t.attribute=i.attributeName}else t.token=i}else t.token=void 0===n||Array.isArray(n)&&0===n.length?null:n;return t}(t))}var X_=new Map,N5=new Set;function L5(n){return!!(n.templateUrl&&!n.hasOwnProperty("template")||n.styleUrls&&n.styleUrls.length)}var cH=new Map,Poe=!0;function B5(n,t){(function(n,t,e){if(t&&t!==e&&Poe)throw new Error(`Duplicate module registered for ${n} - ${po(t)} vs ${po(t.name)}`)})(t,cH.get(t)||null,n),cH.set(t,n)}var jR,Aa=(()=>{return(n=Aa||(Aa={}))[n.Important=1]="Important",n[n.DashCase=2]="DashCase",Aa;var n})(),koe=/^>|^->|<!--|-->|--!>|<!-$/g,Foe=/(<|>)/,Noe="\u200b$1\u200b",V5=new Map,Boe=0,dH="__ngContext__";function uc(n,t){Np(t)?(n[dH]=t[EM],function(n){V5.set(n[EM],n)}(t)):n[dH]=t}function nO(n,t){return jR(n,t)}function iO(n){let t=n[Gr];return nd(t)?t[Gr]:t}function rO(n){return H5(n[W_])}function oO(n){return H5(n[_l])}function H5(n){for(;null!==n&&!nd(n);)n=n[_l];return n}function zm(n,t,e,i,r){if(null!=i){let o,s=!1;nd(i)?o=i:Np(i)&&(s=!0,i=i[su]);let a=Ra(i);0===n&&null!==e?null==r?q5(t,e,a):Up(t,e,a,r||null,!0):1===n&&null!==e?Up(t,e,a,r||null,!0):2===n?lO(t,a,s):3===n&&t.destroyNode(a),null!=o&&function(n,t,e,i,r){let o=e[jP];o!==Ra(e)&&zm(t,n,i,o,r);for(let a=ws;a<e.length;a++){let l=e[a];ab(l[Fn],l,n,t,i,o)}}(t,n,o,e,r)}}function sO(n,t){return n.createText(t)}function z5(n,t,e){n.setValue(t,e)}function joe(n,t){return n.createComment(function(n){return n.replace(koe,t=>t.replace(Foe,Noe))}(t))}function aO(n,t,e){return n.createElement(t,e)}function U5(n,t){let e=n[Wm],i=e.indexOf(t),r=t[Gr];512&t[ri]&&(t[ri]&=-513,WP(r,-1)),e.splice(i,1)}function GR(n,t){if(n.length<=ws)return;let e=ws+t,i=n[e];if(i){let r=i[rb];null!==r&&r!==n&&U5(r,i),t>0&&(n[e-1][_l]=i[_l]);let o=cM(n,ws+t);!function(n,t){ab(n,t,t[oi],2,null,null),t[su]=null,t[Ss]=null}(i[Fn],i);let s=o[cc];null!==s&&s.detachView(o[Fn]),i[Gr]=null,i[_l]=null,i[ri]&=-65}return i}function j5(n,t){if(!(128&t[ri])){let e=t[oi];e.destroyNode&&ab(n,t,e,3,null,null),function(n){let t=n[W_];if(!t)return mR(n[Fn],n);for(;t;){let e=null;if(Np(t))e=t[W_];else{let i=t[ws];i&&(e=i)}if(!e){for(;t&&!t[_l]&&t!==n;)Np(t)&&mR(t[Fn],t),t=t[Gr];null===t&&(t=n),Np(t)&&mR(t[Fn],t),e=t&&t[_l]}t=e}}(t)}}function mR(n,t){if(!(128&t[ri])){t[ri]&=-65,t[ri]|=128,function(n,t){let e;if(null!=n&&null!=(e=n.destroyHooks))for(let i=0;i<e.length;i+=2){let r=t[e[i]];if(!(r instanceof Hp)){let o=e[i+1];if(Array.isArray(o))for(let s=0;s<o.length;s+=2){let a=r[o[s]],l=o[s+1];Ta(4,a,l);try{l.call(a)}finally{Ta(5,a,l)}}else{Ta(4,r,o);try{o.call(r)}finally{Ta(5,r,o)}}}}}(n,t),function(n,t){let e=n.cleanup,i=t[G_],r=-1;if(null!==e)for(let o=0;o<e.length-1;o+=2)if("string"==typeof e[o]){let s=e[o+3];s>=0?i[r=s]():i[r=-s].unsubscribe(),o+=2}else{let s=i[r=e[o+1]];e[o].call(s)}if(null!==i){for(let o=r+1;o<i.length;o++)(0,i[o])();t[G_]=null}}(n,t),1===t[Fn].type&&t[oi].destroy();let e=t[rb];if(null!==e&&nd(t[Gr])){e!==t[Gr]&&U5(e,t);let i=t[cc];null!==i&&i.detachView(n)}!function(n){V5.delete(n[EM])}(t)}}function G5(n,t,e){return W5(n,t.parent,e)}function W5(n,t,e){let i=t;for(;null!==i&&40&i.type;)i=(t=i).parent;if(null===i)return e[su];{let{componentOffset:r}=i;if(r>-1){let{encapsulation:o}=n.data[i.directiveStart+r];if(o===ra.None||o===ra.Emulated)return null}return oa(i,e)}}function Up(n,t,e,i,r){n.insertBefore(t,e,i,r)}function q5(n,t,e){n.appendChild(t,e)}function uH(n,t,e,i,r){null!==i?Up(n,t,e,i,r):q5(n,t,e)}function PM(n,t){return n.parentNode(t)}function Y5(n,t,e){return Q5(n,t,e)}function X5(n,t,e){return 40&n.type?oa(n,e):null}var WR,VC,YR,HC,Q5=X5;function Z5(n,t){Q5=n,WR=t}function OM(n,t,e,i){let r=G5(n,i,t),o=t[oi],a=Y5(i.parent||t[Ss],i,t);if(null!=r)if(Array.isArray(e))for(let l=0;l<e.length;l++)uH(o,r,e[l],a,!1);else uH(o,r,e,a,!1);void 0!==WR&&WR(o,i,t,e,r)}function qC(n,t){if(null!==t){let e=t.type;if(3&e)return oa(t,n);if(4&e)return qR(-1,n[t.index]);if(8&e){let i=t.child;if(null!==i)return qC(n,i);{let r=n[t.index];return nd(r)?qR(-1,r):Ra(r)}}if(32&e)return nO(t,n)()||Ra(n[t.index]);{let i=K5(n,t);return null!==i?Array.isArray(i)?i[0]:qC(iO(n[bl]),i):qC(n,t.next)}}return null}function K5(n,t){return null!==t?n[bl][Ss].projection[t.projection]:null}function qR(n,t){let e=ws+n+1;if(e<t.length){let i=t[e],r=i[Fn].firstChild;if(null!==r)return qC(i,r)}return t[jP]}function lO(n,t,e){let i=PM(n,t);i&&function(n,t,e,i){n.removeChild(t,e,i)}(n,i,t,e)}function cO(n,t,e,i,r,o,s){for(;null!=e;){let a=i[e.index],l=e.type;if(s&&0===t&&(a&&uc(Ra(a),i),e.flags|=2),32!=(32&e.flags))if(8&l)cO(n,t,e.child,i,r,o,!1),zm(t,n,r,a,o);else if(32&l){let d,c=nO(e,i);for(;d=c();)zm(t,n,r,d,o);zm(t,n,r,a,o)}else 16&l?J5(n,t,i,e,r,o):zm(t,n,r,a,o);e=s?e.projectionNext:e.next}}function ab(n,t,e,i,r,o){cO(e,i,n.firstChild,t,r,o,!1)}function J5(n,t,e,i,r,o){let s=e[bl],l=s[Ss].projection[i.projection];if(Array.isArray(l))for(let c=0;c<l.length;c++)zm(t,n,r,l[c],o);else cO(n,t,l,s[Gr],r,o,!0)}function $5(n,t,e){""===e?n.removeAttribute(t,"class"):n.setAttribute(t,"class",e)}function ez(n,t,e){let{mergedAttrs:i,classes:r,styles:o}=e;null!==i&&BR(n,t,i),null!==r&&$5(n,t,r),null!==o&&function(n,t,e){n.setAttribute(t,"style",e)}(n,t,o)}function tz(){if(void 0===VC&&(VC=null,Ur.trustedTypes))try{VC=Ur.trustedTypes.createPolicy("angular",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return VC}function ih(n){return tz()?.createHTML(n)||n}function iz(){return void 0!==YR?YR:typeof document<"u"?document:void 0}function dO(){if(void 0===HC&&(HC=null,Ur.trustedTypes))try{HC=Ur.trustedTypes.createPolicy("angular#unsafe-bypass",{createHTML:n=>n,createScript:n=>n,createScriptURL:n=>n})}catch{}return HC}function pH(n){return dO()?.createHTML(n)||n}function fH(n){return dO()?.createScript(n)||n}function mH(n){return dO()?.createScriptURL(n)||n}var td=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${tb})`}},XR=class extends td{getTypeName(){return"HTML"}},QR=class extends td{getTypeName(){return"Style"}},ZR=class extends td{getTypeName(){return"Script"}},KR=class extends td{getTypeName(){return"URL"}},JR=class extends td{getTypeName(){return"ResourceURL"}};function Ds(n){return n instanceof td?n.changingThisBreaksApplicationSecurity:n}function xl(n,t){let e=function(n){return n instanceof td&&n.getTypeName()||null}(n);if(null!=e&&e!==t){if("ResourceURL"===e&&"URL"===t)return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${tb})`)}return e===t}function cz(n){let t=new eP(n);return function(){try{return!!(new window.DOMParser).parseFromString(ih(""),"text/html")}catch{return!1}}()?new $R(t):t}var $R=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t="<body><remove></remove>"+t;try{let e=(new window.DOMParser).parseFromString(ih(t),"text/html").body;return null===e?this.inertDocumentHelper.getInertBodyElement(t):(e.removeChild(e.firstChild),e)}catch{return null}}},eP=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=ih(t),e}},lse=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function lb(n){return(n=String(n)).match(lse)?n:"unsafe:"+n}function ad(n){let t={};for(let e of n.split(","))t[e]=!0;return t}function cb(...n){let t={};for(let e of n)for(let i in e)e.hasOwnProperty(i)&&(t[i]=!0);return t}var zC,dz=ad("area,br,col,hr,img,wbr"),uz=ad("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),pz=ad("rp,rt"),cse=cb(pz,uz),dse=cb(uz,ad("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),use=cb(pz,ad("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),tP=cb(dz,dse,use,cse),uO=ad("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),pse=ad("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,srcset,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),fse=ad("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext"),fz=cb(uO,pse,fse),mse=ad("script,style,template"),nP=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,i=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?i=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,i&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let r=this.checkClobberedElement(e,e.nextSibling);if(r){e=r;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){let e=t.nodeName.toLowerCase();if(!tP.hasOwnProperty(e))return this.sanitizedSomething=!0,!mse.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let i=t.attributes;for(let r=0;r<i.length;r++){let o=i.item(r),s=o.name,a=s.toLowerCase();if(!fz.hasOwnProperty(a)){this.sanitizedSomething=!0;continue}let l=o.value;uO[a]&&(l=lb(l)),this.buf.push(" ",s,'="',hH(l),'"')}return this.buf.push(">"),!0}endElement(t){let e=t.nodeName.toLowerCase();tP.hasOwnProperty(e)&&!dz.hasOwnProperty(e)&&(this.buf.push("</"),this.buf.push(e),this.buf.push(">"))}chars(t){this.buf.push(hH(t))}checkClobberedElement(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}},hse=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,gse=/([^\#-~ |!])/g;function hH(n){return n.replace(/&/g,"&amp;").replace(hse,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(gse,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function pO(n,t){let e=null;try{zC=zC||cz(n);let i=t?String(t):"";e=zC.getInertBodyElement(i);let r=5,o=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=o,o=e.innerHTML,e=zC.getInertBodyElement(i)}while(i!==o);return ih((new nP).sanitizeChildren(iP(e)||e))}finally{if(e){let i=iP(e)||e;for(;i.firstChild;)i.removeChild(i.firstChild)}}}function iP(n){return"content"in n&&function(n){return n.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===n.nodeName}(n)?n.content:null}var jr=(()=>{return(n=jr||(jr={}))[n.NONE=0]="NONE",n[n.HTML=1]="HTML",n[n.STYLE=2]="STYLE",n[n.SCRIPT=3]="SCRIPT",n[n.URL=4]="URL",n[n.RESOURCE_URL=5]="RESOURCE_URL",jr;var n})();function fO(n){let t=db();return t?pH(t.sanitize(jr.HTML,n)||""):xl(n,"HTML")?pH(Ds(n)):pO(iz(),Un(n))}function ka(n){let t=db();return t?t.sanitize(jr.URL,n)||"":xl(n,"URL")?Ds(n):lb(Un(n))}function mz(n){let t=db();if(t)return mH(t.sanitize(jr.RESOURCE_URL,n)||"");if(xl(n,"ResourceURL"))return mH(Ds(n));throw new yt(904,!1)}function db(){let n=Ze();return n&&n[FR]}var kM=new ie("ENVIRONMENT_INITIALIZER"),hz=new ie("INJECTOR",-1),gz=new ie("INJECTOR_DEF_TYPES"),dM=class{get(t,e=j_){if(e===j_){let i=new Error(`NullInjectorError: No provider for ${po(t)}!`);throw i.name="NullInjectorError",i}return e}};function wse(...n){return{"\u0275providers":_z(0,n),"\u0275fromNgModule":!0}}function _z(n,...t){let r,e=[],i=new Set;return eO(t,o=>{let s=o;rP(s,e,[],i)&&(r||(r=[]),r.push(s))}),void 0!==r&&bz(r,e),e}function bz(n,t){for(let e=0;e<n.length;e++){let{providers:r}=n[e];mO(r,o=>{t.push(o)})}}function rP(n,t,e,i){if(!(n=Ri(n)))return!1;let r=null,o=eH(n),s=!o&&Da(n);if(o||s){if(s&&!s.standalone)return!1;r=n}else{let l=n.ngModule;if(o=eH(l),!o)return!1;r=l}let a=i.has(r);if(s){if(a)return!1;if(i.add(r),s.dependencies){let l="function"==typeof s.dependencies?s.dependencies():s.dependencies;for(let c of l)rP(c,t,e,i)}}else{if(!o)return!1;{if(null!=o.imports&&!a){let c;i.add(r);try{eO(o.imports,d=>{rP(d,t,e,i)&&(c||(c=[]),c.push(d))})}finally{}void 0!==c&&bz(c,t)}if(!a){let c=Bp(r)||(()=>new r);t.push({provide:r,useFactory:c,deps:Vi},{provide:gz,useValue:r,multi:!0},{provide:kM,useValue:()=>k(r),multi:!0})}let l=o.providers;null==l||a||mO(l,d=>{t.push(d)})}}return r!==n&&void 0!==n.providers}function mO(n,t){for(let e of n)XH(e)&&(e=e.\u0275providers),Array.isArray(e)?mO(e,t):t(e)}var Sse=tr({provide:String,useValue:tr});function vz(n){return null!==n&&"object"==typeof n&&Sse in n}function Ym(n){return"function"==typeof n}var hR,NM=new ie("Set Injector scope."),YC={},Ise={};function hO(){return void 0===hR&&(hR=new dM),hR}var pc=class{},uM=class extends pc{get destroyed(){return this._destroyed}constructor(t,e,i,r){super(),this.parent=e,this.source=i,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,sP(t,s=>this.processProvider(s)),this.records.set(hz,Um(void 0,this)),r.has("environment")&&this.records.set(pc,Um(void 0,this));let o=this.records.get(NM);null!=o&&"string"==typeof o.value&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(gz.multi,Vi,xi.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{for(let t of this._ngOnDestroyHooks)t.ngOnDestroy();for(let t of this._onDestroyHooks)t()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),this._onDestroyHooks.length=0}}onDestroy(t){this._onDestroyHooks.push(t)}runInContext(t){this.assertNotDestroyed();let e=Nm(this),i=Ea(void 0);try{return t()}finally{Nm(e),Ea(i)}}get(t,e=j_,i=xi.Default){this.assertNotDestroyed(),i=wM(i);let r=Nm(this),o=Ea(void 0);try{if(!(i&xi.SkipSelf)){let a=this.records.get(t);if(void 0===a){let l=("function"==typeof(n=t)||"object"==typeof n&&n instanceof ie)&&VP(t);a=l&&this.injectableDefInScope(l)?Um(oP(t),YC):null,this.records.set(t,a)}if(null!=a)return this.hydrate(t,a)}return(i&xi.Self?hO():this.parent).get(t,e=i&xi.Optional&&e===j_?null:e)}catch(s){if("NullInjectorError"===s.name){if((s[$C]=s[$C]||[]).unshift(po(t)),r)throw s;return function(n,t,e,i){let r=n[$C];throw t[tH]&&r.unshift(t[tH]),n.message=function(n,t,e,i=null){n=n&&"\n"===n.charAt(0)&&n.charAt(1)==Cre?n.slice(2):n;let r=po(t);if(Array.isArray(t))r=t.map(po).join(" -> ");else if("object"==typeof t){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+("string"==typeof a?JSON.stringify(a):po(a)))}r=`{${o.join(", ")}}`}return`${e}${i?"("+i+")":""}[${r}]: ${n.replace(xre,"\n  ")}`}("\n"+n.message,r,e,i),n[yre]=r,n[$C]=null,n}(s,t,"R3InjectorError",this.source)}throw s}finally{Ea(o),Nm(r)}var n}resolveInjectorInitializers(){let t=Nm(this),e=Ea(void 0);try{let i=this.get(kM.multi,Vi,xi.Self);for(let r of i)r()}finally{Nm(t),Ea(e)}}toString(){let t=[],e=this.records;for(let i of e.keys())t.push(po(i));return`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new yt(205,!1)}processProvider(t){let e=Ym(t=Ri(t))?t:Ri(t&&t.provide),i=function(n){return vz(n)?Um(void 0,n.useValue):Um(yz(n),YC)}(t);if(Ym(t)||!0!==t.multi)this.records.get(e);else{let r=this.records.get(e);r||(r=Um(void 0,YC,!0),r.factory=()=>kR(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,i)}hydrate(t,e){return e.value===YC&&(e.value=Ise,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this._ngOnDestroyHooks.add(e.value),e.value;var n}injectableDefInScope(t){if(!t.providedIn)return!1;let e=Ri(t.providedIn);return"string"==typeof e?"any"===e||this.scopes.has(e):this.injectorDefTypes.has(e)}};function oP(n){let t=VP(n),e=null!==t?t.factory:Bp(n);if(null!==e)return e;if(n instanceof ie)throw new yt(204,!1);if(n instanceof Function)return function(n){let t=n.length;if(t>0)throw N_(t,"?"),new yt(204,!1);let e=function(n){return n&&(n[JC]||n[ZH])||null}(n);return null!==e?()=>e.factory(n):()=>new n}(n);throw new yt(204,!1)}function yz(n,t,e){let i;if(Ym(n)){let r=Ri(n);return Bp(r)||oP(r)}if(vz(n))i=()=>Ri(n.useValue);else if(function(n){return!(!n||!n.useFactory)}(n))i=()=>n.useFactory(...kR(n.deps||[]));else if(function(n){return!(!n||!n.useExisting)}(n))i=()=>k(Ri(n.useExisting));else{let r=Ri(n&&(n.useClass||n.provide));if(!function(n){return!!n.deps}(n))return Bp(r)||oP(r);i=()=>new r(...kR(n.deps))}return i}function Um(n,t,e=!1){return{factory:n,value:t,multi:e?[]:void 0}}function sP(n,t){for(let e of n)Array.isArray(e)?sP(e,t):e&&XH(e)?sP(e.\u0275providers,t):t(e)}var aP=class{},pM=class{},lP=class{resolveComponentFactory(t){throw function(n){let t=Error(`No component factory found for ${po(n)}. Did you add it to @NgModule.entryComponents?`);return t.ngComponent=n,t}(t)}},fo=(()=>{class n{}return n.NULL=new lP,n})();function Lse(){return rh(Po(),Ze())}function rh(n,t){return new Me(oa(n,t))}var Me=(()=>{class n{constructor(e){this.nativeElement=e}}return n.__NG_ELEMENT_ID__=Lse,n})();function Bse(n){return n instanceof Me?n.nativeElement:n}var fc=class{},mc=(()=>{class n{}return n.__NG_ELEMENT_ID__=()=>function(){let n=Ze(),e=id(Po().index,n);return(Np(e)?e:n)[oi]}(),n})(),Hse=(()=>{class n{}return n.\u0275prov=ue({token:n,providedIn:"root",factory:()=>null}),n})(),yl=class{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}},zse=new yl("15.2.9"),gR={},Use="ngOriginalError";function _R(n){return n[Use]}var rs=class{constructor(){this._console=console}handleError(t){let e=this._findOriginalError(t);this._console.error("ERROR",t),e&&this._console.error("ORIGINAL ERROR",e)}_findOriginalError(t){let e=t&&_R(t);for(;e&&_R(e);)e=_R(e);return e||null}};function hc(n){return n.ownerDocument}function XC(n){return n instanceof Function?n():n}function xz(n,t,e){let i=n.length;for(;;){let r=n.indexOf(t,e);if(-1===r)return r;if(0===r||n.charCodeAt(r-1)<=32){let o=t.length;if(r+o===i||n.charCodeAt(r+o)<=32)return r}e=r+1}}var Cz="ng-template";function Wse(n,t,e){let i=0,r=!0;for(;i<n.length;){let o=n[i++];if("string"==typeof o&&r){let s=n[i++];if(e&&"class"===o&&-1!==xz(s.toLowerCase(),t,0))return!0}else{if(1===o){for(;i<n.length&&"string"==typeof(o=n[i++]);)if(o.toLowerCase()===t)return!0;return!1}"number"==typeof o&&(r=!1)}}return!1}function Mz(n){return 4===n.type&&n.value!==Cz}function qse(n,t,e){return t===(4!==n.type||e?n.value:Cz)}function Yse(n,t,e){let i=4,r=n.attrs||[],o=function(n){for(let t=0;t<n.length;t++)if(M5(n[t]))return t;return n.length}(r),s=!1;for(let a=0;a<t.length;a++){let l=t[a];if("number"!=typeof l){if(!s)if(4&i){if(i=2|1&i,""!==l&&!qse(n,l,e)||""===l&&1===t.length){if(hl(i))return!1;s=!0}}else{let c=8&i?l:t[++a];if(8&i&&null!==n.attrs){if(!Wse(n.attrs,c,e)){if(hl(i))return!1;s=!0}continue}let u=Xse(8&i?"class":l,r,Mz(n),e);if(-1===u){if(hl(i))return!1;s=!0;continue}if(""!==c){let p;p=u>o?"":r[u+1].toLowerCase();let f=8&i?p:null;if(f&&-1!==xz(f,c,0)||2&i&&c!==p){if(hl(i))return!1;s=!0}}}}else{if(!s&&!hl(i)&&!hl(l))return!1;if(s&&hl(l))continue;s=!1,i=l|1&i}}return hl(i)||s}function hl(n){return 0==(1&n)}function Xse(n,t,e,i){if(null===t)return-1;let r=0;if(i||!e){let o=!1;for(;r<t.length;){let s=t[r];if(s===n)return r;if(3===s||6===s)o=!0;else{if(1===s||2===s){let a=t[++r];for(;"string"==typeof a;)a=t[++r];continue}if(4===s)break;if(0===s){r+=4;continue}}r+=o?1:2}return-1}return function(n,t){let e=n.indexOf(4);if(e>-1)for(e++;e<n.length;){let i=n[e];if("number"==typeof i)return-1;if(i===t)return e;e++}return-1}(t,n)}function wz(n,t,e=!1){for(let i=0;i<t.length;i++)if(Yse(n,t[i],e))return!0;return!1}function Jse(n,t){e:for(let e=0;e<t.length;e++){let i=t[e];if(n.length===i.length){for(let r=0;r<n.length;r++)if(n[r]!==i[r])continue e;return!0}}return!1}function gH(n,t){return n?":not("+t.trim()+")":t}function $se(n){let t=n[0],e=1,i=2,r="",o=!1;for(;e<n.length;){let s=n[e];if("string"==typeof s)if(2&i){let a=n[++e];r+="["+s+(a.length>0?'="'+a+'"':"")+"]"}else 8&i?r+="."+s:4&i&&(r+=" "+s);else""!==r&&!hl(s)&&(t+=gH(o,r),r=""),i=s,o=o||!hl(i);e++}return""!==r&&(t+=gH(o,r)),t}var Hn={};function v(n){Sz(Ei(),Ze(),ss()+n,!1)}function Sz(n,t,e,i){if(!i)if(3==(3&t[ri])){let o=n.preOrderCheckHooks;null!==o&&jC(t,o,e)}else{let o=n.preOrderHooks;null!==o&&GC(t,o,0,e)}Vp(e)}var _H={"\u0275\u0275defineInjectable":ue,"\u0275\u0275defineInjector":U,"\u0275\u0275inject":k,"\u0275\u0275invalidFactoryDep":JH,resolveForwardRef:Ri};var iae=tr({provide:String,useValue:tr});function bH(n){return void 0!==n.useClass}function vH(n){return void 0!==n.useFactory}var Ez=ob("Injectable",void 0,void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;n.hasOwnProperty(JC)||Object.defineProperty(n,JC,{get:()=>(null===e&&(e=Ia().compileInjectable(_H,`ng:///${n.name}/\u0275prov.js`,function(n,t){let e=t||{providedIn:null},i={name:n.name,type:n,typeArgumentCount:0,providedIn:e.providedIn};return(bH(e)||vH(e))&&void 0!==e.deps&&(i.deps=F5(e.deps)),bH(e)?i.useClass=e.useClass:function(n){return iae in n}(e)?i.useValue=e.useValue:vH(e)?i.useFactory=e.useFactory:function(n){return void 0!==n.useExisting}(e)&&(i.useExisting=e.useExisting),i}(n,t))),e)}),n.hasOwnProperty(ed)||Object.defineProperty(n,ed,{get:()=>{if(null===i){let r=Ia();i=r.compileFactory(_H,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,typeArgumentCount:0,deps:RM(n),target:r.FactoryTarget.Injectable})}return i},configurable:!0})}(n,t));function yH(n,t=null,e=null,i){let r=Tz(n,t,e,i);return r.resolveInjectorInitializers(),r}function Tz(n,t=null,e=null,i,r=new Set){let o=[e||Vi,wse(n)];return i=i||("object"==typeof n?void 0:po(n)),new uM(o,t||hO(),i||null,r)}var Mi=(()=>{class n{static create(e,i){if(Array.isArray(e))return yH({name:""},i,e,"");{let r=e.name??"";return yH({name:r},e.parent,e.providers,r)}}}return n.THROW_IF_NOT_FOUND=j_,n.NULL=new dM,n.\u0275prov=ue({token:n,providedIn:"any",factory:()=>k(hz)}),n.__NG_ELEMENT_ID__=-1,n})(),L_=class{constructor(t,e){if(this.token=t,this.id=e,!t)throw new yt(208,!1);this.displayName=po(this.token)}static get(t){return xH.get(Ri(t))}static get numberOfKeys(){return xH.numberOfKeys}},xH=new class{constructor(){this._allKeys=new Map}get(t){if(t instanceof L_)return t;if(this._allKeys.has(t))return this._allKeys.get(t);let e=new L_(t,L_.numberOfKeys);return this._allKeys.set(t,e),e}get numberOfKeys(){return this._allKeys.size}};function C(n,t=xi.Default){let e=Ze();return null===e?k(n,t):A5(Po(),e,Ri(n),t)}function Is(){throw new Error("invalid")}function Dz(n,t){let e=n.contentQueries;if(null!==e)for(let i=0;i<e.length;i+=2){let o=e[i+1];if(-1!==o){let s=n.data[o];QP(e[i]),s.contentQueries(2,t[o],o)}}}function LM(n,t,e,i,r,o,s,a,l,c,d){let u=t.blueprint.slice();return u[su]=r,u[ri]=76|i,(null!==d||n&&1024&n[ri])&&(u[ri]|=1024),u5(u),u[Gr]=u[Jm]=n,u[Es]=e,u[nM]=s||n&&n[nM],u[oi]=a||n&&n[oi],u[FR]=l||n&&n[FR]||null,u[tM]=c||n&&n[tM]||null,u[Ss]=o,u[EM]=Boe++,u[i5]=d,u[bl]=2==t.type?n[bl]:u,u}function oh(n,t,e,i,r){let o=n.data[t];if(null===o)o=gO(n,t,e,i,r),jn.lFrame.inI18n&&(o.flags|=32);else if(64&o.type){o.type=e,o.value=i,o.attrs=r;let s=q_();o.injectorIndex=null===s?-1:s.injectorIndex}return dc(o,!0),o}function gO(n,t,e,i,r){let o=f5(),s=qP(),l=n.data[t]=function(n,t,e,i,r,o){return{type:e,index:i,insertBeforeIndex:null,injectorIndex:t?t.injectorIndex:-1,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:0,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}(0,s?o:o&&o.parent,e,t,i,r);return null===n.firstChild&&(n.firstChild=l),null!==o&&(s?null==o.child&&null!==l.parent&&(o.child=l):null===o.next&&(o.next=l,l.prev=o)),l}function ub(n,t,e,i){if(0===e)return-1;let r=t.length;for(let o=0;o<e;o++)t.push(i),n.blueprint.push(i),n.data.push(null);return r}function _O(n,t,e){ZP(t);try{let i=n.viewQuery;null!==i&&pP(1,i,e);let r=n.template;null!==r&&Iz(n,t,r,1,e),n.firstCreatePass&&(n.firstCreatePass=!1),n.staticContentQueries&&Dz(n,t),n.staticViewQueries&&pP(2,n.viewQuery,e);let o=n.components;null!==o&&function(n,t){for(let e=0;e<t.length;e++)Rae(n,t[e])}(t,o)}catch(i){throw n.firstCreatePass&&(n.incompleteFirstPass=!0,n.firstCreatePass=!1),i}finally{t[ri]&=-5,KP()}}function BM(n,t,e,i){let r=t[ri];if(128!=(128&r)){ZP(t);try{u5(t),m5(n.bindingStartIndex),null!==e&&Iz(n,t,e,2,i);let s=3==(3&r);if(s){let c=n.preOrderCheckHooks;null!==c&&jC(t,c,null)}else{let c=n.preOrderHooks;null!==c&&GC(t,c,0,null),dR(t,0)}if(function(n){for(let t=rO(n);null!==t;t=oO(t)){if(!t[r5])continue;let e=t[Wm];for(let i=0;i<e.length;i++){let r=e[i];0==(512&r[ri])&&WP(r[Gr],1),r[ri]|=512}}}(t),function(n){for(let t=rO(n);null!==t;t=oO(t))for(let e=ws;e<t.length;e++){let i=t[e],r=i[Fn];rM(i)&&BM(r,i,r.template,i[Es])}}(t),null!==n.contentQueries&&Dz(n,t),s){let c=n.contentCheckHooks;null!==c&&jC(t,c)}else{let c=n.contentHooks;null!==c&&GC(t,c,1),dR(t,1)}!function(n,t){let e=n.hostBindingOpCodes;if(null!==e)try{for(let i=0;i<e.length;i++){let r=e[i];if(r<0)Vp(~r);else{let o=r,s=e[++i],a=e[++i];Gre(s,o),a(2,t[o])}}}finally{Vp(-1)}}(n,t);let a=n.components;null!==a&&function(n,t){for(let e=0;e<t.length;e++)Aae(n,t[e])}(t,a);let l=n.viewQuery;if(null!==l&&pP(2,l,i),s){let c=n.viewCheckHooks;null!==c&&jC(t,c)}else{let c=n.viewHooks;null!==c&&GC(t,c,2),dR(t,2)}!0===n.firstUpdatePass&&(n.firstUpdatePass=!1),t[ri]&=-41,512&t[ri]&&(t[ri]&=-513,WP(t[Gr],-1))}finally{KP()}}}function Iz(n,t,e,i,r){let o=ss(),s=2&i;try{Vp(-1),s&&t.length>Wr&&Sz(n,t,Wr,!1),Ta(s?2:0,r),e(i,r)}finally{Vp(o),Ta(s?3:1,r)}}function bO(n,t,e){if(GP(t)){let r=t.directiveEnd;for(let o=t.directiveStart;o<r;o++){let s=n.data[o];s.contentQueries&&s.contentQueries(1,e[o],o)}}}function vO(n,t,e){!p5()||(function(n,t,e,i){let r=e.directiveStart,o=e.directiveEnd;TM(e)&&function(n,t,e){let i=oa(t,n),r=Az(e),o=n[nM],s=VM(n,LM(n,r,null,e.onPush?32:16,i,t,o,o.createRenderer(i,e),null,null,null));n[t.index]=s}(t,e,n.data[r+e.componentOffset]),n.firstCreatePass||lM(e,t),uc(i,t);let s=e.initialInputs;for(let a=r;a<o;a++){let l=n.data[a],c=zp(t,n,a,e);uc(c,t),null!==s&&Eae(0,a-r,c,l,0,s),vl(l)&&(id(e.index,t)[Es]=zp(t,n,a,e))}}(n,t,e,oa(e,t)),64==(64&e.flags)&&Oz(n,t,e))}function yO(n,t,e=oa){let i=t.localNames;if(null!==i){let r=t.index+1;for(let o=0;o<i.length;o+=2){let s=i[o+1],a=-1===s?e(t,n):n[s];n[r++]=a}}}function Az(n){let t=n.tView;return null===t||t.incompleteFirstPass?n.tView=xO(1,null,n.template,n.decls,n.vars,n.directiveDefs,n.pipeDefs,n.viewQuery,n.schemas,n.consts):t}function xO(n,t,e,i,r,o,s,a,l,c){let d=Wr+i,u=d+r,p=function(n,t){let e=[];for(let i=0;i<t;i++)e.push(i<n?null:Hn);return e}(d,u),f="function"==typeof c?c():c;return p[Fn]={type:n,blueprint:p,template:e,queries:null,viewQuery:a,declTNode:t,data:p.slice().fill(null,d),bindingStartIndex:d,expandoStartIndex:u,hostBindingOpCodes:null,firstCreatePass:!0,firstUpdatePass:!0,staticViewQueries:!1,staticContentQueries:!1,preOrderHooks:null,preOrderCheckHooks:null,contentHooks:null,contentCheckHooks:null,viewHooks:null,viewCheckHooks:null,destroyHooks:null,cleanup:null,contentQueries:null,components:null,directiveRegistry:"function"==typeof o?o():o,pipeRegistry:"function"==typeof s?s():s,firstChild:null,schemas:l,consts:f,incompleteFirstPass:!1}}function Rz(n,t,e,i){let r=Nz(t);null===e?r.push(i):(r.push(e),n.firstCreatePass&&Lz(n).push(i,r.length-1))}function CH(n,t,e,i){for(let r in n)if(n.hasOwnProperty(r)){e=null===e?{}:e;let o=n[r];null===i?MH(e,t,r,o):i.hasOwnProperty(r)&&MH(e,t,i[r],o)}return e}function MH(n,t,e,i){n.hasOwnProperty(e)?n[e].push(t,i):n[e]=[t,i]}function aa(n,t,e,i,r,o,s,a){let d,l=oa(t,e),c=t.inputs;!a&&null!=c&&(d=c[i])?(SO(n,e,d,i,r),TM(t)&&function(n,t){let e=id(t,n);16&e[ri]||(e[ri]|=32)}(e,t.index)):3&t.type&&(i=function(n){return"class"===n?"className":"for"===n?"htmlFor":"formaction"===n?"formAction":"innerHtml"===n?"innerHTML":"readonly"===n?"readOnly":"tabindex"===n?"tabIndex":n}(i),r=null!=s?s(r,t.value||"",i):r,o.setProperty(l,i,r))}function CO(n,t,e,i){if(p5()){let s,a,r=null===i?null:{"":-1},o=function(n,t){let e=n.directiveRegistry,i=null,r=null;if(e)for(let o=0;o<e.length;o++){let s=e[o];if(wz(t,s.selectors,!1))if(i||(i=[]),vl(s))if(null!==s.findHostDirectiveDefs){let a=[];r=r||new Map,s.findHostDirectiveDefs(s,a,r),i.unshift(...a,s),dP(n,t,a.length)}else i.unshift(s),dP(n,t,0);else r=r||new Map,s.findHostDirectiveDefs?.(s,i,r),i.push(s)}return null===i?null:[i,r]}(n,e);null===o?s=a=null:[s,a]=o,null!==s&&Pz(n,t,e,s,r,a),r&&function(n,t,e){if(t){let i=n.localNames=[];for(let r=0;r<t.length;r+=2){let o=e[t[r+1]];if(null==o)throw new yt(-301,!1);i.push(t[r],o)}}}(e,i,r)}e.mergedAttrs=Y_(e.mergedAttrs,e.attrs)}function Pz(n,t,e,i,r,o){for(let c=0;c<i.length;c++)HR(lM(e,t),n,i[c].type);!function(n,t,e){n.flags|=1,n.directiveStart=t,n.directiveEnd=t+e,n.providerIndexes=t}(e,n.data.length,i.length);for(let c=0;c<i.length;c++){let d=i[c];d.providersResolver&&d.providersResolver(d)}let s=!1,a=!1,l=ub(n,t,i.length,null);for(let c=0;c<i.length;c++){let d=i[c];e.mergedAttrs=Y_(e.mergedAttrs,d.hostAttrs),wae(n,e,t,l,d),Cae(l,d,r),null!==d.contentQueries&&(e.flags|=4),(null!==d.hostBindings||null!==d.hostAttrs||0!==d.hostVars)&&(e.flags|=64);let u=d.type.prototype;!s&&(u.ngOnChanges||u.ngOnInit||u.ngDoCheck)&&((n.preOrderHooks??(n.preOrderHooks=[])).push(e.index),s=!0),!a&&(u.ngOnChanges||u.ngDoCheck)&&((n.preOrderCheckHooks??(n.preOrderCheckHooks=[])).push(e.index),a=!0),l++}!function(n,t,e){let r=t.directiveEnd,o=n.data,s=t.attrs,a=[],l=null,c=null;for(let d=t.directiveStart;d<r;d++){let u=o[d],p=e?e.get(u):null,m=p?p.outputs:null;l=CH(u.inputs,d,l,p?p.inputs:null),c=CH(u.outputs,d,c,m);let b=null===l||null===s||Mz(t)?null:Tae(l,d,s);a.push(b)}null!==l&&(l.hasOwnProperty("class")&&(t.flags|=8),l.hasOwnProperty("style")&&(t.flags|=16)),t.initialInputs=a,t.inputs=l,t.outputs=c}(n,e,o)}function Oz(n,t,e){let i=e.directiveStart,r=e.directiveEnd,o=e.index,s=jn.lFrame.currentDirectiveIndex;try{Vp(o);for(let a=i;a<r;a++){let l=n.data[a],c=t[a];LR(a),(null!==l.hostBindings||0!==l.hostVars||null!==l.hostAttrs)&&vae(l,c)}}finally{Vp(-1),LR(s)}}function vae(n,t){null!==n.hostBindings&&n.hostBindings(1,t)}function dP(n,t,e){t.componentOffset=e,(n.components??(n.components=[])).push(t.index)}function Cae(n,t,e){if(e){if(t.exportAs)for(let i=0;i<t.exportAs.length;i++)e[t.exportAs[i]]=n;vl(t)&&(e[""]=n)}}function wae(n,t,e,i,r){n.data[i]=r;let o=r.factory||(r.factory=Bp(r.type)),s=new Hp(o,vl(r),C);n.blueprint[i]=s,e[i]=s,function(n,t,e,i,r){let o=r.hostBindings;if(o){let s=n.hostBindingOpCodes;null===s&&(s=n.hostBindingOpCodes=[]);let a=~t.index;(function(n){let t=n.length;for(;t>0;){let e=n[--t];if("number"==typeof e&&e<0)return e}return 0})(s)!=a&&s.push(a),s.push(e,i,o)}}(n,t,i,ub(n,e,r.hostVars,Hn),r)}function gc(n,t,e,i,r,o){let s=oa(n,t);MO(t[oi],s,o,n.value,e,i,r)}function MO(n,t,e,i,r,o,s){if(null==o)n.removeAttribute(t,r,e);else{let a=null==s?Un(o):s(o,i||"",r);n.setAttribute(t,r,a,e)}}function Eae(n,t,e,i,r,o){let s=o[t];if(null!==s){let a=i.setInput;for(let l=0;l<s.length;){let c=s[l++],d=s[l++],u=s[l++];null!==a?i.setInput(e,u,c,d):e[d]=u}}}function Tae(n,t,e){let i=null,r=0;for(;r<e.length;){let o=e[r];if(0!==o)if(5!==o){if("number"==typeof o)break;if(n.hasOwnProperty(o)){null===i&&(i=[]);let s=n[o];for(let a=0;a<s.length;a+=2)if(s[a]===t){i.push(o,s[a+1],e[r+1]);break}}r+=2}else r+=2;else r+=4}return i}function kz(n,t,e,i){return[n,!0,!1,t,null,0,i,e,null,null]}function Aae(n,t){let e=id(t,n);if(rM(e)){let i=e[Fn];48&e[ri]?BM(i,e,i.template,e[Es]):e[Fp]>0&&uP(e)}}function uP(n){for(let i=rO(n);null!==i;i=oO(i))for(let r=ws;r<i.length;r++){let o=i[r];if(rM(o))if(512&o[ri]){let s=o[Fn];BM(s,o,s.template,o[Es])}else o[Fp]>0&&uP(o)}let e=n[Fn].components;if(null!==e)for(let i=0;i<e.length;i++){let r=id(e[i],n);rM(r)&&r[Fp]>0&&uP(r)}}function Rae(n,t){let e=id(t,n),i=e[Fn];(function(n,t){for(let e=t.length;e<n.blueprint.length;e++)t.push(n.blueprint[e])})(i,e),_O(i,e,e[Es])}function VM(n,t){return n[W_]?n[iH][_l]=t:n[W_]=t,n[iH]=t,t}function wO(n){for(;n;){n[ri]|=32;let t=iO(n);if(Are(n)&&!t)return n;n=t}return null}function Fz(n,t,e,i=!0){let r=t[nM];r.begin&&r.begin();try{BM(n,t,n.template,e)}catch(s){throw i&&Vz(t,s),s}finally{r.end&&r.end()}}function pP(n,t,e){QP(0),t(n,e)}function Nz(n){return n[G_]||(n[G_]=[])}function Lz(n){return n.cleanup||(n.cleanup=[])}function Bz(n,t,e){return(null===n||vl(n))&&(e=function(n){for(;Array.isArray(n);){if("object"==typeof n[UP])return n;n=n[su]}return null}(e[t.index])),e[oi]}function Vz(n,t){let e=n[tM],i=e?e.get(rs,null):null;i&&i.handleError(t)}function SO(n,t,e,i,r){for(let o=0;o<e.length;){let s=e[o++],a=e[o++],l=t[s],c=n.data[s];null!==c.setInput?c.setInput(l,r,i,a):l[a]=r}}function ld(n,t,e){let i=IM(t,n);z5(n[oi],i,e)}function fM(n,t,e){let i=e?n.styles:null,r=e?n.classes:null,o=0;if(null!==t)for(let s=0;s<t.length;s++){let a=t[s];"number"==typeof a?o=a:1==o?r=AR(r,a):2==o&&(i=AR(i,a+": "+t[++s]+";"))}e?n.styles=i:n.stylesWithoutHost=i,e?n.classes=r:n.classesWithoutHost=r}function QC(n,t,e,i,r=!1){for(;null!==e;){let o=t[e.index];if(null!==o&&i.push(Ra(o)),nd(o))for(let a=ws;a<o.length;a++){let l=o[a],c=l[Fn].firstChild;null!==c&&QC(l[Fn],l,c,i)}let s=e.type;if(8&s)QC(n,t,e.child,i);else if(32&s){let l,a=nO(e,t);for(;l=a();)i.push(l)}else if(16&s){let a=K5(t,e);if(Array.isArray(a))i.push(...a);else{let l=iO(t[bl]);QC(l[Fn],l,a,i,!0)}}e=r?e.projectionNext:e.next}return i}var jp=class{get rootNodes(){let t=this._lView,e=t[Fn];return QC(e,t,e.firstChild,[])}constructor(t,e){this._lView=t,this._cdRefInjectingView=e,this._appRef=null,this._attachedToViewContainer=!1}get context(){return this._lView[Es]}set context(t){this._lView[Es]=t}get destroyed(){return 128==(128&this._lView[ri])}destroy(){if(this._appRef)this._appRef.detachView(this);else if(this._attachedToViewContainer){let t=this._lView[Gr];if(nd(t)){let e=t[iM],i=e?e.indexOf(this):-1;i>-1&&(GR(t,i),cM(e,i))}this._attachedToViewContainer=!1}j5(this._lView[Fn],this._lView)}onDestroy(t){Rz(this._lView[Fn],this._lView,null,t)}markForCheck(){wO(this._cdRefInjectingView||this._lView)}detach(){this._lView[ri]&=-65}reattach(){this._lView[ri]|=64}detectChanges(){Fz(this._lView[Fn],this._lView,this.context)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new yt(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){var t;this._appRef=null,ab(this._lView[Fn],t=this._lView,t[oi],2,null,null)}attachToAppRef(t){if(this._attachedToViewContainer)throw new yt(902,!1);this._appRef=t}},fP=class extends jp{constructor(t){super(t),this._view=t}detectChanges(){let t=this._view;Fz(t[Fn],t,t[Es],!1)}checkNoChanges(){}get context(){return null}},mM=class extends fo{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){let e=Da(t);return new hM(e,this.ngModule)}};function wH(n){let t=[];for(let e in n)n.hasOwnProperty(e)&&t.push({propName:n[e],templateName:e});return t}var hM=class extends pM{get inputs(){return wH(this.componentDef.inputs)}get outputs(){return wH(this.componentDef.outputs)}constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map($se).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}create(t,e,i,r){let o=(r=r||this.ngModule)instanceof pc?r:r?.injector;o&&null!==this.componentDef.getStandaloneInjector&&(o=this.componentDef.getStandaloneInjector(o)||o);let s=o?new class{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,i){i=wM(i);let r=this.injector.get(t,gR,i);return r!==gR||e===gR?r:this.parentInjector.get(t,e,i)}}(t,o):t,a=s.get(fc,null);if(null===a)throw new yt(407,!1);let b,M,l=s.get(Hse,null),c=a.createRenderer(null,this.componentDef),d=this.componentDef.selectors[0][0]||"div",u=i?function(n,t,e){return n.selectRootElement(t,e===ra.ShadowDom)}(c,i,this.componentDef.encapsulation):aO(c,d,function(n){let t=n.toLowerCase();return"svg"===t?l5:"math"===t?c5:null}(d)),p=this.componentDef.onPush?288:272,f=xO(0,null,null,1,0,null,null,null,null,null),m=LM(null,f,null,p,null,null,a,c,l,s,null);ZP(m);try{let x,y=this.componentDef,R=null;y.findHostDirectiveDefs?(x=[],R=new Map,y.findHostDirectiveDefs(y,x,R),x.push(y)):x=[y];let A=function(n,t){let e=n[Fn],i=Wr;return n[i]=t,oh(e,i,2,"#host",null)}(m,u),V=function(n,t,e,i,r,o,s,a){let l=r[Fn];!function(n,t,e,i){for(let r of n)t.mergedAttrs=Y_(t.mergedAttrs,r.hostAttrs);null!==t.mergedAttrs&&(fM(t,t.mergedAttrs,!0),null!==e&&ez(i,e,t))}(i,n,t,s);let c=o.createRenderer(t,e),d=LM(r,Az(e),null,e.onPush?32:16,r[n.index],n,o,c,null,null,null);return l.firstCreatePass&&dP(l,n,i.length-1),VM(r,d),r[n.index]=d}(A,u,y,x,m,a,c);M=d5(f,Wr),u&&function(n,t,e,i){if(i)BR(n,e,["ng-version",zse.full]);else{let{attrs:r,classes:o}=function(n){let t=[],e=[],i=1,r=2;for(;i<n.length;){let o=n[i];if("string"==typeof o)2===r?""!==o&&t.push(o,n[++i]):8===r&&e.push(o);else{if(!hl(r))break;r=o}i++}return{attrs:t,classes:e}}(t.selectors[0]);r&&BR(n,e,r),o&&o.length>0&&$5(n,e,o.join(" "))}}(c,y,u,i),void 0!==e&&function(n,t,e){let i=n.projection=[];for(let r=0;r<t.length;r++){let o=e[r];i.push(null!=o?Array.from(o):null)}}(M,this.ngContentSelectors,e),b=function(n,t,e,i,r,o){let s=Po(),a=r[Fn],l=oa(s,r);Pz(a,r,s,e,null,i);for(let d=0;d<e.length;d++)uc(zp(r,a,s.directiveStart+d,s),r);Oz(a,r,s),l&&uc(l,r);let c=zp(r,a,s.directiveStart+s.componentOffset,s);if(n[Es]=r[Es]=c,null!==o)for(let d of o)d(c,t);return bO(a,s,n),c}(V,y,x,R,m,[Hae]),_O(f,m,null)}finally{KP()}return new hP(this.componentType,b,rh(M,m),m,M)}},hP=class extends aP{constructor(t,e,i,r,o){super(),this.location=i,this._rootLView=r,this._tNode=o,this.instance=e,this.hostView=this.changeDetectorRef=new fP(r),this.componentType=t}setInput(t,e){let r,i=this._tNode.inputs;if(null!==i&&(r=i[t])){let o=this._rootLView;SO(o[Fn],o,r,t,e),wO(id(this._tNode.index,o))}}get injector(){return new Lp(this._tNode,this._rootLView)}destroy(){this.hostView.destroy()}onDestroy(t){this.hostView.onDestroy(t)}};function Hae(){let n=Po();AM(Ze()[Fn],n)}function Hz(n){return Object.getPrototypeOf(n.prototype).constructor}function Ke(n){let t=Hz(n.type),e=!0,i=[n];for(;t;){let r;if(vl(n))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new yt(903,!1);r=t.\u0275dir}if(r){if(e){i.push(r);let s=n;s.inputs=bR(n.inputs),s.declaredInputs=bR(n.declaredInputs),s.outputs=bR(n.outputs);let a=r.hostBindings;a&&Gae(n,a);let l=r.viewQuery,c=r.contentQueries;if(l&&Uae(n,l),c&&jae(n,c),cR(n.inputs,r.inputs),cR(n.declaredInputs,r.declaredInputs),cR(n.outputs,r.outputs),vl(r)&&r.data.animation){let d=n.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s<o.length;s++){let a=o[s];a&&a.ngInherit&&a(n),a===Ke&&(e=!1)}}t=Object.getPrototypeOf(t)}!function(n){let t=0,e=null;for(let i=n.length-1;i>=0;i--){let r=n[i];r.hostVars=t+=r.hostVars,r.hostAttrs=Y_(r.hostAttrs,e=Y_(e,r.hostAttrs))}}(i)}function bR(n){return n===$c?{}:n===Vi?[]:n}function Uae(n,t){let e=n.viewQuery;n.viewQuery=e?(i,r)=>{t(i,r),e(i,r)}:t}function jae(n,t){let e=n.contentQueries;n.contentQueries=e?(i,r,o)=>{t(i,r,o),e(i,r,o)}:t}function Gae(n,t){let e=n.hostBindings;n.hostBindings=e?(i,r)=>{t(i,r),e(i,r)}:t}var Wae=["providersResolver"],qae=["template","decls","consts","vars","onPush","ngContentSelectors","styles","encapsulation","schemas"];function zz(n,t,e){if(null!==n.hostDirectives)for(let i of n.hostDirectives){let r=tu(i.directive);Qae(r.declaredInputs,i.inputs),zz(r,t,e),e.set(r,i),t.push(r)}}function SH(n){if(void 0===n||0===n.length)return $c;let t={};for(let e=0;e<n.length;e+=2)t[n[e]]=n[e+1];return t}function Qae(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[t[e]]=n[e])}function Uz(n){return!!EO(n)&&(Array.isArray(n)||!(n instanceof Map)&&Symbol.iterator in n)}function EO(n){return null!==n&&("function"==typeof n||"object"==typeof n)}function _c(n,t,e){return n[t]=e}function pb(n,t){return n[t]}function Uo(n,t,e){return!Object.is(n[t],e)&&(n[t]=e,!0)}function Gp(n,t,e,i){let r=Uo(n,t,e);return Uo(n,t+1,i)||r}function HM(n,t,e,i,r){let o=Gp(n,t,e,i);return Uo(n,t+2,r)||o}function Pa(n,t,e,i,r,o){let s=Gp(n,t,e,i);return Gp(n,t+2,r,o)||s}function Be(n,t,e,i){let r=Ze();return Uo(r,eh(),t)&&(Ei(),gc(kr(),r,n,t,e,i)),Be}function sh(n,t){let e=!1,i=rd();for(let o=1;o<t.length;o+=2)e=Uo(n,i++,t[o])||e;if(m5(i),!e)return Hn;let r=t[0];for(let o=1;o<t.length;o+=2)r+=Un(t[o])+t[o+1];return r}function ah(n,t,e,i){return Uo(n,eh(),e)?t+Un(e)+i:Hn}function lh(n,t,e,i,r,o){let a=Gp(n,rd(),e,r);return od(2),a?t+Un(e)+i+Un(r)+o:Hn}function ch(n,t,e,i,r,o,s,a){let c=HM(n,rd(),e,r,s);return od(3),c?t+Un(e)+i+Un(r)+o+Un(s)+a:Hn}function dh(n,t,e,i,r,o,s,a,l,c){let u=Pa(n,rd(),e,r,s,l);return od(4),u?t+Un(e)+i+Un(r)+o+Un(s)+a+Un(l)+c:Hn}function uh(n,t,e,i,r,o,s,a,l,c,d,u){let p=rd(),f=Pa(n,p,e,r,s,l);return f=Uo(n,p+4,d)||f,od(5),f?t+Un(e)+i+Un(r)+o+Un(s)+a+Un(l)+c+Un(d)+u:Hn}function ph(n,t,e,i,r,o,s,a,l,c,d,u,p,f){let m=rd(),b=Pa(n,m,e,r,s,l);return b=Gp(n,m+4,d,p)||b,od(6),b?t+Un(e)+i+Un(r)+o+Un(s)+a+Un(l)+c+Un(d)+u+Un(p)+f:Hn}function fh(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b){let M=rd(),y=Pa(n,M,e,r,s,l);return y=HM(n,M+4,d,p,m)||y,od(7),y?t+Un(e)+i+Un(r)+o+Un(s)+a+Un(l)+c+Un(d)+u+Un(p)+f+Un(m)+b:Hn}function mh(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y){let x=rd(),R=Pa(n,x,e,r,s,l);return R=Pa(n,x+4,d,p,m,M)||R,od(8),R?t+Un(e)+i+Un(r)+o+Un(s)+a+Un(l)+c+Un(d)+u+Un(p)+f+Un(m)+b+Un(M)+y:Hn}function S(n,t,e,i,r,o,s,a){let l=Ze(),c=Ei(),d=n+Wr,u=c.firstCreatePass?function(n,t,e,i,r,o,s,a,l){let c=t.consts,d=oh(t,n,4,s||null,iu(c,a));CO(t,e,d,iu(c,l)),AM(t,d);let u=d.tView=xO(2,d,i,r,o,t.directiveRegistry,t.pipeRegistry,null,t.schemas,c);return null!==t.queries&&(t.queries.template(t,d),u.queries=t.queries.embeddedTView(d)),d}(d,c,l,t,e,i,r,o,s):c.data[d];dc(u,!1);let p=l[oi].createComment("");OM(c,l,p,u),uc(p,l),VM(l,l[d]=kz(p,l,p,u)),DM(u)&&vO(c,l,u),null!=s&&yO(l,u,a)}function it(n){return $m(jn.lFrame.contextLView,Wr+n)}function _(n,t,e){let i=Ze();return Uo(i,eh(),t)&&aa(Ei(),kr(),i,n,t,i[oi],e,!1),_}function gP(n,t,e,i,r){let s=r?"class":"style";SO(n,e,t.inputs[s],s,i)}function h(n,t,e,i){let r=Ze(),o=Ei(),s=Wr+n,a=r[oi],l=o.firstCreatePass?function(n,t,e,i,r,o){let s=t.consts,l=oh(t,n,2,i,iu(s,r));return CO(t,e,l,iu(s,o)),null!==l.attrs&&fM(l,l.attrs,!1),null!==l.mergedAttrs&&fM(l,l.mergedAttrs,!0),null!==t.queries&&t.queries.elementStart(t,l),l}(s,o,r,t,e,i):o.data[s],c=r[s]=aO(a,t,jn.lFrame.currentNamespace),d=DM(l);return dc(l,!0),ez(a,c,l),32!=(32&l.flags)&&OM(o,r,c,l),0===jn.lFrame.elementDepthCount&&uc(c,r),jn.lFrame.elementDepthCount++,d&&(vO(o,r,l),bO(o,l,r)),null!==i&&yO(r,l),h}function g(){let n=Po();qP()?YP():(n=n.parent,dc(n,!1));let t=n;jn.lFrame.elementDepthCount--;let e=Ei();return e.firstCreatePass&&(AM(e,n),GP(n)&&e.queries.elementEnd(n)),null!=t.classesWithoutHost&&function(n){return 0!=(8&n.flags)}(t)&&gP(e,t,Ze(),t.classesWithoutHost,!0),null!=t.stylesWithoutHost&&function(n){return 0!=(16&n.flags)}(t)&&gP(e,t,Ze(),t.stylesWithoutHost,!1),g}function P(n,t,e,i){return h(n,t,e,i),g(),P}function Ot(n,t,e){let i=Ze(),r=Ei(),o=n+Wr,s=r.firstCreatePass?function(n,t,e,i,r){let o=t.consts,s=iu(o,i),a=oh(t,n,8,"ng-container",s);return null!==s&&fM(a,s,!0),CO(t,e,a,iu(o,r)),null!==t.queries&&t.queries.elementStart(t,a),a}(o,r,i,t,e):r.data[o];dc(s,!0);let a=i[o]=i[oi].createComment("");return OM(r,i,a,s),uc(a,i),DM(s)&&(vO(r,i,s),bO(r,s,i)),null!=e&&yO(i,s),Ot}function kt(){let n=Po(),t=Ei();return qP()?YP():(n=n.parent,dc(n,!1)),t.firstCreatePass&&(AM(t,n),GP(n)&&t.queries.elementEnd(n)),kt}function li(n,t,e){return Ot(n,t,e),kt(),li}function ge(){return Ze()}function hh(n){return!!n&&"function"==typeof n.then}function TO(n){return!!n&&"function"==typeof n.subscribe}var DO=TO;function I(n,t,e,i){let r=Ze(),o=Ei(),s=Po();return Jz(o,r,r[oi],s,n,t,i),I}function zM(n,t){let e=Po(),i=Ze(),r=Ei();return Jz(r,i,Bz(XP(r.data),e,i),e,n,t),zM}function Jz(n,t,e,i,r,o,s){let a=DM(i),c=n.firstCreatePass&&Lz(n),d=t[Es],u=Nz(t),p=!0;if(3&i.type||s){let b=oa(i,t),M=s?s(b):b,y=u.length,x=s?A=>s(Ra(A[i.index])):i.index,R=null;if(!s&&a&&(R=function(n,t,e,i){let r=n.cleanup;if(null!=r)for(let o=0;o<r.length-1;o+=2){let s=r[o];if(s===e&&r[o+1]===i){let a=t[G_],l=r[o+2];return a.length>l?a[l]:null}"string"==typeof s&&(o+=2)}return null}(n,t,r,i.index)),null!==R)(R.__ngLastListenerFn__||R).__ngNextListenerFn__=o,R.__ngLastListenerFn__=o,p=!1;else{o=TH(i,t,d,o,!1);let A=e.listen(M,r,o);u.push(o,A),c&&c.push(r,x,y,y+1)}}else o=TH(i,t,d,o,!1);let m,f=i.outputs;if(p&&null!==f&&(m=f[r])){let b=m.length;if(b)for(let M=0;M<b;M+=2){let V=t[m[M]][m[M+1]].subscribe(o),te=u.length;u.push(o,V),c&&c.push(r,i.index,te,-(te+1))}}}function EH(n,t,e,i){try{return Ta(6,t,e),!1!==e(i)}catch(r){return Vz(n,r),!1}finally{Ta(7,t,e)}}function TH(n,t,e,i,r){return function o(s){if(s===Function)return i;wO(n.componentOffset>-1?id(n.index,t):t);let l=EH(t,e,i,s),c=o.__ngNextListenerFn__;for(;c;)l=EH(t,e,c,s)&&l,c=c.__ngNextListenerFn__;return r&&!1===l&&(s.preventDefault(),s.returnValue=!1),l}}function w(n=1){return function(n){return(jn.lFrame.contextLView=function(n,t){for(;n>0;)t=t[Jm],n--;return t}(n,jn.lFrame.contextLView))[Es]}(n)}function nle(n,t){let e=null,i=function(n){let t=n.attrs;if(null!=t){let e=t.indexOf(5);if(0==(1&e))return t[e+1]}return null}(n);for(let r=0;r<t.length;r++){let o=t[r];if("*"!==o){if(null===i?wz(n,o,!0):Jse(i,o))return r}else e=r}return e}function Dn(n){let t=Ze()[bl][Ss];if(!t.projection){let i=t.projection=N_(n?n.length:1,null),r=i.slice(),o=t.child;for(;null!==o;){let s=n?nle(o,n):0;null!==s&&(r[s]?r[s].projectionNext=o:i[s]=o,r[s]=o),o=o.next}}}function zt(n,t=0,e){let i=Ze(),r=Ei(),o=oh(r,Wr+n,16,null,e||null);null===o.projection&&(o.projection=t),YP(),32!=(32&o.flags)&&function(n,t,e){J5(t[oi],0,t,e,G5(n,e,t),Y5(e.parent||t[Ss],e,t))}(r,i,o)}function Wi(n,t,e){return fb(n,"",t,"",e),Wi}function fb(n,t,e,i,r){let o=Ze(),s=ah(o,t,e,i);return s!==Hn&&aa(Ei(),kr(),o,n,s,o[oi],r,!1),fb}function UM(n,t,e,i,r,o,s){let a=Ze(),l=lh(a,t,e,i,r,o);return l!==Hn&&aa(Ei(),kr(),a,n,l,a[oi],s,!1),UM}function UC(n,t){return n<<17|t<<2}function Wp(n){return n>>17&32767}function _P(n){return 2|n}function Xm(n){return(131068&n)>>2}function vR(n,t){return-131069&n|t<<2}function bP(n){return 1|n}function DH(n,t,e,i,r){let o=n[e+1],s=null===t,a=i?Wp(o):Xm(o),l=!1;for(;0!==a&&(!1===l||s);){let d=n[a+1];lle(n[a],t)&&(l=!0,n[a+1]=i?bP(d):_P(d)),a=i?Wp(d):Xm(d)}l&&(n[e+1]=i?_P(o):bP(o))}function lle(n,t){return null===n||null==t||(Array.isArray(n)?n[1]:n)===t||!(!Array.isArray(n)||"string"!=typeof t)&&sb(n,t)>=0}var uo={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function sU(n){return n.substring(uo.key,uo.keyEnd)}function cle(n){return n.substring(uo.value,uo.valueEnd)}function aU(n,t){let e=uo.textEnd;return e===t?-1:(t=uo.keyEnd=function(n,t,e){for(;t<e&&n.charCodeAt(t)>32;)t++;return t}(n,uo.key=t,e),Qm(n,t,e))}function lU(n,t){let e=uo.textEnd,i=uo.key=Qm(n,t,e);return e===i?-1:(i=uo.keyEnd=function(n,t,e){let i;for(;t<e&&(45===(i=n.charCodeAt(t))||95===i||(-33&i)>=65&&(-33&i)<=90||i>=48&&i<=57);)t++;return t}(n,i,e),i=IH(n,i,e),i=uo.value=Qm(n,i,e),i=uo.valueEnd=function(n,t,e){let i=-1,r=-1,o=-1,s=t,a=s;for(;s<e;){let l=n.charCodeAt(s++);if(59===l)return a;34===l||39===l?a=s=AH(n,l,s,e):t===s-4&&85===o&&82===r&&76===i&&40===l?a=s=AH(n,41,s,e):l>32&&(a=s),o=r,r=i,i=-33&l}return a}(n,i,e),IH(n,i,e))}function cU(n){uo.key=0,uo.keyEnd=0,uo.value=0,uo.valueEnd=0,uo.textEnd=n.length}function Qm(n,t,e){for(;t<e&&n.charCodeAt(t)<=32;)t++;return t}function IH(n,t,e,i){return(t=Qm(n,t,e))<e&&t++,t}function AH(n,t,e,i){let r=-1,o=e;for(;o<i;){let s=n.charCodeAt(o++);if(s==t&&92!==r)return o;r=92==s&&92===r?0:s}throw new Error}function Tt(n,t,e){return Cl(n,t,e,!1),Tt}function nt(n,t){return Cl(n,t,null,!0),nt}function Fa(n){Ml(pU,hle,n,!1)}function hle(n,t){for(let e=function(n){return cU(n),lU(n,Qm(n,0,uo.textEnd))}(t);e>=0;e=lU(t,e))pU(n,sU(t),cle(t))}function As(n){Ml(xle,bc,n,!0)}function bc(n,t){for(let e=function(n){return cU(n),aU(n,Qm(n,0,uo.textEnd))}(t);e>=0;e=aU(t,e))sa(n,sU(t),!0)}function Cl(n,t,e,i){let r=Ze(),o=Ei(),s=od(2);o.firstUpdatePass&&uU(o,n,s,i),t!==Hn&&Uo(r,s,t)&&fU(o,o.data[ss()],r,r[oi],n,r[s+1]=function(n,t){return null==n||""===n||("string"==typeof t?n+=t:"object"==typeof n&&(n=po(Ds(n)))),n}(t,e),i,s)}function Ml(n,t,e,i){let r=Ei(),o=od(2);r.firstUpdatePass&&uU(r,null,o,i);let s=Ze();if(e!==Hn&&Uo(s,o,e)){let a=r.data[ss()];if(mU(a,i)&&!dU(r,o)){let l=i?a.classesWithoutHost:a.stylesWithoutHost;null!==l&&(e=AR(l,e||"")),gP(r,a,s,e,i)}else!function(n,t,e,i,r,o,s,a){r===Hn&&(r=Vi);let l=0,c=0,d=0<r.length?r[0]:null,u=0<o.length?o[0]:null;for(;null!==d||null!==u;){let b,p=l<r.length?r[l+1]:void 0,f=c<o.length?o[c+1]:void 0,m=null;d===u?(l+=2,c+=2,p!==f&&(m=u,b=f)):null===u||null!==d&&d<u?(l+=2,m=d):(c+=2,m=u,b=f),null!==m&&fU(n,t,e,i,m,b,s,a),d=l<r.length?r[l]:null,u=c<o.length?o[c]:null}}(r,a,s,s[oi],s[o+1],s[o+1]=function(n,t,e){if(null==e||""===e)return Vi;let i=[],r=Ds(e);if(Array.isArray(r))for(let o=0;o<r.length;o++)n(i,r[o],!0);else if("object"==typeof r)for(let o in r)r.hasOwnProperty(o)&&n(i,o,r[o]);else"string"==typeof r&&t(i,r);return i}(n,t,e),i,o)}}function dU(n,t){return t>=n.expandoStartIndex}function uU(n,t,e,i){let r=n.data;if(null===r[e+1]){let o=r[ss()],s=dU(n,e);mU(o,i)&&null===t&&!s&&(t=!1),t=function(n,t,e,i){let r=XP(n),o=i?t.residualClasses:t.residualStyles;if(null===r)0===(i?t.classBindings:t.styleBindings)&&(e=Q_(e=yR(null,n,t,e,i),t.attrs,i),o=null);else{let s=t.directiveStylingLast;if(-1===s||n[s]!==r)if(e=yR(r,n,t,e,i),null===o){let l=function(n,t,e){let i=e?t.classBindings:t.styleBindings;if(0!==Xm(i))return n[Wp(i)]}(n,t,i);void 0!==l&&Array.isArray(l)&&(l=yR(null,n,t,l[1],i),l=Q_(l,t.attrs,i),function(n,t,e,i){n[Wp(e?t.classBindings:t.styleBindings)]=i}(n,t,i,l))}else o=function(n,t,e){let i,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o<r;o++)i=Q_(i,n[o].hostAttrs,e);return Q_(i,t.attrs,e)}(n,t,i)}return void 0!==o&&(i?t.residualClasses=o:t.residualStyles=o),e}(r,o,t,i),function(n,t,e,i,r,o){let s=o?t.classBindings:t.styleBindings,a=Wp(s),l=Xm(s);n[i]=e;let d,c=!1;if(Array.isArray(e)?(d=e[1],(null===d||sb(e,d)>0)&&(c=!0)):d=e,r)if(0!==l){let p=Wp(n[a+1]);n[i+1]=UC(p,a),0!==p&&(n[p+1]=vR(n[p+1],i)),n[a+1]=function(n,t){return 131071&n|t<<17}(n[a+1],i)}else n[i+1]=UC(a,0),0!==a&&(n[a+1]=vR(n[a+1],i)),a=i;else n[i+1]=UC(l,0),0===a?a=i:n[l+1]=vR(n[l+1],i),l=i;c&&(n[i+1]=_P(n[i+1])),DH(n,d,i,!0),DH(n,d,i,!1),function(n,t,e,i,r){let o=r?n.residualClasses:n.residualStyles;null!=o&&"string"==typeof t&&sb(o,t)>=0&&(e[i+1]=bP(e[i+1]))}(t,d,n,i,o),s=UC(a,l),o?t.classBindings=s:t.styleBindings=s}(r,o,t,e,s,i)}}function yR(n,t,e,i,r){let o=null,s=e.directiveEnd,a=e.directiveStylingLast;for(-1===a?a=e.directiveStart:a++;a<s&&(o=t[a],i=Q_(i,o.hostAttrs,r),o!==n);)a++;return null!==n&&(e.directiveStylingLast=a),i}function Q_(n,t,e){let i=e?1:2,r=-1;if(null!==t)for(let o=0;o<t.length;o++){let s=t[o];"number"==typeof s?r=s:r===i&&(Array.isArray(n)||(n=void 0===n?[]:["",n]),sa(n,s,!!e||t[++o]))}return void 0===n?null:n}function pU(n,t,e){sa(n,t,Ds(e))}function xle(n,t,e){let i=String(t);""!==i&&!i.includes(" ")&&sa(n,i,e)}function fU(n,t,e,i,r,o,s,a){if(!(3&t.type))return;let l=n.data,c=l[a+1],d=function(n){return 1==(1&n)}(c)?RH(l,t,e,r,Xm(c),s):void 0;gM(d)||(gM(o)||function(n){return 2==(2&n)}(c)&&(o=RH(l,null,e,r,a,s)),function(n,t,e,i,r){if(t)r?n.addClass(e,i):n.removeClass(e,i);else{let o=-1===i.indexOf("-")?void 0:Aa.DashCase;null==r?n.removeStyle(e,i,o):("string"==typeof r&&r.endsWith("!important")&&(r=r.slice(0,-10),o|=Aa.Important),n.setStyle(e,i,r,o))}}(i,s,IM(ss(),e),r,o))}function RH(n,t,e,i,r,o){let a,s=null===t;for(;r>0;){let l=n[r],c=Array.isArray(l),d=c?l[1]:l,u=null===d,p=e[r+1];p===Hn&&(p=u?Vi:void 0);let f=u?pR(p,i):d===i?p:void 0;if(c&&!gM(f)&&(f=pR(l,i)),gM(f)&&(a=f,s))return a;let m=n[r+1];r=s?Wp(m):Xm(m)}if(null!==t){let l=o?t.residualClasses:t.residualStyles;null!=l&&(a=pR(l,i))}return a}function gM(n){return void 0!==n}function mU(n,t){return 0!=(n.flags&(t?8:16))}function T(n,t=""){let e=Ze(),i=Ei(),r=n+Wr,o=i.firstCreatePass?oh(i,r,1,t,null):i.data[r],s=e[r]=sO(e[oi],t);OM(i,e,s,o),dc(o,!1)}function bt(n){return He("",n,""),bt}function He(n,t,e){let i=Ze(),r=ah(i,n,t,e);return r!==Hn&&ld(i,ss(),r),He}function lu(n,t,e,i,r){let o=Ze(),s=lh(o,n,t,e,i,r);return s!==Hn&&ld(o,ss(),s),lu}function jM(n,t,e,i,r,o,s){let a=Ze(),l=ch(a,n,t,e,i,r,o,s);return l!==Hn&&ld(a,ss(),l),jM}function mb(n,t,e){Ml(sa,bc,ah(Ze(),n,t,e),!0)}function jo(n,t,e){let i=Ze();return Uo(i,eh(),t)&&aa(Ei(),kr(),i,n,t,i[oi],e,!0),jo}function GM(n,t,e){let i=Ze();if(Uo(i,eh(),t)){let o=Ei(),s=kr();aa(o,s,i,n,t,Bz(XP(o.data),s,i),e,!0)}return GM}var Op=void 0,Ule=["en",[["a","p"],["AM","PM"],Op],[["AM","PM"],Op,Op],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Op,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Op,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Op,"{1} 'at' {0}",Op],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(n){let e=Math.floor(Math.abs(n)),i=n.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===i?1:5}],xR={};function Rs(n){let t=function(n){return n.toLowerCase().replace(/_/g,"-")}(n),e=PH(t);if(e)return e;let i=t.split("-")[0];if(e=PH(i),e)return e;if("en"===i)return Ule;throw new yt(701,!1)}function PH(n){return n in xR||(xR[n]=Ur.ng&&Ur.ng.common&&Ur.ng.common.locales&&Ur.ng.common.locales[n]),xR[n]}var gr=(()=>{return(n=gr||(gr={}))[n.LocaleId=0]="LocaleId",n[n.DayPeriodsFormat=1]="DayPeriodsFormat",n[n.DayPeriodsStandalone=2]="DayPeriodsStandalone",n[n.DaysFormat=3]="DaysFormat",n[n.DaysStandalone=4]="DaysStandalone",n[n.MonthsFormat=5]="MonthsFormat",n[n.MonthsStandalone=6]="MonthsStandalone",n[n.Eras=7]="Eras",n[n.FirstDayOfWeek=8]="FirstDayOfWeek",n[n.WeekendRange=9]="WeekendRange",n[n.DateFormat=10]="DateFormat",n[n.TimeFormat=11]="TimeFormat",n[n.DateTimeFormat=12]="DateTimeFormat",n[n.NumberSymbols=13]="NumberSymbols",n[n.NumberFormats=14]="NumberFormats",n[n.CurrencyCode=15]="CurrencyCode",n[n.CurrencySymbol=16]="CurrencySymbol",n[n.CurrencyName=17]="CurrencyName",n[n.Currencies=18]="Currencies",n[n.Directionality=19]="Directionality",n[n.PluralCase=20]="PluralCase",n[n.ExtraData=21]="ExtraData",gr;var n})(),Gle=["zero","one","two","few","many"];var _M="en-US",RU={marker:"element"},PU={marker:"ICU"},gl=(()=>{return(n=gl||(gl={}))[n.SHIFT=2]="SHIFT",n[n.APPEND_EAGERLY=1]="APPEND_EAGERLY",n[n.COMMENT=2]="COMMENT",gl;var n})(),OU=_M;function kU(n,t,e){let i=t.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?X5(n,0,e):Ra(e[r])}function FU(n,t,e,i,r){let o=t.insertBeforeIndex;if(Array.isArray(o)){let s=i,a=null;if(3&t.type||(a=s,s=r),null!==s&&-1===t.componentOffset)for(let l=1;l<o.length;l++)Up(n,s,e[o[l]],a,!1)}}function NU(n,t){if(n.push(t),n.length>1)for(let e=n.length-2;e>=0;e--){let i=n[e];LU(i)||Qle(i,t)&&null===Zle(i)&&Kle(i,t.index)}}function LU(n){return!(64&n.type)}function Qle(n,t){return LU(t)||n.index>t.index}function Zle(n){let t=n.insertBeforeIndex;return Array.isArray(t)?t[0]:t}function Kle(n,t){let e=n.insertBeforeIndex;Array.isArray(e)?e[0]=t:(Z5(kU,FU),n.insertBeforeIndex=t)}function B_(n,t){let e=n.data[t];return null===e||"string"==typeof e?null:e.hasOwnProperty("currentCaseLViewIndex")?e:e.value}function ece(n,t,e){let i=gO(n,e,64,null,null);return NU(t,i),i}function WM(n,t){let e=t[n.currentCaseLViewIndex];return null===e?e:e<0?~e:e}function tce(n){return n>>>17}function nce(n){return(131070&n)>>>1}var Z_=0,V_=0;function BU(n,t,e,i){let s,r=e[oi],o=null;for(let a=0;a<t.length;a++){let l=t[a];if("string"==typeof l){let c=t[++a];null===e[c]&&(e[c]=sO(r,l))}else if("number"==typeof l)switch(1&l){case 0:let d,u,c=tce(l);if(null===o&&(o=c,s=PM(r,i)),c===o?(d=i,u=s):(d=null,u=Ra(e[c])),null!==u){let b=nce(l);Up(r,u,e[b],d,!1);let y=B_(n,b);if(null!==y&&"object"==typeof y){let x=WM(y,e);null!==x&&BU(n,y.create[x],e,e[y.anchorIdx])}}break;case 1:let f=t[++a],m=t[++a];MO(r,IM(l>>>1,e),null,null,f,m,null)}else switch(l){case PU:let c=t[++a],d=t[++a];null===e[d]&&uc(e[d]=joe(r,c),e);break;case RU:let u=t[++a],p=t[++a];null===e[p]&&uc(e[p]=aO(r,u,null),e)}}}function VU(n,t,e,i,r){for(let o=0;o<e.length;o++){let s=e[o],a=e[++o];if(s&r){let l="";for(let c=o+1;c<=o+a;c++){let d=e[c];if("string"==typeof d)l+=d;else if("number"==typeof d)if(d<0)l+=Un(t[i-d]);else{let u=d>>>2;switch(3&d){case 1:let p=e[++c],f=e[++c],m=n.data[u];"string"==typeof m?MO(t[oi],t[u],null,m,p,l,f):aa(n,m,t,p,l,t[oi],f,!1);break;case 0:let b=t[u];null!==b&&z5(t[oi],b,l);break;case 2:ace(n,B_(n,u),t,l);break;case 3:OH(n,B_(n,u),i,t)}}}}else{let l=e[o+1];if(l>0&&3==(3&l)){let d=B_(n,l>>>2);t[d.currentCaseLViewIndex]<0&&OH(n,d,i,t)}}o+=a}}function OH(n,t,e,i){let r=i[t.currentCaseLViewIndex];if(null!==r){let o=Z_;r<0&&(r=i[t.currentCaseLViewIndex]=~r,o=-1),VU(n,i,t.update[r],e,o)}}function ace(n,t,e,i){let r=function(n,t){let e=n.cases.indexOf(t);if(-1===e)switch(n.type){case 1:{let i=function(n,t){let e=function(n){return Rs(n)[gr.PluralCase]}(t)(parseInt(n,10)),i=Gle[e];return void 0!==i?i:"other"}(t,OU);e=n.cases.indexOf(i),-1===e&&"other"!==i&&(e=n.cases.indexOf("other"));break}case 0:e=n.cases.indexOf("other")}return-1===e?null:e}(t,i);if(WM(t,e)!==r&&(HU(n,t,e),e[t.currentCaseLViewIndex]=null===r?null:~r,null!==r)){let s=e[t.anchorIdx];s&&BU(n,t.create[r],e,s)}}function HU(n,t,e){let i=WM(t,e);if(null!==i){let r=t.remove[i];for(let o=0;o<r.length;o++){let s=r[o];if(s>0){let a=IM(s,e);null!==a&&lO(e[oi],a)}else HU(n,B_(n,~s),e)}}}function cce(){let e,i,n=[],t=-1;function o(a,l){t=0;let c=WM(a,l);i=null!==c?a.remove[c]:Vi}function s(){if(t<i.length){let a=i[t++];return a>0?e[a]:(n.push(t,i),o(e[Fn].data[~a],e),s())}return 0===n.length?null:(i=n.pop(),t=n.pop(),s())}return function(a,l){for(e=l;n.length;)n.pop();return o(a.value,l),s}}var bM=/\ufffd(\d+):?\d*\ufffd/gi,dce=/({\s*\ufffd\d+:?\d*\ufffd\s*,\s*\S{6}\s*,[\s\S]*})/gi,uce=/\ufffd(\d+)\ufffd/,zU=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,H_="\ufffd",pce=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,fce=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,mce=/\uE500/g;function UU(n,t,e,i,r,o,s){let a=ub(n,i,1,null),l=a<<gl.SHIFT,c=q_();t===c&&(c=null),null===c&&(l|=gl.APPEND_EAGERLY),s&&(l|=gl.COMMENT,function(n){void 0===jR&&(jR=n())}(cce)),r.push(l,null===o?"":o);let d=gO(n,a,s?32:1,null===o?"":o,null);NU(e,d);let u=d.index;return dc(d,!1),null!==c&&t!==c&&function(n,t){let e=n.insertBeforeIndex;null===e?(Z5(kU,FU),e=n.insertBeforeIndex=[null,t]):(function(n,t,e){1!=n&&QH("Expecting array here",n,!0,"==")}(Array.isArray(e)),e.push(t))}(c,u),d}function _ce(n,t,e,i,r,o,s){let a=s.match(bM),l=UU(n,t,e,o,i,a?null:s,!1);a&&z_(r,s,l.index,null,0,null)}function z_(n,t,e,i,r,o){let s=n.length,a=s+1;n.push(null,null);let l=s+2,c=t.split(bM),d=0;for(let u=0;u<c.length;u++){let p=c[u];if(1&u){let f=r+parseInt(p,10);n.push(-1-f),d|=jU(f)}else""!==p&&n.push(p)}return n.push(e<<2|(i?1:0)),i&&n.push(i,o),n[s]=d,n[a]=n.length-l,d}function vce(n){let t=0;for(let e=0;e<n.length;e++){let i=n[e];"number"==typeof i&&i<0&&t++}return t}function jU(n){return 1<<Math.min(n,31)}function kH(n){let t,o,e="",i=0,r=!1;for(;null!==(t=pce.exec(n));)r?t[0]===`${H_}/*${o}${H_}`&&(i=t.index,r=!1):(e+=n.substring(i,t.index+t[0].length),o=t[1],r=!0);return e+=n.slice(i),e}function GU(n,t,e,i,r,o){let s=0,a={type:r.type,currentCaseLViewIndex:ub(n,t,1,null),anchorIdx:o,cases:[],create:[],remove:[],update:[]};(function(n,t,e){n.push(jU(t.mainBinding),2,-1-t.mainBinding,e<<2|2)})(e,r,o),function(n,t,e){let i=n.data[t];null===i?n.data[t]=e:i.value=e}(n,o,a);let l=r.values;for(let c=0;c<l.length;c++){let d=l[c],u=[];for(let p=0;p<d.length;p++){let f=d[p];if("string"!=typeof f){let m=u.push(f)-1;d[p]=`\x3c!--\ufffd${m}\ufffd--\x3e`}}s=Mce(n,a,t,e,i,r.cases[c],d.join(""),u)|s}s&&function(n,t,e){n.push(t,1,e<<2|3)}(e,s,o)}function Cce(n){let t=[],e=[],i=1,r=0,o=vP(n=n.replace(zU,function(s,a,l){return i="select"===l?0:1,r=parseInt(a.slice(1),10),""}));for(let s=0;s<o.length;){let a=o[s++].trim();1===i&&(a=a.replace(/\s*(?:=)?(\w+)\s*/,"$1")),a.length&&t.push(a);let l=vP(o[s++]);t.length>e.length&&e.push(l)}return{type:i,mainBinding:r,cases:t,values:e}}function vP(n){if(!n)return[];let o,t=0,e=[],i=[],r=/[{}]/g;for(r.lastIndex=0;o=r.exec(n);){let a=o.index;if("}"==o[0]){if(e.pop(),0==e.length){let l=n.substring(t,a);zU.test(l)?i.push(Cce(l)):i.push(l),t=a+1}}else{if(0==e.length){let l=n.substring(t,a);i.push(l),t=a+1}e.push("{")}}let s=n.substring(t);return i.push(s),i}function Mce(n,t,e,i,r,o,s,a){let l=[],c=[],d=[];t.cases.push(o),t.create.push(l),t.remove.push(c),t.update.push(d);let p=cz(iz()).getInertBodyElement(s),f=iP(p)||p;return f?WU(n,t,e,i,l,c,d,f,r,a,0):0}function WU(n,t,e,i,r,o,s,a,l,c,d){let u=0,p=a.firstChild;for(;p;){let f=ub(n,e,1,null);switch(p.nodeType){case Node.ELEMENT_NODE:let m=p,b=m.tagName.toLowerCase();if(tP.hasOwnProperty(b)){CR(r,RU,b,l,f),n.data[f]=b;let R=m.attributes;for(let A=0;A<R.length;A++){let V=R.item(A),te=V.name.toLowerCase();V.value.match(bM)?fz.hasOwnProperty(te)&&z_(s,V.value,f,V.name,0,uO[te]?lb:null):Tce(r,f,V)}u=WU(n,t,e,i,r,o,s,p,f,c,d+1)|u,FH(o,f,d)}break;case Node.TEXT_NODE:let M=p.textContent||"",y=M.match(bM);CR(r,null,y?"":M,l,f),FH(o,f,d),y&&(u=z_(s,M,f,null,0,null)|u);break;case Node.COMMENT_NODE:let x=uce.exec(p.textContent||"");if(x){let A=c[parseInt(x[1],10)];CR(r,PU,"",l,f),GU(n,e,i,l,A,f),wce(o,f,d)}}p=p.nextSibling}return u}function FH(n,t,e){0===e&&n.push(t)}function wce(n,t,e){0===e&&(n.push(~t),n.push(t))}function CR(n,t,e,i,r){null!==t&&n.push(t),n.push(e,r,function(n,t,e){return 0|t<<17|e<<1}(0,i,r))}function Tce(n,t,e){n.push(t<<1|1,e.name,e.value)}var NH=0,Dce=/\[(\ufffd.+?\ufffd?)\]/,Ice=/\[(\ufffd.+?\ufffd?)\]|(\ufffd\/?\*\d+:\d+\ufffd)/g,Ace=/({\s*)(VAR_(PLURAL|SELECT)(_\d+)?)(\s*,)/g,Rce=/{([A-Z0-9_]+)}/g,Pce=/\ufffdI18N_EXP_(ICU(_\d+)?)\ufffd/g,Oce=/\/\*/,kce=/\d+\:(\d+)/;function qU(n,t,e=-1){let i=Ei(),r=Ze(),o=Wr+n,s=iu(i.consts,t),a=q_();i.firstCreatePass&&function(n,t,e,i,r,o){let s=q_(),a=[],l=[],c=[[]];r=function(n,t){if(function(n){return-1===n}(t))return kH(n);{let e=n.indexOf(`:${t}${H_}`)+2+t.toString().length,i=n.search(new RegExp(`${H_}\\/\\*\\d+:${t}${H_}`));return kH(n.substring(e,i))}}(r,o);let d=function(n){return n.replace(mce," ")}(r).split(fce);for(let u=0;u<d.length;u++){let p=d[u];if(0==(1&u)){let f=vP(p);for(let m=0;m<f.length;m++){let b=f[m];if(0==(1&m))""!==b&&_ce(n,s,c[0],a,l,e,b);else{let M=b;if("object"!=typeof M)throw new Error(`Unable to parse ICU expression in "${r}" message.`);GU(n,e,l,t,M,UU(n,s,c[0],e,a,"",!0).index)}}}else{let f=47===p.charCodeAt(0),b=(p.charCodeAt(f?1:0),Wr+Number.parseInt(p.substring(f?2:1)));if(f)c.shift(),dc(q_(),!1);else{let M=ece(n,c[0],b);c.unshift([]),dc(M,!0)}}}n.data[i]={create:a,update:l}}(i,null===a?0:a.index,r,o,s,e);let l=i.data[o],d=W5(i,a===r[Ss]?null:a,r);(function(n,t,e,i){let r=n[oi];for(let o=0;o<t.length;o++){let s=t[o++],a=t[o],c=(s&gl.APPEND_EAGERLY)===gl.APPEND_EAGERLY,d=s>>>gl.SHIFT,u=n[d];null===u&&(u=n[d]=(s&gl.COMMENT)===gl.COMMENT?r.createComment(a):sO(r,a)),c&&null!==e&&Up(r,e,u,i,!1)}})(r,l.create,d,a&&8&a.type?r[a.index]:null),h5(!0)}function YU(){h5(!1)}function qM(n,t,e){qU(n,t,e),YU()}function hb(n){return function(n){n&&(Z_|=1<<Math.min(V_,31)),V_++}(Uo(Ze(),eh(),n)),hb}function YM(n){!function(n,t,e){if(V_>0){let i=n.data[e];VU(n,t,Array.isArray(i)?i:i.update,rd()-V_-1,Z_)}Z_=0,V_=0}(Ei(),Ze(),n+Wr)}function XM(n,t={}){return function(n,t={}){let e=n;if(Dce.test(n)){let i={},r=[NH];e=e.replace(Ice,(o,s,a)=>{let l=s||a,c=i[l]||[];if(c.length||(l.split("|").forEach(b=>{let M=b.match(kce),y=M?parseInt(M[1],10):NH,x=Oce.test(b);c.push([y,x,b])}),i[l]=c),!c.length)throw new Error(`i18n postprocess: unmatched placeholder - ${l}`);let d=r[r.length-1],u=0;for(let b=0;b<c.length;b++)if(c[b][0]===d){u=b;break}let[p,f,m]=c[u];return f?r.pop():d!==p&&r.push(p),c.splice(u,1),m})}return Object.keys(t).length&&(e=e.replace(Ace,(i,r,o,s,a,l)=>t.hasOwnProperty(o)?`${r}${t[o]}${l}`:i),e=e.replace(Rce,(i,r)=>t.hasOwnProperty(r)?t[r]:i),e=e.replace(Pce,(i,r)=>{if(t.hasOwnProperty(r)){let o=t[r];if(!o.length)throw new Error(`i18n postprocess: unmatched ICU - ${i} with key: ${r}`);return o.shift()}return i})),e}(n,t)}function yP(n,t,e,i,r){if(n=Ri(n),Array.isArray(n))for(let o=0;o<n.length;o++)yP(n[o],t,e,i,r);else{let o=Ei(),s=Ze(),a=Ym(n)?n:Ri(n.provide),l=yz(n),c=Po(),d=1048575&c.providerIndexes,u=c.directiveStart,p=c.providerIndexes>>20;if(Ym(n)||!n.multi){let f=new Hp(l,r,C),m=wR(a,t,r?d:d+p,u);-1===m?(HR(lM(c,s),o,a),MR(o,n,t.length),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(f),s.push(f)):(e[m]=f,s[m]=f)}else{let f=wR(a,t,d+p,u),m=wR(a,t,d,d+p),M=m>=0&&e[m];if(r&&!M||!r&&!(f>=0&&e[f])){HR(lM(c,s),o,a);let y=function(n,t,e,i,r){let o=new Hp(n,e,C);return o.multi=[],o.index=t,o.componentProviders=0,XU(o,r,i&&!e),o}(r?Vce:Bce,e.length,r,i,l);!r&&M&&(e[m].providerFactory=y),MR(o,n,t.length,0),t.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),e.push(y),s.push(y)}else MR(o,n,f>-1?f:m,XU(e[r?m:f],l,!r&&i));!r&&i&&M&&e[m].componentProviders++}}}function MR(n,t,e,i){let r=Ym(t),o=function(n){return!!n.useClass}(t);if(r||o){let l=(o?Ri(t.useClass):t).prototype.ngOnDestroy;if(l){let c=n.destroyHooks||(n.destroyHooks=[]);if(!r&&t.multi){let d=c.indexOf(e);-1===d?c.push(e,[i,l]):c[d+1].push(i,l)}else c.push(e,l)}}}function XU(n,t,e){return e&&n.componentProviders++,n.multi.push(t)-1}function wR(n,t,e,i){for(let r=e;r<i;r++)if(t[r]===n)return r;return-1}function Bce(n,t,e,i){return xP(this.multi,[])}function Vce(n,t,e,i){let o,r=this.multi;if(this.providerFactory){let s=this.providerFactory.componentProviders,a=zp(e,e[Fn],this.providerFactory.index,i);o=a.slice(0,s),xP(r,o);for(let l=s;l<a.length;l++)o.push(a[l])}else o=[],xP(r,o);return o}function xP(n,t){for(let e=0;e<n.length;e++)t.push((0,n[e])());return t}function Qt(n,t=[]){return e=>{e.providersResolver=(i,r)=>function(n,t,e){let i=Ei();if(i.firstCreatePass){let r=vl(n);yP(e,i.data,i.blueprint,r,!0),yP(t,i.data,i.blueprint,r,!1)}}(i,r?r(n):n,t)}}var ru=class{},CP=class{},MP=class extends ru{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.destroyCbs=[],this.componentFactoryResolver=new mM(this);let i=Gm(t);this._bootstrapComponents=XC(i.bootstrap),this._r3Injector=Tz(t,e,[{provide:ru,useValue:this},{provide:fo,useValue:this.componentFactoryResolver}],po(t),new Set(["environment"])),this._r3Injector.resolveInjectorInitializers(),this.instance=this._r3Injector.get(t)}get injector(){return this._r3Injector}destroy(){let t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(e=>e()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},wP=class extends CP{constructor(t){super(),this.moduleType=t}create(t){return new MP(this.moduleType,t)}},SP=class extends ru{constructor(t,e,i){super(),this.componentFactoryResolver=new mM(this),this.instance=null;let r=new uM([...t,{provide:ru,useValue:this},{provide:fo,useValue:this.componentFactoryResolver}],e||hO(),i,new Set(["environment"]));this.injector=r,r.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}},Uce=(()=>{class n{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e.id)){let i=_z(0,e.type),r=i.length>0?function(n,t,e=null){return new SP(n,t,e).injector}([i],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e.id,r)}return this.cachedInjectors.get(e.id)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())null!==e&&e.destroy()}finally{this.cachedInjectors.clear()}}}return n.\u0275prov=ue({token:n,providedIn:"environment",factory:()=>new n(k(pc))}),n})();function IO(n){n.getStandaloneInjector=t=>t.get(Uce).getOrCreateStandaloneInjector(n)}function cu(n,t,e){let i=os()+n,r=Ze();return r[i]===Hn?_c(r,i,e?t.call(e):t()):pb(r,i)}function In(n,t,e,i){return QU(Ze(),os(),n,t,e,i)}function qr(n,t,e,i,r){return ZU(Ze(),os(),n,t,e,i,r)}function gb(n,t,e,i,r,o){return KU(Ze(),os(),n,t,e,i,r,o)}function AO(n,t,e,i,r,o,s){return JU(Ze(),os(),n,t,e,i,r,o,s)}function RO(n,t,e,i,r,o,s,a){let l=os()+n,c=Ze(),d=Pa(c,l,e,i,r,o);return Uo(c,l+4,s)||d?_c(c,l+5,a?t.call(a,e,i,r,o,s):t(e,i,r,o,s)):pb(c,l+5)}function _b(n,t){let e=n[t];return e===Hn?void 0:e}function QU(n,t,e,i,r,o){let s=t+e;return Uo(n,s,r)?_c(n,s+1,o?i.call(o,r):i(r)):_b(n,s+1)}function ZU(n,t,e,i,r,o,s){let a=t+e;return Gp(n,a,r,o)?_c(n,a+2,s?i.call(s,r,o):i(r,o)):_b(n,a+2)}function KU(n,t,e,i,r,o,s,a){let l=t+e;return HM(n,l,r,o,s)?_c(n,l+3,a?i.call(a,r,o,s):i(r,o,s)):_b(n,l+3)}function JU(n,t,e,i,r,o,s,a,l){let c=t+e;return Pa(n,c,r,o,s,a)?_c(n,c+4,l?i.call(l,r,o,s,a):i(r,o,s,a)):_b(n,c+4)}function $U(n,t,e,i,r,o){let s=t+e,a=!1;for(let l=0;l<r.length;l++)Uo(n,s++,r[l])&&(a=!0);return a?_c(n,s,i.apply(o,r)):_b(n,s)}function j(n,t){let i,e=Ei(),r=n+Wr;e.firstCreatePass?(i=function(n,t){if(t)for(let e=t.length-1;e>=0;e--){let i=t[e];if(n===i.name)return i}}(t,e.pipeRegistry),e.data[r]=i,i.onDestroy&&(e.destroyHooks??(e.destroyHooks=[])).push(r,i.onDestroy)):i=e.data[r];let o=i.factory||(i.factory=Bp(i.type)),s=Ea(C);try{let a=aM(!1),l=o();return aM(a),function(n,t,e,i){e>=n.data.length&&(n.data[e]=null,n.blueprint[e]=null),t[e]=i}(e,Ze(),r,l),l}finally{Ea(s)}}function W(n,t,e){let i=n+Wr,r=Ze(),o=$m(r,i);return bb(r,i)?QU(r,os(),t,o.transform,e,o):o.transform(e)}function qp(n,t,e,i){let r=n+Wr,o=Ze(),s=$m(o,r);return bb(o,r)?ZU(o,os(),t,s.transform,e,i,s):s.transform(e,i)}function PO(n,t,e,i,r){let o=n+Wr,s=Ze(),a=$m(s,o);return bb(s,o)?KU(s,os(),t,a.transform,e,i,r,a):a.transform(e,i,r)}function bb(n,t){return n[Fn].data[t].pure}function SR(n){return t=>{setTimeout(n,void 0,t)}}var F=class extends Ie{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,i){let r=t,o=e||(()=>null),s=i;if(t&&"object"==typeof t){let l=t;r=l.next?.bind(l),o=l.error?.bind(l),s=l.complete?.bind(l)}this.__isAsync&&(o=SR(o),r&&(r=SR(r)),s&&(s=SR(s)));let a=super.subscribe({next:r,error:o,complete:s});return t instanceof Mn&&t.add(a),a}};function Zce(){return this._results[Symbol.iterator]()}var Oa=class{get changes(){return this._changes||(this._changes=new F)}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._results=[],this._changesDetected=!1,this._changes=null,this.length=0,this.first=void 0,this.last=void 0;let e=Oa.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=Zce)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){let i=this;i.dirty=!1;let r=$d(t);(this._changesDetected=!function(n,t,e){if(n.length!==t.length)return!1;for(let i=0;i<n.length;i++){let r=n[i],o=t[i];if(e&&(r=e(r),o=e(o)),o!==r)return!1}return!0}(i._results,r,e))&&(i._results=r,i.length=r.length,i.last=r[this.length-1],i.first=r[0])}notifyOnChanges(){this._changes&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}},Si=(()=>{class n{}return n.__NG_ELEMENT_ID__=$ce,n})(),Kce=Si,Jce=class extends Kce{constructor(t,e,i){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=i}createEmbeddedView(t,e){let i=this._declarationTContainer.tView,r=LM(this._declarationLView,i,t,16,null,i.declTNode,null,null,null,null,e||null);r[rb]=this._declarationLView[this._declarationTContainer.index];let s=this._declarationLView[cc];return null!==s&&(r[cc]=s.createEmbeddedView(i)),_O(i,r,t),new jp(r)}};function $ce(){return QM(Po(),Ze())}function QM(n,t){return 4&n.type?new Jce(t,n,rh(n,t)):null}var si=(()=>{class n{}return n.__NG_ELEMENT_ID__=ede,n})();function ede(){return tj(Po(),Ze())}var tde=si,ej=class extends tde{constructor(t,e,i){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=i}get element(){return rh(this._hostTNode,this._hostLView)}get injector(){return new Lp(this._hostTNode,this._hostLView)}get parentInjector(){let t=JP(this._hostTNode,this._hostLView);if(w5(t)){let e=sM(t,this._hostLView),i=oM(t);return new Lp(e[Fn].data[i+8],e)}return new Lp(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=LH(this._lContainer);return null!==e&&e[t]||null}get length(){return this._lContainer.length-ws}createEmbeddedView(t,e,i){let r,o;"number"==typeof i?r=i:null!=i&&(r=i.index,o=i.injector);let s=t.createEmbeddedView(e||{},o);return this.insert(s,r),s}createComponent(t,e,i,r,o){let a,s=t&&!R_(t);if(s)a=e;else{let u=e||{};a=u.index,i=u.injector,r=u.projectableNodes,o=u.environmentInjector||u.ngModuleRef}let l=s?t:new hM(Da(t)),c=i||this.parentInjector;if(!o&&null==l.ngModule){let p=(s?c:this.parentInjector).get(pc,null);p&&(o=p)}let d=l.create(c,r,void 0,o);return this.insert(d.hostView,a),d}insert(t,e){let i=t._lView,r=i[Fn];if(nd(i[Gr])){let d=this.indexOf(t);if(-1!==d)this.detach(d);else{let u=i[Gr],p=new ej(u,u[Ss],u[Gr]);p.detach(p.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;!function(n,t,e,i){let r=ws+i,o=e.length;i>0&&(e[r-1][_l]=t),i<o-ws?(t[_l]=e[r],k5(e,ws+i,t)):(e.push(t),t[_l]=null),t[Gr]=e;let s=t[rb];null!==s&&e!==s&&function(n,t){let e=n[Wm];t[bl]!==t[Gr][Gr][bl]&&(n[r5]=!0),null===e?n[Wm]=[t]:e.push(t)}(s,t);let a=t[cc];null!==a&&a.insertView(n),t[ri]|=64}(r,i,s,o);let a=qR(o,s),l=i[oi],c=PM(l,s[jP]);return null!==c&&function(n,t,e,i,r,o){i[su]=r,i[Ss]=t,ab(n,i,e,1,r,o)}(r,s[Ss],l,i,c,a),t.attachToViewContainerRef(),k5(ER(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=LH(this._lContainer);return null!==e?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),i=GR(this._lContainer,e);i&&(cM(ER(this._lContainer),e),j5(i[Fn],i))}detach(t){let e=this._adjustIndex(t,-1),i=GR(this._lContainer,e);return i&&null!=cM(ER(this._lContainer),e)?new jp(i):null}_adjustIndex(t,e=0){return t??this.length+e}};function LH(n){return n[iM]}function ER(n){return n[iM]||(n[iM]=[])}function tj(n,t){let e,i=t[n.index];if(nd(i))e=i;else{let r;if(8&n.type)r=Ra(i);else{let o=t[oi];r=o.createComment("");let s=oa(n,t);Up(o,PM(o,s),r,function(n,t){return n.nextSibling(t)}(o,s),!1)}t[n.index]=e=kz(i,t,r,n),VM(t,e)}return new ej(e,n,t)}var K_=class{constructor(t){this.queryList=t,this.matches=null}clone(){return new K_(this.queryList)}setDirty(){this.queryList.setDirty()}},J_=class{constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(null!==e){let i=null!==t.contentQueries?t.contentQueries[0]:e.length,r=[];for(let o=0;o<i;o++){let s=e.getByIndex(o);r.push(this.queries[s.indexInDeclarationView].clone())}return new J_(r)}return null}insertView(t){this.dirtyQueriesWithMatches(t)}detachView(t){this.dirtyQueriesWithMatches(t)}dirtyQueriesWithMatches(t){for(let e=0;e<this.queries.length;e++)null!==oj(t,e).matches&&this.queries[e].setDirty()}},vM=class{constructor(t,e,i=null){this.predicate=t,this.flags=e,this.read=i}},$_=class{constructor(t=[]){this.queries=t}elementStart(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].elementStart(t,e)}elementEnd(t){for(let e=0;e<this.queries.length;e++)this.queries[e].elementEnd(t)}embeddedTView(t){let e=null;for(let i=0;i<this.length;i++){let r=null!==e?e.length:0,o=this.getByIndex(i).embeddedTView(t,r);o&&(o.indexInDeclarationView=i,null!==e?e.push(o):e=[o])}return null!==e?new $_(e):null}template(t,e){for(let i=0;i<this.queries.length;i++)this.queries[i].template(t,e)}getByIndex(t){return this.queries[t]}get length(){return this.queries.length}track(t){this.queries.push(t)}},eb=class{constructor(t,e=-1){this.metadata=t,this.matches=null,this.indexInDeclarationView=-1,this.crossesNgTemplate=!1,this._appliesToNextNode=!0,this._declarationNodeIndex=e}elementStart(t,e){this.isApplyingToNode(e)&&this.matchTNode(t,e)}elementEnd(t){this._declarationNodeIndex===t.index&&(this._appliesToNextNode=!1)}template(t,e){this.elementStart(t,e)}embeddedTView(t,e){return this.isApplyingToNode(t)?(this.crossesNgTemplate=!0,this.addMatch(-t.index,e),new eb(this.metadata)):null}isApplyingToNode(t){if(this._appliesToNextNode&&1!=(1&this.metadata.flags)){let e=this._declarationNodeIndex,i=t.parent;for(;null!==i&&8&i.type&&i.index!==e;)i=i.parent;return e===(null!==i?i.index:-1)}return this._appliesToNextNode}matchTNode(t,e){let i=this.metadata.predicate;if(Array.isArray(i))for(let r=0;r<i.length;r++){let o=i[r];this.matchTNodeWithReadOption(t,e,nde(e,o)),this.matchTNodeWithReadOption(t,e,WC(e,t,o,!1,!1))}else i===Si?4&e.type&&this.matchTNodeWithReadOption(t,e,-1):this.matchTNodeWithReadOption(t,e,WC(e,t,i,!1,!1))}matchTNodeWithReadOption(t,e,i){if(null!==i){let r=this.metadata.read;if(null!==r)if(r===Me||r===si||r===Si&&4&e.type)this.addMatch(e.index,-2);else{let o=WC(e,t,r,!1,!1);null!==o&&this.addMatch(e.index,o)}else this.addMatch(e.index,i)}}addMatch(t,e){null===this.matches?this.matches=[t,e]:this.matches.push(t,e)}};function nde(n,t){let e=n.localNames;if(null!==e)for(let i=0;i<e.length;i+=2)if(e[i]===t)return e[i+1];return null}function rde(n,t,e,i){return-1===e?function(n,t){return 11&n.type?rh(n,t):4&n.type?QM(n,t):null}(t,n):-2===e?function(n,t,e){return e===Me?rh(t,n):e===Si?QM(t,n):e===si?tj(t,n):void 0}(n,t,i):zp(n,n[Fn],e,t)}function nj(n,t,e,i){let r=t[cc].queries[i];if(null===r.matches){let o=n.data,s=e.matches,a=[];for(let l=0;l<s.length;l+=2){let c=s[l];a.push(c<0?null:rde(t,o[c],s[l+1],e.metadata.read))}r.matches=a}return r.matches}function TP(n,t,e,i){let r=n.queries.getByIndex(e),o=r.matches;if(null!==o){let s=nj(n,t,r,e);for(let a=0;a<o.length;a+=2){let l=o[a];if(l>0)i.push(s[a/2]);else{let c=o[a+1],d=t[-l];for(let u=ws;u<d.length;u++){let p=d[u];p[rb]===p[Gr]&&TP(p[Fn],p,c,i)}if(null!==d[Wm]){let u=d[Wm];for(let p=0;p<u.length;p++){let f=u[p];TP(f[Fn],f,c,i)}}}}}return i}function Se(n){let t=Ze(),e=Ei(),i=g5();QP(i+1);let r=oj(e,i);if(n.dirty&&function(n){return 4==(4&n[ri])}(t)===(2==(2&r.metadata.flags))){if(null===r.matches)n.reset([]);else{let o=r.crossesNgTemplate?TP(e,t,i,[]):nj(e,t,r,i);n.reset(o,Bse),n.notifyOnChanges()}return!0}return!1}function Ge(n,t,e){let i=Ei();i.firstCreatePass&&(rj(i,new vM(n,t,e),-1),2==(2&t)&&(i.staticViewQueries=!0)),ij(i,Ze(),t)}function Ti(n,t,e,i){let r=Ei();if(r.firstCreatePass){let o=Po();rj(r,new vM(t,e,i),o.index),function(n,t){let e=n.contentQueries||(n.contentQueries=[]);t!==(e.length?e[e.length-1]:-1)&&e.push(n.queries.length-1,t)}(r,n),2==(2&e)&&(r.staticContentQueries=!0)}ij(r,Ze(),e)}function Ee(){return n=Ze(),t=g5(),n[cc].queries[t].queryList;var n,t}function ij(n,t,e){let i=new Oa(4==(4&e));Rz(n,t,i,i.destroy),null===t[cc]&&(t[cc]=new J_),t[cc].queries.push(new K_(i))}function rj(n,t,e){null===n.queries&&(n.queries=new $_),n.queries.track(new eb(t,e))}function oj(n,t){return n.queries.getByIndex(t)}function Wt(n,t){return QM(n,t)}var eu={"\u0275\u0275attribute":Be,"\u0275\u0275attributeInterpolate1":function jz(n,t,e,i,r,o){let s=Ze(),a=ah(s,t,e,i);return a!==Hn&&gc(kr(),s,n,a,r,o),jz},"\u0275\u0275attributeInterpolate2":function Gz(n,t,e,i,r,o,s,a){let l=Ze(),c=lh(l,t,e,i,r,o);return c!==Hn&&gc(kr(),l,n,c,s,a),Gz},"\u0275\u0275attributeInterpolate3":function Wz(n,t,e,i,r,o,s,a,l,c){let d=Ze(),u=ch(d,t,e,i,r,o,s,a);return u!==Hn&&gc(kr(),d,n,u,l,c),Wz},"\u0275\u0275attributeInterpolate4":function qz(n,t,e,i,r,o,s,a,l,c,d,u){let p=Ze(),f=dh(p,t,e,i,r,o,s,a,l,c);return f!==Hn&&gc(kr(),p,n,f,d,u),qz},"\u0275\u0275attributeInterpolate5":function Yz(n,t,e,i,r,o,s,a,l,c,d,u,p,f){let m=Ze(),b=uh(m,t,e,i,r,o,s,a,l,c,d,u);return b!==Hn&&gc(kr(),m,n,b,p,f),Yz},"\u0275\u0275attributeInterpolate6":function Xz(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b){let M=Ze(),y=ph(M,t,e,i,r,o,s,a,l,c,d,u,p,f);return y!==Hn&&gc(kr(),M,n,y,m,b),Xz},"\u0275\u0275attributeInterpolate7":function Qz(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y){let x=Ze(),R=fh(x,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b);return R!==Hn&&gc(kr(),x,n,R,M,y),Qz},"\u0275\u0275attributeInterpolate8":function Zz(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y,x,R){let A=Ze(),V=mh(A,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y);return V!==Hn&&gc(kr(),A,n,V,x,R),Zz},"\u0275\u0275attributeInterpolateV":function Kz(n,t,e,i){let r=Ze(),o=sh(r,t);return o!==Hn&&gc(kr(),r,n,o,e,i),Kz},"\u0275\u0275defineComponent":O,"\u0275\u0275defineDirective":we,"\u0275\u0275defineInjectable":ue,"\u0275\u0275defineInjector":U,"\u0275\u0275defineNgModule":G,"\u0275\u0275definePipe":Km,"\u0275\u0275directiveInject":C,"\u0275\u0275getInheritedFactory":Xn,"\u0275\u0275inject":k,"\u0275\u0275injectAttribute":yo,"\u0275\u0275invalidFactory":Is,"\u0275\u0275invalidFactoryDep":JH,"\u0275\u0275templateRefExtractor":Wt,"\u0275\u0275resetView":Q,"\u0275\u0275HostDirectivesFeature":function(n){return t=>{t.findHostDirectiveDefs=zz,t.hostDirectives=(Array.isArray(n)?n:n()).map(e=>"function"==typeof e?{directive:Ri(e),inputs:$c,outputs:$c}:{directive:Ri(e.directive),inputs:SH(e.inputs),outputs:SH(e.outputs)})}},"\u0275\u0275NgOnChangesFeature":Gt,"\u0275\u0275ProvidersFeature":Qt,"\u0275\u0275CopyDefinitionFeature":function(n){let e,t=Hz(n.type);e=vl(n)?t.\u0275cmp:t.\u0275dir;let i=n;for(let r of Wae)i[r]=e[r];if(vl(e))for(let r of qae)i[r]=e[r]},"\u0275\u0275InheritDefinitionFeature":Ke,"\u0275\u0275StandaloneFeature":IO,"\u0275\u0275nextContext":w,"\u0275\u0275namespaceHTML":Oo,"\u0275\u0275namespaceMathML":function(){jn.lFrame.currentNamespace=c5},"\u0275\u0275namespaceSVG":Nn,"\u0275\u0275enableBindings":function(){jn.bindingsEnabled=!0},"\u0275\u0275disableBindings":function(){jn.bindingsEnabled=!1},"\u0275\u0275elementStart":h,"\u0275\u0275elementEnd":g,"\u0275\u0275element":P,"\u0275\u0275elementContainerStart":Ot,"\u0275\u0275elementContainerEnd":kt,"\u0275\u0275elementContainer":li,"\u0275\u0275pureFunction0":cu,"\u0275\u0275pureFunction1":In,"\u0275\u0275pureFunction2":qr,"\u0275\u0275pureFunction3":gb,"\u0275\u0275pureFunction4":AO,"\u0275\u0275pureFunction5":RO,"\u0275\u0275pureFunction6":function(n,t,e,i,r,o,s,a,l){let c=os()+n,d=Ze(),u=Pa(d,c,e,i,r,o);return Gp(d,c+4,s,a)||u?_c(d,c+6,l?t.call(l,e,i,r,o,s,a):t(e,i,r,o,s,a)):pb(d,c+6)},"\u0275\u0275pureFunction7":function(n,t,e,i,r,o,s,a,l,c){let d=os()+n,u=Ze(),p=Pa(u,d,e,i,r,o);return HM(u,d+4,s,a,l)||p?_c(u,d+7,c?t.call(c,e,i,r,o,s,a,l):t(e,i,r,o,s,a,l)):pb(u,d+7)},"\u0275\u0275pureFunction8":function(n,t,e,i,r,o,s,a,l,c,d){let u=os()+n,p=Ze(),f=Pa(p,u,e,i,r,o);return Pa(p,u+4,s,a,l,c)||f?_c(p,u+8,d?t.call(d,e,i,r,o,s,a,l,c):t(e,i,r,o,s,a,l,c)):pb(p,u+8)},"\u0275\u0275pureFunctionV":function(n,t,e,i){return $U(Ze(),os(),n,t,e,i)},"\u0275\u0275getCurrentView":ge,"\u0275\u0275restoreView":X,"\u0275\u0275listener":I,"\u0275\u0275projection":zt,"\u0275\u0275syntheticHostProperty":GM,"\u0275\u0275syntheticHostListener":zM,"\u0275\u0275pipeBind1":W,"\u0275\u0275pipeBind2":qp,"\u0275\u0275pipeBind3":PO,"\u0275\u0275pipeBind4":function(n,t,e,i,r,o){let s=n+Wr,a=Ze(),l=$m(a,s);return bb(a,s)?JU(a,os(),t,l.transform,e,i,r,o,l):l.transform(e,i,r,o)},"\u0275\u0275pipeBindV":function(n,t,e){let i=n+Wr,r=Ze(),o=$m(r,i);return bb(r,i)?$U(r,os(),t,o.transform,e,o):o.transform.apply(o,e)},"\u0275\u0275projectionDef":Dn,"\u0275\u0275hostProperty":jo,"\u0275\u0275property":_,"\u0275\u0275propertyInterpolate":Wi,"\u0275\u0275propertyInterpolate1":fb,"\u0275\u0275propertyInterpolate2":UM,"\u0275\u0275propertyInterpolate3":function $z(n,t,e,i,r,o,s,a,l){let c=Ze(),d=ch(c,t,e,i,r,o,s,a);return d!==Hn&&aa(Ei(),kr(),c,n,d,c[oi],l,!1),$z},"\u0275\u0275propertyInterpolate4":function eU(n,t,e,i,r,o,s,a,l,c,d){let u=Ze(),p=dh(u,t,e,i,r,o,s,a,l,c);return p!==Hn&&aa(Ei(),kr(),u,n,p,u[oi],d,!1),eU},"\u0275\u0275propertyInterpolate5":function tU(n,t,e,i,r,o,s,a,l,c,d,u,p){let f=Ze(),m=uh(f,t,e,i,r,o,s,a,l,c,d,u);return m!==Hn&&aa(Ei(),kr(),f,n,m,f[oi],p,!1),tU},"\u0275\u0275propertyInterpolate6":function nU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m){let b=Ze(),M=ph(b,t,e,i,r,o,s,a,l,c,d,u,p,f);return M!==Hn&&aa(Ei(),kr(),b,n,M,b[oi],m,!1),nU},"\u0275\u0275propertyInterpolate7":function iU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){let y=Ze(),x=fh(y,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b);return x!==Hn&&aa(Ei(),kr(),y,n,x,y[oi],M,!1),iU},"\u0275\u0275propertyInterpolate8":function rU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y,x){let R=Ze(),A=mh(R,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y);return A!==Hn&&aa(Ei(),kr(),R,n,A,R[oi],x,!1),rU},"\u0275\u0275propertyInterpolateV":function oU(n,t,e){let i=Ze(),r=sh(i,t);return r!==Hn&&aa(Ei(),kr(),i,n,r,i[oi],e,!1),oU},"\u0275\u0275pipe":j,"\u0275\u0275queryRefresh":Se,"\u0275\u0275viewQuery":Ge,"\u0275\u0275loadQuery":Ee,"\u0275\u0275contentQuery":Ti,"\u0275\u0275reference":it,"\u0275\u0275classMap":As,"\u0275\u0275classMapInterpolate1":mb,"\u0275\u0275classMapInterpolate2":function(n,t,e,i,r){Ml(sa,bc,lh(Ze(),n,t,e,i,r),!0)},"\u0275\u0275classMapInterpolate3":function(n,t,e,i,r,o,s){Ml(sa,bc,ch(Ze(),n,t,e,i,r,o,s),!0)},"\u0275\u0275classMapInterpolate4":function(n,t,e,i,r,o,s,a,l){Ml(sa,bc,dh(Ze(),n,t,e,i,r,o,s,a,l),!0)},"\u0275\u0275classMapInterpolate5":function(n,t,e,i,r,o,s,a,l,c,d){Ml(sa,bc,uh(Ze(),n,t,e,i,r,o,s,a,l,c,d),!0)},"\u0275\u0275classMapInterpolate6":function(n,t,e,i,r,o,s,a,l,c,d,u,p){Ml(sa,bc,ph(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p),!0)},"\u0275\u0275classMapInterpolate7":function(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m){Ml(sa,bc,fh(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p,f,m),!0)},"\u0275\u0275classMapInterpolate8":function(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){Ml(sa,bc,mh(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M),!0)},"\u0275\u0275classMapInterpolateV":function(n){Ml(sa,bc,sh(Ze(),n),!0)},"\u0275\u0275styleMap":Fa,"\u0275\u0275styleMapInterpolate1":function(n,t,e){Fa(ah(Ze(),n,t,e))},"\u0275\u0275styleMapInterpolate2":function(n,t,e,i,r){Fa(lh(Ze(),n,t,e,i,r))},"\u0275\u0275styleMapInterpolate3":function(n,t,e,i,r,o,s){Fa(ch(Ze(),n,t,e,i,r,o,s))},"\u0275\u0275styleMapInterpolate4":function(n,t,e,i,r,o,s,a,l){Fa(dh(Ze(),n,t,e,i,r,o,s,a,l))},"\u0275\u0275styleMapInterpolate5":function(n,t,e,i,r,o,s,a,l,c,d){Fa(uh(Ze(),n,t,e,i,r,o,s,a,l,c,d))},"\u0275\u0275styleMapInterpolate6":function(n,t,e,i,r,o,s,a,l,c,d,u,p){Fa(ph(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p))},"\u0275\u0275styleMapInterpolate7":function(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m){Fa(fh(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p,f,m))},"\u0275\u0275styleMapInterpolate8":function(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){Fa(mh(Ze(),n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M))},"\u0275\u0275styleMapInterpolateV":function(n){Fa(sh(Ze(),n))},"\u0275\u0275styleProp":Tt,"\u0275\u0275stylePropInterpolate1":function xU(n,t,e,i,r){return Cl(n,ah(Ze(),t,e,i),r,!1),xU},"\u0275\u0275stylePropInterpolate2":function CU(n,t,e,i,r,o,s){return Cl(n,lh(Ze(),t,e,i,r,o),s,!1),CU},"\u0275\u0275stylePropInterpolate3":function MU(n,t,e,i,r,o,s,a,l){return Cl(n,ch(Ze(),t,e,i,r,o,s,a),l,!1),MU},"\u0275\u0275stylePropInterpolate4":function wU(n,t,e,i,r,o,s,a,l,c,d){return Cl(n,dh(Ze(),t,e,i,r,o,s,a,l,c),d,!1),wU},"\u0275\u0275stylePropInterpolate5":function SU(n,t,e,i,r,o,s,a,l,c,d,u,p){return Cl(n,uh(Ze(),t,e,i,r,o,s,a,l,c,d,u),p,!1),SU},"\u0275\u0275stylePropInterpolate6":function EU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m){return Cl(n,ph(Ze(),t,e,i,r,o,s,a,l,c,d,u,p,f),m,!1),EU},"\u0275\u0275stylePropInterpolate7":function TU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){return Cl(n,fh(Ze(),t,e,i,r,o,s,a,l,c,d,u,p,f,m,b),M,!1),TU},"\u0275\u0275stylePropInterpolate8":function DU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y,x){return Cl(n,mh(Ze(),t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y),x,!1),DU},"\u0275\u0275stylePropInterpolateV":function IU(n,t,e){return Cl(n,sh(Ze(),t),e,!1),IU},"\u0275\u0275classProp":nt,"\u0275\u0275advance":v,"\u0275\u0275template":S,"\u0275\u0275text":T,"\u0275\u0275textInterpolate":bt,"\u0275\u0275textInterpolate1":He,"\u0275\u0275textInterpolate2":lu,"\u0275\u0275textInterpolate3":jM,"\u0275\u0275textInterpolate4":function hU(n,t,e,i,r,o,s,a,l){let c=Ze(),d=dh(c,n,t,e,i,r,o,s,a,l);return d!==Hn&&ld(c,ss(),d),hU},"\u0275\u0275textInterpolate5":function gU(n,t,e,i,r,o,s,a,l,c,d){let u=Ze(),p=uh(u,n,t,e,i,r,o,s,a,l,c,d);return p!==Hn&&ld(u,ss(),p),gU},"\u0275\u0275textInterpolate6":function _U(n,t,e,i,r,o,s,a,l,c,d,u,p){let f=Ze(),m=ph(f,n,t,e,i,r,o,s,a,l,c,d,u,p);return m!==Hn&&ld(f,ss(),m),_U},"\u0275\u0275textInterpolate7":function bU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m){let b=Ze(),M=fh(b,n,t,e,i,r,o,s,a,l,c,d,u,p,f,m);return M!==Hn&&ld(b,ss(),M),bU},"\u0275\u0275textInterpolate8":function vU(n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){let y=Ze(),x=mh(y,n,t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M);return x!==Hn&&ld(y,ss(),x),vU},"\u0275\u0275textInterpolateV":function yU(n){let t=Ze(),e=sh(t,n);return e!==Hn&&ld(t,ss(),e),yU},"\u0275\u0275i18n":qM,"\u0275\u0275i18nAttributes":function(n,t){let e=Ei(),i=iu(e.consts,t);!function(n,t,e){let r=Po().index,o=[];if(n.firstCreatePass&&null===n.data[t]){for(let s=0;s<e.length;s+=2){let a=e[s],l=e[s+1];if(""!==l){if(dce.test(l))throw new Error(`ICU expressions are not supported in attributes. Message: "${l}".`);z_(o,l,r,a,vce(o),null)}}n.data[t]=o}}(e,n+Wr,i)},"\u0275\u0275i18nExp":hb,"\u0275\u0275i18nStart":qU,"\u0275\u0275i18nEnd":YU,"\u0275\u0275i18nApply":YM,"\u0275\u0275i18nPostprocess":XM,"\u0275\u0275resolveWindow":function(n){return n.ownerDocument.defaultView},"\u0275\u0275resolveDocument":hc,"\u0275\u0275resolveBody":function(n){return n.ownerDocument.body},"\u0275\u0275setComponentScope":ib,"\u0275\u0275setNgModuleScope":function(n,t){return ou(()=>{let e=Gm(n,!0);e.declarations=t.declarations||Vi,e.imports=t.imports||Vi,e.exports=t.exports||Vi})},"\u0275\u0275registerNgModuleType":B5,"\u0275\u0275sanitizeHtml":fO,"\u0275\u0275sanitizeStyle":function(n){let t=db();return t?t.sanitize(jr.STYLE,n)||"":xl(n,"Style")?Ds(n):Un(n)},"\u0275\u0275sanitizeResourceUrl":mz,"\u0275\u0275sanitizeScript":function(n){let t=db();if(t)return fH(t.sanitize(jr.SCRIPT,n)||"");if(xl(n,"Script"))return fH(Ds(n));throw new yt(905,!1)},"\u0275\u0275sanitizeUrl":ka,"\u0275\u0275sanitizeUrlOrResourceUrl":function(n,t,e){return function(n,t){return"src"===t&&("embed"===n||"frame"===n||"iframe"===n||"media"===n||"script"===n)||"href"===t&&("base"===n||"link"===n)?mz:ka}(t,e)(n)},"\u0275\u0275trustConstantHtml":function(n){return ih(n[0])},"\u0275\u0275trustConstantResourceUrl":function(n){return function(n){return tz()?.createScriptURL(n)||n}(n[0])},"\u0275\u0275validateIframeAttribute":function(n,t,e){let i=Ze(),r=kr(),o=oa(r,i);if(2===r.type&&"iframe"===t.toLowerCase()){let s=o;throw s.src="",s.srcdoc=ih(""),lO(i[oi],s),new yt(-910,!1)}return n},forwardRef:$n,resolveForwardRef:Ri},P_=null;function sj(n){return!!Gm(n)}var ZC=[],TR=!1;function aj(n){return Array.isArray(n)?n.every(aj):!!Ri(n)}function hde(n,t){let e=$d(t.declarations||Vi),i=Zm(n);e.forEach(r=>{(r=Ri(r)).hasOwnProperty(SM)?lj(Da(r),i):!r.hasOwnProperty(HP)&&!r.hasOwnProperty(zP)&&(r.ngSelectorScope=n)})}function lj(n,t){n.directiveDefs=()=>Array.from(t.compilation.directives).map(e=>e.hasOwnProperty(SM)?Da(e):tu(e)).filter(e=>!!e),n.pipeDefs=()=>Array.from(t.compilation.pipes).map(e=>nu(e)),n.schemas=t.schemas,n.tView=null}function Zm(n){if(sj(n))return function(n){let t=Gm(n,!0);if(null!==t.transitiveCompileScopes)return t.transitiveCompileScopes;let e={schemas:t.schemas||null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set}};return XC(t.imports).forEach(i=>{let r=Zm(i);r.exported.directives.forEach(o=>e.compilation.directives.add(o)),r.exported.pipes.forEach(o=>e.compilation.pipes.add(o))}),XC(t.declarations).forEach(i=>{nu(i)?e.compilation.pipes.add(i):e.compilation.directives.add(i)}),XC(t.exports).forEach(i=>{let r=i;if(sj(r)){let o=Zm(r);o.exported.directives.forEach(s=>{e.compilation.directives.add(s),e.exported.directives.add(s)}),o.exported.pipes.forEach(s=>{e.compilation.pipes.add(s),e.exported.pipes.add(s)})}else nu(r)?e.exported.pipes.add(r):e.exported.directives.add(r)}),t.transitiveCompileScopes=e,e}(n);if(e5(n)){if(null!==(Da(n)||tu(n)))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set([n]),pipes:new Set}};if(null!==nu(n))return{schemas:null,compilation:{directives:new Set,pipes:new Set},exported:{directives:new Set,pipes:new Set([n])}}}throw new Error(`${n.name} does not have a module def (\u0275mod property)`)}function BH(n){return function(n){return void 0!==n.ngModule}(n)?n.ngModule:n}var DR=0;function cj(n,t){let e=null;uj(n,t||{}),Object.defineProperty(n,HP,{get:()=>{if(null===e){let i=dj(n,t||{});e=Ia().compileDirective(eu,i.sourceMapUrl,i.metadata)}return e},configurable:!1})}function dj(n,t){let e=n&&n.name,i=`ng:///${e}/\u0275dir.js`,r=Ia(),o=pj(n,t);return o.typeSourceSpan=r.createParseSourceSpan("Directive",e,i),o.usesInheritance&&fj(n),{metadata:o,sourceMapUrl:i}}function uj(n,t){let e=null;Object.defineProperty(n,ed,{get:()=>{if(null===e){let i=dj(n,t),r=Ia();e=r.compileFactory(eu,`ng:///${n.name}/\u0275fac.js`,{name:i.metadata.name,type:i.metadata.type,typeArgumentCount:0,deps:RM(n),target:r.FactoryTarget.Directive})}return e},configurable:!1})}function yde(n){return Object.getPrototypeOf(n.prototype)===Object.prototype}function pj(n,t){let e=tO(),i=e.ownPropMetadata(n);return{name:n.name,type:n,selector:void 0!==t.selector?t.selector:null,host:t.host||$c,propMetadata:i,inputs:t.inputs||Vi,outputs:t.outputs||Vi,queries:VH(n,i,mj),lifecycle:{usesOnChanges:e.hasLifecycleHook(n,"ngOnChanges")},typeSourceSpan:null,usesInheritance:!yde(n),exportAs:Mde(t.exportAs),providers:t.providers||null,viewQueries:VH(n,i,hj),isStandalone:!!t.standalone,hostDirectives:t.hostDirectives?.map(r=>"function"==typeof r?{directive:r}:r)||null}}function fj(n){let t=Object.prototype,e=Object.getPrototypeOf(n.prototype).constructor;for(;e&&e!==t;)!tu(e)&&!Da(e)&&Sde(e)&&cj(e,null),e=Object.getPrototypeOf(e)}function xde(n){return"string"==typeof n?_j(n):Ri(n)}function Cde(n,t){return{propertyName:n,predicate:xde(t.selector),descendants:t.descendants,first:t.first,read:t.read?t.read:null,static:!!t.static,emitDistinctChangesOnly:!!t.emitDistinctChangesOnly}}function VH(n,t,e){let i=[];for(let r in t)if(t.hasOwnProperty(r)){let o=t[r];o.forEach(s=>{if(e(s)){if(!s.selector)throw new Error(`Can't construct a query for the property "${r}" of "${LP(n)}" since the query selector wasn't defined.`);if(o.some(gj))throw new Error("Cannot combine @Input decorators with query decorators");i.push(Cde(r,s))}})}return i}function Mde(n){return void 0===n?null:_j(n)}function mj(n){let t=n.ngMetadataName;return"ContentChild"===t||"ContentChildren"===t}function hj(n){let t=n.ngMetadataName;return"ViewChild"===t||"ViewChildren"===t}function gj(n){return"Input"===n.ngMetadataName}function _j(n){return n.split(",").map(t=>t.trim())}var wde=["ngOnChanges","ngOnInit","ngOnDestroy","ngDoCheck","ngAfterViewInit","ngAfterViewChecked","ngAfterContentInit","ngAfterContentChecked"];function Sde(n){let t=tO();if(wde.some(i=>t.hasLifecycleHook(n,i)))return!0;let e=t.propMetadata(n);for(let i in e){let r=e[i];for(let o=0;o<r.length;o++){let s=r[o],a=s.ngMetadataName;if(gj(s)||mj(s)||hj(s)||"Output"===a||"HostBinding"===a||"HostListener"===a)return!0}}return!1}function HH(n,t){return{type:n,name:n.name,pipeName:t.name,pure:void 0===t.pure||t.pure,isStandalone:!!t.standalone}}var Tde=ob("Directive",(n={})=>n,void 0,void 0,(n,t)=>cj(n,t));function yM(...n){}ob("Component",(n={})=>({changeDetection:k_.Default,...n}),Tde,void 0,(n,t)=>function(n,t){let e=null;(function(n,t){L5(t)&&(X_.set(n,t),N5.add(n))})(n,t),uj(n,t),Object.defineProperty(n,SM,{get:()=>{if(null===e){let i=Ia();if(L5(t)){let c=[`Component '${n.name}' is not resolved:`];throw t.templateUrl&&c.push(` - templateUrl: ${t.templateUrl}`),t.styleUrls&&t.styleUrls.length&&c.push(` - styleUrls: ${JSON.stringify(t.styleUrls)}`),c.push("Did you run and wait for 'resolveComponentResources()'?"),new Error(c.join("\n"))}let o=t.preserveWhitespaces;void 0===o&&(o=null!==P_&&void 0!==P_.preserveWhitespaces&&P_.preserveWhitespaces);let s=t.encapsulation;void 0===s&&(s=null!==P_&&void 0!==P_.defaultEncapsulation?P_.defaultEncapsulation:ra.Emulated);let a=t.templateUrl||`ng:///${n.name}/template.html`,l={...pj(n,t),typeSourceSpan:i.createParseSourceSpan("Component",n.name,a),template:t.template||"",preserveWhitespaces:o,styles:t.styles||Vi,animations:t.animations,declarations:[],changeDetection:t.changeDetection,encapsulation:s,interpolation:t.interpolation,viewProviders:t.viewProviders||null};DR++;try{if(l.usesInheritance&&fj(n),e=i.compileComponent(eu,a,l),t.standalone){let c=$d(t.imports||Vi),{directiveDefs:d,pipeDefs:u}=function(n,t){let e=null,i=null;return{directiveDefs:()=>{if(null===e){e=[Da(n)];let s=new Set;for(let a of t){let l=Ri(a);if(!s.has(l))if(s.add(l),Gm(l)){let c=Zm(l);for(let d of c.exported.directives){let u=Da(d)||tu(d);u&&!s.has(d)&&(s.add(d),e.push(u))}}else{let c=Da(l)||tu(l);c&&e.push(c)}}}return e},pipeDefs:()=>{if(null===i){i=[];let s=new Set;for(let a of t){let l=Ri(a);if(!s.has(l))if(s.add(l),Gm(l)){let c=Zm(l);for(let d of c.exported.pipes){let u=nu(d);u&&!s.has(d)&&(s.add(d),i.push(u))}}else{let c=nu(l);c&&i.push(c)}}}return i}}}(n,c);e.directiveDefs=d,e.pipeDefs=u,e.dependencies=()=>c.map(Ri)}}finally{DR--}if(0===DR&&function(){if(!TR){TR=!0;try{for(let n=ZC.length-1;n>=0;n--){let{moduleType:t,ngModule:e}=ZC[n];e.declarations&&e.declarations.every(aj)&&(ZC.splice(n,1),hde(t,e))}}finally{TR=!1}}}(),function(n){return void 0!==n.ngSelectorScope}(n)){let c=Zm(n.ngSelectorScope);lj(e,c)}if(t.schemas){if(!t.standalone)throw new Error(`The 'schemas' was specified for the ${LP(n)} but is only valid on a component that is standalone.`);e.schemas=t.schemas}else t.standalone&&(e.schemas=[])}return e},configurable:!1})}(n,t)),ob("Pipe",n=>({pure:!0,...n}),void 0,void 0,(n,t)=>function(n,t){let e=null,i=null;Object.defineProperty(n,ed,{get:()=>{if(null===i){let r=HH(n,t),o=Ia();i=o.compileFactory(eu,`ng:///${r.name}/\u0275fac.js`,{name:r.name,type:r.type,typeArgumentCount:0,deps:RM(n),target:o.FactoryTarget.Pipe})}return i},configurable:!1}),Object.defineProperty(n,zP,{get:()=>{if(null===e){let r=HH(n,t);e=Ia().compilePipe(eu,`ng:///${r.name}/\u0275pipe.js`,r)}return e},configurable:!1})}(n,t)),au("Input",n=>({bindingPropertyName:n})),au("Output",n=>({bindingPropertyName:n})),au("HostBinding",n=>({hostPropertyName:n})),au("HostListener",(n,t)=>({eventName:n,args:t})),ob("NgModule",n=>n,void 0,void 0,(n,t)=>function(n,t={}){(function(n,t,e=!1){let i=$d(t.declarations||Vi),r=null;Object.defineProperty(n,$H,{configurable:!0,get:()=>(null===r&&(r=Ia().compileNgModule(eu,`ng:///${n.name}/\u0275mod.js`,{type:n,bootstrap:$d(t.bootstrap||Vi).map(Ri),declarations:i.map(Ri),imports:$d(t.imports||Vi).map(Ri).map(BH),exports:$d(t.exports||Vi).map(Ri).map(BH),schemas:t.schemas?$d(t.schemas):null,id:t.id||null}),r.schemas||(r.schemas=[])),r)});let o=null;Object.defineProperty(n,ed,{get:()=>{if(null===o){let a=Ia();o=a.compileFactory(eu,`ng:///${n.name}/\u0275fac.js`,{name:n.name,type:n,deps:RM(n),target:a.FactoryTarget.NgModule,typeArgumentCount:0})}return o},configurable:!1});let s=null;Object.defineProperty(n,RR,{get:()=>{if(null===s){let a={name:n.name,type:n,providers:t.providers||Vi,imports:[(t.imports||Vi).map(Ri),(t.exports||Vi).map(Ri)]};s=Ia().compileInjector(eu,`ng:///${n.name}/\u0275inj.js`,a)}return s},configurable:!1})})(n,t),void 0!==t.id&&B5(n,t.id),function(n,t){ZC.push({moduleType:n,ngModule:t})}(n,t)}(n,t));var OO=new ie("Application Initializer"),ZM=(()=>{class n{constructor(e){this.appInits=e,this.resolve=yM,this.reject=yM,this.initialized=!1,this.done=!1,this.donePromise=new Promise((i,r)=>{this.resolve=i,this.reject=r})}runInitializers(){if(this.initialized)return;let e=[],i=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let r=0;r<this.appInits.length;r++){let o=this.appInits[r]();if(hh(o))e.push(o);else if(DO(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}Promise.all(e).then(()=>{i()}).catch(r=>{this.reject(r)}),0===e.length&&i(),this.initialized=!0}}return n.\u0275fac=function(e){return new(e||n)(k(OO,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Yp=new ie("AppId",{providedIn:"root",factory:function(){return`${IR()}${IR()}${IR()}`}});function IR(){return String.fromCharCode(97+Math.floor(25*Math.random()))}var kO=new ie("Platform Initializer"),vc=new ie("Platform ID",{providedIn:"platform",factory:()=>"unknown"}),hi=(new ie("Application Packages Root URL"),new ie("AnimationModuleType")),cd=new ie("LocaleId",{providedIn:"root",factory:()=>ai(cd,xi.Optional|xi.SkipSelf)||typeof $localize<"u"&&$localize.locale||_M}),Pde=(new ie("DefaultCurrencyCode",{providedIn:"root",factory:()=>"USD"}),new ie("Translations"),new ie("TranslationsFormat"),new ie("compilerOptions"),Promise.resolve(0));function DP(n){typeof Zone>"u"?Pde.then(()=>{n&&n.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",n)}var at=class{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1,shouldCoalesceRunChangeDetection:i=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new F(!1),this.onMicrotaskEmpty=new F(!1),this.onStable=new F(!1),this.onError=new F(!1),typeof Zone>"u")throw new yt(908,!1);Zone.assertZonePatched();let r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!i&&e,r.shouldCoalesceRunChangeDetection=i,r.lastRequestAnimationFrameId=-1,r.nativeRequestAnimationFrame=function(){let n=Ur.requestAnimationFrame,t=Ur.cancelAnimationFrame;if(typeof Zone<"u"&&n&&t){let e=n[Zone.__symbol__("OriginalDelegate")];e&&(n=e);let i=t[Zone.__symbol__("OriginalDelegate")];i&&(t=i)}return{nativeRequestAnimationFrame:n,nativeCancelAnimationFrame:t}}().nativeRequestAnimationFrame,function(n){let t=()=>{!function(n){n.isCheckStableRunning||-1!==n.lastRequestAnimationFrameId||(n.lastRequestAnimationFrameId=n.nativeRequestAnimationFrame.call(Ur,()=>{n.fakeTopEventTask||(n.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{n.lastRequestAnimationFrameId=-1,IP(n),n.isCheckStableRunning=!0,FO(n),n.isCheckStableRunning=!1},void 0,()=>{},()=>{})),n.fakeTopEventTask.invoke()}),IP(n))}(n)};n._inner=n._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(e,i,r,o,s,a)=>{try{return zH(n),e.invokeTask(r,o,s,a)}finally{(n.shouldCoalesceEventChangeDetection&&"eventTask"===o.type||n.shouldCoalesceRunChangeDetection)&&t(),UH(n)}},onInvoke:(e,i,r,o,s,a,l)=>{try{return zH(n),e.invoke(r,o,s,a,l)}finally{n.shouldCoalesceRunChangeDetection&&t(),UH(n)}},onHasTask:(e,i,r,o)=>{e.hasTask(r,o),i===r&&("microTask"==o.change?(n._hasPendingMicrotasks=o.microTask,IP(n),FO(n)):"macroTask"==o.change&&(n.hasPendingMacrotasks=o.macroTask))},onHandleError:(e,i,r,o)=>(e.handleError(r,o),n.runOutsideAngular(()=>n.onError.emit(o)),!1)})}(r)}static isInAngularZone(){return typeof Zone<"u"&&!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!at.isInAngularZone())throw new yt(909,!1)}static assertNotInAngularZone(){if(at.isInAngularZone())throw new yt(909,!1)}run(t,e,i){return this._inner.run(t,e,i)}runTask(t,e,i,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,kde,yM,yM);try{return o.runTask(s,e,i)}finally{o.cancelTask(s)}}runGuarded(t,e,i){return this._inner.runGuarded(t,e,i)}runOutsideAngular(t){return this._outer.run(t)}},kde={};function FO(n){if(0==n._nesting&&!n.hasPendingMicrotasks&&!n.isStable)try{n._nesting++,n.onMicrotaskEmpty.emit(null)}finally{if(n._nesting--,!n.hasPendingMicrotasks)try{n.runOutsideAngular(()=>n.onStable.emit(null))}finally{n.isStable=!0}}}function IP(n){n.hasPendingMicrotasks=!!(n._hasPendingMicrotasks||(n.shouldCoalesceEventChangeDetection||n.shouldCoalesceRunChangeDetection)&&-1!==n.lastRequestAnimationFrameId)}function zH(n){n._nesting++,n.isStable&&(n.isStable=!1,n.onUnstable.emit(null))}function UH(n){n._nesting--,FO(n)}var LO,NO=new ie(""),vb=new ie(""),KM=(()=>{class n{constructor(e,i,r){this._ngZone=e,this.registry=i,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,LO||(function(n){LO=n}(r),r.addToWindow(i)),this._watchAngularEvents(),e.run(()=>{this.taskTrackingZone=typeof Zone>"u"?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{at.assertNotInAngularZone(),DP(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())DP(()=>{for(;0!==this._callbacks.length;){let e=this._callbacks.pop();clearTimeout(e.timeoutId),e.doneCb(this._didWork)}this._didWork=!1});else{let e=this.getPendingTasks();this._callbacks=this._callbacks.filter(i=>!i.updateCb||!i.updateCb(e)||(clearTimeout(i.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(e=>({source:e.source,creationLocation:e.creationLocation,data:e.data})):[]}addCallback(e,i,r){let o=-1;i&&i>0&&(o=setTimeout(()=>{this._callbacks=this._callbacks.filter(s=>s.timeoutId!==o),e(this._didWork,this.getPendingTasks())},i)),this._callbacks.push({doneCb:e,timeoutId:o,updateCb:r})}whenStable(e,i,r){if(r&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/plugins/task-tracking" loaded?');this.addCallback(e,i,r),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}registerApplication(e){this.registry.registerApplication(e,this)}unregisterApplication(e){this.registry.unregisterApplication(e)}findProviders(e,i,r){return[]}}return n.\u0275fac=function(e){return new(e||n)(k(at),k(JM),k(vb))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),JM=(()=>{class n{constructor(){this._applications=new Map}registerApplication(e,i){this._applications.set(e,i)}unregisterApplication(e){this._applications.delete(e)}unregisterAllApplications(){this._applications.clear()}getTestability(e){return this._applications.get(e)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(e,i=!0){return LO?.findTestabilityInTree(this,e,i)??null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})(),U_=null,bj=new ie("AllowMultipleToken"),vj=new ie("PlatformDestroyListeners"),Bde=new ie("appBootstrapListener");function BO(n,t,e=[]){let i=`Platform: ${t}`,r=new ie(i);return(o=[])=>{let s=yj();if(!s||s.injector.get(bj,!1)){let a=[...e,...o,{provide:r,useValue:!0}];n?n(a):function(n){if(U_&&!U_.get(bj,!1))throw new yt(400,!1);U_=n;let t=n.get(xj);(function(n){let t=n.get(kO,null);t&&t.forEach(e=>e())})(n)}(function(n=[],t){return Mi.create({name:t,providers:[{provide:NM,useValue:"platform"},{provide:vj,useValue:new Set([()=>U_=null])},...n]})}(a,i))}return function(n){let t=yj();if(!t)throw new yt(401,!1);return t}()}}function yj(){return U_?.get(xj)??null}var xj=(()=>{class n{constructor(e){this._injector=e,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(e,i){let r=function(n,t){let e;return e="noop"===n?new class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new F,this.onMicrotaskEmpty=new F,this.onStable=new F,this.onError=new F}run(t,e,i){return t.apply(e,i)}runGuarded(t,e,i){return t.apply(e,i)}runOutsideAngular(t){return t()}runTask(t,e,i,r){return t.apply(e,i)}}:("zone.js"===n?void 0:n)||new at(t),e}(i?.ngZone,function(n){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:!(!n||!n.ngZoneEventCoalescing)||!1,shouldCoalesceRunChangeDetection:!(!n||!n.ngZoneRunCoalescing)||!1}}(i)),o=[{provide:at,useValue:r}];return r.run(()=>{let s=Mi.create({providers:o,parent:this.injector,name:e.moduleType.name}),a=e.create(s),l=a.injector.get(rs,null);if(!l)throw new yt(402,!1);return r.runOutsideAngular(()=>{let c=r.onError.subscribe({next:d=>{l.handleError(d)}});a.onDestroy(()=>{KC(this._modules,a),c.unsubscribe()})}),function(n,t,e){try{let i=e();return hh(i)?i.catch(r=>{throw t.runOutsideAngular(()=>n.handleError(r)),r}):i}catch(i){throw t.runOutsideAngular(()=>n.handleError(i)),i}}(l,r,()=>{let c=a.injector.get(ZM);return c.runInitializers(),c.donePromise.then(()=>(function(n){(function(n,t){null==n&&QH("Expected localeId to be defined",n,null,"!=")})(n),"string"==typeof n&&(OU=n.toLowerCase().replace(/_/g,"-"))}(a.injector.get(cd,_M)||_M),this._moduleDoBootstrap(a),a))})})}bootstrapModule(e,i=[]){let r=Cj({},i);return function(n,t,e){let i=new wP(e);return Promise.resolve(i)}(0,0,e).then(o=>this.bootstrapModuleFactory(o,r))}_moduleDoBootstrap(e){let i=e.injector.get(yc);if(e._bootstrapComponents.length>0)e._bootstrapComponents.forEach(r=>i.bootstrap(r));else{if(!e.instance.ngDoBootstrap)throw new yt(-403,!1);e.instance.ngDoBootstrap(i)}this._modules.push(e)}onDestroy(e){this._destroyListeners.push(e)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new yt(404,!1);this._modules.slice().forEach(i=>i.destroy()),this._destroyListeners.forEach(i=>i());let e=this._injector.get(vj,null);e&&(e.forEach(i=>i()),e.clear()),this._destroyed=!0}get destroyed(){return this._destroyed}}return n.\u0275fac=function(e){return new(e||n)(k(Mi))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"platform"}),n})();function Cj(n,t){return Array.isArray(t)?t.reduce(Cj,n):{...n,...t}}var yc=(()=>{class n{get destroyed(){return this._destroyed}get injector(){return this._injector}constructor(e,i,r){this._zone=e,this._injector=i,this._exceptionHandler=r,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._stable=!0,this._destroyed=!1,this._destroyListeners=[],this.componentTypes=[],this.components=[],this._onMicrotaskEmptySubscription=this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});let o=new Kt(a=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{a.next(this._stable),a.complete()})}),s=new Kt(a=>{let l;this._zone.runOutsideAngular(()=>{l=this._zone.onStable.subscribe(()=>{at.assertNotInAngularZone(),DP(()=>{!this._stable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks&&(this._stable=!0,a.next(!0))})})});let c=this._zone.onUnstable.subscribe(()=>{at.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{a.next(!1)}))});return()=>{l.unsubscribe(),c.unsubscribe()}});this.isStable=tn(o,s.pipe(Cs()))}bootstrap(e,i){let s,r=e instanceof pM;if(!this._injector.get(ZM).done)throw!r&&e5(e),new yt(405,false);s=r?e:this._injector.get(fo).resolveComponentFactory(e),this.componentTypes.push(s.componentType);let a=function(n){return n.isBoundToModule}(s)?void 0:this._injector.get(ru),c=s.create(Mi.NULL,[],i||s.selector,a),d=c.location.nativeElement,u=c.injector.get(NO,null);return u?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),KC(this.components,c),u?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){if(this._runningTick)throw new yt(101,!1);try{this._runningTick=!0;for(let e of this._views)e.detectChanges()}catch(e){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(e))}finally{this._runningTick=!1}}attachView(e){let i=e;this._views.push(i),i.attachToAppRef(this)}detachView(e){let i=e;KC(this._views,i),i.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);let i=this._injector.get(Bde,[]);i.push(...this._bootstrapListeners),i.forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy()),this._onMicrotaskEmptySubscription.unsubscribe()}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>KC(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new yt(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}}return n.\u0275fac=function(e){return new(e||n)(k(at),k(pc),k(rs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function KC(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var $t=(()=>{class n{}return n.__NG_ELEMENT_ID__=Qde,n})();function Qde(n){return function(n,t,e){if(TM(n)&&!e){let i=id(n.index,t);return new jp(i,i)}return 47&n.type?new jp(t[bl],t):null}(Po(),Ze(),16==(16&n))}var xM=class{constructor(){}supports(t){return Uz(t)}create(t){return new RP(t)}},Kde=(n,t)=>t,RP=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Kde}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,i=this._removalsHead,r=0,o=null;for(;e||i;){let s=!i||e&&e.currentIndex<GH(i,r,o)?e:i,a=GH(s,r,o),l=s.currentIndex;if(s===i)r--,i=i._nextRemoved;else if(e=e._next,null==s.previousIndex)r++;else{o||(o=[]);let c=a-r,d=l-r;if(c!=d){for(let p=0;p<c;p++){let f=p<o.length?o[p]:o[p]=0,m=f+p;d<=m&&m<c&&(o[p]=f+1)}o[s.previousIndex]=d-c}}a!==l&&t(s,a,l)}}forEachPreviousItem(t){let e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachMovedItem(t){let e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}forEachIdentityChange(t){let e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)}diff(t){if(null==t&&(t=[]),!Uz(t))throw new yt(900,!1);return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let r,o,s,e=this._itHead,i=!1;if(Array.isArray(t)){this.length=t.length;for(let a=0;a<this.length;a++)o=t[a],s=this._trackByFn(a,o),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,o,s,a)),Object.is(e.item,o)||this._addIdentityChange(e,o)):(e=this._mismatch(e,o,s,a),i=!0),e=e._next}else r=0,function(n,t){if(Array.isArray(n))for(let e=0;e<n.length;e++)t(n[e]);else{let i,e=n[Symbol.iterator]();for(;!(i=e.next()).done;)t(i.value)}}(t,a=>{s=this._trackByFn(r,a),null!==e&&Object.is(e.trackById,s)?(i&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)):(e=this._mismatch(e,a,s,r),i=!0),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,i,r){let o;return null===t?o=this._itTail:(o=t._prev,this._remove(t)),null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(i,r))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new PP(e,i),o,r),t}_verifyReinsertion(t,e,i,r){let o=null===this._unlinkedRecords?null:this._unlinkedRecords.get(i,null);return null!==o?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;null!==t;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,i){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return null===r?this._removalsHead=o:r._nextRemoved=o,null===o?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,i),this._addToMoves(t,i),t}_moveAfter(t,e,i){return this._unlink(t),this._insertAfter(t,e,i),this._addToMoves(t,i),t}_addAfter(t,e,i){return this._insertAfter(t,e,i),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,i){let r=null===e?this._itHead:e._next;return t._next=r,t._prev=e,null===r?this._itTail=t:r._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new CM),this._linkedRecords.put(t),t.currentIndex=i,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);let e=t._prev,i=t._next;return null===e?this._itHead=i:e._next=i,null===i?this._itTail=e:i._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new CM),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}},PP=class{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},CM=class{constructor(){this.map=new Map}put(t){let e=t.trackById,i=this.map.get(e);i||(i=new class{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let i;for(i=this._head;null!==i;i=i._nextDup)if((null===e||e<=i.currentIndex)&&Object.is(i.trackById,t))return i;return null}remove(t){let e=t._prevDup,i=t._nextDup;return null===e?this._head=i:e._nextDup=i,null===i?this._tail=e:i._prevDup=e,null===this._head}},this.map.set(e,i)),i.add(t)}get(t,e){let r=this.map.get(t);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}};function GH(n,t,e){let i=n.previousIndex;if(null===i)return i;let r=0;return e&&i<e.length&&(r=e[i]),i+t+r}var MM=class{constructor(){}supports(t){return t instanceof Map||EO(t)}create(){return new kP}},kP=class{constructor(){this._records=new Map,this._mapHead=null,this._appendAfter=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}get isDirty(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead}forEachItem(t){let e;for(e=this._mapHead;null!==e;e=e._next)t(e)}forEachPreviousItem(t){let e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)}forEachChangedItem(t){let e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)}forEachAddedItem(t){let e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)}forEachRemovedItem(t){let e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)}diff(t){if(t){if(!(t instanceof Map||EO(t)))throw new yt(900,!1)}else t=new Map;return this.check(t)?this:null}onDestroy(){}check(t){this._reset();let e=this._mapHead;if(this._appendAfter=null,this._forEach(t,(i,r)=>{if(e&&e.key===r)this._maybeAddToChanges(e,i),this._appendAfter=e,e=e._next;else{let o=this._getOrCreateRecordForKey(r,i);e=this._insertBeforeOrAppend(e,o)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let i=e;null!==i;i=i._nextRemoved)i===this._mapHead&&(this._mapHead=null),this._records.delete(i.key),i._nextRemoved=i._next,i.previousValue=i.currentValue,i.currentValue=null,i._prev=null,i._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){let i=t._prev;return e._next=t,e._prev=i,t._prev=e,i&&(i._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){let r=this._records.get(t);this._maybeAddToChanges(r,e);let o=r._prev,s=r._next;return o&&(o._next=s),s&&(s._prev=o),r._next=null,r._prev=null,r}let i=new FP(t);return this._records.set(t,i),i.currentValue=e,this._addToAdditions(i),i}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(i=>e(t[i],i))}},FP=class{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}};function WH(){return new wl([new xM])}var wl=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(null!=i){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||WH()),deps:[[n,new sd,new Ts]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(null!=i)return i;throw new yt(901,!1)}}return n.\u0275prov=ue({token:n,providedIn:"root",factory:WH}),n})();function qH(){return new xb([new MM])}var xb=(()=>{class n{constructor(e){this.factories=e}static create(e,i){if(i){let r=i.factories.slice();e=e.concat(r)}return new n(e)}static extend(e){return{provide:n,useFactory:i=>n.create(e,i||qH()),deps:[[n,new sd,new Ts]]}}find(e){let i=this.factories.find(r=>r.supports(e));if(i)return i;throw new yt(901,!1)}}return n.\u0275prov=ue({token:n,providedIn:"root",factory:qH}),n})(),Jde=[new MM],$de=[new xM],Mj=(new wl($de),new xb(Jde),BO(null,"core",[])),wj=(()=>{class n{constructor(e){}}return n.\u0275fac=function(e){return new(e||n)(k(yc))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})();function $M(n){return"boolean"==typeof n?n:null!=n&&"false"!==n}var eue=":",du=class{static zero(){return new du([0])}static one(){return new du([1])}constructor(t){this.digits=t}clone(){return new du(this.digits.slice())}add(t){let e=this.clone();return e.addToSelf(t),e}addToSelf(t){let e=Math.max(this.digits.length,t.digits.length),i=0;for(let r=0;r<e;r++){let o=i;r<this.digits.length&&(o+=this.digits[r]),r<t.digits.length&&(o+=t.digits[r]),o>=10?(this.digits[r]=o-10,i=1):(this.digits[r]=o,i=0)}i>0&&(this.digits[e]=1)}toString(){let t="";for(let e=this.digits.length-1;e>=0;e--)t+=this.digits[e];return t}},ew=class{constructor(t){this.powerOfTwos=[t]}getValue(){return this.powerOfTwos[0]}multiplyBy(t){let e=du.zero();return this.multiplyByAndAddTo(t,e),e}multiplyByAndAddTo(t,e){for(let i=0;0!==t;t>>>=1,i++)if(1&t){let r=this.getMultipliedByPowerOfTwo(i);e.addToSelf(r)}}getMultipliedByPowerOfTwo(t){for(let e=this.powerOfTwos.length;e<=t;e++){let i=this.powerOfTwos[e-1];this.powerOfTwos[e]=i.add(i)}return this.powerOfTwos[t]}};new class{visitText(t,e){return t.value}visitContainer(t,e){return`[${t.children.map(i=>i.visit(this)).join(", ")}]`}visitIcu(t,e){let i=Object.keys(t.cases).map(r=>`${r} {${t.cases[r].visit(this)}}`);return`{${t.expression}, ${t.type}, ${i.join(", ")}}`}visitTagPlaceholder(t,e){return t.isVoid?`<ph tag name="${t.startName}"/>`:`<ph tag name="${t.startName}">${t.children.map(i=>i.visit(this)).join(", ")}</ph name="${t.closeName}">`}visitPlaceholder(t,e){return t.value?`<ph name="${t.name}">${t.value}</ph>`:`<ph name="${t.name}"/>`}visitIcuPlaceholder(t,e){return`<ph icu name="${t.name}">${t.value.visit(this)}</ph>`}},new class{constructor(t){this.base=t,this.exponents=[new ew(du.one())]}toThePowerOf(t){for(let e=this.exponents.length;e<=t;e++){let i=this.exponents[e-1].multiplyBy(this.base);this.exponents[e]=new ew(i)}return this.exponents[t]}}(256);var tw=function(n,...t){if(tw.translate){let i=tw.translate(n,t);n=i[0],t=i[1]}let e=Sj(n[0],n.raw[0]);for(let i=1;i<n.length;i++)e+=t[i-1]+Sj(n[i],n.raw[i]);return e},nue=":";function Sj(n,t){return t.charAt(0)===nue?n.substring(function(n,t){for(let e=1,i=1;e<n.length;e++,i++)if("\\"===t[i])i++;else if(n[e]===eue)return e;throw new Error(`Unterminated $localize metadata block in "${t}".`)}(n,t)+1):n}(()=>typeof globalThis<"u"&&globalThis||typeof global<"u"&&global||typeof window<"u"&&window||typeof self<"u"&&typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&self)().$localize=tw;var YO=null;function Tl(){return YO}var dw=class{},Lt=new ie("DocumentToken"),Lj=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(){return k(Bj)},providedIn:"platform"}),n})();new ie("Location Initialized");var Bj=(()=>{class n extends Lj{constructor(e){super(),this._doc=e,this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Tl().getBaseHref(this._doc)}onPopState(e){let i=Tl().getGlobalEventTarget(this._doc,"window");return i.addEventListener("popstate",e,!1),()=>i.removeEventListener("popstate",e)}onHashChange(e){let i=Tl().getGlobalEventTarget(this._doc,"window");return i.addEventListener("hashchange",e,!1),()=>i.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,i,r){Tj()?this._history.pushState(e,i,r):this._location.hash=r}replaceState(e,i,r){Tj()?this._history.replaceState(e,i,r):this._location.hash=r}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:function(){return new Bj(k(Lt))},providedIn:"platform"}),n})();function Tj(){return!!window.history.pushState}function Vj(n,t){if(0==n.length)return t;if(0==t.length)return n;let e=0;return n.endsWith("/")&&e++,t.startsWith("/")&&e++,2==e?n+t.substring(1):1==e?n+t:n+"/"+t}function Dj(n){let t=n.match(/#|\?|$/),e=t&&t.index||n.length;return n.slice(0,e-("/"===n[e-1]?1:0))+n.slice(e)}function Xp(n){return n&&"?"!==n[0]?"?"+n:n}var JO=(()=>{class n{historyGo(e){throw new Error("Not implemented")}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(){return ai(sue)},providedIn:"root"}),n})(),oue=new ie("appBaseHref"),sue=(()=>{class n extends JO{constructor(e,i){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=i??this._platformLocation.getBaseHrefFromDOM()??ai(Lt).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return Vj(this._baseHref,e)}path(e=!1){let i=this._platformLocation.pathname+Xp(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${i}${r}`:i}pushState(e,i,r,o){let s=this.prepareExternalUrl(r+Xp(o));this._platformLocation.pushState(e,i,s)}replaceState(e,i,r,o){let s=this.prepareExternalUrl(r+Xp(o));this._platformLocation.replaceState(e,i,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}}return n.\u0275fac=function(e){return new(e||n)(k(Lj),k(oue,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),wb=(()=>{class n{constructor(e){this._subject=new F,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;let i=this._locationStrategy.getBaseHref();this._basePath=function(n){if(new RegExp("^(https?:)?//").test(n)){let[,e]=n.split(/\/\/[^\/]+/);return e}return n}(Dj(Ij(i))),this._locationStrategy.onPopState(r=>{this._subject.emit({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,i=""){return this.path()==this.normalize(e+Xp(i))}normalize(e){return n.stripTrailingSlash(function(n,t){if(!n||!t.startsWith(n))return t;let e=t.substring(n.length);return""===e||["/",";","?","#"].includes(e[0])?e:t}(this._basePath,Ij(e)))}prepareExternalUrl(e){return e&&"/"!==e[0]&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,i="",r=null){this._locationStrategy.pushState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Xp(i)),r)}replaceState(e,i="",r=null){this._locationStrategy.replaceState(r,"",e,i),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+Xp(i)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(i=>{this._notifyUrlChangeListeners(i.url,i.state)})),()=>{let i=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(i,1),0===this._urlChangeListeners.length&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",i){this._urlChangeListeners.forEach(r=>r(e,i))}subscribe(e,i,r){return this._subject.subscribe({next:e,error:i,complete:r})}}return n.normalizeQueryParams=Xp,n.joinWithSlash=Vj,n.stripTrailingSlash=Dj,n.\u0275fac=function(e){return new(e||n)(k(JO))},n.\u0275prov=ue({token:n,factory:function(){return new wb(k(JO))},providedIn:"root"}),n})();function Ij(n){return n.replace(/\/index.html$/,"")}var lw=(()=>{return(n=lw||(lw={}))[n.Decimal=0]="Decimal",n[n.Percent=1]="Percent",n[n.Currency=2]="Currency",n[n.Scientific=3]="Scientific",lw;var n})(),ko=(()=>{return(n=ko||(ko={}))[n.Format=0]="Format",n[n.Standalone=1]="Standalone",ko;var n})(),qi=(()=>{return(n=qi||(qi={}))[n.Narrow=0]="Narrow",n[n.Abbreviated=1]="Abbreviated",n[n.Wide=2]="Wide",n[n.Short=3]="Short",qi;var n})(),as=(()=>{return(n=as||(as={}))[n.Short=0]="Short",n[n.Medium=1]="Medium",n[n.Long=2]="Long",n[n.Full=3]="Full",as;var n})(),Go=(()=>{return(n=Go||(Go={}))[n.Decimal=0]="Decimal",n[n.Group=1]="Group",n[n.List=2]="List",n[n.PercentSign=3]="PercentSign",n[n.PlusSign=4]="PlusSign",n[n.MinusSign=5]="MinusSign",n[n.Exponential=6]="Exponential",n[n.SuperscriptingExponent=7]="SuperscriptingExponent",n[n.PerMille=8]="PerMille",n[n.Infinity=9]="Infinity",n[n.NaN=10]="NaN",n[n.TimeSeparator=11]="TimeSeparator",n[n.CurrencyDecimal=12]="CurrencyDecimal",n[n.CurrencyGroup=13]="CurrencyGroup",Go;var n})();function nw(n,t){return Na(Rs(n)[gr.DateFormat],t)}function iw(n,t){return Na(Rs(n)[gr.TimeFormat],t)}function rw(n,t){return Na(Rs(n)[gr.DateTimeFormat],t)}function ud(n,t){let e=Rs(n),i=e[gr.NumberSymbols][t];if(typeof i>"u"){if(t===Go.CurrencyDecimal)return e[gr.NumberSymbols][Go.Decimal];if(t===Go.CurrencyGroup)return e[gr.NumberSymbols][Go.Group]}return i}function Hj(n){if(!n[gr.ExtraData])throw new Error(`Missing extra locale data for the locale "${n[gr.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Na(n,t){for(let e=t;e>-1;e--)if(typeof n[e]<"u")return n[e];throw new Error("Locale data API: locale data undefined")}function zO(n){let[t,e]=n.split(":");return{hours:+t,minutes:+e}}var bue=/^(\d{4,})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,Cb={},vue=/((?:[^BEGHLMOSWYZabcdhmswyz']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|c{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]*)/,El=(()=>{return(n=El||(El={}))[n.Short=0]="Short",n[n.ShortGMT=1]="ShortGMT",n[n.Long=2]="Long",n[n.Extended=3]="Extended",El;var n})(),Ii=(()=>{return(n=Ii||(Ii={}))[n.FullYear=0]="FullYear",n[n.Month=1]="Month",n[n.Date=2]="Date",n[n.Hours=3]="Hours",n[n.Minutes=4]="Minutes",n[n.Seconds=5]="Seconds",n[n.FractionalSeconds=6]="FractionalSeconds",n[n.Day=7]="Day",Ii;var n})(),Di=(()=>{return(n=Di||(Di={}))[n.DayPeriods=0]="DayPeriods",n[n.Days=1]="Days",n[n.Months=2]="Months",n[n.Eras=3]="Eras",Di;var n})();function yue(n,t,e,i){let r=function(n){if(Aj(n))return n;if("number"==typeof n&&!isNaN(n))return new Date(n);if("string"==typeof n){if(n=n.trim(),/^(\d{4}(-\d{1,2}(-\d{1,2})?)?)$/.test(n)){let[r,o=1,s=1]=n.split("-").map(a=>+a);return uw(r,o-1,s)}let i,e=parseFloat(n);if(!isNaN(n-e))return new Date(e);if(i=n.match(bue))return function(n){let t=new Date(0),e=0,i=0,r=n[8]?t.setUTCFullYear:t.setFullYear,o=n[8]?t.setUTCHours:t.setHours;n[9]&&(e=Number(n[9]+n[10]),i=Number(n[9]+n[11])),r.call(t,Number(n[1]),Number(n[2])-1,Number(n[3]));let s=Number(n[4]||0)-e,a=Number(n[5]||0)-i,l=Number(n[6]||0),c=Math.floor(1e3*parseFloat("0."+(n[7]||0)));return o.call(t,s,a,l,c),t}(i)}let t=new Date(n);if(!Aj(t))throw new Error(`Unable to convert "${n}" into a date`);return t}(n);t=dd(e,t)||t;let a,s=[];for(;t;){if(a=vue.exec(t),!a){s.push(t);break}{s=s.concat(a.slice(1));let d=s.pop();if(!d)break;t=d}}let l=r.getTimezoneOffset();i&&(l=Uj(i,l),r=function(n,t,e){let r=n.getTimezoneOffset();return function(n,t){return(n=new Date(n.getTime())).setMinutes(n.getMinutes()+t),n}(n,-1*(Uj(t,r)-r))}(r,i));let c="";return s.forEach(d=>{let u=function(n){if(jO[n])return jO[n];let t;switch(n){case"G":case"GG":case"GGG":t=or(Di.Eras,qi.Abbreviated);break;case"GGGG":t=or(Di.Eras,qi.Wide);break;case"GGGGG":t=or(Di.Eras,qi.Narrow);break;case"y":t=eo(Ii.FullYear,1,0,!1,!0);break;case"yy":t=eo(Ii.FullYear,2,0,!0,!0);break;case"yyy":t=eo(Ii.FullYear,3,0,!1,!0);break;case"yyyy":t=eo(Ii.FullYear,4,0,!1,!0);break;case"Y":t=aw(1);break;case"YY":t=aw(2,!0);break;case"YYY":t=aw(3);break;case"YYYY":t=aw(4);break;case"M":case"L":t=eo(Ii.Month,1,1);break;case"MM":case"LL":t=eo(Ii.Month,2,1);break;case"MMM":t=or(Di.Months,qi.Abbreviated);break;case"MMMM":t=or(Di.Months,qi.Wide);break;case"MMMMM":t=or(Di.Months,qi.Narrow);break;case"LLL":t=or(Di.Months,qi.Abbreviated,ko.Standalone);break;case"LLLL":t=or(Di.Months,qi.Wide,ko.Standalone);break;case"LLLLL":t=or(Di.Months,qi.Narrow,ko.Standalone);break;case"w":t=UO(1);break;case"ww":t=UO(2);break;case"W":t=UO(1,!0);break;case"d":t=eo(Ii.Date,1);break;case"dd":t=eo(Ii.Date,2);break;case"c":case"cc":t=eo(Ii.Day,1);break;case"ccc":t=or(Di.Days,qi.Abbreviated,ko.Standalone);break;case"cccc":t=or(Di.Days,qi.Wide,ko.Standalone);break;case"ccccc":t=or(Di.Days,qi.Narrow,ko.Standalone);break;case"cccccc":t=or(Di.Days,qi.Short,ko.Standalone);break;case"E":case"EE":case"EEE":t=or(Di.Days,qi.Abbreviated);break;case"EEEE":t=or(Di.Days,qi.Wide);break;case"EEEEE":t=or(Di.Days,qi.Narrow);break;case"EEEEEE":t=or(Di.Days,qi.Short);break;case"a":case"aa":case"aaa":t=or(Di.DayPeriods,qi.Abbreviated);break;case"aaaa":t=or(Di.DayPeriods,qi.Wide);break;case"aaaaa":t=or(Di.DayPeriods,qi.Narrow);break;case"b":case"bb":case"bbb":t=or(Di.DayPeriods,qi.Abbreviated,ko.Standalone,!0);break;case"bbbb":t=or(Di.DayPeriods,qi.Wide,ko.Standalone,!0);break;case"bbbbb":t=or(Di.DayPeriods,qi.Narrow,ko.Standalone,!0);break;case"B":case"BB":case"BBB":t=or(Di.DayPeriods,qi.Abbreviated,ko.Format,!0);break;case"BBBB":t=or(Di.DayPeriods,qi.Wide,ko.Format,!0);break;case"BBBBB":t=or(Di.DayPeriods,qi.Narrow,ko.Format,!0);break;case"h":t=eo(Ii.Hours,1,-12);break;case"hh":t=eo(Ii.Hours,2,-12);break;case"H":t=eo(Ii.Hours,1);break;case"HH":t=eo(Ii.Hours,2);break;case"m":t=eo(Ii.Minutes,1);break;case"mm":t=eo(Ii.Minutes,2);break;case"s":t=eo(Ii.Seconds,1);break;case"ss":t=eo(Ii.Seconds,2);break;case"S":t=eo(Ii.FractionalSeconds,1);break;case"SS":t=eo(Ii.FractionalSeconds,2);break;case"SSS":t=eo(Ii.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":t=sw(El.Short);break;case"ZZZZZ":t=sw(El.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":t=sw(El.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":t=sw(El.Long);break;default:return null}return jO[n]=t,t}(d);c+=u?u(r,e,l):"''"===d?"'":d.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),c}function uw(n,t,e){let i=new Date(0);return i.setFullYear(n,t,e),i.setHours(0,0,0),i}function dd(n,t){let e=function(n){return Rs(n)[gr.LocaleId]}(n);if(Cb[e]=Cb[e]||{},Cb[e][t])return Cb[e][t];let i="";switch(t){case"shortDate":i=nw(n,as.Short);break;case"mediumDate":i=nw(n,as.Medium);break;case"longDate":i=nw(n,as.Long);break;case"fullDate":i=nw(n,as.Full);break;case"shortTime":i=iw(n,as.Short);break;case"mediumTime":i=iw(n,as.Medium);break;case"longTime":i=iw(n,as.Long);break;case"fullTime":i=iw(n,as.Full);break;case"short":let r=dd(n,"shortTime"),o=dd(n,"shortDate");i=ow(rw(n,as.Short),[r,o]);break;case"medium":let s=dd(n,"mediumTime"),a=dd(n,"mediumDate");i=ow(rw(n,as.Medium),[s,a]);break;case"long":let l=dd(n,"longTime"),c=dd(n,"longDate");i=ow(rw(n,as.Long),[l,c]);break;case"full":let d=dd(n,"fullTime"),u=dd(n,"fullDate");i=ow(rw(n,as.Full),[d,u])}return i&&(Cb[e][t]=i),i}function ow(n,t){return t&&(n=n.replace(/\{([^}]+)}/g,function(e,i){return null!=t&&i in t?t[i]:e})),n}function Sl(n,t,e="-",i,r){let o="";(n<0||r&&n<=0)&&(r?n=1-n:(n=-n,o=e));let s=String(n);for(;s.length<t;)s="0"+s;return i&&(s=s.slice(s.length-t)),o+s}function eo(n,t,e=0,i=!1,r=!1){return function(o,s){let a=function(n,t){switch(n){case Ii.FullYear:return t.getFullYear();case Ii.Month:return t.getMonth();case Ii.Date:return t.getDate();case Ii.Hours:return t.getHours();case Ii.Minutes:return t.getMinutes();case Ii.Seconds:return t.getSeconds();case Ii.FractionalSeconds:return t.getMilliseconds();case Ii.Day:return t.getDay();default:throw new Error(`Unknown DateType value "${n}".`)}}(n,o);if((e>0||a>-e)&&(a+=e),n===Ii.Hours)0===a&&-12===e&&(a=12);else if(n===Ii.FractionalSeconds)return function(n,t){return Sl(n,3).substring(0,t)}(a,t);let l=ud(s,Go.MinusSign);return Sl(a,t,l,i,r)}}function or(n,t,e=ko.Format,i=!1){return function(r,o){return function(n,t,e,i,r,o){switch(e){case Di.Months:return function(n,t,e){let i=Rs(n),o=Na([i[gr.MonthsFormat],i[gr.MonthsStandalone]],t);return Na(o,e)}(t,r,i)[n.getMonth()];case Di.Days:return function(n,t,e){let i=Rs(n),o=Na([i[gr.DaysFormat],i[gr.DaysStandalone]],t);return Na(o,e)}(t,r,i)[n.getDay()];case Di.DayPeriods:let s=n.getHours(),a=n.getMinutes();if(o){let c=function(n){let t=Rs(n);return Hj(t),(t[gr.ExtraData][2]||[]).map(i=>"string"==typeof i?zO(i):[zO(i[0]),zO(i[1])])}(t),d=function(n,t,e){let i=Rs(n);Hj(i);let o=Na([i[gr.ExtraData][0],i[gr.ExtraData][1]],t)||[];return Na(o,e)||[]}(t,r,i),u=c.findIndex(p=>{if(Array.isArray(p)){let[f,m]=p,b=s>=f.hours&&a>=f.minutes,M=s<m.hours||s===m.hours&&a<m.minutes;if(f.hours<m.hours){if(b&&M)return!0}else if(b||M)return!0}else if(p.hours===s&&p.minutes===a)return!0;return!1});if(-1!==u)return d[u]}return function(n,t,e){let i=Rs(n),o=Na([i[gr.DayPeriodsFormat],i[gr.DayPeriodsStandalone]],t);return Na(o,e)}(t,r,i)[s<12?0:1];case Di.Eras:return function(n,t){return Na(Rs(n)[gr.Eras],t)}(t,i)[n.getFullYear()<=0?0:1];default:throw new Error(`unexpected translation type ${e}`)}}(r,o,n,t,e,i)}}function sw(n){return function(t,e,i){let r=-1*i,o=ud(e,Go.MinusSign),s=r>0?Math.floor(r/60):Math.ceil(r/60);switch(n){case El.Short:return(r>=0?"+":"")+Sl(s,2,o)+Sl(Math.abs(r%60),2,o);case El.ShortGMT:return"GMT"+(r>=0?"+":"")+Sl(s,1,o);case El.Long:return"GMT"+(r>=0?"+":"")+Sl(s,2,o)+":"+Sl(Math.abs(r%60),2,o);case El.Extended:return 0===i?"Z":(r>=0?"+":"")+Sl(s,2,o)+":"+Sl(Math.abs(r%60),2,o);default:throw new Error(`Unknown zone width "${n}"`)}}}var wue=0,cw=4;function zj(n){return uw(n.getFullYear(),n.getMonth(),n.getDate()+(cw-n.getDay()))}function UO(n,t=!1){return function(e,i){let r;if(t){let o=new Date(e.getFullYear(),e.getMonth(),1).getDay()-1,s=e.getDate();r=1+Math.floor((s+o)/7)}else{let o=zj(e),s=function(n){let t=uw(n,wue,1).getDay();return uw(n,0,1+(t<=cw?cw:cw+7)-t)}(o.getFullYear()),a=o.getTime()-s.getTime();r=1+Math.round(a/6048e5)}return Sl(r,n,ud(i,Go.MinusSign))}}function aw(n,t=!1){return function(e,i){return Sl(zj(e).getFullYear(),n,ud(i,Go.MinusSign),t)}}var jO={};function Uj(n,t){n=n.replace(/:/g,"");let e=Date.parse("Jan 01, 1970 00:00:00 "+n)/6e4;return isNaN(e)?t:e}function Aj(n){return n instanceof Date&&!isNaN(n.valueOf())}var Rue=/^(\d+)?\.((\d+)(-(\d+))?)?$/,Rj=22,pw=".",Mb="0",Pue=";",Oue=",",GO="#";function $O(n,t,e){let i=function(n,t){return Rs(n)[gr.NumberFormats][t]}(t,lw.Decimal),r=function(n,t="-"){let e={minInt:1,minFrac:0,maxFrac:0,posPre:"",posSuf:"",negPre:"",negSuf:"",gSize:0,lgSize:0},i=n.split(Pue),r=i[0],o=i[1],s=-1!==r.indexOf(pw)?r.split(pw):[r.substring(0,r.lastIndexOf(Mb)+1),r.substring(r.lastIndexOf(Mb)+1)],a=s[0],l=s[1]||"";e.posPre=a.substring(0,a.indexOf(GO));for(let d=0;d<l.length;d++){let u=l.charAt(d);u===Mb?e.minFrac=e.maxFrac=d+1:u===GO?e.maxFrac=d+1:e.posSuf+=u}let c=a.split(Oue);if(e.gSize=c[1]?c[1].length:0,e.lgSize=c[2]||c[1]?(c[2]||c[1]).length:0,o){let d=r.length-e.posPre.length-e.posSuf.length,u=o.indexOf(GO);e.negPre=o.substring(0,u).replace(/'/g,""),e.negSuf=o.slice(u+d).replace(/'/g,"")}else e.negPre=t+e.posPre,e.negSuf=e.posSuf;return e}(i,ud(t,Go.MinusSign));return function(n,t,e,i,r,o,s=!1){let a="",l=!1;if(isFinite(n)){let c=function(n){let i,r,o,s,a,t=Math.abs(n)+"",e=0;for((r=t.indexOf(pw))>-1&&(t=t.replace(pw,"")),(o=t.search(/e/i))>0?(r<0&&(r=o),r+=+t.slice(o+1),t=t.substring(0,o)):r<0&&(r=t.length),o=0;t.charAt(o)===Mb;o++);if(o===(a=t.length))i=[0],r=1;else{for(a--;t.charAt(a)===Mb;)a--;for(r-=o,i=[],s=0;o<=a;o++,s++)i[s]=Number(t.charAt(o))}return r>Rj&&(i=i.splice(0,Rj-1),e=r-1,r=1),{digits:i,exponent:e,integerLen:r}}(n);s&&(c=function(n){if(0===n.digits[0])return n;let t=n.digits.length-n.integerLen;return n.exponent?n.exponent+=2:(0===t?n.digits.push(0,0):1===t&&n.digits.push(0),n.integerLen+=2),n}(c));let d=t.minInt,u=t.minFrac,p=t.maxFrac;if(o){let x=o.match(Rue);if(null===x)throw new Error(`${o} is not a valid digit info`);let R=x[1],A=x[3],V=x[5];null!=R&&(d=WO(R)),null!=A&&(u=WO(A)),null!=V?p=WO(V):null!=A&&u>p&&(p=u)}!function(n,t,e){if(t>e)throw new Error(`The minimum number of digits after fraction (${t}) is higher than the maximum (${e}).`);let i=n.digits,r=i.length-n.integerLen,o=Math.min(Math.max(t,r),e),s=o+n.integerLen,a=i[s];if(s>0){i.splice(Math.max(n.integerLen,s));for(let u=s;u<i.length;u++)i[u]=0}else{r=Math.max(0,r),n.integerLen=1,i.length=Math.max(1,s=o+1),i[0]=0;for(let u=1;u<s;u++)i[u]=0}if(a>=5)if(s-1<0){for(let u=0;u>s;u--)i.unshift(0),n.integerLen++;i.unshift(1),n.integerLen++}else i[s-1]++;for(;r<Math.max(0,o);r++)i.push(0);let l=0!==o,c=t+n.integerLen,d=i.reduceRight(function(u,p,f,m){return m[f]=(p+=u)<10?p:p-10,l&&(0===m[f]&&f>=c?m.pop():l=!1),p>=10?1:0},0);d&&(i.unshift(d),n.integerLen++)}(c,u,p);let f=c.digits,m=c.integerLen,b=c.exponent,M=[];for(l=f.every(x=>!x);m<d;m++)f.unshift(0);for(;m<0;m++)f.unshift(0);m>0?M=f.splice(m,f.length):(M=f,f=[0]);let y=[];for(f.length>=t.lgSize&&y.unshift(f.splice(-t.lgSize,f.length).join(""));f.length>t.gSize;)y.unshift(f.splice(-t.gSize,f.length).join(""));f.length&&y.unshift(f.join("")),a=y.join(ud(e,i)),M.length&&(a+=ud(e,r)+M.join("")),b&&(a+=ud(e,Go.Exponential)+"+"+b)}else a=ud(e,Go.Infinity);return a=n<0&&!l?t.negPre+a+t.negSuf:t.posPre+a+t.posSuf,a}(n,r,t,Go.Group,Go.Decimal,e)}function WO(n){let t=parseInt(n);if(isNaN(t))throw new Error("Invalid integer literal when parsing "+n);return t}function mw(n,t){t=encodeURIComponent(t);for(let e of n.split(";")){let i=e.indexOf("="),[r,o]=-1==i?[e,""]:[e.slice(0,i),e.slice(i+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var qO=/\s+/,Pj=[],yn=(()=>{class n{constructor(e,i,r,o){this._iterableDiffers=e,this._keyValueDiffers=i,this._ngEl=r,this._renderer=o,this.initialClasses=Pj,this.stateMap=new Map}set klass(e){this.initialClasses=null!=e?e.trim().split(qO):Pj}set ngClass(e){this.rawClass="string"==typeof e?e.trim().split(qO):e}ngDoCheck(){for(let i of this.initialClasses)this._updateState(i,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let i of e)this._updateState(i,!0);else if(null!=e)for(let i of Object.keys(e))this._updateState(i,Boolean(e[i]));this._applyStateDiff()}_updateState(e,i){let r=this.stateMap.get(e);void 0!==r?(r.enabled!==i&&(r.changed=!0,r.enabled=i),r.touched=!0):this.stateMap.set(e,{enabled:i,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let i=e[0],r=e[1];r.changed?(this._toggleClass(i,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(i,!1),this.stateMap.delete(i)),r.touched=!1}}_toggleClass(e,i){(e=e.trim()).length>0&&e.split(qO).forEach(r=>{i?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}}return n.\u0275fac=function(e){return new(e||n)(C(wl),C(xb),C(Me),C(mc))},n.\u0275dir=we({type:n,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"},standalone:!0}),n})(),nn=(()=>{class n{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,i,r){this._viewContainer=e,this._template=i,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;!this._differ&&e&&(this._differ=this._differs.find(e).create(this.ngForTrackBy))}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let i=this._viewContainer;e.forEachOperation((r,o,s)=>{if(null==r.previousIndex)i.createEmbeddedView(this._template,new class{constructor(t,e,i,r){this.$implicit=t,this.ngForOf=e,this.index=i,this.count=r}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}(r.item,this._ngForOf,-1,-1),null===s?void 0:s);else if(null==s)i.remove(null===o?void 0:o);else if(null!==o){let a=i.get(o);i.move(a,s),kj(a,r)}});for(let r=0,o=i.length;r<o;r++){let a=i.get(r).context;a.index=r,a.count=o,a.ngForOf=this._ngForOf}e.forEachIdentityChange(r=>{kj(i.get(r.currentIndex),r)})}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(Si),C(wl))},n.\u0275dir=we({type:n,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0}),n})();function kj(n,t){n.context.$implicit=t.item}var Fe=(()=>{class n{constructor(e,i){this._viewContainer=e,this._context=new QO,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=i}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){Fj("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){Fj("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,i){return!0}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(Si))},n.\u0275dir=we({type:n,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0}),n})(),QO=class{constructor(){this.$implicit=null,this.ngIf=null}};function Fj(n,t){if(t&&!t.createEmbeddedView)throw new Error(`${n} must be a TemplateRef, but received '${po(t)}'.`)}var fw=class{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}},sr=(()=>{class n{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,0===this._caseCount&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let i=e==this._ngSwitch;return this._lastCasesMatched=this._lastCasesMatched||i,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),i}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let i of this._defaultViews)i.enforceState(e)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0}),n})(),Sr=(()=>{class n{constructor(e,i,r){this.ngSwitch=r,r._addCase(),this._view=new fw(e,i)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(Si),C(sr,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0}),n})(),uu=(()=>{class n{constructor(e,i,r){r._addDefault(new fw(e,i))}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(Si),C(sr,9))},n.\u0275dir=we({type:n,selectors:[["","ngSwitchDefault",""]],standalone:!0}),n})(),pu=(()=>{class n{constructor(e,i,r){this._ngEl=e,this._differs=i,this._renderer=r,this._ngStyle=null,this._differ=null}set ngStyle(e){this._ngStyle=e,!this._differ&&e&&(this._differ=this._differs.find(e).create())}ngDoCheck(){if(this._differ){let e=this._differ.diff(this._ngStyle);e&&this._applyChanges(e)}}_setStyle(e,i){let[r,o]=e.split("."),s=-1===r.indexOf("-")?void 0:Aa.DashCase;null!=i?this._renderer.setStyle(this._ngEl.nativeElement,r,o?`${i}${o}`:i,s):this._renderer.removeStyle(this._ngEl.nativeElement,r,s)}_applyChanges(e){e.forEachRemovedItem(i=>this._setStyle(i.key,null)),e.forEachAddedItem(i=>this._setStyle(i.key,i.currentValue)),e.forEachChangedItem(i=>this._setStyle(i.key,i.currentValue))}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(xb),C(mc))},n.\u0275dir=we({type:n,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"},standalone:!0}),n})(),Lr=(()=>{class n{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(e.ngTemplateOutlet||e.ngTemplateOutletInjector){let i=this._viewContainerRef;if(this._viewRef&&i.remove(i.indexOf(this._viewRef)),this.ngTemplateOutlet){let{ngTemplateOutlet:r,ngTemplateOutletContext:o,ngTemplateOutletInjector:s}=this;this._viewRef=i.createEmbeddedView(r,o,s?{injector:s}:void 0)}else this._viewRef=null}else this._viewRef&&e.ngTemplateOutletContext&&this.ngTemplateOutletContext&&(this._viewRef.context=this.ngTemplateOutletContext)}}return n.\u0275fac=function(e){return new(e||n)(C(si))},n.\u0275dir=we({type:n,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[Gt]}),n})();function hw(n,t){return new yt(2100,!1)}var Hue=new class{createSubscription(t,e){return t.then(e,i=>{throw i})}dispose(t){}},zue=new class{createSubscription(t,e){return t.subscribe({next:e,error:i=>{throw i}})}dispose(t){t.unsubscribe()}},ct=(()=>{class n{constructor(e){this._latestValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}ngOnDestroy(){this._subscription&&this._dispose(),this._ref=null}transform(e){return this._obj?e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue:(e&&this._subscribe(e),this._latestValue)}_subscribe(e){this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,i=>this._updateLatestValue(e,i))}_selectStrategy(e){if(hh(e))return Hue;if(TO(e))return zue;throw hw()}_dispose(){this._strategy.dispose(this._subscription),this._latestValue=null,this._subscription=null,this._obj=null}_updateLatestValue(e,i){e===this._obj&&(this._latestValue=i,this._ref.markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(C($t,16))},n.\u0275pipe=Km({name:"async",type:n,pure:!1,standalone:!0}),n})(),jue=new ie("DATE_PIPE_DEFAULT_TIMEZONE"),Gue=new ie("DATE_PIPE_DEFAULT_OPTIONS"),gh=(()=>{class n{constructor(e,i,r){this.locale=e,this.defaultTimezone=i,this.defaultOptions=r}transform(e,i,r,o){if(null==e||""===e||e!=e)return null;try{return yue(e,i??this.defaultOptions?.dateFormat??"mediumDate",o||this.locale,r??this.defaultOptions?.timezone??this.defaultTimezone??void 0)}catch(s){throw hw()}}}return n.\u0275fac=function(e){return new(e||n)(C(cd,16),C(jue,24),C(Gue,24))},n.\u0275pipe=Km({name:"date",type:n,pure:!0,standalone:!0}),n})(),La=(()=>{class n{constructor(e){this._locale=e}transform(e,i,r){if(!function(n){return!(null==n||""===n||n!=n)}(e))return null;r=r||this._locale;try{let o=function(n){if("string"==typeof n&&!isNaN(Number(n)-parseFloat(n)))return Number(n);if("number"!=typeof n)throw new Error(`${n} is not a number`);return n}(e);return $O(o,r,i)}catch(o){throw hw()}}}return n.\u0275fac=function(e){return new(e||n)(C(cd,16))},n.\u0275pipe=Km({name:"number",type:n,pure:!0,standalone:!0}),n})(),jj=(()=>{class n{transform(e,i,r){if(null==e)return null;if(!this.supports(e))throw hw();return e.slice(i,r)}supports(e){return"string"==typeof e||Array.isArray(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275pipe=Km({name:"slice",type:n,pure:!1,standalone:!0}),n})(),Pe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),ek="browser";function gw(n){return n===ek}new yl("15.2.9");var Qp=class{};function Zue(n){return n.startsWith("/")?n.slice(1):n}var Kue=n=>n.src,Jue=new ie("ImageLoader",{providedIn:"root",factory:()=>Kue});function _w(n,t){return function(i){return function(n){if("string"!=typeof n||""===n.trim())return!1;try{return new URL(n),!0}catch{return!1}}(i)||function(n,t){throw new yt(2959,!1)}(),i=function(n){return n.endsWith("/")?n.slice(0,-1):n}(i),[{provide:Jue,useValue:s=>(function(n){return/^https?:\/\//.test(n)}(s.src)&&function(n,t){throw new yt(2959,!1)}(),n(i,{...s,src:Zue(s.src)}))}]}}_w(function(n,t){let e="format=auto";return t.width&&(e+=`,width=${t.width}`),`${n}/cdn-cgi/image/${e}/${t.src}`}),_w(function(n,t){let e="f_auto,q_auto";return t.width&&(e+=`,w_${t.width}`),`${n}/image/upload/${e}/${t.src}`}),_w(function(n,t){let r,{src:e,width:i}=t;return r=i?[n,`tr:w-${i}`,e]:[n,e],r.join("/")}),_w(function(n,t){let e=new URL(`${n}/${t.src}`);return e.searchParams.set("auto","format"),t.width&&e.searchParams.set("w",t.width.toString()),e.href}),new ie("PRECONNECT_CHECK_BLOCKLIST"),new ie("NG_OPTIMIZED_PRELOADED_IMAGES",{providedIn:"root",factory:()=>new Set});var bw,ope={breakpoints:[16,32,48,64,96,128,256,384,640,750,828,1080,1200,1920,2048,3840]},nk=(new ie("ImageConfig",{providedIn:"root",factory:()=>ope}),class extends dw{constructor(){super(...arguments),this.supportsDOMEvents=!0}}),Db=class extends nk{static makeCurrent(){var n;n=new Db,YO||(YO=n)}onAndCancel(t,e,i){return t.addEventListener(e,i,!1),()=>{t.removeEventListener(e,i,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.parentNode&&t.parentNode.removeChild(t)}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getBaseHref(t){let e=(Sb=Sb||document.querySelector("base"))?Sb.getAttribute("href"):null;return null==e?null:function(n){(bw=bw||document.createElement("a")).setAttribute("href",n);let t=bw.pathname;return"/"===t.charAt(0)?t:`/${t}`}(e)}resetBaseElement(){Sb=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return mw(document.cookie,t)}},Sb=null,Qj=new ie("TRANSITION_ID"),dpe=[{provide:OO,useFactory:function(n,t,e){return()=>{e.get(ZM).donePromise.then(()=>{let i=Tl(),r=t.querySelectorAll(`style[ng-transition="${n}"]`);for(let o=0;o<r.length;o++)i.remove(r[o])})}},deps:[Qj,Lt,Mi],multi:!0}],upe=(()=>{class n{build(){return new XMLHttpRequest}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),vw=new ie("EventManagerPlugins"),yw=(()=>{class n{constructor(e,i){this._zone=i,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,i,r){return this._findPluginFor(i).addEventListener(e,i,r)}addGlobalEventListener(e,i,r){return this._findPluginFor(i).addGlobalEventListener(e,i,r)}getZone(){return this._zone}_findPluginFor(e){let i=this._eventNameToPlugin.get(e);if(i)return i;let r=this._plugins;for(let o=0;o<r.length;o++){let s=r[o];if(s.supports(e))return this._eventNameToPlugin.set(e,s),s}throw new Error(`No event manager plugin found for event ${e}`)}}return n.\u0275fac=function(e){return new(e||n)(k(vw),k(at))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),xw=class{constructor(t){this._doc=t}addGlobalEventListener(t,e,i){let r=Tl().getGlobalEventTarget(this._doc,t);if(!r)throw new Error(`Unsupported event target ${r} for event ${e}`);return this.addEventListener(r,e,i)}},Zj=(()=>{class n{constructor(){this.usageCount=new Map}addStyles(e){for(let i of e)1===this.changeUsageCount(i,1)&&this.onStyleAdded(i)}removeStyles(e){for(let i of e)0===this.changeUsageCount(i,-1)&&this.onStyleRemoved(i)}onStyleRemoved(e){}onStyleAdded(e){}getAllStyles(){return this.usageCount.keys()}changeUsageCount(e,i){let r=this.usageCount,o=r.get(e)??0;return o+=i,o>0?r.set(e,o):r.delete(e),o}ngOnDestroy(){for(let e of this.getAllStyles())this.onStyleRemoved(e);this.usageCount.clear()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Eb=(()=>{class n extends Zj{constructor(e){super(),this.doc=e,this.styleRef=new Map,this.hostNodes=new Set,this.resetHostNodes()}onStyleAdded(e){for(let i of this.hostNodes)this.addStyleToHost(i,e)}onStyleRemoved(e){let i=this.styleRef;i.get(e)?.forEach(o=>o.remove()),i.delete(e)}ngOnDestroy(){super.ngOnDestroy(),this.styleRef.clear(),this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let i of this.getAllStyles())this.addStyleToHost(e,i)}removeHost(e){this.hostNodes.delete(e)}addStyleToHost(e,i){let r=this.doc.createElement("style");r.textContent=i,e.appendChild(r);let o=this.styleRef.get(i);o?o.push(r):this.styleRef.set(i,[r])}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),tk={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/MathML/"},ok=/%COMP%/g,Jj=new ie("RemoveStylesOnCompDestory",{providedIn:"root",factory:()=>!1});function $j(n,t){return t.flat(100).map(e=>e.replace(ok,n))}function Wj(n){return t=>{if("__ngUnwrap__"===t)return n;!1===n(t)&&(t.preventDefault(),t.returnValue=!1)}}var Tb=(()=>{class n{constructor(e,i,r,o){this.eventManager=e,this.sharedStylesHost=i,this.appId=r,this.removeStylesOnCompDestory=o,this.rendererByCompId=new Map,this.defaultRenderer=new Ib(e)}createRenderer(e,i){if(!e||!i)return this.defaultRenderer;let r=this.getOrCreateRenderer(e,i);return r instanceof Cw?r.applyToHost(e):r instanceof Ab&&r.applyStyles(),r}getOrCreateRenderer(e,i){let r=this.rendererByCompId,o=r.get(i.id);if(!o){let s=this.eventManager,a=this.sharedStylesHost,l=this.removeStylesOnCompDestory;switch(i.encapsulation){case ra.Emulated:o=new Cw(s,a,i,this.appId,l);break;case ra.ShadowDom:return new rk(s,a,e,i);default:o=new Ab(s,a,i,l)}o.onDestroy=()=>r.delete(i.id),r.set(i.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}begin(){}end(){}}return n.\u0275fac=function(e){return new(e||n)(k(yw),k(Eb),k(Yp),k(Jj))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ib=class{constructor(t){this.eventManager=t,this.data=Object.create(null),this.destroyNode=null}destroy(){}createElement(t,e){return e?document.createElementNS(tk[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){(Yj(t)?t.content:t).appendChild(e)}insertBefore(t,e,i){t&&(Yj(t)?t.content:t).insertBefore(e,i)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let i="string"==typeof t?document.querySelector(t):t;if(!i)throw new Error(`The selector "${t}" did not match any elements`);return e||(i.textContent=""),i}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,i,r){if(r){e=r+":"+e;let o=tk[r];o?t.setAttributeNS(o,e,i):t.setAttribute(e,i)}else t.setAttribute(e,i)}removeAttribute(t,e,i){if(i){let r=tk[i];r?t.removeAttributeNS(r,e):t.removeAttribute(`${i}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,i,r){r&(Aa.DashCase|Aa.Important)?t.style.setProperty(e,i,r&Aa.Important?"important":""):t.style[e]=i}removeStyle(t,e,i){i&Aa.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,i){t[e]=i}setValue(t,e){t.nodeValue=e}listen(t,e,i){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Wj(i)):this.eventManager.addEventListener(t,e,Wj(i))}};function Yj(n){return"TEMPLATE"===n.tagName&&void 0!==n.content}"@".charCodeAt(0);var rk=class extends Ib{constructor(t,e,i,r){super(t),this.sharedStylesHost=e,this.hostEl=i,this.shadowRoot=i.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let o=$j(r.id,r.styles);for(let s of o){let a=document.createElement("style");a.textContent=s,this.shadowRoot.appendChild(a)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,i){return super.insertBefore(this.nodeOrShadowRoot(t),e,i)}removeChild(t,e){return super.removeChild(this.nodeOrShadowRoot(t),e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},Ab=class extends Ib{constructor(t,e,i,r,o=i.id){super(t),this.sharedStylesHost=e,this.removeStylesOnCompDestory=r,this.rendererUsageCount=0,this.styles=$j(o,i.styles)}applyStyles(){this.sharedStylesHost.addStyles(this.styles),this.rendererUsageCount++}destroy(){!this.removeStylesOnCompDestory||(this.sharedStylesHost.removeStyles(this.styles),this.rendererUsageCount--,0===this.rendererUsageCount&&this.onDestroy?.())}},Cw=class extends Ab{constructor(t,e,i,r,o){let s=r+"-"+i.id;super(t,e,i,o,s),this.contentAttr="_ngcontent-%COMP%".replace(ok,s),this.hostAttr=function(n){return"_nghost-%COMP%".replace(ok,n)}(s)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let i=super.createElement(t,e);return super.setAttribute(i,this.contentAttr,""),i}},bpe=(()=>{class n extends xw{constructor(e){super(e)}supports(e){return!0}addEventListener(e,i,r){return e.addEventListener(i,r,!1),()=>this.removeEventListener(e,i,r)}removeEventListener(e,i,r){return e.removeEventListener(i,r)}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Xj=["alt","control","meta","shift"],vpe={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},ype={alt:n=>n.altKey,control:n=>n.ctrlKey,meta:n=>n.metaKey,shift:n=>n.shiftKey},xpe=(()=>{class n extends xw{constructor(e){super(e)}supports(e){return null!=n.parseEventName(e)}addEventListener(e,i,r){let o=n.parseEventName(i),s=n.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Tl().onAndCancel(e,o.domEventName,s))}static parseEventName(e){let i=e.toLowerCase().split("."),r=i.shift();if(0===i.length||"keydown"!==r&&"keyup"!==r)return null;let o=n._normalizeKey(i.pop()),s="",a=i.indexOf("code");if(a>-1&&(i.splice(a,1),s="code."),Xj.forEach(c=>{let d=i.indexOf(c);d>-1&&(i.splice(d,1),s+=c+".")}),s+=o,0!=i.length||0===o.length)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,i){let r=vpe[e.key]||e.key,o="";return i.indexOf("code.")>-1&&(r=e.code,o="code."),!(null==r||!r)&&(r=r.toLowerCase()," "===r?r="space":"."===r&&(r="dot"),Xj.forEach(s=>{s!==r&&(0,ype[s])(e)&&(o+=s+".")}),o+=r,o===i)}static eventCallback(e,i,r){return o=>{n.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>i(o))}}static _normalizeKey(e){return"esc"===e?"escape":e}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Spe=[{provide:vc,useValue:ek},{provide:kO,useValue:function(){Db.makeCurrent()},multi:!0},{provide:Lt,useFactory:function(){return n=document,YR=n,document;var n},deps:[]}],ak=BO(Mj,"browser",Spe),eG=new ie(""),Epe=[{provide:vb,useClass:class{addToWindow(t){Ur.getAngularTestability=(i,r=!0)=>{let o=t.findTestabilityInTree(i,r);if(null==o)throw new Error("Could not find testability for element.");return o},Ur.getAllAngularTestabilities=()=>t.getAllTestabilities(),Ur.getAllAngularRootElements=()=>t.getAllRootElements(),Ur.frameworkStabilizers||(Ur.frameworkStabilizers=[]),Ur.frameworkStabilizers.push(i=>{let r=Ur.getAllAngularTestabilities(),o=r.length,s=!1,a=function(l){s=s||l,o--,0==o&&i(s)};r.forEach(function(l){l.whenStable(a)})})}findTestabilityInTree(t,e,i){return null==e?null:t.getTestability(e)??(i?Tl().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null)}},deps:[]},{provide:NO,useClass:KM,deps:[at,JM,vb]},{provide:KM,useClass:KM,deps:[at,JM,vb]}],Tpe=[{provide:NM,useValue:"root"},{provide:rs,useFactory:function(){return new rs},deps:[]},{provide:vw,useClass:bpe,multi:!0,deps:[Lt,at,vc]},{provide:vw,useClass:xpe,multi:!0,deps:[Lt]},{provide:Tb,useClass:Tb,deps:[yw,Eb,Yp,Jj]},{provide:fc,useExisting:Tb},{provide:Zj,useExisting:Eb},{provide:Eb,useClass:Eb,deps:[Lt]},{provide:yw,useClass:yw,deps:[vw,at]},{provide:Qp,useClass:upe,deps:[]},[]],Mw=(()=>{class n{constructor(e){}static withServerTransition(e){return{ngModule:n,providers:[{provide:Yp,useValue:e.appId},{provide:Qj,useExisting:Yp},dpe]}}}return n.\u0275fac=function(e){return new(e||n)(k(eG,12))},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[...Tpe,...Epe],imports:[Pe,wj]}),n})(),Zp=(new ie("HammerGestureConfig"),new ie("HammerLoader"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:function(e){let i=null;return i=e?new(e||n):k(tG),i},providedIn:"root"}),n})()),tG=(()=>{class n extends Zp{constructor(e){super(),this._doc=e}sanitize(e,i){if(null==i)return null;switch(e){case jr.NONE:return i;case jr.HTML:return xl(i,"HTML")?Ds(i):pO(this._doc,String(i)).toString();case jr.STYLE:return xl(i,"Style")?Ds(i):i;case jr.SCRIPT:if(xl(i,"Script"))return Ds(i);throw new Error("unsafe value used in a script context");case jr.URL:return xl(i,"URL")?Ds(i):lb(String(i));case jr.RESOURCE_URL:if(xl(i,"ResourceURL"))return Ds(i);throw new Error(`unsafe value used in a resource URL context (see ${tb})`);default:throw new Error(`Unexpected SecurityContext ${e} (see ${tb})`)}}bypassSecurityTrustHtml(e){return function(n){return new XR(n)}(e)}bypassSecurityTrustStyle(e){return function(n){return new QR(n)}(e)}bypassSecurityTrustScript(e){return function(n){return new ZR(n)}(e)}bypassSecurityTrustUrl(e){return function(n){return new KR(n)}(e)}bypassSecurityTrustResourceUrl(e){return function(n){return new JR(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:function(e){let i=null;return i=e?new e:function(n){return new tG(n.get(Lt))}(k(Mi)),i},providedIn:"root"}),n})(),Rb=(new yl("15.2.9"),WV(iG(),1),class{}),ww=class{},xc="*";function _r(n,t){return{type:7,name:n,definitions:t,options:{}}}function Ci(n,t=null){return{type:4,styles:t,timings:n}}function Ob(n,t=null){return{type:3,steps:n,options:t}}function Sw(n,t=null){return{type:2,steps:n,options:t}}function rn(n){return{type:6,styles:n,offset:null}}function wi(n,t,e){return{type:0,name:n,styles:t,options:e}}function kb(n){return{type:5,steps:n}}function gi(n,t,e=null){return{type:1,expr:n,animation:t,options:e}}function Kp(n=null){return{type:9,options:n}}function Jp(n,t,e=null){return{type:11,selector:n,animation:t,options:e}}function rG(n){Promise.resolve().then(n)}var mu=class{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){rG(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},Pb=class{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,i=0,r=0,o=this.players.length;0==o?rG(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++i==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(i=>{let r=i.totalTime?Math.min(1,e/i.totalTime):1;i.setPosition(r)})}getPosition(){let t=this.players.reduce((e,i)=>null===e||i.totalTime>e.totalTime?i:e,null);return null!=t?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},Ew="!";function oG(n){return new yt(3e3,!1)}function Ik(){return typeof process<"u"&&"[object process]"==={}.toString.call(process)}function hu(n){switch(n.length){case 0:return new mu;case 1:return n[0];default:return new Pb(n)}}function yG(n,t,e,i,r=new Map,o=new Map){let s=[],a=[],l=-1,c=null;if(i.forEach(d=>{let u=d.get("offset"),p=u==l,f=p&&c||new Map;d.forEach((m,b)=>{let M=b,y=m;if("offset"!==b)switch(M=t.normalizePropertyName(M,s),y){case Ew:y=r.get(b);break;case xc:y=o.get(b);break;default:y=t.normalizeStyleValue(b,M,y,s)}f.set(M,y)}),p||a.push(f),c=f,l=u}),s.length)throw new yt(3502,!1);return a}function Ak(n,t,e,i){switch(t){case"start":n.onStart(()=>i(e&&ck(e,"start",n)));break;case"done":n.onDone(()=>i(e&&ck(e,"done",n)));break;case"destroy":n.onDestroy(()=>i(e&&ck(e,"destroy",n)))}}function ck(n,t,e){let o=Rk(n.element,n.triggerName,n.fromState,n.toState,t||n.phaseName,e.totalTime??n.totalTime,!!e.disabled),s=n._data;return null!=s&&(o._data=s),o}function Rk(n,t,e,i,r="",o=0,s){return{element:n,triggerName:t,fromState:e,toState:i,phaseName:r,totalTime:o,disabled:!!s}}function ca(n,t,e){let i=n.get(t);return i||n.set(t,i=e),i}function sG(n){let t=n.indexOf(":");return[n.substring(1,t),n.slice(t+1)]}var hk=(n,t)=>!1,xG=(n,t,e)=>[],CG=null;function Pk(n){let t=n.parentNode||n.host;return t===CG?null:t}(Ik()||typeof Element<"u")&&(typeof window<"u"&&typeof window.document<"u"?(CG=(()=>document.documentElement)(),hk=(n,t)=>{for(;t;){if(t===n)return!0;t=Pk(t)}return!1}):hk=(n,t)=>n.contains(t),xG=(n,t,e)=>{if(e)return Array.from(n.querySelectorAll(t));let i=n.querySelector(t);return i?[i]:[]});var $p=null,aG=!1;var MG=hk,wG=xG,Ok=(()=>{class n{validateStyleProperty(e){return function(n){$p||($p=(typeof document<"u"?document.body:null)||{},aG=!!$p.style&&"WebkitAppearance"in $p.style);let t=!0;return $p.style&&!function(n){return"ebkit"==n.substring(1,6)}(n)&&(t=n in $p.style,!t&&aG&&(t="Webkit"+n.charAt(0).toUpperCase()+n.slice(1)in $p.style)),t}(e)}matchesElement(e,i){return!1}containsElement(e,i){return MG(e,i)}getParentElement(e){return Pk(e)}query(e,i,r){return wG(e,i,r)}computeStyle(e,i,r){return r||""}animate(e,i,r,o,s,a=[],l){return new mu(r,o)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ub=(()=>{class n{}return n.NOOP=new Ok,n})(),ufe=1e3,EG="ng-enter",gk="ng-leave",Tw="ng-trigger",Rw=".ng-trigger",lG="ng-animating",_k=".ng-animating";function pd(n){if("number"==typeof n)return n;let t=n.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:bk(parseFloat(t[1]),t[2])}function bk(n,t){return"s"===t?n*ufe:n}function Pw(n,t,e){return n.hasOwnProperty("duration")?n:function(n,t,e){let r,o=0,s="";if("string"==typeof n){let a=n.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===a)return t.push(oG()),{duration:0,delay:0,easing:""};r=bk(parseFloat(a[1]),a[2]);let l=a[3];null!=l&&(o=bk(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=n;if(!e){let a=!1,l=t.length;r<0&&(t.push(new yt(3100,!1)),a=!0),o<0&&(t.push(new yt(3101,!1)),a=!0),a&&t.splice(l,0,oG())}return{duration:r,delay:o,easing:s}}(n,t,e)}function jb(n,t={}){return Object.keys(n).forEach(e=>{t[e]=n[e]}),t}function TG(n){let t=new Map;return Object.keys(n).forEach(e=>{t.set(e,n[e])}),t}function bh(n,t=new Map,e){if(e)for(let[i,r]of e)t.set(i,r);for(let[i,r]of n)t.set(i,r);return t}function cG(n,t,e){return e?t+":"+e+";":""}function DG(n){let t="";for(let e=0;e<n.style.length;e++){let i=n.style.item(e);t+=cG(0,i,n.style.getPropertyValue(i))}for(let e in n.style)n.style.hasOwnProperty(e)&&!e.startsWith("_")&&(t+=cG(0,_fe(e),n.style[e]));n.setAttribute("style",t)}function Cc(n,t,e){n.style&&(t.forEach((i,r)=>{let o=kk(r);e&&!e.has(r)&&e.set(r,n.style[o]),n.style[o]=i}),Ik()&&DG(n))}function tf(n,t){n.style&&(t.forEach((e,i)=>{let r=kk(i);n.style[r]=""}),Ik()&&DG(n))}function Fb(n){return Array.isArray(n)?1==n.length?n[0]:Sw(n):n}var vk=new RegExp("{{\\s*(.+?)\\s*}}","g");function IG(n){let t=[];if("string"==typeof n){let e;for(;e=vk.exec(n);)t.push(e[1]);vk.lastIndex=0}return t}function Lb(n,t,e){let i=n.toString(),r=i.replace(vk,(o,s)=>{let a=t[s];return null==a&&(e.push(new yt(3003,!1)),a=""),a.toString()});return r==i?n:r}function Ow(n){let t=[],e=n.next();for(;!e.done;)t.push(e.value),e=n.next();return t}var gfe=/-+([a-z0-9])/g;function kk(n){return n.replace(gfe,(...t)=>t[1].toUpperCase())}function _fe(n){return n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function la(n,t,e){switch(t.type){case 7:return n.visitTrigger(t,e);case 0:return n.visitState(t,e);case 1:return n.visitTransition(t,e);case 2:return n.visitSequence(t,e);case 3:return n.visitGroup(t,e);case 4:return n.visitAnimate(t,e);case 5:return n.visitKeyframes(t,e);case 6:return n.visitStyle(t,e);case 8:return n.visitReference(t,e);case 9:return n.visitAnimateChild(t,e);case 10:return n.visitAnimateRef(t,e);case 11:return n.visitQuery(t,e);case 12:return n.visitStagger(t,e);default:throw new yt(3004,!1)}}function AG(n,t){return window.getComputedStyle(n)[t]}var kw="*";function Cfe(n,t){let e=[];return"string"==typeof n?n.split(/\s*,\s*/).forEach(i=>function(n,t,e){if(":"==n[0]){let l=function(n,t){switch(n){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,i)=>parseFloat(i)>parseFloat(e);case":decrement":return(e,i)=>parseFloat(i)<parseFloat(e);default:return t.push(new yt(3016,!1)),"* => *"}}(n,e);if("function"==typeof l)return void t.push(l);n=l}let i=n.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return e.push(new yt(3015,!1)),t;let r=i[1],o=i[2],s=i[3];t.push(dG(r,s)),"<"==o[0]&&!(r==kw&&s==kw)&&t.push(dG(s,r))}(i,e,t)):e.push(n),e}var Dw=new Set(["true","1"]),Iw=new Set(["false","0"]);function dG(n,t){let e=Dw.has(n)||Iw.has(n),i=Dw.has(t)||Iw.has(t);return(r,o)=>{let s=n==kw||n==r,a=t==kw||t==o;return!s&&e&&"boolean"==typeof r&&(s=r?Dw.has(n):Iw.has(n)),!a&&i&&"boolean"==typeof o&&(a=o?Dw.has(t):Iw.has(t)),s&&a}}var Sfe=new RegExp("s*:selfs*,?","g");function kG(n,t,e,i){return new yk(n).build(t,e,i)}var yk=class{constructor(t){this._driver=t}build(t,e,i){let r=new xk(e);return this._resetContextStyleTimingState(r),la(this,Fb(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles=new Map,t.collectedStyles.set("",new Map),t.currentTime=0}visitTrigger(t,e){let i=e.queryCount=0,r=e.depCount=0,o=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push(new yt(3006,!1)),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),0==a.type){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,e))}),l.name=c}else if(1==a.type){let l=this.visitTransition(a,e);i+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(new yt(3007,!1))}),{type:7,name:t.name,states:o,transitions:s,queryCount:i,depCount:r,options:null}}visitState(t,e){let i=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(i.containsDynamicStyles){let o=new Set,s=r||{};i.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{IG(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&(Ow(o.values()),e.errors.push(new yt(3008,!1)))}return{type:0,name:t.name,style:i,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;let i=la(this,Fb(t.animation),e);return{type:1,matchers:Cfe(t.expr,e.errors),animation:i,queryCount:e.queryCount,depCount:e.depCount,options:ef(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(i=>la(this,i,e)),options:ef(t.options)}}visitGroup(t,e){let i=e.currentTime,r=0,o=t.steps.map(s=>{e.currentTime=i;let a=la(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:3,steps:o,options:ef(t.options)}}visitAnimate(t,e){let i=function(n,t){if(n.hasOwnProperty("duration"))return n;if("number"==typeof n)return dk(Pw(n,t).duration,0,"");let e=n;if(e.split(/\s+/).some(o=>"{"==o.charAt(0)&&"{"==o.charAt(1))){let o=dk(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=Pw(e,t);return dk(r.duration,r.delay,r.easing)}(t.timings,e.errors);e.currentAnimateTimings=i;let r,o=t.styles?t.styles:rn({});if(5==o.type)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;let c={};i.easing&&(c.easing=i.easing),s=rn(c)}e.currentTime+=i.duration+i.delay;let l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:4,timings:i,style:r,options:null}}visitStyle(t,e){let i=this._makeStyleAst(t,e);return this._validateStyleAst(i,e),i}_makeStyleAst(t,e){let i=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)"string"==typeof a?a===xc?i.push(a):e.errors.push(new yt(3002,!1)):i.push(TG(a));let o=!1,s=null;return i.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o))for(let l of a.values())if(l.toString().indexOf("{{")>=0){o=!0;break}}),{type:6,styles:i,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){let i=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;i&&o>0&&(o-=i.duration+i.delay),t.styles.forEach(s=>{"string"!=typeof s&&s.forEach((a,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(e.errors.push(new yt(3010,!1)),u=!1),o=d.startTime),u&&c.set(l,{startTime:o,endTime:r}),e.options&&function(n,t,e){let i=t.params||{},r=IG(n);r.length&&r.forEach(o=>{i.hasOwnProperty(o)||e.push(new yt(3001,!1))})}(a,e.options,e.errors)})})}visitKeyframes(t,e){let i={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(new yt(3011,!1)),i;let o=0,s=[],a=!1,l=!1,c=0,d=t.steps.map(y=>{let x=this._makeStyleAst(y,e),R=null!=x.offset?x.offset:function(n){if("string"==typeof n)return null;let t=null;if(Array.isArray(n))n.forEach(e=>{if(e instanceof Map&&e.has("offset")){let i=e;t=parseFloat(i.get("offset")),i.delete("offset")}});else if(n instanceof Map&&n.has("offset")){let e=n;t=parseFloat(e.get("offset")),e.delete("offset")}return t}(x.styles),A=0;return null!=R&&(o++,A=x.offset=R),l=l||A<0||A>1,a=a||A<c,c=A,s.push(A),x});l&&e.errors.push(new yt(3012,!1)),a&&e.errors.push(new yt(3200,!1));let u=t.steps.length,p=0;o>0&&o<u?e.errors.push(new yt(3202,!1)):0==o&&(p=1/(u-1));let f=u-1,m=e.currentTime,b=e.currentAnimateTimings,M=b.duration;return d.forEach((y,x)=>{let R=p>0?x==f?1:p*x:s[x],A=R*M;e.currentTime=m+b.delay+A,b.duration=A,this._validateStyleAst(y,e),y.offset=R,i.styles.push(y)}),i}visitReference(t,e){return{type:8,animation:la(this,Fb(t.animation),e),options:ef(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:ef(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:ef(t.options)}}visitQuery(t,e){let i=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;let[o,s]=function(n){let t=!!n.split(/\s*,\s*/).find(e=>":self"==e);return t&&(n=n.replace(Sfe,"")),n=n.replace(/@\*/g,Rw).replace(/@\w+/g,e=>Rw+"-"+e.slice(1)).replace(/:animating/g,_k),[n,t]}(t.selector);e.currentQuerySelector=i.length?i+" "+o:o,ca(e.collectedStyles,e.currentQuerySelector,new Map);let a=la(this,Fb(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=i,{type:11,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:ef(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(new yt(3013,!1));let i="full"===t.timings?{duration:0,delay:0,easing:"full"}:Pw(t.timings,e.errors,!0);return{type:12,animation:la(this,Fb(t.animation),e),timings:i,options:null}}},xk=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function ef(n){return n?(n=jb(n)).params&&(n.params=function(n){return n?jb(n):null}(n.params)):n={},n}function dk(n,t,e){return{duration:n,delay:t,easing:e}}function Fk(n,t,e,i,r,o,s=null,a=!1){return{type:1,element:n,keyframes:t,preStyleProps:e,postStyleProps:i,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Bb=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let i=this._map.get(t);i||this._map.set(t,i=[]),i.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}},Pfe=new RegExp(":enter","g"),kfe=new RegExp(":leave","g");function FG(n,t,e,i,r,o=new Map,s=new Map,a,l,c=[]){return(new Ck).buildKeyframes(n,t,e,i,r,o,s,a,l,c)}var Ck=class{buildKeyframes(t,e,i,r,o,s,a,l,c,d=[]){c=c||new Bb;let u=new Vb(t,e,c,r,o,d,[]);u.options=l;let p=l.delay?pd(l.delay):0;u.currentTimeline.delayNextStep(p),u.currentTimeline.setStyles([s],null,u.errors,l),la(this,i,u);let f=u.timelines.filter(m=>m.containsAnimation());if(f.length&&a.size){let m;for(let b=f.length-1;b>=0;b--){let M=f[b];if(M.element===e){m=M;break}}m&&!m.allowOnlyTimelineStyles()&&m.setStyles([a],null,u.errors,l)}return f.length?f.map(m=>m.buildKeyframes()):[Fk(e,[],[],[],0,p,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){let i=e.subInstructions.get(e.element);if(i){let r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(i,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){let i=e.createSubContext(t.options);i.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,i),this.visitReference(t.animation,i),e.transformIntoNewTimeline(i.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,i){for(let r of t){let o=r?.delay;if(o){let s="number"==typeof o?o:pd(Lb(o,r?.params??{},e.errors));i.delayNextStep(s)}}}_visitSubInstructions(t,e,i){let o=e.currentTimeline.currentTime,s=null!=i.duration?pd(i.duration):null,a=null!=i.delay?pd(i.delay):null;return 0!==s&&t.forEach(l=>{let c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),la(this,t.animation,e),e.previousNode=t}visitSequence(t,e){let i=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),null!=o.delay)){6==r.previousNode.type&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Fw);let s=pd(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>la(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>i&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){let i=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?pd(t.options.delay):0;t.steps.forEach(s=>{let a=e.createSubContext(t.options);o&&a.delayNextStep(o),la(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),i.push(a.currentTimeline)}),i.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let i=t.strValue;return Pw(e.params?Lb(i,e.params,e.errors):i,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){let i=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;i.delay&&(e.incrementTime(i.delay),r.snapshotCurrentStyles());let o=t.style;5==o.type?this.visitKeyframes(o,e):(e.incrementTime(i.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){let i=e.currentTimeline,r=e.currentAnimateTimings;!r&&i.hasCurrentStyleProperties()&&i.forwardFrame();let o=r&&r.easing||t.easing;t.isEmptyStep?i.applyEmptyStep(o):i.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){let i=e.currentAnimateTimings,r=e.currentTimeline.duration,o=i.duration,a=e.createSubContext().currentTimeline;a.easing=i.easing,t.styles.forEach(l=>{a.forwardTime((l.offset||0)*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){let i=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?pd(r.delay):0;o&&(6===e.previousNode.type||0==i&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Fw);let s=i,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{e.currentQueryIndex=d;let u=e.createSubContext(t.options,c);o&&u.delayNextStep(o),c===e.element&&(l=u.currentTimeline),la(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,u.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let i=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1),l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=i.currentStaggerTime}let d=e.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;la(this,t.animation,e),e.previousNode=t,i.currentStaggerTime=r.currentTime-u+(r.startTime-i.currentTimeline.startTime)}},Fw={},Vb=class{constructor(t,e,i,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=i,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Fw,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new vh(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;let i=t,r=this.options;null!=i.duration&&(r.duration=pd(i.duration)),null!=i.delay&&(r.delay=pd(i.delay));let o=i.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Lb(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let e=this.options.params;if(e){let i=t.params={};Object.keys(e).forEach(r=>{i[r]=e[r]})}}return t}createSubContext(t=null,e,i){let r=e||this.element,o=new Vb(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,i||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=Fw,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,i){let r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(i??0)+t.delay,easing:""},o=new Mk(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,i,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=(t=t.replace(Pfe,"."+this._enterClassName)).replace(kfe,"."+this._leaveClassName);let c=this._driver.query(this.element,t,1!=i);0!==i&&(c=i<0?c.slice(c.length+i,c.length):c.slice(0,i)),a.push(...c)}return!o&&0==a.length&&s.push(new yt(3014,!1)),a}},vh=class{constructor(t,e,i,r){this._driver=t,this.element=e,this.startTime=i,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let e=1===this._keyframes.size&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new vh(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,i]of this._globalTimelineStyles)this._backFill.set(e,i||xc),this._currentKeyframe.set(e,xc);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,i,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},s=function(n,t){let i,e=new Map;return n.forEach(r=>{if("*"===r){i=i||t.keys();for(let o of i)e.set(o,xc)}else bh(r,e)}),e}(t,this._globalTimelineStyles);for(let[a,l]of s){let c=Lb(l,o,i);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??xc),this._updateStyle(a,c)}}applyStylesToKeyframe(){0!=this._pendingStyles.size&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,i)=>{let r=this._styleSummary.get(i);(!r||e.time>r.time)&&this._updateStyle(i,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,e=new Set,i=1===this._keyframes.size&&0===this.duration,r=[];this._keyframes.forEach((a,l)=>{let c=bh(a,new Map,this._backFill);c.forEach((d,u)=>{d===Ew?t.add(u):d===xc&&e.add(u)}),i||c.set("offset",l/this.duration),r.push(c)});let o=t.size?Ow(t.values()):[],s=e.size?Ow(e.values()):[];if(i){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Fk(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},Mk=class extends vh{constructor(t,e,i,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=i,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:i,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],s=i+e,a=e/s,l=bh(t[0]);l.set("offset",0),o.push(l);let c=bh(t[0]);c.set("offset",pG(a)),o.push(c);let d=t.length-1;for(let u=1;u<=d;u++){let p=bh(t[u]),f=p.get("offset");p.set("offset",pG((e+f*i)/s)),o.push(p)}i=s,e=0,r="",t=o}return Fk(this.element,t,this.preStyleProps,this.postStyleProps,i,e,r,!0)}};function pG(n,t=3){let e=Math.pow(10,t-1);return Math.round(n*e)/e}var nf=class{},Nfe=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Nw=class extends nf{normalizePropertyName(t,e){return kk(t)}normalizeStyleValue(t,e,i,r){let o="",s=i.toString().trim();if(Nfe.has(e)&&0!==i&&"0"!==i)if("number"==typeof i)o="px";else{let a=i.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&0==a[1].length&&r.push(new yt(3005,!1))}return s+o}};function fG(n,t,e,i,r,o,s,a,l,c,d,u,p){return{type:0,element:n,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:i,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:p}}var uk={},Lw=class{constructor(t,e,i){this._triggerName=t,this.ast=e,this._stateStyles=i}match(t,e,i,r){return function(n,t,e,i,r){return n.some(o=>o(t,e,i,r))}(this.ast.matchers,t,e,i,r)}buildStyles(t,e,i){let r=this._stateStyles.get("*");return void 0!==t&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,i):new Map}build(t,e,i,r,o,s,a,l,c,d){let u=[],p=this.ast.options&&this.ast.options.params||uk,m=this.buildStyles(i,a&&a.params||uk,u),b=l&&l.params||uk,M=this.buildStyles(r,b,u),y=new Set,x=new Map,R=new Map,A="void"===r,V={params:Bfe(b,p),delay:this.ast.options?.delay},te=d?[]:FG(t,e,this.ast.animation,o,s,m,M,V,c,u),K=0;if(te.forEach(Xe=>{K=Math.max(Xe.duration+Xe.delay,K)}),u.length)return fG(e,this._triggerName,i,r,A,m,M,[],[],x,R,K,u);te.forEach(Xe=>{let De=Xe.element,D=ca(x,De,new Set);Xe.preStyleProps.forEach(ce=>D.add(ce));let re=ca(R,De,new Set);Xe.postStyleProps.forEach(ce=>re.add(ce)),De!==e&&y.add(De)});let xe=Ow(y.values());return fG(e,this._triggerName,i,r,A,m,M,te,xe,x,R,K)}};function Bfe(n,t){let e=jb(t);for(let i in n)n.hasOwnProperty(i)&&null!=n[i]&&(e[i]=n[i]);return e}function mG(n,t,e){n.has(t)?n.has(e)||n.set(e,n.get(t)):n.has(e)&&n.set(t,n.get(e))}var zfe=new Bb,hG="ng-animate-queued",pk="ng-animate-disabled",qfe=[],NG={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},Yfe={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},Ba="__ng_removed",Hb=class{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;let i=t&&t.hasOwnProperty("value");if(this.value=(i?t.value:t)??null,i){let o=jb(t);delete o.value,this.options=o}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let e=t.params;if(e){let i=this.options.params;Object.keys(e).forEach(r=>{null==i[r]&&(i[r]=e[r])})}}},Nb="void",fk=new Hb(Nb),zb=class{constructor(t,e,i){this.namespaceId=t,this.triggerName=e,this.element=i,this._player=new mu,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,i)=>{e.forEach(r=>Ak(t,i,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){ca(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let e=this._player;e.triggerCallback&&e.triggerCallback(t)}};function Aw(n){return n&&1===n.nodeType}function gG(n,t){let e=n.style.display;return n.style.display=t??"none",e}function _G(n,t,e,i,r){let o=[];e.forEach(l=>o.push(gG(l)));let s=[];i.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let p=t.computeStyle(c,u,r);d.set(u,p),(!p||0==p.length)&&(c[Ba]=Yfe,s.push(c))}),n.set(c,d)});let a=0;return e.forEach(l=>gG(l,o[a++])),s}function bG(n,t){let e=new Map;if(n.forEach(a=>e.set(a,[])),0==t.length)return e;let i=1,r=new Set(t),o=new Map;function s(a){if(!a)return i;let l=o.get(a);if(l)return l;let c=a.parentNode;return l=e.has(c)?c:r.has(c)?i:s(c),o.set(a,l),l}return t.forEach(a=>{let l=s(a);l!==i&&e.get(l).push(a)}),e}function Va(n,t){n.classList?.add(t)}function _h(n,t){n.classList?.remove(t)}function Kfe(n,t,e){hu(e).onDone(()=>n.processLeaveNode(t))}function LG(n,t){for(let e=0;e<n.length;e++){let i=n[e];i instanceof Pb?LG(i.players,t):t.push(i)}}function vG(n,t,e){let i=e.get(n);if(!i)return!1;let r=t.get(n);return r?i.forEach(o=>r.add(o)):t.set(n,i),e.delete(n),!0}var gu=class{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new class{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,i){this.bodyNode=t,this.driver=e,this._normalizer=i,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(e=>{e.players.forEach(i=>{i.queued&&t.push(i)})}),t}createNamespace(t,e){let i=new class{constructor(t,e,i){this.id=t,this.hostElement=e,this._engine=i,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Va(e,this._hostClassName)}listen(t,e,i,r){if(!this._triggers.has(e))throw new yt(3302,!1);if(null==i||0==i.length)throw new yt(3303,!1);if("start"!=(n=i)&&"done"!=n)throw new yt(3400,!1);var n;let o=ca(this._elementListeners,t,[]),s={name:e,phase:i,callback:r};o.push(s);let a=ca(this._engine.statesByElement,t,new Map);return a.has(e)||(Va(t,Tw),Va(t,Tw+"-"+e),a.set(e,fk)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return!this._triggers.has(t)&&(this._triggers.set(t,e),!0)}_getTrigger(t){let e=this._triggers.get(t);if(!e)throw new yt(3401,!1);return e}trigger(t,e,i,r=!0){let o=this._getTrigger(e),s=new zb(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Va(t,Tw),Va(t,Tw+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e),c=new Hb(i,this.id);if(!(i&&i.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=fk),c.value!==Nb&&l.value===c.value){if(!function(n,t){let e=Object.keys(n),i=Object.keys(t);if(e.length!=i.length)return!1;for(let r=0;r<e.length;r++){let o=e[r];if(!t.hasOwnProperty(o)||n[o]!==t[o])return!1}return!0}(l.params,c.params)){let b=[],M=o.matchStyles(l.value,l.params,b),y=o.matchStyles(c.value,c.params,b);b.length?this._engine.reportError(b):this._engine.afterFlush(()=>{tf(t,M),Cc(t,y)})}return}let p=ca(this._engine.playersByElement,t,[]);p.forEach(b=>{b.namespaceId==this.id&&b.triggerName==e&&b.queued&&b.destroy()});let f=o.matchTransition(l.value,c.value,t,c.params),m=!1;if(!f){if(!r)return;f=o.fallbackTransition,m=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:f,fromState:l,toState:c,player:s,isFallbackTransition:m}),m||(Va(t,hG),s.onStart(()=>{_h(t,hG)})),s.onDone(()=>{let b=this.players.indexOf(s);b>=0&&this.players.splice(b,1);let M=this._engine.playersByElement.get(t);if(M){let y=M.indexOf(s);y>=0&&M.splice(y,1)}}),this.players.push(s),p.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,i)=>{this._elementListeners.set(i,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let e=this._engine.playersByElement.get(t);e&&(e.forEach(i=>i.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){let i=this._engine.driver.query(t,Rw,!0);i.forEach(r=>{if(r[Ba])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>i.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,i,r){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let d=this.trigger(t,c,Nb,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),i&&hu(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let e=this._elementListeners.get(t),i=this._engine.statesByElement.get(t);if(e&&i){let r=new Set;e.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=i.get(s)||fk,d=new Hb(Nb),u=new zb(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){let i=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(i.totalAnimations){let o=i.players.length?i.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(i.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)i.markElementAsRemoved(this.id,t,!1,e);else{let o=t[Ba];(!o||o===NG)&&(i.afterFlush(()=>this.clearElementCache(t)),i.destroyInnerAnimations(t),i._onRemovalComplete(t,e))}}insertNode(t,e){Va(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(i=>{let r=i.player;if(r.destroyed)return;let o=i.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==i.triggerName){let l=Rk(o,i.triggerName,i.fromState.value,i.toState.value);l._data=t,Ak(i.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(i)}),this._queue=[],e.sort((i,r)=>{let o=i.transition.ast.depCount,s=r.transition.ast.depCount;return 0==o||0==s?o-s:this._engine.driver.containsElement(i.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(i=>i.element===t)||e,e}}(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(i,e):(this.newHostElements.set(e,i),this.collectEnterElement(e)),this._namespaceLookup[t]=i}_balanceNamespaceList(t,e){let i=this._namespaceList,r=this.namespacesByHostElement;if(i.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){let l=r.get(a);if(l){let c=i.indexOf(l);i.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||i.unshift(t)}else i.push(t);return r.set(e,t),t}register(t,e){let i=this._namespaceLookup[t];return i||(i=this.createNamespace(t,e)),i}registerTrigger(t,e,i){let r=this._namespaceLookup[t];r&&r.register(e,i)&&this.totalAnimations++}destroy(t,e){if(!t)return;let i=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(i.hostElement),delete this._namespaceLookup[t];let r=this._namespaceList.indexOf(i);r>=0&&this._namespaceList.splice(r,1)}),this.afterFlushAnimationsDone(()=>i.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let e=new Set,i=this.statesByElement.get(t);if(i)for(let r of i.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}return e}trigger(t,e,i,r){if(Aw(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,i,r),!0}return!1}insertNode(t,e,i,r){if(!Aw(e))return;let o=e[Ba];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.insertNode(e,i)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Va(t,pk)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),_h(t,pk))}removeNode(t,e,i,r){if(Aw(e)){let o=t?this._fetchNamespace(t):null;if(o?o.removeNode(e,r):this.markElementAsRemoved(t,e,!1,r),i){let s=this.namespacesByHostElement.get(e);s&&s.id!==t&&s.removeNode(e,r)}}else this._onRemovalComplete(e,r)}markElementAsRemoved(t,e,i,r,o){this.collectedLeaveElements.push(e),e[Ba]={namespaceId:t,setForRemoval:r,hasAnimation:i,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,i,r,o){return Aw(e)?this._fetchNamespace(t).listen(e,i,r,o):()=>{}}_buildInstruction(t,e,i,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,i,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,Rw,!0);e.forEach(i=>this.destroyActiveAnimationsForElement(i)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,_k,!0),e.forEach(i=>this.finishActiveQueriedAnimationOnElement(i)))}destroyActiveAnimationsForElement(t){let e=this.playersByElement.get(t);e&&e.forEach(i=>{i.queued?i.markedForDestroy=!0:i.destroy()})}finishActiveQueriedAnimationOnElement(t){let e=this.playersByQueriedElement.get(t);e&&e.forEach(i=>i.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return hu(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[Ba];if(e&&e.setForRemoval){if(t[Ba]=NG,e.namespaceId){this.destroyInnerAnimations(t);let i=this._fetchNamespace(e.namespaceId);i&&i.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(pk)&&this.markElementAsDisabled(t,!1),this.driver.query(t,".ng-animate-disabled",!0).forEach(i=>{this.markElementAsDisabled(i,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((i,r)=>this._balanceNamespaceList(i,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let i=0;i<this.collectedEnterElements.length;i++)Va(this.collectedEnterElements[i],"ng-star-inserted");if(this._namespaceList.length&&(this.totalQueuedPlayers||this.collectedLeaveElements.length)){let i=[];try{e=this._flushAnimations(i,t)}finally{for(let r=0;r<i.length;r++)i[r]()}}else for(let i=0;i<this.collectedLeaveElements.length;i++)this.processLeaveNode(this.collectedLeaveElements[i]);if(this.totalQueuedPlayers=0,this.collectedEnterElements.length=0,this.collectedLeaveElements.length=0,this._flushFns.forEach(i=>i()),this._flushFns=[],this._whenQuietFns.length){let i=this._whenQuietFns;this._whenQuietFns=[],e.length?hu(e).onDone(()=>{i.forEach(r=>r())}):i.forEach(r=>r())}}reportError(t){throw new yt(3402,!1)}_flushAnimations(t,e){let i=new Bb,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(ne=>{d.add(ne);let de=this.driver.query(ne,".ng-animate-queued",!0);for(let pe=0;pe<de.length;pe++)d.add(de[pe])});let u=this.bodyNode,p=Array.from(this.statesByElement.keys()),f=bG(p,this.collectedEnterElements),m=new Map,b=0;f.forEach((ne,de)=>{let pe=EG+b++;m.set(de,pe),ne.forEach(je=>Va(je,pe))});let M=[],y=new Set,x=new Set;for(let ne=0;ne<this.collectedLeaveElements.length;ne++){let de=this.collectedLeaveElements[ne],pe=de[Ba];pe&&pe.setForRemoval&&(M.push(de),y.add(de),pe.hasAnimation?this.driver.query(de,".ng-star-inserted",!0).forEach(je=>y.add(je)):x.add(de))}let R=new Map,A=bG(p,Array.from(y));A.forEach((ne,de)=>{let pe=gk+b++;R.set(de,pe),ne.forEach(je=>Va(je,pe))}),t.push(()=>{f.forEach((ne,de)=>{let pe=m.get(de);ne.forEach(je=>_h(je,pe))}),A.forEach((ne,de)=>{let pe=R.get(de);ne.forEach(je=>_h(je,pe))}),M.forEach(ne=>{this.processLeaveNode(ne)})});let V=[],te=[];for(let ne=this._namespaceList.length-1;ne>=0;ne--)this._namespaceList[ne].drainQueuedTransitions(e).forEach(pe=>{let je=pe.player,Ce=pe.element;if(V.push(je),this.collectedEnterElements.length){let wt=Ce[Ba];if(wt&&wt.setForMove){if(wt.previousTriggersValues&&wt.previousTriggersValues.has(pe.triggerName)){let on=wt.previousTriggersValues.get(pe.triggerName),ve=this.statesByElement.get(pe.element);if(ve&&ve.has(pe.triggerName)){let mt=ve.get(pe.triggerName);mt.value=on,ve.set(pe.triggerName,mt)}}return void je.destroy()}}let Ne=!u||!this.driver.containsElement(u,Ce),lt=R.get(Ce),Mt=m.get(Ce),pt=this._buildInstruction(pe,i,Mt,lt,Ne);if(pt.errors&&pt.errors.length)return void te.push(pt);if(Ne)return je.onStart(()=>tf(Ce,pt.fromStyles)),je.onDestroy(()=>Cc(Ce,pt.toStyles)),void r.push(je);if(pe.isFallbackTransition)return je.onStart(()=>tf(Ce,pt.fromStyles)),je.onDestroy(()=>Cc(Ce,pt.toStyles)),void r.push(je);let Oe=[];pt.timelines.forEach(wt=>{wt.stretchStartingKeyframe=!0,this.disabledNodes.has(wt.element)||Oe.push(wt)}),pt.timelines=Oe,i.append(Ce,pt.timelines),s.push({instruction:pt,player:je,element:Ce}),pt.queriedElements.forEach(wt=>ca(a,wt,[]).push(je)),pt.preStyleProps.forEach((wt,on)=>{if(wt.size){let ve=l.get(on);ve||l.set(on,ve=new Set),wt.forEach((mt,ft)=>ve.add(ft))}}),pt.postStyleProps.forEach((wt,on)=>{let ve=c.get(on);ve||c.set(on,ve=new Set),wt.forEach((mt,ft)=>ve.add(ft))})});if(te.length){let ne=[];te.forEach(de=>{ne.push(new yt(3505,!1))}),V.forEach(de=>de.destroy()),this.reportError(ne)}let K=new Map,xe=new Map;s.forEach(ne=>{let de=ne.element;i.has(de)&&(xe.set(de,de),this._beforeAnimationBuild(ne.player.namespaceId,ne.instruction,K))}),r.forEach(ne=>{let de=ne.element;this._getPreviousPlayers(de,!1,ne.namespaceId,ne.triggerName,null).forEach(je=>{ca(K,de,[]).push(je),je.destroy()})});let Xe=M.filter(ne=>vG(ne,l,c)),De=new Map;_G(De,this.driver,x,c,xc).forEach(ne=>{vG(ne,l,c)&&Xe.push(ne)});let re=new Map;f.forEach((ne,de)=>{_G(re,this.driver,new Set(ne),l,Ew)}),Xe.forEach(ne=>{let de=De.get(ne),pe=re.get(ne);De.set(ne,new Map([...Array.from(de?.entries()??[]),...Array.from(pe?.entries()??[])]))});let ce=[],fe=[],be={};s.forEach(ne=>{let{element:de,player:pe,instruction:je}=ne;if(i.has(de)){if(d.has(de))return pe.onDestroy(()=>Cc(de,je.toStyles)),pe.disabled=!0,pe.overrideTotalTime(je.totalTime),void r.push(pe);let Ce=be;if(xe.size>1){let lt=de,Mt=[];for(;lt=lt.parentNode;){let pt=xe.get(lt);if(pt){Ce=pt;break}Mt.push(lt)}Mt.forEach(pt=>xe.set(pt,Ce))}let Ne=this._buildAnimation(pe.namespaceId,je,K,o,re,De);if(pe.setRealPlayer(Ne),Ce===be)ce.push(pe);else{let lt=this.playersByElement.get(Ce);lt&&lt.length&&(pe.parentPlayer=hu(lt)),r.push(pe)}}else tf(de,je.fromStyles),pe.onDestroy(()=>Cc(de,je.toStyles)),fe.push(pe),d.has(de)&&r.push(pe)}),fe.forEach(ne=>{let de=o.get(ne.element);if(de&&de.length){let pe=hu(de);ne.setRealPlayer(pe)}}),r.forEach(ne=>{ne.parentPlayer?ne.syncPlayerEvents(ne.parentPlayer):ne.destroy()});for(let ne=0;ne<M.length;ne++){let de=M[ne],pe=de[Ba];if(_h(de,gk),pe&&pe.hasAnimation)continue;let je=[];if(a.size){let Ne=a.get(de);Ne&&Ne.length&&je.push(...Ne);let lt=this.driver.query(de,_k,!0);for(let Mt=0;Mt<lt.length;Mt++){let pt=a.get(lt[Mt]);pt&&pt.length&&je.push(...pt)}}let Ce=je.filter(Ne=>!Ne.destroyed);Ce.length?Kfe(this,de,Ce):this.processLeaveNode(de)}return M.length=0,ce.forEach(ne=>{this.players.push(ne),ne.onDone(()=>{ne.destroy();let de=this.players.indexOf(ne);this.players.splice(de,1)}),ne.play()}),ce}elementContainsData(t,e){let i=!1,r=e[Ba];return r&&r.setForRemoval&&(i=!0),this.playersByElement.has(e)&&(i=!0),this.playersByQueriedElement.has(e)&&(i=!0),this.statesByElement.has(e)&&(i=!0),this._fetchNamespace(t).elementContainsData(e)||i}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,i,r,o){let s=[];if(e){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let l=!o||o==Nb;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(i||r)&&(s=s.filter(a=>!(i&&i!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,i){let o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:e.triggerName;for(let l of e.timelines){let c=l.element,d=c!==o,u=ca(i,c,[]);this._getPreviousPlayers(c,d,s,a,e.toState).forEach(f=>{let m=f.getRealPlayer();m.beforeDestroy&&m.beforeDestroy(),f.destroy(),u.push(f)})}tf(o,e.fromStyles)}_buildAnimation(t,e,i,r,o,s){let a=e.triggerName,l=e.element,c=[],d=new Set,u=new Set,p=e.timelines.map(m=>{let b=m.element;d.add(b);let M=b[Ba];if(M&&M.removedBeforeQueried)return new mu(m.duration,m.delay);let y=b!==l,x=function(n){let t=[];return LG(n,t),t}((i.get(b)||qfe).map(K=>K.getRealPlayer())).filter(K=>!!K.element&&K.element===b),R=o.get(b),A=s.get(b),V=yG(0,this._normalizer,0,m.keyframes,R,A),te=this._buildPlayer(m,V,x);if(m.subTimeline&&r&&u.add(b),y){let K=new zb(t,a,b);K.setRealPlayer(te),c.push(K)}return te});c.forEach(m=>{ca(this.playersByQueriedElement,m.element,[]).push(m),m.onDone(()=>function(n,t,e){let i=n.get(t);if(i){if(i.length){let r=i.indexOf(e);i.splice(r,1)}0==i.length&&n.delete(t)}return i}(this.playersByQueriedElement,m.element,m))}),d.forEach(m=>Va(m,lG));let f=hu(p);return f.onDestroy(()=>{d.forEach(m=>_h(m,lG)),Cc(l,e.toStyles)}),u.forEach(m=>{ca(r,m,[]).push(f)}),f}_buildPlayer(t,e,i){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,i):new mu(t.duration,t.delay)}}(t,e,i),this._timelineEngine=new class{constructor(t,e,i){this.bodyNode=t,this._driver=e,this._normalizer=i,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){let i=[],r=[],o=kG(this._driver,e,i,r);if(i.length)throw new yt(3503,!1);this._animations.set(t,o)}_buildPlayer(t,e,i){let r=t.element,o=yG(0,this._normalizer,0,t.keyframes,e,i);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,i={}){let s,r=[],o=this._animations.get(t),a=new Map;if(o?(s=FG(this._driver,e,o,EG,gk,new Map,new Map,i,zfe,r),s.forEach(d=>{let u=ca(a,d.element,new Map);d.postStyleProps.forEach(p=>u.set(p,null))})):(r.push(new yt(3300,!1)),s=[]),r.length)throw new yt(3504,!1);a.forEach((d,u)=>{d.forEach((p,f)=>{d.set(f,this._driver.computeStyle(u,f,xc))})});let c=hu(s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}));return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){let e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);let i=this.players.indexOf(e);i>=0&&this.players.splice(i,1)}_getPlayer(t){let e=this._playersById.get(t);if(!e)throw new yt(3301,!1);return e}listen(t,e,i,r){let o=Rk(e,"","","");return Ak(this._getPlayer(t),i,o,r),()=>{}}command(t,e,i,r){if("register"==i)return void this.register(t,r[0]);if("create"==i)return void this.create(t,e,r[0]||{});let o=this._getPlayer(t);switch(i){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t)}}}(t,e,i),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,i,r,o){let s=t+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],d=kG(this._driver,o,l,c);if(l.length)throw new yt(3404,!1);a=function(n,t,e){return new class{constructor(t,e,i){this.name=t,this.ast=e,this._normalizer=i,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new class{constructor(t,e,i){this.styles=t,this.defaultParams=e,this.normalizer=i}buildStyles(t,e){let i=new Map,r=jb(this.defaultParams);return Object.keys(t).forEach(o=>{let s=t[o];null!==s&&(r[o]=s)}),this.styles.styles.forEach(o=>{"string"!=typeof o&&o.forEach((s,a)=>{s&&(s=Lb(s,r,e));let l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),i.set(a,s)})}),i}}(r.style,o,i))}),mG(this.states,"true","1"),mG(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new Lw(t,r,this.states))}),this.fallbackTransition=function(n,t,e){return new Lw(n,{type:1,animation:{type:2,steps:[],options:null},matchers:[(s,a)=>!0],options:null,queryCount:0,depCount:0},t)}(t,this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,i,r){return this.transitionFactories.find(s=>s.match(t,e,i,r))||null}matchStyles(t,e,i){return this.fallbackTransition.buildStyles(t,e,i)}}(n,t,e)}(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,i,r){this._transitionEngine.insertNode(t,e,i,r)}onRemove(t,e,i,r){this._transitionEngine.removeNode(t,e,r||!1,i)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,i,r){if("@"==i.charAt(0)){let[o,s]=sG(i);this._timelineEngine.command(o,e,s,r)}else this._transitionEngine.trigger(t,e,i,r)}listen(t,e,i,r,o){if("@"==i.charAt(0)){let[s,a]=sG(i);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,i,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}},tme=(()=>{class n{constructor(e,i,r){this._element=e,this._startStyles=i,this._endStyles=r,this._state=0;let o=n.initialStylesByElement.get(e);o||n.initialStylesByElement.set(e,o=new Map),this._initialStyles=o}start(){this._state<1&&(this._startStyles&&Cc(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(Cc(this._element,this._initialStyles),this._endStyles&&(Cc(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(n.initialStylesByElement.delete(this._element),this._startStyles&&(tf(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(tf(this._element,this._endStyles),this._endStyles=null),Cc(this._element,this._initialStyles),this._state=3)}}return n.initialStylesByElement=new WeakMap,n})();function mk(n){let t=null;return n.forEach((e,i)=>{(function(n){return"display"===n||"position"===n})(i)&&(t=t||new Map,t.set(i,e))}),t}var Bw=class{constructor(t,e,i,r){this.element=t,this.keyframes=e,this.options=i,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=i.duration,this._delay=i.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map,this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let e=[];return t.forEach(i=>{e.push(Object.fromEntries(i))}),e}_triggerWebAnimation(t,e,i){return t.animate(this._convertKeyframesToObject(e),i)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){void 0===this.domPlayer&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((i,r)=>{"offset"!==r&&t.set(r,this._finished?i:AG(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){let e="start"===t?this._onStartFns:this._onDoneFns;e.forEach(i=>i()),e.length=0}},rme=(()=>{class n extends Rb{constructor(e,i){super(),this._nextAnimationId=0,this._renderer=e.createRenderer(i.body,{id:"0",encapsulation:ra.None,styles:[],data:{animation:[]}})}build(e){let i=this._nextAnimationId.toString();this._nextAnimationId++;let r=Array.isArray(e)?Sw(e):e;return VG(this._renderer,null,i,"register",[r]),new Nk(i,this._renderer)}}return n.\u0275fac=function(e){return new(e||n)(k(fc),k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Nk=class extends ww{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Lk(this._id,t,e||{},this._renderer)}},Lk=class{constructor(t,e,i,r){this.id=t,this.element=e,this._renderer=r,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",i)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return VG(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset"),this._started=!1}setPosition(t){this._command("setPosition",t)}getPosition(){return this._renderer.engine.players[+this.id]?.getPosition()??0}};function VG(n,t,e,i,r){return n.setProperty(t,`@@${e}:${i}`,r)}var HG="@.disabled",ome=(()=>{class n{constructor(e,i,r){this.delegate=e,this.engine=i,this._zone=r,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),i.onRemovalComplete=(o,s)=>{let a=s?.parentNode(o);a&&s.removeChild(a,o)}}createRenderer(e,i){let o=this.delegate.createRenderer(e,i);if(!(e&&i&&i.data&&i.data.animation)){let d=this._rendererCache.get(o);return d||(d=new zw("",o,this.engine,()=>this._rendererCache.delete(o)),this._rendererCache.set(o,d)),d}let s=i.id,a=i.id+"-"+this._currentId;this._currentId++,this.engine.register(a,e);let l=d=>{Array.isArray(d)?d.forEach(l):this.engine.registerTrigger(s,a,e,d.name,d)};return i.data.animation.forEach(l),new Bk(this,a,o,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(e,i,r){e>=0&&e<this._microtaskId?this._zone.run(()=>i(r)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([i,r]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return n.\u0275fac=function(e){return new(e||n)(k(fc),k(gu),k(at))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),zw=class{constructor(t,e,i,r){this.namespaceId=t,this.delegate=e,this.engine=i,this._onDestroy=r,this.destroyNode=this.delegate.destroyNode?o=>e.destroyNode(o):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy(),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,i,r=!0){this.delegate.insertBefore(t,e,i),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,i){this.engine.onRemove(this.namespaceId,e,this.delegate,i)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,i,r){this.delegate.setAttribute(t,e,i,r)}removeAttribute(t,e,i){this.delegate.removeAttribute(t,e,i)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,i,r){this.delegate.setStyle(t,e,i,r)}removeStyle(t,e,i){this.delegate.removeStyle(t,e,i)}setProperty(t,e,i){"@"==e.charAt(0)&&e==HG?this.disableAnimations(t,!!i):this.delegate.setProperty(t,e,i)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,i){return this.delegate.listen(t,e,i)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}},Bk=class extends zw{constructor(t,e,i,r,o){super(e,i,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,i){"@"==e.charAt(0)?"."==e.charAt(1)&&e==HG?this.disableAnimations(t,i=void 0===i||!!i):this.engine.process(this.namespaceId,t,e.slice(1),i):this.delegate.setProperty(t,e,i)}listen(t,e,i){if("@"==e.charAt(0)){let r=function(n){switch(n){case"body":return document.body;case"document":return document;case"window":return window;default:return n}}(t),o=e.slice(1),s="";return"@"!=o.charAt(0)&&([o,s]=function(n){let t=n.indexOf(".");return[n.substring(0,t),n.slice(t+1)]}(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{this.factory.scheduleListenerCallback(a._data||-1,i,a)})}return this.delegate.listen(t,e,i)}},lme=(()=>{class n extends gu{constructor(e,i,r,o){super(e.body,i,r)}ngOnDestroy(){this.flush()}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(Ub),k(nf),k(yc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),zG=[{provide:Rb,useClass:rme},{provide:nf,useFactory:function(){return new Nw}},{provide:gu,useClass:lme},{provide:fc,useFactory:function(n,t,e){return new ome(n,t,e)},deps:[Tb,gu,at]}],BG=[{provide:Ub,useFactory:()=>new class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}matchesElement(t,e){return!1}containsElement(t,e){return MG(t,e)}getParentElement(t){return Pk(t)}query(t,e,i){return wG(t,e,i)}computeStyle(t,e,i){return window.getComputedStyle(t)[e]}animate(t,e,i,r,o,s=[]){let l={duration:i,delay:r,fill:0==r?"both":"forwards"};o&&(l.easing=o);let c=new Map,d=s.filter(f=>f instanceof Bw);(function(n,t){return 0===n||0===t})(i,r)&&d.forEach(f=>{f.currentSnapshot.forEach((m,b)=>c.set(b,m))});let u=(n=e,n.length?n[0]instanceof Map?n:n.map(t=>TG(t)):[]).map(f=>bh(f));var n;u=function(n,t,e){if(e.size&&t.length){let i=t[0],r=[];if(e.forEach((o,s)=>{i.has(s)||r.push(s),i.set(s,o)}),r.length)for(let o=1;o<t.length;o++){let s=t[o];r.forEach(a=>s.set(a,AG(n,a)))}}return t}(t,u,c);let p=function(n,t){let e=null,i=null;return Array.isArray(t)&&t.length?(e=mk(t[0]),t.length>1&&(i=mk(t[t.length-1]))):t instanceof Map&&(e=mk(t)),e||i?new tme(n,e,i):null}(t,u);return new Bw(t,u,l,p)}}},{provide:hi,useValue:"BrowserAnimations"},...zG],ume=[{provide:Ub,useClass:Ok},{provide:hi,useValue:"NoopAnimations"},...zG],UG=(()=>{class n{static withConfig(e){return{ngModule:n,providers:e.disableAnimations?ume:BG}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:BG,imports:[Mw]}),n})(),Uk={};function _e(n,t){if(Uk[n]=(Uk[n]||0)+1,"function"==typeof t)return Vk(n,(...i)=>({...t(...i),type:n}));switch(t?t._as:"empty"){case"empty":return Vk(n,()=>({type:n}));case"props":return Vk(n,i=>({...i,type:n}));default:throw new Error("Unexpected config.")}}function Vk(n,t){return Object.defineProperty(t,"type",{value:n,writable:!1})}var r8="@ngrx/store/init",xh=(()=>{class n extends Ai{constructor(){super({type:r8})}next(e){if("function"==typeof e)throw new TypeError("\n        Dispatch expected an object, instead it received a function.\n        If you're using the createAction function, make sure to invoke the function\n        before dispatching the action. For example, someAction should be someAction().");if(typeof e>"u")throw new TypeError("Actions must be objects");if(typeof e.type>"u")throw new TypeError("Actions must have a type property");super.next(e)}complete(){}ngOnDestroy(){super.complete()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),pme=[xh],o8=new ie("@ngrx/store Internal Root Guard"),jG=new ie("@ngrx/store Internal Initial State"),qk=new ie("@ngrx/store Initial State"),s8=new ie("@ngrx/store Reducer Factory"),GG=new ie("@ngrx/store Internal Reducer Factory Provider"),a8=new ie("@ngrx/store Initial Reducers"),Hk=new ie("@ngrx/store Internal Initial Reducers"),WG=new ie("@ngrx/store Store Features"),qG=new ie("@ngrx/store Internal Store Reducers"),zk=new ie("@ngrx/store Internal Feature Reducers"),YG=new ie("@ngrx/store Internal Feature Configs"),l8=new ie("@ngrx/store Internal Store Features"),XG=new ie("@ngrx/store Internal Feature Reducers Token"),c8=new ie("@ngrx/store Feature Reducers"),QG=new ie("@ngrx/store User Provided Meta Reducers"),yh=new ie("@ngrx/store Meta Reducers"),ZG=new ie("@ngrx/store Internal Resolved Meta Reducers"),KG=new ie("@ngrx/store User Runtime Checks Config"),JG=new ie("@ngrx/store Internal User Runtime Checks Config"),Gb=new ie("@ngrx/store Internal Runtime Checks"),Yk=new ie("@ngrx/store Check if Action types are unique");function rf(n,t={}){let e=Object.keys(n),i={};for(let o=0;o<e.length;o++){let s=e[o];"function"==typeof n[s]&&(i[s]=n[s])}let r=Object.keys(i);return function(s,a){s=void 0===s?t:s;let l=!1,c={};for(let d=0;d<r.length;d++){let u=r[d],f=s[u],m=(0,i[u])(f,a);c[u]=m,l=l||m!==f}return l?c:s}}function d8(...n){return function(t){if(0===n.length)return t;let e=n[n.length-1];return n.slice(0,-1).reduceRight((r,o)=>o(r),e(t))}}function u8(n,t){return Array.isArray(t)&&t.length>0&&(n=d8.apply(null,[...t,n])),(e,i)=>{let r=n(e);return(o,s)=>r(o=void 0===o?i:o,s)}}new ie("@ngrx/store Root Store Provider"),new ie("@ngrx/store Feature State Provider");var Wb=class extends Kt{},Uw=class extends xh{},jw=(()=>{class n extends Ai{constructor(e,i,r,o){super(o(r,i)),this.dispatcher=e,this.initialState=i,this.reducers=r,this.reducerFactory=o}get currentReducers(){return this.reducers}addFeature(e){this.addFeatures([e])}addFeatures(e){let i=e.reduce((r,{reducers:o,reducerFactory:s,metaReducers:a,initialState:l,key:c})=>{let d="function"==typeof o?function(n){let t=Array.isArray(n)&&n.length>0?d8(...n):e=>e;return(e,i)=>(e=t(e),(r,o)=>e(r=void 0===r?i:r,o))}(a)(o,l):u8(s,a)(o,l);return r[c]=d,r},{});this.addReducers(i)}removeFeature(e){this.removeFeatures([e])}removeFeatures(e){this.removeReducers(e.map(i=>i.key))}addReducer(e,i){this.addReducers({[e]:i})}addReducers(e){this.reducers={...this.reducers,...e},this.updateReducers(Object.keys(e))}removeReducer(e){this.removeReducers([e])}removeReducers(e){e.forEach(i=>{this.reducers=function(n,t){return Object.keys(n).filter(e=>e!==t).reduce((e,i)=>Object.assign(e,{[i]:n[i]}),{})}(this.reducers,i)}),this.updateReducers(e)}updateReducers(e){this.next(this.reducerFactory(this.reducers,this.initialState)),this.dispatcher.next({type:"@ngrx/store/update-reducers",features:e})}ngOnDestroy(){this.complete()}}return n.\u0275fac=function(e){return new(e||n)(k(Uw),k(qk),k(a8),k(s8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),bme=[jw,{provide:Wb,useExisting:jw},{provide:Uw,useExisting:xh}],qb=(()=>{class n extends Ie{ngOnDestroy(){this.complete()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),vme=[qb],Gw=class extends Kt{},$G=(()=>{class n extends Ai{constructor(e,i,r,o){super(o);let c=e.pipe(Pp(qA)).pipe(Bt(i)).pipe(function(n,t){return qt(function(n,t,e,i,r){return(o,s)=>{let a=e,l=t,c=0;o.subscribe(Vt(s,d=>{let u=c++;l=a?n(l,d,u):(a=!0,d),s.next(l)},void 0))}}(n,t,arguments.length>=2))}(yme,{state:o}));this.stateSubscription=c.subscribe(({state:d,action:u})=>{this.next(d),r.next(u)})}ngOnDestroy(){this.stateSubscription.unsubscribe(),this.complete()}}return n.INIT=r8,n.\u0275fac=function(e){return new(e||n)(k(xh),k(Wb),k(qb),k(qk))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function yme(n={state:void 0},[t,e]){let{state:i}=n;return{state:e(i,t),action:t}}var xme=[$G,{provide:Gw,useExisting:$G}],Ae=(()=>{class n extends Kt{constructor(e,i,r){super(),this.actionsObserver=i,this.reducerManager=r,this.source=e}select(e,...i){return un.call(null,e,...i)(this)}lift(e){let i=new n(this,this.actionsObserver,this.reducerManager);return i.operator=e,i}dispatch(e){this.actionsObserver.next(e)}next(e){this.actionsObserver.next(e)}error(e){this.actionsObserver.error(e)}complete(){this.actionsObserver.complete()}addReducer(e,i){this.reducerManager.addReducer(e,i)}removeReducer(e){this.reducerManager.removeReducer(e)}}return n.\u0275fac=function(e){return new(e||n)(k(Gw),k(xh),k(jw))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Cme=[Ae];function un(n,t,...e){return function(r){let o;if("string"==typeof n){let s=[t,...e].filter(Boolean);o=r.pipe(function(...n){let t=n.length;if(0===t)throw new Error("list of properties cannot be empty.");return N(e=>{let i=e;for(let r=0;r<t;r++){let o=i?.[n[r]];if(!(typeof o<"u"))return;i=o}return i})}(n,...s))}else{if("function"!=typeof n)throw new TypeError(`Unexpected type '${typeof n}' in select operator, expected 'string' or 'function'`);o=r.pipe(N(s=>n(s,t)))}return o.pipe(Yn())}}var Xk="https://ngrx.io/guide/store/configuration/runtime-checks";function e8(n){return void 0===n}function t8(n){return null===n}function p8(n){return Array.isArray(n)}function f8(n){return"object"==typeof n&&null!==n}function jk(n){return"function"==typeof n}function n8(n,t){return n===t}function m8(n,t=n8,e=n8){let o,i=null,r=null;return{memoized:function(){if(void 0!==o)return o.result;if(!i)return r=n.apply(null,arguments),i=arguments,r;if(!function(n,t,e){for(let i=0;i<n.length;i++)if(!e(n[i],t[i]))return!0;return!1}(arguments,i,t))return r;let d=n.apply(null,arguments);return i=arguments,e(r,d)?r:(r=d,d)},reset:function(){i=null,r=null},setResult:function(d){o={result:d}},clearResult:function(){o=void 0}}}function q(...n){return function(n,t={stateFn:Ome}){return function(...e){let i=e;if(Array.isArray(i[0])){let[d,...u]=i;i=[...d,...u]}else 1===i.length&&function(n){return!!n&&"object"==typeof n&&Object.values(n).every(t=>"function"==typeof t)}(i[0])&&(i=function(n){let t=Object.values(n),e=Object.keys(n);return[...t,(...r)=>e.reduce((o,s,a)=>({...o,[s]:r[a]}),{})]}(i[0]));let r=i.slice(0,i.length-1),o=i[i.length-1],s=r.filter(d=>d.release&&"function"==typeof d.release),a=n(function(...d){return o.apply(null,d)}),l=m8(function(d,u){return t.stateFn.apply(null,[d,r,u,a])});return Object.assign(l.memoized,{release:function(){l.reset(),a.reset(),s.forEach(d=>d.release())},projector:a.memoized,setResult:l.setResult,clearResult:l.clearResult})}}(m8)(...n)}function Ome(n,t,e,i){if(void 0===e){let o=t.map(s=>s(n));return i.memoized.apply(null,o)}let r=t.map(o=>o(n,e));return i.memoized.apply(null,[...r,e])}function Er(n){return q(t=>t[n],t=>t)}function Lme(n){return n instanceof ie?ai(n):n}function Bme(n,t){return t.map((e,i)=>{if(n[i]instanceof ie){let r=ai(n[i]);return{key:e.key,reducerFactory:r.reducerFactory?r.reducerFactory:rf,metaReducers:r.metaReducers?r.metaReducers:[],initialState:r.initialState}}return e})}function Vme(n){return n.map(t=>t instanceof ie?ai(t):t)}function h8(n){return"function"==typeof n?n():n}function Hme(n,t){return n.concat(t)}function zme(){if(ai(Ae,{optional:!0,skipSelf:!0}))throw new TypeError("The root Store has been provided more than once. Feature modules should provide feature states instead.");return"guarded"}function Gk(n){Object.freeze(n);let t=jk(n);return Object.getOwnPropertyNames(n).forEach(e=>{if(!e.startsWith("\u0275")&&function(n,t){return Object.prototype.hasOwnProperty.call(n,t)}(n,e)&&(!t||"caller"!==e&&"callee"!==e&&"arguments"!==e)){let i=n[e];(f8(i)||jk(i))&&!Object.isFrozen(i)&&Gk(i)}}),n}function Wk(n,t=[]){return(e8(n)||t8(n))&&0===t.length?{path:["root"],value:n}:Object.keys(n).reduce((i,r)=>{if(i)return i;let o=n[r];return function(n){return jk(n)&&n.hasOwnProperty("\u0275cmp")}(o)?i:!(e8(o)||t8(o)||function(n){return"number"==typeof n}(o)||function(n){return"boolean"==typeof n}(o)||function(n){return"string"==typeof n}(o)||p8(o))&&(function(n){if(!function(n){return f8(n)&&!p8(n)}(n))return!1;let t=Object.getPrototypeOf(n);return t===Object.prototype||null===t}(o)?Wk(o,[...t,r]):{path:[...t,r],value:o})},!1)}function i8(n,t){if(!1===n)return;let e=n.path.join("."),i=new Error(`Detected unserializable ${t} at "${e}". ${Xk}#strict${t}serializability`);throw i.value=n.value,i.unserializablePath=e,i}function Wme(n){return{strictStateSerializability:!1,strictActionSerializability:!1,strictStateImmutability:!1,strictActionImmutability:!1,strictActionWithinNgZone:!1,strictActionTypeUniqueness:!1}}function qme({strictActionSerializability:n,strictStateSerializability:t}){return e=>n||t?function(n,t){return function(e,i){t.action(i)&&i8(Wk(i),"action");let r=n(e,i);return t.state()&&i8(Wk(r),"state"),r}}(e,{action:i=>n&&!Qk(i),state:()=>t}):e}function Yme({strictActionImmutability:n,strictStateImmutability:t}){return e=>n||t?function(n,t){return function(e,i){let r=t.action(i)?Gk(i):i,o=n(e,r);return t.state()?Gk(o):o}}(e,{action:i=>n&&!Qk(i),state:()=>t}):e}function Qk(n){return n.type.startsWith("@ngrx")}function Xme({strictActionWithinNgZone:n}){return t=>n?function(n,t){return function(e,i){if(t.action(i)&&!at.isInAngularZone())throw new Error(`Action '${i.type}' running outside NgZone. ${Xk}#strictactionwithinngzone`);return n(e,i)}}(t,{action:e=>n&&!Qk(e)}):t}function Qme(n){return[{provide:JG,useValue:n},{provide:KG,useFactory:Zme,deps:[JG]},{provide:Gb,deps:[KG],useFactory:Wme},{provide:yh,multi:!0,deps:[Gb],useFactory:Yme},{provide:yh,multi:!0,deps:[Gb],useFactory:qme},{provide:yh,multi:!0,deps:[Gb],useFactory:Xme}]}function g8(){return[{provide:Yk,multi:!0,deps:[Gb],useFactory:Kme}]}function Zme(n){return n}function Kme(n){if(!n.strictActionTypeUniqueness)return;let t=Object.entries(Uk).filter(([,e])=>e>1).map(([e])=>e);if(t.length)throw new Error(`Action types are registered more than once, ${t.map(e=>`"${e}"`).join(", ")}. ${Xk}#strictactiontypeuniqueness`)}function Jme(n={},t={}){return[{provide:o8,useFactory:zme},{provide:jG,useValue:t.initialState},{provide:qk,useFactory:h8,deps:[jG]},{provide:Hk,useValue:n},{provide:qG,useExisting:n instanceof ie?n:Hk},{provide:a8,deps:[Hk,[new nh(qG)]],useFactory:Lme},{provide:QG,useValue:t.metaReducers?t.metaReducers:[]},{provide:ZG,deps:[yh,QG],useFactory:Hme},{provide:GG,useValue:t.reducerFactory?t.reducerFactory:rf},{provide:s8,deps:[GG,ZG],useFactory:u8},pme,bme,vme,xme,Cme,Qme(t.runtimeChecks),g8()]}function $me(n,t,e={}){return[{provide:YG,multi:!0,useValue:n instanceof Object?{}:e},{provide:WG,multi:!0,useValue:{key:n instanceof Object?n.name:n,reducerFactory:e instanceof ie||!e.reducerFactory?rf:e.reducerFactory,metaReducers:e instanceof ie||!e.metaReducers?[]:e.metaReducers,initialState:e instanceof ie||!e.initialState?void 0:e.initialState}},{provide:l8,deps:[YG,WG],useFactory:Bme},{provide:zk,multi:!0,useValue:n instanceof Object?n.reducer:t},{provide:XG,multi:!0,useExisting:t instanceof ie?t:zk},{provide:c8,multi:!0,deps:[zk,[new nh(XG)]],useFactory:Vme},g8()]}var Yb=(()=>{class n{constructor(e,i,r,o,s,a){}}return n.\u0275fac=function(e){return new(e||n)(k(xh),k(Wb),k(qb),k(Ae),k(o8,8),k(Yk,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Ww=(()=>{class n{constructor(e,i,r,o,s){this.features=e,this.featureReducers=i,this.reducerManager=r;let a=e.map((l,c)=>{let u=i.shift()[c];return{...l,reducers:u,initialState:h8(l.initialState)}});r.addFeatures(a)}ngOnDestroy(){this.reducerManager.removeFeatures(this.features)}}return n.\u0275fac=function(e){return new(e||n)(k(l8),k(c8),k(jw),k(Yb),k(Yk,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Tr=(()=>{class n{static forRoot(e,i){return{ngModule:Yb,providers:[...Jme(e,i)]}}static forFeature(e,i,r={}){return{ngModule:Ww,providers:[...$me(e,i,r)]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})();function ye(...n){return{reducer:n.pop(),types:n.map(i=>i.type)}}function br(n,...t){let e=new Map;for(let i of t)for(let r of i.types){let o=e.get(r);e.set(r,o?(a,l)=>i.reducer(o(a,l),l):i.reducer)}return function(i=n,r){let o=e.get(r.type);return o?o(i,r):i}}var ehe={dispatch:!0,functional:!1,useEffectsErrorHandler:!0},Yw="__@ngrx/effects_create__";function ar(n,t={}){let e=t.functional?n:n(),i={...ehe,...t};return Object.defineProperty(e,Yw,{value:i}),e}function y8(n){return Object.getPrototypeOf(n)}function x8(n){return"function"==typeof n}function _8(n){return n.filter(x8)}function rhe(n,t,e){let i=y8(n).constructor.name,r=function(n){return function(n){return Object.getOwnPropertyNames(n).filter(i=>!(!n[i]||!n[i].hasOwnProperty(Yw))&&n[i][Yw].hasOwnProperty("dispatch")).map(i=>({propertyName:i,...n[i][Yw]}))}(n)}(n).map(({propertyName:o,dispatch:s,useEffectsErrorHandler:a})=>{let l="function"==typeof n[o]?n[o]():n[o],c=a?e(l,t):l;return!1===s?c.pipe(I_()):c.pipe(qt((n,t)=>{n.subscribe(Vt(t,e=>{t.next(wa.createNext(e))},()=>{t.next(wa.createComplete()),t.complete()},e=>{t.next(wa.createError(e)),t.complete()}))})).pipe(N(u=>({effect:n[o],notification:u,propertyName:o,sourceName:i,sourceInstance:n})))});return tn(...r)}var ohe=10;function C8(n,t,e=ohe){return n.pipe(zr(i=>(t&&t.handleError(i),e<=1?n:C8(n,t,e-1))))}var xo=(()=>{class n extends Kt{constructor(e){super(),e&&(this.source=e)}lift(e){let i=new n;return i.source=this,i.operator=e,i}}return n.\u0275fac=function(e){return new(e||n)(k(qb))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function ei(...n){return ke(t=>n.some(e=>"string"==typeof e?e===t.type:e.type===t.type))}var M8=new ie("@ngrx/effects Internal Root Guard"),qw=new ie("@ngrx/effects User Provided Effects"),Zk=new ie("@ngrx/effects Internal Root Effects"),w8=new ie("@ngrx/effects Internal Root Effects Instances"),b8=new ie("@ngrx/effects Internal Feature Effects"),S8=new ie("@ngrx/effects Internal Feature Effects Instance Groups"),she=new ie("@ngrx/effects Effects Error Handler",{providedIn:"root",factory:()=>C8}),E8="@ngrx/effects/init";_e(E8);var uhe="ngrxOnIdentifyEffects",hhe="ngrxOnInitEffects";function ghe(n){return Kk(n,hhe)}function Kk(n,t){return n&&t in n&&"function"==typeof n[t]}var T8=(()=>{class n extends Ie{constructor(e,i){super(),this.errorHandler=e,this.effectsErrorHandler=i}addEffects(e){this.next(e)}toActions(){return this.pipe(LC(e=>function(n){return"Object"!==n.constructor.name&&"Function"!==n.constructor.name}(e)?y8(e):e),hn(e=>e.pipe(LC(_he))),hn(e=>{let i=e.pipe(FC(o=>function(n,t){return e=>{let i=rhe(e,n,t);return function(n){return Kk(n,"ngrxOnRunEffects")}(e)?e.ngrxOnRunEffects(i):i}}(this.errorHandler,this.effectsErrorHandler)(o)),N(o=>(function(n,t){if("N"===n.notification.kind){let e=n.notification.value;!function(n){return"function"!=typeof n&&n&&n.type&&"string"==typeof n.type}(e)&&t.handleError(new Error(`Effect ${function({propertyName:n,sourceInstance:t,sourceName:e}){let i="function"==typeof t[n];return`"${e}.${String(n)}${i?"()":""}"`}(n)} dispatched an invalid action: ${function(n){try{return JSON.stringify(n)}catch{return n}}(e)}`))}}(o,this.errorHandler),o.notification)),ke(o=>"N"===o.kind&&null!=o.value),qt((n,t)=>{n.subscribe(Vt(t,e=>ZA(e,t)))}));return tn(i,e.pipe(Yt(1),ke(ghe),N(o=>o.ngrxOnInitEffects())))}))}}return n.\u0275fac=function(e){return new(e||n)(k(rs),k(she))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function _he(n){return function(n){return Kk(n,uhe)}(n)?n.ngrxOnIdentifyEffects():""}var D8=(()=>{class n{constructor(e,i){this.effectSources=e,this.store=i,this.effectsSubscription=null}get isStarted(){return!!this.effectsSubscription}start(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))}ngOnDestroy(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(k(T8),k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),I8=(()=>{class n{constructor(e,i,r,o,s,a,l){this.sources=e,i.start();for(let c of o)e.addEffects(c);r.dispatch({type:E8})}addEffects(e){this.sources.addEffects(e)}}return n.\u0275fac=function(e){return new(e||n)(k(T8),k(D8),k(Ae),k(w8),k(Yb,8),k(Ww,8),k(M8,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),vhe=(()=>{class n{constructor(e,i,r,o){let s=i.flat();for(let a of s)e.addEffects(a)}}return n.\u0275fac=function(e){return new(e||n)(k(I8),k(S8),k(Yb,8),k(Ww,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),to=(()=>{class n{static forFeature(...e){let i=e.flat(),r=_8(i);return{ngModule:vhe,providers:[r,{provide:b8,multi:!0,useValue:i},{provide:qw,multi:!0,useValue:[]},{provide:S8,multi:!0,useFactory:v8,deps:[b8,qw]}]}}static forRoot(...e){let i=e.flat(),r=_8(i);return{ngModule:I8,providers:[r,{provide:Zk,useValue:[i]},{provide:M8,useFactory:yhe},{provide:qw,multi:!0,useValue:[]},{provide:w8,useFactory:v8,deps:[Zk,qw]}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})();function v8(n,t){let e=[];for(let i of n)e.push(...i);for(let i of t)e.push(...i);return e.map(i=>x8(i)?ai(i):i)}function yhe(){let n=ai(D8,{optional:!0,skipSelf:!0}),t=ai(Zk,{self:!0});if((1!==t.length||0!==t[0].length)&&n)throw new TypeError("EffectsModule.forRoot() called twice. Feature modules should use EffectsModule.forFeature() instead.");return"guarded"}var wn=(()=>{return(n=wn||(wn={}))[n.UNKNOWN=0]="UNKNOWN",n[n.EXPERIMENTS=1]="EXPERIMENTS",n[n.EXPERIMENT=2]="EXPERIMENT",n[n.COMPARE_EXPERIMENT=3]="COMPARE_EXPERIMENT",n[n.CARD=4]="CARD",n[n.NOT_SET=5]="NOT_SET",wn;var n})(),Xw="defaultExperimentId",Ch=(()=>{return(n=Ch||(Ch={}))[n.EXPERIMENTS=0]="EXPERIMENTS",n[n.DASHBOARD=1]="DASHBOARD",Ch;var n})();function Mh(n){return n.split(",").map(t=>{let e=t.indexOf(":");if(e<0)throw new Error(`Expect colon delimiting name and ID: ${t}`);let i=t.slice(0,e),r=t.slice(e+1);if(!r)throw new Error(`Expect id to be non-falsy: ${t}`);return{name:i,id:r}})}function A8(n){return n.map(({alias:t,id:e})=>`${t}:${e}`).join(",")}function Xb(n,t){switch(n){case wn.EXPERIMENT:return Object.prototype.hasOwnProperty.call(t,"experimentId")?[t.experimentId]:[Xw];case wn.CARD:{let e=t.experimentIds;return e.indexOf(",")<0?[e]:Mh(e).map(({id:i})=>i)}case wn.COMPARE_EXPERIMENT:return Mh(t.experimentIds).map(({id:i})=>i);default:return null}}function Fo(n,t){if(!n||!t)return n===t;if(n.routeKind!==t.routeKind)return!1;let e=Xb(n.routeKind,n.params),i=Xb(t.routeKind,t.params);if(null===e||null===i)return e===i;if(e.length!==i.length)return!1;let r=i.sort();return e.sort().every((o,s)=>r[s]===o)}function Jk(n){switch(n){case wn.EXPERIMENTS:return Ch.EXPERIMENTS;case wn.EXPERIMENT:case wn.CARD:case wn.COMPARE_EXPERIMENT:return Ch.DASHBOARD;case wn.UNKNOWN:case wn.NOT_SET:return null}}function Qw(n,t,e){let i=Jk(n);return null!==i&&!e.some(r=>r.deepLinkGroup===i&&r.namespaceId===t)}var k8_getHref=()=>window.location.href,of=(()=>{class n{getHref(){return k8_getHref()}getSearch(){let e=new URLSearchParams(window.location.search),i=[];return e.forEach((r,o)=>{i.push({key:o,value:r})}),i}getHash(){return window.location.hash}getPath(){return window.location.pathname}getHistoryState(){return window.history.state}replaceStateUrl(e){window.history.replaceState(window.history.state,"",e)}pushStateUrl(e){window.history.pushState(null,"",e)}replaceStateData(e){window.history.replaceState(e,"")}onPopState(){return mi(window,"popstate").pipe(N(e=>({pathname:this.getPath(),state:e.state})))}getResolvedPath(e){return new URL(e,k8_getHref()).pathname}getFullPath(e,i,r){let o=this.getResolvedPath(e),s="";return i.length&&(s="?"+function(n){let t=new URLSearchParams;for(let{key:e,value:i}of n)t.append(e,i);return t}(i).toString()),`${o}${s}${r?this.getHash():""}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),sf=(()=>{class n{constructor(e){this.appRoot=this.getAppRootFromMetaElement(e)}getAppRootFromMetaElement(e){let i=document.querySelector('head meta[name="tb-relative-root"]');if(!i)return"/";let{pathname:r}=new URL(i.content,e.getHref());return r.replace(/\/*$/,"/")}getAbsPathnameWithAppRoot(e){return this.appRoot.slice(0,-1)+e}getAppRootlessPathname(e){return e.startsWith(this.appRoot)?"/"+e.slice(this.appRoot.length):e}}return n.\u0275fac=function(e){return new(e||n)(k(of))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),wh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[of]}),n})(),Sh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[sf],imports:[wh]}),n})(),tF=new ie("[App Routing] Dirty Updates"),Zw=(()=>{class n{constructor(e){this.dirtyUpdatesSelectorFactories=e}getDirtyUpdatesSelectors(){return this.dirtyUpdatesSelectorFactories??[]}static registerDirtyUpdates(e){return{ngModule:n,providers:[{provide:tF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(k(tF,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),F8=_e("[App Routing] Discarding Unsaved Updates"),Eh=_e("[App Routing] State Rehydrated From Url",{_as:"props",_p:void 0}),Kw=_e("[App Routing] Route Config Loaded",{_as:"props",_p:void 0}),nF=_e("[App Routing] In App Navigation Requested",{_as:"props",_p:void 0}),Th=_e("[App Routing] In App Navigating",{_as:"props",_p:void 0}),Ps=_e("[App Routing] In App Navigated",{_as:"props",_p:void 0}),rF=new ie("[App Routing] Programmatical Navigation Provider"),Jw=(()=>{class n{constructor(e){this.providers=new Map;for(let i of e||[]){if(this.providers.has(i.actionCreator.type))throw new RangeError(`"${i.actionCreator.type}" is already registered for nav. Multiple navigations on same kick is not allowed.`);this.providers.set(i.actionCreator.type,i.lambda)}}getNavigation(e){let i=this.providers.get(e.type);return i?i(e):null}static registerProgrammaticalNavigation(e){return{ngModule:n,providers:[{provide:rF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(k(rF,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})();function Qb(n){return null!=n.routeKind}function aF(n){return B8(n).map(e=>{let i=e.startsWith(":");return i?{pathPart:e,isParam:!0,paramName:e.slice(1)}:{pathPart:e,isParam:i}})}var Dh=class{static getMatcher(t){return Qb(t)?new Zb(t):void 0!==t.redirectionPath?new oF(t):new sF(t)}constructor(t){this.validateConfig(t),this.pathFragments=aF(t.path),this.pathMatchers=this.getPathMatchers(this.pathFragments)}validateConfig({path:t}){if(!t.startsWith("/"))throw new RangeError(`config.path should start with '/'. ${t}`);let e=0;for(;(e=t.indexOf(":",e+1))>=0;){if("/"!==t[e-1])throw new RangeError(`config.path parameter should come after '/'. ${t}`);if(void 0===t[e+1]||"/"===t[e+1])throw new RangeError(`config.path parameter should have non-empty name. ${t}`)}}getPathMatchers(t){return t.map(e=>{let{pathPart:i}=e;return e.isParam?r=>({isParamPathPart:!0,partMatched:!0,paramName:e.paramName,paramValue:r}):r=>({isParamPathPart:!1,partMatched:r===i})})}match(t){let e={};if(this.pathMatchers.length!==t.length)return{result:!1};let i=0;for(let r of this.pathMatchers){let s=r(t[i++]);if(!s.partMatched)return{result:!1};s.isParamPathPart&&(e={...e,[s.paramName]:s.paramValue})}return{result:!0,params:e,pathParts:t,isRedirection:!1,redirectionQueryParams:void 0}}matchByParams(t){return{result:!0,params:t,pathParts:this.reprojectPathByParams(this.pathFragments,t),isRedirection:!1,redirectionQueryParams:void 0}}reprojectPathByParams(t,e){let i=[];for(let r of t)if(r.isParam){let{paramName:o}=r;if(!e.hasOwnProperty(o))throw new RangeError(`Failed to reproject parameter. "${o}" parameter should be present.`);i.push(e[o])}else i.push(r.pathPart);return i}},Zb=class extends Dh{constructor(t){super(t),this.definition=t}},oF=class extends Dh{constructor(t){super(t),this.definition=t,this.redirectionFragments=aF(t.redirectionPath)}match(t){let e=super.match(t);if(!e.result)return e;let i=this.reprojectPathByParams(this.redirectionFragments,e.params);return{result:!0,params:e.params,pathParts:i,isRedirection:!0,redirectionQueryParams:void 0}}},sF=class extends Dh{constructor(t){super(t),this.definition=t}match(t){let e=super.match(t);if(!e.result)return e;let{pathParts:i,queryParams:r}=this.definition.redirector(t);return{result:!0,params:e.params,pathParts:i,isRedirection:!0,redirectionQueryParams:r}}},Kb=class{constructor(t,e=3){if(this.maxRedirection=e,e<0)throw new RangeError("maxRedirection has to be non-negative number");this.validateRouteConfigs(t),this.defaultRouteConfig=null,this.routeKindToConcreteConfigMatchers=new Map,this.configMatchers=[];for(let i of t){let r=Dh.getMatcher(i);this.configMatchers.push(r),r instanceof Zb&&(this.routeKindToConcreteConfigMatchers.set(r.definition.routeKind,r),r.definition.defaultRoute&&(this.defaultRouteConfig=r))}}validateRouteConfigs(t){let e=t.filter(Qb),i=e.filter(o=>o.defaultRoute);if(i.length>1){let o=i.map(({path:s})=>s).join(", ");throw new RangeError(`There are more than one defaultRoutes. ${o}`)}if(1===i.length){let{path:o}=i[0];if(Boolean(aF(o).find(({isParam:a})=>a)))throw new RangeError(`A defaultRoute cannot have any params. ${o}`)}let r=new Set;for(let{routeKind:o}of e){if(r.has(o))throw new RangeError(`Multiple route configuration for kind: ${o}. Configurations should have unique routeKinds`);r.add(o)}}generateAction(t,e){return t.actionGenerator?t.actionGenerator(e):null}match(t){if(!t.pathname.startsWith("/"))throw new RangeError('Navigation has to made with pathname that starts with "/"');let o,e=B8(t.pathname),i=0,r=!1;for(;;){let s=!1;for(let a of this.configMatchers){let l=a.match(e);if(l.result){s=!0;let{params:c,pathParts:d,isRedirection:u}=l;if(u){e=d,r=!0,o=l.redirectionQueryParams;break}if(!(a instanceof Zb))throw new RangeError("No concrete route definition `match` return redirection");let{definition:p}=a,f={routeKind:p.routeKind,params:c,pathname:L8(d),deepLinkProvider:p.deepLinkProvider||null,action:this.generateAction(p,d)};return r?{...f,originateFromRedirection:!0,redirectionOnlyQueryParams:o}:{...f,originateFromRedirection:!1}}}if(r&&i++,!s||i>this.maxRedirection)break}if(i>this.maxRedirection)throw new Error(`Potential redirection loop (redirecting more than ${this.maxRedirection} times. Please do not have cycles in the routes.`);if(this.defaultRouteConfig){let{definition:s}=this.defaultRouteConfig;return{routeKind:s.routeKind,deepLinkProvider:s.deepLinkProvider??null,pathname:s.path,params:{},originateFromRedirection:!0,redirectionOnlyQueryParams:void 0,action:this.generateAction(s,e)}}return null}matchByRouteKind(t,e){let i=this.routeKindToConcreteConfigMatchers.get(t);if(!i)throw new RangeError(`Requires configuration for routeKind: ${t}`);let r=i.matchByParams(e);return{routeKind:t,params:e,pathname:L8(r.pathParts),deepLinkProvider:i.definition.deepLinkProvider||null,originateFromRedirection:!1,action:this.generateAction(i.definition,r.pathParts)}}};function B8(n){return n.split("/").slice(1)}function L8(n){return"/"+n.join("/")}var lF=new ie("[App Routing] Route Config"),Dl=(()=>{class n{constructor(e){if(this.routeKindToNgComponent=new Map,!e)return void(this.routeConfigs=new Kb([]));let i=[];for(let r of e)for(let o of r)i.push(o);this.routeConfigs=new Kb(i),i.forEach(r=>{Qb(r)&&this.routeKindToNgComponent.set(r.routeKind,r.ngComponent)})}getRegisteredRouteKinds(){return this.routeKindToNgComponent.keys()}getRouteConfigs(){return this.routeConfigs}getNgComponentByRouteKind(e){return this.routeKindToNgComponent.get(e)||null}static registerRoutes(e){return{ngModule:n,providers:[{provide:lF,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(k(lF,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),$w="app_routing",Jb=Er($w),No=q(Jb,n=>n.activeRoute),z8=q(Jb,n=>n.nextRoute),U8=q(Jb,n=>n.activeNamespaceId),j8=q(Jb,n=>n.rehydratedDeepLinks),G8=q(Jb,n=>n.registeredRouteKeys),Ha=q(No,n=>n?n.routeKind:wn.NOT_SET),dF=q(No,n=>n?n.params:{}),lr=q(Ha,dF,(n,t)=>Xb(n,t)),za=(q(Ha,dF,(n,t)=>{if(n!==wn.COMPARE_EXPERIMENT)return{};let i=function(n){let t=new Map,e=Mh(n.experimentIds);for(let{id:i,name:r}of e)r&&t.set(i,r);return t}(t);return Object.fromEntries(i.entries())}),q(Ha,dF,(n,t)=>{let e=t;if(n!==wn.COMPARE_EXPERIMENT&&(n!==wn.CARD||-1===e.experimentIds.indexOf(",")))return{};let i=function(n){let t=new Map,e=Mh(n.experimentIds),i=0;for(let{id:r,name:o}of e)i++,!t.has(r)&&t.set(r,{aliasText:o,aliasNumber:i});return t}(e);return Object.fromEntries(i.entries())})),uF=_e("[App Routing] Effects Init"),ls=(()=>{return(n=ls||(ls={}))[n.UNCHANGED=0]="UNCHANGED",n[n.NEW=1]="NEW",n[n.FROM_HISTORY=2]="FROM_HISTORY",ls;var n})(),W8=(()=>{class n{constructor(e,i,r,o,s,a,l){this.actions$=e,this.store=i,this.location=r,this.dirtyUpdatesRegistry=o,this.registry=s,this.programmaticalNavModule=a,this.appRootProvider=l,this.onNavigationRequested$=this.actions$.pipe(ei(nF),N(c=>({pathname:c.pathname.startsWith("/")?this.appRootProvider.getAbsPathnameWithAppRoot(c.pathname):this.location.getResolvedPath(c.pathname),options:{browserInitiated:!1,replaceState:c.replaceState??!1,namespaceUpdate:{option:c.resetNamespacedState?ls.NEW:ls.UNCHANGED}}}))),this.bootstrapReducers$=ar(()=>this.actions$.pipe(ei(uF),N(()=>Kw({routeKinds:new Set(this.registry.getRegisteredRouteKinds())})))),this.onInit$=this.actions$.pipe(ei(uF)).pipe(Sa(0),N(()=>{let c=this.location.getHistoryState()?.namespaceId,d=void 0===c?{option:ls.NEW}:{option:ls.FROM_HISTORY,namespaceId:c};return{pathname:this.location.getPath(),options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:d}}})),this.onPopState$=this.location.onPopState().pipe(N(c=>({pathname:c.pathname,options:{browserInitiated:!0,replaceState:!0,namespaceUpdate:void 0===c.state?.namespaceId?{option:ls.UNCHANGED}:{option:ls.FROM_HISTORY,namespaceId:c.state.namespaceId}}}))),this.userInitNavRoute$=tn(this.onNavigationRequested$,this.onInit$,this.onPopState$).pipe(N(c=>{if(!c.pathname.startsWith("/"))throw new Error(`[App routing] pathname must start with '/'. Got: ${c.pathname}`);return{...c,pathname:this.appRootProvider.getAppRootlessPathname(c.pathname)}}),N(c=>({routeMatch:this.routeConfigs.match(c),options:c.options}))),this.programmaticalNavRoute$=this.actions$.pipe(N(c=>this.programmaticalNavModule.getNavigation(c)),ke(c=>null!==c),N(c=>{let m,d=c,{replaceState:u=!1,resetNamespacedState:p,routeKind:f}=d;return m=d.routeKind===wn.COMPARE_EXPERIMENT?{experimentIds:A8(d.routeParams.aliasAndExperimentIds)}:d.routeParams,{replaceState:u,routeKind:f,routeParams:m,resetNamespacedState:p}}),N(({replaceState:c,routeKind:d,routeParams:u,resetNamespacedState:p})=>({routeMatch:this.routeConfigs?this.routeConfigs.matchByRouteKind(d,u):null,options:{replaceState:c,browserInitiated:!1,namespaceUpdate:{option:p?ls.NEW:ls.UNCHANGED}}}))),this.validatedRouteMatch$=tn(this.userInitNavRoute$,this.programmaticalNavRoute$).pipe(ke(({routeMatch:c})=>Boolean(c)),N(({routeMatch:c,options:d})=>({routeMatch:c,options:d}))),this.navigate$=ar(()=>this.validatedRouteMatch$.pipe(Bt(this.store.select(No)),hn(([u,p])=>{let f=null!==p&&Fo(p,u.routeMatch),m=this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors();return f||!m.length?Ht(u):co(this.dirtyUpdatesRegistry.getDirtyUpdatesSelectors().map(b=>this.store.select(b).pipe(Yt(1)))).pipe(N(b=>void 0!==b[0].experimentIds&&b[0].experimentIds.length>0),ke(b=>{if(b){let M=window.confirm("You have unsaved edits, are you sure you want to discard them?");return M&&this.store.dispatch(F8()),M}return!0}),N(()=>u))}),Bt(this.store.select(j8)),Nt(([{routeMatch:u,options:p},f])=>{if(!p.browserInitiated||!u.deepLinkProvider||p.namespaceUpdate.option===ls.FROM_HISTORY&&!Qw(u.routeKind,p.namespaceUpdate.namespaceId,f))return;let m=u.originateFromRedirection&&u.redirectionOnlyQueryParams?u.redirectionOnlyQueryParams:this.location.getSearch(),b=u.deepLinkProvider.deserializeQueryParams(m);this.store.dispatch(Eh({routeKind:u.routeKind,partialState:b}))}),Nt(([{routeMatch:u}])=>{u.action&&this.store.dispatch(u.action)}),Jn(([{routeMatch:u,options:p}])=>null===u.deepLinkProvider?Ht({route:{routeKind:u.routeKind,params:u.params},pathname:u.pathname,queryParams:[],options:p}):u.deepLinkProvider.serializeStateToQueryParams(this.store).pipe(N((f,m)=>({route:{routeKind:u.routeKind,params:u.params},pathname:u.pathname,queryParams:f,options:0===m?p:{...p,namespaceUpdate:{option:ls.UNCHANGED},replaceState:!0}})))),Nt(({route:u})=>{this.store.dispatch(Th({after:u}))}),wr(0)).pipe(Bt(this.store.select(No)),N(([u,p])=>{let f=null===p||null===u.route||Fo(p,u.route);return{...u,preserveHash:f}}),Nt(({preserveHash:u,pathname:p,queryParams:f,options:m})=>{(function(n,t){return n.pathname===t.pathname&&n.queryParams.length===t.queryParams.length&&n.queryParams.every((e,i)=>{let r=t.queryParams[i];return e.key===r.key&&e.value===r.value})})({pathname:p,queryParams:f},{pathname:this.appRootProvider.getAppRootlessPathname(this.location.getPath()),queryParams:this.location.getSearch()})||(m.replaceState?this.location.replaceStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,f,u))):this.location.pushStateUrl(this.appRootProvider.getAbsPathnameWithAppRoot(this.location.getFullPath(p,f,u))))})).pipe(Bt(this.store.select(No),this.store.select(U8)),N(([{route:u,options:p},f,m])=>{let b=function(n,t,e){return t.namespaceUpdate.option===ls.FROM_HISTORY?t.namespaceUpdate.namespaceId:null==e||t.namespaceUpdate.option===ls.NEW?`${Date.now().toString()}:${function(){let n=new Uint8Array(32);crypto.getRandomValues(n);let t="";for(let e of n)t+=(e>>4).toString(16);return t}()}`:e}(0,p,m);return this.location.replaceStateData({...this.location.getHistoryState(),namespaceId:b}),Ps({before:f,after:u,beforeNamespaceId:m,afterNamespaceId:b})}))),this.routeConfigs=s.getRouteConfigs()}ngrxOnInitEffects(){return uF()}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(of),k(Zw),k(Dl),k(Jw),k(sf))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),She=br({activeRoute:null,nextRoute:null,activeNamespaceId:null,rehydratedDeepLinks:[],registeredRouteKeys:new Set},ye(Th,(n,{after:t})=>({...n,nextRoute:t})),ye(Ps,(n,{after:t,afterNamespaceId:e})=>{let i=n.rehydratedDeepLinks;return Qw(t.routeKind,e,i)&&(i=[...i],i.push({deepLinkGroup:Jk(t.routeKind),namespaceId:e})),{...n,activeRoute:t,nextRoute:null,activeNamespaceId:e,rehydratedDeepLinks:i}}),ye(Kw,(n,{routeKinds:t})=>({...n,registeredRouteKeys:t})));function q8(n,t){return She(n,t)}var Ih=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Zw,Jw],imports:[Dl,Tr.forFeature($w,q8),to.forFeature([W8]),Sh,wh]}),n})(),Y8="__tab__",X8=(()=>{class n{constructor(){this.tfStorage=document.createElement("tf-storage"),document.createElement("tf-globals").tf_globals.setUseHash(!0),this.tfStorage.tf_storage.migrateLegacyURLScheme()}getString(e){return this.tfStorage.tf_storage.getString(e)}setString(e,i,r){this.tfStorage.tf_storage.setString(e,i,r)}getPluginId(){return this.getString(Y8)}setPluginId(e,i){this.setString(Y8,e,i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),_u=class{},Os=(()=>{return(n=Os||(Os={})).BROWSER_DEFAULT="browser_default",n.LIGHT="light",n.DARK="dark",Os;var n})(),Il=_e("[Persistent Settings] Global Settings Loaded",{_as:"props",_p:void 0}),pF=new ie("[Persistent Settings] Global Settings"),Ki=(()=>{class n{constructor(e){this.globalSettingSelectors=[],e&&(this.globalSettingSelectors=e.map(i=>i()))}getGlobalSettingSelectors(){return this.globalSettingSelectors??[]}static defineGlobalSetting(e){return{ngModule:n,providers:[{provide:pF,multi:!0,useValue:e}]}}}return n.\u0275fac=function(e){return new(e||n)(k(pF,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Q8="_tb_global_settings.timeseries",Z8="_tb_global_settings",K8="notificationLastReadTimestamp",eS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),tS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),fF=(()=>{class n extends tS{uiToBackend(e){let i={};return void 0!==e.ignoreOutliers&&(i.ignoreOutliers=e.ignoreOutliers),void 0!==e.scalarSmoothing&&(i.scalarSmoothing=e.scalarSmoothing),void 0!==e.tooltipSort&&(i.tooltipSort=e.tooltipSort),void 0!==e.autoReload&&(i.autoReload=e.autoReload),void 0!==e.autoReloadPeriodInMs&&(i.autoReloadPeriodInMs=e.autoReloadPeriodInMs),void 0!==e.pageSize&&(i.paginationSize=e.pageSize),void 0!==e.themeOverride&&(i.theme=e.themeOverride),void 0!==e.notificationLastReadTimeInMs&&(i.notificationLastReadTimeInMs=e.notificationLastReadTimeInMs),void 0!==e.sideBarWidthInPercent&&(i.sideBarWidthInPercent=e.sideBarWidthInPercent),void 0!==e.timeSeriesSettingsPaneOpened&&(i.timeSeriesSettingsPaneOpened=e.timeSeriesSettingsPaneOpened),void 0!==e.timeSeriesCardMinWidth&&(i.timeSeriesCardMinWidth=e.timeSeriesCardMinWidth),void 0!==e.stepSelectorEnabled&&(i.stepSelectorEnabled=e.stepSelectorEnabled),void 0!==e.rangeSelectionEnabled&&(i.rangeSelectionEnabled=e.rangeSelectionEnabled),void 0!==e.linkedTimeEnabled&&(i.linkedTimeEnabled=e.linkedTimeEnabled),void 0!==e.singleSelectionHeaders&&(i.singleSelectionHeaders=e.singleSelectionHeaders),void 0!==e.rangeSelectionHeaders&&(i.rangeSelectionHeaders=e.rangeSelectionHeaders),i}backendToUi(e){let i={};return e.hasOwnProperty("scalarSmoothing")&&"number"==typeof e.scalarSmoothing&&(i.scalarSmoothing=e.scalarSmoothing),e.hasOwnProperty("ignoreOutliers")&&"boolean"==typeof e.ignoreOutliers&&(i.ignoreOutliers=e.ignoreOutliers),e.hasOwnProperty("tooltipSort")&&"string"==typeof e.tooltipSort&&(i.tooltipSort=e.tooltipSort),e.hasOwnProperty("autoReload")&&"boolean"==typeof e.autoReload&&(i.autoReload=e.autoReload),e.hasOwnProperty("autoReloadPeriodInMs")&&"number"==typeof e.autoReloadPeriodInMs&&(i.autoReloadPeriodInMs=e.autoReloadPeriodInMs),e.hasOwnProperty("paginationSize")&&"number"==typeof e.paginationSize&&(i.pageSize=e.paginationSize),e.hasOwnProperty("theme")&&"string"==typeof e.theme&&new Set(Object.values(Os)).has(e.theme)&&(i.themeOverride=e.theme),e.hasOwnProperty("notificationLastReadTimeInMs")&&"number"==typeof e.notificationLastReadTimeInMs&&(i.notificationLastReadTimeInMs=e.notificationLastReadTimeInMs),e.hasOwnProperty("sideBarWidthInPercent")&&"number"==typeof e.sideBarWidthInPercent&&(i.sideBarWidthInPercent=e.sideBarWidthInPercent),e.hasOwnProperty("timeSeriesSettingsPaneOpened")&&"boolean"==typeof e.timeSeriesSettingsPaneOpened&&(i.timeSeriesSettingsPaneOpened=e.timeSeriesSettingsPaneOpened),e.hasOwnProperty("timeSeriesCardMinWidth")&&"number"==typeof e.timeSeriesCardMinWidth&&(i.timeSeriesCardMinWidth=e.timeSeriesCardMinWidth),e.hasOwnProperty("stepSelectorEnabled")&&"boolean"==typeof e.stepSelectorEnabled&&(i.stepSelectorEnabled=e.stepSelectorEnabled),e.hasOwnProperty("rangeSelectionEnabled")&&"boolean"==typeof e.rangeSelectionEnabled&&(i.rangeSelectionEnabled=e.rangeSelectionEnabled),e.hasOwnProperty("linkedTimeEnabled")&&"boolean"==typeof e.linkedTimeEnabled&&(i.linkedTimeEnabled=e.linkedTimeEnabled),Array.isArray(e.singleSelectionHeaders)&&void 0!==e.singleSelectionHeaders[0].name&&(e.singleSelectionHeaders.forEach(r=>{r.movable=r.movable??!0,r.sortable=r.sortable??!0,r.removable=r.removable??!0}),i.singleSelectionHeaders=e.singleSelectionHeaders),Array.isArray(e.rangeSelectionHeaders)&&void 0!==e.rangeSelectionHeaders[0].name&&(e.rangeSelectionHeaders.forEach(r=>{r.movable=r.movable??!0,r.sortable=r.sortable??!0,r.removable=r.removable??!0}),i.rangeSelectionHeaders=e.rangeSelectionHeaders),i}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),J8=(()=>{class n{constructor(e){this.converter=e}setSettings(e){return Object.keys(e)?this.getSettings().pipe(Nt(i=>{window.localStorage.setItem(Z8,JSON.stringify(this.converter.uiToBackend({...i,...e}))),window.localStorage.removeItem(Q8),window.localStorage.removeItem(K8)}),N(()=>{})):Jr}deserialize(e){try{return JSON.parse(e)}catch{return{}}}getSettings(){let e=window.localStorage.getItem(K8);return Ht({...this.converter.backendToUi(this.deserialize(e?JSON.stringify({notificationLastReadTimeInMs:Number(e)}):"{}")),...this.converter.backendToUi(this.deserialize(window.localStorage.getItem(Q8)??"{}")),...this.converter.backendToUi(this.deserialize(window.localStorage.getItem(Z8)??"{}"))})}}return n.\u0275fac=function(e){return new(e||n)(k(tS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),$8=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:eS,useClass:J8},fF,{provide:tS,useExisting:fF}]}),n})(),nS="persistent_settings",e6=q(Er(nS),n=>n.shouldPersistSettings),t6=(()=>{class n{constructor(e,i,r,o){this.actions$=e,this.store=i,this.configModule=r,this.dataSource=o,this.initializeAndUpdateSettings$=ar(()=>{let s=this.actions$.pipe(ei(Th),Yt(1),Bt(this.store.select(e6)),ke(([,a])=>a),hn(()=>this.dataSource.getSettings()),Nt(a=>{this.store.dispatch(Il({partialSettings:a}))}),Sa(0),hn(()=>tn(...this.configModule.getGlobalSettingSelectors().map(l=>this.store.select(l).pipe(Yn((c,d)=>{let u=Object.values(c),p=Object.values(d);return u.length===p.length&&u.every((f,m)=>f===p[m])}),ia(1))))),Cs());return s.pipe(function(n){return qt((t,e)=>{let i=[];return t.subscribe(Vt(e,r=>i.push(r),()=>{e.next(i),e.complete()})),n.subscribe(Vt(e,()=>{let r=i;i=[],e.next(r)},fl)),()=>{i=null}})}(s.pipe(wr(500))),hn(a=>{if(0===a.length)return Jr;let l={};for(let c of a)Object.assign(l,c);return this.dataSource.setSettings(l)}))},{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(Ki),k(eS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Rhe=br({shouldPersistSettings:!0});function n6(n,t){return Rhe(n,t)}var mF=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Ki],imports:[Tr.forFeature(nS,n6),to.forFeature([t6]),$8]}),n})(),ev=class{},oS=class{},da=class{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(e=>{let i=e.indexOf(":");if(i>0){let r=e.slice(0,i),o=r.toLowerCase(),s=e.slice(i+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:()=>{this.headers=new Map,Object.entries(t).forEach(([e,i])=>{let r;if(r="string"==typeof i?[i]:"number"==typeof i?[i.toString()]:i.map(o=>o.toString()),r.length>0){let o=e.toLowerCase();this.headers.set(o,r),this.maybeSetNormalizedName(e,o)}})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof da?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new da;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof da?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let i=t.value;if("string"==typeof i&&(i=[i]),0===i.length)return;this.maybeSetNormalizedName(t.name,e);let r=("a"===t.op?this.headers.get(e):void 0)||[];r.push(...i),this.headers.set(e,r);break;case"d":let o=t.value;if(o){let s=this.headers.get(e);if(!s)return;s=s.filter(a=>-1===o.indexOf(a)),0===s.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}},Ohe=/%(\d[a-f0-9])/gi,khe={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function i6(n){return encodeURIComponent(n).replace(Ohe,(t,e)=>khe[e]??t)}function iS(n){return`${n}`}var Mc=class{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new class{encodeKey(t){return i6(t)}encodeValue(t){return i6(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}},t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(n,t){let e=new Map;return n.length>0&&n.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=-1==o?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let i=t.fromObject[e],r=Array.isArray(i)?i.map(iS):[iS(i)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(i=>{let r=t[i];Array.isArray(r)?r.forEach(o=>{e.push({param:i,value:o,op:"a"})}):e.push({param:i,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(i=>e+"="+this.encoder.encodeValue(i)).join("&")}).filter(t=>""!==t).join("&")}clone(t){let e=new Mc({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(iS(t.value)),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let i=this.map.get(t.param)||[],r=i.indexOf(iS(t.value));-1!==r&&i.splice(r,1),i.length>0?this.map.set(t.param,i):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}};function r6(n){return typeof ArrayBuffer<"u"&&n instanceof ArrayBuffer}function o6(n){return typeof Blob<"u"&&n instanceof Blob}function s6(n){return typeof FormData<"u"&&n instanceof FormData}var af=class{constructor(t,e,i,r){let o;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(n){switch(n){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||r?(this.body=void 0!==i?i:null,o=r):o=i,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params)),this.headers||(this.headers=new da),this.context||(this.context=new class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}}),this.params){let s=this.params.toString();if(0===s.length)this.urlWithParams=e;else{let a=e.indexOf("?");this.urlWithParams=e+(-1===a?"?":a<e.length-1?"&":"")+s}}else this.params=new Mc,this.urlWithParams=e}serializeBody(){return null===this.body?null:r6(this.body)||o6(this.body)||s6(this.body)||typeof URLSearchParams<"u"&&this.body instanceof URLSearchParams||"string"==typeof this.body?this.body:this.body instanceof Mc?this.body.toString():"object"==typeof this.body||"boolean"==typeof this.body||Array.isArray(this.body)?JSON.stringify(this.body):this.body.toString()}detectContentTypeHeader(){return null===this.body||s6(this.body)?null:o6(this.body)?this.body.type||null:r6(this.body)?null:"string"==typeof this.body?"text/plain":this.body instanceof Mc?"application/x-www-form-urlencoded;charset=UTF-8":"object"==typeof this.body||"number"==typeof this.body||"boolean"==typeof this.body?"application/json":null}clone(t={}){let e=t.method||this.method,i=t.url||this.url,r=t.responseType||this.responseType,o=void 0!==t.body?t.body:this.body,s=void 0!==t.withCredentials?t.withCredentials:this.withCredentials,a=void 0!==t.reportProgress?t.reportProgress:this.reportProgress,l=t.headers||this.headers,c=t.params||this.params,d=t.context??this.context;return void 0!==t.setHeaders&&(l=Object.keys(t.setHeaders).reduce((u,p)=>u.set(p,t.setHeaders[p]),l)),t.setParams&&(c=Object.keys(t.setParams).reduce((u,p)=>u.set(p,t.setParams[p]),c)),new af(e,i,o,{params:c,headers:l,context:d,reportProgress:a,responseType:r,withCredentials:s})}},bu=(()=>{return(n=bu||(bu={}))[n.Sent=0]="Sent",n[n.UploadProgress=1]="UploadProgress",n[n.ResponseHeader=2]="ResponseHeader",n[n.DownloadProgress=3]="DownloadProgress",n[n.Response=4]="Response",n[n.User=5]="User",bu;var n})(),tv=class{constructor(t,e=200,i="OK"){this.headers=t.headers||new da,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||i,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}},nv=class extends tv{constructor(t={}){super(t),this.type=bu.ResponseHeader}clone(t={}){return new nv({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Ah=class extends tv{constructor(t={}){super(t),this.type=bu.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Ah({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}},Al=class extends tv{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}};function hF(n,t){return{body:t,headers:n.headers,context:n.context,observe:n.observe,params:n.params,reportProgress:n.reportProgress,responseType:n.responseType,withCredentials:n.withCredentials}}var lf=(()=>{class n{constructor(e){this.handler=e}request(e,i,r={}){let o;if(e instanceof af)o=e;else{let l,c;l=r.headers instanceof da?r.headers:new da(r.headers),r.params&&(c=r.params instanceof Mc?r.params:new Mc({fromObject:r.params})),o=new af(e,i,void 0!==r.body?r.body:null,{headers:l,context:r.context,params:c,reportProgress:r.reportProgress,responseType:r.responseType||"json",withCredentials:r.withCredentials})}let s=Ht(o).pipe(function(n,t){return _n(t)?hn(n,t,1):hn(n,1)}(l=>this.handler.handle(l)));if(e instanceof af||"events"===r.observe)return s;let a=s.pipe(ke(l=>l instanceof Ah));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(N(l=>{if(null!==l.body&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(N(l=>{if(null!==l.body&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(N(l=>{if(null!==l.body&&"string"!=typeof l.body)throw new Error("Response is not a string.");return l.body}));default:return a.pipe(N(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,i={}){return this.request("DELETE",e,i)}get(e,i={}){return this.request("GET",e,i)}head(e,i={}){return this.request("HEAD",e,i)}jsonp(e,i){return this.request("JSONP",e,{params:(new Mc).append(i,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,i={}){return this.request("OPTIONS",e,i)}patch(e,i,r={}){return this.request("PATCH",e,hF(r,i))}post(e,i,r={}){return this.request("POST",e,hF(r,i))}put(e,i,r={}){return this.request("PUT",e,hF(r,i))}}return n.\u0275fac=function(e){return new(e||n)(k(ev))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function d6(n,t){return t(n)}function Lhe(n,t){return(e,i)=>t.intercept(e,{handle:r=>n(r,i)})}var bF=new ie("HTTP_INTERCEPTORS"),vF=new ie("HTTP_INTERCEPTOR_FNS");function Vhe(){let n=null;return(t,e)=>(null===n&&(n=(ai(bF,{optional:!0})??[]).reduceRight(Lhe,d6)),n(t,e))}var a6=(()=>{class n extends ev{constructor(e,i){super(),this.backend=e,this.injector=i,this.chain=null}handle(e){if(null===this.chain){let i=Array.from(new Set(this.injector.get(vF)));this.chain=i.reduceRight((r,o)=>function(n,t,e){return(i,r)=>e.runInContext(()=>t(i,o=>n(o,r)))}(r,o,this.injector),d6)}return this.chain(e,i=>this.backend.handle(i))}}return n.\u0275fac=function(e){return new(e||n)(k(oS),k(pc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Hhe=/^\)\]\}',?\n/,l6=(()=>{class n{constructor(e){this.xhrFactory=e}handle(e){if("JSONP"===e.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new Kt(i=>{let r=this.xhrFactory.build();if(r.open(e.method,e.urlWithParams),e.withCredentials&&(r.withCredentials=!0),e.headers.forEach((f,m)=>r.setRequestHeader(f,m.join(","))),e.headers.has("Accept")||r.setRequestHeader("Accept","application/json, text/plain, */*"),!e.headers.has("Content-Type")){let f=e.detectContentTypeHeader();null!==f&&r.setRequestHeader("Content-Type",f)}if(e.responseType){let f=e.responseType.toLowerCase();r.responseType="json"!==f?f:"text"}let o=e.serializeBody(),s=null,a=()=>{if(null!==s)return s;let f=r.statusText||"OK",m=new da(r.getAllResponseHeaders()),b=function(n){return"responseURL"in n&&n.responseURL?n.responseURL:/^X-Request-URL:/m.test(n.getAllResponseHeaders())?n.getResponseHeader("X-Request-URL"):null}(r)||e.url;return s=new nv({headers:m,status:r.status,statusText:f,url:b}),s},l=()=>{let{headers:f,status:m,statusText:b,url:M}=a(),y=null;204!==m&&(y=typeof r.response>"u"?r.responseText:r.response),0===m&&(m=y?200:0);let x=m>=200&&m<300;if("json"===e.responseType&&"string"==typeof y){let R=y;y=y.replace(Hhe,"");try{y=""!==y?JSON.parse(y):null}catch(A){y=R,x&&(x=!1,y={error:A,text:y})}}x?(i.next(new Ah({body:y,headers:f,status:m,statusText:b,url:M||void 0})),i.complete()):i.error(new Al({error:y,headers:f,status:m,statusText:b,url:M||void 0}))},c=f=>{let{url:m}=a(),b=new Al({error:f,status:r.status||0,statusText:r.statusText||"Unknown Error",url:m||void 0});i.error(b)},d=!1,u=f=>{d||(i.next(a()),d=!0);let m={type:bu.DownloadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),"text"===e.responseType&&!!r.responseText&&(m.partialText=r.responseText),i.next(m)},p=f=>{let m={type:bu.UploadProgress,loaded:f.loaded};f.lengthComputable&&(m.total=f.total),i.next(m)};return r.addEventListener("load",l),r.addEventListener("error",c),r.addEventListener("timeout",c),r.addEventListener("abort",c),e.reportProgress&&(r.addEventListener("progress",u),null!==o&&r.upload&&r.upload.addEventListener("progress",p)),r.send(o),i.next({type:bu.Sent}),()=>{r.removeEventListener("error",c),r.removeEventListener("abort",c),r.removeEventListener("load",l),r.removeEventListener("timeout",c),e.reportProgress&&(r.removeEventListener("progress",u),null!==o&&r.upload&&r.upload.removeEventListener("progress",p)),r.readyState!==r.DONE&&r.abort()}})}}return n.\u0275fac=function(e){return new(e||n)(k(Qp))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),u6=new ie("XSRF_ENABLED"),jhe=new ie("XSRF_COOKIE_NAME",{providedIn:"root",factory:()=>"XSRF-TOKEN"}),Whe=new ie("XSRF_HEADER_NAME",{providedIn:"root",factory:()=>"X-XSRF-TOKEN"}),sS=class{},qhe=(()=>{class n{constructor(e,i,r){this.doc=e,this.platform=i,this.cookieName=r,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;let e=this.doc.cookie||"";return e!==this.lastCookieString&&(this.parseCount++,this.lastToken=mw(e,this.cookieName),this.lastCookieString=e),this.lastToken}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(vc),k(jhe))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function Yhe(n,t){let e=n.url.toLowerCase();if(!ai(u6)||"GET"===n.method||"HEAD"===n.method||e.startsWith("http://")||e.startsWith("https://"))return t(n);let i=ai(sS).getToken(),r=ai(Whe);return null!=i&&!n.headers.has(r)&&(n=n.clone({headers:n.headers.set(r,i)})),t(n)}var rS=(()=>{return(n=rS||(rS={}))[n.Interceptors=0]="Interceptors",n[n.LegacyInterceptors=1]="LegacyInterceptors",n[n.CustomXsrfConfiguration=2]="CustomXsrfConfiguration",n[n.NoXsrfProtection=3]="NoXsrfProtection",n[n.JsonpSupport=4]="JsonpSupport",n[n.RequestsMadeViaParent=5]="RequestsMadeViaParent",rS;var n})();function Qhe(...n){let t=[lf,l6,a6,{provide:ev,useExisting:a6},{provide:oS,useExisting:l6},{provide:vF,useValue:Yhe,multi:!0},{provide:u6,useValue:!0},{provide:sS,useClass:qhe}];for(let e of n)t.push(...e.\u0275providers);return function(n){return{"\u0275providers":n}}(t)}var c6=new ie("LEGACY_INTERCEPTOR_FN"),p6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Qhe({"\u0275kind":rS.LegacyInterceptors,"\u0275providers":[{provide:c6,useFactory:Vhe},{provide:vF,useExisting:c6,multi:!0}]})]}),n})(),aS="feature",Rh=Er(aS),vu=q(Rh,n=>n.isFeatureFlagsLoaded),ks=q(Rh,n=>({...n.defaultFlags,...n.flagOverrides})),m6=q(Rh,n=>n.defaultFlags),iv=q(Rh,n=>n.flagOverrides||{}),cf=q(Rh,n=>n.metadata),Ph=q(Rh,n=>{let t={};for(let e in n.flagOverrides){let i=n.metadata[e];i&&i.queryParamOverride&&i.sendToServerWhenOverridden&&(t[e]=n.flagOverrides[e])}return t}),h6=q(ks,n=>n.isAutoDarkModeAllowed),Rl=q(ks,n=>null!==n.enableDarkModeOverride?n.enableDarkModeOverride:n.defaultEnableDarkMode),lS=q(ks,n=>n.enableDarkModeOverride),g6=q(ks,n=>n.enabledExperimentalPlugins),_6=q(ks,n=>n.inColab),cS=q(ks,n=>n.metricsImageSupportEnabled),yF=q(ks,n=>n.forceSvg),b6=q(ks,n=>void 0!==n.showFlags),dS=q(ks,n=>n.enableScalarColumnCustomization),md=q(ks,n=>n.enableHparamsInTimeSeries);function Jhe(n,t){if(!n)return;let e=n instanceof FormData?function(n){let t={};for(let[e,i]of n.entries())t[e]=i;return t}(n):n;return t?{[t]:JSON.stringify(e)}:e}var $he="X-XSRF-Protected";function xF(n){let t=n.headers||new da;return t=t.append($he,"1"),{...n,headers:t}}var Ua=(()=>{class n{constructor(e,i,r){this.appRootProvider=e,this.http=i,this.store=r}resolveAppRoot(e){return e.startsWith("/")?this.appRootProvider.getAbsPathnameWithAppRoot(e):e}get(e,i={}){return this.http.get(this.resolveAppRoot(e),i)}post(e,i,r={},o){return r=xF(r),this.store.select(vu).pipe(ke(s=>Boolean(s)),Yt(1),Bt(this.store.select(_6)),hn(([,s])=>{let a=this.resolveAppRoot(e);return s?this.http.get(a,{headers:r.headers??{},params:Jhe(i,o)}):this.http.post(a,i,r)}))}put(e,i,r={}){return this.http.put(this.resolveAppRoot(e),i,xF(r))}delete(e,i={}){return this.http.delete(this.resolveAppRoot(e),xF(i))}}return n.\u0275fac=function(e){return new(e||n)(k(sf),k(lf),k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Oh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Ua],imports:[p6,Sh]}),n})(),ja=(()=>{return(n=ja||(ja={})).UNKNOWN="UNKNOWN",n.NOT_FOUND="NOT_FOUND",n.PERMISSION_DENIED="PERMISSION_DENIED",ja;var n})(),v6=new ie("TensorBoard brand name"),no=(()=>{return(n=no||(no={})).STEP="step",n.WALL_TIME="wall_time",n.RELATIVE="relative",no;var n})(),Dr=(()=>{return(n=Dr||(Dr={})).OFFSET="offset",n.OVERLAY="overlay",Dr;var n})();function y6(n){let t=ja.UNKNOWN;return n instanceof Al&&(404===n.status&&(t=ja.NOT_FOUND),403===n.status&&(t=ja.PERMISSION_DENIED)),ea(new ov(t))}var ov=class{constructor(t){this.failureCode=t}},uS=(()=>{class n{constructor(e){this.http=e,this.tfBackend=document.createElement("tf-backend").tf_backend}fetchPluginsListing(e){let i=function(n){if(!n.length)return null;let t=new URLSearchParams;for(let e of n)t.append("experimentalPlugin",e);return t}(e),r=i?`data/plugins_listing?${i.toString()}`:"data/plugins_listing";return this.http.get(r).pipe(zr(y6))}fetchEnvironment(){return co([this.http.get("data/environment"),$r(this.tfBackend.environmentStore.refresh())]).pipe(N(([r])=>r),zr(y6))}}return n.\u0275fac=function(e){return new(e||n)(k(Ua))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),x6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[uS],imports:[Oh]}),n})(),Te=(()=>{return(n=Te||(Te={}))[n.NOT_LOADED=0]="NOT_LOADED",n[n.LOADED=1]="LOADED",n[n.LOADING=2]="LOADING",n[n.FAILED=3]="FAILED",Te;var n})(),wc=_e("[Core] Plugin Changed",{_as:"props",_p:void 0}),pS=_e("[Core] Plugin Url Hash Changed",{_as:"props",_p:void 0}),C6=_e("[Core] Loaded"),Fs=_e("[Core] User Triggered Reload"),cs=_e("[Core] Auto Reload"),fS=_e("[Core] PluginListing Fetch Requested"),df=_e("[Core] PluginListing Fetch Successful",{_as:"props",_p:void 0}),sv=_e("[Core] PluginListing Fetch Failed",{_as:"props",_p:void 0}),mS=_e("[Core] Polymer Component Runs Fetch Requested"),hS=_e("[Core] Polymer Component Runs Fetch Successful"),gS=_e("[Core] Polymer Component Runs Fetch Failed"),_S=_e("[Core] Environment Fetch Successful",{_as:"props",_p:void 0}),M6=_e("[Core] Run Selection Changed",{_as:"props",_p:void 0}),w6=_e("[Core] Run Fetch Successful",{_as:"props",_p:void 0}),kh=_e("[Core] Side Bar Width Changed",{_as:"props",_p:void 0}),bS=_e("[Core] Runs Table Full Screen Toggled");function uf(n,t,e){let i=Object.keys(n),r={...n,...t,privateNamespacedState:{}};return{initialState:r,reducers:br(r,ye(Ps,(a,{before:l,after:c,beforeNamespaceId:d,afterNamespaceId:u})=>{let p=a;return d!==u&&(p=function(a,l,c){let d={...a.privateNamespacedState};if(l){let p={};for(let f of i)p[f]=a[f];d={...d,[l]:p}}let u={};return a.privateNamespacedState?.[c]?u=a.privateNamespacedState[c]:l&&(u=n),{...a,...u,privateNamespacedState:d}}(a,d,u)),e&&(p=e(p,l,c)),p}))}}function pf(...n){return(t,e)=>{let i=t;for(let r of n)i=r(i,e);return i}}var lv={activePlugin:null,plugins:{},coreDataLoadState:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},pluginsListLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null,failureCode:null},environment:{data_location:"",window_title:""},polymerRunsLoadState:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},polymerInteropRuns:[],polymerInteropRunSelection:new Set,sideBarWidthInPercent:20,runsTableFullScreen:!1},nge=br(lv,ye(wc,pS,(n,{plugin:t})=>({...n,activePlugin:t})),ye(fS,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Te.LOADING},pluginsListLoaded:{...n.pluginsListLoaded,state:Te.LOADING}})),ye(sv,(n,{failureCode:t})=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Te.FAILED},pluginsListLoaded:{...n.pluginsListLoaded,state:Te.FAILED,failureCode:t}})),ye(df,(n,{plugins:t})=>{let e=Object.keys(t).find(s=>t[s].enabled)||null,i=n.activePlugin||e,r=Date.now(),o=n.coreDataLoadState;return n.polymerRunsLoadState.state===Te.LOADED&&(o={state:Te.LOADED,lastLoadedTimeInMs:r}),{...n,activePlugin:i,coreDataLoadState:o,plugins:t,pluginsListLoaded:{state:Te.LOADED,lastLoadedTimeInMs:r,failureCode:null}}}),ye(mS,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Te.LOADING},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Te.LOADING}})),ye(hS,n=>{let t=Date.now(),e=n.coreDataLoadState;return n.pluginsListLoaded.state===Te.LOADED&&(e={state:Te.LOADED,lastLoadedTimeInMs:t}),{...n,coreDataLoadState:e,polymerRunsLoadState:{...n.polymerRunsLoadState,state:Te.LOADED,lastLoadedTimeInMs:t}}}),ye(gS,n=>({...n,coreDataLoadState:{...n.coreDataLoadState,state:Te.FAILED},polymerRunsLoadState:{...n.polymerRunsLoadState,state:Te.FAILED}})),ye(_S,(n,{environment:t})=>({...n,environment:t})),ye(w6,(n,{runs:t})=>({...n,polymerInteropRuns:t})),ye(M6,(n,{nextSelection:t})=>({...n,polymerInteropRunSelection:new Set(t)})),ye(kh,(n,{widthInPercent:t})=>({...n,sideBarWidthInPercent:Math.min(Math.max(0,t),100)})),ye(Il,(n,{partialSettings:t})=>{let e={...n},i=t.sideBarWidthInPercent;return"number"==typeof i&&i>=0&&i<=100&&(e.sideBarWidthInPercent=i),e}),ye(bS,n=>({...n,runsTableFullScreen:!n.runsTableFullScreen}))),{reducers:ige}=uf(lv,{});function S6(n,t){return pf(nge,ige)(n,t)}var hd=Er("core"),yS=q(hd,n=>n.pluginsListLoaded),E6=q(hd,n=>n.polymerRunsLoadState),T6=q(hd,n=>n.coreDataLoadState.state),Fh=q(hd,n=>n.coreDataLoadState.lastLoadedTimeInMs),Wo=q(hd,n=>n.activePlugin),Nh=q(hd,n=>n.plugins),xS=q(hd,n=>n.environment),CS=q(hd,n=>n.sideBarWidthInPercent),Lh=q(hd,n=>n.runsTableFullScreen),D6=new Set([wn.COMPARE_EXPERIMENT,wn.EXPERIMENT,wn.NOT_SET]),I6=(()=>{class n{refreshPolymerRuns(){return $r(this.tfBackend.ref.runsStore.refresh())}fetchEnvironment(){return this.webappDataSource.fetchEnvironment().pipe(Nt(e=>{this.store.dispatch(_S({environment:e}))}))}constructor(e,i,r){this.actions$=e,this.store=i,this.webappDataSource=r,this.tfBackend={ref:document.createElement("tf-backend").tf_backend},this.onDashboardLoad$=tn(this.actions$.pipe(ei(C6,Ps),Bt(this.store.select(No)),Yn(([,o],[,s])=>Fo(o,s))),this.actions$.pipe(ei(cs,Fs))).pipe(Bt(this.store.select(Ha)),ke(([,o])=>D6.has(o)),ac(1,void 0,{leading:!0})),this.fetchWebAppData$=ar(()=>{let o=this.onDashboardLoad$.pipe(Bt(this.store.select(yS),this.store.select(g6)),ke(([,{state:a}])=>a!==Te.LOADING),Nt(()=>this.store.dispatch(fS())),hn(([,,a])=>function(...n){let t=rc(n),e=OC(n);return e.length?new Kt(i=>{let r=e.map(()=>[]),o=e.map(()=>!1);i.add(()=>{r=o=null});for(let s=0;!i.closed&&s<e.length;s++)ii(e[s]).subscribe(Vt(i,a=>{if(r[s].push(a),r.every(l=>l.length)){let l=r.map(c=>c.shift());i.next(t?t(...l):l),r.some((c,d)=>!c.length&&o[d])&&i.complete()}},()=>{o[s]=!0,!r[s].length&&i.complete()}));return()=>{r=o=null}}):Jr}(this.webappDataSource.fetchPluginsListing(a),this.fetchEnvironment()).pipe(N(([l])=>{this.store.dispatch(df({plugins:l}))}),zr(l=>(this.store.dispatch(sv(l instanceof ov?{failureCode:l.failureCode}:{failureCode:ja.UNKNOWN})),Jr)))));return tn(o,this.onDashboardLoad$.pipe(N(([,a])=>a),Jn(a=>a!==wn.COMPARE_EXPERIMENT?Ht([]):this.store.select(za).pipe(Yn((l,c)=>{let d=Object.entries(l),u=new Map(Object.entries(c));if(d.length!==u.size)return!1;for(let[p,f]of d)if(!u.get(p)||u.get(p).aliasText!==f.aliasText||u.get(p).aliasNumber!==f.aliasNumber)return!1;return!0}),Sa(0),ac(500,void 0,{leading:!0,trailing:!0}))),Bt(this.store.select(Ha),this.store.select(E6)),ke(([,a,l])=>D6.has(a)&&l.state!==Te.LOADING),Nt(()=>{this.store.dispatch(mS())}),Jn(()=>this.refreshPolymerRuns()),Nt(()=>{this.store.dispatch(hS())}),zr(()=>(this.store.dispatch(gS()),Jr))))},{dispatch:!1}),this.dispatchChangePlugin$=ar(()=>tn(this.onDashboardLoad$,this.actions$.pipe(ei(df))).pipe(Bt(this.store.select(Wo)),N(([,o])=>o),Yn(),ke(o=>null!==o),Yt(1),Nt(o=>{this.store.dispatch(wc({plugin:o}))})),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(uS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),CF=new ie("Core Feature Config");function A6(n){return{initialState:{...lv,activePlugin:n.getPluginId()||null}}}function sge(){return q(CS,n=>({sideBarWidthInPercent:n}))}var Ga=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:CF,deps:[_u],useFactory:A6}],imports:[to.forFeature([I6]),Tr.forFeature("core",S6,CF),x6,Ki.defineGlobalSetting(sge)]}),n})(),R6=new ie("[Alert] Action-To-Alert Provider"),Sc=(()=>{class n{constructor(e){this.providers=new Map;for(let i of e||[])for(let r of i){if(this.providers.has(r.actionCreator.type))throw new RangeError(`"${r.actionCreator.type}" is already registered for alerts. Multiple alerts for the same action is not allowed.`);this.providers.set(r.actionCreator.type,r.alertFromAction)}}getAlertFromAction(e){let i=this.providers.get(e.type);return i?i(e):null}static registerAlertActions(e){return{ngModule:n,providers:[{provide:R6,multi:!0,useFactory:e}]}}}return n.\u0275fac=function(e){return new(e||n)(k(R6,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),MS=_e("[Runs] Fetch Runs Requested",{_as:"props",_p:void 0}),yu=_e("[Runs] Fetch Runs Succeeded",{_as:"props",_p:void 0}),Bh=_e("[Runs] Fetch Runs Failed",{_as:"props",_p:void 0}),cv=_e("[Runs] Run Selection Toggled",{_as:"props",_p:void 0}),wS=_e("[Runs] Single Run Selected",{_as:"props",_p:void 0}),dv=_e("[Runs] Run Page Selection Toggled",{_as:"props",_p:void 0}),SS=_e("[Runs] Run Selector Pagination Option Changed",{_as:"props",_p:void 0}),ES=_e("[Runs] Run Selector Sort Changed",{_as:"props",_p:void 0}),uv=_e("[Runs] Run Selector Regex Filter Changed",{_as:"props",_p:void 0}),TS=_e("[Runs] Run Color Changed",{_as:"props",_p:void 0}),Vh=_e("[Runs] Run Table Shown",{_as:"props",_p:void 0}),Hh=_e("[Runs] Run Group By Changed",{_as:"props",_p:void 0}),DS=_e("[Runs] Runs Table Header Added",{_as:"props",_p:void 0}),zh=_e("[Runs] Runs Table Header Removed",{_as:"props",_p:void 0}),IS=_e("[Runs] Runs Table Header Order Changed",{_as:"props",_p:void 0}),AS=_e("[Runs] Runs Table Sorting Info Changed",{_as:"props",_p:void 0}),ht=(()=>{return(n=ht||(ht={})).COLOR="COLOR",n.RELATIVE_TIME="RELATIVE_TIME",n.RUN="RUN",n.STEP="STEP",n.EXPERIMENT="EXPERIMENT",n.TIME="TIME",n.VALUE="VALUE",n.SMOOTHED="SMOOTHED",n.VALUE_CHANGE="VALUE_CHANGE",n.START_STEP="START_STEP",n.END_STEP="END_STEP",n.START_VALUE="START_VALUE",n.END_VALUE="END_VALUE",n.MIN_VALUE="MIN_VALUE",n.MAX_VALUE="MAX_VALUE",n.PERCENTAGE_CHANGE="PERCENTAGE_CHANGE",n.STEP_AT_MAX="STEP_AT_MAX",n.STEP_AT_MIN="STEP_AT_MIN",n.MEAN="MEAN",n.RAW_CHANGE="RAW_CHANGE",n.HPARAM="HPARAM",n.METRIC="METRIC",n.CUSTOM="CUSTOM",ht;var n})(),gn=(()=>{return(n=gn||(gn={}))[n.DISCRETE=0]="DISCRETE",n[n.INTERVAL=1]="INTERVAL",gn;var n})(),io=(()=>{return(n=io||(io={}))[n.ASCENDING=0]="ASCENDING",n[n.DESCENDING=1]="DESCENDING",io;var n})(),ro=(()=>{return(n=ro||(ro={}))[n.SINGLE=0]="SINGLE",n[n.RANGE=1]="RANGE",ro;var n})(),Ns=(()=>{return(n=Ns||(Ns={})).STATUS_UNKNOWN="STATUS_UNKNOWN",n.STATUS_SUCCESS="STATUS_SUCCESS",n.STATUS_FAILURE="STATUS_FAILURE",n.STATUS_RUNNING="STATUS_RUNNING",Ns;var n})(),RS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ec={};FA(Ec,{dashboardHparamFilterAdded:()=>DF,dashboardHparamFilterRemoved:()=>fv,dashboardMetricFilterAdded:()=>IF,dashboardMetricFilterRemoved:()=>mv,hparamsDiscreteHparamFilterChanged:()=>SF,hparamsFetchSessionGroupsSucceeded:()=>pv,hparamsIntervalHparamFilterChanged:()=>EF,hparamsMetricFilterChanged:()=>TF});var SF=_e("[Hparams] Hparams Discrete Hparam Filter Changed",{_as:"props",_p:void 0}),EF=_e("[Hparams] Hparams Interval Hparam Filter Changed",{_as:"props",_p:void 0}),TF=_e("[Hparams] Hparams Metric Filter Changed",{_as:"props",_p:void 0}),pv=_e("[Hparams] Hparams Fetch Session Groups Succeeded",{_as:"props",_p:void 0}),DF=_e("[Hparams] Dashboard Hparam Filter Added",{_as:"props",_p:void 0}),IF=_e("[Hparams] Dashboard Metric Filter Added",{_as:"props",_p:void 0}),fv=_e("[Hparams] Dashboard Hparam Filter Removed",{_as:"props",_p:void 0}),mv=_e("[Hparams] Dashboard Metric Filter Removed",{_as:"props",_p:void 0});function ff(n){return JSON.stringify([...n].sort())}function hv(n){let t=new Map,e=new Map,i=new Map;for(let r of n)for(let[o,s]of r)if(s.type===gn.DISCRETE){let{possibleValues:a,values:l}=e.get(o)||{possibleValues:new Set,values:new Set};for(let c of s.filterValues)l.add(c);for(let c of s.possibleValues)a.add(c);e.set(o,{possibleValues:a,values:l})}else{let a=i.get(o);i.set(o,{filterLowerValue:Math.min(s.filterLowerValue,a?.filterLowerValue??1/0),filterUpperValue:Math.max(s.filterUpperValue,a?.filterUpperValue??-1/0),minValue:Math.min(s.minValue,a?.minValue??1/0),maxValue:Math.max(s.maxValue,a?.maxValue??-1/0)})}for(let[r,{values:o,possibleValues:s}]of e)t.set(r,{type:gn.DISCRETE,includeUndefined:!0,possibleValues:[...s],filterValues:[...o]});for(let[r,{minValue:o,maxValue:s,filterLowerValue:a,filterUpperValue:l}]of i){if(t.has(r)){let c=t.get(r);if(c.type===gn.DISCRETE&&c.possibleValues.some(d=>d))throw new RangeError(`Cannot combine hparam, ${r}, as it is of mixed types.`)}t.set(r,{type:gn.INTERVAL,includeUndefined:!0,minValue:o,maxValue:s,filterLowerValue:a,filterUpperValue:l})}return t}function PS(n){let t=new Map;for(let e of n)for(let[i,r]of e){let o=t.get(i);t.set(i,{type:gn.INTERVAL,includeUndefined:!0,...o,minValue:Math.min(r.minValue,o?.minValue??1/0),maxValue:Math.max(r.maxValue,o?.maxValue??-1/0),filterLowerValue:Math.min(r.filterLowerValue,o?.filterLowerValue??1/0),filterUpperValue:Math.max(r.filterUpperValue,o?.filterUpperValue??-1/0)})}return t}function F6(n){return n.domain.type===gn.DISCRETE?{type:gn.DISCRETE,includeUndefined:!0,possibleValues:n.domain.values,filterValues:n.domain.values}:{type:gn.INTERVAL,includeUndefined:!0,minValue:n.domain.minValue,maxValue:n.domain.maxValue,filterLowerValue:n.domain.minValue,filterUpperValue:n.domain.maxValue}}var pge=br({specs:{},filters:{},dashboardSpecs:{hparams:[],metrics:[]},dashboardSessionGroups:[],dashboardFilters:{hparams:new Map,metrics:new Map}},ye(SF,(n,t)=>{let{experimentIds:e,hparamName:i,filterValues:r,includeUndefined:o}=t,s=ff(e),a=n.filters[s]??{hparams:new Map},l=a.hparams.get(i);if(l&&l.type!==gn.DISCRETE)throw new RangeError(`New discrete filter of ${i} conflicts existing filter of `+gn[l.type]);let c=hv(e.filter(f=>Boolean(n.specs[f])).map(f=>n.specs[f].hparam.defaultFilters)).get(i);if(!c)throw new Error(`Cannot set hparam, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);if(c.type!==gn.DISCRETE)throw new Error(`Cannot set ${i} when default filter is not of discrete type.`);let d=new Set(c.possibleValues),u=[...r].filter(f=>!d.has(f));if(u.length)throw new Error(`New filter for ${i} has more than one value that is not present in the spec. Bad values: ${u.join(", ")}`);let p=new Map(a.hparams);return p.set(i,{...l,type:gn.DISCRETE,includeUndefined:o,possibleValues:[...d],filterValues:r}),{...n,filters:{...n.filters,[s]:{...a,hparams:p}}}}),ye(EF,(n,t)=>{let{experimentIds:e,hparamName:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=t,a=ff(e),l=n.filters[a]??{metrics:new Map,hparams:new Map},c=l.hparams.get(i);if(c&&c.type!==gn.INTERVAL)throw new RangeError(`New interval filter of ${i} conflicts existing filter of `+gn[c.type]);let d=hv(e.filter(p=>Boolean(n.specs[p])).map(p=>n.specs[p].hparam.defaultFilters)).get(i);if(!d)throw new Error(`Cannot set hpara, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);if(d.type!==gn.INTERVAL)throw new Error(`Cannot set ${i} when default filter is not of interval type.`);let u=new Map(l.hparams);return u.set(i,{...c,type:gn.INTERVAL,includeUndefined:s,minValue:d.minValue,maxValue:d.maxValue,filterLowerValue:r,filterUpperValue:o}),{...n,filters:{...n.filters,[a]:{...l,hparams:u}}}}),ye(TF,(n,t)=>{let{experimentIds:e,metricTag:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=t,a=ff(e),l=n.filters[a]??{metrics:new Map,hparams:new Map},c=PS(e.filter(p=>Boolean(n.specs[p])).map(p=>n.specs[p].metric.defaultFilters)).get(i);if(!c)throw new Error(`Cannot set metric, ${i}, when it is not known for experimentIds: ${e.join(", ")}`);let d=l.metrics.get(i),u=new Map(l.metrics);return u.set(i,{...d,type:gn.INTERVAL,includeUndefined:s,minValue:c.minValue,maxValue:c.maxValue,filterLowerValue:r,filterUpperValue:o}),{...n,filters:{...n.filters,[a]:{...l,metrics:u}}}}),ye(yu,(n,t)=>{if(0===Object.keys(t.newRunsAndMetadata).length)return n;let e={...n.specs},i=new Map,r=new Set;for(let o of Object.keys(t.newRunsAndMetadata)){let s=new Map,a=new Map,l=new Map,c=new Map,{runs:d,metadata:u}=t.newRunsAndMetadata[o];for(let p of d){let f=u.runToHparamsAndMetrics[p.id];if(f)for(let m of f.metrics){let b=i.get(m.tag);i.set(m.tag,{min:b?Math.min(b.min,m.value):m.value,max:b?Math.max(b.max,m.value):m.value})}}for(let{name:p,domain:f}of u.hparamSpecs)if(f.type===gn.DISCRETE){let m=l.get(p)||new Set;for(let b of f.values)m.add(b);l.set(p,m)}else{let m=c.get(p);c.set(p,{minValue:m?Math.min(f.minValue,m.minValue):f.minValue,maxValue:m?Math.max(f.maxValue,m.maxValue):f.maxValue})}for(let p of u.metricSpecs)r.add(p.tag);for(let[p,f]of l)s.set(p,{type:gn.DISCRETE,includeUndefined:!0,possibleValues:[...f],filterValues:[...f]});for(let[p,{minValue:f,maxValue:m}]of c)s.set(p,{type:gn.INTERVAL,includeUndefined:!0,minValue:f,maxValue:m,filterLowerValue:f,filterUpperValue:m});for(let p of r){let f=i.get(p),m=f?.min??0,b=f?.max??0;a.set(p,{type:gn.INTERVAL,includeUndefined:!0,minValue:m,maxValue:b,filterLowerValue:m,filterUpperValue:b})}e[o]={hparam:{...e[o]?.hparam,specs:u.hparamSpecs,defaultFilters:s},metric:{...e[o]?.metric,specs:u.metricSpecs,defaultFilters:a}}}return{...n,specs:e}}),ye(pv,(n,t)=>({...n,dashboardSpecs:t.hparamsAndMetricsSpecs,dashboardSessionGroups:t.sessionGroups})),ye(DF,(n,t)=>{let e=new Map(n.dashboardFilters.hparams);return e.set(t.name,t.filter),{...n,dashboardFilters:{...n.dashboardFilters,hparams:e}}}),ye(IF,(n,t)=>{let e=new Map(n.dashboardFilters.metrics);return e.set(t.name,t.filter),{...n,dashboardFilters:{...n.dashboardFilters,metrics:e}}}),ye(fv,(n,t)=>{let e=new Map(n.dashboardFilters.hparams);return e.delete(t.name),{...n,dashboardFilters:{...n.dashboardFilters,hparams:e}}}),ye(mv,(n,t)=>{let e=new Map(n.dashboardFilters.metrics);return e.delete(t.name),{...n,dashboardFilters:{...n.dashboardFilters,metrics:e}}}));function N6(n,t){return pge(n,t)}var OS="hparams",L6="data/plugin/hparams";function hge(n){return function(n){return Boolean(n.domainDiscrete)}(n)?{type:gn.DISCRETE,values:n.domainDiscrete}:function(n){return Boolean(n.domainInterval)}(n)?{...n.domainInterval,type:gn.INTERVAL}:{values:[],type:gn.DISCRETE}}var kS=(()=>{class n{constructor(e){this.http=e}getPrefix(e){return e.length>1?"compare":"experiment"}formatExperimentIds(e){return 1===e.length?e[0]:e.map((i,r)=>`${r}:${i}`).join(",")}fetchExperimentInfo(e){let i=this.formatExperimentIds(e);return this.http.post(`/${this.getPrefix(e)}/${i}/${L6}/experiment`,{experimentName:i},{},"request").pipe(N(r=>({hparams:r.hparamInfos.map(o=>{let s={...o,domain:hge(o)};return delete s.domainInterval,delete s.domainDiscrete,s}),metrics:r.metricInfos.map(o=>({...o,tag:o.name.tag}))})))}fetchSessionGroups(e,i){let r=this.formatExperimentIds(e),o=[];for(let a of i.hparams)o.push({hparam:a.name});for(let a of i.metrics)o.push({metric:a.name});let s={experimentName:r,allowedStatuses:[Ns.STATUS_FAILURE,Ns.STATUS_RUNNING,Ns.STATUS_SUCCESS,Ns.STATUS_UNKNOWN],colParams:o,startIndex:0,sliceSize:1e6};return this.http.post(`/${this.getPrefix(e)}/${r}/${L6}/session_groups`,s,{},"request").pipe(N(a=>a.sessionGroups.map(l=>(l.sessions=l.sessions.map(c=>{if(e.length>1){let[,...d]=c.name.split(" "),[u,...p]=d.join(" ").split("/");c.name=[e[parseInt(u)],...p].join("/")}else c.name=[e[0],c.name].join("/");return c}),l))))}}return n.\u0275fac=function(e){return new(e||n)(k(Ua))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),B6=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.runTableShown$=this.actions$.pipe(ei(Vh),N(({experimentIds:o})=>o),Yn((o,s)=>o.join("")===s.join(""))),this.navigated$=this.actions$.pipe(ei(Ps),Bt(this.store.select(lr)),ke(([,o])=>Boolean(o)),N(([,o])=>o),Yn((o,s)=>o.join("")===s.join(""))),this.loadHparamsOnReload$=this.actions$.pipe(ei(cs,Fs),Bt(this.store.select(lr)),ke(([,o])=>Boolean(o)),N(([,o])=>o)),this.loadHparamsData$=ar(()=>tn(this.navigated$,this.runTableShown$,this.loadHparamsOnReload$).pipe(Bt(this.store.select(md),this.store.select(No)),ke(([,o])=>o),ke(([,,o])=>o?.routeKind===wn.EXPERIMENT||o?.routeKind===wn.COMPARE_EXPERIMENT),ac(10),Jn(([o])=>this.loadHparamsForExperiments(o)),N(o=>pv(o))))}loadHparamsForExperiments(e){return this.dataSource.fetchExperimentInfo(e).pipe(Jn(i=>this.dataSource.fetchSessionGroups(e,i).pipe(zr(r=>r instanceof Al&&400===r.status?Ht([]):ea(()=>r)),N(r=>({hparamsAndMetricsSpecs:i,sessionGroups:r})))))}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(kS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),V6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[kS],imports:[Tr.forFeature(OS,N6),to.forFeature([B6])]}),n})(),FS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[V6]}),n})(),H6="data/plugin/hparams";function _ge(n,t){return`${t}/${n}`}function bge(n){let t;return t=function(n){return n.hasOwnProperty("domainDiscrete")}(n)?{type:gn.DISCRETE,values:n.domainDiscrete}:function(n){return n.hasOwnProperty("domainInterval")}(n)?{...n.domainInterval,type:gn.INTERVAL}:{type:gn.INTERVAL,minValue:-1/0,maxValue:1/0},{description:n.description,displayName:n.displayName,name:n.name,type:n.type,domain:t}}function vge(n){return{...n,tag:n.name.tag}}var z6=(()=>{class n{constructor(e){this.http=e}fetchRuns(e){return this.http.get(`/experiment/${e}/data/runs`).pipe(N(i=>i.map(r=>({id:_ge(r,e),name:r,startTime:0}))))}fetchHparamsMetadata(e){return this.http.post(`/experiment/${e}/${H6}/experiment`,{experimentName:e},{},"request").pipe(N(r=>{let o=[];for(let a of r.hparamInfos)o.push({hparam:a.name});for(let a of r.metricInfos)o.push({metric:a.name});return{experimentHparamsInfo:r,listSessionRequestParams:{experimentName:e,allowedStatuses:[Ns.STATUS_FAILURE,Ns.STATUS_RUNNING,Ns.STATUS_SUCCESS,Ns.STATUS_UNKNOWN],colParams:o,startIndex:0,sliceSize:1e6}}}),hn(({experimentHparamsInfo:r,listSessionRequestParams:o})=>this.http.post(`/experiment/${e}/${H6}/session_groups`,o,{},"request").pipe(N(s=>({experimentHparamsInfo:r,sessionGroupsList:s})))),N(({experimentHparamsInfo:r,sessionGroupsList:o})=>{let s={};for(let a of o.sessionGroups){let l=Object.entries(a.hparams).map(c=>{let[d,u]=c;return{name:d,value:u}});for(let c of a.sessions)for(let d of c.metricValues){let p=`${e}/${d.name.group?`${c.name}/${d.name.group}`:c.name}`,f=s[p]||{metrics:[],hparams:l};f.metrics.push({tag:d.name.tag,trainingStep:d.trainingStep,value:d.value}),s[p]=f}}return{hparamSpecs:r.hparamInfos.map(bge),metricSpecs:r.metricInfos.map(vge),runToHparamsAndMetrics:s}}),zr(r=>r instanceof Al&&400===r.status?Ht({hparamSpecs:[],metricSpecs:[],runToHparamsAndMetrics:{}}):ea(r)))}}return n.\u0275fac=function(e){return new(e||n)(k(Ua))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),U6=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:RS,useClass:z6}]}),n})(),j6=q(Er("alerts"),n=>n.latestAlert),LS="experiments",G6=q(Er(LS),n=>n.data),BS=q(G6,(n,t)=>{let{experimentId:e}=t;return n.experimentMap[e]||null}),W6=q(G6,lr,(n,t)=>(t??[]).map(e=>n.experimentMap[e]).filter(Boolean).reduce((e,i)=>(e[i.id]=i.name,e),{}));function VS(n,t,e){return n<t?t:n>e?e:n}function Uh(n,t,e){let i=VS(n.start.step,t,e),r=n.end?VS(n.end.step,t,e):null;return{startStep:i,endStep:r,clipped:i!==n.start.step||r!==(n.end?.step??null)}}function HS(n,t){let e=t[n.id];return e&&e.visible&&!Boolean(e.aux)}function AF(n,t){return t?n:{start:n.start,end:null}}function RF(n,t,e){return AF(function(n,{minStep:t,maxStep:e}){return{start:{step:VS(n.start.step,t,e)},end:n.end?{step:VS(n.end.step,t,e)}:null}}(n,t),e)}var zn=(()=>{return(n=zn||(zn={})).SCALARS="scalars",n.HISTOGRAMS="histograms",n.IMAGES="images",zn;var n})(),Pi=(()=>{return(n=Pi||(Pi={})).STEP="step",n.RELATIVE="relative",n.WALL_TIME="walltime",Pi;var n})(),gv="timeseries";function Z6(n){return n===zn.SCALARS||n===zn.HISTOGRAMS||n===zn.IMAGES}var wge=[zn.IMAGES];function ua(n){return wge.includes(n)}var Sge=[zn.HISTOGRAMS,zn.IMAGES];function pa(n){return Sge.includes(n)}function PF(n){return pa(n.plugin)}var Tc=class{};function US(n){return n.hasOwnProperty("error")}var OF="data/plugin/timeseries";function K6(n){let t=n.indexOf("/");return{run:n.substring(t+1),experimentId:n.substring(0,t)}}function $6(n,t){return`${t}/${n}`}function J6(n,t){let{runToSeries:e,run:i,...r}=n,o={...r};return e&&(o.runToSeries=kF(e,t)),i&&(o.runId=$6(i,t)),o}function kF(n,t){let e={};for(let i in n)n.hasOwnProperty(i)&&(e[$6(i,t)]=n[i]);return e}var eW=(()=>{class n{constructor(e,i){this.http=e,this.store=i}fetchTagMetadata(e){let i=e.map(o=>this.http.get(`/experiment/${o}/${OF}/tags`).pipe(N(a=>function(n,t){let e={};for(let i of Object.keys(n)){let r=i;if(ua(r)){let{tagRunSampledInfo:o,...s}=n[r],a={};for(let l in o)o.hasOwnProperty(l)&&(a[l]=kF(o[l],t));e[r]={...s,tagRunSampledInfo:a}}else{let{runTagInfo:o,...s}=n[r];e[r]={...s,runTagInfo:kF(o,t)}}}return e}(a,o)))),r=this.store.select(vu).pipe(ke(Boolean),Yt(1),Bt(this.store.select(cS)),N(([,o])=>o));return co(i).pipe(Bt(r),N(([o,s])=>{let a=function(n){let t={};for(let e of n)for(let i of Object.values(zn))if(ua(i)){t[i]=t[i]||{tagDescriptions:{},tagRunSampledInfo:{}};let{tagDescriptions:r,tagRunSampledInfo:o}=e[i];t[i].tagDescriptions={...t[i].tagDescriptions,...r};let s=t[i].tagRunSampledInfo;for(let a of Object.keys(o)){s[a]=s[a]||{};for(let l of Object.keys(o[a]))s[a][l]=o[a][l]}}else{t[i]=t[i]||{tagDescriptions:{},runTagInfo:{}};let{tagDescriptions:r,runTagInfo:o}=e[i];t[i].tagDescriptions={...t[i].tagDescriptions,...r},t[i].runTagInfo={...t[i].runTagInfo,...o}}return t}(o);return s||(a[zn.IMAGES]={tagDescriptions:{},tagRunSampledInfo:{}}),a}))}fetchTimeSeries(e){let i=e.map(r=>{if(pa(r.plugin)){let{runId:l,...c}=r,{run:d,experimentId:u}=K6(l),p={...c,run:d};return this.fetchTimeSeriesBackendRequest(p,u).pipe(N(({response:f,experimentId:m})=>J6(f,m)))}let{experimentIds:o,...s}=r;return co(o.map(l=>this.fetchTimeSeriesBackendRequest(s,l))).pipe(N(l=>{let{runToSeries:c,error:d,...u}=l[0].response,p=u;for(let{response:f,experimentId:m}of l){let b=J6(f,m);if(p.error)continue;let{runToSeries:M,error:y}=b;if(y)p.error=y,p.runToSeries=void 0;else{p.runToSeries=p.runToSeries||{};for(let x of Object.keys(M))p.runToSeries[x]=M[x]}}return p}))});return co(i)}fetchTimeSeriesBackendRequest(e,i){let r=new FormData;return r.append("requests",JSON.stringify([e])),this.http.post(`/experiment/${i}/${OF}/timeSeries`,r).pipe(N(o=>({response:o[0],experimentId:i})))}imageUrl(e){return`${OF}/imageData?imageId=${e}`}downloadUrl(e,i,r,o){let l,{run:s,experimentId:a}=K6(r);if(e!==zn.SCALARS)throw new Error(`Not implemented: downloadUrl for ${e} is not implemented yet`);if(l="scalars/scalars",!a)throw new Error("experimentId is empty; it is required to form downloadUrl.");return`/experiment/${a}/data/plugin/scalars/scalars?${new URLSearchParams({tag:i,run:s,format:o})}`}}return n.\u0275fac=function(e){return new(e||n)(k(Ua),k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ige=new URLSearchParams(window.location.search),jS=(()=>{class n{getParams(){return Ige}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),_v="tb_feature_flag_storage_key",FF=(()=>{class n{constructor(e){this.queryParams=e}getFeatures(e,i){let r=e?this.getPartialFeaturesFromMediaQuery():{},o=function(n,t){return Object.entries(n).reduce((e,[i,r])=>{let o=function(n,t){let e=n.queryParamOverride;if(!e||!t.has(e))return null;let i=t.get(e);return null==i?null:n.parseValue(i)}(r,t);return null!==o&&(e[i]=o),e},{})}(i,this.queryParams.getParams());return{...r,...Object.fromEntries(Object.entries(this.getPersistentFeatureFlags()).filter(([a])=>i[a])),...o}}persistFeatureFlags(e){let r={...this.getPersistentFeatureFlags(),...e};window.localStorage.setItem(_v,JSON.stringify(r))}resetPersistedFeatureFlag(e){let i=this.getPersistentFeatureFlags();if(null!=i[e]){if(delete i[e],0===Object.keys(i).length)return void window.localStorage.removeItem(_v);window.localStorage.setItem(_v,JSON.stringify(i))}}resetAllPersistedFeatureFlags(){window.localStorage.removeItem(_v)}getPersistentFeatureFlags(){let e=window.localStorage.getItem(_v);return null==e?{}:JSON.parse(e)}getPartialFeaturesFromMediaQuery(){let e={};return window.matchMedia("(prefers-color-scheme: dark)").matches&&(e.defaultEnableDarkMode=!0),e}}return n.\u0275fac=function(e){return new(e||n)(k(jS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),GS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),iW=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[FF,jS,{provide:GS,useClass:FF}]}),n})(),bv=_e("[FEATURE FLAG] Partial Feature Flags Loaded",{_as:"props",_p:void 0}),WS=_e("[FEATURE FLAG] Enable Dark Mode Override Changed",{_as:"props",_p:void 0}),mf=_e("[FEATURE FLAG] Store the feature flags in persistent localStorage",{_as:"props",_p:void 0}),xu=_e("[FEATURE FLAG] Reset feature flag overrides",{_as:"props",_p:void 0}),jh=_e("[FEATURE FLAG] Reset all feature flag overrides"),rW=_e("[FEATURE FLAG] Effects Init"),oW=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.tfFeatureFlags={ref:document.createElement("tf-feature-flags").tf_feature_flags},this.getFeatureFlags$=ar(()=>this.actions$.pipe(ei(rW),Li(this.store.select(h6),this.store.select(cf)),N(([,o,s])=>{let a=this.dataSource.getFeatures(o,s);return bv({features:a})}))),this.updatePolymerFeatureFlags$=ar(()=>this.actions$.pipe(ei(bv),Bt(this.store.select(ks),this.store.select(Ph)),Nt(([,o,s])=>{this.tfFeatureFlags.ref.setFeatureFlags(o,s)})),{dispatch:!1}),this.storeFeatureFlag$=ar(()=>this.actions$.pipe(ei(mf),Nt(({flags:o})=>{this.dataSource.persistFeatureFlags(o)})),{dispatch:!1}),this.resetFeatureFlagOverrides$=ar(()=>this.actions$.pipe(ei(xu),Nt(({flags:o})=>{o.forEach(s=>{this.dataSource.resetPersistedFeatureFlag(s)})})),{dispatch:!1}),this.resetAllFeatureFlagOverrides$=ar(()=>this.actions$.pipe(ei(jh),Nt(()=>{this.dataSource.resetAllPersistedFeatureFlags()})),{dispatch:!1})}ngrxOnInitEffects(){return rW()}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(GS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),lW=(()=>{class n{constructor(e){this.store=e}intercept(e,i){return this.store.pipe(un(Ph),function(n,t){let e=arguments.length>=2;return i=>i.pipe(n?ke((r,o)=>n(r,o,i)):is,Yt(1),e?function(n){return qt((t,e)=>{let i=!1;t.subscribe(Vt(e,r=>{i=!0,e.next(r)},()=>{i||e.next(n),e.complete()}))})}(t):K4(()=>new Om))}(),Jn(r=>(e=e.clone({headers:e.headers.set("X-TensorBoard-Feature-Flags",JSON.stringify(r))}),i.handle(e))))}}return n.\u0275fac=function(e){return new(e||n)(k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function Gh(n){return"false"!==n}var n,NF={scalarsBatchSize:{defaultValue:void 0,queryParamOverride:"scalarsBatchSize",parseValue:parseInt},enabledExperimentalPlugins:{defaultValue:[],queryParamOverride:"experimentalPlugin",parseValue:function(n){return n?n.split(","):[]}},forceSvg:{defaultValue:!1,queryParamOverride:"forceSVG",parseValue:Gh},enableDarkModeOverride:{defaultValue:null,queryParamOverride:null},defaultEnableDarkMode:{defaultValue:!1,queryParamOverride:"darkMode",parseValue:Gh},isAutoDarkModeAllowed:{defaultValue:!0,queryParamOverride:null},inColab:{defaultValue:!1,queryParamOverride:"tensorboardColab",parseValue:Gh},metricsImageSupportEnabled:{defaultValue:!0,queryParamOverride:null},showFlags:{defaultValue:void 0,queryParamOverride:"showFlags",parseValue:n=>n},enableScalarColumnCustomization:{defaultValue:!1,queryParamOverride:"enableScalarColumnCustomization",parseValue:Gh},enableHparamsInTimeSeries:{defaultValue:!0,queryParamOverride:"enableHparamsInTimeSeries",parseValue:Gh},enableSuggestedCards:{defaultValue:!1,queryParamOverride:"enableSuggestedCards",parseValue:Gh}},LF={isFeatureFlagsLoaded:!1,defaultFlags:(n=NF,Object.entries(n).reduce((t,[e,i])=>(t[e]=i.defaultValue,t),{})),metadata:NF,flagOverrides:{}},BF=new ie("[Feature Flag] Store Config");function dW(){return{initialState:LF}}var Nge=br(LF,ye(bv,(n,{features:t})=>({...n,isFeatureFlagsLoaded:!0,flagOverrides:{...n.flagOverrides,...t}})),ye(WS,(n,{enableDarkMode:t})=>({...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:t}})),ye(mf,(n,t)=>({...n,flagOverrides:{...n.flagOverrides,...t.flags}})),ye(xu,(n,t)=>{if(!t||!t.flags||!t.flags.length)return n;let e={...n.flagOverrides};return t.flags.forEach(i=>{delete e[i]}),{...n,flagOverrides:e}}),ye(jh,n=>({...n,flagOverrides:{}})),ye(Il,(n,{partialSettings:t})=>{if(!t.themeOverride)return n;let e;switch(t.themeOverride){case Os.BROWSER_DEFAULT:e=null;break;case Os.DARK:e=!0;break;case Os.LIGHT:e=!1}return{...n,flagOverrides:{...n.flagOverrides,enableDarkModeOverride:e}}}));function uW(n,t){return Nge(n,t)}function Lge(){return q(lS,n=>null===n?{themeOverride:Os.BROWSER_DEFAULT}:{themeOverride:n?Os.DARK:Os.LIGHT})}var Wh=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:BF,useFactory:dW},{provide:bF,useClass:lW,multi:!0}],imports:[iW,Tr.forFeature(aS,uW,BF),to.forFeature([oW]),Ki.defineGlobalSetting(Lge)]}),n})(),qS=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:Tc,useClass:eW}],imports:[Wh,Oh]}),n})(),oo=(()=>(function(n){n.DEFAULT="default",n.ALPHABETICAL="alphabetical",n.ASCENDING="ascending",n.DESCENDING="descending",n.NEAREST="nearest",n.NEAREST_Y="nearest_Y"}(oo||(oo={})),oo))(),YS="metrics",Ls=(()=>(function(n){n[n.NONE=0]="NONE",n[n.OVERRIDE_AS_ENABLED=1]="OVERRIDE_AS_ENABLED",n[n.OVERRIDE_AS_DISABLED=2]="OVERRIDE_AS_DISABLED"}(Ls||(Ls={})),Ls))(),XS={cardMinWidth:null,tooltipSort:oo.ALPHABETICAL,ignoreOutliers:!0,xAxisType:Pi.STEP,hideEmptyCards:!0,scalarSmoothing:.6,scalarPartitionNonMonotonicX:!1,imageBrightnessInMilli:1e3,imageContrastInMilli:1e3,imageShowActualSize:!1,histogramMode:Dr.OFFSET},Bge=.1;function gd(n,t,e,i){return n[t].hasOwnProperty(e)?ua(t)?n[t][e].hasOwnProperty(i)?n[t][e][i]:null:n[t][e]:null}function QS(n,t,e,i){if(ua(t)){let s={...n[t]},a=function(n,t,e){let r=n.hasOwnProperty(t)?{...n[t]}:{},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}(s,e,i);return s[e]=a,s}let r={...n[t]},o=r.hasOwnProperty(e);return r[e]=o?{...r[e]}:{runToSeries:{},runToLoadState:{}},r}function VF(n){return JSON.stringify(n)}function ZS(n,t,e){let i={...e};for(let r of t)i[r]=n;return i}function qh(n,t,e,i){if(ua(t)){let o=n[t].tagRunSampledInfo;return o.hasOwnProperty(e)?Object.keys(o[e]).filter(a=>i<o[e][a].maxSamplesPerStep):[]}let r=n[t].tagToRuns;return r.hasOwnProperty(e)?r[e]:[]}function zge(n,t){return n.plugin===t.plugin&&n.tag===t.tag&&n.sample===t.sample&&(n.runId===t.runId||!n.runId&&!t.runId)}function HF(n,t,e,i,r,o,s,a){let l=new Set(n),c=[];for(let u of n)for(let p of t)if(zge(e[p],u)){c.push(p),l.delete(u);break}if(!c.length)return{unresolvedImportedPinnedCards:n,cardMetadataMap:e,cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:s,cardStateMap:a};let d={cardToPinnedCopy:i,cardToPinnedCopyCache:r,pinnedCardToOriginal:o,cardStepIndex:s,cardMetadataMap:e,cardStateMap:a};for(let u of c)d=zF(u,d.cardToPinnedCopy,d.cardToPinnedCopyCache,d.pinnedCardToOriginal,d.cardStepIndex,d.cardMetadataMap,a);return{...d,unresolvedImportedPinnedCards:[...l]}}function zF(n,t,e,i,r,o,s){if(t.has(n))return{cardToPinnedCopy:t,cardToPinnedCopyCache:e,pinnedCardToOriginal:i,cardStepIndex:r,cardMetadataMap:o,cardStateMap:s};let a=new Map(t),l=new Map(e),c=new Map(i),d={...r},u={...o},p={...s},f=function(n){return JSON.stringify({baseCardId:n})}(n);a.set(n,f),l.set(n,f),c.set(f,n),r.hasOwnProperty(n)&&(d[f]=r[n]);let m=o[n];if(!m)throw new Error("Cannot pin a card without metadata");return u[f]=m,p[n]&&(p[f]=p[n]),{cardToPinnedCopy:a,cardToPinnedCopyCache:l,pinnedCardToOriginal:c,cardStepIndex:d,cardMetadataMap:u,cardStateMap:p}}var Uge={MAX_PIN_COUNT:10};function KS(n){return n.pinnedCardToOriginal.size+n.unresolvedImportedPinnedCards.length<Uge.MAX_PIN_COUNT}function UF(n,t,e,i){let r={...n};return Object.keys(n).forEach(o=>{if(!o.includes('"plugin":"images"'))return;let s=jF(o,t,e),a=null;if(null===i.end)a=function(n,t){let e=t.indexOf(n);if(-1!==e)return{index:e,isClosest:!1};for(let i=0;i<t.length-1;i++){let r=t[i],o=t[i+1],s=(o-r)*Bge;if(n<r)return null;if(!(n>o)){if(n-r<=s)return{index:i,isClosest:!0};if(o-n<=s)return{index:i+1,isClosest:!0}}}return null}(i.start.step,s);else{let c=s[n[o].index],d=function(n,t){if(!n)return[];if(null===n.end)return-1!==t.indexOf(n.start.step)?[n.start.step]:[];let e=[];for(let i of t)i>=n.start.step&&i<=n.end.step&&e.push(i);return e}(i,s);a=function(n,t,e){if(0===n.length)return null;let i=n[0],r=n[n.length-1];return e>r?{index:t.indexOf(r),isClosest:!1}:e<i?{index:t.indexOf(i),isClosest:!1}:null}(d,s,c)}null!==a&&(r[o]=a)}),r}function jF(n,t,e){if(!t.hasOwnProperty(n))return[];let{plugin:i,tag:r,sample:o,runId:s}=t[n];if(null===s)return[];let a=gd(e,i,r,o);return null!==a&&a.runToSeries.hasOwnProperty(s)?a.runToSeries[s].map(l=>l.step):[]}function GF(n){let{dataMinMax:t,userViewBox:e}=n,i=e?.x;if(!i)return t;let r=i[0]<i[1]?i[0]:i[1],o=r===i[0]?i[1]:i[0];return{minStep:Math.ceil(r),maxStep:Math.floor(o)}}function JS(n,t){switch(n){case Ls.OVERRIDE_AS_ENABLED:return!0;case Ls.OVERRIDE_AS_DISABLED:return!1;default:return t}}function $S(n,t,e,i){return e?t:JS(n[i]?.rangeSelectionOverride,t)}function Yh(n){let t=new Map;return(...e)=>{let i=JSON.stringify(e);if(t.has(i))return t.get(i);{let r=n(...e);return t.set(i,r),r}}}var Hi=Er(YS),vv=q(Hi,n=>n.tagMetadataLoadState),_W=q(Hi,n=>n.tagMetadata),Yge=q(Hi,n=>n.cardList),_d=q(Hi,(n,t)=>{if(!n.cardMetadataMap.hasOwnProperty(t))return Te.NOT_LOADED;let{plugin:e,tag:i,runId:r,sample:o}=n.cardMetadataMap[t],s=gd(n.timeSeriesData,e,i,o);if(!s)return Te.NOT_LOADED;let a=s.runToLoadState;if(r)return a.hasOwnProperty(r)?a[r]:Te.NOT_LOADED;let l=qh(n.tagMetadata,e,i,o);if(!l.length)throw new Error("Cannot load a card whose tag has no runs");return l.every(c=>a[c]===Te.LOADED)?Te.LOADED:l.some(c=>a[c]===Te.LOADING)?Te.LOADING:Te.NOT_LOADED}),Xge=Yh(n=>q(t=>t,t=>{let{plugin:e,tag:i,sample:r}=n,o=gd(t.timeSeriesData,e,i,r);return o?o.runToSeries:null})),Cu=q(Hi,(n,t)=>n.cardMetadataMap.hasOwnProperty(t)?Xge(n.cardMetadataMap[t])(n):null),WF=q(Hi,n=>n.cardMetadataMap),Wa=q(WF,(n,t)=>n.hasOwnProperty(t)?n[t]:null),qa=q(Hi,n=>n.cardStateMap),Qge=q(Hi,n=>n.visibleCardMap),bW=q(Qge,n=>new Set(n.values())),e1=q(Yge,WF,(n,t)=>n.filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),qF=q(Hi,(n,t)=>n.cardStepIndex.hasOwnProperty(t)?n.cardStepIndex[t]:null),vW=q(Hi,(n,t)=>jF(t,n.cardMetadataMap,n.timeSeriesData)),yW=q(Hi,n=>n.cardToPinnedCopy),Zge=q(Hi,n=>n.pinnedCardToOriginal),yv=q(yW,WF,(n,t)=>[...n.values()].filter(e=>t.hasOwnProperty(e)).map(e=>({cardId:e,...t[e]}))),Mu=q(yW,Zge,(n,t,e)=>n.has(e)||t.has(e)),xW=q(Hi,n=>n.unresolvedImportedPinnedCards),CW=q(Hi,n=>KS(n)),Pl=q(Hi,n=>({...n.settings,...n.settingOverrides})),MW=q(Hi,n=>n.settingOverrides),Xh=q(Pl,n=>n.cardMinWidth),hf=q(Pl,n=>n.tooltipSort),gf=q(Pl,n=>n.ignoreOutliers),Ol=q(Pl,n=>n.xAxisType),t1=q(Pl,n=>n.histogramMode),wW=q(Pl,n=>n.hideEmptyCards),bd=q(Pl,n=>n.scalarSmoothing),n1=q(Pl,n=>n.scalarPartitionNonMonotonicX),i1=q(Pl,n=>n.imageBrightnessInMilli),r1=q(Pl,n=>n.imageContrastInMilli),o1=q(Pl,n=>n.imageShowActualSize),kl=q(Hi,n=>n.tagFilter),s1=q(Hi,(n,t)=>Boolean(n.tagGroupExpanded.get(t))),wu=q(Hi,n=>n.linkedTimeEnabled),xv=q(Hi,n=>n.stepSelectorEnabled),Su=q(Hi,n=>n.rangeSelectionEnabled),YF=q(Hi,n=>{let{min:t,max:e}=n.stepMinMax;return{min:t===1/0?0:t,max:e===-1/0?1e3:e}}),XF=q(Hi,YF,(n,t)=>n.linkedTimeSelection?n.linkedTimeSelection:{start:{step:t.max},end:null}),Eu=q(Hi,XF,(n,t)=>n.linkedTimeEnabled?t:null),Dc=q(Hi,n=>n.filteredPluginTypes),a1=q(Hi,n=>n.isSettingsPaneOpen),l1=q(Hi,n=>n.isSlideoutMenuOpen),SW=q(Hi,n=>n.tableEditorSelectedTab),c1=Yh(n=>q(qa,Su,wu,(t,e,i)=>$S(t,e,i,n))),EW=q(qa,(n,t)=>{if(n[t])return GF(n[t])}),TW=q(qa,(n,t)=>n[t]?.dataMinMax),QF=q(qa,(n,t)=>n[t]?.userViewBox??null),DW=q(qa,xv,Su,wu,Eu,(n,t,e,i,r,o)=>{let s=n[o];if(!s)return;let a=GF(s);if(!a)return;if(i&&r)return RF(r,a,e);if(!JS(s.stepSelectionOverride,t))return;let l=JS(s.rangeSelectionOverride,e),c=s.timeSelection;return c||(c={start:{step:a.minStep},end:{step:a.maxStep}}),l?c.end||(c={start:{step:a.minStep},end:c.start}):c={start:c.end??c.start,end:null},RF(c,a,l)}),Cv=q(Hi,n=>n.singleSelectionHeaders),Mv=q(Hi,n=>n.rangeSelectionHeaders),d1=Yh(n=>q(c1(n),Cv,Mv,(t,e,i)=>t?i:e)),AW=Er("notification"),Ic=(q(AW,n=>n.notifications),q(AW,n=>n.lastReadTimestampInMs??-1),(()=>(function(n){n[n.EXPERIMENT_NAME=0]="EXPERIMENT_NAME",n[n.HPARAM=1]="HPARAM",n[n.METRIC=2]="METRIC",n[n.RUN_NAME=3]="RUN_NAME"}(Ic||(Ic={})),Ic))()),Yi=(()=>(function(n){n[n.RUN=0]="RUN",n[n.EXPERIMENT=1]="EXPERIMENT",n[n.REGEX=2]="REGEX"}(Yi||(Yi={})),Yi))();function Sv(n,t,e){let i={},r=[],o={matches:i,nonMatches:r};switch(n.key){case Yi.RUN:for(let a of t)i[a.id]=[a];break;case Yi.EXPERIMENT:for(let a of t){let l=e[a.id],c=i[l]||[];c.push(a),i[l]=c}break;case Yi.REGEX:if(!n.regexString)break;let s;try{s=new RegExp(n.regexString)}catch{break}for(let a of t){let l=a.name.match(s);if(l){let d=l.length>1?JSON.stringify(l.slice(1)):"pseudo_group",u=i[d]||[];u.push(a),i[d]=u}else r.push(a)}}return o}function p1(n,t){return n===Yi.REGEX?{key:n,regexString:t??""}:{key:n}}var Tu={};FA(Tu,{getDashboardDefaultHparamFilters:()=>KF,getDashboardHparamFilterMap:()=>m1,getDashboardHparamsAndMetricsSpecs:()=>f1,getDashboardMetricsFilterMap:()=>h1,getDashboardSessionGroups:()=>ZF,getExperimentsHparamsAndMetricsSpecs:()=>o0e,getHparamFilterMap:()=>$ge,getHparamFilterMapFromExperimentIds:()=>e0e,getMetricFilterMap:()=>i0e,getMetricFilterMapFromExperimentIds:()=>r0e});var fa=Er(OS);function PW(n,t){let e=[];for(let i of t)!n.specs[i]||e.push(n.specs[i].hparam.defaultFilters);return hv(e)}var Kge=q(fa,PW);function OW(n,t,e){let i=ff(e);return new Map([...t,...n.filters[i]?.hparams??[]])}var $ge=q(fa,Kge,OW);function e0e(n,t){return q(fa,function(n){return q(fa,t=>PW(t,n))}(n),(e,i)=>OW(e,t?i:new Map,n))}function kW(n,t){let e=[];for(let i of t)!n.specs[i]||e.push(n.specs[i].metric.defaultFilters);return PS(e)}var t0e=q(fa,kW);function FW(n,t,e){let i=ff(e);return new Map([...t,...n.filters[i]?.metrics??[]])}var i0e=q(fa,t0e,FW);function r0e(n,t){return q(fa,function(n){return q(fa,t=>kW(t,n))}(n),(e,i)=>FW(e,t?i:new Map,n))}var o0e=q(fa,(n,t)=>function(...n){let t=new Map,e=new Map,i=new Map,r=new Map,o=[];for(let s of n){for(let a of s.hparams)if(e.has(a.name)||e.set(a.name,new Set),e.get(a.name).add(a.displayName),t.has(a.name)){let l=t.get(a.name),c=a;if(l.type!==c.type&&o.push(`Hparam, ${c.name}, types have to match. Got: ${l.type} vs. ${c.type}`),l.domain.type===gn.INTERVAL&&c.domain.type===gn.INTERVAL)(l.domain.minValue!==c.domain.minValue||l.domain.maxValue!==c.domain.maxValue)&&o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`);else if(l.domain.type===gn.DISCRETE&&c.domain.type===gn.DISCRETE){let d=new Set([...l.domain.values,...c.domain.values]);(l.domain.values.length!==c.domain.values.length||l.domain.values.length!==d.size)&&o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`)}else o.push(`Hparam, ${c.name}, domains have to match. Got: ${l.domain} vs. ${c.domain}`)}else t.set(a.name,{...a});for(let a of s.metrics)if(r.has(a.tag)||r.set(a.tag,new Set),r.get(a.tag).add(a.displayName),i.has(a.tag)){let l=i.get(a.tag);l.datasetType!==a.datasetType&&o.push(`Metric, ${a.tag}, datasetTypes have to match. Got: ${l.datasetType} vs. ${a.datasetType}`)}else i.set(a.tag,{...a})}if(o.length)throw new Error(`Validation error:\n${o.join("\n")}`);return{hparams:[...t].map(([s,a])=>({...a,displayName:[...e.get(s)].join(" or ")})),metrics:[...i].map(([s,a])=>({...a,displayName:[...r.get(s)].join(" or ")}))}}(...t.experimentIds.map(e=>{let i=n.specs[e];return i?{hparams:i.hparam.specs,metrics:i.metric.specs}:null}).filter(Boolean))),f1=q(fa,n=>n.dashboardSpecs),ZF=q(fa,n=>n.dashboardSessionGroups),KF=q(f1,n=>new Map(n.hparams.map(e=>[e.name,F6(e)]))),m1=q(fa,n=>n.dashboardFilters.hparams),h1=q(fa,n=>n.dashboardFilters.metrics),NW=Er("runs"),ds=q(NW,n=>n.data),LW=q(ds,n=>n.runIdToExpId),g1=q(ds,(n,t)=>n.runIdToExpId[t.runId]??null),_1=q(ds,(n,t)=>n.runMetadata[t.runId]??null),Du=q(ds,(n,t)=>(n.runIds[t.experimentId]||[]).filter(i=>Boolean(n.runMetadata[i])).map(i=>n.runMetadata[i])),s0e=q(ZF,lr,ds,(n,t,e)=>{if(!t)return{};let i=[];for(let a of t)i.push(...e.runIds[a]||[]);let r={};for(let a of n){let l=Object.entries(a.hparams).map(c=>{let[d,u]=c;return{name:d,value:u}});for(let c of a.sessions)r[c.name]=l}let o=Object.keys(r).sort((a,l)=>l.length-a.length),s={};for(let a of i)for(let l of o)if(a.startsWith(l)){s[a]={hparams:r[l],metrics:[]};break}return s}),b1=q(ds,lr,s0e,(n,t,e)=>t?t.map(i=>(n.runIds[i]||[]).filter(r=>Boolean(n.runMetadata[r])).map(r=>{let o={...n.runMetadata[r],experimentId:i};return o.hparams=e[r]?.hparams??null,o.metrics=e[r]?.metrics??null,o})).flat():[]),BW=q(ds,(n,t)=>n.runIds[t.experimentId]??[]),VW=q(ds,n=>new Map(Object.entries(n.runMetadata))),Ev=q(ds,(n,t)=>n.runsLoadState[t.experimentId]||{lastLoadedTimeInMs:null,state:Te.NOT_LOADED}),JF=q(ds,n=>null!==n.userSetGroupByKey?p1(n.userSetGroupByKey,n.colorGroupRegexString):null),HW=q(JF,ds,(n,t)=>n??t.initialGroupBy),vd=q(ds,n=>n.regexFilter),Tv=q(NW,n=>n.ui),$F=q(Tv,n=>n.paginationOption),e2=q(Tv,n=>n.sort),zW=q(Tv,n=>n.selectionState),UW=q(ds,n=>n.runColorOverrideForGroupBy),jW=q(ds,n=>n.defaultRunColorIdForGroupBy),v1=q(ds,n=>n.colorGroupRegexString),GW=q(Tv,n=>n.runsTableHeaders),WW=q(Tv,n=>n.sortingInfo),y1=_e("[Settings] Reload Enable Toggled"),x1=_e("[Settings] Reload Period Change",{_as:"props",_p:void 0}),C1=_e("[Settings] Page Size Change",{_as:"props",_p:void 0}),Bs={};FA(Bs,{getColorPalette:()=>a0e,getPageSize:()=>_f,getReloadEnabled:()=>Iv,getReloadPeriodInMs:()=>Av,getSettingsLoadState:()=>t2});var M1="settings",XW={state:Te.LOADED,lastLoadedTimeInMs:Date.now(),settings:{reloadPeriodInMs:3e4,reloadEnabled:!1,pageSize:12,colorPalette:{id:"default",name:"Defalt",colors:[{name:"Slate",lightHex:"#425066",darkHex:"#8e98a3"},{name:"Cyan",lightHex:"#12b5cb",darkHex:"#12b5cb"},{name:"Pink",lightHex:"#e52592",darkHex:"#e52592"},{name:"Yellow",lightHex:"#f9ab00",darkHex:"#f9ab00"},{name:"Purple",lightHex:"#9334e6",darkHex:"#9334e6"},{name:"Light Green",lightHex:"#7cb342",darkHex:"#7cb342"},{name:"Orange",lightHex:"#e8710a",darkHex:"#e8710a"}],inactive:{name:"Gray",lightHex:"#e0e0e0",darkHex:"#3b3b3b"}}}},Dv=Er(M1),t2=q(Dv,n=>n.state),Iv=q(Dv,n=>n.settings.reloadEnabled),Av=q(Dv,n=>n.settings.reloadPeriodInMs),_f=q(Dv,n=>n.settings.pageSize),a0e=q(Dv,n=>n.settings.colorPalette);function Qh(n,t,e){if(!t)return!0;let i;try{i=new RegExp(t,"i")}catch{return!1}let r=[n.runName];return e&&r.push(n.experimentAlias.aliasText,`${n.experimentAlias.aliasText}/${n.runName}`),r.some(o=>i.test(o))}var l0e=q(lr,zW,LW,(n,t,e)=>{if(!n)return new Map;let i=new Map;for(let[r,o]of t.entries()){let s=e[r];s&&n.indexOf(s)>=0&&i.set(r,o)}return i}),c0e=q(za,b1,(n,t)=>{let e=new Map;for(let i of t)e.set(i.id,{runName:i.name,experimentAlias:n[i.experimentId]});return e}),Iu=q(lr,l0e,vd,c0e,Ha,(n,t,e,i,r)=>{if(!n)return null;let o=r===wn.COMPARE_EXPERIMENT,s=new Map;for(let[a,l]of t.entries()){let c=i.get(a);s.set(a,Qh(c,e,o)&&l)}return s}),Au=q(Bs.getColorPalette,jW,UW,Rl,(n,t,e,i)=>{let r={};return t.forEach((o,s)=>{let a=i?n.inactive.darkHex:n.inactive.lightHex;if(e.has(s))a=e.get(s);else if(o>=0){let l=n.colors[o%n.colors.length];a=i?l.darkHex:l.lightHex}r[s]=a}),r}),QW=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.runsDataSource=r,this.loadRunsOnRunTableShown$=ar(()=>this.actions$.pipe(ei(Vh),hn(({experimentIds:o})=>this.getExperimentsWithLoadState(o,a=>a===Te.FAILED||a===Te.NOT_LOADED).pipe(ke(a=>!!a.length),hn(a=>this.fetchAllRunsList(o,a))))),{dispatch:!1}),this.experimentsWithStaleRunsOnRouteChange$=this.actions$.pipe(ei(Ps),Bt(this.store.select(No)),Yn(([,o],[,s])=>Fo(o,s)),Bt(this.store.select(lr)),ke(([,o])=>!!o),N(([,o])=>o),hn(o=>this.getExperimentsWithLoadState(o,s=>s===Te.FAILED||s===Te.NOT_LOADED).pipe(N(s=>({experimentIds:o,experimentIdsToBeFetched:s}))))),this.experimentsWithStaleRunsOnReload$=this.actions$.pipe(ei(cs,Fs),Bt(this.store.select(lr)),ke(([,o])=>!!o),N(([,o])=>o),hn(o=>this.getExperimentsWithLoadState(o,s=>s!==Te.LOADING).pipe(N(s=>({experimentIds:o,experimentIdsToBeFetched:s}))))),this.loadRunsOnNavigationOrReload$=ar(()=>tn(this.experimentsWithStaleRunsOnRouteChange$,this.experimentsWithStaleRunsOnReload$).pipe(Bt(this.store.select(No)),ke(([,o])=>null!==o&&o.routeKind!==wn.CARD),hn(([{experimentIds:o,experimentIdsToBeFetched:s}])=>this.fetchAllRunsList(o,s))),{dispatch:!1}),this.removeHparamFilterWhenColumnIsRemoved$=ar(()=>this.actions$.pipe(ei(zh),Nt(({header:o})=>{o.type!==ht.HPARAM?o.type===ht.METRIC&&this.store.dispatch(mv({name:o.name})):this.store.dispatch(fv({name:o.name}))})),{dispatch:!1})}getRunsListLoadState(e){return this.store.select(Ev,{experimentId:e}).pipe(Yt(1))}getExperimentsWithLoadState(e,i){return co(e.map(r=>this.getRunsListLoadState(r))).pipe(N(r=>e.filter((o,s)=>i(r[s].state))))}fetchAllRunsList(e,i){return Ht({experimentIds:e,experimentIdsToBeFetched:i}).pipe(Nt(()=>{this.store.dispatch(MS({experimentIds:e,requestedExperimentIds:i}))}),hn(()=>{let r=new Set(i);return co(e.map(s=>r.has(s)?this.fetchRunsForExperiment(s):this.maybeWaitForRunsAndGetRuns(s)))}),N(r=>{let o={},s=[];for(let a of r)s.push(...a.runs),a.fromRemote&&(o[a.experimentId]={runs:a.runs,metadata:a.metadata});return{newRunsAndMetadata:o,runsForAllExperiments:s}}),Nt(({newRunsAndMetadata:r,runsForAllExperiments:o})=>{this.store.dispatch(yu({experimentIds:e,newRunsAndMetadata:r,runsForAllExperiments:o}))}),zr(r=>(this.store.dispatch(Bh({experimentIds:e,requestedExperimentIds:i})),Ht(null))),N(()=>null))}maybeWaitForRunsAndGetRuns(e){return this.store.select(Ev,{experimentId:e}).pipe(ke(i=>i.state!==Te.LOADING),Yt(1),hn(i=>i.state===Te.FAILED?ea(new Error("Pending request failed")):Ht(i)),Bt(this.store.select(Du,{experimentId:e})),N(([,i])=>({fromRemote:!1,experimentId:e,runs:i})))}fetchRunsForExperiment(e){return co([this.runsDataSource.fetchRuns(e),this.runsDataSource.fetchHparamsMetadata(e)]).pipe(N(([i,r])=>({fromRemote:!0,experimentId:e,runs:i,metadata:r})))}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(RS))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Ya=(()=>(function(n){n.ASC="asc",n.DESC="desc",n.UNSET=""}(Ya||(Ya={})),Ya))(),{initialState:d0e,reducers:u0e}=uf({runColorOverrideForGroupBy:new Map,defaultRunColorIdForGroupBy:new Map,groupKeyToColorId:new Map,initialGroupBy:{key:Yi.RUN},userSetGroupByKey:null,colorGroupRegexString:"",regexFilter:""},{runIds:{},runIdToExpId:{},runMetadata:{},runsLoadState:{}},(n,t,e)=>Fo(t,e)?n:{...n,initialGroupBy:{key:e.routeKind===wn.COMPARE_EXPERIMENT?Yi.EXPERIMENT:Yi.RUN}}),p0e=br(d0e,ye(Eh,(n,{routeKind:t,partialState:e})=>{if(t!==wn.COMPARE_EXPERIMENT&&t!==wn.EXPERIMENT)return n;let r=e.runs.groupBy,o=e.runs.regexFilter??"";if(!r&&!o)return n;let{colorGroupRegexString:s,userSetGroupByKey:a}=n;return r&&(s=r.key===Yi.REGEX?r.regexString:n.colorGroupRegexString,a=r.key??null),{...n,colorGroupRegexString:s,regexFilter:o,userSetGroupByKey:a}}),ye(MS,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Te.LOADING}:{lastLoadedTimeInMs:null,state:Te.LOADING};return{...n,runsLoadState:e}}),ye(yu,(n,t)=>{let e={...n.runIds},i={...n.runMetadata},r={...n.runIdToExpId},o={...n.runsLoadState};for(let s of Object.keys(t.newRunsAndMetadata)){let{runs:a,metadata:l}=t.newRunsAndMetadata[s];e[s]=a.map(({id:c})=>c),o[s]={...o[s],lastLoadedTimeInMs:Date.now(),state:Te.LOADED};for(let c of a){let d=l.runToHparamsAndMetrics[c.id];i[c.id]={...c,hparams:d?d.hparams:null,metrics:d?d.metrics:null},r[c.id]=s}}return{...n,runIds:e,runIdToExpId:r,runMetadata:i,runsLoadState:o}}),ye(Bh,(n,t)=>{let e={...n.runsLoadState};for(let i of t.requestedExperimentIds)e[i]=e[i]?{...e[i],state:Te.FAILED}:{lastLoadedTimeInMs:null,state:Te.FAILED};return{...n,runsLoadState:e}}),ye(yu,(n,{runsForAllExperiments:t})=>{let e=new Map(n.groupKeyToColorId),i=new Map(n.defaultRunColorIdForGroupBy),r=n.initialGroupBy;null!==n.userSetGroupByKey&&(r=p1(n.userSetGroupByKey,n.colorGroupRegexString));let o=Sv(r,t,n.runIdToExpId);Object.entries(o.matches).forEach(([s,a])=>{let l=e.get(s)??e.size;e.set(s,l);for(let c of a)i.set(c.id,l)});for(let s of o.nonMatches)i.set(s.id,-1);return{...n,defaultRunColorIdForGroupBy:i,groupKeyToColorId:e}}),ye(Hh,(n,{experimentIds:t,groupBy:e})=>{let i=new Map,r=new Map(n.defaultRunColorIdForGroupBy),s=Sv(e,t.flatMap(l=>n.runIds[l]).map(l=>n.runMetadata[l]),n.runIdToExpId);Object.entries(s.matches).forEach(([l,c])=>{let d=i.get(l)??i.size;i.set(l,d);for(let u of c)r.set(u.id,d)});for(let l of s.nonMatches)r.set(l.id,-1);let a=e.key===Yi.REGEX?e.regexString:n.colorGroupRegexString;return{...n,colorGroupRegexString:a,userSetGroupByKey:e.key,defaultRunColorIdForGroupBy:r,groupKeyToColorId:i,runColorOverrideForGroupBy:new Map}}),ye(TS,(n,{runId:t,newColor:e})=>{let i=new Map(n.runColorOverrideForGroupBy);return i.set(t,e),{...n,runColorOverrideForGroupBy:i}}),ye(uv,(n,t)=>({...n,regexFilter:t.regexString}))),f0e=pf(p0e,u0e),m0e={key:null,direction:Ya.UNSET},{initialState:h0e,reducers:g0e}=uf({paginationOption:{pageIndex:0,pageSize:10},sort:m0e,selectionState:new Map,runsTableHeaders:[{type:ht.RUN,name:"run",displayName:"Run",enabled:!0,sortable:!0,movable:!0,filterable:!1}],sortingInfo:{name:"run",order:io.ASCENDING}},{},(n,t,e)=>{if(!Fo(t,e)){if(e.routeKind===wn.COMPARE_EXPERIMENT&&!n.runsTableHeaders.find(i=>"experimentAlias"===i.name)){let i=[...n.runsTableHeaders,{type:ht.CUSTOM,name:"experimentAlias",displayName:"Experiment",enabled:!0,movable:!0,sortable:!0}];return{...n,runsTableHeaders:i}}if(t?.routeKind===wn.COMPARE_EXPERIMENT&&e.routeKind!==wn.COMPARE_EXPERIMENT){let i=n.runsTableHeaders.filter(r=>"experimentAlias"!==r.name);return{...n,runsTableHeaders:i}}}return n}),_0e=br(h0e,ye(SS,(n,{pageSize:t,pageIndex:e})=>({...n,paginationOption:{pageSize:t,pageIndex:e}})),ye(uv,(n,t)=>({...n,paginationOption:{...n.paginationOption,pageIndex:0}})),ye(ES,(n,t)=>({...n,sort:{key:t.key,direction:t.direction}})),ye(yu,(n,t)=>{let e=new Map(n.selectionState),i=t.runsForAllExperiments.length<=500;for(let r of t.runsForAllExperiments)e.has(r.id)||e.set(r.id,i);return{...n,selectionState:e}}),ye(cv,(n,{runId:t})=>{let e=new Map(n.selectionState);return e.set(t,!Boolean(e.get(t))),{...n,selectionState:e}}),ye(wS,(n,{runId:t})=>{let e=new Map;for(let i of n.selectionState.keys())e.set(i,t===i);return{...n,selectionState:e}}),ye(dv,(n,{runIds:t})=>{let e=new Map(n.selectionState),i=!t.every(r=>Boolean(e.get(r)));for(let r of t)e.set(r,i);return{...n,selectionState:e}}),ye(DS,(n,{header:t,index:e})=>{let i=[...n.runsTableHeaders];return void 0===e?i.push(t):i.splice(e,0,t),{...n,runsTableHeaders:i}}),ye(zh,(n,{header:t})=>{let e=n.runsTableHeaders.filter(({name:i})=>i!==t.name);return{...n,runsTableHeaders:e}}),ye(IS,(n,{newHeaderOrder:t})=>({...n,runsTableHeaders:t})),ye(AS,(n,{sortingInfo:t})=>({...n,sortingInfo:t}))),b0e=pf(_0e,g0e);function ZW(n,t){return rf({data:f0e,ui:b0e})(n,t)}function v0e(){return[{actionCreator:Bh,alertFromAction:()=>({localizedMessage:"Failed to fetch runs"})}]}var w1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Tr.forFeature("runs",ZW),to.forFeature([QW]),U6,Sc.registerAlertActions(v0e),FS]}),n})(),yd=(()=>(function(n){n.RUNS_CHANGED="experimental.RunsChanged",n.GET_RUNS="experimental.GetRuns",n.GET_URL_DATA="experimental.GetURLPluginData",n.DATA_RELOADED="experimental.DataReloaded"}(yd||(yd={})),yd))(),JW=new WeakMap,Zh=new Set,n2=new Map,E1=new Map;function $W(n,t){return e=>{let i=E1.get(t),r=JW.get(i)||null;return n(r,e)}}window.addEventListener("message",n=>{if("experimental.bootstrap"!==n.data)return;let t=n.ports[0];if(!t)return;let e=n.source?n.source.frameElement:null;!e||function(n,t){let e=new class{constructor(t){this.port=t,this.id=0,this.responseWaits=new Map,this.listeners=new Map,this.port.addEventListener("message",e=>this.onMessage(e))}listen(t,e){this.listeners.set(t,e)}unlisten(t){this.listeners.delete(t)}async onMessage(t){let e=JSON.parse(t.data),i=e.type,r=e.id,o=e.payload,s=e.error;if(e.isReply){if(!this.responseWaits.has(r))return;let{resolve:u,reject:p}=this.responseWaits.get(r);return this.responseWaits.delete(r),void(s?p(new Error(s)):u(o))}let l=null,c=null;if(this.listeners.has(i)){let u=this.listeners.get(i);try{l=await u(o)}catch(p){c=p}}this.postMessage({type:i,id:r,payload:l,error:c,isReply:!0})}postMessage(t){this.port.postMessage(JSON.stringify(t))}sendMessage(t,e){let i=this.id++;return this.postMessage({type:t,id:i,payload:e,error:null,isReply:!1}),new Promise((o,s)=>{this.responseWaits.set(i,{resolve:o,reject:s})})}}(n);Zh.add(e),E1.set(e,t),n.start();for(let[i,r]of n2){let o=$W(r,e);e.listen(i,o)}}(t,e)});var r2,Kh=(()=>{class n{broadcast(e,i){return function(n,t){for(let i of Zh)E1.get(i).isConnected||(Zh.delete(i),E1.delete(i));let e=[...Zh].map(i=>i.sendMessage(n,t));return Promise.all(e)}(e,i)}listen(e,i){!function(n,t){n2.set(n,t);for(let e of Zh){let i=$W(t,e);e.listen(n,i)}}(e,i)}unlisten(e){!function(n){n2.delete(n);for(let t of Zh)t.unlisten(n)}(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),T1=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){let e=document.createElement("tf-storage");this.ipc.listen(yd.GET_URL_DATA,i=>{if(!i)return;let r=`p.${i.pluginName}.`,o={},s=e.tf_storage.getUrlHashDict();for(let a in s)a.startsWith(r)&&(o[a.substring(r.length)]=s[a]);return o}),this.store.select(Fh).pipe(ke(i=>null!==i),Yn()).subscribe(()=>{this.ipc.broadcast(yd.DATA_RELOADED,void 0)})}}return n.\u0275fac=function(e){return new(e||n)(k(Kh),k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),D1=(()=>{class n{constructor(e,i){this.ipc=e,this.store=i}init(){let e=this.store.select(lr).pipe(hn(i=>i?dn(i.map(o=>this.store.select(Du,{experimentId:o}))).pipe(N(o=>o.flat()),Yn((o,s)=>o.length===s.length&&o.every((a,l)=>s[l].id===a.id)),N(o=>o.map(({name:s})=>s))):Ht([])));e.subscribe(i=>{this.ipc.broadcast(yd.RUNS_CHANGED,i)}),this.ipc.listen(yd.GET_RUNS,()=>e.pipe(Yt(1)).toPromise())}}return n.\u0275fac=function(e){return new(e||n)(k(Kh),k(Ae))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),I1=(()=>{class n{constructor(e,i){i.init(),e.init()}registerPluginIframe(e,i){!function(n,t){JW.set(n,{pluginName:t})}(e,i)}}return n.\u0275fac=function(e){return new(e||n)(k(D1),k(T1))},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Kh,T1,D1],imports:[Ih,Ga,w1]}),n})(),Jh=_e("[Alert] Alert Reported",{_as:"props",_p:void 0}),n7=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.alertActionModule=r,this.reportRegisteredActionAlerts$=ar(()=>this.actions$.pipe(Nt(o=>{let s=this.alertActionModule.getAlertFromAction(o);s&&this.store.dispatch(Jh(s))})),{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(Sc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),I0e=br({latestAlert:null},ye(Jh,(n,{localizedMessage:t,followupAction:e})=>{let i={localizedMessage:t,created:Date.now()};return e&&(i.followupAction=e),{...n,latestAlert:i}}));function i7(n,t){return I0e(n,t)}try{r2=typeof Intl<"u"&&Intl.v8BreakIterator}catch{r2=!1}var $h,Pv,A1,bf,i2,Gn=(()=>{class n{constructor(e){this._platformId=e,this.isBrowser=this._platformId?gw(this._platformId):"object"==typeof document&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!(!window.chrome&&!r2)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}}return n.\u0275fac=function(e){return new(e||n)(k(vc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),r7=["color","button","checkbox","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"];function o2(){if($h)return $h;if("object"!=typeof document||!document)return $h=new Set(r7);let n=document.createElement("input");return $h=new Set(r7.filter(t=>(n.setAttribute("type",t),n.type===t)))}function qo(n){return function(){if(null==Pv&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Pv=!0}))}finally{Pv=Pv||!1}return Pv}()?n:!!n.capture}function R1(){if(null==bf){if("object"!=typeof document||!document||"function"!=typeof Element||!Element)return bf=!1;if("scrollBehavior"in document.documentElement.style)bf=!0;else{let n=Element.prototype.scrollTo;bf=!!n&&!/\{\s*\[native code\]\s*\}/.test(n.toString())}}return bf}function eg(){if("object"!=typeof document||!document)return 0;if(null==A1){let n=document.createElement("div"),t=n.style;n.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),i=e.style;i.width="2px",i.height="1px",n.appendChild(e),document.body.appendChild(n),A1=0,0===n.scrollLeft&&(n.scrollLeft=1,A1=0===n.scrollLeft?1:2),n.remove()}return A1}function Ov(){let n=typeof document<"u"&&document?document.activeElement:null;for(;n&&n.shadowRoot;){let t=n.shadowRoot.activeElement;if(t===n)break;n=t}return n}function ma(n){return n.composedPath?n.composedPath()[0]:n.target}function kv(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function vr(n,...t){return t.length?t.some(e=>n[e]):n.altKey||n.shiftKey||n.ctrlKey||n.metaKey}function Rt(n){return null!=n&&"false"!=`${n}`}function _i(n,t=0){return s2(n)?Number(n):t}function s2(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function tg(n){return Array.isArray(n)?n:[n]}function Yr(n){return null==n?"":"string"==typeof n?n:`${n}px`}function Hs(n){return n instanceof Me?n.nativeElement:n}var ig,a7=(()=>{class n{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),P0e=(()=>{class n{constructor(e){this._mutationObserverFactory=e,this._observedElements=new Map}ngOnDestroy(){this._observedElements.forEach((e,i)=>this._cleanupObserver(i))}observe(e){let i=Hs(e);return new Kt(r=>{let s=this._observeElement(i).subscribe(r);return()=>{s.unsubscribe(),this._unobserveElement(i)}})}_observeElement(e){if(this._observedElements.has(e))this._observedElements.get(e).count++;else{let i=new Ie,r=this._mutationObserverFactory.create(o=>i.next(o));r&&r.observe(e,{characterData:!0,childList:!0,subtree:!0}),this._observedElements.set(e,{observer:r,stream:i,count:1})}return this._observedElements.get(e).stream}_unobserveElement(e){this._observedElements.has(e)&&(this._observedElements.get(e).count--,this._observedElements.get(e).count||this._cleanupObserver(e))}_cleanupObserver(e){if(this._observedElements.has(e)){let{observer:i,stream:r}=this._observedElements.get(e);i&&i.disconnect(),r.complete(),this._observedElements.delete(e)}}}return n.\u0275fac=function(e){return new(e||n)(k(a7))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),P1=(()=>{class n{get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._disabled?this._unsubscribe():this._subscribe()}get debounce(){return this._debounce}set debounce(e){this._debounce=_i(e),this._subscribe()}constructor(e,i,r){this._contentObserver=e,this._elementRef=i,this._ngZone=r,this.event=new F,this._disabled=!1,this._currentSubscription=null}ngAfterContentInit(){!this._currentSubscription&&!this.disabled&&this._subscribe()}ngOnDestroy(){this._unsubscribe()}_subscribe(){this._unsubscribe();let e=this._contentObserver.observe(this._elementRef);this._ngZone.runOutsideAngular(()=>{this._currentSubscription=(this.debounce?e.pipe(wr(this.debounce)):e).subscribe(this.event)})}_unsubscribe(){this._currentSubscription?.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(P0e),C(Me),C(at))},n.\u0275dir=we({type:n,selectors:[["","cdkObserveContent",""]],inputs:{disabled:["cdkObserveContentDisabled","disabled"],debounce:"debounce"},outputs:{event:"cdkObserveContent"},exportAs:["cdkObserveContent"]}),n})(),ng=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[a7]}),n})(),c7=new Set,O0e=(()=>{class n{constructor(e){this._platform=e,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):F0e}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&function(n){if(!c7.has(n))try{ig||((ig=document.createElement("style")).setAttribute("type","text/css"),document.head.appendChild(ig)),ig.sheet&&(ig.sheet.insertRule(`@media ${n} {body{ }}`,0),c7.add(n))}catch(t){console.error(t)}}(e),this._matchMedia(e)}}return n.\u0275fac=function(e){return new(e||n)(k(Gn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function F0e(n){return{matches:"all"===n||""===n,media:n,addListener:()=>{},removeListener:()=>{}}}var Fv=(()=>{class n{constructor(e,i){this._mediaMatcher=e,this._zone=i,this._queries=new Map,this._destroySubject=new Ie}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return d7(tg(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let o=dn(d7(tg(e)).map(s=>this._registerQuery(s).observable));return o=Jd(o.pipe(Yt(1)),o.pipe(ia(1),wr(0))),o.pipe(N(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let i=this._mediaMatcher.matchMedia(e),o={observable:new Kt(s=>{let a=l=>this._zone.run(()=>s.next(l));return i.addListener(a),()=>{i.removeListener(a)}}).pipe(qn(i),N(({matches:s})=>({query:e,matches:s})),ot(this._destroySubject)),mql:i};return this._queries.set(e,o),o}}return n.\u0275fac=function(e){return new(e||n)(k(O0e),k(at))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function d7(n){return n.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function F1(n,t){return(n.getAttribute(t)||"").match(/\S+/g)||[]}var _7="cdk-describedby-message",O1="cdk-describedby-host",c2=0,L1=(()=>{class n{constructor(e,i){this._platform=i,this._messageRegistry=new Map,this._messagesContainer=null,this._id=""+c2++,this._document=e,this._id=ai(Yp)+"-"+c2++}describe(e,i,r){if(!this._canBeDescribed(e,i))return;let o=a2(i,r);"string"!=typeof i?(p7(i,this._id),this._messageRegistry.set(o,{messageElement:i,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(i,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,i,r){if(!i||!this._isElementNode(e))return;let o=a2(i,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),"string"==typeof i){let s=this._messageRegistry.get(o);s&&0===s.referenceCount&&this._deleteMessageElement(o)}0===this._messagesContainer?.childNodes.length&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${O1}="${this._id}"]`);for(let i=0;i<e.length;i++)this._removeCdkDescribedByReferenceIds(e[i]),e[i].removeAttribute(O1);this._messagesContainer?.remove(),this._messagesContainer=null,this._messageRegistry.clear()}_createMessageElement(e,i){let r=this._document.createElement("div");p7(r,this._id),r.textContent=e,i&&r.setAttribute("role",i),this._createMessagesContainer(),this._messagesContainer.appendChild(r),this._messageRegistry.set(a2(e,i),{messageElement:r,referenceCount:0})}_deleteMessageElement(e){this._messageRegistry.get(e)?.messageElement?.remove(),this._messageRegistry.delete(e)}_createMessagesContainer(){if(this._messagesContainer)return;let e="cdk-describedby-message-container",i=this._document.querySelectorAll(`.${e}[platform="server"]`);for(let o=0;o<i.length;o++)i[o].remove();let r=this._document.createElement("div");r.style.visibility="hidden",r.classList.add(e),r.classList.add("cdk-visually-hidden"),this._platform&&!this._platform.isBrowser&&r.setAttribute("platform","server"),this._document.body.appendChild(r),this._messagesContainer=r}_removeCdkDescribedByReferenceIds(e){let i=F1(e,"aria-describedby").filter(r=>0!=r.indexOf(_7));e.setAttribute("aria-describedby",i.join(" "))}_addMessageReference(e,i){let r=this._messageRegistry.get(i);(function(n,t,e){let i=F1(n,t);i.some(r=>r.trim()==e.trim())||(i.push(e.trim()),n.setAttribute(t,i.join(" ")))})(e,"aria-describedby",r.messageElement.id),e.setAttribute(O1,this._id),r.referenceCount++}_removeMessageReference(e,i){let r=this._messageRegistry.get(i);r.referenceCount--,function(n,t,e){let r=F1(n,t).filter(o=>o!=e.trim());r.length?n.setAttribute(t,r.join(" ")):n.removeAttribute(t)}(e,"aria-describedby",r.messageElement.id),e.removeAttribute(O1)}_isElementDescribedByMessage(e,i){let r=F1(e,"aria-describedby"),o=this._messageRegistry.get(i),s=o&&o.messageElement.id;return!!s&&-1!=r.indexOf(s)}_canBeDescribed(e,i){if(!this._isElementNode(e))return!1;if(i&&"object"==typeof i)return!0;let r=null==i?"":`${i}`.trim(),o=e.getAttribute("aria-label");return!(!r||o&&o.trim()===r)}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(Gn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function a2(n,t){return"string"==typeof n?`${t||""}/${n}`:n}function p7(n,t){n.id||(n.id=`${_7}-${t}-${c2++}`)}var N1=class{constructor(t){this._items=t,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new Ie,this._typeaheadSubscription=Mn.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=e=>e.disabled,this._pressedLetters=[],this.tabOut=new Ie,this.change=new Ie,t instanceof Oa&&(this._itemChangesSubscription=t.changes.subscribe(e=>{if(this._activeItem){let r=e.toArray().indexOf(this._activeItem);r>-1&&r!==this._activeItemIndex&&(this._activeItemIndex=r)}}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(Nt(e=>this._pressedLetters.push(e)),wr(t),ke(()=>this._pressedLetters.length>0),N(()=>this._pressedLetters.join(""))).subscribe(e=>{let i=this._getItemsArray();for(let r=1;r<i.length+1;r++){let o=(this._activeItemIndex+r)%i.length,s=i[o];if(!this._skipPredicateFn(s)&&0===s.getLabel().toUpperCase().trim().indexOf(e)){this.setActiveItem(o);break}}this._pressedLetters=[]}),this}cancelTypeahead(){return this._pressedLetters=[],this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}withPageUpDown(t=!0,e=10){return this._pageUpAndDown={enabled:t,delta:e},this}setActiveItem(t){let e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){let e=t.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:return void this.tabOut.next();case 40:if(this._vertical&&r){this.setNextItemActive();break}return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}return;case 39:if(this._horizontal&&r){"rtl"===this._horizontal?this.setPreviousItemActive():this.setNextItemActive();break}return;case 37:if(this._horizontal&&r){"rtl"===this._horizontal?this.setNextItemActive():this.setPreviousItemActive();break}return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o<s?o:s-1,-1);break}return;default:return void((r||vr(t,"shiftKey"))&&(t.key&&1===t.key.length?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))))}this._pressedLetters=[],t.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._items.length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(t){let e=this._getItemsArray(),i="number"==typeof t?t:e.indexOf(t);this._activeItem=e[i]??null,this._activeItemIndex=i}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(t){this._wrap?this._setActiveInWrapMode(t):this._setActiveInDefaultMode(t)}_setActiveInWrapMode(t){let e=this._getItemsArray();for(let i=1;i<=e.length;i++){let r=(this._activeItemIndex+t*i+e.length)%e.length;if(!this._skipPredicateFn(e[r]))return void this.setActiveItem(r)}}_setActiveInDefaultMode(t){this._setActiveItemByIndex(this._activeItemIndex+t,t)}_setActiveItemByIndex(t,e){let i=this._getItemsArray();if(i[t]){for(;this._skipPredicateFn(i[t]);)if(!i[t+=e])return;this.setActiveItem(t)}}_getItemsArray(){return this._items instanceof Oa?this._items.toArray():this._items}},og=class extends N1{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}},sg=class extends N1{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}},ag=(()=>{class n{constructor(e){this._platform=e}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return function(n){return!!(n.offsetWidth||n.offsetHeight||"function"==typeof n.getClientRects&&n.getClientRects().length)}(e)&&"visible"===getComputedStyle(e).visibility}isTabbable(e){if(!this._platform.isBrowser)return!1;let i=function(n){try{return n.frameElement}catch{return null}}(function(n){return n.ownerDocument&&n.ownerDocument.defaultView||window}(e));if(i&&(-1===f7(i)||!this.isVisible(i)))return!1;let r=e.nodeName.toLowerCase(),o=f7(e);return e.hasAttribute("contenteditable")?-1!==o:!("iframe"===r||"object"===r||this._platform.WEBKIT&&this._platform.IOS&&!function(n){let t=n.nodeName.toLowerCase(),e="input"===t&&n.type;return"text"===e||"password"===e||"select"===t||"textarea"===t}(e))&&("audio"===r?!!e.hasAttribute("controls")&&-1!==o:"video"===r?-1!==o&&(null!==o||this._platform.FIREFOX||e.hasAttribute("controls")):e.tabIndex>=0)}isFocusable(e,i){return function(n){return!function(n){return function(n){return"input"==n.nodeName.toLowerCase()}(n)&&"hidden"==n.type}(n)&&(function(n){let t=n.nodeName.toLowerCase();return"input"===t||"select"===t||"button"===t||"textarea"===t}(n)||function(n){return function(n){return"a"==n.nodeName.toLowerCase()}(n)&&n.hasAttribute("href")}(n)||n.hasAttribute("contenteditable")||b7(n))}(e)&&!this.isDisabled(e)&&(i?.ignoreVisibility||this.isVisible(e))}}return n.\u0275fac=function(e){return new(e||n)(k(Gn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function b7(n){if(!n.hasAttribute("tabindex")||void 0===n.tabIndex)return!1;let t=n.getAttribute("tabindex");return!(!t||isNaN(parseInt(t,10)))}function f7(n){if(!b7(n))return null;let t=parseInt(n.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}var Nv=(()=>{class n{constructor(e,i,r){this._checker=e,this._ngZone=i,this._document=r}create(e,i=!1){return new class{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,i,r,o=!1){this._element=t,this._checker=e,this._ngZone=i,this._document=r,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return!!this._hasAttached||(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return"start"==t?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let i=this._getFirstTabbableElement(e);return i?.focus(t),!!i}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=0;i<e.length;i++){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getFirstTabbableElement(e[i]):null;if(r)return r}return null}_getLastTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let i=e.length-1;i>=0;i--){let r=e[i].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[i]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._ngZone.isStable?t():this._ngZone.onStable.pipe(Yt(1)).subscribe(t)}}(e,this._checker,this._ngZone,this._document,i)}}return n.\u0275fac=function(e){return new(e||n)(k(ag),k(at),k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function Lv(n){return 0===n.buttons||0===n.offsetX&&0===n.offsetY}function Bv(n){let t=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!(!t||-1!==t.identifier||null!=t.radiusX&&1!==t.radiusX||null!=t.radiusY&&1!==t.radiusY)}new ie("FOCUS_TRAP_INERT_STRATEGY");var i_e=new ie("cdk-input-modality-detector-options"),r_e={ignoreKeys:[18,17,224,91,16]},rg=qo({passive:!0,capture:!0}),o_e=(()=>{class n{get mostRecentModality(){return this._modality.value}constructor(e,i,r,o){this._platform=e,this._mostRecentTarget=null,this._modality=new Ai(null),this._lastTouchMs=0,this._onKeydown=s=>{this._options?.ignoreKeys?.some(a=>a===s.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=ma(s))},this._onMousedown=s=>{Date.now()-this._lastTouchMs<650||(this._modality.next(Lv(s)?"keyboard":"mouse"),this._mostRecentTarget=ma(s))},this._onTouchstart=s=>{Bv(s)?this._modality.next("keyboard"):(this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=ma(s))},this._options={...r_e,...o},this.modalityDetected=this._modality.pipe(ia(1)),this.modalityChanged=this.modalityDetected.pipe(Yn()),e.isBrowser&&i.runOutsideAngular(()=>{r.addEventListener("keydown",this._onKeydown,rg),r.addEventListener("mousedown",this._onMousedown,rg),r.addEventListener("touchstart",this._onTouchstart,rg)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,rg),document.removeEventListener("mousedown",this._onMousedown,rg),document.removeEventListener("touchstart",this._onTouchstart,rg))}}return n.\u0275fac=function(e){return new(e||n)(k(Gn),k(at),k(Lt),k(i_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),s_e=new ie("liveAnnouncerElement",{providedIn:"root",factory:function(){return null}}),l_e=new ie("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),c_e=0,Vv=(()=>{class n{constructor(e,i,r,o){this._ngZone=i,this._defaultOptions=o,this._document=r,this._liveElement=e||this._createLiveElement()}announce(e,...i){let o,s,r=this._defaultOptions;return 1===i.length&&"number"==typeof i[0]?s=i[0]:[o,s]=i,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),null==s&&r&&(s=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,"number"==typeof s&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",i=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o<i.length;o++)i[o].remove();return r.classList.add(e),r.classList.add("cdk-visually-hidden"),r.setAttribute("aria-atomic","true"),r.setAttribute("aria-live","polite"),r.id="cdk-live-announcer-"+c_e++,this._document.body.appendChild(r),r}_exposeAnnouncerToModals(e){let i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],s=o.getAttribute("aria-owns");s?-1===s.indexOf(e)&&o.setAttribute("aria-owns",s+" "+e):o.setAttribute("aria-owns",e)}}}return n.\u0275fac=function(e){return new(e||n)(k(s_e,8),k(at),k(Lt),k(l_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),d_e=new ie("cdk-focus-monitor-default-options"),k1=qo({passive:!0,capture:!0}),Xr=(()=>{class n{constructor(e,i,r,o,s){this._ngZone=e,this._platform=i,this._inputModalityDetector=r,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new Ie,this._rootNodeFocusAndBlurListener=a=>{for(let c=ma(a);c;c=c.parentElement)"focus"===a.type?this._onFocus(a,c):this._onBlur(a,c)},this._document=o,this._detectionMode=s?.detectionMode||0}monitor(e,i=!1){let r=Hs(e);if(!this._platform.isBrowser||1!==r.nodeType)return Ht(null);let o=function(n){if(function(){if(null==i2){let n=typeof document<"u"?document.head:null;i2=!(!n||!n.createShadowRoot&&!n.attachShadow)}return i2}()){let t=n.getRootNode?n.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return i&&(s.checkChildren=!0),s.subject;let a={checkChildren:i,subject:new Ie,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let i=Hs(e),r=this._elementInfo.get(i);r&&(r.subject.complete(),this._setClasses(i),this._elementInfo.delete(i),this._removeGlobalListeners(r))}focusVia(e,i,r){let o=Hs(e);o===this._getDocument().activeElement?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,i,l)):(this._setOrigin(i),"function"==typeof o.focus&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,i)=>this.stopMonitoring(i))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return 1===this._detectionMode||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,i){e.classList.toggle("cdk-focused",!!i),e.classList.toggle("cdk-touch-focused","touch"===i),e.classList.toggle("cdk-keyboard-focused","keyboard"===i),e.classList.toggle("cdk-mouse-focused","mouse"===i),e.classList.toggle("cdk-program-focused","program"===i)}_setOrigin(e,i=!1){this._ngZone.runOutsideAngular(()=>{this._origin=e,this._originFromTouchInteraction="touch"===e&&i,0===this._detectionMode&&(clearTimeout(this._originTimeoutId),this._originTimeoutId=setTimeout(()=>this._origin=null,this._originFromTouchInteraction?650:1))})}_onFocus(e,i){let r=this._elementInfo.get(i),o=ma(e);!r||!r.checkChildren&&i!==o||this._originChanged(i,this._getFocusOrigin(o),r)}_onBlur(e,i){let r=this._elementInfo.get(i);!r||r.checkChildren&&e.relatedTarget instanceof Node&&i.contains(e.relatedTarget)||(this._setClasses(i),this._emitOrigin(r,null))}_emitOrigin(e,i){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(i))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let i=e.rootNode,r=this._rootNodeFocusListenerCount.get(i)||0;r||this._ngZone.runOutsideAngular(()=>{i.addEventListener("focus",this._rootNodeFocusAndBlurListener,k1),i.addEventListener("blur",this._rootNodeFocusAndBlurListener,k1)}),this._rootNodeFocusListenerCount.set(i,r+1),1==++this._monitoredElementCount&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(ot(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let i=e.rootNode;if(this._rootNodeFocusListenerCount.has(i)){let r=this._rootNodeFocusListenerCount.get(i);r>1?this._rootNodeFocusListenerCount.set(i,r-1):(i.removeEventListener("focus",this._rootNodeFocusAndBlurListener,k1),i.removeEventListener("blur",this._rootNodeFocusAndBlurListener,k1),this._rootNodeFocusListenerCount.delete(i))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,i,r){this._setClasses(e,i),this._emitOrigin(r,i),this._lastFocusOrigin=i}_getClosestElementsInfo(e){let i=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&i.push([o,r])}),i}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:i,mostRecentModality:r}=this._inputModalityDetector;if("mouse"!==r||!i||i===e||"INPUT"!==e.nodeName&&"TEXTAREA"!==e.nodeName||e.disabled)return!1;let o=e.labels;if(o)for(let s=0;s<o.length;s++)if(o[s].contains(i))return!0;return!1}}return n.\u0275fac=function(e){return new(e||n)(k(at),k(Gn),k(o_e),k(Lt,8),k(d_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),y7=(()=>{class n{constructor(e,i){this._elementRef=e,this._focusMonitor=i,this._focusOrigin=null,this.cdkFocusChange=new F}get focusOrigin(){return this._focusOrigin}ngAfterViewInit(){let e=this._elementRef.nativeElement;this._monitorSubscription=this._focusMonitor.monitor(e,1===e.nodeType&&e.hasAttribute("cdkMonitorSubtreeFocus")).subscribe(i=>{this._focusOrigin=i,this.cdkFocusChange.emit(i)})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._monitorSubscription&&this._monitorSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Xr))},n.\u0275dir=we({type:n,selectors:[["","cdkMonitorElementFocus",""],["","cdkMonitorSubtreeFocus",""]],outputs:{cdkFocusChange:"cdkFocusChange"},exportAs:["cdkMonitorFocus"]}),n})(),m7="cdk-high-contrast-black-on-white",h7="cdk-high-contrast-white-on-black",l2="cdk-high-contrast-active",_2=(()=>{class n{constructor(e,i){this._platform=e,this._document=i,this._breakpointSubscription=ai(Fv).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return 0;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let i=this._document.defaultView||window,r=i&&i.getComputedStyle?i.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return 2;case"rgb(255,255,255)":case"rgb(255,250,239)":return 1}return 0}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(l2,m7,h7),this._hasCheckedHighContrastMode=!0;let i=this.getHighContrastMode();1===i?e.add(l2,m7):2===i&&e.add(l2,h7)}}}return n.\u0275fac=function(e){return new(e||n)(k(Gn),k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),lg=(()=>{class n{constructor(e){e._applyBodyHighContrastModeCssClasses()}}return n.\u0275fac=function(e){return new(e||n)(k(_2))},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[ng]}),n})(),u_e=new ie("cdk-dir-doc",{providedIn:"root",factory:function(){return ai(Lt)}}),f_e=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i,Xi=(()=>{class n{constructor(e){this.value="ltr",this.change=new F,e&&(this.value=function(n){let t=n?.toLowerCase()||"";return"auto"===t&&typeof navigator<"u"&&navigator?.language?f_e.test(navigator.language)?"rtl":"ltr":"rtl"===t?"rtl":"ltr"}((e.body?e.body.dir:null)||(e.documentElement?e.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}}return n.\u0275fac=function(e){return new(e||n)(k(u_e,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Ou=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),h_e=["text"];function g_e(n,t){if(1&n&&P(0,"mat-pseudo-checkbox",6),2&n){let e=w();_("state",e.selected?"checked":"unchecked")("disabled",e.disabled)}}function __e(n,t){1&n&&P(0,"mat-pseudo-checkbox",7),2&n&&_("disabled",w().disabled)}function b_e(n,t){if(1&n&&(h(0,"span",8),T(1),g()),2&n){let e=w();v(1),He("(",e.group.label,")")}}var v_e=[[["mat-icon"]],"*"],y_e=["mat-icon","*"],E7=(new yl("15.2.9"),(()=>{class n{}return n.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",n.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",n.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",n.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)",n})()),T7=(()=>{class n{}return n.COMPLEX="375ms",n.ENTERING="225ms",n.EXITING="195ms",n})(),C_e=new ie("mat-sanity-checks",{providedIn:"root",factory:function(){return!0}}),fn=(()=>{class n{constructor(e,i,r){this._sanityChecks=i,this._document=r,this._hasDoneGlobalChecks=!1,e._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(e){return!kv()&&("boolean"==typeof this._sanityChecks?this._sanityChecks:!!this._sanityChecks[e])}}return n.\u0275fac=function(e){return new(e||n)(k(_2),k(C_e,8),k(Lt))},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Ou,Ou]}),n})();function so(n){return class extends n{get disabled(){return this._disabled}set disabled(t){this._disabled=Rt(t)}constructor(...t){super(...t),this._disabled=!1}}}function zs(n,t){return class extends n{get color(){return this._color}set color(e){let i=e||this.defaultColor;i!==this._color&&(this._color&&this._elementRef.nativeElement.classList.remove(`mat-${this._color}`),i&&this._elementRef.nativeElement.classList.add(`mat-${i}`),this._color=i)}constructor(...e){super(...e),this.defaultColor=t,this.color=t}}}function us(n){return class extends n{get disableRipple(){return this._disableRipple}set disableRipple(t){this._disableRipple=Rt(t)}constructor(...t){super(...t),this._disableRipple=!1}}}function ku(n,t=0){return class extends n{get tabIndex(){return this.disabled?-1:this._tabIndex}set tabIndex(e){this._tabIndex=null!=e?_i(e):this.defaultTabIndex}constructor(...e){super(...e),this._tabIndex=t,this.defaultTabIndex=t}}}function B1(n){return class extends n{updateErrorState(){let t=this.errorState,o=(this.errorStateMatcher||this._defaultErrorStateMatcher).isErrorState(this.ngControl?this.ngControl.control:null,this._parentFormGroup||this._parentForm);o!==t&&(this.errorState=o,this.stateChanges.next())}constructor(...t){super(...t),this.errorState=!1}}}function V1(n){return class extends n{constructor(...t){super(...t),this._isInitialized=!1,this._pendingSubscribers=[],this.initialized=new Kt(e=>{this._isInitialized?this._notifySubscriber(e):this._pendingSubscribers.push(e)})}_markInitialized(){this._isInitialized=!0,this._pendingSubscribers.forEach(this._notifySubscriber),this._pendingSubscribers=null}_notifySubscriber(t){t.next(),t.complete()}}}new ie("MAT_DATE_LOCALE",{providedIn:"root",factory:function(){return ai(cd)}}),new ie("mat-date-formats");var H1=(()=>{class n{isErrorState(e,i){return!!(e&&e.invalid&&(e.touched||i&&i.submitted))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),x7=qo({passive:!0,capture:!0}),C7={enterDuration:225,exitDuration:150},M7=qo({passive:!0,capture:!0}),w7=["mousedown","touchstart"],S7=["mouseup","mouseleave","touchend","touchcancel"],vf=class{constructor(t,e,i,r){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=Hs(i))}fadeInRipple(t,e,i={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o={...C7,...i.animation};i.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=i.radius||function(n,t,e){let i=Math.max(Math.abs(n-e.left),Math.abs(n-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(i*i+r*r)}(t,e,r),a=t-r.left,l=e-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=a-s+"px",d.style.top=l-s+"px",d.style.height=2*s+"px",d.style.width=2*s+"px",null!=i.color&&(d.style.backgroundColor=i.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),f=u.transitionDuration,m="none"===u.transitionProperty||"0s"===f||"0s, 0s"===f||0===r.width&&0===r.height,b=new class{constructor(t,e,i,r=!1){this._renderer=t,this.element=e,this.config=i,this._animationForciblyDisabledThroughCss=r,this.state=3}fadeOut(){this._renderer.fadeOutRipple(this)}}(this,d,i,m);d.style.transform="scale3d(1, 1, 1)",b.state=0,i.persistent||(this._mostRecentTransientRipple=b);let M=null;return!m&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let y=()=>this._finishRippleTransition(b),x=()=>this._destroyRipple(b);d.addEventListener("transitionend",y),d.addEventListener("transitioncancel",x),M={onTransitionEnd:y,onTransitionCancel:x}}),this._activeRipples.set(b,M),(m||!c)&&this._finishRippleTransition(b),b}fadeOutRipple(t){if(2===t.state||3===t.state)return;let e=t.element,i={...C7,...t.config.animation};e.style.transitionDuration=`${i.exitDuration}ms`,e.style.opacity="0",t.state=2,(t._animationForciblyDisabledThroughCss||!i.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=Hs(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,w7.forEach(i=>{vf._eventManager.addHandler(this._ngZone,i,e,this)}))}handleEvent(t){"mousedown"===t.type?this._onMousedown(t):"touchstart"===t.type?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{S7.forEach(e=>{this._triggerElement.addEventListener(e,this,M7)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){0===t.state?this._startFadeOutTransition(t):2===t.state&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:i}=t.config;t.state=1,!i&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=3,null!==e&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel)),t.element.remove()}_onMousedown(t){let e=Lv(t),i=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+800;!this._target.rippleDisabled&&!e&&!i&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!Bv(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;for(let i=0;i<e.length;i++)this.fadeInRipple(e[i].clientX,e[i].clientY,this._target.rippleConfig)}}_onPointerUp(){!this._isPointerDown||(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{!t.config.persistent&&(1===t.state||t.config.terminateOnPointerUp&&0===t.state)&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(w7.forEach(e=>vf._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&S7.forEach(e=>t.removeEventListener(e,this,M7)))}};vf._eventManager=new class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=ma(t);e&&this._events.get(t.type)?.forEach((i,r)=>{(r===e||r.contains(e))&&i.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,i,r){let o=this._events.get(e);if(o){let s=o.get(i);s?s.add(r):o.set(i,new Set([r]))}else this._events.set(e,new Map([[i,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,x7)})}removeHandler(t,e,i){let r=this._events.get(t);if(!r)return;let o=r.get(e);!o||(o.delete(i),0===o.size&&r.delete(e),0===r.size&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,x7)))}};var y2=new ie("mat-ripple-global-options"),mo=(()=>{class n{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(e,i,r,o,s){this._elementRef=e,this._animationMode=s,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=o||{},this._rippleRenderer=new vf(this,i,e,r)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:{...this._globalOptions.animation,..."NoopAnimations"===this._animationMode?{enterDuration:0,exitDuration:0}:{},...this.animation},terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,i=0,r){return"number"==typeof e?this._rippleRenderer.fadeInRipple(e,i,{...this.rippleConfig,...r}):this._rippleRenderer.fadeInRipple(0,0,{...this.rippleConfig,...e})}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(at),C(Gn),C(y2,8),C(hi,8))},n.\u0275dir=we({type:n,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mat-ripple-unbounded",i.unbounded)},inputs:{color:["matRippleColor","color"],unbounded:["matRippleUnbounded","unbounded"],centered:["matRippleCentered","centered"],radius:["matRippleRadius","radius"],animation:["matRippleAnimation","animation"],disabled:["matRippleDisabled","disabled"],trigger:["matRippleTrigger","trigger"]},exportAs:["matRipple"]}),n})(),Bl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,fn]}),n})(),E_e=(()=>{class n{constructor(e){this._animationMode=e,this.state="unchecked",this.disabled=!1,this.appearance="full"}}return n.\u0275fac=function(e){return new(e||n)(C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&nt("mat-pseudo-checkbox-indeterminate","indeterminate"===i.state)("mat-pseudo-checkbox-checked","checked"===i.state)("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal","minimal"===i.appearance)("mat-pseudo-checkbox-full","full"===i.appearance)("_mat-animation-noopable","NoopAnimations"===i._animationMode)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(e,i){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-full{border:2px solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0}),n})(),T_e=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn]}),n})(),zv=new ie("MAT_OPTION_PARENT_COMPONENT"),Uv=(so(class{}),new ie("MatOptgroup")),D_e=0,Hv=class{constructor(t,e=!1){this.source=t,this.isUserInput=e}},I_e=(()=>{class n{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=Rt(e)}get disableRipple(){return!(!this._parent||!this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!(!this._parent||!this._parent.hideSingleSelectionIndicator)}constructor(e,i,r,o){this._element=e,this._changeDetectorRef=i,this._parent=r,this.group=o,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id="mat-option-"+D_e++,this.onSelectionChange=new F,this._stateChanges=new Ie}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}deselect(){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent())}focus(e,i){let r=this._getHostElement();"function"==typeof r.focus&&r.focus(i)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(13===e.keyCode||32===e.keyCode)&&!vr(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=!this.multiple||!this._selected,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Hv(this,e))}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&Ge(h_e,7),2&e){let r;Se(r=Ee())&&(i._text=r.first)}},inputs:{value:"value",id:"id",disabled:"disabled"},outputs:{onSelectionChange:"onSelectionChange"}}),n})(),Us=(()=>{class n extends I_e{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(zv,8),C(Uv,8))},n.\u0275cmp=O({type:n,selectors:[["mat-option"]],hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(e,i){1&e&&I("click",function(){return i._selectViaInteraction()})("keydown",function(o){return i._handleKeydown(o)}),2&e&&(jo("id",i.id),Be("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),nt("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},exportAs:["matOption"],features:[Ke],ngContentSelectors:y_e,decls:8,vars:5,consts:[["class","mat-mdc-option-pseudo-checkbox",3,"state","disabled",4,"ngIf"],[1,"mdc-list-item__primary-text"],["text",""],["class","mat-mdc-option-pseudo-checkbox","state","checked","appearance","minimal",3,"disabled",4,"ngIf"],["class","cdk-visually-hidden",4,"ngIf"],["mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"],[1,"mat-mdc-option-pseudo-checkbox",3,"state","disabled"],["state","checked","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"]],template:function(e,i){1&e&&(Dn(v_e),S(0,g_e,1,2,"mat-pseudo-checkbox",0),zt(1),h(2,"span",1,2),zt(4,1),g(),S(5,__e,1,1,"mat-pseudo-checkbox",3),S(6,b_e,2,1,"span",4),P(7,"div",5)),2&e&&(_("ngIf",i.multiple),v(5),_("ngIf",!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator),v(1),_("ngIf",i.group&&i.group._inert),v(1),_("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[mo,Fe,E_e],styles:['.mat-mdc-option{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);min-height:48px}.mat-mdc-option:focus{outline:none}[dir=rtl] .mat-mdc-option,.mat-mdc-option[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-option.mdc-list-item{align-items:center}.mat-mdc-option.mdc-list-item--disabled{opacity:.38;cursor:default}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})();function z1(n,t,e){if(e.length){let i=t.toArray(),r=e.toArray(),o=0;for(let s=0;s<n+1;s++)i[s].group&&i[s].group===r[o]&&o++;return o}return 0}function U1(n,t,e,i){return n<e?n:n+t>e+i?Math.max(0,n-i+t):e}var cg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Bl,Pe,fn,T_e]}),n})(),D7=["mat-button",""],x2=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],C2=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"],M2=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}",I7=["mat-icon-button",""],R_e=["*"],O_e=[{selector:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{selector:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{selector:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{selector:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{selector:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab"]},{selector:"mat-mini-fab",mdcClasses:["mdc-fab","mdc-fab--mini","mat-mdc-mini-fab"]},{selector:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],k_e=zs(so(us(class{constructor(n){this._elementRef=n}}))),w2=(()=>{class n extends k_e{constructor(e,i,r,o){super(e),this._platform=i,this._ngZone=r,this._animationMode=o,this._focusMonitor=ai(Xr),this._isFab=!1;let s=e.nativeElement.classList;for(let a of O_e)this._hasHostAttributes(a.selector)&&a.mdcClasses.forEach(l=>{s.add(l)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}focus(e="program",i){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,i):this._elementRef.nativeElement.focus(i)}_hasHostAttributes(...e){return e.some(i=>this._elementRef.nativeElement.hasAttribute(i))}_isRippleDisabled(){return this.disableRipple||this.disabled}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&Ge(mo,5),2&e){let r;Se(r=Ee())&&(i.ripple=r.first)}},features:[Ke]}),n})(),A7=(()=>{class n extends w2{constructor(e,i,r,o){super(e,i,r,o),this._haltDisabledEvents=s=>{this.disabled&&(s.preventDefault(),s.stopImmediatePropagation())}}ngOnInit(){this._ngZone.runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("click",this._haltDisabledEvents)})}ngOnDestroy(){super.ngOnDestroy(),this._elementRef.nativeElement.removeEventListener("click",this._haltDisabledEvents)}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,features:[Ke]}),n})(),Ji=(()=>{class n extends w2{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(at),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Ke],attrs:D7,ngContentSelectors:C2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Dn(x2),P(0,"span",0),zt(1),h(2,"span",1),zt(3,1),g(),zt(4,2),P(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),_("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[mo],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),R7=(()=>{class n extends A7{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(at),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[Ke],attrs:D7,ngContentSelectors:C2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Dn(x2),P(0,"span",0),zt(1),h(2,"span",1),zt(3,1),g(),zt(4,2),P(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),_("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[mo],styles:['.mdc-touch-target-wrapper{display:inline}.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button{position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0)}.mdc-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top}[dir=rtl] .mdc-button .mdc-button__icon,.mdc-button .mdc-button__icon[dir=rtl]{margin-left:8px;margin-right:0}.mdc-button .mdc-button__progress-indicator{font-size:0;position:absolute;transform:translate(-50%, -50%);top:50%;left:50%;line-height:initial}.mdc-button .mdc-button__label{position:relative}.mdc-button .mdc-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(\n      100% + 4px\n    );width:calc(\n      100% + 4px\n    );display:none}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring{border-color:CanvasText}}.mdc-button .mdc-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-button .mdc-button__focus-ring::after{border-color:CanvasText}}@media screen and (forced-colors: active){.mdc-button.mdc-ripple-upgraded--background-focused .mdc-button__focus-ring,.mdc-button:not(.mdc-ripple-upgraded):focus .mdc-button__focus-ring{display:block}}.mdc-button .mdc-button__touch{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mdc-button__label+.mdc-button__icon{margin-left:8px;margin-right:0}[dir=rtl] .mdc-button__label+.mdc-button__icon,.mdc-button__label+.mdc-button__icon[dir=rtl]{margin-left:0;margin-right:8px}svg.mdc-button__icon{fill:currentColor}.mdc-button--touch{margin-top:6px;margin-bottom:6px}.mdc-button{padding:0 8px 0 8px}.mdc-button--unelevated{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--unelevated.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--unelevated.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--raised{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 16px 0 16px}.mdc-button--raised.mdc-button--icon-trailing{padding:0 12px 0 16px}.mdc-button--raised.mdc-button--icon-leading{padding:0 16px 0 12px}.mdc-button--outlined{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-button--outlined .mdc-button__ripple{border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button{height:var(--mdc-text-button-container-height, 36px);border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, inherit)}.mat-mdc-button:disabled{color:var(--mdc-text-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button{height:var(--mdc-filled-button-container-height, 36px);border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-unelevated-button:not(:disabled){background-color:var(--mdc-filled-button-container-color, transparent)}.mat-mdc-unelevated-button:disabled{background-color:var(--mdc-filled-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, inherit)}.mat-mdc-unelevated-button:disabled{color:var(--mdc-filled-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button{height:var(--mdc-protected-button-container-height, 36px);border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px));box-shadow:var(--mdc-protected-button-container-elevation, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){background-color:var(--mdc-protected-button-container-color, transparent)}.mat-mdc-raised-button:disabled{background-color:var(--mdc-protected-button-disabled-container-color, rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, inherit)}.mat-mdc-raised-button:disabled{color:var(--mdc-protected-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-raised-button.mdc-ripple-upgraded--background-focused,.mat-mdc-raised-button:not(.mdc-ripple-upgraded):focus{box-shadow:var(--mdc-protected-button-focus-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation, 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:not(:disabled):active{box-shadow:var(--mdc-protected-button-pressed-container-elevation, 0px 5px 5px -3px rgba(0, 0, 0, 0.2), 0px 8px 10px 1px rgba(0, 0, 0, 0.14), 0px 3px 14px 2px rgba(0, 0, 0, 0.12))}.mat-mdc-raised-button:disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation, 0px 0px 0px 0px rgba(0, 0, 0, 0.2), 0px 0px 0px 0px rgba(0, 0, 0, 0.14), 0px 0px 0px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button{height:var(--mdc-outlined-button-container-height, 36px);border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px));padding:0 15px 0 15px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, inherit)}.mat-mdc-outlined-button:disabled{color:var(--mdc-outlined-button-disabled-label-text-color, rgba(0, 0, 0, 0.38))}.mat-mdc-outlined-button .mdc-button__ripple{border-radius:var(--mdc-outlined-button-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-outlined-button:not(:disabled){border-color:var(--mdc-outlined-button-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button:disabled{border-color:var(--mdc-outlined-button-disabled-outline-color, rgba(0, 0, 0, 0.12))}.mat-mdc-outlined-button.mdc-button--icon-trailing{padding:0 11px 0 15px}.mat-mdc-outlined-button.mdc-button--icon-leading{padding:0 15px 0 11px}.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:var(--mdc-outlined-button-outline-width, 1px)}.mat-mdc-outlined-button .mdc-button__touch{left:calc(-1 * var(--mdc-outlined-button-outline-width, 1px));width:calc(100% + 2 * var(--mdc-outlined-button-outline-width, 1px))}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-button .mat-ripple-element,.mat-mdc-unelevated-button .mat-ripple-element,.mat-mdc-raised-button .mat-ripple-element,.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-button .mdc-button__label,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-outlined-button .mdc-button__label{z-index:1}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button[disabled],.mat-mdc-unelevated-button[disabled],.mat-mdc-raised-button[disabled],.mat-mdc-outlined-button[disabled]{cursor:default;pointer-events:none}.mat-mdc-button .mat-mdc-button-touch-target,.mat-mdc-unelevated-button .mat-mdc-button-touch-target,.mat-mdc-raised-button .mat-mdc-button-touch-target,.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%)}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}[dir=rtl] .mat-mdc-button>.mat-icon,.mat-mdc-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}.mat-mdc-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon,.mat-mdc-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{margin-left:0;margin-right:8px;display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem;margin-left:-4px;margin-right:8px}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:0}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon,[dir=rtl] .mat-mdc-raised-button>.mat-icon,[dir=rtl] .mat-mdc-outlined-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon[dir=rtl],.mat-mdc-raised-button>.mat-icon[dir=rtl],.mat-mdc-outlined-button>.mat-icon[dir=rtl]{margin-left:8px;margin-right:-4px}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon,.mat-mdc-raised-button .mdc-button__label+.mat-icon,.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-left:8px;margin-right:-4px}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon,[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon,.mat-mdc-unelevated-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-raised-button .mdc-button__label+.mat-icon[dir=rtl],.mat-mdc-outlined-button .mdc-button__label+.mat-icon[dir=rtl]{margin-left:-4px;margin-right:8px}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px;border-width:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px) * -1)}',M2],encapsulation:2,changeDetection:0}),n})();new ie("mat-mdc-fab-default-options",{providedIn:"root",factory:function(){return{color:"accent"}}});var $i=(()=>{class n extends w2{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(at),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["button","mat-icon-button",""]],hostVars:7,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color"},exportAs:["matButton"],features:[Ke],attrs:I7,ngContentSelectors:R_e,decls:5,vars:3,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleCentered","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Dn(),P(0,"span",0),zt(1),P(2,"span",1)(3,"span",2)(4,"span",3)),2&e&&(v(3),_("matRippleDisabled",i._isRippleDisabled())("matRippleCentered",!0)("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[mo],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',M2],encapsulation:2,changeDetection:0}),n})(),O7=(()=>{class n extends A7{constructor(e,i,r,o){super(e,i,r,o)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(at),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["a","mat-icon-button",""]],hostVars:9,hostBindings:function(e,i){2&e&&(Be("disabled",i.disabled||null)("tabindex",i.disabled?-1:i.tabIndex)("aria-disabled",i.disabled.toString()),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mat-unthemed",!i.color)("mat-mdc-button-base",!0))},inputs:{disabled:"disabled",disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matButton","matAnchor"],features:[Ke],attrs:I7,ngContentSelectors:C2,decls:8,vars:6,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],["matRipple","",1,"mat-mdc-button-ripple",3,"matRippleDisabled","matRippleTrigger"],[1,"mat-mdc-button-touch-target"]],template:function(e,i){1&e&&(Dn(x2),P(0,"span",0),zt(1),h(2,"span",1),zt(3,1),g(),zt(4,2),P(5,"span",2)(6,"span",3)(7,"span",4)),2&e&&(nt("mdc-button__ripple",!i._isFab)("mdc-fab__ripple",i._isFab),v(6),_("matRippleDisabled",i._isRippleDisabled())("matRippleTrigger",i._elementRef.nativeElement))},dependencies:[mo],styles:['.mdc-icon-button{font-size:24px;width:48px;height:48px;padding:12px}.mdc-icon-button .mdc-icon-button__focus-ring{max-height:48px;max-width:48px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__ripple{width:40px;height:40px;margin-top:4px;margin-bottom:4px;margin-right:4px;margin-left:4px}.mdc-icon-button.mdc-icon-button--reduced-size .mdc-icon-button__focus-ring{max-height:40px;max-width:40px}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mdc-icon-button svg,.mdc-icon-button img{width:24px;height:24px}.mdc-icon-button{display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;user-select:none;z-index:0;overflow:visible}.mdc-icon-button .mdc-icon-button__touch{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}@media screen and (forced-colors: active){.mdc-icon-button.mdc-ripple-upgraded--background-focused .mdc-icon-button__focus-ring,.mdc-icon-button:not(.mdc-ripple-upgraded):focus .mdc-icon-button__focus-ring{display:block}}.mdc-icon-button:disabled{cursor:default;pointer-events:none}.mdc-icon-button[hidden]{display:none}.mdc-icon-button--display-flex{align-items:center;display:inline-flex;justify-content:center}.mdc-icon-button__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%;display:none}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring{border-color:CanvasText}}.mdc-icon-button__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-icon-button__focus-ring::after{border-color:CanvasText}}.mdc-icon-button__icon{display:inline-block}.mdc-icon-button__icon.mdc-icon-button__icon--on{display:none}.mdc-icon-button--on .mdc-icon-button__icon{display:none}.mdc-icon-button--on .mdc-icon-button__icon.mdc-icon-button__icon--on{display:inline-block}.mdc-icon-button__link{height:100%;left:0;outline:none;position:absolute;top:0;width:100%}.mat-mdc-icon-button{height:var(--mdc-icon-button-state-layer-size, 48px);width:var(--mdc-icon-button-state-layer-size, 48px);color:var(--mdc-icon-button-icon-color, inherit);border-radius:50%;flex-shrink:0;text-align:center;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button svg,.mat-mdc-icon-button img{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px)}.mat-mdc-icon-button:disabled{opacity:var(--mdc-icon-button-disabled-icon-opacity, 0.38)}.mat-mdc-icon-button:disabled{color:var(--mdc-icon-button-disabled-icon-color, #000)}.mat-mdc-icon-button svg{vertical-align:baseline}.mat-mdc-icon-button[disabled]{cursor:default;pointer-events:none;opacity:1}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0;background-color:var(--mat-mdc-button-persistent-ripple-color)}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-mdc-button-ripple-color)}.mat-mdc-icon-button .mdc-button__label{z-index:1}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',M2],encapsulation:2,changeDetection:0}),n})(),ci=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Bl,fn]}),n})(),jv=class{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;null!=t&&(this._attachedHost=null,t.detach())}get isAttached(){return null!=this._attachedHost}setAttachedHost(t){this._attachedHost=t}},Vl=class extends jv{constructor(t,e,i,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=i,this.componentFactoryResolver=r,this.projectableNodes=o}},Yo=class extends jv{constructor(t,e,i,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=i,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},S2=class extends jv{constructor(t){super(),this.element=t instanceof Me?t.nativeElement:t}},Fu=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){return t instanceof Vl?(this._attachedPortal=t,this.attachComponentPortal(t)):t instanceof Yo?(this._attachedPortal=t,this.attachTemplatePortal(t)):this.attachDomPortal&&t instanceof S2?(this._attachedPortal=t,this.attachDomPortal(t)):void 0}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}},Gv=class extends Fu{constructor(t,e,i,r,o){super(),this.outletElement=t,this._componentFactoryResolver=e,this._appRef=i,this._defaultInjector=r,this.attachDomPortal=s=>{let a=s.element,l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(t){let r,i=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);return t.viewContainerRef?(r=t.viewContainerRef.createComponent(i,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector,t.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=i.create(t.injector||this._defaultInjector||Mi.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=t,r}attachTemplatePortal(t){let e=t.viewContainerRef,i=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return i.rootNodes.forEach(r=>this.outletElement.appendChild(r)),i.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(i);-1!==r&&e.remove(r)}),this._attachedPortal=t,i}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}},k7=(()=>{class n extends Yo{constructor(e,i){super(e,i)}}return n.\u0275fac=function(e){return new(e||n)(C(Si),C(si))},n.\u0275dir=we({type:n,selectors:[["","cdkPortal",""]],exportAs:["cdkPortal"],features:[Ke]}),n})(),ps=(()=>{class n extends Fu{constructor(e,i,r){super(),this._componentFactoryResolver=e,this._viewContainerRef=i,this._isInitialized=!1,this.attached=new F,this.attachDomPortal=o=>{let s=o.element,a=this._document.createComment("dom-portal");o.setAttachedHost(this),s.parentNode.insertBefore(a,s),this._getRootNode().appendChild(s),this._attachedPortal=o,super.setDisposeFn(()=>{a.parentNode&&a.parentNode.replaceChild(s,a)})},this._document=r}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let i=null!=e.viewContainerRef?e.viewContainerRef:this._viewContainerRef,o=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),s=i.createComponent(o,i.length,e.injector||i.injector,e.projectableNodes||void 0);return i!==this._viewContainerRef&&this._getRootNode().appendChild(s.hostView.rootNodes[0]),super.setDisposeFn(()=>s.destroy()),this._attachedPortal=e,this._attachedRef=s,this.attached.emit(s),s}attachTemplatePortal(e){e.setAttachedHost(this);let i=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=i,this.attached.emit(i),i}_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}}return n.\u0275fac=function(e){return new(e||n)(C(fo),C(si),C(Lt))},n.\u0275dir=we({type:n,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:["cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],features:[Ke]}),n})(),Hl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Wv=class{},G1=class extends Wv{constructor(t){super(),this._data=t}connect(){return D_(this._data)?this._data:Ht(this._data)}disconnect(){}},qv=class{constructor(){this.viewCacheSize=20,this._viewCache=[]}applyChanges(t,e,i,r,o){t.forEachOperation((s,a,l)=>{let c,d;null==s.previousIndex?(c=this._insertView(()=>i(s,a,l),l,e,r(s)),d=c?1:0):null==l?(this._detachAndCacheView(a,e),d=3):(c=this._moveView(a,l,e,r(s)),d=2),o&&o({context:c?.context,operation:d,record:s})})}detach(){for(let t of this._viewCache)t.destroy();this._viewCache=[]}_insertView(t,e,i,r){let o=this._insertViewFromCache(e,i);if(o)return void(o.context.$implicit=r);let s=t();return i.createEmbeddedView(s.templateRef,s.context,s.index)}_detachAndCacheView(t,e){let i=e.detach(t);this._maybeCacheView(i,e)}_moveView(t,e,i,r){let o=i.get(t);return i.move(o,e),o.context.$implicit=r,o}_maybeCacheView(t,e){if(this._viewCache.length<this.viewCacheSize)this._viewCache.push(t);else{let i=e.indexOf(t);-1===i?t.destroy():e.remove(i)}}_insertViewFromCache(t,e){let i=this._viewCache.pop();return i&&e.insert(i,t),i||null}},dg=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,i=!0,r){this._multiple=t,this._emitChanges=i,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new Ie,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(i=>this._markSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(i=>this._unmarkSelected(i));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);let e=this.selected,i=new Set(t);t.forEach(o=>this._markSelected(o)),e.filter(o=>!i.has(o)).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();let e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return 0===this._selection.size}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){}_hasQueuedChanges(){return!(!this._deselectedToEmit.length&&!this._selectedToEmit.length)}_getConcreteValue(t){if(this.compareWith){for(let e of this._selection)if(this.compareWith(t,e))return e;return t}return t}},W1=new ie("_ViewRepeater"),N_e=["contentWrapper"],L_e=["*"],B7=new ie("VIRTUAL_SCROLL_STRATEGY");function B_e(n){return n._scrollStrategy}var V7=(()=>{class n{constructor(){this._itemSize=20,this._minBufferPx=100,this._maxBufferPx=200,this._scrollStrategy=new class{constructor(t,e,i){this._scrolledIndexChange=new Ie,this.scrolledIndexChange=this._scrolledIndexChange.pipe(Yn()),this._viewport=null,this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i}attach(t){this._viewport=t,this._updateTotalContentSize(),this._updateRenderedRange()}detach(){this._scrolledIndexChange.complete(),this._viewport=null}updateItemAndBufferSize(t,e,i){this._itemSize=t,this._minBufferPx=e,this._maxBufferPx=i,this._updateTotalContentSize(),this._updateRenderedRange()}onContentScrolled(){this._updateRenderedRange()}onDataLengthChanged(){this._updateTotalContentSize(),this._updateRenderedRange()}onContentRendered(){}onRenderedOffsetChanged(){}scrollToIndex(t,e){this._viewport&&this._viewport.scrollToOffset(t*this._itemSize,e)}_updateTotalContentSize(){!this._viewport||this._viewport.setTotalContentSize(this._viewport.getDataLength()*this._itemSize)}_updateRenderedRange(){if(!this._viewport)return;let t=this._viewport.getRenderedRange(),e={start:t.start,end:t.end},i=this._viewport.getViewportSize(),r=this._viewport.getDataLength(),o=this._viewport.measureScrollOffset(),s=this._itemSize>0?o/this._itemSize:0;if(e.end>r){let l=Math.ceil(i/this._itemSize),c=Math.max(0,Math.min(s,r-l));s!=c&&(s=c,o=c*this._itemSize,e.start=Math.floor(s)),e.end=Math.max(0,Math.min(r,e.start+l))}let a=o-e.start*this._itemSize;if(a<this._minBufferPx&&0!=e.start){let l=Math.ceil((this._maxBufferPx-a)/this._itemSize);e.start=Math.max(0,e.start-l),e.end=Math.min(r,Math.ceil(s+(i+this._minBufferPx)/this._itemSize))}else{let l=e.end*this._itemSize-(o+i);if(l<this._minBufferPx&&e.end!=r){let c=Math.ceil((this._maxBufferPx-l)/this._itemSize);c>0&&(e.end=Math.min(r,e.end+c),e.start=Math.max(0,Math.floor(s-this._minBufferPx/this._itemSize)))}}this._viewport.setRenderedRange(e),this._viewport.setRenderedContentOffset(this._itemSize*e.start),this._scrolledIndexChange.next(Math.floor(s))}}(this.itemSize,this.minBufferPx,this.maxBufferPx)}get itemSize(){return this._itemSize}set itemSize(e){this._itemSize=_i(e)}get minBufferPx(){return this._minBufferPx}set minBufferPx(e){this._minBufferPx=_i(e)}get maxBufferPx(){return this._maxBufferPx}set maxBufferPx(e){this._maxBufferPx=_i(e)}ngOnChanges(){this._scrollStrategy.updateItemAndBufferSize(this.itemSize,this.minBufferPx,this.maxBufferPx)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["cdk-virtual-scroll-viewport","itemSize",""]],inputs:{itemSize:"itemSize",minBufferPx:"minBufferPx",maxBufferPx:"maxBufferPx"},standalone:!0,features:[Qt([{provide:B7,useFactory:B_e,deps:[$n(()=>n)]}]),Gt]}),n})(),Nu=(()=>{class n{constructor(e,i,r){this._ngZone=e,this._platform=i,this._scrolled=new Ie,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=r}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let i=this.scrollContainers.get(e);i&&(i.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=20){return this._platform.isBrowser?new Kt(i=>{this._globalSubscription||this._addGlobalListener();let r=e>0?this._scrolled.pipe(sc(e)).subscribe(i):this._scrolled.subscribe(i);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Ht()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,i)=>this.deregister(i)),this._scrolled.complete()}ancestorScrolled(e,i){let r=this.getAncestorScrollContainers(e);return this.scrolled(i).pipe(ke(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let i=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&i.push(o)}),i}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,i){let r=Hs(i),o=e.getElementRef().nativeElement;do{if(r==o)return!0}while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>mi(this._getWindow().document,"scroll").subscribe(()=>this._scrolled.next()))}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}}return n.\u0275fac=function(e){return new(e||n)(k(at),k(Gn),k(Lt,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Cd=(()=>{class n{constructor(e,i,r,o){this.elementRef=e,this.scrollDispatcher=i,this.ngZone=r,this.dir=o,this._destroyed=new Ie,this._elementScrolled=new Kt(s=>this.ngZone.runOutsideAngular(()=>mi(this.elementRef.nativeElement,"scroll").pipe(ot(this._destroyed)).subscribe(s)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let i=this.elementRef.nativeElement,r=this.dir&&"rtl"==this.dir.value;null==e.left&&(e.left=r?e.end:e.start),null==e.right&&(e.right=r?e.start:e.end),null!=e.bottom&&(e.top=i.scrollHeight-i.clientHeight-e.bottom),r&&0!=eg()?(null!=e.left&&(e.right=i.scrollWidth-i.clientWidth-e.left),2==eg()?e.left=e.right:1==eg()&&(e.left=e.right?-e.right:e.right)):null!=e.right&&(e.left=i.scrollWidth-i.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let i=this.elementRef.nativeElement;R1()?i.scrollTo(e):(null!=e.top&&(i.scrollTop=e.top),null!=e.left&&(i.scrollLeft=e.left))}measureScrollOffset(e){let i="left",r="right",o=this.elementRef.nativeElement;if("top"==e)return o.scrollTop;if("bottom"==e)return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&"rtl"==this.dir.value;return"start"==e?e=s?r:i:"end"==e&&(e=s?i:r),s&&2==eg()?e==i?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&1==eg()?e==i?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==i?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Nu),C(at),C(Xi,8))},n.\u0275dir=we({type:n,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0}),n})(),js=(()=>{class n{constructor(e,i,r){this._platform=e,this._change=new Ie,this._changeListener=o=>{this._change.next(o)},this._document=r,i.runOutsideAngular(()=>{if(e.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:i,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+i,height:r,width:i}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,i=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect();return{top:-o.top||e.body.scrollTop||i.scrollY||r.scrollTop||0,left:-o.left||e.body.scrollLeft||i.scrollX||r.scrollLeft||0}}change(e=20){return e>0?this._change.pipe(sc(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}}return n.\u0275fac=function(e){return new(e||n)(k(Gn),k(at),k(Lt,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),N7=new ie("VIRTUAL_SCROLLABLE"),z_e=(()=>{class n extends Cd{constructor(e,i,r,o){super(e,i,r,o)}measureViewportSize(e){let i=this.elementRef.nativeElement;return"horizontal"===e?i.clientWidth:i.clientHeight}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Nu),C(at),C(Xi,8))},n.\u0275dir=we({type:n,features:[Ke]}),n})(),j_e=typeof requestAnimationFrame<"u"?YA:Am,ug=(()=>{class n extends z_e{get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this._calculateSpacerSize())}get appendOnly(){return this._appendOnly}set appendOnly(e){this._appendOnly=Rt(e)}constructor(e,i,r,o,s,a,l,c){super(e,a,r,s),this.elementRef=e,this._changeDetectorRef=i,this._scrollStrategy=o,this.scrollable=c,this._platform=ai(Gn),this._detachedSubject=new Ie,this._renderedRangeSubject=new Ie,this._orientation="vertical",this._appendOnly=!1,this.scrolledIndexChange=new Kt(d=>this._scrollStrategy.scrolledIndexChange.subscribe(u=>Promise.resolve().then(()=>this.ngZone.run(()=>d.next(u))))),this.renderedRangeStream=this._renderedRangeSubject,this._totalContentSize=0,this._totalContentWidth="",this._totalContentHeight="",this._renderedRange={start:0,end:0},this._dataLength=0,this._viewportSize=0,this._renderedContentOffset=0,this._renderedContentOffsetNeedsRewrite=!1,this._isChangeDetectionPending=!1,this._runAfterChangeDetection=[],this._viewportChanges=Mn.EMPTY,this._viewportChanges=l.change().subscribe(()=>{this.checkViewportSize()}),this.scrollable||(this.elementRef.nativeElement.classList.add("cdk-virtual-scrollable"),this.scrollable=this)}ngOnInit(){!this._platform.isBrowser||(this.scrollable===this&&super.ngOnInit(),this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._measureViewportSize(),this._scrollStrategy.attach(this),this.scrollable.elementScrolled().pipe(qn(null),sc(0,j_e)).subscribe(()=>this._scrollStrategy.onContentScrolled()),this._markChangeDetectionNeeded()})))}ngOnDestroy(){this.detach(),this._scrollStrategy.detach(),this._renderedRangeSubject.complete(),this._detachedSubject.complete(),this._viewportChanges.unsubscribe(),super.ngOnDestroy()}attach(e){this.ngZone.runOutsideAngular(()=>{this._forOf=e,this._forOf.dataStream.pipe(ot(this._detachedSubject)).subscribe(i=>{let r=i.length;r!==this._dataLength&&(this._dataLength=r,this._scrollStrategy.onDataLengthChanged()),this._doChangeDetection()})})}detach(){this._forOf=null,this._detachedSubject.next()}getDataLength(){return this._dataLength}getViewportSize(){return this._viewportSize}getRenderedRange(){return this._renderedRange}measureBoundingClientRectWithScrollOffset(e){return this.getElementRef().nativeElement.getBoundingClientRect()[e]}setTotalContentSize(e){this._totalContentSize!==e&&(this._totalContentSize=e,this._calculateSpacerSize(),this._markChangeDetectionNeeded())}setRenderedRange(e){(function(n,t){return n.start==t.start&&n.end==t.end})(this._renderedRange,e)||(this.appendOnly&&(e={start:0,end:Math.max(this._renderedRange.end,e.end)}),this._renderedRangeSubject.next(this._renderedRange=e),this._markChangeDetectionNeeded(()=>this._scrollStrategy.onContentRendered()))}getOffsetToRenderedContentStart(){return this._renderedContentOffsetNeedsRewrite?null:this._renderedContentOffset}setRenderedContentOffset(e,i="to-start"){e=this.appendOnly&&"to-start"===i?0:e;let o="horizontal"==this.orientation,s=o?"X":"Y",l=`translate${s}(${Number((o&&this.dir&&"rtl"==this.dir.value?-1:1)*e)}px)`;this._renderedContentOffset=e,"to-end"===i&&(l+=` translate${s}(-100%)`,this._renderedContentOffsetNeedsRewrite=!0),this._renderedContentTransform!=l&&(this._renderedContentTransform=l,this._markChangeDetectionNeeded(()=>{this._renderedContentOffsetNeedsRewrite?(this._renderedContentOffset-=this.measureRenderedContentSize(),this._renderedContentOffsetNeedsRewrite=!1,this.setRenderedContentOffset(this._renderedContentOffset)):this._scrollStrategy.onRenderedOffsetChanged()}))}scrollToOffset(e,i="auto"){let r={behavior:i};"horizontal"===this.orientation?r.start=e:r.top=e,this.scrollable.scrollTo(r)}scrollToIndex(e,i="auto"){this._scrollStrategy.scrollToIndex(e,i)}measureScrollOffset(e){let i;return i=this.scrollable==this?r=>super.measureScrollOffset(r):r=>this.scrollable.measureScrollOffset(r),Math.max(0,i(e??("horizontal"===this.orientation?"start":"top"))-this.measureViewportOffset())}measureViewportOffset(e){let i,r="left",o="right",s="rtl"==this.dir?.value;i="start"==e?s?o:r:"end"==e?s?r:o:e||("horizontal"===this.orientation?"left":"top");let a=this.scrollable.measureBoundingClientRectWithScrollOffset(i);return this.elementRef.nativeElement.getBoundingClientRect()[i]-a}measureRenderedContentSize(){let e=this._contentWrapper.nativeElement;return"horizontal"===this.orientation?e.offsetWidth:e.offsetHeight}measureRangeSize(e){return this._forOf?this._forOf.measureRangeSize(e,this.orientation):0}checkViewportSize(){this._measureViewportSize(),this._scrollStrategy.onDataLengthChanged()}_measureViewportSize(){this._viewportSize=this.scrollable.measureViewportSize(this.orientation)}_markChangeDetectionNeeded(e){e&&this._runAfterChangeDetection.push(e),this._isChangeDetectionPending||(this._isChangeDetectionPending=!0,this.ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>{this._doChangeDetection()})))}_doChangeDetection(){this._isChangeDetectionPending=!1,this._contentWrapper.nativeElement.style.transform=this._renderedContentTransform,this.ngZone.run(()=>this._changeDetectorRef.markForCheck());let e=this._runAfterChangeDetection;this._runAfterChangeDetection=[];for(let i of e)i()}_calculateSpacerSize(){this._totalContentHeight="horizontal"===this.orientation?"":`${this._totalContentSize}px`,this._totalContentWidth="horizontal"===this.orientation?`${this._totalContentSize}px`:""}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(at),C(B7,8),C(Xi,8),C(Nu),C(js),C(N7,8))},n.\u0275cmp=O({type:n,selectors:[["cdk-virtual-scroll-viewport"]],viewQuery:function(e,i){if(1&e&&Ge(N_e,7),2&e){let r;Se(r=Ee())&&(i._contentWrapper=r.first)}},hostAttrs:[1,"cdk-virtual-scroll-viewport"],hostVars:4,hostBindings:function(e,i){2&e&&nt("cdk-virtual-scroll-orientation-horizontal","horizontal"===i.orientation)("cdk-virtual-scroll-orientation-vertical","horizontal"!==i.orientation)},inputs:{orientation:"orientation",appendOnly:"appendOnly"},outputs:{scrolledIndexChange:"scrolledIndexChange"},standalone:!0,features:[Qt([{provide:Cd,useFactory:(t,e)=>t||e,deps:[[new Ts,new nh(N7)],n]}]),Ke,IO],ngContentSelectors:L_e,decls:4,vars:4,consts:[[1,"cdk-virtual-scroll-content-wrapper"],["contentWrapper",""],[1,"cdk-virtual-scroll-spacer"]],template:function(e,i){1&e&&(Dn(),h(0,"div",0,1),zt(2),g(),P(3,"div",2)),2&e&&(v(3),Tt("width",i._totalContentWidth)("height",i._totalContentHeight))},styles:["cdk-virtual-scroll-viewport{display:block;position:relative;transform:translateZ(0)}.cdk-virtual-scrollable{overflow:auto;will-change:scroll-position;contain:strict;-webkit-overflow-scrolling:touch}.cdk-virtual-scroll-content-wrapper{position:absolute;top:0;left:0;contain:content}[dir=rtl] .cdk-virtual-scroll-content-wrapper{right:0;left:auto}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper{min-height:100%}.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-horizontal .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-left:0;padding-right:0;margin-left:0;margin-right:0;border-left-width:0;border-right-width:0;outline:none}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper{min-width:100%}.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>dl:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ol:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>table:not([cdkVirtualFor]),.cdk-virtual-scroll-orientation-vertical .cdk-virtual-scroll-content-wrapper>ul:not([cdkVirtualFor]){padding-top:0;padding-bottom:0;margin-top:0;margin-bottom:0;border-top-width:0;border-bottom-width:0;outline:none}.cdk-virtual-scroll-spacer{height:1px;transform-origin:0 0;flex:0 0 auto}[dir=rtl] .cdk-virtual-scroll-spacer{transform-origin:100% 0}"],encapsulation:2,changeDetection:0}),n})();function L7(n,t,e){if(!e.getBoundingClientRect)return 0;let r=e.getBoundingClientRect();return"horizontal"===n?"start"===t?r.left:r.right:"start"===t?r.top:r.bottom}var H7=(()=>{class n{get cdkVirtualForOf(){return this._cdkVirtualForOf}set cdkVirtualForOf(e){this._cdkVirtualForOf=e,function(n){return n&&"function"==typeof n.connect&&!(n instanceof w_)}(e)?this._dataSourceChanges.next(e):this._dataSourceChanges.next(new G1(D_(e)?e:Array.from(e||[])))}get cdkVirtualForTrackBy(){return this._cdkVirtualForTrackBy}set cdkVirtualForTrackBy(e){this._needsUpdate=!0,this._cdkVirtualForTrackBy=e?(i,r)=>e(i+(this._renderedRange?this._renderedRange.start:0),r):void 0}set cdkVirtualForTemplate(e){e&&(this._needsUpdate=!0,this._template=e)}get cdkVirtualForTemplateCacheSize(){return this._viewRepeater.viewCacheSize}set cdkVirtualForTemplateCacheSize(e){this._viewRepeater.viewCacheSize=_i(e)}constructor(e,i,r,o,s,a){this._viewContainerRef=e,this._template=i,this._differs=r,this._viewRepeater=o,this._viewport=s,this.viewChange=new Ie,this._dataSourceChanges=new Ie,this.dataStream=this._dataSourceChanges.pipe(qn(null),Fm(),Jn(([l,c])=>this._changeDataSource(l,c)),Ms(1)),this._differ=null,this._needsUpdate=!1,this._destroyed=new Ie,this.dataStream.subscribe(l=>{this._data=l,this._onRenderedDataChange()}),this._viewport.renderedRangeStream.pipe(ot(this._destroyed)).subscribe(l=>{this._renderedRange=l,this.viewChange.observers.length&&a.run(()=>this.viewChange.next(this._renderedRange)),this._onRenderedDataChange()}),this._viewport.attach(this)}measureRangeSize(e,i){if(e.start>=e.end)return 0;let s,a,r=e.start-this._renderedRange.start,o=e.end-e.start;for(let l=0;l<o;l++){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){s=a=c.rootNodes[0];break}}for(let l=o-1;l>-1;l--){let c=this._viewContainerRef.get(l+r);if(c&&c.rootNodes.length){a=c.rootNodes[c.rootNodes.length-1];break}}return s&&a?L7(i,"end",a)-L7(i,"start",s):0}ngDoCheck(){if(this._differ&&this._needsUpdate){let e=this._differ.diff(this._renderedItems);e?this._applyChanges(e):this._updateContext(),this._needsUpdate=!1}}ngOnDestroy(){this._viewport.detach(),this._dataSourceChanges.next(void 0),this._dataSourceChanges.complete(),this.viewChange.complete(),this._destroyed.next(),this._destroyed.complete(),this._viewRepeater.detach()}_onRenderedDataChange(){!this._renderedRange||(this._renderedItems=this._data.slice(this._renderedRange.start,this._renderedRange.end),this._differ||(this._differ=this._differs.find(this._renderedItems).create((e,i)=>this.cdkVirtualForTrackBy?this.cdkVirtualForTrackBy(e,i):i)),this._needsUpdate=!0)}_changeDataSource(e,i){return e&&e.disconnect(this),this._needsUpdate=!0,i?i.connect(this):Ht()}_updateContext(){let e=this._data.length,i=this._viewContainerRef.length;for(;i--;){let r=this._viewContainerRef.get(i);r.context.index=this._renderedRange.start+i,r.context.count=e,this._updateComputedContextProperties(r.context),r.detectChanges()}}_applyChanges(e){this._viewRepeater.applyChanges(e,this._viewContainerRef,(o,s,a)=>this._getEmbeddedViewArgs(o,a),o=>o.item),e.forEachIdentityChange(o=>{this._viewContainerRef.get(o.currentIndex).context.$implicit=o.item});let i=this._data.length,r=this._viewContainerRef.length;for(;r--;){let o=this._viewContainerRef.get(r);o.context.index=this._renderedRange.start+r,o.context.count=i,this._updateComputedContextProperties(o.context)}}_updateComputedContextProperties(e){e.first=0===e.index,e.last=e.index===e.count-1,e.even=e.index%2==0,e.odd=!e.even}_getEmbeddedViewArgs(e,i){return{templateRef:this._template,context:{$implicit:e.item,cdkVirtualForOf:this._cdkVirtualForOf,index:-1,count:-1,first:!1,last:!1,odd:!1,even:!1},index:i}}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(Si),C(wl),C(W1),C(ug,4),C(at))},n.\u0275dir=we({type:n,selectors:[["","cdkVirtualFor","","cdkVirtualForOf",""]],inputs:{cdkVirtualForOf:"cdkVirtualForOf",cdkVirtualForTrackBy:"cdkVirtualForTrackBy",cdkVirtualForTemplate:"cdkVirtualForTemplate",cdkVirtualForTemplateCacheSize:"cdkVirtualForTemplateCacheSize"},standalone:!0,features:[Qt([{provide:W1,useClass:qv}])]}),n})(),Pc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Md=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Ou,Pc,ug,Ou,Pc]}),n})(),z7=R1(),q1=class{enable(){}disable(){}attach(){}};function I2(n,t){return t.some(e=>n.bottom<e.top||n.top>e.bottom||n.right<e.left||n.left>e.right)}function U7(n,t){return t.some(e=>n.top<e.top||n.bottom>e.bottom||n.left<e.left||n.right>e.right)}var xf=class{constructor(t,e,i,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:i,height:r}=this._viewportRuler.getViewportSize();I2(e,[{width:i,height:r,bottom:r,right:i,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},G_e=(()=>{class n{constructor(e,i,r,o){this._scrollDispatcher=e,this._viewportRuler=i,this._ngZone=r,this.noop=()=>new q1,this.close=s=>new class{constructor(t,e,i,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(ke(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}(this._scrollDispatcher,this._ngZone,this._viewportRuler,s),this.block=()=>new class{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Yr(-this._previousScrollPosition.left),t.style.top=Yr(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,i=t.style,r=this._document.body.style,o=i.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,i.left=this._previousHTMLStyles.left,i.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),z7&&(i.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),z7&&(i.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,i=this._viewportRuler.getViewportSize();return e.scrollHeight>i.height||e.scrollWidth>i.width}}(this._viewportRuler,this._document),this.reposition=s=>new xf(this._scrollDispatcher,this._viewportRuler,this._ngZone,s),this._document=o}}return n.\u0275fac=function(e){return new(e||n)(k(Nu),k(js),k(at),k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Qa=class{constructor(t){if(this.scrollStrategy=new q1,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){let e=Object.keys(t);for(let i of e)void 0!==t[i]&&(this[i]=t[i])}}},Y7=(()=>{class n{constructor(e){this._attachedOverlays=[],this._document=e}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let i=this._attachedOverlays.indexOf(e);i>-1&&this._attachedOverlays.splice(i,1),0===this._attachedOverlays.length&&this.detach()}}return n.\u0275fac=function(e){return new(e||n)(k(Lt))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),W_e=(()=>{class n extends Y7{constructor(e,i){super(e),this._ngZone=i,this._keydownListener=r=>{let o=this._attachedOverlays;for(let s=o.length-1;s>-1;s--)if(o[s]._keydownEvents.observers.length>0){let a=o[s]._keydownEvents;this._ngZone?this._ngZone.run(()=>a.next(r)):a.next(r);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(at,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),q_e=(()=>{class n extends Y7{constructor(e,i,r){super(e),this._platform=i,this._ngZone=r,this._cursorStyleIsSet=!1,this._pointerDownListener=o=>{this._pointerDownEventTarget=ma(o)},this._clickListener=o=>{let s=ma(o),a="click"===o.type&&this._pointerDownEventTarget?this._pointerDownEventTarget:s;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let c=l.length-1;c>-1;c--){let d=l[c];if(d._outsidePointerEvents.observers.length<1||!d.hasAttached())continue;if(d.overlayElement.contains(s)||d.overlayElement.contains(a))break;let u=d._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>u.next(o)):u.next(o)}}}add(e){if(super.add(e),!this._isAttached){let i=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(i)):this._addEventListeners(i),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=i.style.cursor,i.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(Gn),k(at,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pg=(()=>{class n{constructor(e,i){this._platform=i,this._document=e}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||kv()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;o<r.length;o++)r[o].remove()}let i=this._document.createElement("div");i.classList.add(e),kv()?i.setAttribute("platform","test"):this._platform.isBrowser||i.setAttribute("platform","server"),this._document.body.appendChild(i),this._containerElement=i}}return n.\u0275fac=function(e){return new(e||n)(k(Lt),k(Gn))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Oc=class{constructor(t,e,i,r,o,s,a,l,c,d=!1){this._portalOutlet=t,this._host=e,this._pane=i,this._config=r,this._ngZone=o,this._keyboardDispatcher=s,this._document=a,this._location=l,this._outsideClickDispatcher=c,this._animationsDisabled=d,this._backdropElement=null,this._backdropClick=new Ie,this._attachments=new Ie,this._detachments=new Ie,this._locationChanges=Mn.EMPTY,this._backdropClickHandler=u=>this._backdropClick.next(u),this._backdropTransitionendHandler=u=>{this._disposeBackdrop(u.target)},this._keydownEvents=new Ie,this._outsidePointerEvents=new Ie,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe(Yt(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),"function"==typeof e?.onDestroy&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config={...this._config,...t},this._updateElementSize()}setDirection(t){this._config={...this._config,direction:t},this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=Yr(this._config.width),t.height=Yr(this._config.height),t.minWidth=Yr(this._config.minWidth),t.minHeight=Yr(this._config.minHeight),t.maxWidth=Yr(this._config.maxWidth),t.maxHeight=Yr(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){if(this._animationsDisabled)return void this._disposeBackdrop(t);t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,i){let r=tg(e||[]).filter(o=>!!o);r.length&&(i?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{let t=this._ngZone.onStable.pipe(ot(tn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},j7="cdk-overlay-connected-position-bounding-box",Y_e=/([A-Za-z%]+)$/;function yf(n,t){for(let e in t)t.hasOwnProperty(e)&&(n[e]=t[e]);return n}function G7(n){if("number"!=typeof n&&null!=n){let[t,e]=n.split(Y_e);return e&&"px"!==e?null:parseFloat(t)}return n||null}function W7(n){return{top:Math.floor(n.top),right:Math.floor(n.right),bottom:Math.floor(n.bottom),left:Math.floor(n.left),width:Math.floor(n.width),height:Math.floor(n.height)}}var q7="cdk-global-overlay-wrapper",X_e=(()=>{class n{constructor(e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o}global(){return new class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(q7),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=i,l=!("100%"!==r&&"100vw"!==r||s&&"100%"!==s&&"100vw"!==s),c=!("100%"!==o&&"100vh"!==o||a&&"100%"!==a&&"100vh"!==a),d=this._xPosition,u=this._xOffset,p="rtl"===this._overlayRef.getConfig().direction,f="",m="",b="";l?b="flex-start":"center"===d?(b="center",p?m=u:f=u):p?"left"===d||"end"===d?(b="flex-end",f=u):("right"===d||"start"===d)&&(b="flex-start",m=u):"left"===d||"start"===d?(b="flex-start",f=u):("right"===d||"end"===d)&&(b="flex-end",m=u),t.position=this._cssPosition,t.marginLeft=l?"0":f,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":m,e.justifyContent=b,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(q7),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}}flexibleConnectedTo(e){return new class{get positions(){return this._preferredPositions}constructor(t,e,i,r,o){this._viewportRuler=e,this._document=i,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new Ie,this._resizeSubscription=Mn.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._validatePositions(),t.hostElement.classList.add(j7),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let s,t=this._originRect,e=this._overlayRect,i=this._viewportRect,r=this._containerRect,o=[];for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,i,a);if(d.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(a,l);this._canFitWithFlexibleDimensions(d,c,i)?o.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)}):(!s||s.overlayFit.visibleArea<d.visibleArea)&&(s={overlayFit:d,overlayPoint:c,originPoint:l,position:a,overlayRect:e})}if(o.length){let a=null,l=-1;for(let c of o){let d=c.boundingBoxRect.width*c.boundingBoxRect.height*(c.position.weight||1);d>l&&(l=d,a=c)}return this._isPushed=!1,void this._applyPosition(a.position,a.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(s.position,s.originPoint);this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&yf(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(j7),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,i){let r,o;if("center"==i.originX)r=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r="start"==i.originX?s:a}return e.left<0&&(r-=e.left),o="center"==i.originY?t.top+t.height/2:"top"==i.originY?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,i){let r,o;return r="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,o="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,i,r){let o=W7(e),{x:s,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let p=0-a,f=a+o.height-i.height,m=this._subtractOverflows(o.width,0-s,s+o.width-i.width),b=this._subtractOverflows(o.height,p,f),M=m*b;return{visibleArea:M,isCompletelyWithinViewport:o.width*o.height===M,fitsInViewportVertically:b===o.height,fitsInViewportHorizontally:m==o.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){let r=i.bottom-e.y,o=i.right-e.x,s=G7(this._overlayRef.getConfig().minHeight),a=G7(this._overlayRef.getConfig().minWidth);return(t.fitsInViewportVertically||null!=s&&s<=r)&&(t.fitsInViewportHorizontally||null!=a&&a<=o)}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=W7(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),l=Math.max(o.top-i.top-t.y,0),c=Math.max(o.left-i.left-t.x,0),d=0,u=0;return d=r.width<=o.width?c||-s:t.x<this._viewportMargin?o.left-i.left-t.x:0,u=r.height<=o.height?l||-a:t.y<this._viewportMargin?o.top-i.top-t.y:0,this._previousPushAmount={x:d,y:u},{x:t.x+d,y:t.y+u}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){let i=this._getScrollVisibility(),r=new class{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}(t,i);this._positionChanges.next(r)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;let i,e=this._boundingBox.querySelectorAll(this._transformOriginSelector),r=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let o=0;o<e.length;o++)e[o].style.transformOrigin=`${i} ${r}`}_calculateBoundingBoxRect(t,e){let o,s,a,d,u,p,i=this._viewportRect,r=this._isRtl();if("top"===e.overlayY)s=t.y,o=i.height-s+this._viewportMargin;else if("bottom"===e.overlayY)a=i.height-t.y+2*this._viewportMargin,o=i.height-a+this._viewportMargin;else{let f=Math.min(i.bottom-t.y+i.top,t.y),m=this._lastBoundingBoxSize.height;o=2*f,s=t.y-f,o>m&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-m/2)}if("end"===e.overlayX&&!r||"start"===e.overlayX&&r)p=i.width-t.x+this._viewportMargin,d=t.x-this._viewportMargin;else if("start"===e.overlayX&&!r||"end"===e.overlayX&&r)u=t.x,d=i.right-t.x;else{let f=Math.min(i.right-t.x+i.left,t.x),m=this._lastBoundingBoxSize.width;d=2*f,u=t.x-f,d>m&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-m/2)}return{top:s,left:u,bottom:a,right:p,width:d,height:o}}_setBoundingBoxStyles(t,e){let i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Yr(i.height),r.top=Yr(i.top),r.bottom=Yr(i.bottom),r.width=Yr(i.width),r.left=Yr(i.left),r.right=Yr(i.right),r.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",r.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",o&&(r.maxHeight=Yr(o)),s&&(r.maxWidth=Yr(s))}this._lastBoundingBoxSize=i,yf(this._boundingBox.style,r)}_resetBoundingBoxStyles(){yf(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){yf(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let i={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();yf(i,this._getExactOverlayY(e,t,d)),yf(i,this._getExactOverlayX(e,t,d))}else i.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),i.transform=a.trim(),s.maxHeight&&(r?i.maxHeight=Yr(s.maxHeight):o&&(i.maxHeight="")),s.maxWidth&&(r?i.maxWidth=Yr(s.maxWidth):o&&(i.maxWidth="")),yf(this._pane.style,i)}_getExactOverlayY(t,e,i){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),"bottom"===t.overlayY?r.bottom=this._document.documentElement.clientHeight-(o.y+this._overlayRect.height)+"px":r.top=Yr(o.y),r}_getExactOverlayX(t,e,i){let s,r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?r.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":r.left=Yr(o.x),r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:U7(t,i),isOriginOutsideView:I2(t,i),isOverlayClipped:U7(e,i),isOverlayOutsideView:I2(e,i)}}_subtractOverflows(t,...e){return e.reduce((i,r)=>i-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&tg(t).forEach(e=>{""!==e&&-1===this._appliedPanelClasses.indexOf(e)&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof Me)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return n.\u0275fac=function(e){return new(e||n)(k(js),k(Lt),k(Gn),k(pg))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Q_e=0,zi=(()=>{class n{constructor(e,i,r,o,s,a,l,c,d,u,p,f){this.scrollStrategies=e,this._overlayContainer=i,this._componentFactoryResolver=r,this._positionBuilder=o,this._keyboardDispatcher=s,this._injector=a,this._ngZone=l,this._document=c,this._directionality=d,this._location=u,this._outsideClickDispatcher=p,this._animationsModuleType=f}create(e){let i=this._createHostElement(),r=this._createPaneElement(i),o=this._createPortalOutlet(r),s=new Qa(e);return s.direction=s.direction||this._directionality.value,new Oc(o,i,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,"NoopAnimations"===this._animationsModuleType)}position(){return this._positionBuilder}_createPaneElement(e){let i=this._document.createElement("div");return i.id="cdk-overlay-"+Q_e++,i.classList.add("cdk-overlay-pane"),e.appendChild(i),i}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(yc)),new Gv(e,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return n.\u0275fac=function(e){return new(e||n)(k(G_e),k(pg),k(fo),k(X_e),k(W_e),k(Mi),k(at),k(Lt),k(Xi),k(wb),k(q_e),k(hi,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Z_e=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],X7=new ie("cdk-connected-overlay-scroll-strategy"),wd=(()=>{class n{constructor(e){this.elementRef=e}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275dir=we({type:n,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0}),n})(),Bu=(()=>{class n{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Rt(e)}get lockPosition(){return this._lockPosition}set lockPosition(e){this._lockPosition=Rt(e)}get flexibleDimensions(){return this._flexibleDimensions}set flexibleDimensions(e){this._flexibleDimensions=Rt(e)}get growAfterOpen(){return this._growAfterOpen}set growAfterOpen(e){this._growAfterOpen=Rt(e)}get push(){return this._push}set push(e){this._push=Rt(e)}constructor(e,i,r,o,s){this._overlay=e,this._dir=s,this._hasBackdrop=!1,this._lockPosition=!1,this._growAfterOpen=!1,this._flexibleDimensions=!1,this._push=!1,this._backdropSubscription=Mn.EMPTY,this._attachSubscription=Mn.EMPTY,this._detachSubscription=Mn.EMPTY,this._positionSubscription=Mn.EMPTY,this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.backdropClick=new F,this.positionChange=new F,this.attach=new F,this.detach=new F,this.overlayKeydown=new F,this.overlayOutsideClick=new F,this._templatePortal=new Yo(i,r),this._scrollStrategyFactory=o,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=Z_e);let e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(i=>{this.overlayKeydown.next(i),27===i.keyCode&&!this.disableClose&&!vr(i)&&(i.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(i=>{this.overlayOutsideClick.next(i)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),i=new Qa({direction:this._dir,positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop});return(this.width||0===this.width)&&(i.width=this.width),(this.height||0===this.height)&&(i.height=this.height),(this.minWidth||0===this.minWidth)&&(i.minWidth=this.minWidth),(this.minHeight||0===this.minHeight)&&(i.minHeight=this.minHeight),this.backdropClass&&(i.backdropClass=this.backdropClass),this.panelClass&&(i.panelClass=this.panelClass),i}_updatePositionStrategy(e){let i=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getFlexibleConnectedPositionStrategyOrigin()).withPositions(i).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=this._overlay.position().flexibleConnectedTo(this._getFlexibleConnectedPositionStrategyOrigin());return this._updatePositionStrategy(e),e}_getFlexibleConnectedPositionStrategyOrigin(){return this.origin instanceof wd?this.origin.elementRef:this.origin}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(A_(()=>this.positionChange.observers.length>0)).subscribe(e=>{this.positionChange.emit(e),0===this.positionChange.observers.length&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(zi),C(Si),C(si),C(X7),C(Xi,8))},n.\u0275dir=we({type:n,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:["cdkConnectedOverlayOrigin","origin"],positions:["cdkConnectedOverlayPositions","positions"],positionStrategy:["cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:["cdkConnectedOverlayOffsetX","offsetX"],offsetY:["cdkConnectedOverlayOffsetY","offsetY"],width:["cdkConnectedOverlayWidth","width"],height:["cdkConnectedOverlayHeight","height"],minWidth:["cdkConnectedOverlayMinWidth","minWidth"],minHeight:["cdkConnectedOverlayMinHeight","minHeight"],backdropClass:["cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:["cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:["cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:["cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:["cdkConnectedOverlayOpen","open"],disableClose:["cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:["cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:["cdkConnectedOverlayHasBackdrop","hasBackdrop"],lockPosition:["cdkConnectedOverlayLockPosition","lockPosition"],flexibleDimensions:["cdkConnectedOverlayFlexibleDimensions","flexibleDimensions"],growAfterOpen:["cdkConnectedOverlayGrowAfterOpen","growAfterOpen"],push:["cdkConnectedOverlayPush","push"]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[Gt]}),n})(),J_e={provide:X7,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},Co=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[zi,J_e],imports:[Ou,Hl,Md,Md]}),n})();function $_e(n,t){if(1&n){let e=ge();h(0,"div",2)(1,"button",3),I("click",function(){return X(e),Q(w().action())}),T(2),g()()}if(2&n){let e=w();v(2),He(" ",e.data.action," ")}}var ebe=["label"];function tbe(n,t){}var nbe=Math.pow(2,31)-1,Cf=class{constructor(t,e){this._overlayRef=e,this._afterDismissed=new Ie,this._afterOpened=new Ie,this._onAction=new Ie,this._dismissedByAction=!1,this.containerInstance=t,t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,nbe))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},Y1=new ie("MatSnackBarData"),fg=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},ibe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"]}),n})(),rbe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"]}),n})(),obe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"]}),n})(),sbe=(()=>{class n{constructor(e,i){this.snackBarRef=e,this.data=i}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return n.\u0275fac=function(e){return new(e||n)(C(Cf),C(Y1))},n.\u0275cmp=O({type:n,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions","",4,"ngIf"],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(e,i){1&e&&(h(0,"div",0),T(1),g(),S(2,$_e,3,1,"div",1)),2&e&&(v(1),He(" ",i.data.message,"\n"),v(1),_("ngIf",i.hasAction))},dependencies:[Fe,Ji,ibe,rbe,obe],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0}),n})(),abe={snackBarState:_r("state",[wi("void, hidden",rn({transform:"scale(0.8)",opacity:0})),wi("visible",rn({transform:"scale(1)",opacity:1})),gi("* => visible",Ci("150ms cubic-bezier(0, 0, 0.2, 1)")),gi("* => void, * => hidden",Ci("75ms cubic-bezier(0.4, 0.0, 1, 1)",rn({opacity:0})))])},lbe=0,cbe=(()=>{class n extends Fu{constructor(e,i,r,o,s){super(),this._ngZone=e,this._elementRef=i,this._changeDetectorRef=r,this._platform=o,this.snackBarConfig=s,this._document=ai(Lt),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new Ie,this._onExit=new Ie,this._onEnter=new Ie,this._animationState="void",this._liveElementId="mat-snack-bar-container-live-"+lbe++,this.attachDomPortal=a=>{this._assertNotAttached();let l=this._portalOutlet.attachDomPortal(a);return this._afterPortalAttached(),l},this._live="assertive"!==s.politeness||s.announcementMessage?"off"===s.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),i}attachTemplatePortal(e){this._assertNotAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),i}onAnimationEnd(e){let{fromState:i,toState:r}=e;if(("void"===r&&"void"!==i||"hidden"===r)&&this._completeExit(),"visible"===r){let o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe(Yt(1)).subscribe(()=>{this._ngZone.run(()=>{this._onExit.next(),this._onExit.complete()})})}_afterPortalAttached(){let e=this._elementRef.nativeElement,i=this.snackBarConfig.panelClass;i&&(Array.isArray(i)?i.forEach(r=>e.classList.add(r)):e.classList.add(i)),this._exposeToModals()}_exposeToModals(){let e=this._liveElementId,i=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r<i.length;r++){let o=i[r],s=o.getAttribute("aria-owns");this._trackedModals.add(o),s?-1===s.indexOf(e)&&o.setAttribute("aria-owns",s+" "+e):o.setAttribute("aria-owns",e)}}_clearFromModals(){this._trackedModals.forEach(e=>{let i=e.getAttribute("aria-owns");if(i){let r=i.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),i=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&i){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),i.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return n.\u0275fac=function(e){return new(e||n)(C(at),C(Me),C($t),C(Gn),C(fg))},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&Ge(ps,7),2&e){let r;Se(r=Ee())&&(i._portalOutlet=r.first)}},features:[Ke]}),n})(),dbe=(()=>{class n extends cbe{_afterPortalAttached(){super._afterPortalAttached();let e=this._label.nativeElement,i="mdc-snackbar__label";e.classList.toggle(i,!e.querySelector(`.${i}`))}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=O({type:n,selectors:[["mat-snack-bar-container"]],viewQuery:function(e,i){if(1&e&&Ge(ebe,7),2&e){let r;Se(r=Ee())&&(i._label=r.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container","mdc-snackbar--open"],hostVars:1,hostBindings:function(e,i){1&e&&zM("@state.done",function(o){return i.onAnimationEnd(o)}),2&e&&GM("@state",i._animationState)},features:[Ke],decls:6,vars:3,consts:[[1,"mdc-snackbar__surface"],[1,"mat-mdc-snack-bar-label"],["label",""],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1,2)(3,"div",3),S(4,tbe,0,0,"ng-template",4),g(),P(5,"div"),g()()),2&e&&(v(5),Be("aria-live",i._live)("role",i._role)("id",i._liveElementId))},dependencies:[ps],styles:['.mdc-snackbar{display:none;position:fixed;right:0;bottom:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mdc-snackbar--opening,.mdc-snackbar--open,.mdc-snackbar--closing{display:flex}.mdc-snackbar--open .mdc-snackbar__label,.mdc-snackbar--open .mdc-snackbar__actions{visibility:visible}.mdc-snackbar__surface{padding-left:0;padding-right:8px;display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;transform:scale(0.8);opacity:0}.mdc-snackbar__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-snackbar__surface::before{border-color:CanvasText}}[dir=rtl] .mdc-snackbar__surface,.mdc-snackbar__surface[dir=rtl]{padding-left:8px;padding-right:0}.mdc-snackbar--open .mdc-snackbar__surface{transform:scale(1);opacity:1;pointer-events:auto}.mdc-snackbar--closing .mdc-snackbar__surface{transform:scale(1)}.mdc-snackbar__label{padding-left:16px;padding-right:8px;width:100%;flex-grow:1;box-sizing:border-box;margin:0;visibility:hidden;padding-top:14px;padding-bottom:14px}[dir=rtl] .mdc-snackbar__label,.mdc-snackbar__label[dir=rtl]{padding-left:8px;padding-right:16px}.mdc-snackbar__label::before{display:inline;content:attr(data-mdc-snackbar-label-text)}.mdc-snackbar__actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box;visibility:hidden}.mdc-snackbar__action+.mdc-snackbar__dismiss{margin-left:8px;margin-right:0}[dir=rtl] .mdc-snackbar__action+.mdc-snackbar__dismiss,.mdc-snackbar__action+.mdc-snackbar__dismiss[dir=rtl]{margin-left:0;margin-right:8px}.mat-mdc-snack-bar-container{margin:8px;position:static}.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:344px}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container .mdc-snackbar__surface{min-width:100%}}@media(max-width: 480px),(max-width: 344px){.mat-mdc-snack-bar-container{width:100vw}}.mat-mdc-snack-bar-container .mdc-snackbar__surface{max-width:672px}.mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12)}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss .mdc-button__icon{font-size:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__dismiss svg,.mat-mdc-snack-bar-container .mdc-snackbar__dismiss img{width:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px));height:var(--mdc-icon-button-icon-size, var(--mdc-snackbar-icon-size, 24px))}.mat-mdc-snack-bar-container .mdc-snackbar__surface{background-color:var(--mdc-snackbar-container-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__surface{border-radius:var(--mdc-snackbar-container-shape, var(--mdc-shape-small, 4px))}.mat-mdc-snack-bar-container .mdc-snackbar__label{color:var(--mdc-snackbar-supporting-text-color, inherit)}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-size:var(--mdc-snackbar-supporting-text-size, inherit);font-family:var(--mdc-snackbar-supporting-text-font, inherit);font-weight:var(--mdc-snackbar-supporting-text-weight, inherit);line-height:var(--mdc-snackbar-supporting-text-line-height, inherit)}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-mdc-snack-bar-button-color, transparent);--mat-mdc-button-persistent-ripple-color: currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{background-color:currentColor;opacity:.1}.mat-mdc-snack-bar-container .mdc-snackbar__label::before{display:none}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-handset .mdc-snackbar__surface{width:100%}'],encapsulation:2,data:{animation:[abe.snackBarState]}}),n})(),O2=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Co,Hl,Pe,ci,fn,fn]}),n})(),Q7=new ie("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new fg}}),pbe=(()=>{class n{get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(e,i,r,o,s,a){this._overlay=e,this._live=i,this._injector=r,this._breakpointObserver=o,this._parentSnackBar=s,this._defaultConfig=a,this._snackBarRefAtThisLevel=null}openFromComponent(e,i){return this._attach(e,i)}openFromTemplate(e,i){return this._attach(e,i)}open(e,i="",r){let o={...this._defaultConfig,...r};return o.data={message:e,action:i},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,i){let o=Mi.create({parent:i&&i.viewContainerRef&&i.viewContainerRef.injector||this._injector,providers:[{provide:fg,useValue:i}]}),s=new Vl(this.snackBarContainerComponent,i.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=i,a.instance}_attach(e,i){let r={...new fg,...this._defaultConfig,...i},o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new Cf(s,o);if(e instanceof Si){let l=new Yo(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(l)}else{let l=this._createInjector(r,a),c=new Vl(e,void 0,l),d=s.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe(ot(o.detachments())).subscribe(l=>{o.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,i){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),i.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),i.duration&&i.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(i.duration))}_createOverlay(e){let i=new Qa;i.direction=e.direction;let r=this._overlay.position().global(),o="rtl"===e.direction,s="left"===e.horizontalPosition||"start"===e.horizontalPosition&&!o||"end"===e.horizontalPosition&&o,a=!s&&"center"!==e.horizontalPosition;return s?r.left("0"):a?r.right("0"):r.centerHorizontally(),"top"===e.verticalPosition?r.top("0"):r.bottom("0"),i.positionStrategy=r,this._overlay.create(i)}_createInjector(e,i){return Mi.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:Cf,useValue:i},{provide:Y1,useValue:e.data}]})}}return n.\u0275fac=function(e){return new(e||n)(k(zi),k(Vv),k(Mi),k(Fv),k(n,12),k(Q7))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Z7=(()=>{class n extends pbe{constructor(e,i,r,o,s,a){super(e,i,r,o,s,a),this.simpleSnackBarComponent=sbe,this.snackBarContainerComponent=dbe,this.handsetCssClass="mat-mdc-snack-bar-handset"}}return n.\u0275fac=function(e){return new(e||n)(k(zi),k(Vv),k(Mi),k(Fv),k(n,12),k(Q7))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:O2}),n})(),fbe=/[\\^$.*+?()[\]{}|]/g,J7="\\u0000-\\u0020\\u007f-\\u009f",hbe=new RegExp("(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}:\\/\\/|data:|www\\.)[^\\s"+J7+'"]{2,}[^\\s'+J7+"\"')}\\],:;.!?]","gu");function e9(n){return function(n,t){t.flags.includes("g")||(t=new RegExp(t,t.flags+"g"));let e=[],i=0;for(let r of n.matchAll(t)){let o=r.index,s=r[0];o>i&&e.push({index:i,text:n.substring(i,o),matchesRegex:!1}),e.push({index:o,text:s,matchesRegex:!0}),i=o+s.length}return n.length>i&&e.push({index:i,text:n.substring(i,n.length),matchesRegex:!1}),e}(n,hbe).map(({matchesRegex:t,text:e})=>({isURL:t,text:e}))}function gbe(n,t){if(1&n&&(Ot(0),T(1),kt()),2&n){let e=w().$implicit;v(1),He(" ",e.text," ")}}function _be(n,t){if(1&n&&(h(0,"a",7),T(1),g()),2&n){let e=w().$implicit;Wi("href",e.text,ka),v(1),bt(e.text)}}function bbe(n,t){if(1&n&&(Ot(0),S(1,gbe,2,1,"ng-container",5),S(2,_be,2,2,"ng-template",null,6,Wt),kt()),2&n){let e=t.$implicit,i=it(3);v(1),_("ngIf",!e.isURL)("ngIfElse",i)}}function vbe(n,t){if(1&n){let e=ge();h(0,"button",8),I("click",function(){return X(e),Q(w().onActionButtonClicked())}),T(1),g()}if(2&n){let e=w();v(1),He(" ",e.alert.followupAction.localizedLabel," ")}}var t9=(()=>{class n{constructor(e,i,r){this.snackBarRef=e,this.unknownData=i,this.store=r,this.splitByURL=e9,this.alert=i}async onActionButtonClicked(){this.snackBarRef.dismiss();let e=await this.alert.followupAction.getFollowupAction();this.store.dispatch(e)}onCloseButtonClicked(){this.snackBarRef.dismiss()}}return n.\u0275fac=function(e){return new(e||n)(C(Cf),C(Y1),C(Ae))},n.\u0275cmp=O({type:n,selectors:[["alert-display-snackbar"]],decls:6,vars:2,consts:function(){let t;return t=$localize`:A button to close the snackbar message␟ea4d9fe61420a3fce81cf54c4c615e3c19c646a6␟1536087519743707362:Dismiss`,[[1,"message"],[4,"ngFor","ngForOf"],[1,"controls"],["mat-button","","class","followup-button",3,"click",4,"ngIf"],["mat-button","","aria-label",t,1,"dismiss-button",3,"click"],[4,"ngIf","ngIfElse"],["linkPiece",""],["rel","noreferrer noopener","target","_blank",3,"href"],["mat-button","",1,"followup-button",3,"click"]]},template:function(e,i){1&e&&(h(0,"div",0),S(1,bbe,4,2,"ng-container",1),g(),h(2,"div",2),S(3,vbe,2,1,"button",3),h(4,"button",4),I("click",function(){return i.onCloseButtonClicked()}),T(5," Dismiss "),g()()),2&e&&(v(1),_("ngForOf",i.splitByURL(i.alert.localizedMessage)),v(2),_("ngIf",i.alert.followupAction))},dependencies:[nn,Fe,Ji],styles:["[_nghost-%COMP%]{display:flex;flex-wrap:wrap}.message[_ngcontent-%COMP%]{font-size:14px;align-self:center;margin:5px 0;word-break:break-word}.message[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{color:inherit}.controls[_ngcontent-%COMP%]{white-space:nowrap;margin-left:auto}button.mat-mdc-button[_ngcontent-%COMP%]{color:inherit;text-transform:uppercase}"],changeDetection:0}),n})(),n9=(()=>{class n{constructor(e,i){this.store=e,this.snackBar=i,this.ngUnsubscribe=new Ie}ngOnInit(){this.store.select(j6).pipe(ot(this.ngUnsubscribe),ke(e=>Boolean(e))).subscribe(e=>{this.showAlert(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}showAlert(e){this.snackBar.openFromComponent(t9,{duration:5e3,horizontalPosition:"start",verticalPosition:"bottom",data:e})}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Z7))},n.\u0275cmp=O({type:n,selectors:[["alert-snackbar"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),X1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,ci,O2]}),n})(),Q1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Sc,X1,Tr.forFeature("alerts",i7),to.forFeature([n7])]}),n})();function xbe(n,t){}var Mf=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}},F2=(()=>{class n extends Fu{constructor(e,i,r,o,s,a,l,c){super(),this._elementRef=e,this._focusTrapFactory=i,this._config=o,this._interactivityChecker=s,this._ngZone=a,this._overlayRef=l,this._focusMonitor=c,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this.attachDomPortal=d=>{this._portalOutlet.hasAttached();let u=this._portalOutlet.attachDomPortal(d);return this._contentAttached(),u},this._ariaLabelledBy=this._config.ariaLabelledBy||null,this._document=r}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),i}attachTemplatePortal(e){this._portalOutlet.hasAttached();let i=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),i}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,i){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(i)}_focusByCssSelector(e,i){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,i)}_trapFocus(){let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap.focusInitialElementWhenReady().then(i=>{i||this._focusDialogContainer()});break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus)}}_restoreFocus(){let e=this._config.restoreFocus,i=null;if("string"==typeof e?i=this._document.querySelector(e):"boolean"==typeof e?i=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(i=e),this._config.restoreFocus&&i&&"function"==typeof i.focus){let r=Ov(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(i,this._closeInteractionType),this._closeInteractionType=null):i.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,i=Ov();return e===i||e.contains(i)}_initializeFocusTrap(){this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Ov())}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Nv),C(Lt,8),C(Mf),C(ag),C(at),C(Oc),C(Xr))},n.\u0275cmp=O({type:n,selectors:[["cdk-dialog-container"]],viewQuery:function(e,i){if(1&e&&Ge(ps,7),2&e){let r;Se(r=Ee())&&(i._portalOutlet=r.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(e,i){2&e&&Be("id",i._config.id||null)("role",i._config.role)("aria-modal",i._config.ariaModal)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null)},features:[Ke],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(e,i){1&e&&S(0,xbe,0,0,"ng-template",0)},dependencies:[ps],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2}),n})(),Yv=class{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new Ie,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(i=>{27===i.keyCode&&!this.disableClose&&!vr(i)&&(i.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{!1!==e.closeOnOverlayDetachments&&this.close()})}close(t,e){if(this.containerInstance){let i=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),i.next(t),i.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},i9=new ie("DialogScrollStrategy"),Cbe=new ie("DialogData"),Mbe=new ie("DefaultDialogConfig"),Sbe={provide:i9,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.block()}},Ebe=0,N2=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(e,i,r,o,s,a){this._overlay=e,this._injector=i,this._defaultOptions=r,this._parentDialog=o,this._overlayContainer=s,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ie,this._afterOpenedAtThisLevel=new Ie,this._ariaHiddenElements=new Map,this.afterAllClosed=ta(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(qn(void 0))),this._scrollStrategy=a}open(e,i){(i={...this._defaultOptions||new Mf,...i}).id=i.id||"cdk-dialog-"+Ebe++,i.id&&this.getDialogById(i.id);let o=this._getOverlayConfig(i),s=this._overlay.create(o),a=new Yv(s,i),l=this._attachContainer(s,a,i);return a.containerInstance=l,this._attachDialogContent(e,a,l,i),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){k2(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){k2(this._openDialogsAtThisLevel,e=>{!1===e.config.closeOnDestroy&&this._removeOpenDialog(e,!1)}),k2(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let i=new Qa({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(i.backdropClass=e.backdropClass),i}_attachContainer(e,i,r){let a,o=r.injector||r.viewContainerRef?.injector,s=[{provide:Mf,useValue:r},{provide:Yv,useValue:i},{provide:Oc,useValue:e}];r.container?"function"==typeof r.container?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=F2;let l=new Vl(a,r.viewContainerRef,Mi.create({parent:o||this._injector,providers:s}),r.componentFactoryResolver);return e.attach(l).instance}_attachDialogContent(e,i,r,o){if(e instanceof Si){let s=this._createInjector(o,i,r,void 0),a={$implicit:o.data,dialogRef:i};o.templateContext&&(a={...a,..."function"==typeof o.templateContext?o.templateContext():o.templateContext}),r.attachTemplatePortal(new Yo(e,null,a,s))}else{let s=this._createInjector(o,i,r,this._injector),a=r.attachComponentPortal(new Vl(e,o.viewContainerRef,s,o.componentFactoryResolver));i.componentInstance=a.instance}}_createInjector(e,i,r,o){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:Cbe,useValue:e.data},{provide:Yv,useValue:i}];return e.providers&&("function"==typeof e.providers?a.push(...e.providers(i,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(Xi,null,{optional:!0}))&&a.push({provide:Xi,useValue:{value:e.direction,change:Ht()}}),Mi.create({parent:s||o,providers:a})}_removeOpenDialog(e,i){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),i&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let i=e.parentElement.children;for(let r=i.length-1;r>-1;r--){let o=i[r];o!==e&&"SCRIPT"!==o.nodeName&&"STYLE"!==o.nodeName&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}}return n.\u0275fac=function(e){return new(e||n)(k(zi),k(Mi),k(Mbe,8),k(n,12),k(pg),k(i9))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})();function k2(n,t){let e=n.length;for(;e--;)t(n[e])}var r9=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[N2,Sbe],imports:[Co,Hl,lg,Hl]}),n})();function Tbe(n,t){}var mg=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.maxWidth="80vw",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},L2="mdc-dialog--open",o9="mdc-dialog--opening",s9="mdc-dialog--closing",Abe=(()=>{class n extends F2{constructor(e,i,r,o,s,a,l,c){super(e,i,r,o,s,a,l,c),this._animationStateChanged=new F}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Nv),C(Lt,8),C(mg),C(ag),C(at),C(Oc),C(Xr))},n.\u0275cmp=O({type:n,selectors:[["ng-component"]],features:[Ke],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),a9="--mat-dialog-transition-duration";function l9(n){return null==n?null:"number"==typeof n?n:n.endsWith("ms")?_i(n.substring(0,n.length-2)):n.endsWith("s")?1e3*_i(n.substring(0,n.length-1)):"0"===n?0:null}var Rbe=(()=>{class n extends Abe{constructor(e,i,r,o,s,a,l,c,d){super(e,i,r,o,s,a,l,d),this._animationMode=c,this._animationsEnabled="NoopAnimations"!==this._animationMode,this._hostElement=this._elementRef.nativeElement,this._openAnimationDuration=this._animationsEnabled?l9(this._config.enterAnimationDuration)??150:0,this._closeAnimationDuration=this._animationsEnabled?l9(this._config.exitAnimationDuration)??75:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._openAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._closeAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}ngOnDestroy(){super.ngOnDestroy(),null!==this._animationTimer&&clearTimeout(this._animationTimer)}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._openAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(a9,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(o9,L2)),this._waitForAnimationToComplete(this._openAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(L2),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._closeAnimationDuration}),this._hostElement.classList.remove(L2),this._animationsEnabled?(this._hostElement.style.setProperty(a9,`${this._openAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(s9)),this._waitForAnimationToComplete(this._closeAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_clearAnimationClasses(){this._hostElement.classList.remove(o9,s9)}_waitForAnimationToComplete(e,i){null!==this._animationTimer&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(i,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{"function"==typeof requestAnimationFrame?requestAnimationFrame(e):e()})}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Nv),C(Lt,8),C(mg),C(ag),C(at),C(Oc),C(hi,8),C(Xr))},n.\u0275cmp=O({type:n,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:8,hostBindings:function(e,i){2&e&&(jo("id",i._config.id),Be("aria-modal",i._config.ariaModal)("role",i._config.role)("aria-labelledby",i._config.ariaLabel?null:i._ariaLabelledBy)("aria-label",i._config.ariaLabel)("aria-describedby",i._config.ariaDescribedBy||null),nt("_mat-animation-noopable",!i._animationsEnabled))},features:[Ke],decls:3,vars:0,consts:[[1,"mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1),S(2,Tbe,0,0,"ng-template",2),g()())},dependencies:[ps],styles:['.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:var(--mdc-elevation-overlay-opacity, 0);transition:opacity 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-dialog,.mdc-dialog__scrim{position:fixed;top:0;left:0;align-items:center;justify-content:center;box-sizing:border-box;width:100%;height:100%}.mdc-dialog{display:none;z-index:var(--mdc-dialog-z-index, 7)}.mdc-dialog .mdc-dialog__content{padding:20px 24px 20px 24px}.mdc-dialog .mdc-dialog__surface{min-width:280px}@media(max-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:calc(100vw - 32px)}}@media(min-width: 592px){.mdc-dialog .mdc-dialog__surface{max-width:560px}}.mdc-dialog .mdc-dialog__surface{max-height:calc(100% - 32px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-width:none}@media(max-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px;width:560px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 112px)}}@media(max-width: 720px)and (min-width: 672px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:560px}}@media(max-width: 720px)and (max-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:calc(100vh - 160px)}}@media(max-width: 720px)and (min-height: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{max-height:560px}}@media(max-width: 720px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}@media(max-width: 720px)and (max-height: 400px),(max-width: 600px),(min-width: 720px)and (max-height: 400px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{height:100%;max-height:100vh;max-width:100vw;width:100vw;border-radius:0}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{order:-1;left:-12px}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__header{padding:0 16px 9px;justify-content:flex-start}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__title{margin-left:calc(16px - 2 * 12px)}}@media(min-width: 960px){.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface{width:calc(100vw - 400px)}.mdc-dialog.mdc-dialog--fullscreen .mdc-dialog__surface .mdc-dialog__close{right:-12px}}.mdc-dialog.mdc-dialog__scrim--hidden .mdc-dialog__scrim{opacity:0}.mdc-dialog__scrim{opacity:0;z-index:-1}.mdc-dialog__container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;transform:scale(0.8);opacity:0;pointer-events:none}.mdc-dialog__surface{position:relative;display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;max-width:100%;max-height:100%;pointer-events:auto;overflow-y:auto}.mdc-dialog__surface .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}[dir=rtl] .mdc-dialog__surface,.mdc-dialog__surface[dir=rtl]{text-align:right}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-dialog__surface{outline:2px solid windowText}}.mdc-dialog__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-dialog__surface::before{border-color:CanvasText}}@media screen and (-ms-high-contrast: active),screen and (-ms-high-contrast: none){.mdc-dialog__surface::before{content:none}}.mdc-dialog__title{display:block;margin-top:0;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:0 24px 9px}.mdc-dialog__title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mdc-dialog__title,.mdc-dialog__title[dir=rtl]{text-align:right}.mdc-dialog--scrollable .mdc-dialog__title{margin-bottom:1px;padding-bottom:15px}.mdc-dialog--fullscreen .mdc-dialog__header{align-items:baseline;border-bottom:1px solid rgba(0,0,0,0);display:inline-flex;justify-content:space-between;padding:0 24px 9px;z-index:1}@media screen and (forced-colors: active){.mdc-dialog--fullscreen .mdc-dialog__header{border-bottom-color:CanvasText}}.mdc-dialog--fullscreen .mdc-dialog__header .mdc-dialog__close{right:-12px}.mdc-dialog--fullscreen .mdc-dialog__title{margin-bottom:0;padding:0;border-bottom:0}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__title{border-bottom:0;margin-bottom:0}.mdc-dialog--fullscreen .mdc-dialog__close{top:5px}.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog--fullscreen.mdc-dialog--scrollable .mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--fullscreen--titleless .mdc-dialog__close{margin-top:4px}.mdc-dialog--fullscreen--titleless.mdc-dialog--scrollable .mdc-dialog__close{margin-top:0}.mdc-dialog__content{flex-grow:1;box-sizing:border-box;margin:0;overflow:auto}.mdc-dialog__content>:first-child{margin-top:0}.mdc-dialog__content>:last-child{margin-bottom:0}.mdc-dialog__title+.mdc-dialog__content,.mdc-dialog__header+.mdc-dialog__content{padding-top:0}.mdc-dialog--scrollable .mdc-dialog__title+.mdc-dialog__content{padding-top:8px;padding-bottom:8px}.mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:6px 0 0}.mdc-dialog--scrollable .mdc-dialog__content .mdc-deprecated-list:first-child:last-child{padding:0}.mdc-dialog__actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0)}@media screen and (forced-colors: active){.mdc-dialog__actions{border-top-color:CanvasText}}.mdc-dialog--stacked .mdc-dialog__actions{flex-direction:column;align-items:flex-end}.mdc-dialog__button{margin-left:8px;margin-right:0;max-width:100%;text-align:right}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{margin-left:0;margin-right:8px}.mdc-dialog__button:first-child{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button:first-child,.mdc-dialog__button:first-child[dir=rtl]{margin-left:0;margin-right:0}[dir=rtl] .mdc-dialog__button,.mdc-dialog__button[dir=rtl]{text-align:left}.mdc-dialog--stacked .mdc-dialog__button:not(:first-child){margin-top:12px}.mdc-dialog--open,.mdc-dialog--opening,.mdc-dialog--closing{display:flex}.mdc-dialog--opening .mdc-dialog__scrim{transition:opacity 150ms linear}.mdc-dialog--opening .mdc-dialog__container{transition:opacity 75ms linear,transform 150ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-dialog--closing .mdc-dialog__scrim,.mdc-dialog--closing .mdc-dialog__container{transition:opacity 75ms linear}.mdc-dialog--closing .mdc-dialog__container{transform:none}.mdc-dialog--open .mdc-dialog__scrim{opacity:1}.mdc-dialog--open .mdc-dialog__container{transform:none;opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim{opacity:1}.mdc-dialog--open.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{transition:opacity 75ms linear}.mdc-dialog--open.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim{transition:opacity 150ms linear}.mdc-dialog__surface-scrim{display:none;opacity:0;position:absolute;width:100%;height:100%;z-index:1}.mdc-dialog__surface-scrim--shown .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--showing .mdc-dialog__surface-scrim,.mdc-dialog__surface-scrim--hiding .mdc-dialog__surface-scrim{display:block}.mdc-dialog-scroll-lock{overflow:hidden}.mdc-dialog--no-content-padding .mdc-dialog__content{padding:0}.mdc-dialog--sheet .mdc-dialog__close{right:12px;top:9px;position:absolute;z-index:1}.mdc-dialog__scrim--removed{pointer-events:none}.mdc-dialog__scrim--removed .mdc-dialog__scrim,.mdc-dialog__scrim--removed .mdc-dialog__surface-scrim{display:none}.mat-mdc-dialog-content{max-height:65vh}.mat-mdc-dialog-container{position:static;display:block}.mat-mdc-dialog-container,.mat-mdc-dialog-container .mdc-dialog__container,.mat-mdc-dialog-container .mdc-dialog__surface{max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mat-mdc-dialog-container .mdc-dialog__surface{display:block;width:100%;height:100%}.mat-mdc-dialog-container{outline:0}.mat-mdc-dialog-container .mdc-dialog__surface{background-color:var(--mdc-dialog-container-color, white)}.mat-mdc-dialog-container .mdc-dialog__surface{box-shadow:var(--mdc-dialog-container-elevation, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12))}.mat-mdc-dialog-container .mdc-dialog__surface{border-radius:var(--mdc-dialog-container-shape, var(--mdc-shape-medium, 4px))}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title,.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__actions,.mat-mdc-dialog-container.mdc-dialog--scrollable.mdc-dialog-scroll-divider-footer .mdc-dialog__actions{border-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container.mdc-dialog--scrollable .mdc-dialog__title{border-bottom-color:var(--mdc-dialog-with-divider-divider-color, black)}.mat-mdc-dialog-container .mdc-dialog__title{font-family:var(--mdc-dialog-subhead-font, "Arial");line-height:var(--mdc-dialog-subhead-line-height, 14px);font-size:var(--mdc-dialog-subhead-size, 14px);font-weight:var(--mdc-dialog-subhead-weight, 500);letter-spacing:var(--mdc-dialog-subhead-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__title{color:var(--mdc-dialog-subhead-color, black)}.mat-mdc-dialog-container .mdc-dialog__content{font-family:var(--mdc-dialog-supporting-text-font, "Arial");line-height:var(--mdc-dialog-supporting-text-line-height, 14px);font-size:var(--mdc-dialog-supporting-text-size, 14px);font-weight:var(--mdc-dialog-supporting-text-weight, 500);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 1px)}.mat-mdc-dialog-container .mdc-dialog__content{color:var(--mdc-dialog-supporting-text-color, black)}.mat-mdc-dialog-container .mdc-dialog__container{transition-duration:var(--mat-dialog-transition-duration, 0ms)}.mat-mdc-dialog-container._mat-animation-noopable .mdc-dialog__container{transition:none}.mat-mdc-dialog-content{display:block}.mat-mdc-dialog-actions{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}'],encapsulation:2}),n})(),Ed=class{constructor(t,e,i){this._ref=t,this._containerInstance=i,this._afterOpened=new Ie,this._beforeClosed=new Ie,this._state=0,this.disableClose=e.disableClose,this.id=t.id,i._animationStateChanged.pipe(ke(r=>"opened"===r.state),Yt(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),i._animationStateChanged.pipe(ke(r=>"closed"===r.state),Yt(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),tn(this.backdropClick(),this.keydownEvents().pipe(ke(r=>27===r.keyCode&&!this.disableClose&&!vr(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),d9(this,"keydown"===r.type?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(ke(e=>"closing"===e.state),Yt(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=1,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=2,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function d9(n,t,e){return n._closeInteractionType=t,n.close(e)}var Xv=new ie("MatMdcDialogData"),Pbe=new ie("mat-mdc-dialog-default-options"),u9=new ie("mat-mdc-dialog-scroll-strategy"),kbe={provide:u9,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.block()}},Fbe=0,Nbe=(()=>{class n{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(e,i,r,o,s,a,l,c,d,u){this._overlay=e,this._defaultOptions=r,this._parentDialog=o,this._dialogRefConstructor=l,this._dialogContainerType=c,this._dialogDataToken=d,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new Ie,this._afterOpenedAtThisLevel=new Ie,this._idPrefix="mat-dialog-",this.dialogConfigClass=mg,this.afterAllClosed=ta(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(qn(void 0))),this._scrollStrategy=a,this._dialog=i.get(N2)}open(e,i){let r;(i={...this._defaultOptions||new mg,...i}).id=i.id||`${this._idPrefix}${Fbe++}`,i.scrollStrategy=i.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,{...i,positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:i},{provide:Mf,useValue:i}]},templateContext:()=>({dialogRef:r}),providers:(s,a,l)=>(r=new this._dialogRefConstructor(s,i,l),r.updatePosition(i?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])});return r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(i=>i.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let i=e.length;for(;i--;)e[i].close()}}return n.\u0275fac=function(e){Is()},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),zl=(()=>{class n extends Nbe{constructor(e,i,r,o,s,a,l,c){super(e,i,o,a,l,s,Ed,Rbe,Xv,c),this._idPrefix="mat-mdc-dialog-"}}return n.\u0275fac=function(e){return new(e||n)(k(zi),k(Mi),k(wb,8),k(Pbe,8),k(u9),k(n,12),k(pg),k(hi,8))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Lbe=0,Z1=(()=>{class n{constructor(e,i,r){this.dialogRef=e,this._elementRef=i,this._dialog=r,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=f9(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let i=e._matDialogClose||e._matDialogCloseResult;i&&(this.dialogResult=i.currentValue)}_onButtonClick(e){d9(this.dialogRef,0===e.screenX&&0===e.screenY?"keyboard":"mouse",this.dialogResult)}}return n.\u0275fac=function(e){return new(e||n)(C(Ed,8),C(Me),C(zl))},n.\u0275dir=we({type:n,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(e,i){1&e&&I("click",function(o){return i._onButtonClick(o)}),2&e&&Be("aria-label",i.ariaLabel||null)("type",i.type)},inputs:{ariaLabel:["aria-label","ariaLabel"],type:"type",dialogResult:["mat-dialog-close","dialogResult"],_matDialogClose:["matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],features:[Gt]}),n})(),p9=(()=>{class n{constructor(e,i,r){this._dialogRef=e,this._elementRef=i,this._dialog=r,this.id="mat-mdc-dialog-title-"+Lbe++}ngOnInit(){this._dialogRef||(this._dialogRef=f9(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{let e=this._dialogRef._containerInstance;e&&!e._ariaLabelledBy&&(e._ariaLabelledBy=this.id)})}}return n.\u0275fac=function(e){return new(e||n)(C(Ed,8),C(Me),C(zl))},n.\u0275dir=we({type:n,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(e,i){2&e&&jo("id",i.id)},inputs:{id:"id"},exportAs:["matDialogTitle"]}),n})(),K1=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"]}),n})(),J1=(()=>{class n{constructor(){this.align="start"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-mdc-dialog-actions-align-center","center"===i.align)("mat-mdc-dialog-actions-align-end","end"===i.align)},inputs:{align:"align"}}),n})();function f9(n,t){let e=n.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(i=>i.id===e.id):null}var hg=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[zl,kbe],imports:[r9,Co,Hl,fn,fn]}),n})(),c9={params:{enterAnimationDuration:"150ms",exitAnimationDuration:"75ms"}},Bbe=(_r("dialogContainer",[wi("void, exit",rn({opacity:0,transform:"scale(0.7)"})),wi("enter",rn({transform:"none"})),gi("* => enter",Ob([Ci("{{enterAnimationDuration}} cubic-bezier(0, 0, 0.2, 1)",rn({transform:"none",opacity:1})),Jp("@*",Kp(),{optional:!0})]),c9),gi("* => void, * => exit",Ob([Ci("{{exitAnimationDuration}} cubic-bezier(0.4, 0.0, 0.2, 1)",rn({opacity:0})),Jp("@*",Kp(),{optional:!0})]),c9)]),["matFormFieldNotchedOutline",""]),Vbe=["*"],Hbe=["textField"],zbe=["iconPrefixContainer"],Ube=["textPrefixContainer"];function jbe(n,t){1&n&&P(0,"span",19)}function Gbe(n,t){if(1&n){let e=ge();h(0,"label",17),I("cdkObserveContent",function(){return X(e),Q(w(2)._refreshOutlineNotchWidth())}),zt(1,1),S(2,jbe,1,0,"span",18),g()}if(2&n){let e=w(2);_("floating",e._shouldLabelFloat())("cdkObserveContentDisabled",!e._hasOutline())("id",e._labelId),Be("for",e._control.id)("aria-owns",e._control.id),v(2),_("ngIf",!e.hideRequiredMarker&&e._control.required)}}function Wbe(n,t){1&n&&S(0,Gbe,3,6,"label",16),2&n&&_("ngIf",w()._hasFloatingLabel())}function qbe(n,t){1&n&&P(0,"div",20)}function Ybe(n,t){}function Xbe(n,t){1&n&&S(0,Ybe,0,0,"ng-template",22),2&n&&(w(2),_("ngTemplateOutlet",it(1)))}function Qbe(n,t){if(1&n&&(h(0,"div",21),S(1,Xbe,1,1,"ng-template",9),g()),2&n){let e=w();_("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat())("matFormFieldNotchedOutlineLabelWidth",e._labelWidth),v(1),_("ngIf",!e._forceDisplayInfixLabel())}}function Zbe(n,t){1&n&&(h(0,"div",23,24),zt(2,2),g())}function Kbe(n,t){1&n&&(h(0,"div",25,26),zt(2,3),g())}function Jbe(n,t){}function $be(n,t){1&n&&S(0,Jbe,0,0,"ng-template",22),2&n&&(w(),_("ngTemplateOutlet",it(1)))}function eve(n,t){1&n&&(h(0,"div",27),zt(1,4),g())}function tve(n,t){1&n&&(h(0,"div",28),zt(1,5),g())}function nve(n,t){1&n&&P(0,"div",29)}function ive(n,t){1&n&&(h(0,"div",30),zt(1,6),g()),2&n&&_("@transitionMessages",w()._subscriptAnimationState)}function rve(n,t){if(1&n&&(h(0,"mat-hint",34),T(1),g()),2&n){let e=w(2);_("id",e._hintLabelId),v(1),bt(e.hintLabel)}}function ove(n,t){if(1&n&&(h(0,"div",31),S(1,rve,2,2,"mat-hint",32),zt(2,7),P(3,"div",33),zt(4,8),g()),2&n){let e=w();_("@transitionMessages",e._subscriptAnimationState),v(1),_("ngIf",e.hintLabel)}}var sve=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],ave=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"],kc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["mat-label"]]}),n})(),lve=0,C9=new ie("MatError"),M9=(()=>{class n{constructor(e,i){this.id="mat-mdc-error-"+lve++,e||i.nativeElement.setAttribute("aria-live","polite")}}return n.\u0275fac=function(e){return new(e||n)(yo("aria-live"),C(Me))},n.\u0275dir=we({type:n,selectors:[["mat-error"],["","matError",""]],hostAttrs:["aria-atomic","true",1,"mat-mdc-form-field-error","mat-mdc-form-field-bottom-align"],hostVars:1,hostBindings:function(e,i){2&e&&jo("id",i.id)},inputs:{id:"id"},features:[Qt([{provide:C9,useExisting:n}])]}),n})(),cve=0,m9=(()=>{class n{constructor(){this.align="start",this.id="mat-mdc-hint-"+cve++}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(e,i){2&e&&(jo("id",i.id),Be("align",null),nt("mat-mdc-form-field-hint-end","end"===i.align))},inputs:{align:"align",id:"id"}}),n})(),w9=new ie("MatPrefix"),S9=(()=>{class n{constructor(){this._isText=!1}set _isTextSelector(e){this._isText=!0}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:["matTextPrefix","_isTextSelector"]},features:[Qt([{provide:w9,useExisting:n}])]}),n})(),dve=new ie("MatSuffix"),h9=(()=>{class n{constructor(e){this._elementRef=e,this.floating=!1}getWidth(){return function(n){if(null!==n.offsetParent)return n.scrollWidth;let e=n.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let i=e.scrollWidth;return e.remove(),i}(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275dir=we({type:n,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mdc-floating-label--float-above",i.floating)},inputs:{floating:"floating"}}),n})(),g9="mdc-line-ripple--active",$1="mdc-line-ripple--deactivating",_9=(()=>{class n{constructor(e,i){this._elementRef=e,this._handleTransitionEnd=r=>{let o=this._elementRef.nativeElement.classList,s=o.contains($1);"opacity"===r.propertyName&&s&&o.remove(g9,$1)},i.runOutsideAngular(()=>{e.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove($1),e.add(g9)}deactivate(){this._elementRef.nativeElement.classList.add($1)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(at))},n.\u0275dir=we({type:n,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]}),n})(),b9=(()=>{class n{constructor(e,i){this._elementRef=e,this._ngZone=i,this.labelWidth=0,this.open=!1}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),"function"==typeof requestAnimationFrame&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_getNotchWidth(){return this.open?this.labelWidth>0?`calc(${this.labelWidth}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`:"0px":null}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(at))},n.\u0275cmp=O({type:n,selectors:[["div","matFormFieldNotchedOutline",""]],hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(e,i){2&e&&nt("mdc-notched-outline--notched",i.open)},inputs:{labelWidth:["matFormFieldNotchedOutlineLabelWidth","labelWidth"],open:["matFormFieldNotchedOutlineOpen","open"]},attrs:Bbe,ngContentSelectors:Vbe,decls:4,vars:2,consts:[[1,"mdc-notched-outline__leading"],[1,"mdc-notched-outline__notch"],[1,"mdc-notched-outline__trailing"]],template:function(e,i){1&e&&(Dn(),P(0,"div",0),h(1,"div",1),zt(2),g(),P(3,"div",2)),2&e&&(v(1),Tt("width",i._getNotchWidth()))},encapsulation:2,changeDetection:0}),n})(),pve={transitionMessages:_r("transitionMessages",[wi("enter",rn({opacity:1,transform:"translateY(0%)"})),gi("void => enter",[rn({opacity:0,transform:"translateY(-5px)"}),Ci("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},Qv=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n}),n})(),Sf=new ie("MatFormField"),fve=new ie("MAT_FORM_FIELD_DEFAULT_OPTIONS"),v9=0,Ka=(()=>{class n{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Rt(e)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||"auto"}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(e){let i=this._appearance;this._appearance=e||this._defaults?.appearance||"fill","outline"===this._appearance&&this._appearance!==i&&(this._refreshOutlineNotchWidth(),this._needsOutlineLabelOffsetUpdateOnStable=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||"fixed"}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||"fixed"}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}constructor(e,i,r,o,s,a,l,c){this._elementRef=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=o,this._platform=s,this._defaults=a,this._animationMode=l,this._document=c,this._hideRequiredMarker=!1,this.color="primary",this._appearance="fill",this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId="mat-mdc-form-field-label-"+v9++,this._hintLabelId="mat-mdc-hint-"+v9++,this._subscriptAnimationState="",this._labelWidth=0,this._destroyed=new Ie,this._isFocused=null,this._needsOutlineLabelOffsetUpdateOnStable=!1,a&&(a.appearance&&(this.appearance=a.appearance),this._hideRequiredMarker=Boolean(a?.hideRequiredMarker),a.color&&(this.color=a.color))}ngAfterViewInit(){this._updateFocusState(),this._refreshOutlineNotchWidth(),this._document?.fonts?.ready?this._document.fonts.ready.then(()=>{this._refreshOutlineNotchWidth(),this._changeDetectorRef.markForCheck()}):setTimeout(()=>this._refreshOutlineNotchWidth(),100),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getLabelId(){return this._hasFloatingLabel()?this._labelId:null}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){let e=this._control;e.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${e.controlType}`),e.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),e.ngControl&&e.ngControl.valueChanges&&e.ngControl.valueChanges.pipe(ot(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),tn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||null===this._isFocused)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.pipe(ot(this._destroyed)).subscribe(()=>{this._needsOutlineLabelOffsetUpdateOnStable&&(this._needsOutlineLabelOffsetUpdateOnStable=!1,this._updateOutlineLabelOffset())})}),this._dir.change.pipe(ot(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdateOnStable=!0)}_shouldAlwaysFloat(){return"always"===this.floatLabel}_hasOutline(){return"outline"===this.appearance}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel(){return!!this._labelChildNonStatic||!!this._labelChildStatic}_shouldLabelFloat(){return this._control.shouldLabelFloat||this._shouldAlwaysFloat()}_shouldForward(e){let i=this._control?this._control.ngControl:null;return i&&i[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||(this._labelWidth=this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&"string"==typeof this._control.userAriaDescribedBy&&e.push(...this._control.userAriaDescribedBy.split(" ")),"hint"===this._getDisplayedMessages()){let i=this._hintChildren?this._hintChildren.find(o=>"start"===o.align):null,r=this._hintChildren?this._hintChildren.find(o=>"end"===o.align):null;i?e.push(i.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(i=>i.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._platform.isBrowser||!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return void(e.style.transform="");if(!this._isAttachedToDom())return void(this._needsOutlineLabelOffsetUpdateOnStable=!0);let i=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=i?.getBoundingClientRect().width??0,s=r?.getBoundingClientRect().width??0;e.style.transform=`var(\n        --mat-mdc-form-field-label-transform,\n        translateY(-50%) translateX(calc(${"rtl"===this._dir.value?"-1":"1"} * (${o+s}px + var(--mat-mdc-form-field-label-offset-x, 0px))))\n    )`}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let i=e.getRootNode();return i&&i!==e}return document.documentElement.contains(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(at),C(Xi),C(Gn),C(fve,8),C(hi,8),C(Lt))},n.\u0275cmp=O({type:n,selectors:[["mat-form-field"]],contentQueries:function(e,i,r){if(1&e&&(Ti(r,kc,5),Ti(r,kc,7),Ti(r,Qv,5),Ti(r,w9,5),Ti(r,dve,5),Ti(r,C9,5),Ti(r,m9,5)),2&e){let o;Se(o=Ee())&&(i._labelChildNonStatic=o.first),Se(o=Ee())&&(i._labelChildStatic=o.first),Se(o=Ee())&&(i._formFieldControl=o.first),Se(o=Ee())&&(i._prefixChildren=o),Se(o=Ee())&&(i._suffixChildren=o),Se(o=Ee())&&(i._errorChildren=o),Se(o=Ee())&&(i._hintChildren=o)}},viewQuery:function(e,i){if(1&e&&(Ge(Hbe,5),Ge(zbe,5),Ge(Ube,5),Ge(h9,5),Ge(b9,5),Ge(_9,5)),2&e){let r;Se(r=Ee())&&(i._textField=r.first),Se(r=Ee())&&(i._iconPrefixContainer=r.first),Se(r=Ee())&&(i._textPrefixContainer=r.first),Se(r=Ee())&&(i._floatingLabel=r.first),Se(r=Ee())&&(i._notchedOutline=r.first),Se(r=Ee())&&(i._lineRipple=r.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(e,i){2&e&&nt("mat-mdc-form-field-label-always-float",i._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",i._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",i._hasIconSuffix)("mat-form-field-invalid",i._control.errorState)("mat-form-field-disabled",i._control.disabled)("mat-form-field-autofilled",i._control.autofilled)("mat-form-field-no-animations","NoopAnimations"===i._animationMode)("mat-form-field-appearance-fill","fill"==i.appearance)("mat-form-field-appearance-outline","outline"==i.appearance)("mat-form-field-hide-placeholder",i._hasFloatingLabel()&&!i._shouldLabelFloat())("mat-focused",i._control.focused)("mat-primary","accent"!==i.color&&"warn"!==i.color)("mat-accent","accent"===i.color)("mat-warn","warn"===i.color)("ng-untouched",i._shouldForward("untouched"))("ng-touched",i._shouldForward("touched"))("ng-pristine",i._shouldForward("pristine"))("ng-dirty",i._shouldForward("dirty"))("ng-valid",i._shouldForward("valid"))("ng-invalid",i._shouldForward("invalid"))("ng-pending",i._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[Qt([{provide:Sf,useExisting:n}])],ngContentSelectors:ave,decls:18,vars:23,consts:[["labelTemplate",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],["textField",""],["class","mat-mdc-form-field-focus-overlay",4,"ngIf"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth",4,"ngIf"],["class","mat-mdc-form-field-icon-prefix",4,"ngIf"],["class","mat-mdc-form-field-text-prefix",4,"ngIf"],[1,"mat-mdc-form-field-infix"],[3,"ngIf"],["class","mat-mdc-form-field-text-suffix",4,"ngIf"],["class","mat-mdc-form-field-icon-suffix",4,"ngIf"],["matFormFieldLineRipple","",4,"ngIf"],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align",3,"ngSwitch"],["class","mat-mdc-form-field-error-wrapper",4,"ngSwitchCase"],["class","mat-mdc-form-field-hint-wrapper",4,"ngSwitchCase"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent",4,"ngIf"],["matFormFieldFloatingLabel","",3,"floating","cdkObserveContentDisabled","id","cdkObserveContent"],["aria-hidden","true","class","mat-mdc-form-field-required-marker mdc-floating-label--required",4,"ngIf"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[1,"mat-mdc-form-field-focus-overlay"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen","matFormFieldNotchedOutlineLabelWidth"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-icon-prefix"],["iconPrefixContainer",""],[1,"mat-mdc-form-field-text-prefix"],["textPrefixContainer",""],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],[3,"id",4,"ngIf"],[1,"mat-mdc-form-field-hint-spacer"],[3,"id"]],template:function(e,i){1&e&&(Dn(sve),S(0,Wbe,1,1,"ng-template",null,0,Wt),h(2,"div",1,2),I("click",function(o){return i._control.onContainerClick&&i._control.onContainerClick(o)}),S(4,qbe,1,0,"div",3),h(5,"div",4),S(6,Qbe,2,3,"div",5),S(7,Zbe,3,0,"div",6),S(8,Kbe,3,0,"div",7),h(9,"div",8),S(10,$be,1,1,"ng-template",9),zt(11),g(),S(12,eve,2,0,"div",10),S(13,tve,2,0,"div",11),g(),S(14,nve,1,0,"div",12),g(),h(15,"div",13),S(16,ive,2,1,"div",14),S(17,ove,5,2,"div",15),g()),2&e&&(v(2),nt("mdc-text-field--filled",!i._hasOutline())("mdc-text-field--outlined",i._hasOutline())("mdc-text-field--no-label",!i._hasFloatingLabel())("mdc-text-field--disabled",i._control.disabled)("mdc-text-field--invalid",i._control.errorState),v(2),_("ngIf",!i._hasOutline()&&!i._control.disabled),v(2),_("ngIf",i._hasOutline()),v(1),_("ngIf",i._hasIconPrefix),v(1),_("ngIf",i._hasTextPrefix),v(2),_("ngIf",!i._hasOutline()||i._forceDisplayInfixLabel()),v(2),_("ngIf",i._hasTextSuffix),v(1),_("ngIf",i._hasIconSuffix),v(1),_("ngIf",!i._hasOutline()),v(1),nt("mat-mdc-form-field-subscript-dynamic-size","dynamic"===i.subscriptSizing),_("ngSwitch",i._getDisplayedMessages()),v(1),_("ngSwitchCase","error"),v(1),_("ngSwitchCase","hint"))},dependencies:[Fe,Lr,sr,Sr,P1,m9,h9,b9,_9],styles:['.mdc-text-field{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:0;border-bottom-left-radius:0;display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-text-field__input{height:28px;width:100%;min-width:0;border:none;border-radius:0;background:none;appearance:none;padding:0}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}@media all{.mdc-text-field__input::placeholder{opacity:0}}@media all{.mdc-text-field__input:-ms-input-placeholder{opacity:0}}@media all{.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}}@media all{.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}}.mdc-text-field__affix{height:28px;opacity:0;white-space:nowrap}.mdc-text-field--label-floating .mdc-text-field__affix,.mdc-text-field--no-label .mdc-text-field__affix{opacity:1}@supports(-webkit-hyphens: none){.mdc-text-field--outlined .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field__affix--prefix,.mdc-text-field__affix--prefix[dir=rtl]{padding-left:2px;padding-right:0}.mdc-text-field--end-aligned .mdc-text-field__affix--prefix{padding-left:0;padding-right:12px}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--end-aligned .mdc-text-field__affix--prefix[dir=rtl]{padding-left:12px;padding-right:0}.mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field__affix--suffix,.mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:12px}.mdc-text-field--end-aligned .mdc-text-field__affix--suffix{padding-left:2px;padding-right:0}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--end-aligned .mdc-text-field__affix--suffix[dir=rtl]{padding-left:0;padding-right:2px}.mdc-text-field--filled{height:56px}.mdc-text-field--filled::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}.mdc-text-field--filled .mdc-floating-label{left:16px;right:initial}[dir=rtl] .mdc-text-field--filled .mdc-floating-label,.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:16px}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled.mdc-text-field--no-label::before{display:none}@supports(-webkit-hyphens: none){.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__affix{align-items:center;align-self:center;display:inline-flex;height:100%}}.mdc-text-field--outlined{height:56px;overflow:visible}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1)}.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--outlined .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading[dir=rtl]{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px, var(--mdc-shape-small, 4px))*2)}}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing{border-top-left-radius:0;border-top-right-radius:var(--mdc-shape-small, 4px);border-bottom-right-radius:var(--mdc-shape-small, 4px);border-bottom-left-radius:0}[dir=rtl] .mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing,.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__trailing[dir=rtl]{border-top-left-radius:var(--mdc-shape-small, 4px);border-top-right-radius:0;border-bottom-right-radius:0;border-bottom-left-radius:var(--mdc-shape-small, 4px)}@supports(top: max(0%)){.mdc-text-field--outlined{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px, var(--mdc-shape-small, 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}@supports(top: max(0%)){.mdc-text-field--outlined+.mdc-text-field-helper-line{padding-right:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-left:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-leading-icon{padding-right:max(16px, var(--mdc-shape-small, 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-right:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-leading-icon,.mdc-text-field--outlined.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:max(16px, var(--mdc-shape-small, 4px))}}.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-right:0}@supports(top: max(0%)){.mdc-text-field--outlined.mdc-text-field--with-trailing-icon{padding-left:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0}@supports(top: max(0%)){[dir=rtl] .mdc-text-field--outlined.mdc-text-field--with-trailing-icon,.mdc-text-field--outlined.mdc-text-field--with-trailing-icon[dir=rtl]{padding-right:max(16px, calc(var(--mdc-shape-small, 4px) + 4px))}}.mdc-text-field--outlined.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:initial}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:4px}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mdc-text-field--textarea{flex-direction:column;align-items:center;width:auto;height:auto;padding:0}.mdc-text-field--textarea .mdc-floating-label{top:19px}.mdc-text-field--textarea .mdc-floating-label:not(.mdc-floating-label--float-above){transform:none}.mdc-text-field--textarea .mdc-text-field__input{flex-grow:1;height:auto;min-height:1.5rem;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;resize:none;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--filled::before{display:none}.mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-10.25px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--filled .mdc-text-field__input{margin-top:23px;margin-bottom:9px}.mdc-text-field--textarea.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-27.25px) scale(1)}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-24.75px) scale(0.75)}.mdc-text-field--textarea.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--textarea.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-text-field__input{margin-top:16px;margin-bottom:16px}.mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label{top:18px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field__input{margin-bottom:2px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter{align-self:flex-end;padding:0 16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::after{display:inline-block;width:0;height:16px;content:"";vertical-align:-16px}.mdc-text-field--textarea.mdc-text-field--with-internal-counter .mdc-text-field-character-counter::before{display:none}.mdc-text-field__resizer{align-self:stretch;display:inline-flex;flex-direction:column;flex-grow:1;max-height:100%;max-width:100%;min-height:56px;min-width:fit-content;min-width:-moz-available;min-width:-webkit-fill-available;overflow:hidden;resize:both}.mdc-text-field--filled .mdc-text-field__resizer{transform:translateY(-1px)}.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--filled .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateY(1px)}.mdc-text-field--outlined .mdc-text-field__resizer{transform:translateX(-1px) translateY(-1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer,.mdc-text-field--outlined .mdc-text-field__resizer[dir=rtl]{transform:translateX(1px) translateY(-1px)}.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter{transform:translateX(1px) translateY(1px)}[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input,[dir=rtl] .mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter,.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field__input[dir=rtl],.mdc-text-field--outlined .mdc-text-field__resizer .mdc-text-field-character-counter[dir=rtl]{transform:translateX(-1px) translateY(1px)}.mdc-text-field--with-leading-icon{padding-left:0;padding-right:16px}[dir=rtl] .mdc-text-field--with-leading-icon,.mdc-text-field--with-leading-icon[dir=rtl]{padding-left:16px;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 48px);left:48px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label[dir=rtl]{left:initial;right:48px}.mdc-text-field--with-leading-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label{left:36px;right:initial}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label[dir=rtl]{left:initial;right:36px}.mdc-text-field--with-leading-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) translateX(-32px) scale(1)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-37.25px) translateX(32px) scale(1)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--float-above{font-size:.75rem}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) translateX(-32px) scale(0.75)}[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,[dir=rtl] .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl],.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above[dir=rtl]{transform:translateY(-34.75px) translateX(32px) scale(0.75)}.mdc-text-field--with-leading-icon.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-text-field--with-trailing-icon{padding-left:16px;padding-right:0}[dir=rtl] .mdc-text-field--with-trailing-icon,.mdc-text-field--with-trailing-icon[dir=rtl]{padding-left:0;padding-right:16px}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 64px)}.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 64px / 0.75)}.mdc-text-field--with-trailing-icon.mdc-text-field--outlined :not(.mdc-notched-outline--notched) .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon{padding-left:0;padding-right:0}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label{max-width:calc(100% - 96px)}.mdc-text-field--with-leading-icon.mdc-text-field--with-trailing-icon.mdc-text-field--filled .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 96px / 0.75)}.mdc-text-field-helper-line{display:flex;justify-content:space-between;box-sizing:border-box}.mdc-text-field+.mdc-text-field-helper-line{padding-right:16px;padding-left:16px}.mdc-form-field>.mdc-text-field+label{align-self:flex-start}.mdc-text-field--focused .mdc-notched-outline__leading,.mdc-text-field--focused .mdc-notched-outline__notch,.mdc-text-field--focused .mdc-notched-outline__trailing{border-width:2px}.mdc-text-field--focused+.mdc-text-field-helper-line .mdc-text-field-helper-text:not(.mdc-text-field-helper-text--validation-msg){opacity:1}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-text-field--focused.mdc-text-field--outlined.mdc-text-field--textarea .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:0}.mdc-text-field--invalid+.mdc-text-field-helper-line .mdc-text-field-helper-text--validation-msg{opacity:1}.mdc-text-field--disabled{pointer-events:none}@media screen and (forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.mdc-text-field--disabled.mdc-text-field--filled .mdc-text-field__ripple{display:none}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--end-aligned .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--end-aligned .mdc-text-field__input[dir=rtl]{text-align:left}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix{direction:ltr}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{padding-left:0;padding-right:2px}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{padding-left:12px;padding-right:0}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--leading,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--leading{order:1}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--suffix{order:2}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__input,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__input{order:3}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__affix--prefix{order:4}[dir=rtl] .mdc-text-field--ltr-text .mdc-text-field__icon--trailing,.mdc-text-field--ltr-text[dir=rtl] .mdc-text-field__icon--trailing{order:5}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__input,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__input{text-align:right}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--prefix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--prefix{padding-right:12px}[dir=rtl] .mdc-text-field--ltr-text.mdc-text-field--end-aligned .mdc-text-field__affix--suffix,.mdc-text-field--ltr-text.mdc-text-field--end-aligned[dir=rtl] .mdc-text-field__affix--suffix{padding-left:2px}.mdc-floating-label{position:absolute;left:0;-webkit-transform-origin:left top;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label,.mdc-floating-label[dir=rtl]{right:0;left:auto;-webkit-transform-origin:right top;transform-origin:right top;text-align:right}.mdc-floating-label--float-above{cursor:auto}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0px;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after,.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)[dir=rtl]::after{margin-left:0;margin-right:1px}.mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline,.mdc-notched-outline[dir=rtl]{text-align:right}.mdc-notched-outline__leading,.mdc-notched-outline__notch,.mdc-notched-outline__trailing{box-sizing:border-box;height:100%;border-top:1px solid;border-bottom:1px solid;pointer-events:none}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;width:12px}[dir=rtl] .mdc-notched-outline__leading,.mdc-notched-outline__leading[dir=rtl]{border-left:none;border-right:1px solid}.mdc-notched-outline__trailing{border-left:none;border-right:1px solid;flex-grow:1}[dir=rtl] .mdc-notched-outline__trailing,.mdc-notched-outline__trailing[dir=rtl]{border-left:1px solid;border-right:none}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 12px * 2)}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch,.mdc-notched-outline--notched .mdc-notched-outline__notch[dir=rtl]{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{border-bottom-width:1px}.mdc-line-ripple::after{border-bottom-width:2px}.mdc-line-ripple::before{z-index:1}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{line-height:normal;pointer-events:all}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-text-field-wrapper::before{content:none}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:12px;box-sizing:content-box}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}}@media all{.mdc-text-field--no-label .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__affix{transition:opacity 150ms 0ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled.mdc-ripple-upgraded--background-focused .mdc-text-field__ripple::before,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea{transition:none}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--filled .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-filled 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-filled{0%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-10.25px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-10.25px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-10.25px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--textarea.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-textarea-outlined 250ms 1}@keyframes mdc-floating-label-shake-float-above-textarea-outlined{0%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-24.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-24.75px) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-24.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon{0%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - 32px)) translateY(-34.75px) scale(0.75)}}[dir=rtl] .mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined .mdc-floating-label--shake,.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--with-leading-icon.mdc-text-field--outlined[dir=rtl] .mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-text-field-outlined-leading-icon 250ms 1}@keyframes mdc-floating-label-shake-float-above-text-field-outlined-leading-icon-rtl{0%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - -32px)) translateY(-34.75px) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - -32px)) translateY(-34.75px) scale(0.75)}100%{transform:translateX(calc(0 - -32px)) translateY(-34.75px) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-floating-label--shake{animation:mdc-floating-label-shake-float-above-standard 250ms 1}@keyframes mdc-floating-label-shake-float-above-standard{0%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}33%{animation-timing-function:cubic-bezier(0.5, 0, 0.701732, 0.495819);transform:translateX(calc(4% - 0%)) translateY(-106%) scale(0.75)}66%{animation-timing-function:cubic-bezier(0.302435, 0.381352, 0.55, 0.956352);transform:translateX(calc(-4% - 0%)) translateY(-106%) scale(0.75)}100%{transform:translateX(calc(0 - 0%)) translateY(-106%) scale(0.75)}}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}'],encapsulation:2,data:{animation:[pve.transitionMessages]},changeDetection:0}),n})(),Ef=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Pe,ng,fn]}),n})(),O9=(()=>{class n{constructor(e,i){this._renderer=e,this._elementRef=i,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}}return n.\u0275fac=function(e){return new(e||n)(C(mc),C(Me))},n.\u0275dir=we({type:n}),n})(),Tf=(()=>{class n extends O9{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,features:[Ke]}),n})(),Mo=new ie("NgValueAccessor"),gve={provide:Mo,useExisting:$n(()=>_ve),multi:!0},_ve=(()=>{class n extends Tf{writeValue(e){this.setProperty("checked",e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(e,i){1&e&&I("change",function(o){return i.onChange(o.target.checked)})("blur",function(){return i.onTouched()})},features:[Qt([gve]),Ke]}),n})(),bve={provide:Mo,useExisting:$n(()=>bg),multi:!0},yve=new ie("CompositionEventMode"),bg=(()=>{class n extends O9{constructor(e,i,r){super(e,i),this._compositionMode=r,this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){let n=Tl()?Tl().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}())}writeValue(e){this.setProperty("value",e??"")}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}}return n.\u0275fac=function(e){return new(e||n)(C(mc),C(Me),C(yve,8))},n.\u0275dir=we({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(e,i){1&e&&I("input",function(o){return i._handleInput(o.target.value)})("blur",function(){return i.onTouched()})("compositionstart",function(){return i._compositionStart()})("compositionend",function(o){return i._compositionEnd(o.target.value)})},features:[Qt([bve]),Ke]}),n})(),xve=!1;function Vu(n){return null==n||("string"==typeof n||Array.isArray(n))&&0===n.length}function k9(n){return null!=n&&"number"==typeof n.length}var wo=new ie("NgValidators"),Hu=new ie("NgAsyncValidators"),Cve=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Ul=class{static min(t){return F9(t)}static max(t){return N9(t)}static required(t){return L9(t)}static requiredTrue(t){return B9(t)}static email(t){return V9(t)}static minLength(t){return H9(t)}static maxLength(t){return z9(t)}static pattern(t){return U9(t)}static nullValidator(t){return null}static compose(t){return X9(t)}static composeAsync(t){return Q9(t)}};function F9(n){return t=>{if(Vu(t.value)||Vu(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function N9(n){return t=>{if(Vu(t.value)||Vu(n))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function L9(n){return Vu(n.value)?{required:!0}:null}function B9(n){return!0===n.value?null:{required:!0}}function V9(n){return Vu(n.value)||Cve.test(n.value)?null:{email:!0}}function H9(n){return t=>Vu(t.value)||!k9(t.value)?null:t.value.length<n?{minlength:{requiredLength:n,actualLength:t.value.length}}:null}function z9(n){return t=>k9(t.value)&&t.value.length>n?{maxlength:{requiredLength:n,actualLength:t.value.length}}:null}function U9(n){if(!n)return tE;let t,e;return"string"==typeof n?(e="","^"!==n.charAt(0)&&(e+="^"),e+=n,"$"!==n.charAt(n.length-1)&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Vu(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function tE(n){return null}function j9(n){return null!=n}function G9(n){let t=hh(n)?$r(n):n;if(xve&&!DO(t)){let e="Expected async validator to return Promise or Observable.";throw"object"==typeof n&&(e+=" Are you using a synchronous validator where an async validator is expected?"),new yt(-1101,e)}return t}function W9(n){let t={};return n.forEach(e=>{t=null!=e?{...t,...e}:t}),0===Object.keys(t).length?null:t}function q9(n,t){return t.map(e=>e(n))}function Y9(n){return n.map(t=>function(n){return!n.validate}(t)?t:e=>t.validate(e))}function X9(n){if(!n)return null;let t=n.filter(j9);return 0==t.length?null:function(e){return W9(q9(e,t))}}function z2(n){return null!=n?X9(Y9(n)):null}function Q9(n){if(!n)return null;let t=n.filter(j9);return 0==t.length?null:function(e){return co(q9(e,t).map(G9)).pipe(N(W9))}}function U2(n){return null!=n?Q9(Y9(n)):null}function E9(n,t){return null===n?[t]:Array.isArray(n)?[...n,t]:[n,t]}function Z9(n){return n._rawValidators}function K9(n){return n._rawAsyncValidators}function B2(n){return n?Array.isArray(n)?n:[n]:[]}function nE(n,t){return Array.isArray(n)?n.includes(t):n===t}function T9(n,t){let e=B2(t);return B2(n).forEach(r=>{nE(e,r)||e.push(r)}),e}function D9(n,t){return B2(t).filter(e=>!nE(n,e))}var iE=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=z2(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=U2(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}},Xo=class extends iE{get formDirective(){return null}get path(){return null}},Gs=class extends iE{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},V2=class{constructor(t){this._cd=t}get isTouched(){return!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return!!this._cd?.submitted}},cE=(()=>{class n extends V2{constructor(e){super(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Gs,2))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(e,i){2&e&&nt("ng-untouched",i.isUntouched)("ng-touched",i.isTouched)("ng-pristine",i.isPristine)("ng-dirty",i.isDirty)("ng-valid",i.isValid)("ng-invalid",i.isInvalid)("ng-pending",i.isPending)},features:[Ke]}),n})();function J9(n,t){return n?`with name: '${t}'`:`at index: ${t}`}var H2=!1,Zv="VALID",eE="INVALID",_g="PENDING",Kv="DISABLED";function $9(n){return(dE(n)?n.validators:n)||null}function eq(n,t){return(dE(t)?t.asyncValidators:n)||null}function dE(n){return null!=n&&!Array.isArray(n)&&"object"==typeof n}var rE=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=!1,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===Zv}get invalid(){return this.status===eE}get pending(){return this.status==_g}get disabled(){return this.status===Kv}get enabled(){return this.status!==Kv}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(T9(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(T9(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(D9(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(D9(t,this._rawAsyncValidators))}hasValidator(t){return nE(this._rawValidators,t)}hasAsyncValidator(t){return nE(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(e=>{e.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(e=>{e.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=_g,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Kv,this.errors=null,this._forEachChild(i=>{i.disable({...t,onlySelf:!0})}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Zv,this._forEachChild(i=>{i.enable({...t,onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors({...t,skipPristineCheck:e}),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Zv||this.status===_g)&&this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Kv:Zv}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=_g,this._hasOwnPendingAsyncValidator=!0;let e=G9(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(i=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(i,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){let e=t;return null==e||(Array.isArray(e)||(e=e.split(".")),0===e.length)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i&&i.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new F,this.statusChanges=new F}_calculateStatus(){return this._allControlsDisabled()?Kv:this.errors?eE:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(_g)?_g:this._anyControlsHaveStatus(eE)?eE:Zv}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){dE(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=function(n){return Array.isArray(n)?z2(n):n||null}(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=function(n){return Array.isArray(n)?U2(n):n||null}(this._rawAsyncValidators)}},oE=class extends rE{constructor(t,e,i){super($9(e),eq(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){(function(n,t,e){n._forEachChild((i,r)=>{if(void 0===e[r])throw new yt(1002,H2?function(n,t){return`Must supply a value for form control ${J9(n,t)}`}(t,r):"")})})(this,!0,t),Object.keys(t).forEach(i=>{(function(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new yt(1e3,H2?function(n){return`\n    There are no form controls registered with this ${n?"group":"array"} yet. If you're using ngModel,\n    you may want to check next tick (e.g. use setTimeout).\n  `}(t):"");if(!i[e])throw new yt(1001,H2?function(n,t){return`Cannot find form control ${J9(n,t)}`}(t,e):"")})(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){null!=t&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t[r],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>!!i._syncPendingControls()||e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){return this._reduceChildren({},(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}},Df=new ie("CallSetDisabledState",{providedIn:"root",factory:()=>ey}),ey="always";function uE(n,t){return[...t.path,n]}function $v(n,t,e=ey){j2(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||"always"===e)&&t.valueAccessor.setDisabledState?.(n.disabled),function(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,"change"===n.updateOn&&tq(n,t)})}(n,t),function(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}(n,t),function(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,"blur"===n.updateOn&&n._pendingChange&&tq(n,t),"submit"!==n.updateOn&&n.markAsTouched()})}(n,t),function(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}(n,t)}function sE(n,t,e=!0){let i=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(i),t.valueAccessor.registerOnTouched(i)),lE(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function aE(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function j2(n,t){let e=Z9(n);null!==t.validator?n.setValidators(E9(e,t.validator)):"function"==typeof e&&n.setValidators([e]);let i=K9(n);null!==t.asyncValidator?n.setAsyncValidators(E9(i,t.asyncValidator)):"function"==typeof i&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();aE(t._rawValidators,r),aE(t._rawAsyncValidators,r)}function lE(n,t){let e=!1;if(null!==n){if(null!==t.validator){let r=Z9(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(null!==t.asyncValidator){let r=K9(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return aE(t._rawValidators,i),aE(t._rawAsyncValidators,i),e}function tq(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function nq(n,t){j2(n,t)}function G2(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return!!e.isFirstChange()||!Object.is(t,e.currentValue)}function iq(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;"submit"===i.updateOn&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function W2(n,t){if(!t)return null;let e,i,r;return Array.isArray(t),t.forEach(o=>{o.constructor===bg?e=o:function(n){return Object.getPrototypeOf(n.constructor)===Tf}(o)?i=o:r=o}),r||i||e||null}var Vve={provide:Xo,useExisting:$n(()=>vg)},Jv=Promise.resolve(),vg=(()=>{class n extends Xo{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._directives=new Set,this.ngSubmit=new F,this.form=new oE({},z2(e),U2(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Jv.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),$v(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Jv.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Jv.then(()=>{let i=this._findContainer(e.path),r=new oE({});nq(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Jv.then(()=>{let i=this._findContainer(e.path);i&&i.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){Jv.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submitted=!0,iq(this.form,this._directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}}return n.\u0275fac=function(e){return new(e||n)(C(wo,10),C(Hu,10),C(Df,8))},n.\u0275dir=we({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(e,i){1&e&&I("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{options:["ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qt([Vve]),Ke]}),n})();function I9(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function A9(n){return"object"==typeof n&&null!==n&&2===Object.keys(n).length&&"value"in n&&"disabled"in n}var ty=class extends rE{constructor(t=null,e,i){super($9(e),eq(i,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),dE(e)&&(e.nonNullable||e.initialValueIsDefault)&&(this.defaultValue=A9(t)?t.value:t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(i=>i(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){I9(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){I9(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){A9(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}},rq=(()=>{class n extends Xo{ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return uE(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,features:[Ke]}),n})(),zve={provide:Xo,useExisting:$n(()=>Uve)},Uve=(()=>{class n extends rq{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){}}return n.\u0275fac=function(e){return new(e||n)(C(Xo,5),C(wo,10),C(Hu,10))},n.\u0275dir=we({type:n,selectors:[["","ngModelGroup",""]],inputs:{name:["ngModelGroup","name"]},exportAs:["ngModelGroup"],features:[Qt([zve]),Ke]}),n})(),jve={provide:Gs,useExisting:$n(()=>q2)},R9=Promise.resolve(),q2=(()=>{class n extends Gs{constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=s,this.callSetDisabledState=a,this.control=new ty,this._registered=!1,this.update=new F,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=W2(0,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),G2(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&null!=this.options.updateOn&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!(!this.options||!this.options.standalone)}_setUpStandalone(){$v(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._isStandalone()||this._checkParentType(),this._checkName()}_checkParentType(){}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),this._isStandalone()}_updateValue(e){R9.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=0!==i&&$M(i);R9.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?uE(e,this._parent):[e]}}return n.\u0275fac=function(e){return new(e||n)(C(Xo,9),C(wo,10),C(Hu,10),C(Mo,10),C($t,8),C(Df,8))},n.\u0275dir=we({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:["disabled","isDisabled"],model:["ngModel","model"],options:["ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],features:[Qt([jve]),Ke,Gt]}),n})(),Gve={provide:Mo,useExisting:$n(()=>Y2),multi:!0},Y2=(()=>{class n extends Tf{writeValue(e){this.setProperty("value",e??"")}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(e,i){1&e&&I("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qt([Gve]),Ke]}),n})(),Wve={provide:Mo,useExisting:$n(()=>Yve),multi:!0},oq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),qve=(()=>{class n{constructor(){this._accessors=[]}add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e)return void this._accessors.splice(i,1)}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return!!e[0].control&&e[0]._parent===i._control._parent&&e[1].name===i.name}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:oq}),n})(),Yve=(()=>{class n extends Tf{constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o,this.setDisabledStateFired=!1,this.onChange=()=>{},this.callSetDisabledState=ai(Df,{optional:!0})??ey}ngOnInit(){this._control=this._injector.get(Gs),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||"whenDisabledForLegacyCode"===this.callSetDisabledState)&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return n.\u0275fac=function(e){return new(e||n)(C(mc),C(Me),C(qve),C(Mi))},n.\u0275dir=we({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(e,i){1&e&&I("change",function(){return i.onChange()})("blur",function(){return i.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[Qt([Wve]),Ke]}),n})(),Xve={provide:Mo,useExisting:$n(()=>Qve),multi:!0},Qve=(()=>{class n extends Tf{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(""==i?null:parseFloat(i))}}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(e,i){1&e&&I("change",function(o){return i.onChange(o.target.value)})("input",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},features:[Qt([Xve]),Ke]}),n})(),X2=new ie("NgModelWithFormControlWarning"),Zve={provide:Gs,useExisting:$n(()=>Q2)},Q2=(()=>{class n extends Gs{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this.update=new F,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=W2(0,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&sE(i,this,!1),$v(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}G2(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&sE(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(C(wo,10),C(Hu,10),C(Mo,10),C(X2,8),C(Df,8))},n.\u0275dir=we({type:n,selectors:[["","formControl",""]],inputs:{form:["formControl","form"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Qt([Zve]),Ke,Gt]}),n})(),Kve={provide:Xo,useExisting:$n(()=>yg)},yg=(()=>{class n extends Xo{constructor(e,i,r){super(),this.callSetDisabledState=r,this.submitted=!1,this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new F,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(lE(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let i=this.form.get(e.path);return $v(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){sE(e.control||null,e,!1),function(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,i){this.form.get(e.path).setValue(i)}onSubmit(e){return this.submitted=!0,iq(this.form,this.directives),this.ngSubmit.emit(e),"dialog"===e?.target?.method}onReset(){this.resetForm()}resetForm(e){this.form.reset(e),this.submitted=!1}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(sE(i||null,e),(n=>n instanceof ty)(r)&&($v(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);nq(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let i=this.form.get(e.path);i&&function(n,t){return lE(n,t)}(i,e)&&i.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){j2(this.form,this),this._oldForm&&lE(this._oldForm,this)}_checkFormPresent(){}}return n.\u0275fac=function(e){return new(e||n)(C(wo,10),C(Hu,10),C(Df,8))},n.\u0275dir=we({type:n,selectors:[["","formGroup",""]],hostBindings:function(e,i){1&e&&I("submit",function(o){return i.onSubmit(o)})("reset",function(){return i.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Qt([Kve]),Ke,Gt]}),n})(),Jve={provide:Xo,useExisting:$n(()=>sq)},sq=(()=>{class n extends rq{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){lq(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(C(Xo,13),C(wo,10),C(Hu,10))},n.\u0275dir=we({type:n,selectors:[["","formGroupName",""]],inputs:{name:["formGroupName","name"]},features:[Qt([Jve]),Ke]}),n})(),$ve={provide:Xo,useExisting:$n(()=>aq)},aq=(()=>{class n extends Xo{constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){this._checkParentType(),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective&&this.formDirective.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return uE(null==this.name?this.name:this.name.toString(),this._parent)}_checkParentType(){lq(this._parent)}}return n.\u0275fac=function(e){return new(e||n)(C(Xo,13),C(wo,10),C(Hu,10))},n.\u0275dir=we({type:n,selectors:[["","formArrayName",""]],inputs:{name:["formArrayName","name"]},features:[Qt([$ve]),Ke]}),n})();function lq(n){return!(n instanceof sq||n instanceof yg||n instanceof aq)}var eye={provide:Gs,useExisting:$n(()=>tye)},tye=(()=>{class n extends Gs{set isDisabled(e){}constructor(e,i,r,o,s){super(),this._ngModelWarningConfig=s,this._added=!1,this.update=new F,this._ngModelWarningSent=!1,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=W2(0,o)}ngOnChanges(e){this._added||this._setUpControl(),G2(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return uE(null==this.name?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this._added=!0}}return n._ngModelWarningSentOnce=!1,n.\u0275fac=function(e){return new(e||n)(C(Xo,13),C(wo,10),C(Hu,10),C(Mo,10),C(X2,8))},n.\u0275dir=we({type:n,selectors:[["","formControlName",""]],inputs:{name:["formControlName","name"],isDisabled:["disabled","isDisabled"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[Qt([eye]),Ke,Gt]}),n})(),nye={provide:Mo,useExisting:$n(()=>dq),multi:!0};function cq(n,t){return null==n?`${t}`:(t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var dq=(()=>{class n extends Tf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){this.value=e;let r=cq(this._getOptionId(e),e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=function(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i):e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(e,i){1&e&&I("change",function(o){return i.onChange(o.target.value)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qt([nye]),Ke]}),n})(),uq=(()=>{class n{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(cq(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._setElementValue(e),this._select&&this._select.writeValue(this._select.value)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(mc),C(dq,9))},n.\u0275dir=we({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})(),rye={provide:Mo,useExisting:$n(()=>pq),multi:!0};function P9(n,t){return null==n?`${t}`:("string"==typeof t&&(t=`'${t}'`),t&&"object"==typeof t&&(t="Object"),`${n}: ${t}`.slice(0,50))}var pq=(()=>{class n extends Tf{constructor(){super(...arguments),this._optionMap=new Map,this._idCounter=0,this._compareWith=Object.is}set compareWith(e){this._compareWith=e}writeValue(e){let i;if(this.value=e,Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,s)=>{o._setSelected(r.indexOf(s.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(void 0!==o){let s=o;for(let a=0;a<s.length;a++){let c=this._getOptionValue(s[a].value);r.push(c)}}else{let s=i.options;for(let a=0;a<s.length;a++){let l=s[a];if(l.selected){let c=this._getOptionValue(l.value);r.push(c)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=function(n){return n.split(":")[0]}(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(e,i){1&e&&I("change",function(o){return i.onChange(o.target)})("blur",function(){return i.onTouched()})},inputs:{compareWith:"compareWith"},features:[Qt([rye]),Ke]}),n})(),fq=(()=>{class n{constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){null!=this._select&&(this._value=e,this._setElementValue(P9(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue(P9(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(mc),C(pq,9))},n.\u0275dir=we({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),n})();function mq(n){return"number"==typeof n?n:parseInt(n,10)}function hq(n){return"number"==typeof n?n:parseFloat(n)}var If=(()=>{class n{constructor(){this._validator=tE}ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):tE,this._onChange&&this._onChange()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return null!=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,features:[Gt]}),n})(),sye={provide:wo,useExisting:$n(()=>aye),multi:!0},aye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="max",this.normalizeInput=e=>hq(e),this.createValidator=e=>N9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("max",i._enabled?i.max:null)},inputs:{max:"max"},features:[Qt([sye]),Ke]}),n})(),lye={provide:wo,useExisting:$n(()=>cye),multi:!0},cye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="min",this.normalizeInput=e=>hq(e),this.createValidator=e=>F9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("min",i._enabled?i.min:null)},inputs:{min:"min"},features:[Qt([lye]),Ke]}),n})(),dye={provide:wo,useExisting:$n(()=>gq),multi:!0},uye={provide:wo,useExisting:$n(()=>Z2),multi:!0},gq=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="required",this.normalizeInput=$M,this.createValidator=e=>L9}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(e,i){2&e&&Be("required",i._enabled?"":null)},inputs:{required:"required"},features:[Qt([dye]),Ke]}),n})(),Z2=(()=>{class n extends gq{constructor(){super(...arguments),this.createValidator=e=>B9}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","type","checkbox","required","","formControlName",""],["input","type","checkbox","required","","formControl",""],["input","type","checkbox","required","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("required",i._enabled?"":null)},features:[Qt([uye]),Ke]}),n})(),pye={provide:wo,useExisting:$n(()=>fye),multi:!0},fye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="email",this.normalizeInput=$M,this.createValidator=e=>V9}enabled(e){return e}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","email","","formControlName",""],["","email","","formControl",""],["","email","","ngModel",""]],inputs:{email:"email"},features:[Qt([pye]),Ke]}),n})(),mye={provide:wo,useExisting:$n(()=>hye),multi:!0},hye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="minlength",this.normalizeInput=e=>mq(e),this.createValidator=e=>H9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","minlength","","formControlName",""],["","minlength","","formControl",""],["","minlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("minlength",i._enabled?i.minlength:null)},inputs:{minlength:"minlength"},features:[Qt([mye]),Ke]}),n})(),gye={provide:wo,useExisting:$n(()=>_ye),multi:!0},_ye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="maxlength",this.normalizeInput=e=>mq(e),this.createValidator=e=>z9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("maxlength",i._enabled?i.maxlength:null)},inputs:{maxlength:"maxlength"},features:[Qt([gye]),Ke]}),n})(),bye={provide:wo,useExisting:$n(()=>vye),multi:!0},vye=(()=>{class n extends If{constructor(){super(...arguments),this.inputName="pattern",this.normalizeInput=e=>e,this.createValidator=e=>U9(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","pattern","","formControlName",""],["","pattern","","formControl",""],["","pattern","","ngModel",""]],hostVars:1,hostBindings:function(e,i){2&e&&Be("pattern",i._enabled?i.pattern:null)},inputs:{pattern:"pattern"},features:[Qt([bye]),Ke]}),n})(),_q=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[oq]}),n})(),xg=(new yl("15.2.9"),(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Df,useValue:e.callSetDisabledState??ey}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[_q]}),n})()),bq=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:X2,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Df,useValue:e.callSetDisabledState??ey}]}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[_q]}),n})(),yye=["trigger"],xye=["panel"];function Cye(n,t){if(1&n&&(h(0,"span",10),T(1),g()),2&n){let e=w();v(1),bt(e.placeholder)}}function Mye(n,t){if(1&n&&(h(0,"span",14),T(1),g()),2&n){let e=w(2);v(1),bt(e.triggerValue)}}function wye(n,t){1&n&&zt(0,0,["*ngSwitchCase","true"])}function Sye(n,t){1&n&&(h(0,"span",11),S(1,Mye,2,1,"span",12),S(2,wye,1,0,"ng-content",13),g()),2&n&&(_("ngSwitch",!!w().customTrigger),v(2),_("ngSwitchCase",!0))}function Eye(n,t){if(1&n){let e=ge();Nn(),Oo(),h(0,"div",15,16),I("@transformPanel.done",function(r){return X(e),Q(w()._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){return X(e),Q(w()._handleKeydown(r))}),zt(2,1),g()}if(2&n){let e=w();mb("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),_("ngClass",e.panelClass)("@transformPanel","showing"),Be("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var Tye=[[["mat-select-trigger"]],"*"],Dye=["mat-select-trigger","*"],Iye={transformPanelWrap:_r("transformPanelWrap",[gi("* => void",Jp("@transformPanel",[Kp()],{optional:!0}))]),transformPanel:_r("transformPanel",[wi("void",rn({opacity:0,transform:"scale(1, 0.8)"})),gi("void => showing",Ci("120ms cubic-bezier(0, 0, 0.2, 1)",rn({opacity:1,transform:"scale(1, 1)"}))),gi("* => void",Ci("100ms linear",rn({opacity:0})))])},vq=0,yq=new ie("mat-select-scroll-strategy"),Rye=new ie("MAT_SELECT_CONFIG"),Pye={provide:yq,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},Oye=new ie("MatSelectTrigger"),kye=us(ku(so(B1(class{constructor(n,t,e,i,r){this._elementRef=n,this._defaultErrorStateMatcher=t,this._parentForm=e,this._parentFormGroup=i,this.ngControl=r,this.stateChanges=new Ie}})))),Fye=(()=>{class n extends kye{get focused(){return this._focused||this._panelOpen}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(Ul.required)??!1}set required(e){this._required=Rt(e),this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._multiple=Rt(e)}get disableOptionCentering(){return this._disableOptionCentering}set disableOptionCentering(e){this._disableOptionCentering=Rt(e)}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get typeaheadDebounceInterval(){return this._typeaheadDebounceInterval}set typeaheadDebounceInterval(e){this._typeaheadDebounceInterval=_i(e)}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}constructor(e,i,r,o,s,a,l,c,d,u,p,f,m,b){super(s,o,l,c,u),this._viewportRuler=e,this._changeDetectorRef=i,this._ngZone=r,this._dir=a,this._parentFormField=d,this._liveAnnouncer=m,this._defaultOptions=b,this._panelOpen=!1,this._compareWith=(M,y)=>M===y,this._uid="mat-select-"+vq++,this._triggerAriaLabelledBy=null,this._destroy=new Ie,this._onChange=()=>{},this._onTouched=()=>{},this._valueId="mat-select-value-"+vq++,this._panelDoneAnimatingStream=new Ie,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this._multiple=!1,this._disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.optionSelectionChanges=ta(()=>{let M=this.options;return M?M.changes.pipe(qn(M),Jn(()=>tn(...M.map(y=>y.onSelectionChange)))):this._ngZone.onStable.pipe(Yt(1),Jn(()=>this.optionSelectionChanges))}),this.openedChange=new F,this._openedStream=this.openedChange.pipe(ke(M=>M),N(()=>{})),this._closedStream=this.openedChange.pipe(ke(M=>!M),N(()=>{})),this.selectionChange=new F,this.valueChange=new F,this.ngControl&&(this.ngControl.valueAccessor=this),null!=b?.typeaheadDebounceInterval&&(this._typeaheadDebounceInterval=b.typeaheadDebounceInterval),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new dg(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(Yn(),ot(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen))}ngAfterContentInit(){this._initKeyManager(),this._selectionModel.changed.pipe(ot(this._destroy)).subscribe(e=>{e.added.forEach(i=>i.select()),e.removed.forEach(i=>i.deselect())}),this.options.changes.pipe(qn(null),ot(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),i=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}i&&(this._previousControl!==i.control&&(void 0!==this._previousControl&&null!==i.disabled&&i.disabled!==this.disabled&&(this.disabled=i.disabled),this._previousControl=i.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this._typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck())}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(i=>i.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}_isRtl(){return!!this._dir&&"rtl"===this._dir.value}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let i=e.keyCode,r=40===i||38===i||37===i||39===i,o=13===i||32===i,s=this._keyManager;if(!s.isTyping()&&o&&!vr(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let a=this.selected;s.onKeydown(e);let l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){let i=this._keyManager,r=e.keyCode,o=40===r||38===r,s=i.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(s||13!==r&&32!==r||!i.activeItem||vr(e))if(!s&&this._multiple&&65===r&&e.ctrlKey){e.preventDefault();let a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{let a=i.activeItemIndex;i.onKeydown(e),this._multiple&&o&&e.shiftKey&&i.activeItem&&i.activeItemIndex!==a&&i.activeItem._selectViaInteraction()}else e.preventDefault(),i.activeItem._selectViaInteraction()}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(Yt(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(i=>i.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(i=>this._selectOptionByValue(i)),this._sortValues();else{let i=this._selectOptionByValue(e);i?this._keyManager.updateActiveItem(i):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let i=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return null!=r.value&&this._compareWith(r.value,e)}catch{return!1}});return i&&this._selectionModel.select(i),i}_assignValue(e){return!!(e!==this._value||this._multiple&&Array.isArray(e))&&(this.options&&this._setSelectionByValue(e),this._value=e,!0)}_initKeyManager(){this._keyManager=new og(this.options).withTypeAhead(this._typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=tn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(ot(e)).subscribe(i=>{this._onSelect(i.source,i.isUserInput),i.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),tn(...this.options.map(i=>i._stateChanges)).pipe(ot(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,i){let r=this._selectionModel.isSelected(e);null!=e.value||this._multiple?(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),i&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),i&&this.focus())):(e.deselect(),this._selectionModel.clear(),null!=this.value&&this._propagateChanges(e.value)),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((i,r)=>this.sortComparator?this.sortComparator(i,r,e):e.indexOf(i)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let i=null;i=this.multiple?this.selected.map(r=>r.value):this.selected?this.selected.value:e,this._value=i,this.valueChange.emit(i),this._onChange(i),this.selectionChange.emit(this._getChangeEvent(i)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){this._keyManager&&(this.empty?this._keyManager.setFirstItemActive():this._keyManager.setActiveItem(this._selectionModel.selected[0]))}_canOpen(){return!this._panelOpen&&!this.disabled&&this.options?.length>0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId();return this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),i=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(i+=" "+this.ariaLabelledby),i}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this._panelOpen||!this.empty||this._focused&&!!this._placeholder}}return n.\u0275fac=function(e){return new(e||n)(C(js),C($t),C(at),C(H1),C(Me),C(Xi,8),C(vg,8),C(yg,8),C(Sf,8),C(Gs,10),yo("tabindex"),C(yq),C(Vv),C(Rye,8))},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&(Ge(yye,5),Ge(xye,5),Ge(Bu,5)),2&e){let r;Se(r=Ee())&&(i.trigger=r.first),Se(r=Ee())&&(i.panel=r.first),Se(r=Ee())&&(i._overlayDir=r.first)}},inputs:{userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",placeholder:"placeholder",required:"required",multiple:"multiple",disableOptionCentering:"disableOptionCentering",compareWith:"compareWith",value:"value",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:"typeaheadDebounceInterval",sortComparator:"sortComparator",id:"id"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},features:[Ke,Gt]}),n})(),zu=(()=>{class n extends Fye{constructor(){super(...arguments),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}ngOnInit(){super.ngOnInit(),this._viewportRuler.change().pipe(ot(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(),this._changeDetectorRef.detectChanges())})}ngAfterViewInit(){this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin())}open(){this._overlayWidth=this._getOverlayWidth(),super.open(),this.stateChanges.next()}close(){super.close(),this.stateChanges.next()}_scrollOptionIntoView(e){let i=this.options.toArray()[e];if(i){let r=this.panel.nativeElement,o=z1(e,this.options,this.optionGroups),s=i._getHostElement();r.scrollTop=0===e&&1===o?0:U1(s.offsetTop,s.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new class{constructor(t,e){this.source=t,this.value=e}}(this,e)}_getOverlayWidth(){return(this._preferredOverlayOrigin instanceof wd?this._preferredOverlayOrigin.elementRef:this._preferredOverlayOrigin||this._elementRef).nativeElement.getBoundingClientRect().width}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Rt(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=O({type:n,selectors:[["mat-select"]],contentQueries:function(e,i,r){if(1&e&&(Ti(r,Oye,5),Ti(r,Us,5),Ti(r,Uv,5)),2&e){let o;Se(o=Ee())&&(i.customTrigger=o.first),Se(o=Ee())&&(i.options=o),Se(o=Ee())&&(i.optionGroups=o)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(e,i){1&e&&I("keydown",function(o){return i._handleKeydown(o)})("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()}),2&e&&(Be("id",i.id)("tabindex",i.tabIndex)("aria-controls",i.panelOpen?i.id+"-panel":null)("aria-expanded",i.panelOpen)("aria-label",i.ariaLabel||null)("aria-required",i.required.toString())("aria-disabled",i.disabled.toString())("aria-invalid",i.errorState)("aria-activedescendant",i._getAriaActiveDescendant()),nt("mat-mdc-select-disabled",i.disabled)("mat-mdc-select-invalid",i.errorState)("mat-mdc-select-required",i.required)("mat-mdc-select-empty",i.empty)("mat-mdc-select-multiple",i.multiple))},inputs:{disabled:"disabled",disableRipple:"disableRipple",tabIndex:"tabIndex",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matSelect"],features:[Qt([{provide:Qv,useExisting:n},{provide:zv,useExisting:n}]),Ke],ngContentSelectors:Dye,decls:11,vars:11,consts:[["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],[1,"mat-mdc-select-value",3,"ngSwitch"],["class","mat-mdc-select-placeholder mat-mdc-select-min-line",4,"ngSwitchCase"],["class","mat-mdc-select-value-text",3,"ngSwitch",4,"ngSwitchCase"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth","backdropClick","attach","detach"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text",3,"ngSwitch"],["class","mat-mdc-select-min-line",4,"ngSwitchDefault"],[4,"ngSwitchCase"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"ngClass","keydown"],["panel",""]],template:function(e,i){if(1&e&&(Dn(Tye),h(0,"div",0,1),I("click",function(){return i.toggle()}),h(3,"div",2),S(4,Cye,2,1,"span",3),S(5,Sye,3,2,"span",4),g(),h(6,"div",5)(7,"div",6),Nn(),h(8,"svg",7),P(9,"path",8),g()()()(),S(10,Eye,3,9,"ng-template",9),I("backdropClick",function(){return i.close()})("attach",function(){return i._onAttached()})("detach",function(){return i.close()})),2&e){let r=it(1);Be("aria-owns",i.panelOpen?i.id+"-panel":null),v(3),_("ngSwitch",i.empty),Be("id",i._valueId),v(1),_("ngSwitchCase",!0),v(1),_("ngSwitchCase",!1),v(5),_("cdkConnectedOverlayPanelClass",i._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",i._scrollStrategy)("cdkConnectedOverlayOrigin",i._preferredOverlayOrigin||r)("cdkConnectedOverlayOpen",i.panelOpen)("cdkConnectedOverlayPositions",i._positions)("cdkConnectedOverlayWidth",i._overlayWidth)}},dependencies:[yn,sr,Sr,uu,Bu,wd],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mat-mdc-select{display:inline-block;width:100%;outline:none}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:translateY(-8px)}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-select-arrow{width:10px;height:5px;position:relative}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}.mdc-menu-surface.mat-mdc-select-panel{width:100%;max-height:275px;position:static;outline:0;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-select-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) .mdc-menu-surface.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above .mdc-menu-surface.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100% / 0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}'],encapsulation:2,data:{animation:[Iye.transformPanel]},changeDetection:0}),n})(),Ja=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Pye],imports:[Pe,Co,cg,fn,Pc,Ef,cg,fn]}),n})();function Nye(n,t){1&n&&(Ot(0),h(1,"div",1),T(2," There is a difference between Default - (Enabled/Disabled) and (Enabled/Disabled) "),g(),h(3,"div",1),T(4," Only flags with non default values are sent to the backend. "),g(),kt())}function Lye(n,t){if(1&n&&(Ot(0),h(1,"div",1),T(2),g(),kt()),2&n){let e=w();v(2),He(' Feature Flags are filtered to only show features containing "',e.showFlagsFilter,'" ')}}function Bye(n,t){1&n&&(h(0,"sup",11),T(1,"1"),g())}function Vye(n,t){1&n&&li(0)}function Hye(n,t){if(1&n){let e=ge();h(0,"mat-select",12),I("selectionChange",function(r){X(e);let o=w().$implicit;return Q(w().flagChanged.emit({flag:o.flag,status:r.value}))}),h(1,"mat-option",13),T(2),g(),h(3,"mat-option",14),T(4,"Enabled"),g(),h(5,"mat-option",15),T(6,"Disabled"),g()()}if(2&n){let e=w().$implicit,i=w();_("value",e.status),v(2),He(" Default ",i.formatFlagValue(e.defaultValue)," ")}}function zye(n,t){if(1&n&&(h(0,"td"),T(1),g()),2&n){let e=w().$implicit,i=w();v(1),He("Unsupported By UI ",i.formatFlagValue(e.value),"")}}function Uye(n,t){if(1&n&&(Ot(0),h(1,"tr")(2,"td")(3,"div"),T(4),S(5,Bye,2,0,"sup",7),g()(),S(6,Vye,1,0,"ng-container",8),S(7,Hye,7,2,"ng-template",null,9,Wt),S(9,zye,2,1,"ng-template",null,10,Wt),g(),kt()),2&n){let e=t.$implicit,i=it(8),r=it(10),o=w();v(4),He(" ",e.flag," "),v(1),_("ngIf",e.sendToServerWhenOverridden),v(1),_("ngIf",o.isEditable(e))("ngIfThen",i)("ngIfElse",r)}}function jye(n,t){1&n&&(h(0,"div",11),T(1," 1. Sent to server when overridden "),g())}var fE,xq=(()=>{class n{constructor(){this.hasFlagsSentToServer=!1,this.flagChanged=new F,this.allFlagsReset=new F}serializeFlagValue(e){return!0===e?"Enabled":!1===e?"Disabled":null==e?"null":Array.isArray(e)?JSON.stringify(e):e.toString()}isEditable(e){return"boolean"==typeof e.defaultValue}formatFlagValue(e){let i=this.serializeFlagValue(e);return 0===i.length?"":`- ${i}`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["feature-flag-dialog-component"]],inputs:{featureFlagStatuses:"featureFlagStatuses",hasFlagsSentToServer:"hasFlagsSentToServer",showFlagsFilter:"showFlagsFilter"},outputs:{flagChanged:"flagChanged",allFlagsReset:"allFlagsReset"},decls:12,vars:4,consts:[[1,"scrolling-page"],[1,"message"],[1,"warning"],[4,"ngIf"],[1,"feature-flag-table"],[4,"ngFor","ngForOf"],["mat-button","",3,"click"],["class","note-1",4,"ngIf"],[4,"ngIf","ngIfThen","ngIfElse"],["selectBlock",""],["unsupportedBlock",""],[1,"note-1"],[3,"value","selectionChange"],["value","default"],["value","enabled"],["value","disabled"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1)(2,"h2",2),T(3,"WARNING: EXPERIMENTAL FEATURES AHEAD!"),g(),T(4," By enabling these features, you could put the application in an unusable state or expose yourself to untested features or potential bugs. "),g(),S(5,Nye,5,0,"ng-container",3),S(6,Lye,3,1,"ng-container",3),h(7,"table",4),S(8,Uye,11,5,"ng-container",5),g(),h(9,"button",6),I("click",function(){return i.allFlagsReset.emit()}),T(10,"Reset All"),g(),S(11,jye,2,0,"div",7),g()),2&e&&(v(5),_("ngIf",i.hasFlagsSentToServer),v(1),_("ngIf",i.showFlagsFilter),v(2),_("ngForOf",i.featureFlagStatuses),v(3),_("ngIf",i.hasFlagsSentToServer))},dependencies:[nn,Fe,Ji,zu,Us],styles:[".message[_ngcontent-%COMP%]{margin-bottom:16px}.message[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:#f44336}.note-1[_ngcontent-%COMP%]{color:#ff9800}.scrolling-page[_ngcontent-%COMP%]{max-height:90vh}.feature-flag-table[_ngcontent-%COMP%]{width:100%}"]}),n})(),Cq=(()=>{class n{constructor(e){this.store=e,this.showFlagsFilter$=this.store.select(iv).pipe(N(i=>i.showFlags?.toLowerCase())),this.hasFlagsSentToServer$=this.store.select(cf).pipe(N(i=>Object.values(i).some(r=>r.sendToServerWhenOverridden))),this.featureFlags$=this.store.select(iv).pipe(Bt(this.store.select(m6),this.store.select(cf),this.showFlagsFilter$),N(([i,r,o,s])=>Object.entries(r).filter(([a])=>!s||a.toLowerCase().includes(s)).map(([a,l])=>{let c=function(n,t){return void 0===t[n]?"default":t[n]?"enabled":"disabled"}(a,i);return{flag:a,defaultValue:l,status:c,sendToServerWhenOverridden:o[a].sendToServerWhenOverridden}})))}onFlagChanged({flag:e,status:i}){switch(i){case"default":this.store.dispatch(xu({flags:[e]}));break;case"enabled":this.store.dispatch(mf({flags:{[e]:!0}}));break;case"disabled":this.store.dispatch(mf({flags:{[e]:!1}}));break;default:throw new Error("Flag changed to invalid status")}}onAllFlagsReset(){this.store.dispatch(jh())}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["feature-flag-dialog"]],decls:4,vars:9,consts:[[3,"featureFlagStatuses","hasFlagsSentToServer","showFlagsFilter","flagChanged","allFlagsReset"]],template:function(e,i){1&e&&(h(0,"feature-flag-dialog-component",0),I("flagChanged",function(o){return i.onFlagChanged(o)})("allFlagsReset",function(){return i.onAllFlagsReset()}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("featureFlagStatuses",W(1,3,i.featureFlags$))("hasFlagsSentToServer",W(2,5,i.hasFlagsSentToServer$))("showFlagsFilter",W(3,7,i.showFlagsFilter$))},dependencies:[xq,ct],encapsulation:2}),n})(),Mq=(()=>{class n{constructor(e,i){this.store=e,this.dialog=i,this.featureFlagDialogType=Cq,this.showFeatureFlags$=this.store.select(b6),this.ngUnsubscribe=new Ie}ngOnInit(){this.showFeatureFlags$.pipe(ot(this.ngUnsubscribe)).subscribe(e=>{if(e)return this.featureFlagsDialog=this.dialog.open(this.featureFlagDialogType),void this.featureFlagsDialog.afterClosed().pipe(ot(this.ngUnsubscribe)).subscribe(()=>{this.store.dispatch(xu({flags:["showFlags"]})),setTimeout(()=>{window.location.reload()},1)})})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(zl))},n.\u0275cmp=O({type:n,selectors:[["feature-flag-modal-trigger"]],decls:0,vars:0,template:function(e,i){},encapsulation:2}),n})(),Xye=["routeContainer"],wq=(()=>{class n{constructor(e){this.componentFactoryResolver=e}ngOnChanges(e){let i=e.activeNgComponent;if(i&&(this.routeContainer.clear(),i.currentValue)){let r=this.componentFactoryResolver.resolveComponentFactory(i.currentValue);this.routeContainer.createComponent(r)}}}return n.\u0275fac=function(e){return new(e||n)(C(fo))},n.\u0275cmp=O({type:n,selectors:[["router-outlet-component"]],viewQuery:function(e,i){if(1&e&&Ge(Xye,7,si),2&e){let r;Se(r=Ee())&&(i.routeContainer=r.first)}},inputs:{activeNgComponent:"activeNgComponent"},features:[Gt],decls:2,vars:0,consts:[["routeContainer",""]],template:function(e,i){1&e&&li(0,null,0)},encapsulation:2,changeDetection:0}),n})(),Sq=(()=>{class n{constructor(e,i){this.store=e,this.registry=i,this.activeNgComponent$=dn([this.store.select(No),this.store.select(z8)]).pipe(N(([r,o])=>r&&(null===o||Fo(r,o))?this.registry.getNgComponentByRouteKind(r.routeKind):null))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Dl))},n.\u0275cmp=O({type:n,selectors:[["router-outlet"]],decls:2,vars:3,consts:[[3,"activeNgComponent"]],template:function(e,i){1&e&&(P(0,"router-outlet-component",0),j(1,"async")),2&e&&_("activeNgComponent",W(1,1,i.activeNgComponent$))},dependencies:[wq,ct],encapsulation:2,changeDetection:0}),n})(),Eq=(()=>{class n{constructor(e){e.select(Rl).subscribe(i=>{document.body.classList.toggle("dark-mode",i)})}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["dark-mode-supporter"]],decls:0,vars:0,template:function(e,i){},styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),Cg=(()=>(function(n){n[n.ACTIVE_PLUGIN=0]="ACTIVE_PLUGIN"}(Cg||(Cg={})),Cg))(),Tq=(()=>{class n{constructor(e){this.deepLinker=e,this.onValueChange=new F,this.ngUnsubscribe=new Ie,this.onHashChange=mi(window,"popstate",{passive:!0}).pipe(ot(this.ngUnsubscribe))}ngOnInit(){this.onHashChange.subscribe(()=>{let e=this.deepLinker.getPluginId();e!==this.activePluginId&&this.onValueChange.emit({prop:Cg.ACTIVE_PLUGIN,value:e})})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnChanges(e){if(e.activePluginId){let i=e.activePluginId;this.deepLinker.setPluginId(null===i.currentValue?"":i.currentValue,{defaultValue:"",useLocationReplace:null===i.previousValue||i.firstChange})}}}return n.\u0275fac=function(e){return new(e||n)(C(_u))},n.\u0275cmp=O({type:n,selectors:[["hash-storage-component"]],inputs:{activePluginId:"activePluginId"},outputs:{onValueChange:"onValueChange"},features:[Gt],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),Dq=(()=>{class n{constructor(e){this.store=e,this.activePluginId$=this.store.pipe(un(Wo))}onValueChanged(e){e.prop===Cg.ACTIVE_PLUGIN&&this.store.dispatch(pS({plugin:e.value}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["hash-storage"]],decls:2,vars:3,consts:[[3,"activePluginId","onValueChange"]],template:function(e,i){1&e&&(h(0,"hash-storage-component",0),I("onValueChange",function(o){return i.onValueChanged(o)}),j(1,"async"),g()),2&e&&_("activePluginId",W(1,1,i.activePluginId$))},dependencies:[Tq,ct],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),exe=["*"];function iy(n){return function(){if(void 0===fE&&(fE=null,typeof window<"u")){let n=window;void 0!==n.trustedTypes&&(fE=n.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return fE}()?.createHTML(n)||n}function Iq(n){return Error(`Unable to find icon with the name "${n}"`)}function Aq(n){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${n}".`)}function Rq(n){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${n}".`)}var Td=class{constructor(t,e,i){this.url=t,this.svgText=e,this.options=i}},Mg=(()=>{class n{constructor(e,i,r,o){this._httpClient=e,this._sanitizer=i,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,i,r){return this.addSvgIconInNamespace("",e,i,r)}addSvgIconLiteral(e,i,r){return this.addSvgIconLiteralInNamespace("",e,i,r)}addSvgIconInNamespace(e,i,r,o){return this._addSvgIconConfig(e,i,new Td(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,i,r,o){let s=this._sanitizer.sanitize(jr.HTML,r);if(!s)throw Rq(r);let a=iy(s);return this._addSvgIconConfig(e,i,new Td("",a,o))}addSvgIconSet(e,i){return this.addSvgIconSetInNamespace("",e,i)}addSvgIconSetLiteral(e,i){return this.addSvgIconSetLiteralInNamespace("",e,i)}addSvgIconSetInNamespace(e,i,r){return this._addSvgIconSetConfig(e,new Td(i,null,r))}addSvgIconSetLiteralInNamespace(e,i,r){let o=this._sanitizer.sanitize(jr.HTML,i);if(!o)throw Rq(i);let s=iy(o);return this._addSvgIconSetConfig(e,new Td("",s,r))}registerFontClassAlias(e,i=e){return this._fontCssClassesByAlias.set(e,i),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let i=this._sanitizer.sanitize(jr.RESOURCE_URL,e);if(!i)throw Aq(e);let r=this._cachedIconsByUrl.get(i);return r?Ht(mE(r)):this._loadSvgIconFromConfig(new Td(e,null)).pipe(Nt(o=>this._cachedIconsByUrl.set(i,o)),N(o=>mE(o)))}getNamedSvgIcon(e,i=""){let r=Pq(i,e),o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(i,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);let s=this._iconSetConfigs.get(i);return s?this._getSvgFromIconSetConfigs(e,s):ea(Iq(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?Ht(mE(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(N(i=>mE(i)))}_getSvgFromIconSetConfigs(e,i){let r=this._extractIconWithNameFromAnySet(e,i);return r?Ht(r):co(i.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(zr(a=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(jr.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),Ht(null)})))).pipe(N(()=>{let s=this._extractIconWithNameFromAnySet(e,i);if(!s)throw Iq(e);return s}))}_extractIconWithNameFromAnySet(e,i){for(let r=i.length-1;r>=0;r--){let o=i[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(Nt(i=>e.svgText=i),N(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?Ht(null):this._fetchIcon(e).pipe(Nt(i=>e.svgText=i))}_extractSvgIconFromSet(e,i,r){let o=e.querySelector(`[id="${i}"]`);if(!o)return null;let s=o.cloneNode(!0);if(s.removeAttribute("id"),"svg"===s.nodeName.toLowerCase())return this._setSvgAttributes(s,r);if("symbol"===s.nodeName.toLowerCase())return this._setSvgAttributes(this._toSvgElement(s),r);let a=this._svgElementFromString(iy("<svg></svg>"));return a.appendChild(s),this._setSvgAttributes(a,r)}_svgElementFromString(e){let i=this._document.createElement("DIV");i.innerHTML=e;let r=i.querySelector("svg");if(!r)throw Error("<svg> tag not found");return r}_toSvgElement(e){let i=this._svgElementFromString(iy("<svg></svg>")),r=e.attributes;for(let o=0;o<r.length;o++){let{name:s,value:a}=r[o];"id"!==s&&i.setAttribute(s,a)}for(let o=0;o<e.childNodes.length;o++)e.childNodes[o].nodeType===this._document.ELEMENT_NODE&&i.appendChild(e.childNodes[o].cloneNode(!0));return i}_setSvgAttributes(e,i){return e.setAttribute("fit",""),e.setAttribute("height","100%"),e.setAttribute("width","100%"),e.setAttribute("preserveAspectRatio","xMidYMid meet"),e.setAttribute("focusable","false"),i&&i.viewBox&&e.setAttribute("viewBox",i.viewBox),e}_fetchIcon(e){let{url:i,options:r}=e,o=r?.withCredentials??!1;if(!this._httpClient)throw Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.");if(null==i)throw Error(`Cannot fetch icon from URL "${i}".`);let s=this._sanitizer.sanitize(jr.RESOURCE_URL,i);if(!s)throw Aq(i);let a=this._inProgressUrlFetches.get(s);if(a)return a;let l=this._httpClient.get(s,{responseType:"text",withCredentials:o}).pipe(N(c=>iy(c)),function(n){return qt((t,e)=>{try{t.subscribe(e)}finally{e.add(n)}})}(()=>this._inProgressUrlFetches.delete(s)),Cs());return this._inProgressUrlFetches.set(s,l),l}_addSvgIconConfig(e,i,r){return this._svgIconConfigs.set(Pq(e,i),r),this}_addSvgIconSetConfig(e,i){let r=this._iconSetConfigs.get(e);return r?r.push(i):this._iconSetConfigs.set(e,[i]),this}_svgElementFromConfig(e){if(!e.svgElement){let i=this._svgElementFromString(e.svgText);this._setSvgAttributes(i,e.options),e.svgElement=i}return e.svgElement}_getIconConfigFromResolvers(e,i){for(let r=0;r<this._resolvers.length;r++){let o=this._resolvers[r](i,e);if(o)return rxe(o)?new Td(o.url,null,o.options):new Td(o,null)}}}return n.\u0275fac=function(e){return new(e||n)(k(lf,8),k(Zp),k(Lt,8),k(rs))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})();function mE(n){return n.cloneNode(!0)}function Pq(n,t){return n+":"+t}function rxe(n){return!(!n.url||!n.options)}new Ts,new sd,new Ts,new Ts;var oxe=zs(class{constructor(n){this._elementRef=n}}),sxe=new ie("MAT_ICON_DEFAULT_OPTIONS"),axe=new ie("mat-icon-location",{providedIn:"root",factory:function(){let n=ai(Lt),t=n?n.location:null;return{getPathname:()=>t?t.pathname+t.search:""}}}),Oq=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],cxe=Oq.map(n=>`[${n}]`).join(", "),dxe=/^url\(['"]?#(.*?)['"]?\)$/,En=(()=>{class n extends oxe{get inline(){return this._inline}set inline(e){this._inline=Rt(e)}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){let i=this._cleanupFontValue(e);i!==this._fontSet&&(this._fontSet=i,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){let i=this._cleanupFontValue(e);i!==this._fontIcon&&(this._fontIcon=i,this._updateFontIconClasses())}constructor(e,i,r,o,s,a){super(e),this._iconRegistry=i,this._location=o,this._errorHandler=s,this._inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Mn.EMPTY,a&&(a.color&&(this.color=this.defaultColor=a.color),a.fontSet&&(this.fontSet=a.fontSet)),r||e.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let i=e.split(":");switch(i.length){case 1:return["",i[0]];case 2:return i;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let i=this._location.getPathname();i!==this._previousPath&&(this._previousPath=i,this._prependPathToReferences(i))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let i=this._location.getPathname();this._previousPath=i,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(i),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,i=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();i--;){let r=e.childNodes[i];(1!==r.nodeType||"svg"===r.nodeName.toLowerCase())&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,i=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),i.forEach(r=>e.classList.add(r)),this._previousFontSetClass=i,this.fontIcon!==this._previousFontIconClass&&!i.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return"string"==typeof e?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let i=this._elementsWithExternalReferences;i&&i.forEach((r,o)=>{r.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let i=e.querySelectorAll(cxe),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<i.length;o++)Oq.forEach(s=>{let a=i[o],l=a.getAttribute(s),c=l?l.match(dxe):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:s,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[i,r]=this._splitIconName(e);i&&(this._svgNamespace=i),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,i).pipe(Yt(1)).subscribe(o=>this._setSvgElement(o),o=>{this._errorHandler.handleError(new Error(`Error retrieving icon ${i}:${r}! ${o.message}`))})}}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Mg),yo("aria-hidden"),C(axe),C(rs),C(sxe,8))},n.\u0275cmp=O({type:n,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:8,hostBindings:function(e,i){2&e&&(Be("data-mat-icon-type",i._usingFontIcon()?"font":"svg")("data-mat-icon-name",i._svgName||i.fontIcon)("data-mat-icon-namespace",i._svgNamespace||i.fontSet)("fontIcon",i._usingFontIcon()?i.fontIcon:null),nt("mat-icon-inline",i.inline)("mat-icon-no-color","primary"!==i.color&&"accent"!==i.color&&"warn"!==i.color))},inputs:{color:"color",inline:"inline",svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],features:[Ke],ngContentSelectors:exe,decls:1,vars:0,template:function(e,i){1&e&&(Dn(),zt(0))},styles:[".mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0}),n})(),di=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,fn]}),n})(),uxe=["*",[["mat-toolbar-row"]]],pxe=["*","mat-toolbar-row"],fxe=zs(class{constructor(n){this._elementRef=n}}),mxe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["mat-toolbar-row"]],hostAttrs:[1,"mat-toolbar-row"],exportAs:["matToolbarRow"]}),n})(),kq=(()=>{class n extends fxe{constructor(e,i,r){super(e),this._platform=i,this._document=r}ngAfterViewInit(){this._platform.isBrowser&&(this._checkToolbarMixedModes(),this._toolbarRows.changes.subscribe(()=>this._checkToolbarMixedModes()))}_checkToolbarMixedModes(){}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(Lt))},n.\u0275cmp=O({type:n,selectors:[["mat-toolbar"]],contentQueries:function(e,i,r){if(1&e&&Ti(r,mxe,5),2&e){let o;Se(o=Ee())&&(i._toolbarRows=o)}},hostAttrs:[1,"mat-toolbar"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-toolbar-multiple-rows",i._toolbarRows.length>0)("mat-toolbar-single-row",0===i._toolbarRows.length)},inputs:{color:"color"},exportAs:["matToolbar"],features:[Ke],ngContentSelectors:pxe,decls:2,vars:0,template:function(e,i){1&e&&(Dn(uxe),zt(0),zt(1,1))},styles:[".cdk-high-contrast-active .mat-toolbar{outline:solid 1px}.mat-toolbar .mat-mdc-button-base.mat-unthemed{--mdc-text-button-label-text-color: inherit;--mdc-outlined-button-label-text-color: inherit}.mat-toolbar-row,.mat-toolbar-single-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}.mat-toolbar-multiple-rows{display:flex;box-sizing:border-box;flex-direction:column;width:100%}"],encapsulation:2,changeDetection:0}),n})(),Fq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,fn]}),n})();function J2(n){return n.state!==Te.NOT_LOADED&&n.state!==Te.LOADING}var gxe=br(XW,ye(y1,n=>J2(n)?{...n,settings:{...n.settings,reloadEnabled:!n.settings.reloadEnabled}}:n),ye(x1,(n,{periodInMs:t})=>{if(!J2(n))return n;let e=t>=3e4?t:n.settings.reloadPeriodInMs;return{...n,settings:{...n.settings,reloadPeriodInMs:e}}}),ye(C1,(n,{size:t})=>{if(!J2(n))return n;let e=t>0?t:n.settings.pageSize;return{...n,settings:{...n.settings,pageSize:e}}}),ye(Il,(n,{partialSettings:t})=>{let e={};return Number.isFinite(t.pageSize)&&t.pageSize>0&&(e.pageSize=Number(t.pageSize)),"boolean"==typeof t.autoReload&&(e.reloadEnabled=t.autoReload),Number.isFinite(t.autoReloadPeriodInMs)&&t.autoReloadPeriodInMs>3e4&&(e.reloadPeriodInMs=Number(t.autoReloadPeriodInMs)),{...n,settings:{...n.settings,...e}}}));function Nq(n,t){return gxe(n,t)}var _xe=["input"],bxe=["label"],vxe=["*"],yxe=new ie("mat-checkbox-default-options",{providedIn:"root",factory:function(){return{color:"accent",clickAction:"check-indeterminate"}}});var xxe={provide:Mo,useExisting:$n(()=>ha),multi:!0},Cxe=0,Lq={color:"accent",clickAction:"check-indeterminate"},Mxe=ku(zs(us(so(class{constructor(n){this._elementRef=n}})))),wxe=(()=>{class n extends Mxe{get inputId(){return`${this.id||this._uniqueId}-input`}get required(){return this._required}set required(e){this._required=Rt(e)}constructor(e,i,r,o,s,a,l){super(i),this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=l,this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new F,this.indeterminateChange=new F,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=0,this._controlValueAccessorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||Lq,this.color=this.defaultColor=this._options.color||Lq.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`${e}${++Cxe}`}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){let i=Rt(e);i!=this.checked&&(this._checked=i,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){let i=Rt(e);i!==this.disabled&&(this._disabled=i,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let i=e!=this._indeterminate;this._indeterminate=Rt(e),i&&(this._transitionCheckState(this._indeterminate?3:this.checked?1:2),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_transitionCheckState(e){let i=this._currentCheckState,r=this._getAnimationTargetElement();if(i!==e&&r&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(i,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;this.disabled||"noop"===e?!this.disabled&&"noop"===e&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate):(this.indeterminate&&"check"!==e&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?1:2),this._emitChangeEvent())}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,i){if("NoopAnimations"===this._animationMode)return"";switch(e){case 0:if(1===i)return this._animationClasses.uncheckedToChecked;if(3==i)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case 2:return 1===i?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case 1:return 2===i?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case 3:return 1===i?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let i=this._inputElement;i&&(i.nativeElement.indeterminate=e)}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&(Ge(_xe,5),Ge(bxe,5),Ge(mo,5)),2&e){let r;Se(r=Ee())&&(i._inputElement=r.first),Se(r=Ee())&&(i._labelElement=r.first),Se(r=Ee())&&(i.ripple=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],id:"id",required:"required",labelPosition:"labelPosition",name:"name",value:"value",checked:"checked",disabled:"disabled",indeterminate:"indeterminate"},outputs:{change:"change",indeterminateChange:"indeterminateChange"},features:[Ke]}),n})(),ha=(()=>{class n extends wxe{constructor(e,i,r,o,s,a){super("mat-mdc-checkbox-",e,i,r,o,s,a),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"}}focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let i=new class{};return i.source=this,i.checked=e,i}_getAnimationTargetElement(){return this._inputElement?.nativeElement}_onInputClick(){super._handleInputClick()}_onTouchTargetClick(){super._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(at),yo("tabindex"),C(hi,8),C(yxe,8))},n.\u0275cmp=O({type:n,selectors:[["mat-checkbox"]],hostAttrs:[1,"mat-mdc-checkbox"],hostVars:12,hostBindings:function(e,i){2&e&&(jo("id",i.id),Be("tabindex",null)("aria-label",null)("aria-labelledby",null),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode)("mdc-checkbox--disabled",i.disabled)("mat-mdc-checkbox-disabled",i.disabled)("mat-mdc-checkbox-checked",i.checked))},inputs:{disableRipple:"disableRipple",color:"color",tabIndex:"tabIndex"},exportAs:["matCheckbox"],features:[Qt([xxe]),Ke],ngContentSelectors:vxe,decls:15,vars:19,consts:[[1,"mdc-form-field",3,"click"],[1,"mdc-checkbox"],["checkbox",""],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"checked","indeterminate","disabled","id","required","tabIndex","blur","click","change"],["input",""],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[3,"for"],["label",""]],template:function(e,i){if(1&e&&(Dn(),h(0,"div",0),I("click",function(o){return i._preventBubblingFromLabel(o)}),h(1,"div",1,2)(3,"div",3),I("click",function(){return i._onTouchTargetClick()}),g(),h(4,"input",4,5),I("blur",function(){return i._onBlur()})("click",function(){return i._onInputClick()})("change",function(o){return i._onInteractionEvent(o)}),g(),P(6,"div",6),h(7,"div",7),Nn(),h(8,"svg",8),P(9,"path",9),g(),Oo(),P(10,"div",10),g(),P(11,"div",11),g(),h(12,"label",12,13),zt(14),g()()),2&e){let r=it(2);nt("mdc-form-field--align-end","before"==i.labelPosition),v(4),nt("mdc-checkbox--selected",i.checked),_("checked",i.checked)("indeterminate",i.indeterminate)("disabled",i.disabled)("id",i.inputId)("required",i.required)("tabIndex",i.tabIndex),Be("aria-label",i.ariaLabel||null)("aria-labelledby",i.ariaLabelledby)("aria-describedby",i.ariaDescribedby)("name",i.name)("value",i.value),v(7),_("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)("matRippleCentered",!0),v(1),_("for",i.inputId)}},dependencies:[mo],styles:['.mdc-touch-target-wrapper{display:inline}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:mdc-animation-deceleration-curve-timing-function;transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom}.mdc-checkbox[hidden]{display:none}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{pointer-events:none;border:2px solid rgba(0,0,0,0);border-radius:6px;box-sizing:content-box;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:100%;width:100%}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring{border-color:CanvasText}}.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{content:"";border:2px solid rgba(0,0,0,0);border-radius:8px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);height:calc(100% + 4px);width:calc(100% + 4px)}@media screen and (forced-colors: active){.mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__focus-ring::after,.mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__focus-ring::after{border-color:CanvasText}}@media all and (-ms-high-contrast: none){.mdc-checkbox .mdc-checkbox__focus-ring{display:none}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--upgraded .mdc-checkbox__checkmark{opacity:1}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms 0ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear 0s;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear 0s;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear 0s;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background{transition:border-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit}.mdc-checkbox__native-control:disabled{cursor:default;pointer-events:none}.mdc-checkbox--touch{margin:calc((var(--mdc-checkbox-state-layer-size, 48px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mdc-checkbox--touch .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 48px)) / 2);width:var(--mdc-checkbox-state-layer-size, 48px);height:var(--mdc-checkbox-state-layer-size, 48px)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms 0ms cubic-bezier(0, 0, 0.2, 1),transform 180ms 0ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark,.mdc-checkbox__native-control[data-indeterminate=true]~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__background,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__checkmark-path,.mdc-checkbox.mdc-checkbox--upgraded .mdc-checkbox__mixedmark{transition:none}.mdc-form-field{display:inline-flex;align-items:center;vertical-align:middle}.mdc-form-field[hidden]{display:none}.mdc-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{margin-left:auto;margin-right:0}[dir=rtl] .mdc-form-field>label,.mdc-form-field>label[dir=rtl]{padding-left:0;padding-right:4px}.mdc-form-field--nowrap>label{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{margin-left:0;margin-right:auto}[dir=rtl] .mdc-form-field--align-end>label,.mdc-form-field--align-end>label[dir=rtl]{padding-left:4px;padding-right:0}.mdc-form-field--space-between{justify-content:space-between}.mdc-form-field--space-between>label{margin:0}[dir=rtl] .mdc-form-field--space-between>label,.mdc-form-field--space-between>label[dir=rtl]{margin:0}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox .mdc-checkbox{padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, rgba(0, 0, 0, 0.38));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[disabled]:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true][disabled]~.mdc-checkbox__background{border-color:transparent;background-color:var(--mdc-checkbox-disabled-selected-icon-color, rgba(0, 0, 0, 0.38))}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:disabled~.mdc-checkbox__background .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, #fff)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:hover.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mdc-theme-secondary, #018786));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox.mdc-ripple-upgraded--background-focused.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(.mdc-ripple-upgraded):focus.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-FF018786FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active .mdc-checkbox__native-control[data-indeterminate=true]:enabled~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}@keyframes mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786{0%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}50%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}}@keyframes mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786{0%,80%{border-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786));background-color:var(--mdc-checkbox-selected-pressed-icon-color, var(--mdc-theme-secondary, #018786))}100%{border-color:var(--mdc-checkbox-unselected-pressed-icon-color, rgba(0, 0, 0, 0.54));background-color:transparent}}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-in-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background,.mat-mdc-checkbox .mdc-checkbox:not(:disabled):active.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__native-control:enabled~.mdc-checkbox__background{animation-name:mdc-checkbox-fade-out-background-8A000000FF01878600000000FF018786}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__background{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px) / 2)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control{top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px)) / 2);width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px)}.mat-mdc-checkbox .mdc-checkbox:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple{opacity:.04;transform:scale(1);transition:opacity 80ms 0 cubic-bezier(0, 0, 0.2, 1),transform 80ms 0 cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-checkbox .mdc-checkbox .mdc-checkbox__native-control:not([disabled]):focus~.mdc-checkbox__ripple{opacity:.16}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox._mat-animation-noopable *,.mat-mdc-checkbox._mat-animation-noopable *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__native-control:focus:enabled:not(:checked):not(:indeterminate):not([data-indeterminate=true])~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, black)}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0}),n})(),Sxe={provide:wo,useExisting:$n(()=>Exe),multi:!0},Exe=(()=>{class n extends Z2{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["mat-checkbox","required","","formControlName",""],["mat-checkbox","required","","formControl",""],["mat-checkbox","required","","ngModel",""]],features:[Qt([Sxe]),Ke]}),n})(),Bq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Fc=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Bl,Bq,fn,Bq]}),n})(),Hq=qo({passive:!0}),zq=(()=>{class n{constructor(e,i){this._platform=e,this._ngZone=i,this._monitoredElements=new Map}monitor(e){if(!this._platform.isBrowser)return Jr;let i=Hs(e),r=this._monitoredElements.get(i);if(r)return r.subject;let o=new Ie,s="cdk-text-field-autofilled",a=l=>{"cdk-text-field-autofill-start"!==l.animationName||i.classList.contains(s)?"cdk-text-field-autofill-end"===l.animationName&&i.classList.contains(s)&&(i.classList.remove(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!1}))):(i.classList.add(s),this._ngZone.run(()=>o.next({target:l.target,isAutofilled:!0})))};return this._ngZone.runOutsideAngular(()=>{i.addEventListener("animationstart",a,Hq),i.classList.add("cdk-text-field-autofill-monitored")}),this._monitoredElements.set(i,{subject:o,unlisten:()=>{i.removeEventListener("animationstart",a,Hq)}}),o}stopMonitoring(e){let i=Hs(e),r=this._monitoredElements.get(i);r&&(r.unlisten(),r.subject.complete(),i.classList.remove("cdk-text-field-autofill-monitored"),i.classList.remove("cdk-text-field-autofilled"),this._monitoredElements.delete(i))}ngOnDestroy(){this._monitoredElements.forEach((e,i)=>this.stopMonitoring(i))}}return n.\u0275fac=function(e){return new(e||n)(k(Gn),k(at))},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),Uq=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Dxe=new ie("MAT_INPUT_VALUE_ACCESSOR"),Ixe=["button","checkbox","file","hidden","image","radio","range","reset","submit"],Axe=0,Rxe=B1(class{constructor(n,t,e,i){this._defaultErrorStateMatcher=n,this._parentForm=t,this._parentFormGroup=e,this.ngControl=i,this.stateChanges=new Ie}}),Uu=(()=>{class n extends Rxe{get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this.focused&&(this.focused=!1,this.stateChanges.next())}get id(){return this._id}set id(e){this._id=e||this._uid}get required(){return this._required??this.ngControl?.control?.hasValidator(Ul.required)??!1}set required(e){this._required=Rt(e)}get type(){return this._type}set type(e){this._type=e||"text",this._validateType(),!this._isTextarea&&o2().has(this._type)&&(this._elementRef.nativeElement.type=this._type)}get value(){return this._inputValueAccessor.value}set value(e){e!==this.value&&(this._inputValueAccessor.value=e,this.stateChanges.next())}get readonly(){return this._readonly}set readonly(e){this._readonly=Rt(e)}constructor(e,i,r,o,s,a,l,c,d,u){super(a,o,s,r),this._elementRef=e,this._platform=i,this._autofillMonitor=c,this._formField=u,this._uid="mat-input-"+Axe++,this.focused=!1,this.stateChanges=new Ie,this.controlType="mat-input",this.autofilled=!1,this._disabled=!1,this._type="text",this._readonly=!1,this._neverEmptyInputTypes=["date","datetime","datetime-local","month","time","week"].filter(m=>o2().has(m)),this._iOSKeyupListener=m=>{let b=m.target;!b.value&&0===b.selectionStart&&0===b.selectionEnd&&(b.setSelectionRange(1,1),b.setSelectionRange(0,0))};let p=this._elementRef.nativeElement,f=p.nodeName.toLowerCase();this._inputValueAccessor=l||p,this._previousNativeValue=this.value,this.id=this.id,i.IOS&&d.runOutsideAngular(()=>{e.nativeElement.addEventListener("keyup",this._iOSKeyupListener)}),this._isServer=!this._platform.isBrowser,this._isNativeSelect="select"===f,this._isTextarea="textarea"===f,this._isInFormField=!!u,this._isNativeSelect&&(this.controlType=p.multiple?"mat-native-select-multiple":"mat-native-select")}ngAfterViewInit(){this._platform.isBrowser&&this._autofillMonitor.monitor(this._elementRef.nativeElement).subscribe(e=>{this.autofilled=e.isAutofilled,this.stateChanges.next()})}ngOnChanges(){this.stateChanges.next()}ngOnDestroy(){this.stateChanges.complete(),this._platform.isBrowser&&this._autofillMonitor.stopMonitoring(this._elementRef.nativeElement),this._platform.IOS&&this._elementRef.nativeElement.removeEventListener("keyup",this._iOSKeyupListener)}ngDoCheck(){this.ngControl&&(this.updateErrorState(),null!==this.ngControl.disabled&&this.ngControl.disabled!==this.disabled&&(this.disabled=this.ngControl.disabled,this.stateChanges.next())),this._dirtyCheckNativeValue(),this._dirtyCheckPlaceholder()}focus(e){this._elementRef.nativeElement.focus(e)}_focusChanged(e){e!==this.focused&&(this.focused=e,this.stateChanges.next())}_onInput(){}_dirtyCheckNativeValue(){let e=this._elementRef.nativeElement.value;this._previousNativeValue!==e&&(this._previousNativeValue=e,this.stateChanges.next())}_dirtyCheckPlaceholder(){let e=this._getPlaceholder();if(e!==this._previousPlaceholder){let i=this._elementRef.nativeElement;this._previousPlaceholder=e,e?i.setAttribute("placeholder",e):i.removeAttribute("placeholder")}}_getPlaceholder(){return this.placeholder||null}_validateType(){Ixe.indexOf(this._type)}_isNeverEmpty(){return this._neverEmptyInputTypes.indexOf(this._type)>-1}_isBadInput(){let e=this._elementRef.nativeElement.validity;return e&&e.badInput}get empty(){return!(this._isNeverEmpty()||this._elementRef.nativeElement.value||this._isBadInput()||this.autofilled)}get shouldLabelFloat(){if(this._isNativeSelect){let e=this._elementRef.nativeElement,i=e.options[0];return this.focused||e.multiple||!this.empty||!!(e.selectedIndex>-1&&i&&i.label)}return this.focused||!this.empty}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focused||this.focus()}_isInlineSelect(){let e=this._elementRef.nativeElement;return this._isNativeSelect&&(e.multiple||e.size>1)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Gn),C(Gs,10),C(vg,8),C(yg,8),C(H1),C(Dxe,10),C(zq),C(at),C(Sf,8))},n.\u0275dir=we({type:n,selectors:[["input","matInput",""],["textarea","matInput",""],["select","matNativeControl",""],["input","matNativeControl",""],["textarea","matNativeControl",""]],hostAttrs:[1,"mat-mdc-input-element"],hostVars:18,hostBindings:function(e,i){1&e&&I("focus",function(){return i._focusChanged(!0)})("blur",function(){return i._focusChanged(!1)})("input",function(){return i._onInput()}),2&e&&(jo("id",i.id)("disabled",i.disabled)("required",i.required),Be("name",i.name||null)("readonly",i.readonly&&!i._isNativeSelect||null)("aria-invalid",i.empty&&i.required?null:i.errorState)("aria-required",i.required)("id",i.id),nt("mat-input-server",i._isServer)("mat-mdc-form-field-textarea-control",i._isInFormField&&i._isTextarea)("mat-mdc-form-field-input-control",i._isInFormField)("mdc-text-field__input",i._isInFormField)("mat-mdc-native-select-inline",i._isInlineSelect()))},inputs:{disabled:"disabled",id:"id",placeholder:"placeholder",name:"name",required:"required",type:"type",errorStateMatcher:"errorStateMatcher",userAriaDescribedBy:["aria-describedby","userAriaDescribedBy"],value:"value",readonly:"readonly"},exportAs:["matInput"],features:[Qt([{provide:Qv,useExisting:n}]),Ke,Gt]}),n})(),$a=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Ef,Ef,Uq,fn]}),n})();function Pxe(n,t){if(1&n&&(h(0,"mat-error"),T(1),g()),2&n){let e=w();v(1),He(" Reload period has to be minimum of ",e.MIN_RELOAD_PERIOD_IN_S," seconds. ")}}function Oxe(n,t){1&n&&(h(0,"mat-error"),T(1," Page size has to be a positive integer. "),g())}var jq=(()=>{class n{constructor(){this.reloadToggled=new F,this.reloadPeriodInMsChanged=new F,this.pageSizeChanged=new F,this.MIN_RELOAD_PERIOD_IN_S=30,this.reloadPeriodControl=new ty(this.MIN_RELOAD_PERIOD_IN_S,[Ul.required,Ul.min(this.MIN_RELOAD_PERIOD_IN_S)]),this.paginationControl=new ty(1,[Ul.required,Ul.min(1),n=>{let t=Number(n.value);return Math.round(t)===n.value?null:{integer:{value:n.value}}}]),this.ngUnsubscribe=new Ie}ngOnInit(){this.reloadPeriodControl.valueChanges.pipe(ot(this.ngUnsubscribe),wr(500),ke(()=>this.reloadPeriodControl.valid)).subscribe(()=>{this.reloadPeriodControl.valid&&this.reloadPeriodInMsChanged.emit(1e3*this.reloadPeriodControl.value)}),this.paginationControl.valueChanges.pipe(ot(this.ngUnsubscribe),wr(500),ke(()=>this.paginationControl.valid)).subscribe(()=>{this.pageSizeChanged.emit(this.paginationControl.value)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnChanges(e){if(e.reloadPeriodInMs){let i=e.reloadPeriodInMs;i.previousValue!==i.currentValue&&this.reloadPeriodControl.setValue(i.currentValue/1e3)}if(e.reloadEnabled&&(e.reloadEnabled.currentValue?this.reloadPeriodControl.enable():this.reloadPeriodControl.disable()),e.pageSize){let i=e.pageSize;i.previousValue!==i.currentValue&&this.paginationControl.setValue(i.currentValue)}}onReloadToggle(){this.reloadToggled.emit()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["settings-dialog-component"]],inputs:{reloadEnabled:"reloadEnabled",reloadPeriodInMs:"reloadPeriodInMs",pageSize:"pageSize"},outputs:{reloadToggled:"reloadToggled",reloadPeriodInMsChanged:"reloadPeriodInMsChanged",pageSizeChanged:"pageSizeChanged"},features:[Gt],decls:18,vars:5,consts:[[1,"reload-toggle"],[3,"checked","change"],["matInput","","type","number",1,"reload-period",3,"formControl"],[4,"ngIf"],["matInput","","type","number",1,"page-size",3,"formControl"]],template:function(e,i){1&e&&(h(0,"h3"),T(1,"Settings"),g(),h(2,"div")(3,"div",0)(4,"mat-checkbox",1),I("change",function(){return i.onReloadToggle()}),T(5,"Reload data"),g()(),h(6,"div")(7,"mat-form-field")(8,"mat-label"),T(9,"Reload Period (seconds)"),g(),P(10,"input",2),g(),S(11,Pxe,2,1,"mat-error",3),g()(),h(12,"div")(13,"mat-form-field")(14,"mat-label"),T(15,"Pagination Limit"),g(),P(16,"input",4),g(),S(17,Oxe,2,0,"mat-error",3),g()),2&e&&(v(4),_("checked",i.reloadEnabled),v(6),_("formControl",i.reloadPeriodControl),v(1),_("ngIf",i.reloadPeriodControl.hasError("min")||i.reloadPeriodControl.hasError("required")),v(5),_("formControl",i.paginationControl),v(1),_("ngIf",i.paginationControl.invalid))},dependencies:[Fe,bg,Y2,cE,Q2,ha,Uu,Ka,kc,M9],styles:["[_nghost-%COMP%] {\n  font-size: 15px;\n}\n\n[_nghost-%COMP%]    > div[_ngcontent-%COMP%] {\n  margin: 16px;\n}\n\nh3[_ngcontent-%COMP%] {\n  font-size: 20px;\n  margin: 16px;\n}\n\n.reload-toggle[_ngcontent-%COMP%] {\n  margin-bottom: 16px;\n}"]}),n})(),Gq=(()=>{class n{constructor(e){this.store=e,this.reloadEnabled$=this.store.select(Iv),this.reloadPeriodInMs$=this.store.select(Av),this.pageSize$=this.store.select(_f)}onReloadToggled(){this.store.dispatch(y1())}onReloadPeriodInMsChanged(e){this.store.dispatch(x1({periodInMs:e}))}onPageSizeChanged(e){this.store.dispatch(C1({size:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["settings-dialog"]],decls:4,vars:9,consts:[[3,"reloadEnabled","reloadPeriodInMs","pageSize","reloadToggled","reloadPeriodInMsChanged","pageSizeChanged"]],template:function(e,i){1&e&&(h(0,"settings-dialog-component",0),I("reloadToggled",function(){return i.onReloadToggled()})("reloadPeriodInMsChanged",function(o){return i.onReloadPeriodInMsChanged(o)})("pageSizeChanged",function(o){return i.onPageSizeChanged(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("reloadEnabled",W(1,3,i.reloadEnabled$))("reloadPeriodInMs",W(2,5,i.reloadPeriodInMs$))("pageSize",W(3,7,i.pageSize$))},dependencies:[jq,ct],encapsulation:2}),n})(),Wq=(()=>{class n{constructor(e){this.dialog=e}isButtonDisabled(){return this.settingsLoadState===Te.NOT_LOADED||this.settingsLoadState===Te.LOADING}openDialog(){this.dialog.open(Gq,{width:"400px"})}}return n.\u0275fac=function(e){return new(e||n)(C(zl))},n.\u0275cmp=O({type:n,selectors:[["settings-button-component"]],inputs:{settingsLoadState:"settingsLoadState"},decls:2,vars:1,consts:[["mat-icon-button","",3,"disabled","click"],["svgIcon","settings_24px"]],template:function(e,i){1&e&&(h(0,"button",0),I("click",function(){return i.openDialog()}),P(1,"mat-icon",1),g()),2&e&&_("disabled",i.isButtonDisabled())},dependencies:[$i,En],encapsulation:2}),n})(),qq=(()=>{class n{constructor(e){this.store=e,this.settingsLoadState$=this.store.select(t2)}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["settings-button"]],decls:2,vars:3,consts:[[3,"settingsLoadState"]],template:function(e,i){1&e&&(P(0,"settings-button-component",0),j(1,"async")),2&e&&_("settingsLoadState",W(1,1,i.settingsLoadState$))},dependencies:[Wq,ct],encapsulation:2}),n})(),Bxe=["mat-menu-item",""];function Vxe(n,t){1&n&&(Nn(),h(0,"svg",3),P(1,"polygon",4),g())}var Hxe=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],zxe=["mat-icon, [matMenuItemIcon]","*"];function Uxe(n,t){if(1&n){let e=ge();h(0,"div",0),I("keydown",function(r){return X(e),Q(w()._handleKeydown(r))})("click",function(){return X(e),Q(w().closed.emit("click"))})("@transformMenu.start",function(r){return X(e),Q(w()._onAnimationStart(r))})("@transformMenu.done",function(r){return X(e),Q(w()._onAnimationDone(r))}),h(1,"div",1),zt(2),g()()}if(2&n){let e=w();_("id",e.panelId)("ngClass",e._classList)("@transformMenu",e._panelAnimationState),Be("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var jxe=["*"],eN=new ie("MAT_MENU_PANEL"),Gxe=us(so(class{})),jl=(()=>{class n extends Gxe{constructor(e,i,r,o,s){super(),this._elementRef=e,this._document=i,this._focusMonitor=r,this._parentMenu=o,this._changeDetectorRef=s,this.role="menuitem",this._hovered=new Ie,this._focused=new Ie,this._highlighted=!1,this._triggersSubmenu=!1,o?.addItem?.(this)}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,i):this._getHostElement().focus(i),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),i=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r<i.length;r++)i[r].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef?.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef?.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Lt),C(Xr),C(eN,8),C($t))},n.\u0275cmp=O({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-mdc-focus-indicator","mdc-list-item"],hostVars:8,hostBindings:function(e,i){1&e&&I("click",function(o){return i._checkDisabled(o)})("mouseenter",function(){return i._handleMouseEnter()}),2&e&&(Be("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled)("disabled",i.disabled||null),nt("mat-mdc-menu-item-highlighted",i._highlighted)("mat-mdc-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{disabled:"disabled",disableRipple:"disableRipple",role:"role"},exportAs:["matMenuItem"],features:[Ke],attrs:Bxe,ngContentSelectors:zxe,decls:5,vars:3,consts:[[1,"mdc-list-item__primary-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["class","mat-mdc-menu-submenu-icon","viewBox","0 0 5 10","focusable","false",4,"ngIf"],["viewBox","0 0 5 10","focusable","false",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(e,i){1&e&&(Dn(Hxe),zt(0),h(1,"span",0),zt(2,1),g(),P(3,"div",1),S(4,Vxe,2,0,"svg",2)),2&e&&(v(3),_("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),v(1),_("ngIf",i._triggersSubmenu))},dependencies:[Fe,mo],encapsulation:2,changeDetection:0}),n})(),Wxe=new ie("MatMenuContent"),_E={transformMenu:_r("transformMenu",[wi("void",rn({opacity:0,transform:"scale(0.8)"})),gi("void => enter",Ci("120ms cubic-bezier(0, 0, 0.2, 1)",rn({opacity:1,transform:"scale(1)"}))),gi("* => void",Ci("100ms 25ms linear",rn({opacity:0})))]),fadeInItems:_r("fadeInItems",[wi("showing",rn({opacity:1})),gi("void => *",[rn({opacity:0}),Ci("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},qxe=0,Xq=new ie("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),ry=(()=>{class n{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}get overlapTrigger(){return this._overlapTrigger}set overlapTrigger(e){this._overlapTrigger=Rt(e)}get hasBackdrop(){return this._hasBackdrop}set hasBackdrop(e){this._hasBackdrop=Rt(e)}set panelClass(e){let i=this._previousPanelClass;i&&i.length&&i.split(" ").forEach(r=>{this._classList[r]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(r=>{this._classList[r]=!0}),this._elementRef.nativeElement.className="")}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(e,i,r,o){this._elementRef=e,this._ngZone=i,this._defaultOptions=r,this._changeDetectorRef=o,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._directDescendantItems=new Oa,this._classList={},this._panelAnimationState="void",this._animationDone=new Ie,this.overlayPanelClass=this._defaultOptions.overlayPanelClass||"",this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new F,this.close=this.closed,this.panelId="mat-menu-panel-"+qxe++}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new sg(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(qn(this._directDescendantItems),Jn(e=>tn(...e.map(i=>i._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let i=this._keyManager;if("enter"===this._panelAnimationState&&i.activeItem?._hasFocus()){let r=e.toArray(),o=Math.max(0,Math.min(r.length-1,i.activeItemIndex||0));r[o]&&!r[o].disabled?i.setActiveItem(o):i.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusSubscription?.unsubscribe()}_hovered(){return this._directDescendantItems.changes.pipe(qn(this._directDescendantItems),Jn(i=>tn(...i.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let i=e.keyCode,r=this._keyManager;switch(i){case 27:vr(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case 39:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:return(38===i||40===i)&&r.setFocusOrigin("keyboard"),void r.onKeydown(e)}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusSubscription?.unsubscribe(),this._firstItemFocusSubscription=this._ngZone.onStable.pipe(Yt(1)).subscribe(()=>{let i=null;if(this._directDescendantItems.length&&(i=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!i||!i.contains(document.activeElement)){let r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&i&&i.focus()}})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){let i=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${i}`,o=Object.keys(this._classList).find(s=>s.startsWith(this._elevationPrefix));(!o||o===this._previousElevation)&&(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[r]=!0,this._previousElevation=r)}setPositionClasses(e=this.xPosition,i=this.yPosition){let r=this._classList;r["mat-menu-before"]="before"===e,r["mat-menu-after"]="after"===e,r["mat-menu-above"]="above"===i,r["mat-menu-below"]="below"===i,this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,"enter"===e.toState&&0===this._keyManager.activeItemIndex&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(qn(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(i=>i._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(at),C(Xq),C($t))},n.\u0275dir=we({type:n,contentQueries:function(e,i,r){if(1&e&&(Ti(r,Wxe,5),Ti(r,jl,5),Ti(r,jl,4)),2&e){let o;Se(o=Ee())&&(i.lazyContent=o.first),Se(o=Ee())&&(i._allItems=o),Se(o=Ee())&&(i.items=o)}},viewQuery:function(e,i){if(1&e&&Ge(Si,5),2&e){let r;Se(r=Ee())&&(i.templateRef=r.first)}},inputs:{backdropClass:"backdropClass",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],ariaDescribedby:["aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:"overlapTrigger",hasBackdrop:"hasBackdrop",panelClass:["class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"}}),n})(),Nc=(()=>{class n extends ry{constructor(e,i,r,o){super(e,i,r,o),this._elevationPrefix="mat-elevation-z",this._baseElevation=8}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(at),C(Xq),C($t))},n.\u0275cmp=O({type:n,selectors:[["mat-menu"]],hostVars:3,hostBindings:function(e,i){2&e&&Be("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},exportAs:["matMenu"],features:[Qt([{provide:eN,useExisting:n}]),Ke],ngContentSelectors:jxe,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mdc-menu-surface","mdc-menu-surface--open","mat-mdc-elevation-specific",3,"id","ngClass","keydown","click"],[1,"mat-mdc-menu-content","mdc-list"]],template:function(e,i){1&e&&(Dn(),S(0,Uxe,3,6,"ng-template"))},dependencies:[yn],styles:['.mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;list-style-type:none}.mat-mdc-menu-content:focus{outline:none}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;position:relative}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:16px;padding-right:16px;-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}.mat-mdc-menu-item:focus{outline:none}[dir=rtl] .mat-mdc-menu-item,.mat-mdc-menu-item[dir=rtl]{padding-left:16px;padding-right:16px}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item.mdc-list-item{align-items:center}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item .mat-icon{margin-right:16px}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:16px}.mat-mdc-menu-item .mdc-list-item__primary-text{white-space:normal}.mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:32px}[dir=rtl] .mat-mdc-menu-item.mat-mdc-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{position:absolute;top:50%;right:16px;transform:translateY(-50%);width:5px;height:10px;fill:currentColor}[dir=rtl] .mat-mdc-menu-submenu-icon{right:auto;left:16px;transform:translateY(-50%) scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[_E.transformMenu,_E.fadeInItems]},changeDetection:0}),n})(),Qq=new ie("mat-menu-scroll-strategy"),Qxe={provide:Qq,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},Yq=qo({passive:!0}),Zxe=(()=>{class n{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._menuCloseSubscription=e.close.subscribe(i=>{this._destroyMenu(i),("click"===i||"tab"===i)&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(i)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(e,i,r,o,s,a,l,c,d){this._overlay=e,this._element=i,this._viewContainerRef=r,this._menuItemInstance=a,this._dir=l,this._focusMonitor=c,this._ngZone=d,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Mn.EMPTY,this._hoverSubscription=Mn.EMPTY,this._menuCloseSubscription=Mn.EMPTY,this._changeDetectorRef=ai($t),this._handleTouchStart=u=>{Bv(u)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new F,this.onMenuOpen=this.menuOpened,this.menuClosed=new F,this.onMenuClose=this.menuClosed,this._scrollStrategy=o,this._parentMaterialMenu=s instanceof ry?s:void 0,i.nativeElement.addEventListener("touchstart",this._handleTouchStart,Yq)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,Yq),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=this.menu;if(this._menuOpen||!e)return;let i=this._createOverlay(e),r=i.getConfig(),o=r.positionStrategy;this._setPosition(e,o),r.hasBackdrop=null==e.hasBackdrop?!this.triggersSubmenu():e.hasBackdrop,i.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof ry&&(e._startAnimation(),e._directDescendantItems.changes.pipe(ot(e.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,i){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,i):this._element.nativeElement.focus(i)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;let i=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&("keydown"===e||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,i instanceof ry?(i._resetAnimation(),i.lazyContent?i._animationDone.pipe(ke(r=>"void"===r.toState),Yt(1),ot(i.lazyContent._attached)).subscribe({next:()=>i.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),i?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let i=0,r=e.parentMenu;for(;r;)i++,r=r.parentMenu;e.setElevation(i)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let i=this._getOverlayConfig(e);this._subscribeToPositions(e,i.positionStrategy),this._overlayRef=this._overlay.create(i),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new Qa({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(e,i){e.setPositionClasses&&i.positionChanges.subscribe(r=>{let o="start"===r.connectionPair.overlayX?"after":"before",s="top"===r.connectionPair.overlayY?"below":"above";this._ngZone?this._ngZone.run(()=>e.setPositionClasses(o,s)):e.setPositionClasses(o,s)})}_setPosition(e,i){let[r,o]="before"===e.xPosition?["end","start"]:["start","end"],[s,a]="above"===e.yPosition?["bottom","top"]:["top","bottom"],[l,c]=[s,a],[d,u]=[r,o],p=0;if(this.triggersSubmenu()){if(u=r="before"===e.xPosition?"start":"end",o=d="end"===r?"start":"end",this._parentMaterialMenu){if(null==this._parentInnerPadding){let f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}p="bottom"===s?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(l="top"===s?"bottom":"top",c="top"===a?"bottom":"top");i.withPositions([{originX:r,originY:l,overlayX:d,overlayY:s,offsetY:p},{originX:o,originY:l,overlayX:u,overlayY:s,offsetY:p},{originX:r,originY:c,overlayX:d,overlayY:a,offsetY:-p},{originX:o,originY:c,overlayX:u,overlayY:a,offsetY:-p}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),i=this._overlayRef.detachments();return tn(e,this._parentMaterialMenu?this._parentMaterialMenu.closed:Ht(),this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(ke(s=>s!==this._menuItemInstance),ke(()=>this._menuOpen)):Ht(),i)}_handleMousedown(e){Lv(e)||(this._openedBy=0===e.button?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let i=e.keyCode;(13===i||32===i)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(39===i&&"ltr"===this.dir||37===i&&"rtl"===this.dir)&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(ke(e=>e===this._menuItemInstance&&!e.disabled),Sa(0,Am)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof ry&&this.menu._isAnimating?this.menu._animationDone.pipe(Yt(1),Sa(0,Am),ot(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Yo(e.templateRef,this._viewContainerRef)),this._portal}}return n.\u0275fac=function(e){return new(e||n)(C(zi),C(Me),C(si),C(Qq),C(eN,8),C(jl,10),C(Xi,8),C(Xr),C(at))},n.\u0275dir=we({type:n,hostVars:3,hostBindings:function(e,i){1&e&&I("click",function(o){return i._handleClick(o)})("mousedown",function(o){return i._handleMousedown(o)})("keydown",function(o){return i._handleKeydown(o)}),2&e&&Be("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:["mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:["matMenuTriggerFor","menu"],menuData:["matMenuTriggerData","menuData"],restoreFocus:["matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"}}),n})(),Lc=(()=>{class n extends Zxe{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],exportAs:["matMenuTrigger"],features:[Ke]}),n})(),ju=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[Qxe],imports:[Pe,Bl,fn,Co,Pc,fn]}),n})();function Kxe(n,t){1&n&&P(0,"mat-icon",8)}function Jxe(n,t){1&n&&P(0,"mat-icon",9)}function $xe(n,t){1&n&&P(0,"mat-icon",10)}var Ws=(()=>(function(n){n[n.DEFAULT=0]="DEFAULT",n[n.DARK_MODE_ON=1]="DARK_MODE_ON",n[n.DARK_MODE_OFF=2]="DARK_MODE_OFF"}(Ws||(Ws={})),Ws))(),Zq=(()=>{class n{constructor(){this.DarkModeOverride=Ws,this.onOverrideChanged=new F}getButtonTitle(){let e;switch(this.darkModeOverride){case Ws.DEFAULT:e="Browser default";break;case Ws.DARK_MODE_ON:e="Dark mode";break;case Ws.DARK_MODE_OFF:e="Light mode"}return`Current mode: [${e}]. Switch between browser default, light, or dark theme.`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["app-header-dark-mode-toggle-component"]],inputs:{darkModeOverride:"darkModeOverride"},outputs:{onOverrideChanged:"onOverrideChanged"},decls:15,vars:6,consts:[["mat-icon-button","","aria-label","Menu for changing light or dark theme",3,"matMenuTriggerFor","ngSwitch","title"],["svgIcon","brightness_6_24px",4,"ngSwitchCase"],["svgIcon","light_mode_24px",4,"ngSwitchCase"],["svgIcon","dark_mode_24px",4,"ngSwitchCase"],["menu","matMenu"],["mat-menu-item","","title","Set the theme to match the default mode in the browser.",3,"click"],["mat-menu-item","","title","Force light TensorBoard theme.",3,"click"],["mat-menu-item","","title","Force dark TensorBoard theme.",3,"click"],["svgIcon","brightness_6_24px"],["svgIcon","light_mode_24px"],["svgIcon","dark_mode_24px"]],template:function(e,i){1&e&&(h(0,"button",0),S(1,Kxe,1,0,"mat-icon",1),S(2,Jxe,1,0,"mat-icon",2),S(3,$xe,1,0,"mat-icon",3),g(),h(4,"mat-menu",null,4)(6,"button",5),I("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DEFAULT)}),h(7,"label"),T(8,"Browser default"),g()(),h(9,"button",6),I("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_OFF)}),h(10,"label"),T(11,"Light"),g()(),h(12,"button",7),I("click",function(){return i.onOverrideChanged.emit(i.DarkModeOverride.DARK_MODE_ON)}),h(13,"label"),T(14,"Dark"),g()()()),2&e&&(_("matMenuTriggerFor",it(5))("ngSwitch",i.darkModeOverride)("title",i.getButtonTitle()),v(1),_("ngSwitchCase",i.DarkModeOverride.DEFAULT),v(1),_("ngSwitchCase",i.DarkModeOverride.DARK_MODE_OFF),v(1),_("ngSwitchCase",i.DarkModeOverride.DARK_MODE_ON))},dependencies:[$i,En,Nc,jl,Lc,sr,Sr],encapsulation:2}),n})(),Kq=(()=>{class n{constructor(e){this.store=e,this.darkModeOverride$=this.store.select(lS).pipe(N(i=>null===i?Ws.DEFAULT:i?Ws.DARK_MODE_ON:Ws.DARK_MODE_OFF))}changeDarkMode(e){let i=null;switch(e){case Ws.DEFAULT:i=null;break;case Ws.DARK_MODE_OFF:i=!1;break;case Ws.DARK_MODE_ON:i=!0}this.store.dispatch(WS({enableDarkMode:i}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["app-header-dark-mode-toggle"]],decls:2,vars:3,consts:[[3,"darkModeOverride","onOverrideChanged"]],template:function(e,i){1&e&&(h(0,"app-header-dark-mode-toggle-component",0),I("onOverrideChanged",function(o){return i.changeDarkMode(o)}),j(1,"async"),g()),2&e&&_("darkModeOverride",W(1,1,i.darkModeOverride$))},dependencies:[Zq,ct],encapsulation:2}),n})();function nCe(n,t){}var iCe=function(n){return{animationDuration:n}},rCe=function(n,t){return{value:n,params:t}};function oCe(n,t){1&n&&zt(0)}var eY=["*"],sCe=["tabListContainer"],aCe=["tabList"],lCe=["tabListInner"],cCe=["nextPaginator"],dCe=["previousPaginator"],uCe=["tabBodyWrapper"],pCe=["tabHeader"];function fCe(n,t){}function mCe(n,t){1&n&&S(0,fCe,0,0,"ng-template",14),2&n&&_("cdkPortalOutlet",w().$implicit.templateLabel)}function hCe(n,t){1&n&&T(0),2&n&&bt(w().$implicit.textLabel)}function gCe(n,t){if(1&n){let e=ge();h(0,"div",6,7),I("click",function(){let r=X(e),o=r.$implicit,s=r.index,a=w(),l=it(1);return Q(a._handleClick(o,l,s))})("cdkFocusChange",function(r){let s=X(e).index;return Q(w()._tabFocusChanged(r,s))}),P(2,"span",8)(3,"div",9),h(4,"span",10)(5,"span",11),S(6,mCe,1,1,"ng-template",12),S(7,hCe,1,1,"ng-template",null,13,Wt),g()()()}if(2&n){let e=t.$implicit,i=t.index,r=it(1),o=it(8),s=w();nt("mdc-tab--active",s.selectedIndex===i),_("id",s._getTabLabelId(i))("ngClass",e.labelClass)("disabled",e.disabled)("fitInkBarToContent",s.fitInkBarToContent),Be("tabIndex",s._getTabIndex(i))("aria-posinset",i+1)("aria-setsize",s._tabs.length)("aria-controls",s._getTabContentId(i))("aria-selected",s.selectedIndex===i)("aria-label",e.ariaLabel||null)("aria-labelledby",!e.ariaLabel&&e.ariaLabelledby?e.ariaLabelledby:null),v(3),_("matRippleTrigger",r)("matRippleDisabled",e.disabled||s.disableRipple),v(3),_("ngIf",e.templateLabel)("ngIfElse",o)}}function _Ce(n,t){if(1&n){let e=ge();h(0,"mat-tab-body",15),I("_onCentered",function(){return X(e),Q(w()._removeTabBodyWrapperHeight())})("_onCentering",function(r){return X(e),Q(w()._setTabBodyWrapperHeight(r))}),g()}if(2&n){let e=t.$implicit,i=t.index,r=w();nt("mat-mdc-tab-body-active",r.selectedIndex===i),_("id",r._getTabContentId(i))("ngClass",e.bodyClass)("content",e.content)("position",e.position)("origin",e.origin)("animationDuration",r.animationDuration)("preserveContent",r.preserveContent),Be("tabindex",null!=r.contentTabIndex&&r.selectedIndex===i?r.contentTabIndex:null)("aria-labelledby",r._getTabLabelId(i))}}var bCe={translateTab:_r("translateTab",[wi("center, void, left-origin-center, right-origin-center",rn({transform:"none"})),wi("left",rn({transform:"translate3d(-100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),wi("right",rn({transform:"translate3d(100%, 0, 0)",minHeight:"1px",visibility:"hidden"})),gi("* => left, * => right, left => center, right => center",Ci("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),gi("void => left-origin-center",[rn({transform:"translate3d(-100%, 0, 0)",visibility:"hidden"}),Ci("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),gi("void => right-origin-center",[rn({transform:"translate3d(100%, 0, 0)",visibility:"hidden"}),Ci("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},vCe=(()=>{class n extends ps{constructor(e,i,r,o){super(e,i,o),this._host=r,this._centeringSub=Mn.EMPTY,this._leavingSub=Mn.EMPTY}ngOnInit(){super.ngOnInit(),this._centeringSub=this._host._beforeCentering.pipe(qn(this._host._isCenterPosition(this._host._position))).subscribe(e=>{e&&!this.hasAttached()&&this.attach(this._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(()=>{this._host.preserveContent||this.detach()})}ngOnDestroy(){super.ngOnDestroy(),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(fo),C(si),C($n(()=>tY)),C(Lt))},n.\u0275dir=we({type:n,selectors:[["","matTabBodyHost",""]],features:[Ke]}),n})(),yCe=(()=>{class n{set position(e){this._positionIndex=e,this._computePositionAnimationState()}constructor(e,i,r){this._elementRef=e,this._dir=i,this._dirChangeSubscription=Mn.EMPTY,this._translateTabComplete=new Ie,this._onCentering=new F,this._beforeCentering=new F,this._afterLeavingCenter=new F,this._onCentered=new F(!0),this.animationDuration="500ms",this.preserveContent=!1,i&&(this._dirChangeSubscription=i.change.subscribe(o=>{this._computePositionAnimationState(o),r.markForCheck()})),this._translateTabComplete.pipe(Yn((o,s)=>o.fromState===s.fromState&&o.toState===s.toState)).subscribe(o=>{this._isCenterPosition(o.toState)&&this._isCenterPosition(this._position)&&this._onCentered.emit(),this._isCenterPosition(o.fromState)&&!this._isCenterPosition(this._position)&&this._afterLeavingCenter.emit()})}ngOnInit(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin(this.origin))}ngOnDestroy(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()}_onTranslateTabStarted(e){let i=this._isCenterPosition(e.toState);this._beforeCentering.emit(i),i&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_isCenterPosition(e){return"center"==e||"left-origin-center"==e||"right-origin-center"==e}_computePositionAnimationState(e=this._getLayoutDirection()){this._position=this._positionIndex<0?"ltr"==e?"left":"right":this._positionIndex>0?"ltr"==e?"right":"left":"center"}_computePositionFromOrigin(e){let i=this._getLayoutDirection();return"ltr"==i&&e<=0||"rtl"==i&&e>0?"left-origin-center":"right-origin-center"}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Xi,8),C($t))},n.\u0275dir=we({type:n,inputs:{_content:["content","_content"],origin:"origin",animationDuration:"animationDuration",preserveContent:"preserveContent",position:"position"},outputs:{_onCentering:"_onCentering",_beforeCentering:"_beforeCentering",_afterLeavingCenter:"_afterLeavingCenter",_onCentered:"_onCentered"}}),n})(),tY=(()=>{class n extends yCe{constructor(e,i,r){super(e,i,r)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Xi,8),C($t))},n.\u0275cmp=O({type:n,selectors:[["mat-tab-body"]],viewQuery:function(e,i){if(1&e&&Ge(ps,5),2&e){let r;Se(r=Ee())&&(i._portalHost=r.first)}},hostAttrs:[1,"mat-mdc-tab-body"],features:[Ke],decls:3,vars:6,consts:[["cdkScrollable","",1,"mat-mdc-tab-body-content"],["content",""],["matTabBodyHost",""]],template:function(e,i){1&e&&(h(0,"div",0,1),I("@translateTab.start",function(o){return i._onTranslateTabStarted(o)})("@translateTab.done",function(o){return i._translateTabComplete.next(o)}),S(2,nCe,0,0,"ng-template",2),g()),2&e&&_("@translateTab",qr(3,rCe,i._position,In(1,iCe,i.animationDuration)))},dependencies:[vCe],styles:['.mat-mdc-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;outline:0;flex-basis:100%}.mat-mdc-tab-body.mat-mdc-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-mdc-tab-group.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body.mat-mdc-tab-body-active{overflow-y:hidden}.mat-mdc-tab-body-content{height:100%;overflow:auto}.mat-mdc-tab-group-dynamic-height .mat-mdc-tab-body-content{overflow:hidden}.mat-mdc-tab-body-content[style*="visibility: hidden"]{display:none}'],encapsulation:2,data:{animation:[bCe.translateTab]}}),n})(),xCe=new ie("MatTabContent"),CCe=(()=>{class n{constructor(e){this.template=e}}return n.\u0275fac=function(e){return new(e||n)(C(Si))},n.\u0275dir=we({type:n,selectors:[["","matTabContent",""]],features:[Qt([{provide:xCe,useExisting:n}])]}),n})(),MCe=new ie("MatTabLabel"),nY=new ie("MAT_TAB"),rN=(()=>{class n extends k7{constructor(e,i,r){super(e,i),this._closestTab=r}}return n.\u0275fac=function(e){return new(e||n)(C(Si),C(si),C(nY,8))},n.\u0275dir=we({type:n,selectors:[["","mat-tab-label",""],["","matTabLabel",""]],features:[Qt([{provide:MCe,useExisting:n}]),Ke]}),n})(),tN="mdc-tab-indicator--active",Jq="mdc-tab-indicator--no-transition";function iY(n){return class extends n{constructor(...t){super(...t),this._fitToContent=!1}get fitInkBarToContent(){return this._fitToContent}set fitInkBarToContent(t){let e=Rt(t);this._fitToContent!==e&&(this._fitToContent=e,this._inkBarElement&&this._appendInkBarElement())}activateInkBar(t){let e=this.elementRef.nativeElement;if(!t||!e.getBoundingClientRect||!this._inkBarContentElement)return void e.classList.add(tN);let i=e.getBoundingClientRect(),r=t.width/i.width,o=t.left-i.left;e.classList.add(Jq),this._inkBarContentElement.style.setProperty("transform",`translateX(${o}px) scaleX(${r})`),e.getBoundingClientRect(),e.classList.remove(Jq),e.classList.add(tN),this._inkBarContentElement.style.setProperty("transform","")}deactivateInkBar(){this.elementRef.nativeElement.classList.remove(tN)}ngOnInit(){this._createInkBarElement()}ngOnDestroy(){this._inkBarElement?.remove(),this._inkBarElement=this._inkBarContentElement=null}_createInkBarElement(){let t=this.elementRef.nativeElement.ownerDocument||document;this._inkBarElement=t.createElement("span"),this._inkBarContentElement=t.createElement("span"),this._inkBarElement.className="mdc-tab-indicator",this._inkBarContentElement.className="mdc-tab-indicator__content mdc-tab-indicator__content--underline",this._inkBarElement.appendChild(this._inkBarContentElement),this._appendInkBarElement()}_appendInkBarElement(){(this._fitToContent?this.elementRef.nativeElement.querySelector(".mdc-tab__content"):this.elementRef.nativeElement).appendChild(this._inkBarElement)}}}new ie("MatInkBarPositioner",{providedIn:"root",factory:function(){return t=>({left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"})}});var SCe=so(class{}),ECe=(()=>{class n extends SCe{constructor(e){super(),this.elementRef=e}focus(){this.elementRef.nativeElement.focus()}getOffsetLeft(){return this.elementRef.nativeElement.offsetLeft}getOffsetWidth(){return this.elementRef.nativeElement.offsetWidth}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275dir=we({type:n,features:[Ke]}),n})(),TCe=iY(ECe),rY=(()=>{class n extends TCe{}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["","matTabLabelWrapper",""]],hostVars:3,hostBindings:function(e,i){2&e&&(Be("aria-disabled",!!i.disabled),nt("mat-mdc-tab-disabled",i.disabled))},inputs:{disabled:"disabled",fitInkBarToContent:"fitInkBarToContent"},features:[Ke]}),n})(),DCe=so(class{}),oY=new ie("MAT_TAB_GROUP"),ICe=(()=>{class n extends DCe{get content(){return this._contentPortal}constructor(e,i){super(),this._viewContainerRef=e,this._closestTabGroup=i,this.textLabel="",this._contentPortal=null,this._stateChanges=new Ie,this.position=null,this.origin=null,this.isActive=!1}ngOnChanges(e){(e.hasOwnProperty("textLabel")||e.hasOwnProperty("disabled"))&&this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}ngOnInit(){this._contentPortal=new Yo(this._explicitContent||this._implicitContent,this._viewContainerRef)}_setTemplateLabelInput(e){e&&e._closestTab===this&&(this._templateLabel=e)}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(oY,8))},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&Ge(Si,7),2&e){let r;Se(r=Ee())&&(i._implicitContent=r.first)}},inputs:{textLabel:["label","textLabel"],ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],labelClass:"labelClass",bodyClass:"bodyClass"},features:[Ke,Gt]}),n})(),sy=(()=>{class n extends ICe{get templateLabel(){return this._templateLabel}set templateLabel(e){this._setTemplateLabelInput(e)}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=O({type:n,selectors:[["mat-tab"]],contentQueries:function(e,i,r){if(1&e&&(Ti(r,CCe,7,Si),Ti(r,rN,5)),2&e){let o;Se(o=Ee())&&(i._explicitContent=o.first),Se(o=Ee())&&(i.templateLabel=o.first)}},inputs:{disabled:"disabled"},exportAs:["matTab"],features:[Qt([{provide:nY,useExisting:n}]),Ke],ngContentSelectors:eY,decls:1,vars:0,template:function(e,i){1&e&&(Dn(),S(0,oCe,1,0,"ng-template"))},encapsulation:2}),n})(),$q=qo({passive:!0}),sY=(()=>{class n{get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Rt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){e=_i(e),this._selectedIndex!=e&&(this._selectedIndexChanged=!0,this._selectedIndex=e,this._keyManager&&this._keyManager.updateActiveItem(e))}constructor(e,i,r,o,s,a,l){this._elementRef=e,this._changeDetectorRef=i,this._viewportRuler=r,this._dir=o,this._ngZone=s,this._platform=a,this._animationMode=l,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new Ie,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new Ie,this._disablePagination=!1,this._selectedIndex=0,this.selectFocusedIndex=new F,this.indexFocused=new F,s.runOutsideAngular(()=>{mi(e.nativeElement,"mouseleave").pipe(ot(this._destroyed)).subscribe(()=>{this._stopInterval()})})}ngAfterViewInit(){mi(this._previousPaginator.nativeElement,"touchstart",$q).pipe(ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("before")}),mi(this._nextPaginator.nativeElement,"touchstart",$q).pipe(ot(this._destroyed)).subscribe(()=>{this._handlePaginatorPress("after")})}ngAfterContentInit(){let e=this._dir?this._dir.change:Ht("ltr"),i=this._viewportRuler.change(150),r=()=>{this.updatePagination(),this._alignInkBarToSelectedTab()};this._keyManager=new sg(this._items).withHorizontalOrientation(this._getLayoutDirection()).withHomeAndEnd().withWrap().skipPredicate(()=>!1),this._keyManager.updateActiveItem(this._selectedIndex),this._ngZone.onStable.pipe(Yt(1)).subscribe(r),tn(e,i,this._items.changes,this._itemsResized()).pipe(ot(this._destroyed)).subscribe(()=>{this._ngZone.run(()=>{Promise.resolve().then(()=>{this._scrollDistance=Math.max(0,Math.min(this._getMaxScrollDistance(),this._scrollDistance)),r()})}),this._keyManager.withHorizontalOrientation(this._getLayoutDirection())}),this._keyManager.change.subscribe(o=>{this.indexFocused.emit(o),this._setTabFocus(o)})}_itemsResized(){return"function"!=typeof ResizeObserver?Jr:this._items.changes.pipe(qn(this._items),Jn(e=>new Kt(i=>this._ngZone.runOutsideAngular(()=>{let r=new ResizeObserver(o=>i.next(o));return e.forEach(o=>r.observe(o.elementRef.nativeElement)),()=>{r.disconnect()}}))),ia(1),ke(e=>e.some(i=>i.contentRect.width>0&&i.contentRect.height>0)))}ngAfterContentChecked(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())}ngOnDestroy(){this._keyManager?.destroy(),this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()}_handleKeydown(e){if(!vr(e))switch(e.keyCode){case 13:case 32:if(this.focusIndex!==this.selectedIndex){let i=this._items.get(this.focusIndex);i&&!i.disabled&&(this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(e))}break;default:this._keyManager.onKeydown(e)}}_onContentChanges(){let e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(()=>{this.updatePagination(),this._alignInkBarToSelectedTab(),this._changeDetectorRef.markForCheck()}))}updatePagination(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()}get focusIndex(){return this._keyManager?this._keyManager.activeItemIndex:0}set focusIndex(e){!this._isValidIndex(e)||this.focusIndex===e||!this._keyManager||this._keyManager.setActiveItem(e)}_isValidIndex(e){return!this._items||!!this._items.toArray()[e]}_setTabFocus(e){if(this._showPaginationControls&&this._scrollToLabel(e),this._items&&this._items.length){this._items.toArray()[e].focus();let i=this._tabListContainer.nativeElement;i.scrollLeft="ltr"==this._getLayoutDirection()?0:i.scrollWidth-i.offsetWidth}}_getLayoutDirection(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"}_updateTabScrollPosition(){if(this.disablePagination)return;let e=this.scrollDistance,i="ltr"===this._getLayoutDirection()?-e:e;this._tabList.nativeElement.style.transform=`translateX(${Math.round(i)}px)`,(this._platform.TRIDENT||this._platform.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)}get scrollDistance(){return this._scrollDistance}set scrollDistance(e){this._scrollTo(e)}_scrollHeader(e){return this._scrollTo(this._scrollDistance+("before"==e?-1:1)*this._tabListContainer.nativeElement.offsetWidth/3)}_handlePaginatorClick(e){this._stopInterval(),this._scrollHeader(e)}_scrollToLabel(e){if(this.disablePagination)return;let i=this._items?this._items.toArray()[e]:null;if(!i)return;let a,l,r=this._tabListContainer.nativeElement.offsetWidth,{offsetLeft:o,offsetWidth:s}=i.elementRef.nativeElement;"ltr"==this._getLayoutDirection()?(a=o,l=a+s):(l=this._tabListInner.nativeElement.offsetWidth-o,a=l-s);let c=this.scrollDistance,d=this.scrollDistance+r;a<c?this.scrollDistance-=c-a:l>d&&(this.scrollDistance+=Math.min(l-d,a-c))}_checkPaginationEnabled(){if(this.disablePagination)this._showPaginationControls=!1;else{let e=this._tabListInner.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;e||(this.scrollDistance=0),e!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=e}}_checkScrollingControls(){this.disablePagination?this._disableScrollAfter=this._disableScrollBefore=!0:(this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck())}_getMaxScrollDistance(){return this._tabListInner.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0}_alignInkBarToSelectedTab(){let e=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,i=e?e.elementRef.nativeElement:null;i?this._inkBar.alignToElement(i):this._inkBar.hide()}_stopInterval(){this._stopScrolling.next()}_handlePaginatorPress(e,i){i&&null!=i.button&&0!==i.button||(this._stopInterval(),na(650,100).pipe(ot(tn(this._stopScrolling,this._destroyed))).subscribe(()=>{let{maxScrollDistance:r,distance:o}=this._scrollHeader(e);(0===o||o>=r)&&this._stopInterval()}))}_scrollTo(e){if(this.disablePagination)return{maxScrollDistance:0,distance:0};let i=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(i,e)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:i,distance:this._scrollDistance}}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(js),C(Xi,8),C(at),C(Gn),C(hi,8))},n.\u0275dir=we({type:n,inputs:{disablePagination:"disablePagination"}}),n})(),PCe=(()=>{class n extends sY{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Rt(e)}constructor(e,i,r,o,s,a,l){super(e,i,r,o,s,a,l),this._disableRipple=!1}_itemSelected(e){e.preventDefault()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(js),C(Xi,8),C(at),C(Gn),C(hi,8))},n.\u0275dir=we({type:n,inputs:{disableRipple:"disableRipple"},features:[Ke]}),n})(),OCe=(()=>{class n extends PCe{constructor(e,i,r,o,s,a,l){super(e,i,r,o,s,a,l)}ngAfterContentInit(){this._inkBar=new class{constructor(t){this._items=t}hide(){this._items.forEach(t=>t.deactivateInkBar())}alignToElement(t){let e=this._items.find(r=>r.elementRef.nativeElement===t),i=this._currentItem;if(i?.deactivateInkBar(),e){let r=i?.elementRef.nativeElement.getBoundingClientRect?.();e.activateInkBar(r),this._currentItem=e}}}(this._items),super.ngAfterContentInit()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(js),C(Xi,8),C(at),C(Gn),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["mat-tab-header"]],contentQueries:function(e,i,r){if(1&e&&Ti(r,rY,4),2&e){let o;Se(o=Ee())&&(i._items=o)}},viewQuery:function(e,i){if(1&e&&(Ge(sCe,7),Ge(aCe,7),Ge(lCe,7),Ge(cCe,5),Ge(dCe,5)),2&e){let r;Se(r=Ee())&&(i._tabListContainer=r.first),Se(r=Ee())&&(i._tabList=r.first),Se(r=Ee())&&(i._tabListInner=r.first),Se(r=Ee())&&(i._nextPaginator=r.first),Se(r=Ee())&&(i._previousPaginator=r.first)}},hostAttrs:[1,"mat-mdc-tab-header"],hostVars:4,hostBindings:function(e,i){2&e&&nt("mat-mdc-tab-header-pagination-controls-enabled",i._showPaginationControls)("mat-mdc-tab-header-rtl","rtl"==i._getLayoutDirection())},inputs:{selectedIndex:"selectedIndex"},outputs:{selectFocusedIndex:"selectFocusedIndex",indexFocused:"indexFocused"},features:[Ke],ngContentSelectors:eY,decls:13,vars:10,consts:[["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-before",3,"matRippleDisabled","disabled","click","mousedown","touchend"],["previousPaginator",""],[1,"mat-mdc-tab-header-pagination-chevron"],[1,"mat-mdc-tab-label-container",3,"keydown"],["tabListContainer",""],["role","tablist",1,"mat-mdc-tab-list",3,"cdkObserveContent"],["tabList",""],[1,"mat-mdc-tab-labels"],["tabListInner",""],["aria-hidden","true","type","button","mat-ripple","","tabindex","-1",1,"mat-mdc-tab-header-pagination","mat-mdc-tab-header-pagination-after",3,"matRippleDisabled","disabled","mousedown","click","touchend"],["nextPaginator",""]],template:function(e,i){1&e&&(Dn(),h(0,"button",0,1),I("click",function(){return i._handlePaginatorClick("before")})("mousedown",function(o){return i._handlePaginatorPress("before",o)})("touchend",function(){return i._stopInterval()}),P(2,"div",2),g(),h(3,"div",3,4),I("keydown",function(o){return i._handleKeydown(o)}),h(5,"div",5,6),I("cdkObserveContent",function(){return i._onContentChanges()}),h(7,"div",7,8),zt(9),g()()(),h(10,"button",9,10),I("mousedown",function(o){return i._handlePaginatorPress("after",o)})("click",function(){return i._handlePaginatorClick("after")})("touchend",function(){return i._stopInterval()}),P(12,"div",2),g()),2&e&&(nt("mat-mdc-tab-header-pagination-disabled",i._disableScrollBefore),_("matRippleDisabled",i._disableScrollBefore||i.disableRipple)("disabled",i._disableScrollBefore||null),v(3),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode),v(7),nt("mat-mdc-tab-header-pagination-disabled",i._disableScrollAfter),_("matRippleDisabled",i._disableScrollAfter||i.disableRipple)("disabled",i._disableScrollAfter||null))},dependencies:[mo,P1],styles:[".mat-mdc-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-mdc-tab-header-pagination{-webkit-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:rgba(0,0,0,0);touch-action:none;box-sizing:content-box;background:none;border:none;outline:0;padding:0}.mat-mdc-tab-header-pagination::-moz-focus-inner{border:0}.mat-mdc-tab-header-pagination .mat-ripple-element{opacity:.12}.mat-mdc-tab-header-pagination-controls-enabled .mat-mdc-tab-header-pagination{display:flex}.mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after{padding-left:4px}.mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before,.mat-mdc-tab-header-pagination-after{padding-right:4px}.mat-mdc-tab-header-rtl .mat-mdc-tab-header-pagination-before .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-header-pagination-after .mat-mdc-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-mdc-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;height:8px;width:8px}.mat-mdc-tab-header-pagination-disabled{box-shadow:none;cursor:default;pointer-events:none}.mat-mdc-tab-header-pagination-disabled .mat-mdc-tab-header-pagination-chevron{opacity:.4}.mat-mdc-tab-list{flex-grow:1;position:relative;transition:transform 500ms cubic-bezier(0.35, 0, 0.25, 1)}._mat-animation-noopable .mat-mdc-tab-list{transition:none}._mat-animation-noopable span.mdc-tab-indicator__content,._mat-animation-noopable span.mdc-tab__text-label{transition:none}.mat-mdc-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-mdc-tab-labels{display:flex;flex:1 0 auto}[mat-align-tabs=center]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:center}[mat-align-tabs=end]>.mat-mdc-tab-header .mat-mdc-tab-labels{justify-content:flex-end}.mat-mdc-tab::before{margin:5px}.cdk-high-contrast-active .mat-mdc-tab[aria-disabled=true]{color:GrayText}"],encapsulation:2}),n})(),aY=new ie("MAT_TABS_CONFIG"),kCe=0,FCe=zs(us(class{constructor(n){this._elementRef=n}}),"primary"),NCe=(()=>{class n extends FCe{get dynamicHeight(){return this._dynamicHeight}set dynamicHeight(e){this._dynamicHeight=Rt(e)}get selectedIndex(){return this._selectedIndex}set selectedIndex(e){this._indexToSelect=_i(e,null)}get animationDuration(){return this._animationDuration}set animationDuration(e){this._animationDuration=/^\d+$/.test(e+"")?e+"ms":e}get contentTabIndex(){return this._contentTabIndex}set contentTabIndex(e){this._contentTabIndex=_i(e,null)}get disablePagination(){return this._disablePagination}set disablePagination(e){this._disablePagination=Rt(e)}get preserveContent(){return this._preserveContent}set preserveContent(e){this._preserveContent=Rt(e)}get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}constructor(e,i,r,o){super(e),this._changeDetectorRef=i,this._animationMode=o,this._tabs=new Oa,this._indexToSelect=0,this._lastFocusedTabIndex=null,this._tabBodyWrapperHeight=0,this._tabsSubscription=Mn.EMPTY,this._tabLabelSubscription=Mn.EMPTY,this._dynamicHeight=!1,this._selectedIndex=null,this.headerPosition="above",this._disablePagination=!1,this._preserveContent=!1,this.selectedIndexChange=new F,this.focusChange=new F,this.animationDone=new F,this.selectedTabChange=new F(!0),this._groupId=kCe++,this.animationDuration=r&&r.animationDuration?r.animationDuration:"500ms",this.disablePagination=!(!r||null==r.disablePagination)&&r.disablePagination,this.dynamicHeight=!(!r||null==r.dynamicHeight)&&r.dynamicHeight,this.contentTabIndex=r?.contentTabIndex??null,this.preserveContent=!!r?.preserveContent}ngAfterContentChecked(){let e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){let i=null==this._selectedIndex;if(!i){this.selectedTabChange.emit(this._createChangeEvent(e));let r=this._tabBodyWrapper.nativeElement;r.style.minHeight=r.clientHeight+"px"}Promise.resolve().then(()=>{this._tabs.forEach((r,o)=>r.isActive=o===e),i||(this.selectedIndexChange.emit(e),this._tabBodyWrapper.nativeElement.style.minHeight="")})}this._tabs.forEach((i,r)=>{i.position=r-e,null!=this._selectedIndex&&0==i.position&&!i.origin&&(i.origin=e-this._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._lastFocusedTabIndex=null,this._changeDetectorRef.markForCheck())}ngAfterContentInit(){this._subscribeToAllTabChanges(),this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(()=>{let e=this._clampTabIndex(this._indexToSelect);if(e===this._selectedIndex){let r,i=this._tabs.toArray();for(let o=0;o<i.length;o++)if(i[o].isActive){this._indexToSelect=this._selectedIndex=o,this._lastFocusedTabIndex=null,r=i[o];break}!r&&i[e]&&Promise.resolve().then(()=>{i[e].isActive=!0,this.selectedTabChange.emit(this._createChangeEvent(e))})}this._changeDetectorRef.markForCheck()})}_subscribeToAllTabChanges(){this._allTabs.changes.pipe(qn(this._allTabs)).subscribe(e=>{this._tabs.reset(e.filter(i=>i._closestTabGroup===this||!i._closestTabGroup)),this._tabs.notifyOnChanges()})}ngOnDestroy(){this._tabs.destroy(),this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()}realignInkBar(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()}updatePagination(){this._tabHeader&&this._tabHeader.updatePagination()}focusTab(e){let i=this._tabHeader;i&&(i.focusIndex=e)}_focusChanged(e){this._lastFocusedTabIndex=e,this.focusChange.emit(this._createChangeEvent(e))}_createChangeEvent(e){let i=new iN;return i.index=e,this._tabs&&this._tabs.length&&(i.tab=this._tabs.toArray()[e]),i}_subscribeToTabLabels(){this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=tn(...this._tabs.map(e=>e._stateChanges)).subscribe(()=>this._changeDetectorRef.markForCheck())}_clampTabIndex(e){return Math.min(this._tabs.length-1,Math.max(e||0,0))}_getTabLabelId(e){return`mat-tab-label-${this._groupId}-${e}`}_getTabContentId(e){return`mat-tab-content-${this._groupId}-${e}`}_setTabBodyWrapperHeight(e){if(!this._dynamicHeight||!this._tabBodyWrapperHeight)return;let i=this._tabBodyWrapper.nativeElement;i.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(i.style.height=e+"px")}_removeTabBodyWrapperHeight(){let e=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=e.clientHeight,e.style.height="",this.animationDone.emit()}_handleClick(e,i,r){i.focusIndex=r,e.disabled||(this.selectedIndex=r)}_getTabIndex(e){return e===(this._lastFocusedTabIndex??this.selectedIndex)?0:-1}_tabFocusChanged(e,i){e&&"mouse"!==e&&"touch"!==e&&(this._tabHeader.focusIndex=i)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(aY,8),C(hi,8))},n.\u0275dir=we({type:n,inputs:{dynamicHeight:"dynamicHeight",selectedIndex:"selectedIndex",headerPosition:"headerPosition",animationDuration:"animationDuration",contentTabIndex:"contentTabIndex",disablePagination:"disablePagination",preserveContent:"preserveContent",backgroundColor:"backgroundColor"},outputs:{selectedIndexChange:"selectedIndexChange",focusChange:"focusChange",animationDone:"animationDone",selectedTabChange:"selectedTabChange"},features:[Ke]}),n})(),bE=(()=>{class n extends NCe{get fitInkBarToContent(){return this._fitInkBarToContent}set fitInkBarToContent(e){this._fitInkBarToContent=Rt(e),this._changeDetectorRef.markForCheck()}get stretchTabs(){return this._stretchTabs}set stretchTabs(e){this._stretchTabs=Rt(e)}constructor(e,i,r,o){super(e,i,r,o),this._fitInkBarToContent=!1,this._stretchTabs=!0,this.fitInkBarToContent=!(!r||null==r.fitInkBarToContent)&&r.fitInkBarToContent}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C($t),C(aY,8),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["mat-tab-group"]],contentQueries:function(e,i,r){if(1&e&&Ti(r,sy,5),2&e){let o;Se(o=Ee())&&(i._allTabs=o)}},viewQuery:function(e,i){if(1&e&&(Ge(uCe,5),Ge(pCe,5)),2&e){let r;Se(r=Ee())&&(i._tabBodyWrapper=r.first),Se(r=Ee())&&(i._tabHeader=r.first)}},hostAttrs:[1,"mat-mdc-tab-group"],hostVars:6,hostBindings:function(e,i){2&e&&nt("mat-mdc-tab-group-dynamic-height",i.dynamicHeight)("mat-mdc-tab-group-inverted-header","below"===i.headerPosition)("mat-mdc-tab-group-stretch-tabs",i.stretchTabs)},inputs:{color:"color",disableRipple:"disableRipple",fitInkBarToContent:"fitInkBarToContent",stretchTabs:["mat-stretch-tabs","stretchTabs"]},exportAs:["matTabGroup"],features:[Qt([{provide:oY,useExisting:n}]),Ke],decls:6,vars:7,consts:[[3,"selectedIndex","disableRipple","disablePagination","indexFocused","selectFocusedIndex"],["tabHeader",""],["class","mdc-tab mat-mdc-tab mat-mdc-focus-indicator","role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",3,"id","mdc-tab--active","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange",4,"ngFor","ngForOf"],[1,"mat-mdc-tab-body-wrapper"],["tabBodyWrapper",""],["role","tabpanel",3,"id","mat-mdc-tab-body-active","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering",4,"ngFor","ngForOf"],["role","tab","matTabLabelWrapper","","cdkMonitorElementFocus","",1,"mdc-tab","mat-mdc-tab","mat-mdc-focus-indicator",3,"id","ngClass","disabled","fitInkBarToContent","click","cdkFocusChange"],["tabNode",""],[1,"mdc-tab__ripple"],["mat-ripple","",1,"mat-mdc-tab-ripple",3,"matRippleTrigger","matRippleDisabled"],[1,"mdc-tab__content"],[1,"mdc-tab__text-label"],[3,"ngIf","ngIfElse"],["tabTextLabel",""],[3,"cdkPortalOutlet"],["role","tabpanel",3,"id","ngClass","content","position","origin","animationDuration","preserveContent","_onCentered","_onCentering"]],template:function(e,i){1&e&&(h(0,"mat-tab-header",0,1),I("indexFocused",function(o){return i._focusChanged(o)})("selectFocusedIndex",function(o){return i.selectedIndex=o}),S(2,gCe,9,17,"div",2),g(),h(3,"div",3,4),S(5,_Ce,1,11,"mat-tab-body",5),g()),2&e&&(_("selectedIndex",i.selectedIndex||0)("disableRipple",i.disableRipple)("disablePagination",i.disablePagination),v(2),_("ngForOf",i._tabs),v(1),nt("_mat-animation-noopable","NoopAnimations"===i._animationMode),v(2),_("ngForOf",i._tabs))},dependencies:[yn,nn,Fe,ps,mo,y7,tY,rY,OCe],styles:['.mdc-tab{min-width:90px;padding-right:24px;padding-left:24px;display:flex;flex:1 0 auto;justify-content:center;box-sizing:border-box;margin:0;padding-top:0;padding-bottom:0;border:none;outline:none;text-align:center;white-space:nowrap;cursor:pointer;-webkit-appearance:none;z-index:1}.mdc-tab::-moz-focus-inner{padding:0;border:0}.mdc-tab[hidden]{display:none}.mdc-tab--min-width{flex:0 1 auto}.mdc-tab__content{display:flex;align-items:center;justify-content:center;height:inherit;pointer-events:none}.mdc-tab__text-label{transition:150ms color linear;display:inline-block;line-height:1;z-index:2}.mdc-tab__icon{transition:150ms color linear;z-index:2}.mdc-tab--stacked .mdc-tab__content{flex-direction:column;align-items:center;justify-content:center}.mdc-tab--stacked .mdc-tab__text-label{padding-top:6px;padding-bottom:4px}.mdc-tab--active .mdc-tab__text-label,.mdc-tab--active .mdc-tab__icon{transition-delay:100ms}.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label{padding-left:8px;padding-right:0}[dir=rtl] .mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label,.mdc-tab:not(.mdc-tab--stacked) .mdc-tab__icon+.mdc-tab__text-label[dir=rtl]{padding-left:0;padding-right:8px}.mdc-tab-indicator .mdc-tab-indicator__content--underline{border-top-width:2px}.mdc-tab-indicator .mdc-tab-indicator__content--icon{height:34px;font-size:34px}.mdc-tab-indicator{display:flex;position:absolute;top:0;left:0;justify-content:center;width:100%;height:100%;pointer-events:none;z-index:1}.mdc-tab-indicator__content{transform-origin:left;opacity:0}.mdc-tab-indicator__content--underline{align-self:flex-end;box-sizing:border-box;width:100%;border-top-style:solid}.mdc-tab-indicator__content--icon{align-self:center;margin:0 auto}.mdc-tab-indicator--active .mdc-tab-indicator__content{opacity:1}.mdc-tab-indicator .mdc-tab-indicator__content{transition:250ms transform cubic-bezier(0.4, 0, 0.2, 1)}.mdc-tab-indicator--no-transition .mdc-tab-indicator__content{transition:none}.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition:150ms opacity linear}.mdc-tab-indicator--active.mdc-tab-indicator--fade .mdc-tab-indicator__content{transition-delay:100ms}.mat-mdc-tab-ripple{position:absolute;top:0;left:0;bottom:0;right:0;pointer-events:none}.mat-mdc-tab{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-tab.mdc-tab{height:48px;flex-grow:0}.mat-mdc-tab .mdc-tab__ripple::before{content:"";display:block;position:absolute;top:0;left:0;right:0;bottom:0;opacity:0;pointer-events:none}.mat-mdc-tab .mdc-tab__text-label{display:inline-flex;align-items:center}.mat-mdc-tab .mdc-tab__content{position:relative;pointer-events:auto}.mat-mdc-tab:hover .mdc-tab__ripple::before{opacity:.04}.mat-mdc-tab.cdk-program-focused .mdc-tab__ripple::before,.mat-mdc-tab.cdk-keyboard-focused .mdc-tab__ripple::before{opacity:.12}.mat-mdc-tab .mat-ripple-element{opacity:.12}.mat-mdc-tab-group.mat-mdc-tab-group-stretch-tabs>.mat-mdc-tab-header .mat-mdc-tab{flex-grow:1}.mat-mdc-tab-disabled{opacity:.4}.mat-mdc-tab-group{display:flex;flex-direction:column;max-width:100%}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination{background-color:var(--mat-mdc-tab-header-with-background-background-color, transparent)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab .mdc-tab__text-label,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-link .mdc-tab__text-label{color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab-indicator__content--underline,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-focus-indicator::before{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mdc-tab__ripple::before,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-ripple-element,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mdc-tab__ripple::before{background-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header .mat-mdc-tab-header-pagination-chevron,.mat-mdc-tab-group.mat-tabs-with-background>.mat-mdc-tab-header-pagination .mat-mdc-tab-header-pagination-chevron{border-color:var(--mat-mdc-tab-header-with-background-foreground-color, inherit)}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header{flex-direction:column-reverse}.mat-mdc-tab-group.mat-mdc-tab-group-inverted-header .mdc-tab-indicator__content--underline{align-self:flex-start}.mat-mdc-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height 500ms cubic-bezier(0.35, 0, 0.25, 1)}.mat-mdc-tab-body-wrapper._mat-animation-noopable{transition:none !important;animation:none !important}'],encapsulation:2}),n})(),iN=class{},LCe=0,BCe=(()=>{class n extends sY{get backgroundColor(){return this._backgroundColor}set backgroundColor(e){let i=this._elementRef.nativeElement.classList;i.remove("mat-tabs-with-background",`mat-background-${this.backgroundColor}`),e&&i.add("mat-tabs-with-background",`mat-background-${e}`),this._backgroundColor=e}get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=Rt(e)}constructor(e,i,r,o,s,a,l){super(e,o,s,i,r,a,l),this._disableRipple=!1,this.color="primary"}_itemSelected(){}ngAfterContentInit(){this._items.changes.pipe(qn(null),ot(this._destroyed)).subscribe(()=>{this.updateActiveLink()}),super.ngAfterContentInit()}updateActiveLink(){if(!this._items)return;let e=this._items.toArray();for(let i=0;i<e.length;i++)if(e[i].active)return this.selectedIndex=i,this._changeDetectorRef.markForCheck(),void(this.tabPanel&&(this.tabPanel._activeTabId=e[i].id));this.selectedIndex=-1,this._inkBar.hide()}_getRole(){return this.tabPanel?"tablist":this._elementRef.nativeElement.getAttribute("role")}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Xi,8),C(at),C($t),C(js),C(Gn),C(hi,8))},n.\u0275dir=we({type:n,inputs:{backgroundColor:"backgroundColor",disableRipple:"disableRipple",color:"color",tabPanel:"tabPanel"},features:[Ke]}),n})(),VCe=ku(us(so(class{}))),HCe=(()=>{class n extends VCe{get active(){return this._isActive}set active(e){let i=Rt(e);i!==this._isActive&&(this._isActive=i,this._tabNavBar.updateActiveLink())}get rippleDisabled(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled}constructor(e,i,r,o,s,a){super(),this._tabNavBar=e,this.elementRef=i,this._focusMonitor=s,this._isActive=!1,this.id="mat-tab-link-"+LCe++,this.rippleConfig=r||{},this.tabIndex=parseInt(o)||0,"NoopAnimations"===a&&(this.rippleConfig.animation={enterDuration:0,exitDuration:0})}focus(){this.elementRef.nativeElement.focus()}ngAfterViewInit(){this._focusMonitor.monitor(this.elementRef)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.elementRef)}_handleFocus(){this._tabNavBar.focusIndex=this._tabNavBar._items.toArray().indexOf(this)}_handleKeydown(e){this._tabNavBar.tabPanel&&32===e.keyCode&&this.elementRef.nativeElement.click()}_getAriaControls(){return this._tabNavBar.tabPanel?this._tabNavBar.tabPanel?.id:this.elementRef.nativeElement.getAttribute("aria-controls")}_getAriaSelected(){return this._tabNavBar.tabPanel?this.active?"true":"false":this.elementRef.nativeElement.getAttribute("aria-selected")}_getAriaCurrent(){return this.active&&!this._tabNavBar.tabPanel?"page":null}_getRole(){return this._tabNavBar.tabPanel?"tab":this.elementRef.nativeElement.getAttribute("role")}_getTabIndex(){return this._tabNavBar.tabPanel?this._isActive&&!this.disabled?0:-1:this.tabIndex}}return n.\u0275fac=function(e){return new(e||n)(C(BCe),C(Me),C(y2,8),yo("tabindex"),C(Xr),C(hi,8))},n.\u0275dir=we({type:n,inputs:{active:"active",id:"id"},features:[Ke]}),n})(),vE=(iY(HCe),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,fn,Hl,Bl,ng,lg,fn]}),n})());function zCe(n,t){if(1&n){let e=ge();h(0,"span",5),I("click",function(r){X(e);let o=w().$implicit;return Q(w().onActivePluginSelection(r,o.id))}),T(1),g()}if(2&n){let e=w().$implicit;Be("data-plugin-id",e.id),v(1),He(" ",e.tab_name," ")}}function UCe(n,t){1&n&&(h(0,"mat-tab",3),S(1,zCe,2,2,"ng-template",4),g()),2&n&&_("disabled",!t.$implicit.enabled)}function jCe(n,t){if(1&n&&(h(0,"mat-option",9),T(1),g()),2&n){let e=t.$implicit;_("value",e.id),Be("data-plugin-id",e.id),v(1),He(" ",e.tab_name," ")}}function GCe(n,t){if(1&n){let e=ge();h(0,"mat-form-field",6)(1,"mat-label"),T(2,"Inactive"),g(),h(3,"mat-select",7),I("selectionChange",function(r){return X(e),Q(w().onDisabledPluginSelectionChanged(r))}),S(4,jCe,2,3,"mat-option",8),g()()}if(2&n){let e=w();v(3),_("value",e.selectedPlugin)("hideSingleSelectionIndicator",!0),v(1),_("ngForOf",e.disabledPlugins)}}var cY=(()=>{class n{constructor(){this.onPluginSelectionChanged=new F}getActivePluginIndex(){return this.activePlugins.findIndex(({id:e})=>e===this.selectedPlugin)}onActivePluginSelection(e,i){e.stopPropagation(),this.onPluginSelectionChanged.emit(i)}onDisabledPluginSelectionChanged(e){this.onPluginSelectionChanged.emit(e.value)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["plugin-selector-component"]],inputs:{activePlugins:"activePlugins",disabledPlugins:"disabledPlugins",selectedPlugin:"selectedPlugin"},outputs:{onPluginSelectionChanged:"onPluginSelectionChanged"},decls:3,vars:3,consts:[["mat-stretch-tabs","false","animationDuration","100ms",1,"active-plugin-list",3,"selectedIndex"],[3,"disabled",4,"ngFor","ngForOf"],["floatLabel","never","subscriptSizing","dynamic",4,"ngIf"],[3,"disabled"],["mat-tab-label",""],[1,"plugin-name",3,"click"],["floatLabel","never","subscriptSizing","dynamic"],[3,"value","hideSingleSelectionIndicator","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(e,i){1&e&&(h(0,"mat-tab-group",0),S(1,UCe,2,1,"mat-tab",1),g(),S(2,GCe,5,3,"mat-form-field",2)),2&e&&(_("selectedIndex",i.getActivePluginIndex()),v(1),_("ngForOf",i.activePlugins),v(1),_("ngIf",i.disabledPlugins.length>0))},dependencies:[rN,sy,bE,Ka,kc,zu,Us,nn,Fe],styles:["[_nghost-%COMP%]{align-items:center;display:flex;flex:1 1 auto;font-size:14px;height:100%;overflow:hidden}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]    {width:144px}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field{background-color:#f57c00;padding:0 4px}body.dark-mode   [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field{background-color:#ef6c00}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     label.mdc-floating-label.mat-mdc-floating-label, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select-value, [_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mat-mdc-select-arrow{color:inherit}[_nghost-%COMP%]   mat-form-field[_ngcontent-%COMP%]     .mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-color:inherit}mat-label[_ngcontent-%COMP%], mat-select[_ngcontent-%COMP%], mat-option[_ngcontent-%COMP%]{font-size:14px;font-weight:500;text-transform:uppercase}.active-plugin-list[_ngcontent-%COMP%]{align-self:stretch;flex:1 1 auto;overflow:hidden}.plugin-name[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:100%;justify-content:center;padding:0 12px;width:100%}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab-indicator__content--underline{border-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled) .mdc-tab__text-label{color:inherit;opacity:.7}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab:not(.mat-mdc-tab-disabled).mdc-tab--active .mdc-tab__text-label{color:inherit;opacity:1}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination{color:inherit}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination-chevron{border-color:currentColor}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header-pagination-disabled{visibility:hidden}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-disabled{display:none}[_nghost-%COMP%]     .active-plugin-list mat-mdc-tab-list, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-labels, [_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab-header .mat-mdc-tab, [_nghost-%COMP%]     .active-plugin-list .mdc-tab__text-label{height:100%}[_nghost-%COMP%]     .active-plugin-list .mat-mdc-tab{letter-spacing:.25px;min-width:48px;padding:0;text-transform:uppercase}[_nghost-%COMP%]     .active-plugin-list mat-tab-header .mat-mdc-tab-list{padding:0 36px}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:first-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>:last-child{bottom:0;position:absolute;top:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:first-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container{left:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>:last-child, [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-label-container{right:0}[_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-header-pagination{background-color:#f57c00}body.dark-mode   [_nghost-%COMP%]     .active-plugin-list mat-tab-header>.mat-mdc-tab-header-pagination{background-color:#ef6c00}"]}),n})(),dY=q(Nh,n=>Object.keys(n).map(t=>Object.assign({},{id:t},n[t]))),qCe=q(dY,n=>n.filter(t=>!t.enabled)),uY=(()=>{class n{constructor(e){this.store=e,this.activePlugin$=this.store.pipe(un(Wo)),this.plugins$=this.store.pipe(un(dY)),this.disabledPlugins$=this.store.pipe(un(qCe))}onPluginSelectionChange(e){this.store.dispatch(wc({plugin:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["plugin-selector"]],decls:4,vars:9,consts:[[3,"activePlugins","disabledPlugins","selectedPlugin","onPluginSelectionChanged"]],template:function(e,i){1&e&&(h(0,"plugin-selector-component",0),I("onPluginSelectionChanged",function(o){return i.onPluginSelectionChange(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("activePlugins",W(1,3,i.plugins$))("disabledPlugins",W(2,5,i.disabledPlugins$))("selectedPlugin",W(3,7,i.activePlugin$))},dependencies:[cY,ct],encapsulation:2}),n})(),XCe=q(Nh,Wo,(n,t)=>!(!t||!n[t])&&n[t].disable_reload),pY=(()=>{class n{constructor(e){this.store=e,this.reloadDisabled$=this.store.select(XCe),this.isReloading$=this.store.select(T6).pipe(Li(this.reloadDisabled$),N(([i,r])=>!r&&i===Te.LOADING)),this.lastLoadedTimeInMs$=this.store.select(Fh)}triggerReload(){this.store.dispatch(Fs())}getReloadTitle(e){return e?`Last Updated: ${e}`:"Loading..."}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["app-header-reload"]],decls:6,vars:13,consts:[["mat-icon-button","",1,"reload-button",3,"title","disabled","click"],["svgIcon","refresh_24px",1,"refresh-icon"]],template:function(e,i){1&e&&(h(0,"button",0),I("click",function(){return i.triggerReload()}),j(1,"async"),j(2,"date"),j(3,"async"),j(4,"async"),P(5,"mat-icon",1),g()),2&e&&(nt("loading",W(1,4,i.isReloading$)),_("title",i.getReloadTitle(qp(2,6,W(3,9,i.lastLoadedTimeInMs$),"medium")))("disabled",W(4,11,i.reloadDisabled$)))},dependencies:[$i,En,ct,gh],styles:[".reload-button[_ngcontent-%COMP%], .refresh-icon[_ngcontent-%COMP%] {\n        align-items: center;\n        display: flex;\n        justify-content: center;\n      }\n\n      .reload-button.loading[_ngcontent-%COMP%] {\n        animation: _ngcontent-%COMP%_rotate 2s linear infinite;\n      }\n\n      @keyframes _ngcontent-%COMP%_rotate {\n        0% {\n          transform: rotate(0deg);\n        }\n        50% {\n          transform: rotate(180deg);\n        }\n        100% {\n          transform: rotate(360deg);\n        }\n      }"]}),n})(),fY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["app-header"]],decls:9,vars:0,consts:[[1,"brand"],[1,"plugins"],["mat-icon-button","","href","https://github.com/tensorflow/tensorboard/blob/master/README.md","rel","noopener noreferrer","target","_blank","aria-label","Help",1,"readme"],["svgIcon","help_outline_24px"]],template:function(e,i){1&e&&(h(0,"mat-toolbar")(1,"span",0),T(2,"TensorBoard"),g(),P(3,"plugin-selector",1)(4,"app-header-dark-mode-toggle")(5,"app-header-reload")(6,"settings-button"),h(7,"a",2),P(8,"mat-icon",3),g()())},dependencies:[O7,En,kq,qq,Kq,uY,pY],styles:["mat-toolbar[_ngcontent-%COMP%]{align-items:center;color:#fff;display:flex;height:64px;overflow:hidden;width:100%}.brand[_ngcontent-%COMP%], .readme[_ngcontent-%COMP%], app-header-reload[_ngcontent-%COMP%], settings-button[_ngcontent-%COMP%]{flex:0 0 auto}.brand[_ngcontent-%COMP%]{letter-spacing:-0.025em;margin-left:10px;text-rendering:optimizeLegibility}.plugins[_ngcontent-%COMP%]{align-items:center;display:flex;flex:1 1 auto;font-size:14px;height:100%;overflow:hidden}"]}),n})(),JCe_setDocumentTitle=function(n){document.title=n},mY=(()=>{class n{ngOnChanges(e){e.title&&JCe_setDocumentTitle(e.title.currentValue)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["page-title-component"]],inputs:{title:"title"},features:[Gt],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),hY="TensorBoard",gY=(()=>{class n{constructor(e,i){this.store=e,this.customBrandName=i,this.getExperimentId$=this.store.select(lr).pipe(N(r=>r?.[0])),this.experimentName$=this.getExperimentId$.pipe(ke(Boolean),hn(r=>this.store.select(BS,{experimentId:r})),N(r=>r?r.name:null)),this.title$=this.store.select(xS).pipe(Li(this.store.select(Ha),this.experimentName$),N(([r,o,s])=>{let a=this.customBrandName||hY;return r.window_title?r.window_title:o===wn.EXPERIMENT&&s?`${s} - ${a}`:a}),qn(this.customBrandName||hY),Yn())}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(v6,8))},n.\u0275cmp=O({type:n,selectors:[["page-title"]],decls:2,vars:3,consts:[[3,"title"]],template:function(e,i){1&e&&(P(0,"page-title-component",0),j(1,"async")),2&e&&_("title",W(1,1,i.title$))},dependencies:[mY,ct],styles:["[_nghost-%COMP%] {\n        display: none;\n      }"],changeDetection:0}),n})(),_Y=(()=>{class n{constructor(e){this.store=e,this.ngUnsubscribe=new Ie,this.getPageSize$=this.store.pipe(un(_f)),this.paginatedViewStore=document.createElement("tf-paginated-view-store").tf_paginated_view}ngOnInit(){this.getPageSize$.pipe(ot(this.ngUnsubscribe),Yn()).subscribe(e=>{this.paginatedViewStore.setLimit(e)})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["settings-polymer-interop"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),bY=(()=>{class n{constructor(e){this.vcRef=e}}return n.\u0275fac=function(e){return new(e||n)(C(si))},n.\u0275cmp=O({type:n,selectors:[["tb-webapp"]],decls:9,vars:0,template:function(e,i){1&e&&(P(0,"app-header"),h(1,"main"),P(2,"router-outlet"),g(),P(3,"alert-snackbar")(4,"hash-storage")(5,"page-title")(6,"settings-polymer-interop")(7,"dark-mode-supporter")(8,"feature-flag-modal-trigger"))},dependencies:[Mq,Sq,n9,Eq,Dq,fY,gY,_Y],styles:["html[_ngcontent-%COMP%], body[_ngcontent-%COMP%]{font-family:Roboto,sans-serif;height:100%;margin:0;padding:0}[_nghost-%COMP%]{background:#f5f5f5;display:flex;flex-direction:column;height:100%}app-header[_ngcontent-%COMP%]{box-shadow:0 1px 3px 3px rgba(0,0,0,.25);flex:0 0;z-index:1}body.dark-mode[_nghost-%COMP%]   app-header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   app-header[_ngcontent-%COMP%]{box-shadow:0 1px 3px 3px rgba(255,255,255,.1)}main[_ngcontent-%COMP%]{flex-grow:1;overflow:auto}"]}),n})(),vY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Sh,wh,Dl]}),n})(),yY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),xY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:_u,useClass:X8}]}),n})(),CY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,xY]}),n})(),MY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),wY={id:Xw,name:"",start_time:0},iMe=br({experimentMap:{[wY.id]:wY}});function SY(n,t){return rf({data:iMe})(n,t)}var EY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Tr.forFeature(LS,SY)]}),n})(),TY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,ci,Ja]}),n})(),DY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,TY]}),n})(),IY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,xg,bq,ci,Fc,hg,di,$a]}),n})();function rMe(){return q(Iv,n=>({autoReload:n}))}function oMe(){return q(Av,n=>({autoReloadPeriodInMs:n}))}function sMe(){return q(_f,n=>({pageSize:n}))}var yE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Tr.forFeature(M1,Nq),Ki.defineGlobalSetting(rMe),Ki.defineGlobalSetting(oMe),Ki.defineGlobalSetting(sMe),IY]}),n})(),AY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[ci,di,vE,Fq,Ja,ju,Pe,Ga,yE]}),n})(),RY=(()=>{class n{constructor(e,i){let r=e.bypassSecurityTrustResourceUrl("./icon_bundle.svg");i.addSvgIconSet(r)}}return n.\u0275fac=function(e){return new(e||n)(k(Zp),k(Mg))},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[di]}),n})(),oN=new ie("[plugins] Plugin registry config"),PY=new Map,Bc=(()=>{class n{constructor(e){if(!e)return;let i=new Set(e.map(r=>r.pluginName));console.assert(i.size===e.length,"Cannot register the same plugin multiple times.");for(let r of e){let{pluginName:o,componentClass:s}=r;PY.set(o,s)}}static forPlugin(e,i){return{ngModule:n,providers:[{provide:oN,multi:!0,useValue:{pluginName:e,componentClass:i}}]}}getComponent(e){return PY.get(e)||null}}return n.\u0275fac=function(e){return new(e||n)(k(oN,8))},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),xE=(()=>{class n{constructor(e){this.http=e,this.httpPathPrefix="data/plugin/debugger-v2"}fetchRuns(){return this.http.get(this.httpPathPrefix+"/runs")}fetchExecutionDigests(e,i,r){return this.http.get(this.httpPathPrefix+"/execution/digests",{params:{run:e,begin:String(i),end:String(r)}})}fetchExecutionData(e,i,r){return this.http.get(this.httpPathPrefix+"/execution/data",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphExecutionDigests(e,i,r,o){if(void 0!==o)throw new Error("trace_id is not implemented for fetchGraphExecutionDigests() yet");return this.http.get(this.httpPathPrefix+"/graph_execution/digests",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphExecutionData(e,i,r,o){if(void 0!==o)throw new Error("trace_id is not implemented for fetchGraphExecutionData() yet");return this.http.get(this.httpPathPrefix+"/graph_execution/data",{params:{run:e,begin:String(i),end:String(r)}})}fetchGraphOpInfo(e,i,r){return this.http.get(this.httpPathPrefix+"/graphs/op_info",{params:{run:e,graph_id:i,op_name:r}})}fetchSourceFileList(e){return this.http.get(this.httpPathPrefix+"/source_files/list",{params:{run:e}})}fetchSourceFile(e,i){return this.http.get(this.httpPathPrefix+"/source_files/file",{params:{run:e,index:String(i)}})}fetchStackFrames(e,i){return this.http.get(this.httpPathPrefix+"/stack_frames/stack_frames",{params:{run:e,stack_frame_ids:i.join(",")}}).pipe(N(r=>({stack_frames:r.stack_frames.map(o=>function(n){return{host_name:n[0],file_path:n[1],lineno:n[2],function_name:n[3]}}(o))})))}fetchAlerts(e,i,r,o){let s={run:e,begin:String(i),end:String(r)};return void 0!==o&&(s.alert_type=o),this.http.get(this.httpPathPrefix+"/alerts",{params:s})}}return n.\u0275fac=function(e){return new(e||n)(k(Ua))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),OY=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[xE],imports:[Oh]}),n})(),CE=_e("[Debugger] Debugger Loaded"),ME=_e("[Debugger] Debugger Unloaded"),ay=_e("[Debugger] A New Debugger Data Polling Event Begins"),wE=_e("[Debugger] Debugger Runs Requested"),SE=_e("[Debugger] Debugger Runs Loaded",{_as:"props",_p:void 0}),kY=_e("[Debugger] Debugger Runs Request Failed"),ly=_e("[Debugger] Number and Breakdown of Alerts Requested"),EE=_e("[Debugger] Number and Breakdown of Alerts Loaded",{_as:"props",_p:void 0}),TE=_e("[Debugger] Alerts Data of an AlertType Is Loaded",{_as:"props",_p:void 0}),Sg=_e("[Debugger] Alert Type Focus Toggled",{_as:"props",_p:void 0}),DE=_e("[Debugger] Number of Top-Level Executions Requested"),IE=_e("[Debugger] Number of Top-Level Executions Loaded",{_as:"props",_p:void 0}),AE=_e("[Debugger] ExecutionDigests Requested",{_as:"props",_p:void 0}),RE=_e("[Debugger] ExecutionDigests Loaded",{_as:"props",_p:void 0}),Eg=_e("[Debugger] Scroll Leftward on the Execution Timeline"),Tg=_e("[Debugger] Scroll Rightward on the Execution Timeline"),Dg=_e("[Debugger] Scroll the Execution Timeline to Given Index",{_as:"props",_p:void 0}),Ig=_e("[Debugger] Execution Data Objects Being Focused On",{_as:"props",_p:void 0}),PE=_e("[Debugger] Execution Data Objects Loaded",{_as:"props",_p:void 0}),OE=_e("[Debugger] Number of Intra-Graph Executions Requested"),kE=_e("[Debugger] Number of Intra-Graph Executions Loaded",{_as:"props",_p:void 0}),FE=_e("[Debugger] Intra-Graph Execution Data Requested",{_as:"props",_p:void 0}),NE=_e("[Debugger] Intra-Graph Execution Data Loaded",{_as:"props",_p:void 0}),Ag=_e("[Debugger] Scroll Intra-Graph Execution List to Given Index",{_as:"props",_p:void 0}),Rg=_e("[Debugger] Graph Execution is Focused On",{_as:"props",_p:void 0}),Pg=_e("[Debugger] Graph Op Is Focused On",{_as:"props",_p:void 0}),LE=_e("[Debugger] Graph Op Info Requested",{_as:"props",_p:void 0}),BE=_e("[Debugger] Graph Op Info Loaded",{_as:"props",_p:void 0}),VE=_e("[Debugger] Source File List Requested."),HE=_e("[Debugger] Source File List Loaded",{_as:"props",_p:void 0}),Og=_e("[Debugger] Source File Line Is Focused on",{_as:"props",_p:void 0}),zE=_e("[Debugger] Source File Requested",{_as:"props",_p:void 0}),UE=_e("[Debugger] Source File Loaded",{_as:"props",_p:void 0}),cy=_e("[Debugger] A Set of Stack Frames Have Been Loaded",{_as:"props",_p:void 0}),dy="debugger",So=(()=>(function(n){n[n.UNSPECIFIED=0]="UNSPECIFIED",n[n.NO_TENSOR=1]="NO_TENSOR",n[n.CURT_HEALTH=2]="CURT_HEALTH",n[n.CONCISE_HEALTH=3]="CONCISE_HEALTH",n[n.FULL_HEALTH=4]="FULL_HEALTH",n[n.SHAPE=5]="SHAPE",n[n.FULL_NUMERICS=6]="FULL_NUMERICS",n[n.FULL_TENSOR=7]="FULL_TENSOR",n[n.REDUCE_INF_NAN_THREE_SLOTS=8]="REDUCE_INF_NAN_THREE_SLOTS"}(So||(So={})),So))(),Vc=(()=>(function(n){n.FUNCTION_RECOMPILE_ALERT="FunctionRecompilesAlert",n.INF_NAN_ALERT="InfNanAlert",n.TENSOR_SHAPE_ALERT="TensorShapeAlert"}(Vc||(Vc={})),Vc))(),Lo=(()=>(function(n){n[n.EXECUTION=0]="EXECUTION",n[n.GRAPH_OP_CREATION=1]="GRAPH_OP_CREATION"}(Lo||(Lo={})),Lo))();function kg(n){if(null===n.codeLocationFocusType)return null;let t=[];if(n.codeLocationFocusType===Lo.EXECUTION){let{focusIndex:i,executionData:r}=n.executions;if(null===i||void 0===r[i])return null;t=r[i].stack_frame_ids}else{if(null===n.graphs.focusedOp)return null;let{graphId:i,opName:r}=n.graphs.focusedOp;if(void 0===n.graphs.ops[i]||!n.graphs.ops[i].has(r))return null;t=n.graphs.ops[i].get(r).stack_frame_ids}let e=[];for(let i of t){if(null==n.stackFrames[i])return null;e.push(n.stackFrames[i])}return e}function uy(n,t){return n.findIndex(e=>e.host_name===t.host_name&&e.file_path===t.file_path)}function aN(n,t,e){if(t>=e)throw new Error(`Expected begin to be less than end, but got begin=${t}, end=${e}`);return n.findIndex(i=>i.begin===t&&i.end===e)}function jE(n){let t=n.sourceCode.focusLineSpec;if(!n.stickToBottommostFrameInFocusedFile)return t;let e=kg(n);if(null===e)return t;let i=function(n,t){if(null===t)return null;for(let e=n.length-1;e>=0;--e){let i=n[e],{host_name:r,file_path:o}=i;if(r===t.host_name&&o===t.file_path)return i}return null}(e,t);return null===i?t:i}var bMe=br({runs:{},runsLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},activeRunId:null,lastDataPollOnsetTimeMs:-1,lastNonEmptyPollDataTimeMs:1,alerts:{alertsLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},numAlerts:0,alertsBreakdown:{},alerts:{},executionIndices:{},graphExecutionIndices:{},focusType:null},executions:{numExecutionsLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},executionDigestsLoaded:{loadingRanges:[],numExecutions:0,pageLoadedSizes:{}},displayCount:50,pageSize:100,scrollBeginIndex:0,focusIndex:null,executionDigests:{},executionData:{}},graphExecutions:{numExecutionsLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},executionDigestsLoaded:{loadingRanges:[],numExecutions:0,pageLoadedSizes:{}},displayCount:100,pageSize:200,scrollBeginIndex:0,focusIndex:null,graphExecutionDigests:{},graphExecutionDataLoadingPages:[],graphExecutionDataPageLoadedSizes:{},graphExecutionData:{}},graphs:{ops:{},loadingOps:{},focusedOp:null},stackFrames:{},codeLocationFocusType:null,stickToBottommostFrameInFocusedFile:!1,sourceCode:{sourceFileListLoaded:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},sourceFileList:[],fileContents:[],focusLineSpec:null}},ye(wE,n=>({...n,runsLoaded:{...n.runsLoaded,state:Te.LOADING}})),ye(kY,n=>({...n,runsLoaded:{...n.runsLoaded,state:Te.FAILED}})),ye(SE,(n,{runs:t})=>{let e=Object.keys(t),i=e.length>0&&null===n.activeRunId;return{...n,lastNonEmptyPollDataTimeMs:i?Date.now():n.lastNonEmptyPollDataTimeMs,runs:t,runsLoaded:{state:Te.LOADED,lastLoadedTimeInMs:Date.now()},activeRunId:e.length>0?e[0]:null}}),ye(ay,n=>({...n,lastDataPollOnsetTimeMs:Date.now()})),ye(ly,n=>null===n.activeRunId?n:{...n,alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Te.LOADING}}}),ye(EE,(n,{numAlerts:t,alertsBreakdown:e})=>{if(null===n.activeRunId)return n;let r=t>n.alerts.numAlerts;return{...n,lastNonEmptyPollDataTimeMs:r?Date.now():n.lastNonEmptyPollDataTimeMs,alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Te.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e}}}),ye(TE,(n,{numAlerts:t,alertsBreakdown:e,alertType:i,begin:r,alerts:o})=>{if(null===n.activeRunId)return n;let a={},l=n.alerts.executionIndices[i]?n.alerts.executionIndices[i].slice():[],c=n.alerts.graphExecutionIndices[i]?n.alerts.graphExecutionIndices[i].slice():[];for(let p=0;p<o.length;++p){let f=r+p,m=o[p];if(a[f]=m,m.alert_type===Vc.INF_NAN_ALERT){let b=m;l[f]=b.execution_index,null!==b.graph_execution_trace_index&&(c[f]=b.graph_execution_trace_index)}}void 0!==n.alerts.alerts[i]&&Object.assign(a,n.alerts.alerts[i]);let d=n.executions.scrollBeginIndex,u=n.graphExecutions.focusIndex;if(i===Vc.INF_NAN_ALERT&&0===r){let p=o[0];d=Math.max(0,p.execution_index-Math.floor(n.executions.displayCount/2)),null!==p.graph_execution_trace_index&&(u=p.graph_execution_trace_index)}return{...n,executions:{...n.executions,scrollBeginIndex:d},graphExecutions:{...n.graphExecutions,focusIndex:u},alerts:{...n.alerts,alertsLoaded:{...n.alerts.alertsLoaded,state:Te.LOADED,lastLoadedTimeInMs:Date.now()},numAlerts:t,alertsBreakdown:e,alerts:{...n.alerts.alerts,[i]:a},executionIndices:{...n.alerts.executionIndices,[i]:l},graphExecutionIndices:{...n.alerts.graphExecutionIndices,[i]:c}}}}),ye(Sg,(n,{alertType:t})=>{let e={...n,alerts:{...n.alerts,focusType:n.alerts.focusType===t?null:t}},i=e.alerts.focusType;if(null!==i){let r=e.alerts.executionIndices[i]||[];void 0!==r[0]&&(e.executions={...e.executions,scrollBeginIndex:Math.max(0,Number(r[0])-Math.floor(e.executions.displayCount/2))})}return e}),ye(DE,n=>null===n.activeRunId?n:{...n,executions:{...n.executions,numExecutionsLoaded:{...n.executions.numExecutionsLoaded,state:Te.LOADING}}}),ye(IE,(n,{numExecutions:t})=>{if(null===n.activeRunId)return n;let i=t>n.executions.executionDigestsLoaded.numExecutions,r={...n,lastNonEmptyPollDataTimeMs:i?Date.now():n.lastNonEmptyPollDataTimeMs,executions:{...n.executions,numExecutionsLoaded:{...n.executions.numExecutionsLoaded,state:Te.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.executions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.executions.focusIndex&&(r.executions.focusIndex=0),r}),ye(AE,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges];return-1===aN(i,t.begin,t.end)&&i.push({begin:t.begin,end:t.end}),{...n,executions:{...n.executions,executionDigestsLoaded:{...n.executions.executionDigestsLoaded,loadingRanges:i}}}}),ye(RE,(n,t)=>{if(null===n.activeRunId)return n;let i=[...n.executions.executionDigestsLoaded.loadingRanges],r=aN(i,t.begin,t.end);-1!==r&&i.splice(r,1);let o={...n,executions:{...n.executions,executionDigestsLoaded:{...n.executions.executionDigestsLoaded,numExecutions:t.num_digests,loadingRanges:i},executionDigests:{...n.executions.executionDigests}}};for(let s=t.begin;s<t.end;++s)o.executions.executionDigests[s]=t.execution_digests[s-t.begin];return t.end>t.begin&&(o.executions.executionDigestsLoaded.pageLoadedSizes={...o.executions.executionDigestsLoaded.pageLoadedSizes,[t.begin/n.executions.pageSize]:t.end-t.begin}),o}),ye(Eg,n=>{if(null===n.activeRunId)return n;let e=n.executions.scrollBeginIndex;return e>0&&e--,{...n,executions:{...n.executions,scrollBeginIndex:e}}}),ye(Tg,n=>{if(null===n.activeRunId)return n;let e=n.executions.scrollBeginIndex;return e+n.executions.displayCount+1<=n.executions.executionDigestsLoaded.numExecutions&&e++,{...n,executions:{...n.executions,scrollBeginIndex:e}}}),ye(Dg,(n,t)=>{if(t.index<0||!Number.isInteger(t.index))throw new Error(`Attempt to scroll to negative or non-integer execution index (${t.index})`);let{displayCount:e}=n.executions,{numExecutions:i}=n.executions.executionDigestsLoaded;if(t.index>Math.max(0,i-e))throw new Error(`Attempt to scroll to execution index (${t.index}), which exceeds maximum allowed index (numExecutions=${i}; displayCount=${e})`);return{...n,executions:{...n.executions,scrollBeginIndex:t.index}}}),ye(Ig,(n,t)=>{let e={...n,executions:{...n.executions,focusIndex:n.executions.scrollBeginIndex+t.displayIndex},codeLocationFocusType:Lo.EXECUTION,sourceCode:{...n.sourceCode}};return e.sourceCode.focusLineSpec=jE(e),e}),ye(PE,(n,t)=>{if(null===n.activeRunId)return n;let i={...n,executions:{...n.executions,executionData:{...n.executions.executionData}}};for(let r=t.begin;r<t.end;++r)i.executions.executionData[r]=t.executions[r-t.begin];return i}),ye(OE,n=>null===n.activeRunId?n:{...n,graphExecutions:{...n.graphExecutions,numExecutionsLoaded:{...n.graphExecutions.numExecutionsLoaded,state:Te.LOADING}}}),ye(kE,(n,{numGraphExecutions:t})=>{if(null===n.activeRunId)return n;let e=t>n.graphExecutions.executionDigestsLoaded.numExecutions,i={...n,lastNonEmptyPollDataTimeMs:e?Date.now():n.lastNonEmptyPollDataTimeMs,graphExecutions:{...n.graphExecutions,numExecutionsLoaded:{...n.graphExecutions.numExecutionsLoaded,state:Te.LOADED,lastLoadedTimeInMs:Date.now()},executionDigestsLoaded:{...n.graphExecutions.executionDigestsLoaded,numExecutions:t}}};return t>0&&null===n.graphExecutions.focusIndex&&(i.graphExecutions.focusIndex=0),i}),ye(FE,(n,{pageIndex:t})=>{if(null===n.activeRunId)return n;let e=n.graphExecutions.graphExecutionDataLoadingPages.slice();return-1===e.indexOf(t)&&e.push(t),{...n,graphExecutions:{...n.graphExecutions,graphExecutionDataLoadingPages:e}}}),ye(NE,(n,t)=>{if(null===n.activeRunId)return n;let{pageSize:e}=n.graphExecutions,i=n.graphExecutions.graphExecutionDataLoadingPages.slice(),r={...n.graphExecutions.graphExecutionDataPageLoadedSizes},o={...n.graphExecutions.graphExecutionData};for(let s=t.begin;s<t.end;++s){let a=Math.floor(s/e);-1!==i.indexOf(a)&&i.splice(i.indexOf(a),1),void 0===r[a]&&(r[a]=0),void 0===o[s]&&r[a]++,o[s]=t.graph_executions[s-t.begin]}return{...n,graphExecutions:{...n.graphExecutions,graphExecutionDataLoadingPages:i,graphExecutionDataPageLoadedSizes:r,graphExecutionData:o}}}),ye(Ag,(n,t)=>{if(t.index<0||!Number.isInteger(t.index))throw new Error(`Attempt to scroll to negative or non-integer graph-execution index (${t.index})`);return{...n,graphExecutions:{...n.graphExecutions,scrollBeginIndex:t.index}}}),ye(Rg,(n,t)=>LY(n,t.graph_id,t.op_name,t.index)),ye(Pg,(n,t)=>LY(n,t.graph_id,t.op_name)),ye(LE,(n,t)=>{let{graph_id:e,op_name:i}=t,r={...n,graphs:{...n.graphs,loadingOps:{...n.graphs.loadingOps}}};return void 0===r.graphs.loadingOps[e]&&(r.graphs.loadingOps[e]=new Map),r.graphs.loadingOps[e].has(i)||r.graphs.loadingOps[e].set(i,Te.LOADING),r}),ye(BE,(n,t)=>{let{graphOpInfoResponse:e}=t,{graph_ids:i}=e,r=i[i.length-1],o={...n,graphs:{...n.graphs,ops:{...n.graphs.ops,[r]:new Map(n.graphs.ops[r])},loadingOps:{...n.graphs.loadingOps,[r]:new Map(n.graphs.loadingOps[r])}}};for(let s of e.inputs)!s.data||o.graphs.ops[r].set(s.op_name,s.data);for(let s=0;s<e.consumers.length;++s)for(let a of e.consumers[s])!a.data||o.graphs.ops[r].set(a.op_name,a.data);return o.graphs.ops[r].set(e.op_name,{...e,inputs:e.inputs.map(s=>({op_name:s.op_name,output_slot:s.output_slot})),consumers:e.consumers.map(s=>s.map(a=>({op_name:a.op_name,input_slot:a.input_slot})))}),o.graphs.loadingOps[r].set(e.op_name,Te.LOADED),o}),ye(VE,n=>({...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Te.LOADING}}})),ye(HE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,sourceFileListLoaded:{...n.sourceCode.sourceFileListLoaded,state:Te.LOADED,lastLoadedTimeInMs:Date.now()},sourceFileList:t.sourceFiles,fileContents:n.sourceCode.fileContents.slice()}},i=t.sourceFiles.length,{fileContents:r}=e.sourceCode;for(let o=0;o<i;++o)r[o]=n.sourceCode.fileContents[o]??{loadState:Te.NOT_LOADED,lines:null};return e}),ye(Og,(n,t)=>{let e=kg(n),i={...n,sourceCode:{...n.sourceCode,focusLineSpec:t.stackFrame}};return null!==e&&(i.stickToBottommostFrameInFocusedFile=function(n,t){let e=-1,i=-1;if(n.forEach(({file_path:r,lineno:o},s)=>{r===t.file_path&&(i=s,o===t.lineno&&(e=s))}),-1===e)throw new Error(`Stack frame ${JSON.stringify(t)} is not found.`);return e===i}(e,t.stackFrame)),i}),ye(zE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=uy(e.sourceCode.sourceFileList,t);if(!(i>=0))throw new Error(`Cannot find the following file in file list: host_name="${t.host_name}", file_path="${t.file_path}"`);return e.sourceCode.fileContents.splice(i,1,{...e.sourceCode.fileContents[i],loadState:Te.LOADING}),e}),ye(UE,(n,t)=>{let e={...n,sourceCode:{...n.sourceCode,fileContents:n.sourceCode.fileContents.slice()}},i=uy(e.sourceCode.sourceFileList,t);if(!(i>=0))throw new Error(`Cannot find the following file in file list: host_name="${t.host_name}", file_path="${t.file_path}"`);return e.sourceCode.fileContents.splice(i,1,{loadState:Te.LOADED,lines:t.lines}),e}),ye(cy,(n,t)=>{if(null===n.activeRunId)return n;let i={...n,stackFrames:{...n.stackFrames,...t.stackFrames},sourceCode:{...n.sourceCode}};return i.sourceCode.focusLineSpec=jE(i),i}));function LY(n,t,e,i){let r={...n,graphs:{...n.graphs,focusedOp:{graphId:t,opName:e}},codeLocationFocusType:Lo.GRAPH_OP_CREATION,sourceCode:{...n.sourceCode}};return r.sourceCode.focusLineSpec=jE(r),void 0!==i&&(r.graphExecutions={...n.graphExecutions,focusIndex:i}),r}function BY(n,t){return bMe(n,t)}var Eo=Er(dy),Af=q(Eo,n=>n.runs),lN=q(Eo,n=>n.runsLoaded),Qo=q(Eo,n=>n.activeRunId),VY=q(Eo,n=>n.lastDataPollOnsetTimeMs-n.lastNonEmptyPollDataTimeMs),Fg=q(Eo,n=>n.alerts),cN=q(Fg,n=>n.alertsLoaded),HY=q(Fg,n=>n.numAlerts),GE=q(Fg,n=>n.focusType),zY=q(Fg,n=>null===n.focusType?0:n.alertsBreakdown[n.focusType]||0),UY=q(Fg,n=>null===n.focusType||void 0===n.alerts[n.focusType]?null:n.alerts[n.focusType]),jY=q(Fg,n=>n.alertsBreakdown),Rf=q(Eo,n=>n.executions),WE=q(Rf,n=>n.numExecutionsLoaded),py=q(Rf,n=>n.executionDigestsLoaded),Gu=q(Rf,n=>n.executionDigestsLoaded.numExecutions),fy=q(Rf,n=>n.scrollBeginIndex),Ng=q(Rf,n=>n.pageSize),Lg=q(Rf,n=>n.displayCount),GY=q(Rf,n=>{let t=[];for(let e=n.scrollBeginIndex;e<n.scrollBeginIndex+n.displayCount;++e)t.push(e in n.executionDigests?n.executionDigests[e]:null);return t}),Wu=q(Eo,n=>n.graphExecutions),WY=q(Wu,n=>n.numExecutionsLoaded),my=q(Eo,n=>n.graphExecutions.executionDigestsLoaded.numExecutions),qY=q(Wu,n=>n.scrollBeginIndex),YY=q(Wu,n=>n.displayCount),XY=q(Wu,n=>n.pageSize),QY=q(Wu,n=>n.graphExecutionDataLoadingPages),ZY=q(Wu,n=>n.graphExecutionDataPageLoadedSizes),dN=q(Wu,n=>n.graphExecutionData),uN=q(Wu,n=>n.focusIndex),pN=q(Eo,n=>n.graphs),fN=q(pN,n=>{let{focusedOp:t,ops:e}=n;return null===t||void 0===e[t.graphId]?null:e[t.graphId].get(t.opName)||null}),mN=q(pN,n=>{let{focusedOp:t,ops:e}=n;if(null===t||void 0===e[t.graphId]||!e[t.graphId].has(t.opName))return null;{let i=e[t.graphId],{inputs:r}=i.get(t.opName);return r.map(o=>{let s={...o};return i.has(o.op_name)&&(s.data=i.get(o.op_name)),s})}}),KY=q(uN,dN,mN,(n,t,e)=>{if(null===n||null===e)return null;let i=e.map(a=>!1),r=[];if(0===e.length)return r;let o=t[n].graph_id,s=Math.max(0,n-200);for(let a=n-1;a>=s;--a)if(void 0!==t[a])for(let l=0;l<e.length&&(i[l]||t[a].graph_id!==o||t[a].op_name!==e[l].op_name||t[a].output_slot!==e[l].output_slot||(r.push(a),i[l]=!0,r.length!==e.length));++l);return r}),JY=q(pN,n=>{let{focusedOp:t,ops:e}=n;if(null===t||void 0===e[t.graphId]||!e[t.graphId].has(t.opName))return null;{let i=e[t.graphId],{consumers:r}=i.get(t.opName);return r.map(o=>o.map(s=>{let a={...s};return i.has(s.op_name)&&(a.data=i.get(s.op_name)),a}))}}),$Y=q(Eo,n=>{let t=n.executions.scrollBeginIndex,e=n.executions.scrollBeginIndex+n.executions.displayCount,i=new Array(e-t).fill(null),r=n.alerts.focusType;if(null===r)return i;let o=n.alerts.executionIndices[r];if(void 0===o)return i;for(let s=t;s<e;++s)o.includes(s)&&(i[s-t]=n.alerts.focusType);return i}),qE=q(Eo,n=>n.executions),hN=q(qE,n=>n.focusIndex),eX=q(qE,n=>{if(null===n.focusIndex)return null;let{focusIndex:t,scrollBeginIndex:e,displayCount:i}=n;return t<e||t>=e+i?null:t-e}),gN=q(qE,n=>n.executionData),tX=q(Eo,n=>n.graphs.loadingOps),_N=q(Eo,n=>n.stackFrames),Pf=q(qE,n=>{let{focusIndex:t,executionData:e}=n;return null===t||void 0===e[t]?null:e[t]}),hy=q(Eo,hN,Pf,fN,(n,t,e,i)=>{let{codeLocationFocusType:r}=n;return null===r?null:r===Lo.EXECUTION?null===t||null===e?null:{codeLocationType:Lo.EXECUTION,opType:e.op_type,executionIndex:t}:null===i?null:{codeLocationType:Lo.GRAPH_OP_CREATION,opType:i.op_type,opName:i.op_name}}),nX=q(Eo,kg),YE=q(Eo,n=>n.sourceCode),iX=q(YE,n=>n.sourceFileListLoaded),bN=(q(YE,n=>n.sourceFileList),q(YE,n=>{let{sourceFileList:t,focusLineSpec:e}=n;return null===e?-1:uy(t,e)})),XE=q(YE,bN,(n,t)=>-1===t?null:n.fileContents[t]||null),QE=q(Eo,n=>n.sourceCode.focusLineSpec),rX=q(Eo,n=>n.stickToBottommostFrameInFocusedFile),oX=function(n){return[n]};function yMe(n,t){if(1&n){let e=ge();h(0,"div",7),I("click",function(){let o=X(e).$implicit;return Q(w().onToggleFocusType.emit(o.type))}),h(1,"div",8),T(2),g(),h(3,"div",9),T(4),g(),P(5,"div"),g()}if(2&n){let e=t.$implicit,i=w();_("ngClass",In(4,oX,e.type===i.focusType?"focus":"")),v(2),bt(e.displayName),v(2),lu(" ",e.displaySymbol,": ",e.count," ")}}var sX=(()=>{class n{constructor(){this.numAlerts=0,this.alertsBreakdown=[],this.focusType=null,this.onToggleFocusType=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["alerts-component"]],inputs:{numAlerts:"numAlerts",alertsBreakdown:"alertsBreakdown",focusType:"focusType"},outputs:{onToggleFocusType:"onToggleFocusType"},decls:10,vars:5,consts:[[1,"alerts-container"],[1,"debugging-title"],[1,"num-alerts-container"],[1,"num-alerts-label"],[1,"num-alerts-value",3,"ngClass"],[1,"alerts-breakdown-container"],["class","alerts-breakdown-type",3,"ngClass","click",4,"ngFor","ngForOf"],[1,"alerts-breakdown-type",3,"ngClass","click"],[1,"alert-type-name"],[1,"alert-type-count"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1),T(2,"Debugging"),g(),h(3,"div",2)(4,"div",3),T(5,"Alerts"),g(),h(6,"div",4),T(7),g()(),h(8,"div",5),S(9,yMe,6,6,"div",6),g()()),2&e&&(v(6),_("ngClass",In(3,oX,i.numAlerts>0?"non-zero":"")),v(1),He(" ",i.numAlerts," "),v(2),_("ngForOf",i.alertsBreakdown))},dependencies:[yn,nn],styles:[".alerts-breakdown-container[_ngcontent-%COMP%] {\n  font-size: 13px;\n  padding: 10px 10px 10px;\n  position: relative;\n}\n\n.alerts-breakdown-type[_ngcontent-%COMP%] {\n  border-radius: 0 10px 10px 0;\n  cursor: pointer;\n  display: flex;\n  padding: 6px 0 6px 50px;\n  vertical-align: middle;\n}\n\n.alerts-breakdown-type.focus[_ngcontent-%COMP%] {\n  background-color: #ffeee0;\n}\n\n.alerts-container[_ngcontent-%COMP%] {\n  font-family: 'Roboto', Arial, Helvetica, sans-serif;\n}\n\n.alert-type-count[_ngcontent-%COMP%] {\n  \n  background-color: #e52592;\n  border-radius: 3px;\n  color: #fff;\n  display: inline-block;\n  padding: 3px;\n  position: absolute;\n  right: 20px;\n  vertical-align: middle;\n}\n\n.alert-type-name[_ngcontent-%COMP%] {\n  display: inline-block;\n  padding: 3px;\n  vertical-align: middle;\n}\n\n.debugging-title[_ngcontent-%COMP%] {\n  font-size: 18px;\n}\n\n.num-alerts-container[_ngcontent-%COMP%] {\n  font-weight: bold;\n  padding: 10px 10px 10px 30px;\n  position: relative;\n}\n\n.num-alerts-label[_ngcontent-%COMP%] {\n  display: inline-block;\n  font-size: 13px;\n}\n\n.num-alerts-value[_ngcontent-%COMP%] {\n  border-radius: 12px;\n  display: inline-block;\n  font-size: 13px;\n  font-weight: normal;\n  line-height: 24px;\n  position: absolute;\n  right: 20px;\n  text-align: center;\n  vertical-align: middle;\n  width: 24px;\n}\n\n.num-alerts-value.non-zero[_ngcontent-%COMP%] {\n  background-color: #ffb780;\n  font-weight: bold;\n}"]}),n})(),CMe={[Vc.FUNCTION_RECOMPILE_ALERT]:{displayName:"Function recompiles",displaySymbol:"C"},[Vc.INF_NAN_ALERT]:{displayName:"NaN/\u221e",displaySymbol:"\u221e"},[Vc.TENSOR_SHAPE_ALERT]:{displayName:"Tensor shape",displaySymbol:"\u25a0"}},aX=(()=>{class n{constructor(e){this.store=e,this.numAlerts$=this.store.pipe(un(HY)),this.alertsBreakdown$=this.store.pipe(un(q(jY,i=>{let r=Object.keys(i);return r.sort(),r.map(o=>({type:o,...CMe[o],count:i[o]}))}))),this.focusType$=this.store.pipe(un(GE))}onToggleFocusType(e){this.store.dispatch(Sg({alertType:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-alerts"]],decls:4,vars:9,consts:[[3,"numAlerts","alertsBreakdown","focusType","onToggleFocusType"]],template:function(e,i){1&e&&(h(0,"alerts-component",0),I("onToggleFocusType",function(o){return i.onToggleFocusType(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("numAlerts",W(1,3,i.numAlerts$))("alertsBreakdown",W(2,5,i.alertsBreakdown$))("focusType",W(3,7,i.focusType$))},dependencies:[sX,ct],encapsulation:2,changeDetection:0}),n})(),gy={19:"float16",1:"float32",2:"float64",3:"int32",4:"uint8",17:"uint16",22:"uint32",23:"uint64",5:"int16",6:"int8",7:"string",8:"complex64",18:"complex128",9:"int64",10:"bool",11:"qint8",12:"quint8",15:"qint16",16:"quint16",13:"qint32",14:"bfloat16",20:"resource",21:"variant",119:"float16_ref",101:"float32_ref",102:"float64_ref",103:"int32_ref",122:"uint32_ref",104:"uint8_ref",117:"uint16_ref",105:"int16_ref",106:"int8_ref",107:"string_ref",108:"complex64_ref",118:"complex128_ref",109:"int64_ref",123:"uint64_ref",110:"bool_ref",111:"qint8_ref",112:"quint8_ref",115:"qint16_ref",116:"quint16_ref",113:"qint32_ref",114:"bfloat16_ref",120:"resource_ref",121:"variant_ref"};function ZE(n){let{tensorDebugMode:t,array:e}=n;switch(t){case So.NO_TENSOR:if(null!==e)throw new Error("Unexpectedly received non-null debug-tensor-value array under NO_TENSOR mode");return{};case So.CURT_HEALTH:if(null===e||2!==e.length)throw new Error(`Under CURT_HEALTH mode, expected debug-tensor-value array to have length 2, but got ${JSON.stringify(e)}`);return{hasInfOrNaN:Boolean(e[1])};case So.CONCISE_HEALTH:{if(null===e||5!==e.length)throw new Error(`Under CONCISE_HEALTH mode, expected debug-tensor-value array to have length 5, but got ${JSON.stringify(e)}`);let i={size:e[1]};return e[2]>0&&(i.numNegativeInfs=e[2]),e[3]>0&&(i.numPositiveInfs=e[3]),e[4]>0&&(i.numNaNs=e[4]),i}case So.SHAPE:{if(null===e||10!==e.length)throw new Error(`Under SHAPE mode, expected debug-tensor-value array to have length 10, but got ${JSON.stringify(e)}`);let i=e[2],r=e.slice(4,Math.min(4+i,e.length));return r.length<i&&(r=new Array(i-r.length).concat(r)),{dtype:gy[e[1]],rank:i,size:e[3],shape:r}}case So.FULL_HEALTH:{if(null===e||11!==e.length)throw new Error(`Under FULL_HEALTH mode, expected debug-tensor-value array to have length 11, but got ${JSON.stringify(e)}`);let r={dtype:gy[e[2]],rank:e[3],size:e[4]};return e[5]>0&&(r.numNegativeInfs=e[5]),e[6]>0&&(r.numPositiveInfs=e[6]),e[7]>0&&(r.numNaNs=e[7]),e[8]>0&&(r.numNegativeFinites=e[8]),e[9]>0&&(r.numZeros=e[9]),e[10]>0&&(r.numPositiveFinites=e[10]),r}case So.FULL_TENSOR:if(null!==e)throw new Error("Unexpectedly received non-null debug-tensor-value array under FULL_TENSOR mode");return{};default:throw new Error(`Unrecognized tensorDebugMode: ${t}`)}}var vN="[_nghost-%COMP%] {\n    background-color: #e3e5e8;\n    border: 1px solid #c0c0c0;\n    border-radius: 4px;\n    font-family: 'Roboto Mono', monospace;\n    height: 14px;\n    line-height: 14px;\n    margin: 0 2px;\n    padding: 1px 3px;\n    width: max-content;\n  }";function wMe(n,t){1&n&&P(0,"div",4)}function SMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",8),T(2,"NaN"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numNaNs,"")}}function EMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",8),T(2,"-\u221e"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numNegativeInfs,"")}}function TMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",8),T(2,"+\u221e"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numPositiveInfs,"")}}function DMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",10),T(2,"-"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numNegativeFinites,"")}}function IMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",10),T(2,"0"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numZeros,"")}}function AMe(n,t){if(1&n&&(h(0,"div",7)(1,"span",10),T(2,"+"),g(),h(3,"span",9),T(4),g()()),2&n){let e=w(2);v(4),He("\xd7",e.numPositiveFinites,"")}}function RMe(n,t){if(1&n&&(h(0,"div",5),S(1,SMe,5,1,"div",6),S(2,EMe,5,1,"div",6),S(3,TMe,5,1,"div",6),S(4,DMe,5,1,"div",6),S(5,IMe,5,1,"div",6),S(6,AMe,5,1,"div",6),g()),2&n){let e=w();v(1),_("ngIf",void 0!==e.numNaNs&&e.numNaNs>0),v(1),_("ngIf",void 0!==e.numNegativeInfs&&e.numNegativeInfs>0),v(1),_("ngIf",void 0!==e.numPositiveInfs&&e.numPositiveInfs>0),v(1),_("ngIf",void 0!==e.numNegativeFinites&&e.numNegativeFinites>0),v(1),_("ngIf",void 0!==e.numZeros&&e.numZeros>0),v(1),_("ngIf",void 0!==e.numPositiveFinites&&e.numPositiveFinites>0)}}var PMe=function(n){return["container",n]};function OMe(n,t){1&n&&P(0,"debug-tensor-dtype",5),2&n&&_("dtype",w().debugTensorValue.dtype)}function kMe(n,t){1&n&&P(0,"debug-tensor-rank",6),2&n&&_("rank",w().debugTensorValue.rank)}function FMe(n,t){1&n&&P(0,"debug-tensor-shape",7),2&n&&_("shape",w().debugTensorValue.shape)}function NMe(n,t){1&n&&P(0,"debug-tensor-has-inf-or-nan",8),2&n&&_("hasInfOrNaN",w().debugTensorValue.hasInfOrNaN)}function LMe(n,t){if(1&n&&P(0,"debug-tensor-numeric-breakdown",9),2&n){let e=w();Wi("size",e.debugTensorValue.size),_("numNegativeInfs",e.debugTensorValue.numNegativeInfs)("numPositiveInfs",e.debugTensorValue.numPositiveInfs)("numNaNs",e.debugTensorValue.numNaNs)("numNegativeFinites",e.debugTensorValue.numNegativeFinites)("numZeros",e.debugTensorValue.numZeros)("numPositiveFinites",e.debugTensorValue.numPositiveFinites)}}var BMe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-dtype"]],inputs:{dtype:"dtype"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&He(" ",i.dtype," ")},styles:[vN]}),n})(),VMe=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-rank"]],inputs:{rank:"rank"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&He(" ",i.rank,"D ")},styles:[vN]}),n})(),HMe=(()=>{class n{get shapeString(){return"["+this.shape.map(e=>void 0===e?"?":String(e)).join(",")+"]"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-shape"]],inputs:{shape:"shape"},decls:1,vars:1,template:function(e,i){1&e&&T(0),2&e&&He(" shape:",i.shapeString," ")},styles:[vN]}),n})(),zMe=(()=>{class n{get breakdownExists(){return void 0!==this.numNaNs||void 0!==this.numNegativeInfs||void 0!==this.numPositiveInfs||void 0!==this.numNegativeFinites||void 0!==this.numZeros||void 0!==this.numPositiveFinites}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-numeric-breakdown"]],inputs:{size:"size",numNaNs:"numNaNs",numNegativeInfs:"numNegativeInfs",numPositiveInfs:"numPositiveInfs",numNegativeFinites:"numNegativeFinites",numZeros:"numZeros",numPositiveFinites:"numPositiveFinites"},decls:7,vars:3,consts:[[1,"size"],[1,"size-value"],["class","break",4,"ngIf"],["class","breakdown",4,"ngIf"],[1,"break"],[1,"breakdown"],["class","category",4,"ngIf"],[1,"category"],[1,"category-tag","infinite"],[1,"category-count"],[1,"category-tag","finite"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"span"),T(2,"size:"),g(),h(3,"span",1),T(4),g()(),S(5,wMe,1,0,"div",2),S(6,RMe,7,6,"div",3)),2&e&&(v(4),bt(i.size),v(1),_("ngIf",i.breakdownExists),v(1),_("ngIf",i.breakdownExists))},dependencies:[Fe],styles:["[_nghost-%COMP%] {\n        background-color: #e3e5e8;\n        border: 1px solid #c0c0c0;\n        border-radius: 4px;\n        font-family: 'Roboto Mono', monospace;\n        font-size: 10px;\n        margin: 0 2px;\n        padding: 1px;\n      }\n      .break[_ngcontent-%COMP%] {\n        flex-basis: 100%;\n        width: 0;\n      }\n      .size[_ngcontent-%COMP%] {\n        display: block;\n        height: 11px;\n        line-height: 11px;\n        margin: 0 3px;\n        vertical-align: middle;\n      }\n      .breakdown[_ngcontent-%COMP%] {\n        border-top: 1px solid rgba(0, 0, 0, 0.12);\n        display: flex;\n        height: 11px;\n        line-height: 11px;\n        padding: 2px;\n        vertical-align: middle;\n      }\n      .category[_ngcontent-%COMP%] {\n        margin-bottom: 2px;\n        margin-left: 4px;\n        margin-top: 2px;\n        heigth: 100%;\n        width: max-content;\n      }\n      .category-tag[_ngcontent-%COMP%] {\n        border-radius: 2px;\n        padding: 0 2px;\n      }\n      .finite[_ngcontent-%COMP%] {\n        background-color: #aaa;\n        color: #fefefe;\n      }\n      .infinite[_ngcontent-%COMP%] {\n        background-color: #e52592;\n        color: #fff;\n      }"]}),n})(),UMe=(()=>{class n{get infoString(){return this.hasInfOrNaN?"Has \u221e/NaN":"No \u221e/NaN"}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-has-inf-or-nan"]],inputs:{hasInfOrNaN:"hasInfOrNaN"},decls:2,vars:4,consts:[[3,"ngClass"]],template:function(e,i){1&e&&(h(0,"div",0),T(1),g()),2&e&&(_("ngClass",In(2,PMe,i.hasInfOrNaN?"has-inf-or-nan":"")),v(1),He(" ",i.infoString," "))},dependencies:[yn],styles:[".container[_ngcontent-%COMP%] {\n        background-color: #e3e5e8;\n        border: 1px solid #c0c0c0;\n        border-radius: 4px;\n        color: #666666;\n        font-family: 'Roboto Mono', monospace;\n        height: 14px;\n        line-height: 14px;\n        margin: 0 2px;\n        padding: 1px 3px;\n        width: max-content;\n      }\n      .has-inf-or-nan[_ngcontent-%COMP%] {\n        background-color: #e52592;\n        color: #fff;\n      }"]}),n})(),KE=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debug-tensor-value"]],inputs:{debugTensorValue:"debugTensorValue"},decls:5,vars:5,consts:[[3,"dtype",4,"ngIf"],[3,"rank",4,"ngIf"],[3,"shape",4,"ngIf"],[3,"hasInfOrNaN",4,"ngIf"],[3,"size","numNegativeInfs","numPositiveInfs","numNaNs","numNegativeFinites","numZeros","numPositiveFinites",4,"ngIf"],[3,"dtype"],[3,"rank"],[3,"shape"],[3,"hasInfOrNaN"],[3,"size","numNegativeInfs","numPositiveInfs","numNaNs","numNegativeFinites","numZeros","numPositiveFinites"]],template:function(e,i){1&e&&(S(0,OMe,1,1,"debug-tensor-dtype",0),S(1,kMe,1,1,"debug-tensor-rank",1),S(2,FMe,1,1,"debug-tensor-shape",2),S(3,NMe,1,1,"debug-tensor-has-inf-or-nan",3),S(4,LMe,1,7,"debug-tensor-numeric-breakdown",4)),2&e&&(_("ngIf",void 0!==i.debugTensorValue.dtype),v(1),_("ngIf",void 0!==i.debugTensorValue.rank),v(1),_("ngIf",void 0!==i.debugTensorValue.shape),v(1),_("ngIf",void 0!==i.debugTensorValue.hasInfOrNaN),v(1),_("ngIf",void 0!==i.debugTensorValue.size))},dependencies:[Fe,BMe,UMe,zMe,VMe,HMe],styles:["[_nghost-%COMP%] {\n        align-items: flex-start;\n        display: flex;\n        flex-wrap: nowrap;\n        overflow: hidden;\n        vertical-align: top;\n      }\n      debug-tensor-numeric-breakdown[_ngcontent-%COMP%] {\n        display: inline-block;\n      }"]}),n})();function jMe(n,t){1&n&&(h(0,"div",12),T(1,"\u25b6"),g())}var GMe=function(n,t){return{tensorDebugMode:n,array:t}};function WMe(n,t){if(1&n&&P(0,"debug-tensor-value",17),2&n){let e=w(2).$implicit,i=w(2);_("debugTensorValue",i.parseDebugTensorValue(qr(1,GMe,i.graphExecutionData[e].tensor_debug_mode,i.graphExecutionData[e].debug_tensor_value)))}}function qMe(n,t){if(1&n){let e=ge();h(0,"div")(1,"div",13)(2,"button",14),I("click",function(){X(e);let r=w().$implicit,o=w(2);return Q(o.onTensorNameClick.emit({index:r,graph_id:o.graphExecutionData[r].graph_id,op_name:o.graphExecutionData[r].op_name}))}),T(3),g(),h(4,"div",15),T(5),g()(),S(6,WMe,1,4,"debug-tensor-value",16),g()}if(2&n){let e=w().$implicit,i=w(2);v(2),Wi("title",i.getTensorName(e)),v(1),He(" ",i.getTensorName(e)," "),v(2),bt(i.graphExecutionData[e].op_type),v(1),_("ngIf",null!==i.graphExecutionData[e].debug_tensor_value)}}function YMe(n,t){1&n&&(h(0,"div",18),T(1," Loading... "),g())}var XMe=function(n){return{"input-of-focus":n}};function QMe(n,t){if(1&n&&(h(0,"div",5)(1,"div",6)(2,"div",7),S(3,jMe,2,0,"div",8),T(4),g(),S(5,qMe,7,4,"div",9),S(6,YMe,2,0,"ng-template",10,11,Wt),g()()),2&n){let e=t.$implicit,i=it(7),r=w(2);v(1),_("ngClass",In(5,XMe,r.isInputOfFocus(e))),v(2),_("ngIf",e===r.focusIndex),v(1),He(" ",e," "),v(1),_("ngIf",r.graphExecutionData[e])("ngIfElse",i)}}function ZMe(n,t){if(1&n){let e=ge();h(0,"cdk-virtual-scroll-viewport",3),I("scrolledIndexChange",function(r){return X(e),Q(w().onScrolledIndexChange.emit(r))}),S(1,QMe,8,7,"div",4),g()}if(2&n){let e=w();v(1),_("cdkVirtualForOf",e.graphExecutionIndices)}}var cX=(()=>{class n{constructor(){this.onScrolledIndexChange=new F,this.onTensorNameClick=new F,this.parseDebugTensorValue=ZE,this.TEST_ONLY={getViewPort:()=>this.viewPort}}ngOnChanges(e){if(this.viewPort&&e.focusIndex&&null!==e.focusIndex.currentValue){let i=this.viewPort.getRenderedRange(),r=e.focusIndex.currentValue,o=Math.round((i.end-i.start)/3),s=Math.max(r-o,0);this.viewPort.scrollToIndex(s,r>=i.start&&r<i.end?"smooth":void 0)}}getTensorName(e){return`${this.graphExecutionData[e].op_name}:${this.graphExecutionData[e].output_slot}`}isInputOfFocus(e){return null!==this.focusInputIndices&&this.focusInputIndices.includes(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["graph-executions-component"]],viewQuery:function(e,i){if(1&e&&Ge(ug,5),2&e){let r;Se(r=Ee())&&(i.viewPort=r.first)}},inputs:{numGraphExecutions:"numGraphExecutions",graphExecutionData:"graphExecutionData",graphExecutionIndices:"graphExecutionIndices",focusIndex:"focusIndex",focusInputIndices:"focusInputIndices"},outputs:{onScrolledIndexChange:"onScrolledIndexChange",onTensorNameClick:"onTensorNameClick"},features:[Gt],decls:4,vars:2,consts:[[1,"graph-executions-container"],[1,"graph-executions-title"],["itemSize","38","class","graph-executions-viewport",3,"scrolledIndexChange",4,"ngIf"],["itemSize","38",1,"graph-executions-viewport",3,"scrolledIndexChange"],["class","tensor-container",4,"cdkVirtualFor","cdkVirtualForOf"],[1,"tensor-container"],[1,"tensor-item",3,"ngClass"],[1,"graph-execution-index"],["class","graph-execution-focus",4,"ngIf"],[4,"ngIf","ngIfElse"],["class","tensor-item"],["dataLoading",""],[1,"graph-execution-focus"],[1,"tensor-name-and-op-type"],[1,"tensor-name",3,"title","click"],[1,"op-type"],[3,"debugTensorValue",4,"ngIf"],[3,"debugTensorValue"],[1,"loading-spinner"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1),T(2),g(),S(3,ZMe,2,1,"cdk-virtual-scroll-viewport",2),g()),2&e&&(v(2),He(" Graph Executions (",i.numGraphExecutions,") "),v(1),_("ngIf",null!==i.numGraphExecutions&&i.numGraphExecutions>0))},dependencies:[yn,Fe,KE,V7,H7,ug],styles:['.graph-executions-container[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;display:flex;flex-direction:column;height:100%;margin-left:8px;padding-left:10px}body.dark-mode[_nghost-%COMP%]   .graph-executions-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .graph-executions-container[_ngcontent-%COMP%]{border-left:1px solid #555}.graph-execution-focus[_ngcontent-%COMP%]{display:inline-block}.graph-execution-index[_ngcontent-%COMP%]{color:#616161;display:inline-block;padding-right:4px;text-align:right;width:40px}body.dark-mode[_nghost-%COMP%]   .graph-execution-index[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .graph-execution-index[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.graph-executions-title[_ngcontent-%COMP%]{box-shadow:0 5px 3px -3px #ccc;padding-bottom:5px}.graph-executions-viewport[_ngcontent-%COMP%]{flex-grow:1;font-size:12px;width:100%;overflow-x:hidden}.input-of-focus[_ngcontent-%COMP%]{background-color:#fff099}body.dark-mode[_nghost-%COMP%]   .input-of-focus[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .input-of-focus[_ngcontent-%COMP%]{background-color:#e65100}.loading-spinner[_ngcontent-%COMP%]{display:inline-block}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content;direction:rtl;display:block}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.tensor-container[_ngcontent-%COMP%]{width:100%}.tensor-item[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;flex-wrap:nowrap;height:38px;line-height:38px;text-align:left;vertical-align:middle;white-space:nowrap;width:100%}body.dark-mode[_nghost-%COMP%]   .tensor-item[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .tensor-item[_ngcontent-%COMP%]{border-bottom:1px solid #555}.tensor-name[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0);border:none;box-sizing:border-box;color:inherit;cursor:pointer;direction:rtl;display:block;height:16px;line-height:16px;margin:2px 0 1px;max-width:calc(100% - 2px);overflow:hidden;padding:0 2px;text-align:right;text-decoration:underline;text-overflow:ellipsis;white-space:nowrap}.tensor-name[_ngcontent-%COMP%]:focus{outline:1px solid #c6cad1}.tensor-name-and-op-type[_ngcontent-%COMP%]{direction:rtl;display:inline-block;overflow:hidden;padding-right:8px;text-align:right;width:240px}debug-tensor-value[_ngcontent-%COMP%]{display:inline-block;margin:2px 0}'],changeDetection:0}),n})(),dX=(()=>{class n{onScrolledIndexChange(e){this.store.dispatch(Ag({index:e}))}onTensorNameClick(e){this.store.dispatch(Rg(e))}constructor(e){this.store=e,this.numGraphExecutions$=this.store.pipe(un(my)),this.graphExecutionData$=this.store.pipe(un(dN)),this.graphExecutionIndices$=this.store.pipe(un(q(my,i=>0===i?null:Array.from({length:i}).map((r,o)=>o)))),this.focusIndex$=this.store.pipe(un(uN)),this.focusInputIndices$=this.store.pipe(un(KY))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-graph-executions"]],decls:6,vars:15,consts:[[3,"numGraphExecutions","graphExecutionData","graphExecutionIndices","focusIndex","focusInputIndices","onScrolledIndexChange","onTensorNameClick"]],template:function(e,i){1&e&&(h(0,"graph-executions-component",0),I("onScrolledIndexChange",function(o){return i.onScrolledIndexChange(o)})("onTensorNameClick",function(o){return i.onTensorNameClick(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),g()),2&e&&_("numGraphExecutions",W(1,5,i.numGraphExecutions$))("graphExecutionData",W(2,7,i.graphExecutionData$))("graphExecutionIndices",W(3,9,i.graphExecutionIndices$))("focusIndex",W(4,11,i.focusIndex$))("focusInputIndices",W(5,13,i.focusInputIndices$))},dependencies:[cX,ct],encapsulation:2}),n})();function $Me(n,t){1&n&&(h(0,"span"),T(1," Output "),g())}function ewe(n,t){1&n&&(h(0,"span"),T(1," Input "),g())}function twe(n,t){if(1&n&&(h(0,"div",6)(1,"span",7),S(2,$Me,2,0,"span",8),S(3,ewe,2,0,"span",8),g(),T(4),g()),2&n){let e=w();v(1),_("ngSwitch",e.kind),v(1),_("ngSwitchCase","input"),v(1),_("ngSwitchCase","consumer"),v(1),He(" slot: ",e.slot," ")}}function nwe(n,t){if(1&n&&(h(0,"div",9),T(1),g()),2&n){let e=w();v(1),He(" ",e.opData.op_type," ")}}function iwe(n,t){1&n&&(h(0,"span",10),T(1," (Op info unavailable.) "),g())}var rwe=function(n){return[n]},uX=(()=>{class n{constructor(){this.onOpNameClick=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["graph-op"]],inputs:{kind:"kind",opName:"opName",slot:"slot",opData:"opData"},outputs:{onOpNameClick:"onOpNameClick"},decls:9,vars:7,consts:[[1,"op-container"],[1,"input-tensor-name"],[1,"op-name",3,"ngClass","click"],["class","slot",4,"ngIf"],["class","op-type",4,"ngIf","ngIfElse"],["opInfoMissing",""],[1,"slot"],[3,"ngSwitch"],[4,"ngSwitchCase"],[1,"op-type"],[1,"op-info-missing"]],template:function(e,i){if(1&e&&(h(0,"button",0)(1,"div",1)(2,"button",2),I("click",function(){return i.onOpNameClick.emit({op_name:i.opName})}),h(3,"span"),T(4),g()(),S(5,twe,5,4,"div",3),g(),S(6,nwe,2,1,"div",4),S(7,iwe,2,0,"ng-template",null,5,Wt),g()),2&e){let r=it(8);v(2),_("ngClass",In(5,rwe,"self"===i.kind?"self-op-name":"")),v(2),bt(i.opName),v(1),_("ngIf","self"!==i.kind),v(1),_("ngIf",void 0!==i.opData)("ngIfElse",r)}},dependencies:[yn,Fe,sr,Sr],styles:['.op-container[_ngcontent-%COMP%], .op-name[_ngcontent-%COMP%]{color:inherit;background-color:inherit}.op-container[_ngcontent-%COMP%]{border:2px solid #ebebeb;border-radius:4px;box-shadow:1px 3px #eee;cursor:pointer;margin:0 5px 0 0;padding:2px 6px;text-align:right;width:200px}body.dark-mode[_nghost-%COMP%]   .op-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-container[_ngcontent-%COMP%]{border:2px solid #555}body.dark-mode[_nghost-%COMP%]   .op-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-container[_ngcontent-%COMP%]{box-shadow:1px 3px #757575}.op-container[_ngcontent-%COMP%]:focus{outline:0}.op-container[_ngcontent-%COMP%]:hover{border:2px solid #ffd3b2}.op-info-missing[_ngcontent-%COMP%]{color:gray}.op-name[_ngcontent-%COMP%]{border:none;cursor:pointer;display:inline-block;overflow-wrap:anywhere;padding:0;text-align:right;text-decoration:underline;white-space:pre-wrap}.op-name[_ngcontent-%COMP%]:focus{outline:0}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content;display:inline-block;margin-top:3px}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.self-op-name[_ngcontent-%COMP%]{font-weight:bold;text-decoration:none}.slot[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .slot[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slot[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}']}),n})();function swe(n,t){if(1&n){let e=ge();h(0,"div",13)(1,"div",14),T(2),g(),h(3,"graph-op",15),I("onOpNameClick",function(r){X(e);let o=w(3);return Q(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()()}if(2&n){let e=t.$implicit,i=t.index;v(2),He("Input slot ",i,":"),v(1),_("kind","input")("opName",e.op_name)("slot",e.output_slot)("opData",e.data)}}function awe(n,t){if(1&n&&(h(0,"div",11)(1,"div"),S(2,swe,4,5,"div",12),g()()),2&n){let e=w(2);v(2),_("ngForOf",e.inputOps)}}function lwe(n,t){1&n&&(h(0,"div",16),T(1," (This op has no input tensor.) "),g())}function cwe(n,t){if(1&n){let e=ge();h(0,"div",23)(1,"graph-op",15),I("onOpNameClick",function(r){X(e);let o=w(4);return Q(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()()}if(2&n){let e=t.$implicit;v(1),_("kind","consumer")("opName",e.op_name)("slot",e.input_slot)("opData",e.data)}}function dwe(n,t){if(1&n&&(h(0,"div",19)(1,"div",20),T(2),h(3,"span"),qM(4,21),g(),T(5,") "),g(),S(6,cwe,2,4,"div",22),g()),2&n){let e=t.$implicit,i=t.index;v(2),lu(" Output slot ",i,": (",e.length," "),v(2),hb(e.length),YM(4),v(2),_("ngForOf",e)}}function uwe(n,t){if(1&n&&(h(0,"div",17)(1,"div"),S(2,dwe,7,4,"div",18),g()()),2&n){let e=w(2);v(2),_("ngForOf",e.consumerOps)}}function pwe(n,t){if(1&n&&(h(0,"div",24),T(1),h(2,"span"),qM(3,25),g(),T(4," and no consumer.) "),g()),2&n){let e=w(2);v(1),He(" (This op has ",e.opInfo.consumers.length," output "),v(2),hb(e.opInfo.consumers.length),YM(3)}}function fwe(n,t){if(1&n){let e=ge();h(0,"div"),S(1,awe,3,1,"div",4),S(2,lwe,2,0,"ng-template",null,5,Wt),h(4,"div",6)(5,"div",7),T(6,"Op:"),g(),h(7,"graph-op",8),I("onOpNameClick",function(r){X(e);let o=w();return Q(o.onGraphOpNavigate.emit({op_name:r.op_name,graph_id:o.graphId}))}),g()(),S(8,uwe,3,1,"div",9),S(9,pwe,5,2,"ng-template",null,10,Wt),g()}if(2&n){let e=it(3),i=it(10),r=w();v(1),_("ngIf",r.inputOps.length>0)("ngIfElse",e),v(6),_("kind","self")("opName",r.opInfo.op_name)("opData",r.opInfo),v(1),_("ngIf",r.totalNumConsumers>0)("ngIfElse",i)}}function mwe(n,t){1&n&&(h(0,"span",26),T(1," (Op info unavailable.) "),g())}function hwe(n,t){1&n&&(h(0,"div",27),T(1," No graph op selected. Click a tensor name in the Graph Executions table to view the neighborhood of the tensor's op in its graph. "),g())}var pX=(()=>{class n{constructor(){this.onGraphOpNavigate=new F}get graphId(){return this.opInfo.graph_ids[this.opInfo.graph_ids.length-1]}get totalNumConsumers(){return this.consumerOps.reduce((e,i)=>e+i.length,0)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["graph-component"]],inputs:{opInfo:"opInfo",inputOps:"inputOps",consumerOps:"consumerOps"},outputs:{onGraphOpNavigate:"onGraphOpNavigate"},decls:9,vars:2,consts:function(){let t,e,i,r;return t=$localize`:␟fe55f9b193ea20aae5b5635e68d9386503847746␟4955133740841299851:{VAR_PLURAL, plural, =0 {consumer} =1 {consumer} other {consumers}}`,t=XM(t,{VAR_PLURAL:"\ufffd0\ufffd"}),e=$localize`:␟baa460e2f2b857e26292b246fc18ae0ea9b5e537␟5556340343850165516: ${t}:ICU:`,i=$localize`:␟6aa75f627e0dc16150ef448464e0c857aaa0dc18␟5156712935150586878:{VAR_PLURAL, plural, =0 {tensor} =1 {tensor} other {tensors}}`,i=XM(i,{VAR_PLURAL:"\ufffd0\ufffd"}),r=$localize`:␟893476c2c421cee47663c9732fa41a750d3a73df␟246067053735162634: ${i}:ICU:`,[[1,"graph-structure-container"],[4,"ngIf","ngIfElse"],["opInfoMissing",""],["noOpFocused",""],["class","inputs-container",4,"ngIf","ngIfElse"],["noInputs",""],[1,"self-op-container"],[1,"self-op-header"],[3,"kind","opName","opData","onOpNameClick"],["class","consumers-container",4,"ngIf","ngIfElse"],["noConsumers",""],[1,"inputs-container"],["class","input-op-section",4,"ngFor","ngForOf"],[1,"input-op-section"],[1,"input-slot-header"],[3,"kind","opName","slot","opData","onOpNameClick"],[1,"inputs-container","no-inputs-indicator"],[1,"consumers-container"],["class","slot-consumers-container",4,"ngFor","ngForOf"],[1,"slot-consumers-container"],[1,"slot-consumers-header"],e,["class","consumer-section",4,"ngFor","ngForOf"],[1,"consumer-section"],[1,"op-consumers-container"],r,[1,"op-info-missing"],[1,"no-op-focused"]]},template:function(e,i){if(1&e&&(h(0,"div")(1,"div"),T(2,"Graph Structure"),g(),h(3,"div",0),S(4,fwe,11,7,"div",1),g(),S(5,mwe,2,0,"ng-template",null,2,Wt),S(7,hwe,2,0,"ng-template",null,3,Wt),g()),2&e){let r=it(8);v(4),_("ngIf",null!=i.opInfo)("ngIfElse",r)}},dependencies:[nn,Fe,uX],styles:['[_nghost-%COMP%]{overflow-y:auto}.consumers-container[_ngcontent-%COMP%]{padding-bottom:5px;overflow-x:auto;white-space:nowrap}.consumer-section[_ngcontent-%COMP%]{display:block;margin:5px 0}.graph-structure-container[_ngcontent-%COMP%]{font-size:12px;overflow-y:auto;white-space:nowrap}.inputs-container[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);margin-top:5px;overflow-x:auto;padding-bottom:0;white-space:nowrap}.input-op-section[_ngcontent-%COMP%]{border-right:1px solid rgba(0,0,0,.12);display:inline-block;margin-right:5px;padding-bottom:5px}.input-slot-header[_ngcontent-%COMP%]{background-color:#fff099;margin-bottom:5px}body.dark-mode[_nghost-%COMP%]   .input-slot-header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .input-slot-header[_ngcontent-%COMP%]{background-color:#e65100}.input-tensor-name[_ngcontent-%COMP%]{display:block;white-space:nowrap}.no-op-focused[_ngcontent-%COMP%]{color:gray;font-family:"Roboto",Arial,Helvetica,sans-serif;font-size:13px;white-space:normal}.self-op-header[_ngcontent-%COMP%]{font-weight:bold;margin-bottom:5px}.self-op-container[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.12);padding-bottom:5px}.slot-consumers-container[_ngcontent-%COMP%]{border-right:1px solid rgba(0,0,0,.12);display:inline-block;margin-right:5px;padding-top:5px;vertical-align:top}.slot-consumers-header[_ngcontent-%COMP%]{white-space:nowrap}'],changeDetection:0}),n})(),fX=(()=>{class n{onGraphOpNavigate(e){this.store.dispatch(Pg(e))}constructor(e){this.store=e,this.opInfo$=this.store.pipe(un(fN)),this.inputOps$=this.store.pipe(un(mN)),this.consumerOps$=this.store.pipe(un(JY))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-graph"]],decls:4,vars:9,consts:[[3,"opInfo","inputOps","consumerOps","onGraphOpNavigate"]],template:function(e,i){1&e&&(h(0,"graph-component",0),I("onGraphOpNavigate",function(o){return i.onGraphOpNavigate(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("opInfo",W(1,3,i.opInfo$))("inputOps",W(2,5,i.inputOps$))("consumerOps",W(3,7,i.consumerOps$))},dependencies:[pX,ct],encapsulation:2}),n})(),mX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["inactive-component"]],decls:54,vars:0,consts:[[1,"container"],[1,"title"],[1,"code"],[1,"arg"],[1,"exhibits-container"],[1,"exhibit"],[1,"screenshot"],["src","data:image/png;base64, "],[1,"description"],["src","data:image/png;base64, "],["src","data:image/png;base64, "],[1,"details-container"],[1,"details"],["href","https://www.tensorflow.org/api_docs/python/tf/debugging/experimental/enable_dump_debug_info","target","blank","rel","noreferrer noopener"],["href","https://www.tensorflow.org/api_docs/python/tf/debugging","target","blank","rel","noreferrer noopener"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1),T(2,"Debugger V2 is inactive because no data is available."),g(),h(3,"div"),T(4,"To use the debugger,"),g(),h(5,"div")(6,"ol")(7,"li"),T(8," Add the following line to the beginning of your program: "),h(9,"div",2)(10,"span"),T(11,"tf.debugging.experimental.enable_dump_debug_info("),g(),h(12,"span",3),T(13,"logdir"),g(),T(14,", "),h(15,"span",3),T(16,'tensor_debug_mode="FULL_HEALTH"'),g(),T(17,", "),h(18,"span",3),T(19,"circular_buffer_size=-1"),g(),h(20,"span"),T(21,")"),g()()(),h(22,"li"),T(23,"Re-run the program."),g()()(),h(24,"div",4)(25,"div",5)(26,"div",6),P(27,"img",7),g(),h(28,"div",8),T(29,"Auto-alerts for problems found"),g()(),h(30,"div",5)(31,"div",6),P(32,"img",9),g(),h(33,"div",8),T(34," Integrated debugging to trace problems to their causes "),g()(),h(35,"div",5)(36,"div",6),P(37,"img",10),g(),h(38,"div",8),T(39,"Link log to code"),g()()(),h(40,"div",11)(41,"div",12),T(42," The log directory must contain TensorFlow Debugger (V2) data. tf.debugging.experimental.enable_dump_debug_info() will collect tensor data, graph structures, the associated stack traces, and source code to the specificed directory logdir as the instrumented TensorFlow program executes. "),g(),h(43,"div",12)(44,"div"),T(45," See "),h(46,"a",13),T(47," documentation "),g(),T(48," of the Python API of Debugger V2. "),g(),h(49,"div"),T(50," See "),h(51,"a",14),T(52," here "),g(),T(53," for other TensorFlow debugging APIs. "),g()()()())},styles:[".arg[_ngcontent-%COMP%] {\n  color: lightblue;\n  font-style: italic;\n  margin: 2px;\n}\n\n.code[_ngcontent-%COMP%] {\n  font-family: 'Roboto Mono', monospace;\n  margin: 10px;\n}\n\n.container[_ngcontent-%COMP%] {\n  height: 100%;\n  font-family: Roboto;\n  font-size: 15px;\n  overflow-y: auto;\n  padding: 50px;\n}\n\n.details-container[_ngcontent-%COMP%] {\n  display: inline-flex;\n  vertical-align: middle;\n  width: 100%;\n}\n\n.details[_ngcontent-%COMP%] {\n  display: inline-block;\n  margin: 10px 60px;\n  width: 50%;\n}\n\n.exhibit-container[_ngcontent-%COMP%] {\n  white-space: nowrap;\n  width: 100%;\n}\n\n.exhibit[_ngcontent-%COMP%] {\n  align-content: center;\n  display: inline-block;\n  margin: 10px 60px;\n  vertical-align: top;\n  width: 310px;\n}\n\n.exhibit[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%] {\n  font-weight: bold;\n  text-align: center;\n  width: 310px;\n}\n\n.exhibit[_ngcontent-%COMP%]   .screenshot[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%] {\n  height: 200px;\n  width: 100%;\n}\n\n.title[_ngcontent-%COMP%] {\n  font-size: 135%;\n  font-weight: bold;\n  margin-bottom: 25px;\n}"]}),n})(),hX=(()=>{class n{constructor(e){this.store=e}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-inactive"]],decls:1,vars:0,template:function(e,i){1&e&&P(0,"inactive-component")},dependencies:[mX],encapsulation:2}),n})(),_X={getWindow:function(){return window}};function gX(n){let t=_X.getWindow().require;return new Promise(e=>{t(n,e)})}var xN_loadMonaco=async function(){let n=_X.getWindow();if(void 0===n.monaco){if(!n.require)throw new Error("loadMonaco() failed because function require() is unavailable");n.require.config({paths:{vs:"/tf-imports/vs"}}),await gX(["vs/editor/editor.main"]),await gX(["vs/python/python.contribution"])}};function JE(n){return n?"vs-dark":"vs"}var Of=(()=>{class n{constructor(e){this.resizeEventDebouncePeriodInMs=100,this.onResize=new F,this.ngUnsubscribe$=new Ie,this.onResize$=new Ie;let i=new ResizeObserver(()=>{this.onResize$.next()});i.observe(e.nativeElement),this.ngUnsubscribe$.subscribe(()=>{i.unobserve(e.nativeElement)})}ngOnInit(){this.onResize$.pipe(ia(1),wr(this.resizeEventDebouncePeriodInMs),ot(this.ngUnsubscribe$)).subscribe(()=>{this.onResize.emit()})}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275dir=we({type:n,selectors:[["","detectResize",""]],inputs:{resizeEventDebouncePeriodInMs:"resizeEventDebouncePeriodInMs"},outputs:{onResize:"onResize"}}),n})(),Mwe=["codeViewerContainer"],xX=(()=>{class n{constructor(){this.lines=null,this.focusedLineno=null,this.monaco=null,this.editor=null,this.decorations=[],this.RESIZE_DEBOUNCE_INTERVAL_MS=50}onResize(){this.editor&&this.editor.layout()}ngOnChanges(e){if(null===this.monaco)return;let i=e.monaco&&null===this.editor;null===this.editor&&(this.editor=this.monaco.editor.create(this.codeViewerContainer.nativeElement,{value:(this.lines??[]).join("\n"),language:"python",readOnly:!0,fontSize:10,minimap:{enabled:!0},theme:JE(this.useDarkMode)})),e.lines&&this.lines&&this.editor.setValue(this.lines.join("\n"));let r=i||e.focusedLineno?this.focusedLineno:null;if(r&&this.lines){this.editor.revealLineInCenter(r,this.monaco.editor.ScrollType.Smooth);let o=this.lines[r-1].length;this.decorations=this.editor.deltaDecorations(this.decorations,[{range:new this.monaco.Range(r,1,r,1),options:{isWholeLine:!0,linesDecorationsClassName:"highlight-gutter"}},{range:new this.monaco.Range(r,1,r,o+1),options:{inlineClassName:"highlight-line"}}])}e.useDarkMode&&this.monaco.editor.setTheme(JE(this.useDarkMode))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["source-code-component"]],viewQuery:function(e,i){if(1&e&&Ge(Mwe,7,Me),2&e){let r;Se(r=Ee())&&(i.codeViewerContainer=r.first)}},inputs:{lines:"lines",focusedLineno:"focusedLineno",monaco:"monaco",useDarkMode:"useDarkMode"},features:[Gt],decls:2,vars:1,consts:[["detectResize","",1,"code-viewer-container",3,"resizeEventDebouncePeriodInMs","onResize"],["codeViewerContainer",""]],template:function(e,i){1&e&&(h(0,"div",0,1),I("onResize",function(){return i.onResize()}),g()),2&e&&_("resizeEventDebouncePeriodInMs",i.RESIZE_DEBOUNCE_INTERVAL_MS)},dependencies:[Of],styles:[".code-viewer-container[_ngcontent-%COMP%] {\n  height: 100%;\n}\n\n[_nghost-%COMP%]     .highlight-gutter {\n  background: rgba(255, 111, 0, 0.7);\n  width: 5px !important;\n}\n\n[_nghost-%COMP%]     .highlight-line {\n  background: rgba(255, 111, 0, 0.3);\n}"],changeDetection:0}),n})(),CX=(()=>{class n{ngOnInit(){this.monaco$=$r(xN_loadMonaco()).pipe(N(()=>window.monaco))}constructor(){this.lines=null,this.focusedLineno=null,this.useDarkMode=!1,this.monaco$=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["source-code"]],inputs:{lines:"lines",focusedLineno:"focusedLineno",useDarkMode:"useDarkMode"},decls:2,vars:6,consts:[[3,"lines","focusedLineno","monaco","useDarkMode"]],template:function(e,i){1&e&&(P(0,"source-code-component",0),j(1,"async")),2&e&&_("lines",i.lines)("focusedLineno",i.focusedLineno)("monaco",W(1,4,i.monaco$))("useDarkMode",i.useDarkMode)},dependencies:[xX,ct],encapsulation:2}),n})();function Ewe(n,t){if(1&n&&(h(0,"div",6),T(1),g()),2&n){let e=w();v(1),He(" ",e.focusedSourceLineSpec.file_path," ")}}function Twe(n,t){1&n&&(h(0,"div",7),T(1," No file selected. Click a line number in the Stack Trace section to show the source code. "),g())}function Dwe(n,t){if(1&n&&P(0,"source-code",8),2&n){let e=w();_("lines",e.focusedSourceFileContent.lines)("focusedLineno",e.focusedSourceLineSpec.lineno)("useDarkMode",e.useDarkMode)}}var MX=(()=>{class n{constructor(){this.focusedSourceFileContent=null,this.focusedSourceLineSpec=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["source-files-component"]],inputs:{focusedSourceFileContent:"focusedSourceFileContent",focusedSourceLineSpec:"focusedSourceLineSpec",useDarkMode:"useDarkMode"},decls:8,vars:3,consts:[[1,"source-files-container"],[1,"header-section"],[1,"title-tag"],["class","file-label",4,"ngIf","ngIfElse"],["noFileSelected",""],[3,"lines","focusedLineno","useDarkMode",4,"ngIf"],[1,"file-label"],[1,"no-file-selected"],[3,"lines","focusedLineno","useDarkMode"]],template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div",1)(2,"div",2),T(3,"Source Code"),g(),S(4,Ewe,2,1,"div",3),S(5,Twe,2,0,"ng-template",null,4,Wt),g(),S(7,Dwe,1,3,"source-code",5),g()),2&e){let r=it(6);v(4),_("ngIf",null!==i.focusedSourceLineSpec)("ngIfElse",r),v(3),_("ngIf",null!==i.focusedSourceFileContent&&null!==i.focusedSourceLineSpec&&null!==i.focusedSourceFileContent.lines)}},dependencies:[Fe,CX],styles:['.header-section[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;height:24px;padding-bottom:6px;vertical-align:middle;white-space:nowrap;width:100%}body.dark-mode[_nghost-%COMP%]   .header-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .header-section[_ngcontent-%COMP%]{border-bottom:1px solid #555}.file-label[_ngcontent-%COMP%]{display:inline-block;font-weight:normal;white-space:normal;overflow-wrap:anywhere;overflow-y:auto;padding:0 20px}.no-file-selected[_ngcontent-%COMP%]{display:inline-block;color:#666;padding:0 20px;white-space:normal}.source-files-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;font-family:"Roboto Mono",monospace;font-size:10px;height:100%}.title-tag[_ngcontent-%COMP%]{display:inline-block;font-weight:bold;height:100%;padding-left:6px;vertical-align:top}source-code[_ngcontent-%COMP%]{flex-grow:1;width:100%}']}),n})(),wX=(()=>{class n{constructor(e){this.store=e,this.focusedSourceFileContent$=this.store.select(XE),this.focusedSourceLineSpec$=this.store.select(QE),this.useDarkMode$=this.store.select(Rl)}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-source-files"]],decls:4,vars:9,consts:[[3,"focusedSourceFileContent","focusedSourceLineSpec","useDarkMode"]],template:function(e,i){1&e&&(P(0,"source-files-component",0),j(1,"async"),j(2,"async"),j(3,"async")),2&e&&_("focusedSourceFileContent",W(1,3,i.focusedSourceFileContent$))("focusedSourceLineSpec",W(2,5,i.focusedSourceLineSpec$))("useDarkMode",W(3,7,i.useDarkMode$))},dependencies:[MX,ct],encapsulation:2}),n})(),Rwe=["stackFrameArray"];function Pwe(n,t){if(1&n&&(h(0,"span",13),T(1),g()),2&n){let e=w(3);v(1),He(" #",e.executionIndex,": ")}}function Owe(n,t){if(1&n&&(h(0,"span",14),T(1),g()),2&n){let e=w(3);v(1),He(" ",e.opType," ")}}function kwe(n,t){if(1&n&&(h(0,"div"),T(1," Eager execution "),S(2,Pwe,2,1,"span",11),S(3,Owe,2,1,"span",12),g()),2&n){let e=w(2);v(2),_("ngIf",null!==e.opType),v(1),_("ngIf",null!==e.opType)}}function Fwe(n,t){if(1&n&&(h(0,"span",16),T(1),g()),2&n){let e=w(3);v(1),He(' "',e.opName,'" ')}}function Nwe(n,t){if(1&n&&(h(0,"span",14),T(1),g()),2&n){let e=w(3);v(1),He(" ",e.opType," ")}}function Lwe(n,t){if(1&n&&(h(0,"div"),T(1," Creation of graph op "),S(2,Fwe,2,1,"span",15),S(3,Nwe,2,1,"span",12),g()),2&n){let e=w(2);v(2),_("ngIf",null!==e.opName),v(1),_("ngIf",null!==e.opType)}}function Bwe(n,t){if(1&n&&(h(0,"span",17),T(1),g()),2&n){let e=w(2);v(1),He(" (Host name: ",e.stackFramesForDisplay[0].host_name,") ")}}function Vwe(n,t){if(1&n&&(h(0,"div",7)(1,"span")(2,"span",8),S(3,kwe,4,2,"div",9),S(4,Lwe,4,2,"div",9),g()(),h(5,"div"),S(6,Bwe,2,1,"span",10),g()()),2&n){let e=w();v(2),_("ngSwitch",e.codeLocationType),v(1),_("ngSwitchCase",e.CodeLocationType.EXECUTION),v(1),_("ngSwitchCase",e.CodeLocationType.GRAPH_OP_CREATION),v(2),_("ngIf",null!==e.stackFramesForDisplay&&e.stackFramesForDisplay.length>0)}}function Hwe(n,t){1&n&&(h(0,"div",18),T(1," Click an eager execution or graph op to show its original stack trace. "),g())}function zwe(n,t){1&n&&(h(0,"div",28),T(1," \u2913 "),g())}var Uwe=function(n,t){return[n,t]};function jwe(n,t){if(1&n){let e=ge();h(0,"div",22)(1,"div",23),T(2),g(),h(3,"div",24),S(4,zwe,2,0,"div",25),h(5,"div",26),I("click",function(){let o=X(e).$implicit;return Q(w(2).onSourceLineClicked.emit(o))}),T(6),g(),h(7,"div",27),T(8),g()()()}if(2&n){let e=t.$implicit,i=w(2);_("ngClass",qr(6,Uwe,e.belongsToFocusedFile?"focused-file":"",e.focused?"focused-stack-frame":"")),v(1),Wi("title",e.file_path),v(1),He(" ",e.concise_file_path," "),v(2),_("ngIf",i.stickToBottommostFrameInFocusedFile&&e.focused),v(2),He(" Line ",e.lineno," "),v(2),He(" ",e.function_name," ")}}function Gwe(n,t){if(1&n&&(h(0,"div",19,20),S(2,jwe,9,9,"div",21),g()),2&n){let e=w();v(2),_("ngForOf",e.stackFramesForDisplay)}}function Wwe(n,t){}var SX=(()=>{class n{constructor(){this.stackFramesForDisplay=null,this.onSourceLineClicked=new F,this.CodeLocationType=Lo}ngAfterViewChecked(){if(void 0===this.stackFrameArray)return;let e=this.stackFrameArray.nativeElement,i=e.querySelector(".focused-stack-frame");if(null!==i)return void this.scrollToElement(e,i);let r=e.querySelector(".stack-frame-container:last-child");null!==r&&this.scrollToElement(e,r)}scrollToElement(e,i){e.scrollTop=i.offsetTop}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["stack-trace-component"]],viewQuery:function(e,i){if(1&e&&Ge(Rwe,5),2&e){let r;Se(r=Ee())&&(i.stackFrameArray=r.first)}},inputs:{codeLocationType:"codeLocationType",opType:"opType",opName:"opName",executionIndex:"executionIndex",stickToBottommostFrameInFocusedFile:"stickToBottommostFrameInFocusedFile",stackFramesForDisplay:"stackFramesForDisplay"},outputs:{onSourceLineClicked:"onSourceLineClicked"},decls:10,vars:4,consts:[[1,"stack-trace-container"],[1,"stack-trace-header"],[1,"stack-trace-title"],["class","stack-trace-aux-info",4,"ngIf","ngIfElse"],["noStackTrace",""],["class","stack-frame-array",4,"ngIf","ngIfElse"],["loadingSection",""],[1,"stack-trace-aux-info"],[1,"code-location-origin",3,"ngSwitch"],[4,"ngSwitchCase"],["class","stack-trace-host-name",4,"ngIf"],["class","eager-execution-index",4,"ngIf"],["class","op-type",4,"ngIf"],[1,"eager-execution-index"],[1,"op-type"],["class","op-name",4,"ngIf"],[1,"op-name"],[1,"stack-trace-host-name"],[1,"stack-trace-aux-info","no-stack-trace"],[1,"stack-frame-array"],["stackFrameArray",""],["class","stack-frame-container",3,"ngClass",4,"ngFor","ngForOf"],[1,"stack-frame-container",3,"ngClass"],[1,"stack-frame-file-path",3,"title"],[1,"stack-frame-lineno-function"],["class","stick-to-bottommost-indicator","title","Sticking to the bottommost frame in the current source file when navigating executions and graph ops. To remove this sticking, click any non-bottommost stack frame.",4,"ngIf"],[1,"stack-frame-lineno",3,"click"],[1,"stack-frame-function"],["title","Sticking to the bottommost frame in the current source file when navigating executions and graph ops. To remove this sticking, click any non-bottommost stack frame.",1,"stick-to-bottommost-indicator"]],template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div",1)(2,"span",2),T(3," Stack Trace "),g(),S(4,Vwe,7,4,"div",3),S(5,Hwe,2,0,"ng-template",null,4,Wt),g(),S(7,Gwe,3,1,"div",5),S(8,Wwe,0,0,"ng-template",null,6,Wt),g()),2&e){let r=it(6),o=it(9);v(4),_("ngIf",null!==i.codeLocationType)("ngIfElse",r),v(3),_("ngIf",null!==i.stackFramesForDisplay)("ngIfElse",o)}},dependencies:[yn,nn,Fe,sr,Sr],styles:['.focused-file[_ngcontent-%COMP%]{font-weight:bold}.focused-stack-frame[_ngcontent-%COMP%]{background-color:rgba(255,111,0,.3)}.no-stack-trace[_ngcontent-%COMP%]{color:gray}.op-name[_ngcontent-%COMP%]{word-wrap:anywhere}.op-type[_ngcontent-%COMP%]{background-color:#eceff1;border:1px solid #ebebeb;border-radius:4px;font-family:"Roboto Mono",monospace;font-size:10px;height:14px;line-height:14px;padding:1px 3px;width:max-content}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .op-type[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .op-type[_ngcontent-%COMP%]{background-color:#455a64}.stack-frame-array[_ngcontent-%COMP%]{overflow-x:hidden;overflow-y:auto;width:calc(100% - 8px)}.stack-frame-container[_ngcontent-%COMP%]{border-bottom:1px solid #a0a0a0}.stack-frame-file-path[_ngcontent-%COMP%]{max-width:180px;width:180px}.stack-frame-lineno-function[_ngcontent-%COMP%]{text-align:right;white-space:nowrap}.stack-frame-function[_ngcontent-%COMP%]{display:inline-block;max-width:200px;padding-left:10px;text-align:left;white-space:normal;width:200px;word-wrap:anywhere}.stack-frame-lineno[_ngcontent-%COMP%]{cursor:pointer;display:inline-block;max-width:80px;text-align:left;text-decoration:underline;width:80px}.stack-trace-aux-info[_ngcontent-%COMP%]{margin-top:15px;padding-left:24px}.stack-trace-container[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;box-sizing:border-box;display:flex;flex-flow:column;font-size:10px;font-family:"Roboto Mono",monospace;height:100%;margin-left:8px;max-height:360px;overflow-x:hidden;overflow-y:hidden;padding-left:8px;width:100%}body.dark-mode[_nghost-%COMP%]   .stack-trace-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .stack-trace-container[_ngcontent-%COMP%]{border-left:1px solid #555}.stack-trace-header[_ngcontent-%COMP%]{box-shadow:0 5px 3px -3px #ccc;padding-bottom:3px}.stack-trace-host-name[_ngcontent-%COMP%]{color:gray}.stack-trace-title[_ngcontent-%COMP%]{font-weight:bold}.stick-to-bottommost-indicator[_ngcontent-%COMP%]{display:inline-block;font-weight:bold;font-size:12px;padding-right:3px}']}),n})(),EX=(()=>{class n{constructor(e){this.store=e,this.codeLocationType$=this.store.pipe(un(q(hy,i=>null===i?null:i.codeLocationType))),this.opType$=this.store.pipe(un(q(hy,i=>null===i?null:i.opType))),this.opName$=this.store.pipe(un(q(hy,i=>null===i||i.codeLocationType!==Lo.GRAPH_OP_CREATION?null:i.opName))),this.executionIndex$=this.store.pipe(un(q(hy,i=>null===i||i.codeLocationType!==Lo.EXECUTION?null:i.executionIndex))),this.stickToBottommostFrameInFocusedFile$=this.store.pipe(un(rX)),this.stackFramesForDisplay$=this.store.pipe(un(q(nX,QE,(i,r)=>{if(null===i)return null;let o=[];for(let s of i){let{host_name:a,file_path:l,lineno:c,function_name:d}=s,u=l.split("/"),f=null!==r&&a===r.host_name&&l===r.file_path;o.push({host_name:a,file_path:l,concise_file_path:u[u.length-1],lineno:c,function_name:d,belongsToFocusedFile:f,focused:f&&c===r.lineno})}return o})))}onSourceLineClicked(e){let{host_name:i,file_path:r,lineno:o,function_name:s}=e;this.store.dispatch(Og({stackFrame:{host_name:i,file_path:r,lineno:o,function_name:s}}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-stack-trace"]],decls:7,vars:18,consts:[[3,"codeLocationType","opType","opName","executionIndex","stickToBottommostFrameInFocusedFile","stackFramesForDisplay","onSourceLineClicked"]],template:function(e,i){1&e&&(h(0,"stack-trace-component",0),I("onSourceLineClicked",function(o){return i.onSourceLineClicked(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),g()),2&e&&_("codeLocationType",W(1,6,i.codeLocationType$))("opType",W(2,8,i.opType$))("opName",W(3,10,i.opName$))("executionIndex",W(4,12,i.executionIndex$))("stickToBottommostFrameInFocusedFile",W(5,14,i.stickToBottommostFrameInFocusedFile$))("stackFramesForDisplay",W(6,16,i.stackFramesForDisplay$))},dependencies:[SX,ct],encapsulation:2}),n})(),Xwe=function(n,t){return{tensorDebugMode:n,array:t}};function Qwe(n,t){if(1&n&&(h(0,"div",12)(1,"div",13),T(2),g(),h(3,"div",14),P(4,"debug-tensor-value",15),g()()),2&n){let e=t.$implicit,i=t.index,r=w(3);v(2),He("Output slot ",i,":"),v(2),_("debugTensorValue",r.parseDebugTensorValue(qr(2,Xwe,r.tensorDebugMode,e)))}}function Zwe(n,t){if(1&n&&(h(0,"div",10),S(1,Qwe,5,5,"div",11),g()),2&n){let e=w(2);v(1),_("ngForOf",e.debugTensorValues)}}function Kwe(n,t){if(1&n&&(h(0,"div")(1,"div")(2,"div",3)(3,"span",4),T(4," Op: "),g(),h(5,"span",5),T(6),g()(),h(7,"div",3)(8,"span",4),T(9," # of input tensors: "),g(),h(10,"span",6),T(11),g()(),h(12,"div",3)(13,"span",4),T(14," # of output tensors: "),g(),h(15,"span",7),T(16),g(),h(17,"span",8),T(18),g()(),S(19,Zwe,2,1,"div",9),g()()),2&n){let e=w();v(6),He(" ",e.focusedExecutionData.op_type," "),v(5),He(" ",null==e.focusedExecutionData.input_tensor_ids?0:e.focusedExecutionData.input_tensor_ids.length," "),v(5),He(" ",null==e.focusedExecutionData.output_tensor_ids?0:e.focusedExecutionData.output_tensor_ids.length," "),v(2),He(" (debug mode: ",e.TensorDebugMode[e.tensorDebugMode],") "),v(1),_("ngIf",e.hasDebugTensorValues)}}function Jwe(n,t){}var TX=(()=>{class n{constructor(){this.tensorDebugMode=So.UNSPECIFIED,this.hasDebugTensorValues=!1,this.debugTensorValues=null,this.debugTensorDtypes=null,this.TensorDebugMode=So,this.parseDebugTensorValue=ZE}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["execution-data-component"]],inputs:{focusedExecutionIndex:"focusedExecutionIndex",focusedExecutionData:"focusedExecutionData",tensorDebugMode:"tensorDebugMode",hasDebugTensorValues:"hasDebugTensorValues",debugTensorValues:"debugTensorValues",debugTensorDtypes:"debugTensorDtypes"},decls:7,vars:3,consts:[[1,"focus-execution-container"],[4,"ngIf","ngIfElse"],["loading_section",""],[1,"execution-data-field"],[1,"execution-data-key"],[1,"execution-data-value","op-type"],[1,"execution-data-value","input-tensors"],[1,"execution-data-value","output-tensors"],[1,"execution-data-value"],["class","output-slots",4,"ngIf"],[1,"output-slots"],["class","output-slot-container",4,"ngFor","ngForOf"],[1,"output-slot-container"],[1,"output-slot-number"],[1,"output-slot-debug-tensor-value"],[3,"debugTensorValue"]],template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div")(2,"span"),T(3),g()(),S(4,Kwe,20,5,"div",1),S(5,Jwe,0,0,"ng-template",null,2,Wt),g()),2&e){let r=it(6);v(3),He(" Python Execution #",i.focusedExecutionIndex," "),v(1),_("ngIf",null!==i.focusedExecutionData)("ngIfElse",r)}},dependencies:[nn,Fe,KE],styles:['.debug-tensor-values-table[_ngcontent-%COMP%]{width:100%}.debug-tensor-values-table[_ngcontent-%COMP%]   td[_ngcontent-%COMP%]{border-top:1px solid #000;text-align:left}.debug-tensor-values-table[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left}.execution-data-field[_ngcontent-%COMP%]{white-space:nowrap}.execution-data-key[_ngcontent-%COMP%]{display:inline-block;max-width:120px;text-align:right;width:120px}.execution-data-value[_ngcontent-%COMP%]{display:inline-block;margin-left:10px}.focus-execution-container[_ngcontent-%COMP%]{background-color:#ffcc80;border-radius:4px;font-size:12px;height:120px;padding:5px;width:360px}body.dark-mode[_nghost-%COMP%]   .focus-execution-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .focus-execution-container[_ngcontent-%COMP%]{background-color:#e65100}.output-slots[_ngcontent-%COMP%]{height:60px;overflow-x:auto;overflow-y:auto}.output-slot-container[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;margin-top:5px;padding:2px 0;vertical-align:top}body.dark-mode[_nghost-%COMP%]   .output-slot-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .output-slot-container[_ngcontent-%COMP%]{border-top:1px solid #555}.output-slot-number[_ngcontent-%COMP%]{display:block;font-family:"Roboto Mono",monospace}.output-slot-debug-tensor-value[_ngcontent-%COMP%]{display:block;margin:3px 0 3px 30px}.output-tensors[_ngcontent-%COMP%]{margin-top:5px}']}),n})(),DX="Unknown dtype",IX=(()=>{class n{constructor(e){this.store=e,this.focusedExecutionData$=this.store.pipe(un(Pf)),this.tensorDebugMode$=this.store.pipe(un(q(Pf,i=>null===i?So.UNSPECIFIED:i.tensor_debug_mode))),this.hasDebugTensorValues$=this.store.pipe(un(q(Pf,i=>{if(null===i||null===i.debug_tensor_values)return!1;for(let r of i.debug_tensor_values)if(null!==r&&r.length>0)return!0;return!1}))),this.debugTensorValues$=this.store.pipe(un(q(Pf,i=>null===i?null:i.debug_tensor_values))),this.debugTensorDtypes$=this.store.pipe(un(q(Pf,i=>{if(null===i||null===i.debug_tensor_values||i.tensor_debug_mode!==So.FULL_HEALTH&&i.tensor_debug_mode!==So.SHAPE)return null;let r=[];for(let o of i.debug_tensor_values)if(null===o)r.push(DX);else{let s=String(i.tensor_debug_mode===So.FULL_HEALTH?o[2]:o[1]);r.push(gy[s]||DX)}return r})))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-execution-data"]],inputs:{focusedExecutionIndex:"focusedExecutionIndex"},decls:6,vars:16,consts:[[3,"focusedExecutionIndex","focusedExecutionData","tensorDebugMode","hasDebugTensorValues","debugTensorValues","debugTensorDtypes"]],template:function(e,i){1&e&&(P(0,"execution-data-component",0),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async")),2&e&&_("focusedExecutionIndex",i.focusedExecutionIndex)("focusedExecutionData",W(1,6,i.focusedExecutionData$))("tensorDebugMode",W(2,8,i.tensorDebugMode$))("hasDebugTensorValues",W(3,10,i.hasDebugTensorValues$))("debugTensorValues",W(4,12,i.debugTensorValues$))("debugTensorDtypes",W(5,14,i.debugTensorDtypes$))},dependencies:[TX,ct],encapsulation:2}),n})(),tSe=["sliderWrapper"],el=qo({passive:!1}),sSe={provide:Mo,useExisting:$n(()=>Dd),multi:!0},aSe=ku(zs(so(class{constructor(n){this._elementRef=n}}),"accent")),Dd=(()=>{class n extends aSe{get invert(){return this._invert}set invert(e){this._invert=Rt(e)}get max(){return this._max}set max(e){this._max=_i(e,this._max),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get min(){return this._min}set min(e){this._min=_i(e,this._min),this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}get step(){return this._step}set step(e){this._step=_i(e,this._step),this._step%1!=0&&(this._roundToDecimal=this._step.toString().split(".").pop().length),this._changeDetectorRef.markForCheck()}get thumbLabel(){return this._thumbLabel}set thumbLabel(e){this._thumbLabel=Rt(e)}get tickInterval(){return this._tickInterval}set tickInterval(e){this._tickInterval="auto"===e?"auto":"number"==typeof e||"string"==typeof e?_i(e,this._tickInterval):0}get value(){return null===this._value&&(this.value=this._min),this._value}set value(e){if(e!==this._value){let i=_i(e,0);this._roundToDecimal&&i!==this.min&&i!==this.max&&(i=parseFloat(i.toFixed(this._roundToDecimal))),this._value=i,this._percent=this._calculatePercentage(this._value),this._changeDetectorRef.markForCheck()}}get vertical(){return this._vertical}set vertical(e){this._vertical=Rt(e)}get displayValue(){return this.displayWith?this.displayWith(this.value):this._roundToDecimal&&this.value&&this.value%1!=0?this.value.toFixed(this._roundToDecimal):this.value||0}focus(e){this._focusHostElement(e)}blur(){this._blurHostElement()}get percent(){return this._clamp(this._percent)}_shouldInvertAxis(){return this.vertical?!this.invert:this.invert}_isMinValue(){return 0===this.percent}_getThumbGap(){return this.disabled?7:this._isMinValue()&&!this.thumbLabel?this._isActive?10:7:0}_getTrackBackgroundStyles(){let i=this.vertical?`1, ${1-this.percent}, 1`:1-this.percent+", 1, 1";return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"-":""}${this._getThumbGap()}px) scale3d(${i})`}}_getTrackFillStyles(){let e=this.percent,r=this.vertical?`1, ${e}, 1`:`${e}, 1, 1`;return{transform:`translate${this.vertical?"Y":"X"}(${this._shouldInvertMouseCoords()?"":"-"}${this._getThumbGap()}px) scale3d(${r})`,display:0===e?"none":""}}_getTicksContainerStyles(){return{transform:`translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"-":""}${this._tickIntervalPercent/2*100}%)`}}_getTicksStyles(){let e=100*this._tickIntervalPercent,a={backgroundSize:this.vertical?`2px ${e}%`:`${e}% 2px`,transform:`translateZ(0) translate${this.vertical?"Y":"X"}(${this.vertical||"rtl"!=this._getDirection()?"":"-"}${e/2}%)${this.vertical||"rtl"!=this._getDirection()?"":" rotate(180deg)"}`};if(this._isMinValue()&&this._getThumbGap()){let c,l=this._shouldInvertAxis();c=this.vertical?l?"Bottom":"Top":l?"Right":"Left",a[`padding${c}`]=`${this._getThumbGap()}px`}return a}_getThumbContainerStyles(){let e=this._shouldInvertAxis();return{transform:`translate${this.vertical?"Y":"X"}(-${100*(("rtl"!=this._getDirection()||this.vertical?e:!e)?this.percent:1-this.percent)}%)`}}_shouldInvertMouseCoords(){let e=this._shouldInvertAxis();return"rtl"!=this._getDirection()||this.vertical?e:!e}_getDirection(){return this._dir&&"rtl"==this._dir.value?"rtl":"ltr"}constructor(e,i,r,o,s,a,l,c){super(e),this._focusMonitor=i,this._changeDetectorRef=r,this._dir=o,this._ngZone=a,this._animationMode=c,this._invert=!1,this._max=100,this._min=0,this._step=1,this._thumbLabel=!1,this._tickInterval=0,this._value=null,this._vertical=!1,this.change=new F,this.input=new F,this.valueChange=new F,this.onTouched=()=>{},this._percent=0,this._isSliding=null,this._isActive=!1,this._tickIntervalPercent=0,this._sliderDimensions=null,this._controlValueAccessorChangeFn=()=>{},this._dirChangeSubscription=Mn.EMPTY,this._pointerDown=d=>{this.disabled||this._isSliding||!_y(d)&&0!==d.button||this._ngZone.run(()=>{this._touchId=_y(d)?function(n,t){for(let e=0;e<n.touches.length;e++){let i=n.touches[e].target;if(t===i||t.contains(i))return n.touches[e].identifier}}(d,this._elementRef.nativeElement):void 0;let u=RX(d,this._touchId);if(u){let p=this.value;this._isSliding="pointer",this._lastPointerEvent=d,this._focusHostElement(),this._onMouseenter(),this._bindGlobalEvents(d),this._focusHostElement(),this._updateValueFromPosition(u),this._valueOnSlideStart=p,d.cancelable&&d.preventDefault(),p!=this.value&&this._emitInputEvent()}})},this._pointerMove=d=>{if("pointer"===this._isSliding){let u=RX(d,this._touchId);if(u){d.cancelable&&d.preventDefault();let p=this.value;this._lastPointerEvent=d,this._updateValueFromPosition(u),p!=this.value&&this._emitInputEvent()}}},this._pointerUp=d=>{"pointer"===this._isSliding&&(!_y(d)||"number"!=typeof this._touchId||MN(d.changedTouches,this._touchId))&&(d.cancelable&&d.preventDefault(),this._removeGlobalEvents(),this._isSliding=null,this._touchId=void 0,this._valueOnSlideStart!=this.value&&!this.disabled&&this._emitChangeEvent(),this._valueOnSlideStart=this._lastPointerEvent=null)},this._windowBlur=()=>{this._lastPointerEvent&&this._pointerUp(this._lastPointerEvent)},this._document=l,this.tabIndex=parseInt(s)||0,a.runOutsideAngular(()=>{let d=e.nativeElement;d.addEventListener("mousedown",this._pointerDown,el),d.addEventListener("touchstart",this._pointerDown,el)})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{this._isActive=!!e&&"keyboard"!==e,this._changeDetectorRef.detectChanges()}),this._dir&&(this._dirChangeSubscription=this._dir.change.subscribe(()=>{this._changeDetectorRef.markForCheck()}))}ngOnDestroy(){let e=this._elementRef.nativeElement;e.removeEventListener("mousedown",this._pointerDown,el),e.removeEventListener("touchstart",this._pointerDown,el),this._lastPointerEvent=null,this._removeGlobalEvents(),this._focusMonitor.stopMonitoring(this._elementRef),this._dirChangeSubscription.unsubscribe()}_onMouseenter(){this.disabled||(this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent())}_onFocus(){this._sliderDimensions=this._getSliderDimensions(),this._updateTickIntervalPercent()}_onBlur(){this.onTouched()}_onKeydown(e){if(this.disabled||vr(e)||this._isSliding&&"keyboard"!==this._isSliding)return;let i=this.value;switch(e.keyCode){case 33:this._increment(10);break;case 34:this._increment(-10);break;case 35:this.value=this.max;break;case 36:this.value=this.min;break;case 37:this._increment("rtl"==this._getDirection()?1:-1);break;case 38:this._increment(1);break;case 39:this._increment("rtl"==this._getDirection()?-1:1);break;case 40:this._increment(-1);break;default:return}i!=this.value&&(this._emitInputEvent(),this._emitChangeEvent()),this._isSliding="keyboard",e.preventDefault()}_onKeyup(){"keyboard"===this._isSliding&&(this._isSliding=null)}_getWindow(){return this._document.defaultView||window}_bindGlobalEvents(e){let i=this._document,r=_y(e),s=r?"touchend":"mouseup";i.addEventListener(r?"touchmove":"mousemove",this._pointerMove,el),i.addEventListener(s,this._pointerUp,el),r&&i.addEventListener("touchcancel",this._pointerUp,el);let a=this._getWindow();typeof a<"u"&&a&&a.addEventListener("blur",this._windowBlur)}_removeGlobalEvents(){let e=this._document;e.removeEventListener("mousemove",this._pointerMove,el),e.removeEventListener("mouseup",this._pointerUp,el),e.removeEventListener("touchmove",this._pointerMove,el),e.removeEventListener("touchend",this._pointerUp,el),e.removeEventListener("touchcancel",this._pointerUp,el);let i=this._getWindow();typeof i<"u"&&i&&i.removeEventListener("blur",this._windowBlur)}_increment(e){let i=this._clamp(this.value||0,this.min,this.max);this.value=this._clamp(i+this.step*e,this.min,this.max)}_updateValueFromPosition(e){if(!this._sliderDimensions)return;let s=this._clamp(((this.vertical?e.y:e.x)-(this.vertical?this._sliderDimensions.top:this._sliderDimensions.left))/(this.vertical?this._sliderDimensions.height:this._sliderDimensions.width));if(this._shouldInvertMouseCoords()&&(s=1-s),0===s)this.value=this.min;else if(1===s)this.value=this.max;else{let a=this._calculateValue(s),l=Math.round((a-this.min)/this.step)*this.step+this.min;this.value=this._clamp(l,this.min,this.max)}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.value),this.valueChange.emit(this.value),this.change.emit(this._createChangeEvent())}_emitInputEvent(){this.input.emit(this._createChangeEvent())}_updateTickIntervalPercent(){if(!this.tickInterval||!this._sliderDimensions)return;let e;if("auto"==this.tickInterval){let i=this.vertical?this._sliderDimensions.height:this._sliderDimensions.width;e=Math.ceil(30/(i*this.step/(this.max-this.min)))*this.step/i}else e=this.tickInterval*this.step/(this.max-this.min);this._tickIntervalPercent=AX(e)?e:0}_createChangeEvent(e=this.value){let i=new class{};return i.source=this,i.value=e,i}_calculatePercentage(e){let i=((e||0)-this.min)/(this.max-this.min);return AX(i)?i:0}_calculateValue(e){return this.min+e*(this.max-this.min)}_clamp(e,i=0,r=1){return Math.max(i,Math.min(e,r))}_getSliderDimensions(){return this._sliderWrapper?this._sliderWrapper.nativeElement.getBoundingClientRect():null}_focusHostElement(e){this._elementRef.nativeElement.focus(e)}_blurHostElement(){this._elementRef.nativeElement.blur()}writeValue(e){this.value=e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Xr),C($t),C(Xi,8),yo("tabindex"),C(at),C(Lt),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["mat-slider"]],viewQuery:function(e,i){if(1&e&&Ge(tSe,5),2&e){let r;Se(r=Ee())&&(i._sliderWrapper=r.first)}},hostAttrs:["role","slider",1,"mat-slider","mat-focus-indicator"],hostVars:29,hostBindings:function(e,i){1&e&&I("focus",function(){return i._onFocus()})("blur",function(){return i._onBlur()})("keydown",function(o){return i._onKeydown(o)})("keyup",function(){return i._onKeyup()})("mouseenter",function(){return i._onMouseenter()})("selectstart",function(o){return o.preventDefault()}),2&e&&(jo("tabIndex",i.tabIndex),Be("aria-disabled",i.disabled)("aria-valuemax",i.max)("aria-valuemin",i.min)("aria-valuenow",i.value)("aria-valuetext",null==i.valueText?i.displayValue:i.valueText)("aria-orientation",i.vertical?"vertical":"horizontal"),nt("mat-slider-disabled",i.disabled)("mat-slider-has-ticks",i.tickInterval)("mat-slider-horizontal",!i.vertical)("mat-slider-axis-inverted",i._shouldInvertAxis())("mat-slider-invert-mouse-coords",i._shouldInvertMouseCoords())("mat-slider-sliding",i._isSliding)("mat-slider-thumb-label-showing",i.thumbLabel)("mat-slider-vertical",i.vertical)("mat-slider-min-value",i._isMinValue())("mat-slider-hide-last-tick",i.disabled||i._isMinValue()&&i._getThumbGap()&&i._shouldInvertAxis())("_mat-animation-noopable","NoopAnimations"===i._animationMode))},inputs:{disabled:"disabled",color:"color",tabIndex:"tabIndex",invert:"invert",max:"max",min:"min",step:"step",thumbLabel:"thumbLabel",tickInterval:"tickInterval",value:"value",displayWith:"displayWith",valueText:"valueText",vertical:"vertical"},outputs:{change:"change",input:"input",valueChange:"valueChange"},exportAs:["matSlider"],features:[Qt([sSe]),Ke],decls:13,vars:6,consts:[[1,"mat-slider-wrapper"],["sliderWrapper",""],[1,"mat-slider-track-wrapper"],[1,"mat-slider-track-background",3,"ngStyle"],[1,"mat-slider-track-fill",3,"ngStyle"],[1,"mat-slider-ticks-container",3,"ngStyle"],[1,"mat-slider-ticks",3,"ngStyle"],[1,"mat-slider-thumb-container",3,"ngStyle"],[1,"mat-slider-focus-ring"],[1,"mat-slider-thumb"],[1,"mat-slider-thumb-label"],[1,"mat-slider-thumb-label-text"]],template:function(e,i){1&e&&(h(0,"div",0,1)(2,"div",2),P(3,"div",3)(4,"div",4),g(),h(5,"div",5),P(6,"div",6),g(),h(7,"div",7),P(8,"div",8)(9,"div",9),h(10,"div",10)(11,"span",11),T(12),g()()()()),2&e&&(v(3),_("ngStyle",i._getTrackBackgroundStyles()),v(1),_("ngStyle",i._getTrackFillStyles()),v(1),_("ngStyle",i._getTicksContainerStyles()),v(1),_("ngStyle",i._getTicksStyles()),v(1),_("ngStyle",i._getThumbContainerStyles()),v(5),bt(i.displayValue))},dependencies:[pu],styles:['.mat-slider{display:inline-block;position:relative;box-sizing:border-box;padding:8px;outline:none;vertical-align:middle}.mat-slider:not(.mat-slider-disabled):active,.mat-slider.mat-slider-sliding:not(.mat-slider-disabled){cursor:grabbing}.mat-slider-wrapper{-webkit-print-color-adjust:exact;color-adjust:exact;position:absolute}.mat-slider-track-wrapper{position:absolute;top:0;left:0;overflow:hidden}.mat-slider-track-fill{position:absolute;transform-origin:0 0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-track-background{position:absolute;transform-origin:100% 100%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-ticks-container{position:absolute;left:0;top:0;overflow:hidden}.mat-slider-ticks{-webkit-background-clip:content-box;background-clip:content-box;background-repeat:repeat;box-sizing:border-box;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-container{position:absolute;z-index:1;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-focus-ring{position:absolute;width:30px;height:30px;border-radius:50%;transform:scale(0);opacity:0;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider.cdk-keyboard-focused .mat-slider-focus-ring,.mat-slider.cdk-program-focused .mat-slider-focus-ring{transform:scale(1);opacity:1}.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb-label,.mat-slider:not(.mat-slider-disabled):not(.mat-slider-sliding) .mat-slider-thumb{cursor:grab}.mat-slider-thumb{position:absolute;right:-10px;bottom:-10px;box-sizing:border-box;width:20px;height:20px;border:3px solid rgba(0,0,0,0);border-radius:50%;transform:scale(0.7);transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-thumb-label{display:none;align-items:center;justify-content:center;position:absolute;width:28px;height:28px;border-radius:50%;transition:transform 400ms cubic-bezier(0.25, 0.8, 0.25, 1),border-radius 400ms cubic-bezier(0.25, 0.8, 0.25, 1),background-color 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.cdk-high-contrast-active .mat-slider-thumb-label{outline:solid 1px}.mat-slider-thumb-label-text{z-index:1;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-sliding .mat-slider-track-fill,.mat-slider-sliding .mat-slider-track-background,.mat-slider-sliding .mat-slider-thumb-container{transition-duration:0ms}.mat-slider-has-ticks .mat-slider-wrapper::after{content:"";position:absolute;border-width:0;border-style:solid;opacity:0;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after,.mat-slider-has-ticks:hover:not(.mat-slider-hide-last-tick) .mat-slider-wrapper::after{opacity:1}.mat-slider-has-ticks.cdk-focused:not(.mat-slider-disabled) .mat-slider-ticks,.mat-slider-has-ticks:hover:not(.mat-slider-disabled) .mat-slider-ticks{opacity:1}.mat-slider-thumb-label-showing .mat-slider-focus-ring{display:none}.mat-slider-thumb-label-showing .mat-slider-thumb-label{display:flex}.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:100% 100%}.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:0 0}.mat-slider:not(.mat-slider-disabled).cdk-focused.mat-slider-thumb-label-showing .mat-slider-thumb{transform:scale(0)}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label{border-radius:50% 50% 0}.mat-slider:not(.mat-slider-disabled).cdk-focused .mat-slider-thumb-label-text{opacity:1}.mat-slider:not(.mat-slider-disabled).cdk-mouse-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-touch-focused .mat-slider-thumb,.mat-slider:not(.mat-slider-disabled).cdk-program-focused .mat-slider-thumb{border-width:2px;transform:scale(1)}.mat-slider-disabled .mat-slider-focus-ring{transform:scale(0);opacity:0}.mat-slider-disabled .mat-slider-thumb{border-width:4px;transform:scale(0.5)}.mat-slider-disabled .mat-slider-thumb-label{display:none}.mat-slider-horizontal{height:48px;min-width:128px}.mat-slider-horizontal .mat-slider-wrapper{height:2px;top:23px;left:8px;right:8px}.mat-slider-horizontal .mat-slider-wrapper::after{height:2px;border-left-width:2px;right:0;top:0}.mat-slider-horizontal .mat-slider-track-wrapper{height:2px;width:100%}.mat-slider-horizontal .mat-slider-track-fill{height:2px;width:100%;transform:scaleX(0)}.mat-slider-horizontal .mat-slider-track-background{height:2px;width:100%;transform:scaleX(1)}.mat-slider-horizontal .mat-slider-ticks-container{height:2px;width:100%}.cdk-high-contrast-active .mat-slider-horizontal .mat-slider-ticks-container{height:0;outline:solid 2px;top:1px}.mat-slider-horizontal .mat-slider-ticks{height:2px;width:100%}.mat-slider-horizontal .mat-slider-thumb-container{width:100%;height:0;top:50%}.mat-slider-horizontal .mat-slider-focus-ring{top:-15px;right:-15px}.mat-slider-horizontal .mat-slider-thumb-label{right:-14px;top:-40px;transform:translateY(26px) scale(0.01) rotate(45deg)}.mat-slider-horizontal .mat-slider-thumb-label-text{transform:rotate(-45deg)}.mat-slider-horizontal.cdk-focused .mat-slider-thumb-label{transform:rotate(45deg)}.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label,.cdk-high-contrast-active .mat-slider-horizontal.cdk-focused .mat-slider-thumb-label-text{transform:none}.mat-slider-vertical{width:48px;min-height:128px}.mat-slider-vertical .mat-slider-wrapper{width:2px;top:8px;bottom:8px;left:23px}.mat-slider-vertical .mat-slider-wrapper::after{width:2px;border-top-width:2px;bottom:0;left:0}.mat-slider-vertical .mat-slider-track-wrapper{height:100%;width:2px}.mat-slider-vertical .mat-slider-track-fill{height:100%;width:2px;transform:scaleY(0)}.mat-slider-vertical .mat-slider-track-background{height:100%;width:2px;transform:scaleY(1)}.mat-slider-vertical .mat-slider-ticks-container{width:2px;height:100%}.cdk-high-contrast-active .mat-slider-vertical .mat-slider-ticks-container{width:0;outline:solid 2px;left:1px}.mat-slider-vertical .mat-slider-focus-ring{bottom:-15px;left:-15px}.mat-slider-vertical .mat-slider-ticks{width:2px;height:100%}.mat-slider-vertical .mat-slider-thumb-container{height:100%;width:0;left:50%}.mat-slider-vertical .mat-slider-thumb{-webkit-backface-visibility:hidden;backface-visibility:hidden}.mat-slider-vertical .mat-slider-thumb-label{bottom:-14px;left:-40px;transform:translateX(26px) scale(0.01) rotate(-45deg)}.mat-slider-vertical .mat-slider-thumb-label-text{transform:rotate(45deg)}.mat-slider-vertical.cdk-focused .mat-slider-thumb-label{transform:rotate(-45deg)}[dir=rtl] .mat-slider-wrapper::after{left:0;right:auto}[dir=rtl] .mat-slider-horizontal .mat-slider-track-fill{transform-origin:100% 100%}[dir=rtl] .mat-slider-horizontal .mat-slider-track-background{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-fill{transform-origin:0 0}[dir=rtl] .mat-slider-horizontal.mat-slider-axis-inverted .mat-slider-track-background{transform-origin:100% 100%}.mat-slider._mat-animation-noopable .mat-slider-track-fill,.mat-slider._mat-animation-noopable .mat-slider-track-background,.mat-slider._mat-animation-noopable .mat-slider-ticks,.mat-slider._mat-animation-noopable .mat-slider-thumb-container,.mat-slider._mat-animation-noopable .mat-slider-focus-ring,.mat-slider._mat-animation-noopable .mat-slider-thumb,.mat-slider._mat-animation-noopable .mat-slider-thumb-label,.mat-slider._mat-animation-noopable .mat-slider-thumb-label-text,.mat-slider._mat-animation-noopable .mat-slider-has-ticks .mat-slider-wrapper::after{transition:none}'],encapsulation:2,changeDetection:0}),n})();function AX(n){return!isNaN(n)&&isFinite(n)}function _y(n){return"t"===n.type[0]}function RX(n,t){let e;return e=_y(n)?"number"==typeof t?MN(n.touches,t)||MN(n.changedTouches,t):n.touches[0]||n.changedTouches[0]:n,e?{x:e.clientX,y:e.clientY}:void 0}function MN(n,t){for(let e=0;e<n.length;e++)if(n[e].identifier===t)return n[e]}var qu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,fn,fn]}),n})();function cSe(n,t){if(1&n){let e=ge();h(0,"mat-slider",11),I("input",function(r){return X(e),Q(w(2).onSliderChange.emit(r.value))}),g()}if(2&n){let e=w(2);_("min",0)("max",e.scrollBeginIndexUpperLimit)("value",e.scrollBeginIndex)}}function dSe(n,t){if(1&n){let e=ge();h(0,"div",6)(1,"button",7),I("click",function(){return X(e),Q(w().onNavigateLeft.emit())}),T(2," < "),g(),h(3,"div",8),T(4),g(),h(5,"button",9),I("click",function(){return X(e),Q(w().onNavigateRight.emit())}),T(6," > "),g(),S(7,cSe,1,3,"mat-slider",10),g()}if(2&n){let e=w();v(4),jM(" ",e.scrollBeginIndex," ~ ",e.scrollBeginIndex+e.displayCount-1," of ",e.numExecutions," "),v(3),_("ngIf",e.scrollBeginIndexUpperLimit>0)}}var uSe=function(n,t,e){return[n,t,e]};function pSe(n,t){if(1&n){let e=ge();h(0,"div",14),I("click",function(){let o=X(e).index;return Q(w(2).onExecutionDigestClicked.emit(o))}),h(1,"div",15),T(2),g()()}if(2&n){let e=t.$implicit,i=t.index,r=w(2);v(1),Wi("title",e.op_type),_("ngClass",gb(3,uSe,e.is_graph?"func-graph-execution":"",i===r.focusedExecutionDisplayIndex?"focused":"",r.displayFocusedAlertTypes[i]||"")),v(1),He(" ",e.short_op_type," ")}}function fSe(n,t){if(1&n&&(h(0,"div",12),S(1,pSe,3,7,"div",13),g()),2&n){let e=w();v(1),_("ngForOf",e.displayExecutionDigests)}}function mSe(n,t){if(1&n&&(Ot(0),P(1,"tf-debugger-v2-execution-data",16),kt()),2&n){let e=w();v(1),_("focusedExecutionIndex",e.focusedExecutionIndex)}}var PX=(()=>{class n{constructor(){this.activeRunId=null,this.loadingNumExecutions=!1,this.numExecutions=0,this.scrollBeginIndex=0,this.scrollBeginIndexUpperLimit=0,this.pageSize=0,this.displayCount=0,this.displayExecutionDigests=[],this.displayFocusedAlertTypes=[],this.focusedExecutionIndex=null,this.focusedExecutionDisplayIndex=null,this.focusedExecutionData=null,this.onNavigateLeft=new F,this.onNavigateRight=new F,this.onExecutionDigestClicked=new F,this.onSliderChange=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["timeline-component"]],inputs:{activeRunId:"activeRunId",loadingNumExecutions:"loadingNumExecutions",numExecutions:"numExecutions",scrollBeginIndex:"scrollBeginIndex",scrollBeginIndexUpperLimit:"scrollBeginIndexUpperLimit",pageSize:"pageSize",displayCount:"displayCount",displayExecutionDigests:"displayExecutionDigests",displayFocusedAlertTypes:"displayFocusedAlertTypes",focusedExecutionIndex:"focusedExecutionIndex",focusedExecutionDisplayIndex:"focusedExecutionDisplayIndex",focusedExecutionData:"focusedExecutionData"},outputs:{onNavigateLeft:"onNavigateLeft",onNavigateRight:"onNavigateRight",onExecutionDigestClicked:"onExecutionDigestClicked",onSliderChange:"onSliderChange"},decls:9,vars:4,consts:[[1,"timeline-title"],[1,"execution-count"],[1,"top-level-executions"],["class","navigation-section",4,"ngIf"],["class","execution-timeline",4,"ngIf"],[4,"ngIf"],[1,"navigation-section"],["mat-button","",1,"navigation-button-left",3,"click"],[1,"navigation-position-info"],["mat-button","",1,"navigation-button-right",3,"click"],["class","timeline-slider","step","1",3,"min","max","value","input",4,"ngIf"],["step","1",1,"timeline-slider",3,"min","max","value","input"],[1,"execution-timeline"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"execution-digest",3,"ngClass","title"],[3,"focusedExecutionIndex"]],template:function(e,i){1&e&&(h(0,"div")(1,"div",0),T(2," Python Execution Timeline "),h(3,"span",1),T(4),g()(),h(5,"div",2),S(6,dSe,8,4,"div",3),S(7,fSe,2,1,"div",4),S(8,mSe,2,1,"ng-container",5),g()()),2&e&&(v(4),He(" (",i.numExecutions,") "),v(2),_("ngIf",i.numExecutions),v(1),_("ngIf",i.numExecutions),v(1),_("ngIf",null!==i.activeRunId&&null!==i.focusedExecutionIndex))},dependencies:[yn,nn,Fe,IX,Ji,Dd],styles:[".execution-digest[_ngcontent-%COMP%] {\n  background-color: #e3e5e8;\n  border: 1px solid #c0c0c0;\n  color: #425066;\n  display: inline-block;\n  font-size: 10px;\n  height: 15px;\n  padding: 1px;\n  text-align: center;\n  vertical-align: middle;\n  width: 12px;\n}\n\n.execution-digest.func-graph-execution[_ngcontent-%COMP%] {\n  background-color: #c7dbf5;\n  color: #4e5664;\n  text-decoration: underline;\n}\n\n.execution-digest.focused[_ngcontent-%COMP%] {\n  background-color: #ffd4b3;\n  border: 1px solid #000;\n  font-weight: bold;\n}\n\n.execution-digest.InfNanAlert[_ngcontent-%COMP%] {\n  background-color: #e52592;\n  color: #fff;\n}\n\n\n.execution-digest[_ngcontent-%COMP%]:hover {\n  border: 1px solid #000;\n  font-weight: bold;\n}\n\n.execution-timeline[_ngcontent-%COMP%] {\n  display: flex;\n  overflow-x: hidden;\n  white-space: nowrap;\n  width: 100%;\n  margin-top: 5px;\n  margin-bottom: 5px;\n}\n\n.timeline-slider[_ngcontent-%COMP%] {\n  display: inline-block;\n  height: 48px;\n  left: 340px; \n  padding: 0;\n  position: absolute;\n  right: 40px;\n}\n\n  .timeline-slider .mat-slider-thumb {\n  border-radius: 5px;\n  right: -40px;\n  width: 80px;\n}\n\n\n.navigation-position-info[_ngcontent-%COMP%] {\n  display: inline-flex;\n  font-size: 14px;\n  line-height: normal;\n  max-width: 200px;\n  padding-left: 10px;\n  padding-right: 10px;\n  text-align: center;\n  vertical-align: middle;\n}\n\n.navigation-section[_ngcontent-%COMP%] {\n  height: 48px;\n  line-height: 48px;\n  position: relative;\n  vertical-align: middle;\n  width: 100%;\n}"],changeDetection:0}),n})(),gSe=["__forward_","__backward_","__inference_"],OX=(()=>{class n{constructor(e){this.store=e,this.activeRunId$=this.store.pipe(un(Qo)),this.loadingNumExecutions$=this.store.pipe(un(q(WE,i=>i.state==Te.LOADING))),this.scrollBeginIndex$=this.store.pipe(un(fy)),this.scrollBeginIndexUpperLimit$=this.store.pipe(un(q(Gu,Lg,(i,r)=>Math.max(0,i-r)))),this.pageSize$=this.store.pipe(un(Ng)),this.displayCount$=this.store.pipe(un(Lg)),this.displayExecutionDigests$=this.store.pipe(un(q(GY,i=>i.map(r=>function(n,t=1){if(!n)return{op_type:"(N/A)",short_op_type:"..",is_graph:!1};let e=gSe.filter(i=>n.op_type.startsWith(i));if(e.length){let i=n.op_type.slice(e[0].length);return{op_type:n.op_type,short_op_type:i.slice(0,t),is_graph:!0}}return{op_type:n.op_type,short_op_type:n.op_type.slice(0,t),is_graph:!1}}(r))))),this.displayFocusedAlertTypes$=this.store.pipe(un($Y)),this.focusedExecutionIndex$=this.store.pipe(un(hN)),this.focusedExecutionDisplayIndex$=this.store.pipe(un(eX)),this.numExecutions$=this.store.pipe(un(Gu))}onNavigateLeft(){this.store.dispatch(Eg())}onNavigateRight(){this.store.dispatch(Tg())}onExecutionDigestClicked(e){this.store.dispatch(Ig({displayIndex:e}))}onSliderChange(e){this.store.dispatch(Dg({index:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2-timeline"]],decls:12,vars:33,consts:[[3,"activeRunId","loadingNumExecutions","numExecutions","scrollBeginIndex","scrollBeginIndexUpperLimit","pageSize","displayCount","displayExecutionDigests","displayFocusedAlertTypes","focusedExecutionIndex","focusedExecutionDisplayIndex","onNavigateLeft","onNavigateRight","onExecutionDigestClicked","onSliderChange"]],template:function(e,i){1&e&&(h(0,"timeline-component",0),I("onNavigateLeft",function(){return i.onNavigateLeft()})("onNavigateRight",function(){return i.onNavigateRight()})("onExecutionDigestClicked",function(o){return i.onExecutionDigestClicked(o)})("onSliderChange",function(o){return i.onSliderChange(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),j(11,"async"),g()),2&e&&_("activeRunId",W(1,11,i.activeRunId$))("loadingNumExecutions",W(2,13,i.loadingNumExecutions$))("numExecutions",W(3,15,i.numExecutions$))("scrollBeginIndex",W(4,17,i.scrollBeginIndex$))("scrollBeginIndexUpperLimit",W(5,19,i.scrollBeginIndexUpperLimit$))("pageSize",W(6,21,i.pageSize$))("displayCount",W(7,23,i.displayCount$))("displayExecutionDigests",W(8,25,i.displayExecutionDigests$))("displayFocusedAlertTypes",W(9,27,i.displayFocusedAlertTypes$))("focusedExecutionIndex",W(10,29,i.focusedExecutionIndex$))("focusedExecutionDisplayIndex",W(11,31,i.focusedExecutionDisplayIndex$))},dependencies:[PX,ct],encapsulation:2,changeDetection:0}),n})();function vSe(n,t){1&n&&P(0,"tf-debugger-v2-inactive")}function ySe(n,t){1&n&&(h(0,"div",3),P(1,"tf-debugger-v2-alerts"),h(2,"div",4),P(3,"tf-debugger-v2-timeline")(4,"tf-debugger-v2-graph"),g(),P(5,"tf-debugger-v2-graph-executions"),g(),h(6,"div",5),P(7,"tf-debugger-v2-source-files")(8,"tf-debugger-v2-stack-trace"),g())}var kX=(()=>{class n{constructor(){this.runs={},this.runIds=[],this.activeRunId=null}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["debugger-component"]],inputs:{runs:"runs",runIds:"runIds",activeRunId:"activeRunId"},decls:4,vars:2,consts:[[1,"debugger-container"],[4,"ngIf","ngIfElse"],["dataAvailable",""],[1,"top-section"],[1,"top-center-section"],[1,"bottom-section"]],template:function(e,i){if(1&e&&(h(0,"div",0),S(1,vSe,1,0,"tf-debugger-v2-inactive",1),S(2,ySe,9,0,"ng-template",null,2,Wt),g()),2&e){let r=it(3);v(1),_("ngIf",0===i.runIds.length)("ngIfElse",r)}},dependencies:[aX,Fe,dX,fX,hX,wX,EX,OX],styles:[".bottom-section[_ngcontent-%COMP%]{box-sizing:border-box;border-top:1px solid #ebebeb;display:flex;flex-grow:1;height:34%;padding-top:6px}body.dark-mode[_nghost-%COMP%]   .bottom-section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .bottom-section[_ngcontent-%COMP%]{border-top:1px solid #555}.debugger-container[_ngcontent-%COMP%]{box-sizing:border-box;height:100%;overflow:hidden}.top-section[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-grow:1;height:66%;padding:6px 0}tf-debugger-v2-alerts[_ngcontent-%COMP%]{border-right:1px solid #ebebeb;display:inline-block;margin-right:10px;min-width:160px;width:calc(15% - 11px)}body.dark-mode[_nghost-%COMP%]   tf-debugger-v2-alerts[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tf-debugger-v2-alerts[_ngcontent-%COMP%]{border-right:1px solid #555}tf-debugger-v2-graph-executions[_ngcontent-%COMP%]{display:inline-block;flex-grow:1;min-width:540px;width:540px}tf-debugger-v2-source-files[_ngcontent-%COMP%]{display:inline-block;height:100%;width:70%}tf-debugger-v2-stack-trace[_ngcontent-%COMP%]{display:inline-block;flex-grow:1;height:100%;min-width:540px;width:540px}.top-center-section[_ngcontent-%COMP%]{display:inline-block;overflow:auto;width:55%}tf-debugger-v2-timeline[_ngcontent-%COMP%]{display:block}tf-debugger-v2-graph[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;display:block;margin-top:5px}body.dark-mode[_nghost-%COMP%]   tf-debugger-v2-graph[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tf-debugger-v2-graph[_ngcontent-%COMP%]{border-top:1px solid #555}"],changeDetection:0}),n})(),FX=(()=>{class n{constructor(e){this.store=e,this.runs$=this.store.pipe(un(Af)),this.runsIds$=this.store.pipe(un(q(Af,i=>Object.keys(i)))),this.activeRunId$=this.store.pipe(un(Qo))}ngOnInit(){this.store.dispatch(CE())}ngOnDestroy(){this.store.dispatch(ME())}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["tf-debugger-v2"]],decls:4,vars:9,consts:[[3,"runs","runIds","activeRunId"]],template:function(e,i){1&e&&(P(0,"debugger-component",0),j(1,"async"),j(2,"async"),j(3,"async")),2&e&&_("runs",W(1,3,i.runs$))("runIds",W(2,5,i.runsIds$))("activeRunId",W(3,7,i.activeRunId$))},dependencies:[kX,ct],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"]}),n})(),tT="debugger-v2";function wN(n,t,e,i,r){if(e<=0||!Number.isInteger(e))throw new Error(`Invalid pageSize: ${e}`);if(t>i)throw new Error(`end index (${t}) exceeds total number of items (${i})`);if(t-n>e)throw new Error("begin-end span exceeds page size, which is not allowed");let o=[],s=Math.floor(n/e);(!(s in r)||r[s]<e&&s*e+r[s]<i)&&o.push(s);let a=Math.floor((t-1)/e);return a!==s&&(!(a in r)||a*e+r[a]<t&&t<i)&&o.push(a),o}var BX=(()=>{class n{onDebuggerDataPoll(){return this.actions$.pipe(ei(CE),Jn(e=>function(n,t,e){return n.pipe(function(n){return qt((t,e)=>{let i,o,r=!1,s=!1,a=!1,l=()=>a&&s&&(e.complete(),!0),d=()=>{a=!1,i=t.subscribe(Vt(e,void 0,()=>{a=!0,!l()&&(o||(o=new Ie,n(o).subscribe(Vt(e,()=>{i?d():r=!0},()=>{s=!0,l()}))),o).next()})),r&&(i.unsubscribe(),i=null,r=!1,d())};d()})}(i=>i.pipe(Bt(t),km(([,r])=>na(r)))),ot(e),N(()=>{}))}(Ht(e),this.store.select(VY).pipe(N(i=>function(n){return n>6e4?6e4:n>4e3?n:2e3}(i))),this.actions$.pipe(ei(ME)))),Nt(()=>this.store.dispatch(ay())),N(()=>{}))}onCoreReload(){return tn(this.actions$.pipe(ei(Fs,cs)),this.actions$.pipe(ei(wc)).pipe(Bt(this.store.select(lN)),ke(([,e])=>e.state===Te.NOT_LOADED||e.state===Te.FAILED&&null===e.lastLoadedTimeInMs))).pipe(Bt(this.store.select(Wo)),ke(([,e])=>e===tT),Nt(()=>this.store.dispatch(ay())),N(()=>{}))}loadDebuggerRuns(e){return e.pipe(Bt(this.store.select(lN)),ke(([,{state:i}])=>i!==Te.LOADING),Nt(()=>this.store.dispatch(wE())),hn(()=>this.dataSource.fetchRuns().pipe(Nt(i=>{this.store.dispatch(SE({runs:i}))}),N(()=>{}))))}createNumExecutionLoader(e){return e.pipe(Bt(this.store.select(Af),this.store.select(WE)),ke(([,i,r])=>Object.keys(i).length>0&&r.state!==Te.LOADING),Nt(()=>this.store.dispatch(DE())),hn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchExecutionDigests(r,0,0).pipe(Nt(a=>{this.store.dispatch(IE({numExecutions:a.num_digests}))}),N(()=>{}))}))}createNumGraphExecutionLoader(e){return e.pipe(Bt(this.store.select(Af),this.store.select(WY)),ke(([,i,r])=>Object.keys(i).length>0&&r.state!==Te.LOADING),Nt(()=>this.store.dispatch(OE())),hn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchGraphExecutionDigests(r,0,0).pipe(Nt(a=>{this.store.dispatch(kE({numGraphExecutions:a.num_digests}))}),N(()=>{}))}))}createNumAlertsAndBreakdownLoader(e){return e.pipe(Bt(this.store.select(Af),this.store.select(cN)),ke(([,i,r])=>Object.keys(i).length>0&&r.state!==Te.LOADING),Nt(()=>this.store.dispatch(ly())),hn(([,i])=>{let r=Object.keys(i)[0];return this.dataSource.fetchAlerts(r,0,0).pipe(Nt(a=>{this.store.dispatch(EE({numAlerts:a.num_alerts,alertsBreakdown:a.alerts_breakdown}))}),N(()=>{}))}))}createInitialExecutionDetector(e){return e.pipe(Bt(this.store.select(Gu),this.store.select(py)),ke(([,i,r])=>i>0&&0===Object.keys(r.pageLoadedSizes).length),N(()=>{}))}createInitialExecutionDigest(e){return e.pipe(Bt(this.store.select(Gu),this.store.select(Qo),this.store.select(Ng)),ke(([,,i])=>null!==i),N(([,i,r,o])=>({begin:0,end:Math.min(i,o),runId:r})))}onExecutionScroll(){return this.actions$.pipe(ei(Eg,Tg,Dg),Bt(this.store.select(Qo),this.store.select(fy),this.store.select(Gu),this.store.select(Lg),this.store.select(Ng)),ke(([e])=>null!==e),N(([,e,i,r,o,s])=>({runId:e,begin:i,end:Math.min(r,i+o),pageSize:s})),Bt(this.store.select(py)),N(([e,i])=>({props:e,loaded:i,missingPages:wN(e.begin,e.end,e.pageSize,i.numExecutions,i.pageLoadedSizes)})),ke(({missingPages:e})=>e.length>0),N(({props:e,loaded:i,missingPages:r})=>{let{runId:o,pageSize:s}=e;return{begin:r[0]*s,end:Math.min(i.numExecutions,(r[r.length-1]+1)*s),runId:o}}))}createExecutionDigestLoader(e){return e.pipe(Bt(this.store.select(py)),ke(([{begin:i,end:r},o])=>r>i&&!function(n,t,e){if(t>=e)throw new Error(`Expected begin to be less than end, but got begin=${t}, end=${e}`);return-1!==n.findIndex(i=>i.begin>=t&&i.end<=e)}(o.loadingRanges,i,r)),Nt(([{begin:i,end:r}])=>{this.store.dispatch(AE({begin:i,end:r}))}),hn(([{runId:i,begin:r,end:o}])=>this.dataSource.fetchExecutionDigests(i,r,o).pipe(Nt(s=>{this.store.dispatch(RE(s))}),N(()=>{}))))}onExecutionDigestFocused(){return this.actions$.pipe(ei(Ig),Bt(this.store.select(Qo),this.store.select(gN),this.store.select(fy)),N(([e,i,r,o])=>({activeRunId:i,loadedExecutionData:r,focusIndex:o+e.displayIndex})))}createExecutionDataAndStackFramesLoader(e){return e.pipe(ke(({activeRunId:i,loadedExecutionData:r,focusIndex:o})=>null!==i&&null!==o&&void 0===r[o]),hn(({activeRunId:i,focusIndex:r})=>{let o=r,s=o+1;return this.dataSource.fetchExecutionData(i,o,s).pipe(Nt(a=>{this.store.dispatch(PE(a))}),N(a=>({executionData:a,begin:o,end:s})))}),N(({executionData:i})=>i.executions[0]),Bt(this.store.select(Qo),this.store.select(_N)),ke(([i,r,o])=>{if(null===r)return!1;for(let s of i.stack_frame_ids)if(void 0===o[s])return!0;return!1}),hn(([i,r])=>{let o=i.stack_frame_ids;return this.dataSource.fetchStackFrames(r,o).pipe(Nt(s=>{let a={};for(let l=0;l<o.length;++l)a[o[l]]=s.stack_frames[l];this.store.dispatch(cy({stackFrames:a}))}),N(()=>{}))}))}onGraphExecutionScroll(){return this.actions$.pipe(ei(Ag),wr(100),Bt(this.store.select(Qo),this.store.select(my),this.store.select(qY)),ke(([,e,i])=>null!==e&&i>0),N(([,e,i,r])=>({runId:e,numGraphExecutions:i,scrollBeginIndex:r})),Bt(this.store.select(XY),this.store.select(YY),this.store.select(QY),this.store.select(ZY)),N(([{runId:e,numGraphExecutions:i,scrollBeginIndex:r},o,s,a,l])=>{let c=wN(r,Math.min(r+s,i),o,i,l);return c=c.filter(d=>-1===a.indexOf(d)),{runId:e,missingPages:c,pageSize:o,numGraphExecutions:i}}))}loadGraphExecutionPages(e){return e.pipe(ke(({missingPages:i})=>i.length>0),Nt(({missingPages:i})=>{i.forEach(r=>{this.store.dispatch(FE({pageIndex:r}))})}),hn(({runId:i,missingPages:r,pageSize:o,numGraphExecutions:s})=>{let a=r[0]*o,l=Math.min((r[r.length-1]+1)*o,s);return this.dataSource.fetchGraphExecutionData(i,a,l).pipe(Nt(c=>{this.store.dispatch(NE(c))}),N(()=>{}))}))}loadGraphOpInfo(){return this.actions$.pipe(ei(Pg,Rg),Bt(this.store.select(Qo),this.store.select(tX)),ke(([e,i,r])=>{let{graph_id:o,op_name:s}=e;return!(null===i||void 0!==r[o]&&r[o].has(s)&&(r[o].get(s)===Te.LOADING||r[o].get(s)===Te.LOADED))}),Nt(([{graph_id:e,op_name:i}])=>this.store.dispatch(LE({graph_id:e,op_name:i}))),hn(([e,i])=>{let{graph_id:r,op_name:o}=e;return this.dataSource.fetchGraphOpInfo(i,r,o).pipe(Nt(s=>this.store.dispatch(BE({graphOpInfoResponse:s}))),N(s=>({runId:i,stackFrameIds:s.stack_frame_ids})))}))}loadGraphOpStackFrames(e){return e.pipe(Bt(this.store.select(_N)),N(([{runId:i,stackFrameIds:r},o])=>({runId:i,missingStackFrameIds:r.filter(a=>void 0===o[a])})),ke(({runId:i,missingStackFrameIds:r})=>null!==i&&r.length>0),hn(({runId:i,missingStackFrameIds:r})=>this.dataSource.fetchStackFrames(i,r).pipe(Nt(o=>{let s={};for(let a=0;a<r.length;++a)s[r[a]]=o.stack_frames[a];this.store.dispatch(cy({stackFrames:s}))}),N(()=>{}))))}onAlertTypeFocused(){return this.actions$.pipe(ei(Sg),Bt(this.store.select(Qo),this.store.select(GE),this.store.select(zY),this.store.select(UY),this.store.select(cN)),ke(([,e,i,r,o,s])=>null!==e&&null!==i&&r>0&&(null===o||Object.keys(o).length<r)&&s.state!==Te.LOADING),Nt(()=>this.store.dispatch(ly())),hn(([,e,i])=>this.dataSource.fetchAlerts(e,0,-1,i)),Nt(({num_alerts:e,alerts_breakdown:i,alert_type:r,begin:o,end:s,alerts:a})=>{this.store.dispatch(TE({numAlerts:e,alertsBreakdown:i,alertType:r,begin:o,end:s,alerts:a}))}))}fetchExecutionDigestsForAlertTypeFocus(e){return e.pipe(Bt(this.store.select(Ng),this.store.select(Lg),this.store.select(Gu),this.store.select(py),this.store.select(Qo)),N(([i,r,o,s,a,l])=>{let d=i.alerts[0].execution_index,u=wN(Math.max(0,d-Math.floor(o/2)),Math.min(d+Math.floor(o/2),s),r,s,a.pageLoadedSizes);return 0===u.length?{runId:l,begin:0,end:0}:{runId:l,begin:u[0]*r,end:Math.min(a.numExecutions,(u[u.length-1]+1)*r)}}))}loadSourceFileList(e){return e.pipe(Bt(this.store.select(Qo),this.store.select(iX)),ke(([,i,r])=>null!==i&&r.state!==Te.LOADING),Nt(()=>this.store.dispatch(VE())),hn(([,i])=>this.dataSource.fetchSourceFileList(i).pipe(Nt(r=>{let o=[];r.forEach(([s,a])=>{o.push({host_name:s,file_path:a})}),this.store.dispatch(HE({sourceFiles:o}))}),N(()=>{}))))}onSourceFileFocused(){return this.actions$.pipe(ei(Og),Bt(this.store.select(Qo),this.store.select(bN),this.store.select(XE)),N(([e,i,r,o])=>({runId:i,stackFrame:e.stackFrame,fileIndex:r,fileContent:o})),ke(({runId:e,fileContent:i})=>null!==e&&null!==i&&i.loadState===Te.NOT_LOADED),Nt(({stackFrame:e})=>this.store.dispatch(zE({host_name:e.host_name,file_path:e.file_path}))),hn(({fileIndex:e,runId:i})=>this.dataSource.fetchSourceFile(i,e).pipe(Nt(r=>{this.store.dispatch(UE(r))}),N(()=>{}))))}constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.loadData$=ar(()=>{let o=this.loadDebuggerRuns(tn(this.onDebuggerDataPoll(),this.onCoreReload())).pipe(Cs()),s=this.loadSourceFileList(o),a=this.createNumExecutionLoader(o),l=this.createNumAlertsAndBreakdownLoader(o),c=this.onAlertTypeFocused(),d=this.fetchExecutionDigestsForAlertTypeFocus(c),u=this.createInitialExecutionDetector(a).pipe(Cs()),p=this.createExecutionDigestLoader(tn(this.onExecutionScroll(),this.createInitialExecutionDigest(u),d)),f=this.createExecutionDataAndStackFramesLoader(tn(this.onExecutionDigestFocused(),u.pipe(Bt(this.store.select(Qo),this.store.select(gN)),N(([,x,R])=>({activeRunId:x,loadedExecutionData:R,focusIndex:0})))));return tn(l,p,f,this.createNumGraphExecutionLoader(o),s,this.onSourceFileFocused(),this.loadGraphExecutionPages(this.onGraphExecutionScroll()),this.loadGraphOpStackFrames(this.loadGraphOpInfo())).pipe(N(()=>({})))},{dispatch:!1})}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(xE))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),VX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),HX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),nT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),zX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,nT,Md]}),n})(),UX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Yu=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),iT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Yu]}),n})(),jX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,iT]}),n})(),GX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,iT]}),n})(),WX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,nT]}),n})(),qX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,WX,ci,qu]}),n})(),YX=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[VX,Pe,Ga,zX,HX,UX,jX,GX,OY,qX,Tr.forFeature(dy,BY),to.forFeature([BX]),Bc.forPlugin(tT,FX)]}),n})(),rT=_e("[Metrics] Metrics Settings Pane Closed"),oT=_e("[Metrics] Metrics Settings Pane Toggled"),sT=_e("[Metrics] Slide out settings menu toggled"),aT=_e("[Metrics] User requested to open the slide out menu",{_as:"props",_p:void 0}),lT=_e("[Metrics] User changed the tab in the table editor",{_as:"props",_p:void 0}),cT=_e("[Metrics] Slide out settings menu closed"),dT=_e("[Metrics] Metrics Tag Metadata Requested"),uT=_e("[Metrics] Metrics Tag Metadata Loaded",{_as:"props",_p:void 0}),pT=_e("[Metrics] Metrics Tag Metadata Failed"),fT=_e("[Metrics] Metrics Card State Updated",{_as:"props",_p:void 0}),Bg=_e("[Metrics] Metrics Card Full Size Toggled",{_as:"props",_p:void 0}),mT=_e("[Metrics] Metrics Settings Change Tooltip",{_as:"props",_p:void 0}),hT=(_e("[Metrics] Metrics Settings Toggle Show Data Download"),_e("[Metrics] Metrics Setting Toggle Ignore Outlier")),gT=_e("[Metrics] Metrics Setting Change X Axis Type",{_as:"props",_p:void 0}),_T=_e("[Metrics] Metrics Setting Change Card Width",{_as:"props",_p:void 0}),bT=_e("[Metrics] Metrics Setting Reset Card Width"),vT=_e("[Metrics] Metrics Setting Change Scalar Smoothing",{_as:"props",_p:void 0}),yT=_e("[Metrics] Metrics Setting Partition Non Monotonic X Toggled"),xT=_e("[Metrics] Metrics Setting Change Image Brightness",{_as:"props",_p:void 0}),CT=_e("[Metrics] Metrics Setting Change Image Contrast",{_as:"props",_p:void 0}),MT=_e("[Metrics] Image Brightness Setting Reset"),wT=_e("[Metrics] Image Contrast Setting Reset"),ST=_e("[Metrics] Metrics Setting Toggle Image Show Actual Size"),ET=_e("[Metrics] Metrics Setting Change Histogram Mode",{_as:"props",_p:void 0}),TT=_e("[Metrics] Multiple Time Series Requested",{_as:"props",_p:void 0}),DT=_e("[Metrics] Fetch Time Series Request Failed",{_as:"props",_p:void 0}),IT=_e("[Metrics] Fetch Time Series Response Loaded",{_as:"props",_p:void 0}),Vg=_e("[Metrics] Card Visibility Changed",{_as:"props",_p:void 0}),AT=_e("[Metrics] Card Step Slider Changed",{_as:"props",_p:void 0}),RT=_e("[Metrics] Tag Filter Changed",{_as:"props",_p:void 0}),PT=_e("[Metrics] Metrics Tag Group Expansion Changed",{_as:"props",_p:void 0}),Hg=_e("[Metrics] Card Pin State Toggled",{_as:"props",_p:void 0}),OT=_e("[Metrics] Toggle Visible Plugin",{_as:"props",_p:void 0}),kT=_e("[Metrics] Toggle Show All Plugins"),kf=_e("[Metrics] Time Selection Changed",{_as:"props",_p:void 0}),by=_e("[Metrics] Card User View Box Changed",{_as:"props",_p:void 0}),FT=_e("[Metrics] Linked Time Enable Toggle",{_as:"props",_p:void 0}),XX=_e("[Metrics] Sorting Data Table By Header",{_as:"props",_p:void 0}),zg=_e("[Metrics] Data table columns edited in edit menu",{_as:"props",_p:void 0}),Ug=_e("[Metrics] Data table column toggled in edit menu or delete button clicked",{_as:"props",_p:void 0}),Id=_e("[Metrics] Time Selector Enable Toggle",{_as:"props",_p:void 0}),NT=_e("[Metrics] Range Selection Toggled",{_as:"props",_p:void 0}),QX=_e("[Metrics] Hide Empty Cards Changed");function vy(n,t){let e={};for(let i of Object.keys(n))e[i]=t(n[i],i);return e}var qs=(()=>(function(n){n.NONE="no affordance",n.EXTENDED_LINE="extendedLine",n.FOB="fob",n.FOB_REMOVED="fobRemoved",n.FOB_TEXT="fobText",n.HISTOGRAM_CLICK_TO_RANGE="histogramClickToRange",n.FOB_ADDED="fobAdded"}(qs||(qs={})),qs))(),Ys=(()=>(function(n){n.NONE="no toggle affordance",n.FOB_DESELECT="fobDeselect",n.CHECK_BOX="checkBox"}(Ys||(Ys={})),Ys))(),fs=(()=>(function(n){n[n.HORIZONTAL=0]="HORIZONTAL",n[n.VERTICAL=1]="VERTICAL"}(fs||(fs={})),fs))();function LT(n){let t=new Map,e=n.slice().sort((i,r)=>yy(i.tag,r.tag));for(let i of e){let r=ESe(i.tag);t.has(r)||t.set(r,{groupName:r,items:[]}),t.get(r).items.push(i)}return[...t.values()]}function ESe(n){return n.split("/",1)[0]}function yy(n,t){let e=0,i=0;for(;;){if(e===n.length)return i===t.length?0:-1;if(i===t.length)return 1;if(Ff(n[e])&&Ff(t[i])){let r=e,o=i;e=ZX(n,e+1),i=ZX(t,i+1);let s=Number(n.slice(r,e)),a=Number(t.slice(o,i));if(s<a)return-1;if(s>a)return 1}else{if(SN(n[e])){if(!SN(t[i]))return-1}else{if(SN(t[i]))return 1;if(n[e]<t[i])return-1;if(n[e]>t[i])return 1}e++,i++}}}function ZX(n,t){let e;var o;(o=e||(e={}))[o.NATURAL=0]="NATURAL",o[o.REAL=1]="REAL",o[o.EXPONENT_SIGN=2]="EXPONENT_SIGN",o[o.EXPONENT=3]="EXPONENT";let i=e.NATURAL,r=t;for(;r<n.length;r++)if(i===e.NATURAL){if("."===n[r])i=e.REAL;else if("e"===n[r]||"E"===n[r])i=e.EXPONENT_SIGN;else if(!Ff(n[r]))break}else if(i===e.REAL){if("e"===n[r]||"E"===n[r])i=e.EXPONENT_SIGN;else if(!Ff(n[r]))break}else if(i===e.EXPONENT_SIGN){if(!Ff(n[r])&&"+"!==n[r]&&"-"!==n[r])break;i=e.EXPONENT}else if(i===e.EXPONENT&&!Ff(n[r]))break;return r}function Ff(n){return"0"<=n&&n<="9"}function SN(n){return"/"===n||Ff(n)}function EN(n,t,e){let{plugin:i,tag:r,runId:o,sample:s}=t[n],a=gd(e,i,r,s);if(a){if(null!==o&&a.runToSeries.hasOwnProperty(o)){let c=a.runToSeries[o].length;return c>0?c-1:null}let l=Object.values(a.runToSeries).map(c=>c.length);if(l.length)return Math.max(...l)-1}return null}function DSe(n,t,e,i){let r={...t};for(let o in n){if(!n.hasOwnProperty(o))continue;let s=EN(o,n,e);if(null===s)continue;let a=t.hasOwnProperty(o)?t[o].index:null,l=EN(o,n,i);(null!==a&&a>s||null===a||null!==a&&a===l)&&(r[o]={index:s,isClosest:!1})}return r}function KX(n){let t=vy(n.runToLoadState,e=>e===Te.LOADING?Te.LOADING:Te.NOT_LOADED);return{...n,runToLoadState:t}}function JX(n,t,e,i){return JSON.stringify([n,t,e||"",i])}var{initialState:eQ,reducers:ISe}=uf({tagMetadataLoadState:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},tagMetadata:{scalars:{tagDescriptions:{},tagToRuns:{}},histograms:{tagDescriptions:{},tagToRuns:{}},images:{tagDescriptions:{},tagRunSampledInfo:{}}},cardList:[],cardToPinnedCopy:new Map,cardToPinnedCopyCache:new Map,pinnedCardToOriginal:new Map,unresolvedImportedPinnedCards:[],cardMetadataMap:{},cardStateMap:{},cardStepIndex:{},tagFilter:"",tagGroupExpanded:new Map,linkedTimeSelection:null,linkedTimeEnabled:!1,stepSelectorEnabled:!0,rangeSelectionEnabled:!1,singleSelectionHeaders:[{type:ht.RUN,name:"run",displayName:"Run",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.SMOOTHED,name:"smoothed",displayName:"Smoothed",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.VALUE,name:"value",displayName:"Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.STEP,name:"step",displayName:"Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.RELATIVE_TIME,name:"relative",displayName:"Relative",enabled:!0,removable:!0,sortable:!0,movable:!0}],rangeSelectionHeaders:[{type:ht.RUN,name:"run",displayName:"Run",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.MIN_VALUE,name:"min",displayName:"Min",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.MAX_VALUE,name:"max",displayName:"Max",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.START_VALUE,name:"start",displayName:"Start Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.END_VALUE,name:"end",displayName:"End Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.VALUE_CHANGE,name:"valueChange",displayName:"Value",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.PERCENTAGE_CHANGE,name:"percentageChange",displayName:"%",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.START_STEP,name:"startStep",displayName:"Start Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.END_STEP,name:"endStep",displayName:"End Step",enabled:!0,removable:!0,sortable:!0,movable:!0},{type:ht.STEP_AT_MAX,name:"stepAtMax",displayName:"Step At Max",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:ht.STEP_AT_MIN,name:"stepAtMin",displayName:"Step At Min",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:ht.MEAN,name:"mean",displayName:"Mean",enabled:!1,removable:!0,sortable:!0,movable:!0},{type:ht.RAW_CHANGE,name:"rawChange",displayName:"Raw",enabled:!1,removable:!0,sortable:!0,movable:!0}],filteredPluginTypes:new Set,stepMinMax:{min:1/0,max:-1/0}},{isSettingsPaneOpen:!0,isSlideoutMenuOpen:!1,tableEditorSelectedTab:ro.SINGLE,timeSeriesData:{scalars:{},histograms:{},images:{}},settings:XS,settingOverrides:{},visibleCardMap:new Map,previousCardInteractions:{tagFilters:[],pins:[],clicks:[]},newCardInteractions:{tagFilters:[],pins:[],clicks:[]}},(n,t,e)=>Fo(t,e)?n:{...n,tagMetadataLoadState:{state:Te.NOT_LOADED,lastLoadedTimeInMs:null},tagMetadata:{scalars:{tagDescriptions:{},tagToRuns:{}},histograms:{tagDescriptions:{},tagToRuns:{}},images:{tagDescriptions:{},tagRunSampledInfo:{}}},cardList:[],cardMetadataMap:{},visibleCardMap:new Map}),TN=eQ,ASe=br(eQ,ye(Eh,(n,{routeKind:t,partialState:e})=>{if(t!==wn.EXPERIMENT&&t!==wn.COMPARE_EXPERIMENT)return n;let i=new Set;for(let d of n.pinnedCardToOriginal.keys()){let{plugin:u,tag:p,runId:f,sample:m}=n.cardMetadataMap[d];i.add(JX(u,p,f,m))}let r=e,o=[];for(let d of[...n.unresolvedImportedPinnedCards,...r.metrics.pinnedCards]){let u=JX(d.plugin,d.tag,d.runId,d.sample);i.has(u)||(i.add(u),o.push(d))}let s=HF(o,n.cardList,n.cardMetadataMap,n.cardToPinnedCopy,n.cardToPinnedCopyCache,n.pinnedCardToOriginal,n.cardStepIndex,n.cardStateMap),a=r.metrics.smoothing,l=n.settingOverrides;if(Number.isFinite(a)&&null!==a){let d=Math.max(0,Math.min(.999,Number(a.toPrecision(3))));l={...n.settingOverrides,scalarSmoothing:d}}let c={...n,...s,settingOverrides:l};return null!==r.metrics.tagFilter&&(c.tagFilter=r.metrics.tagFilter),c}),ye(Il,(n,{partialSettings:t})=>{let e={};t.tooltipSort&&Object.values(oo).includes(t.tooltipSort)&&(e.tooltipSort=t.tooltipSort),"number"==typeof t.timeSeriesCardMinWidth&&(e.cardMinWidth=t.timeSeriesCardMinWidth),"boolean"==typeof t.ignoreOutliers&&(e.ignoreOutliers=t.ignoreOutliers),"number"==typeof t.scalarSmoothing&&(e.scalarSmoothing=t.scalarSmoothing);let i=t.timeSeriesSettingsPaneOpened??n.isSettingsPaneOpen,r=t.stepSelectorEnabled??n.stepSelectorEnabled,o=t.rangeSelectionEnabled??n.rangeSelectionEnabled,s=t.linkedTimeEnabled??n.linkedTimeEnabled,a=t.singleSelectionHeaders??n.singleSelectionHeaders,l=t.rangeSelectionHeaders??n.rangeSelectionHeaders;return{...n,isSettingsPaneOpen:i,stepSelectorEnabled:r,rangeSelectionEnabled:o,linkedTimeEnabled:s,singleSelectionHeaders:a,rangeSelectionHeaders:l,settings:{...n.settings,...e}}}),ye(cs,Fs,n=>{let t=n.tagMetadataLoadState.state===Te.LOADING?Te.LOADING:Te.NOT_LOADED,e=vy(n.timeSeriesData,(i,r)=>vy(i,o=>ua(r)?vy(o,s=>KX(s)):KX(o)));return{...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:t},timeSeriesData:e}}),ye(dT,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Te.LOADING}})),ye(pT,n=>({...n,tagMetadataLoadState:{...n.tagMetadataLoadState,state:Te.FAILED}})),ye(uT,(n,{tagMetadata:t})=>{let e={scalars:$X(t,zn.SCALARS),histograms:$X(t,zn.HISTOGRAMS),images:t[zn.IMAGES]},i={},r=function(n){let t=[];for(let e of Object.keys(n)){let r,i=e;if(ua(i)){if(!pa(i))throw new Error("Multi-run, sampled plugin support not yet implemented");{let o=n[i].tagRunSampledInfo;for(let s of Object.keys(o))for(let a of Object.keys(o[s])){let{maxSamplesPerStep:l}=o[s][a];for(let c=0;c<l;c++)t.push({plugin:i,tag:s,runId:a,sample:c,numSample:l})}}}else if(pa(i)){r=n[i].tagToRuns;for(let o of Object.keys(r))for(let s of r[o])t.push({plugin:i,tag:o,runId:s})}else{r=n[i].tagToRuns;for(let o of Object.keys(r))t.push({plugin:i,tag:o,runId:null})}}return t}(e),o=[];for(let f of r){let m=VF(f);i[m]=f,o.push(m)}let s=n.tagGroupExpanded;if(0===n.tagGroupExpanded.size){let m=LT(o.map(b=>({...i[b],cardId:b})).filter(Boolean));s=new Map(n.tagGroupExpanded);for(let b of m.slice(0,2))s.set(b.groupName,!0)}let{nextCardToPinnedCopy:a,nextPinnedCardToOriginal:l,pinnedCardMetadataMap:c}=function(n,t,e){let i=new Map,r=new Map,o={};return n.forEach((s,a)=>{-1!==e.indexOf(a)&&(i.set(a,s),r.set(s,a),o[s]=t[a])}),{nextCardToPinnedCopy:i,nextPinnedCardToOriginal:r,pinnedCardMetadataMap:o}}(n.cardToPinnedCopyCache,i,o),d={...i,...c},u=function(n,t){let e={};return Object.entries(n).forEach(([i,r])=>{t[i]&&(e[i]=r)}),e}(n.cardStepIndex,d),p=HF(n.unresolvedImportedPinnedCards,o,d,a,n.cardToPinnedCopyCache,l,u,n.cardStateMap);return{...n,...p,tagGroupExpanded:s,tagMetadataLoadState:{state:Te.LOADED,lastLoadedTimeInMs:Date.now()},tagMetadata:e,cardList:o}}),ye(fT,(n,{cardId:t,settings:e})=>{let i={...n.cardStateMap};return i[t]={...i[t],...e},{...n,cardStateMap:i}}),ye(Bg,(n,{cardId:t})=>{let e={...n.cardStateMap};return e[t]={...e[t],fullWidth:!e[t]?.fullWidth,tableExpanded:!e[t]?.fullWidth},{...n,cardStateMap:e}}),ye(RT,(n,{tagFilter:t})=>({...n,tagFilter:t})),ye(mT,(n,{sort:t})=>({...n,settingOverrides:{...n.settingOverrides,tooltipSort:t}})),ye(hT,n=>{let t=!(n.settingOverrides.ignoreOutliers??n.settings.ignoreOutliers);return{...n,settingOverrides:{...n.settingOverrides,ignoreOutliers:t}}}),ye(gT,(n,{xAxisType:t})=>({...n,settingOverrides:{...n.settingOverrides,xAxisType:t}})),ye(vT,(n,{smoothing:t})=>({...n,settingOverrides:{...n.settingOverrides,scalarSmoothing:t}})),ye(yT,n=>{let t=!(n.settingOverrides.scalarPartitionNonMonotonicX??n.settings.scalarPartitionNonMonotonicX);return{...n,settingOverrides:{...n.settingOverrides,scalarPartitionNonMonotonicX:t}}}),ye(xT,(n,{brightnessInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageBrightnessInMilli:t}})),ye(CT,(n,{contrastInMilli:t})=>({...n,settingOverrides:{...n.settingOverrides,imageContrastInMilli:t}})),ye(MT,n=>{let{imageBrightnessInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),ye(wT,n=>{let{imageContrastInMilli:t,...e}=n.settingOverrides;return{...n,settingOverrides:e}}),ye(ST,n=>{let t=!(n.settingOverrides.imageShowActualSize??n.settings.imageShowActualSize);return{...n,settingOverrides:{...n.settingOverrides,imageShowActualSize:t}}}),ye(ET,(n,{histogramMode:t})=>({...n,settingOverrides:{...n.settingOverrides,histogramMode:t}})),ye(_T,(n,{cardMinWidth:t})=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:t}})),ye(bT,n=>({...n,settingOverrides:{...n.settingOverrides,cardMinWidth:null}})),ye(QX,n=>({...n,settingOverrides:{...n.settingOverrides,hideEmptyCards:!n.settingOverrides.hideEmptyCards}})),ye(TT,(n,{requests:t})=>{if(!t.length)return n;let e={...n.timeSeriesData};for(let i of t){let{plugin:r,tag:o,sample:s}=i;e[r]=QS(e,r,o,s);let a=gd(e,r,o,s),l=PF(i)?[i.runId]:qh(n.tagMetadata,r,o,s);a.runToLoadState=ZS(Te.LOADING,l,a.runToLoadState)}return{...n,timeSeriesData:e}}),ye(DT,(n,{request:t})=>{let e={...n.timeSeriesData},{plugin:i,tag:r,sample:o}=t;e[i]=QS(e,i,r,o);let s=gd(e,i,r,o),a=PF(t)?[t.runId]:qh(n.tagMetadata,i,r,o);return s.runToLoadState=ZS(Te.FAILED,a,s.runToLoadState),{...n,timeSeriesData:e}}),ye(IT,(n,{response:t})=>{let e={...n.stepMinMax},i={...n.cardStateMap},r={...n.timeSeriesData},{plugin:o,tag:s,runId:a,sample:l}=t;r[o]=QS(r,o,s,l);let c=gd(r,o,s,l);if(US(t)){let u=a?[a]:qh(n.tagMetadata,o,s,l);c.runToLoadState=ZS(Te.FAILED,u,c.runToLoadState)}else{let u=t.runToSeries;c.runToSeries={...c.runToSeries},c.runToLoadState={...c.runToLoadState};for(let p in u)if(u.hasOwnProperty(p)){c.runToSeries[p]=u[p],c.runToLoadState[p]=Te.LOADED;for(let f of u[p])e.min=Math.min(e.min,f.step),e.max=Math.max(e.max,f.step)}}if(t.runToSeries&&t.plugin===zn.SCALARS){let u=VF({plugin:o,tag:s,runId:null}),p=function(n){let t=1/0,e=-1/0;return Object.values(n).flat().forEach(i=>{t=Math.min(t,i.step),e=Math.max(e,i.step)}),{minStep:t,maxStep:e}}(c.runToSeries);i[u]={...i[u],dataMinMax:p};let f=n.cardToPinnedCopy.get(u);f&&(i[f]={...i[f],dataMinMax:p})}return{...n,timeSeriesData:r,cardStepIndex:DSe(n.cardMetadataMap,n.cardStepIndex,r,n.timeSeriesData),stepMinMax:e,cardStateMap:i}}),ye(AT,(n,{cardId:t,stepIndex:e})=>{let i=EN(t,n.cardMetadataMap,n.timeSeriesData),r=e;return null===i?r=null:e>i&&(r=i),{...n,cardStepIndex:{...n.cardStepIndex,[t]:{index:r,isClosest:!1}}}}),ye(PT,(n,{tagGroup:t})=>{let e=new Map(n.tagGroupExpanded);return e.set(t,!e.get(t)),{...n,tagGroupExpanded:e}}),ye(Vg,(n,{enteredCards:t,exitedCards:e})=>{if(!t.length&&!e.length)return n;let i=new Map(n.visibleCardMap);return t.forEach(({elementId:r,cardId:o})=>{let s=i.get(r)??null;if(null!==s&&s!==o)throw new Error("A DOM element cannot be reused for more than 1 unique card metadata");i.set(r,o)}),e.forEach(({elementId:r})=>{i.delete(r)}),{...n,visibleCardMap:i}}),ye(Hg,(n,{cardId:t})=>{let e=n.pinnedCardToOriginal.has(t),i=!e&&!n.cardToPinnedCopy.has(t);if(i&&!KS(n))return n;let r=new Map(n.cardToPinnedCopy),o=new Map(n.cardToPinnedCopyCache),s=new Map(n.pinnedCardToOriginal),a={...n.cardMetadataMap},l={...n.cardStepIndex},c={...n.cardStateMap};if(e){let d=n.pinnedCardToOriginal.get(t);r.delete(d),o.delete(d),s.delete(t),delete a[t],delete l[t],delete c[t]}else if(i){let d=zF(t,r,o,s,l,a,c);r=d.cardToPinnedCopy,o=d.cardToPinnedCopyCache,s=d.pinnedCardToOriginal,a=d.cardMetadataMap,l=d.cardStepIndex,c=d.cardStateMap}else{let d=n.cardToPinnedCopy.get(t);r.delete(t),o.delete(t),s.delete(d),delete a[d],delete l[d],delete c[t]}return{...n,cardMetadataMap:a,cardStateMap:c,cardStepIndex:l,cardToPinnedCopy:r,cardToPinnedCopyCache:o,pinnedCardToOriginal:s}}),ye(FT,n=>{let t=!n.linkedTimeEnabled,e={...n.cardStepIndex},i=n.linkedTimeSelection,r=n.stepSelectorEnabled,o=n.rangeSelectionEnabled;if(t){let{max:s}=n.stepMinMax;i=n.linkedTimeSelection??{start:{step:s===-1/0?0:s},end:null},e=UF(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,i),r=t,o=Boolean(i.end)}return{...n,cardStepIndex:e,linkedTimeEnabled:t,linkedTimeSelection:i,stepSelectorEnabled:r,rangeSelectionEnabled:o}}),ye(NT,n=>{let t=!n.rangeSelectionEnabled,e=n.stepSelectorEnabled,i=n.linkedTimeSelection,r=Object.entries(n.cardStateMap).reduce((o,[s,a])=>(o[s]={...a,stepSelectionOverride:Ls.NONE,rangeSelectionOverride:Ls.NONE},o),{});return t?(e=t,i||(i={start:{step:n.stepMinMax.min},end:{step:n.stepMinMax.max}}),i.end||(i={start:{step:n.stepMinMax.min},end:i.start})):i&&(i={start:i.end??i.start,end:null}),{...n,stepSelectorEnabled:e,rangeSelectionEnabled:t,linkedTimeSelection:i,cardStateMap:r}}),ye(kf,(n,t)=>{let{cardId:e,timeSelection:i}=t,r=i.start.step,o=i.end?.step,a=n.rangeSelectionEnabled;n.linkedTimeEnabled&&(a=void 0!==o);let l={start:{step:r},end:void 0===o?null:{step:r>o?r:o}},c=UF(n.cardStepIndex,n.cardMetadataMap,n.timeSeriesData,l),d={...n.cardStateMap};return e&&(d[e]={...d[e],timeSelection:l,stepSelectionOverride:Ls.OVERRIDE_AS_ENABLED,rangeSelectionOverride:void 0===l.end?.step?Ls.OVERRIDE_AS_DISABLED:Ls.OVERRIDE_AS_ENABLED}),{...n,linkedTimeSelection:l,cardStepIndex:c,cardStateMap:d,rangeSelectionEnabled:a}}),ye(by,(n,{cardId:t,userViewBox:e})=>{let i={...n.cardStateMap};return i[t]={...i[t],userViewBox:e},{...n,cardStateMap:i}}),ye(Id,(n,{affordance:t,cardId:e})=>{let i={...n.cardStateMap};if(e){let{timeSelection:a,...l}=i[e]||{};i[e]={...l,stepSelectionOverride:Ls.OVERRIDE_AS_DISABLED}}else Object.keys(i).forEach(a=>{i[a]={...i[a],stepSelectionOverride:Ls.NONE}});if(!n.linkedTimeEnabled&&t!==Ys.CHECK_BOX)return{...n,cardStateMap:i};let r=!n.stepSelectorEnabled,o=r&&n.linkedTimeEnabled,s=r&&n.rangeSelectionEnabled;return{...n,linkedTimeEnabled:o,stepSelectorEnabled:r,rangeSelectionEnabled:s,cardStateMap:i}}),ye(lT,(n,{tab:t})=>({...n,tableEditorSelectedTab:t})),ye(zg,(n,{dataTableMode:t,headers:e})=>{let i=[],r=[];return e.forEach(o=>{o.enabled?i.push(o):r.push(o)}),t===ro.RANGE?{...n,rangeSelectionHeaders:i.concat(r)}:{...n,singleSelectionHeaders:i.concat(r)}}),ye(Ug,(n,{dataTableMode:t,header:e,cardId:i})=>{let{cardStateMap:r,rangeSelectionEnabled:o,linkedTimeEnabled:s}=n,a=i?$S(r,o,s,i):t===ro.RANGE,l=a?n.rangeSelectionHeaders:n.singleSelectionHeaders,c=l.findIndex(p=>p.name===e.name),d=function(n){let t=0;return n.forEach(e=>{e.enabled&&t++}),t}(l);l[c].enabled&&d--;let u=function(n,t,e){let i=[...e];return i.splice(n,1),i.splice(t,0,e[n]),i}(c,d,l);return u[d]={...u[d],enabled:!u[d].enabled},a?{...n,rangeSelectionHeaders:u}:{...n,singleSelectionHeaders:u}}),ye(OT,(n,{plugin:t})=>{let e=new Set(n.filteredPluginTypes);return e.has(t)?e.delete(t):e.add(t),Object.values(zn).every(i=>e.has(i))&&(e=new Set),{...n,filteredPluginTypes:e}}),ye(kT,n=>({...n,filteredPluginTypes:new Set})),ye(oT,n=>({...n,isSettingsPaneOpen:!n.isSettingsPaneOpen})),ye(rT,n=>({...n,isSettingsPaneOpen:!1})),ye(sT,n=>({...n,isSlideoutMenuOpen:!n.isSlideoutMenuOpen})),ye(aT,(n,{mode:t})=>({...n,isSlideoutMenuOpen:!0,isSettingsPaneOpen:!0,tableEditorSelectedTab:t})),ye(cT,n=>({...n,isSlideoutMenuOpen:!1})));function tQ(n,t){return pf(ASe,ISe)(n,t)}function $X(n,t){return{tagDescriptions:n[t].tagDescriptions,tagToRuns:RSe(n[t].runTagInfo)}}function RSe(n){let t={};for(let e in n)for(let i of n[e])t[i]=[...t[i]||[],e];return t}var kSe=q(_d,Wa,(n,t,e)=>t?{...t,loadState:n,id:e}:null),nQ=_e("[Metrics Effects] Init"),iQ=(()=>{class n{constructor(e,i,r){this.actions$=e,this.store=i,this.dataSource=r,this.dashboardShownWithoutData$=this.actions$.pipe(ei(nQ,wc,df,Ps),Bt(this.store.select(Wo),this.store.select(vv)),ke(([,o,s])=>o===gv&&s.state===Te.NOT_LOADED)),this.reloadRequestedWhileShown$=this.actions$.pipe(ei(cs,Fs),Bt(this.store.select(Wo)),ke(([,o])=>o===gv)),this.loadTagMetadata$=tn(this.dashboardShownWithoutData$,this.reloadRequestedWhileShown$).pipe(Bt(this.store.select(vv),this.store.select(lr)),ke(([,o,s])=>o.state!==Te.LOADING&&null!==s),ac(10),Nt(()=>{this.store.dispatch(dT())}),Jn(([,,o])=>this.dataSource.fetchTagMetadata(o).pipe(Nt(s=>{this.store.dispatch(uT({tagMetadata:s}))}),zr(()=>(this.store.dispatch(pT()),Ht(null)))))),this.visibleCardsWithoutDataChanged$=this.actions$.pipe(ei(Vg),Bt(this.getVisibleCardFetchInfos()),N(([,o])=>o.filter(s=>s.loadState===Te.NOT_LOADED))),this.visibleCardsReloaded$=this.reloadRequestedWhileShown$.pipe(Bt(this.getVisibleCardFetchInfos()),N(([,o])=>o.filter(s=>s.loadState!==Te.LOADING))),this.loadTimeSeries$=tn(this.visibleCardsWithoutDataChanged$,this.visibleCardsReloaded$).pipe(ke(o=>o.length>0),Bt(this.store.select(lr).pipe(ke(o=>null!==o))),hn(([o,s])=>this.fetchTimeSeriesForCards(o,s))),this.dataEffects$=ar(()=>tn(this.loadTagMetadata$,this.loadTimeSeries$),{dispatch:!1})}ngrxOnInitEffects(){return nQ()}getVisibleCardFetchInfos(){return this.store.select(bW).pipe(Jn(i=>i.size?co([...i].map(o=>this.store.select(kSe,o).pipe(Yt(1)))):Ht([])),N(i=>i.filter(Boolean)))}fetchTimeSeries(e){return this.dataSource.fetchTimeSeries([e]).pipe(Nt(i=>{let r=i.filter(US);r.length&&console.error("Time series response contained errors:",r),this.store.dispatch(IT({response:i[0]}))}),zr(()=>(this.store.dispatch(DT({request:e})),Ht(null))))}fetchTimeSeriesForCards(e,i){return Ht(e.map(o=>{let{plugin:s,tag:a,runId:l,sample:c}=o,d=pa(s)?{plugin:s,tag:a,runId:l}:{plugin:s,tag:a,experimentIds:i};return void 0!==c&&(d.sample=c),d})).pipe(Nt(o=>{this.store.dispatch(TT({requests:o}))}),hn(o=>tn(...o.map(a=>this.fetchTimeSeries(a)))))}}return n.\u0275fac=function(e){return new(e||n)(k(xo),k(Ae),k(Tc))},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),DN=new ie("Metrics Store Config"),IN=new ie("Metrics Initial Settings Config");function rQ(n){return n?{initialState:{...TN,settings:n}}:{initialState:TN}}var ga=(()=>(function(n){n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n[n.MIDDLE=4]="MIDDLE",n[n.FOURTH=8]="FOURTH",n[n.FIFTH=32]="FIFTH"}(ga||(ga={})),ga))(),oQ=0;function FSe(n,t){if(1&n){let e=ge();h(0,"button",3),I("click",function(){return X(e),Q(w().expandSidebar())}),P(1,"mat-icon",4),g()}}function NSe(n,t){if(1&n&&(h(0,"nav",5),j(1,"async"),j(2,"async"),zt(3,1),g()),2&n){let e=w();Tt("width",W(1,6,e.width$),"%")("min-width",e.MINIMUM_SIDEBAR_WIDTH_IN_PX,"px")("max-width",W(2,8,e.runsTableFullScreen$)?100:"","%")}}function LSe(n,t){if(1&n){let e=ge();h(0,"div",6),I("mousedown",function(){return X(e),Q(w().resizeGrabbed())}),g()}}var BSe=[[["","main",""]],[["","sidebar",""]]],VSe=["[main]","[sidebar]"],aQ=(()=>{class n{constructor(e,i){this.store=e,this.runsTableFullScreen$=this.store.select(Lh),this.width$=this.store.select(CS).pipe(Li(this.runsTableFullScreen$),N(([r,o])=>o?100:r)),this.ngUnsubscribe=new Ie,this.resizing=!1,this.MINIMUM_SIDEBAR_WIDTH_IN_PX=75,mi(i.nativeElement,"mousemove").pipe(ot(this.ngUnsubscribe),ke(()=>this.resizing)).subscribe(r=>{if((r.buttons&ga.LEFT)!==ga.LEFT)return void(this.resizing=!1);r.preventDefault();let{width:o}=i.nativeElement.getBoundingClientRect();this.store.dispatch(kh({widthInPercent:r.clientX<=this.MINIMUM_SIDEBAR_WIDTH_IN_PX?0:r.clientX/o*100}))}),mi(i.nativeElement,"mouseup",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(()=>{this.resizing=!1})}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}resizeGrabbed(){this.resizing=!0}expandSidebar(){this.store.dispatch(kh({widthInPercent:20}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Me))},n.\u0275cmp=O({type:n,selectors:[["tb-dashboard-layout"]],ngContentSelectors:VSe,decls:7,vars:9,consts:[["class","expand",3,"click",4,"ngIf"],["class","sidebar",3,"width","minWidth","maxWidth",4,"ngIf"],["class","resizer",3,"mousedown",4,"ngIf"],[1,"expand",3,"click"],["svgIcon","expand_more_24px"],[1,"sidebar"],[1,"resizer",3,"mousedown"]],template:function(e,i){1&e&&(Dn(BSe),S(0,FSe,2,0,"button",0),j(1,"async"),S(2,NSe,4,10,"nav",1),j(3,"async"),S(4,LSe,1,0,"div",2),j(5,"async"),zt(6)),2&e&&(_("ngIf",0===W(1,3,i.width$)),v(2),_("ngIf",W(3,5,i.width$)>0),v(2),_("ngIf",W(5,7,i.width$)>0))},dependencies:[Fe,En,ct],styles:["[_nghost-%COMP%]{display:flex;flex-direction:row;height:100%;width:100%;position:relative}.sidebar[_ngcontent-%COMP%]{max-width:80vw}.resizer[_ngcontent-%COMP%], .expand[_ngcontent-%COMP%]{border-color:#ebebeb;box-sizing:border-box;flex:0 0;justify-self:stretch}body.dark-mode[_nghost-%COMP%]   .resizer[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]{border-color:#555}body.dark-mode[_nghost-%COMP%]   .expand[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .expand[_ngcontent-%COMP%]{border-color:#555}.expand[_ngcontent-%COMP%]{width:20px}.resizer[_ngcontent-%COMP%]{align-items:center;border-style:solid;border-width:0 2px;cursor:ew-resize;contain:strict;display:flex;justify-self:stretch}.resizer[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:100%}.resizer[_ngcontent-%COMP%]:hover{border-color:#ccc;outline:3px solid #ccc;z-index:1}body.dark-mode[_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]:hover, body.dark-mode   [_nghost-%COMP%]   .resizer[_ngcontent-%COMP%]:hover{outline-color:#777;border-color:#777}.expand[_ngcontent-%COMP%]{align-items:center;background:rgba(0,0,0,0);border-style:solid;border-width:0 1px 0 0;color:inherit;contain:content;cursor:pointer;display:flex;justify-self:stretch;padding:0}.expand[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:center}"],changeDetection:0}),n})(),AN=new WeakMap,xy=class{constructor(t,e){this.root=t,this.buffer=e,this.destroyedTargets=new WeakSet}initialize(t){if(this.intersectionObserver)return;this.intersectionCallback=t;let e={threshold:0,root:this.root??null};this.buffer&&(e.rootMargin=this.buffer),this.intersectionObserver=new IntersectionObserver(this.onCardIntersection.bind(this),e)}add(t){this.ensureInitialized()&&this.intersectionObserver.observe(t)}willDestroy(t){this.ensureInitialized()&&this.destroyedTargets.add(t)}ensureInitialized(){if(!this.intersectionObserver)throw new Error("CardObserver must be initialized before use");return!0}onCardIntersection(t){t.sort((r,o)=>r.time-o.time);let e=new Set,i=new Set;for(let{isIntersecting:r,target:o}of t)r?(e.add(o),i.delete(o)):(e.delete(o),i.add(o)),this.destroyedTargets.has(o)&&!r&&(this.destroyedTargets.delete(o),this.intersectionObserver.unobserve(o));this.intersectionCallback(e,i)}onCardIntersectionForTest(t){this.onCardIntersection(t)}},lQ=(()=>{class n{constructor(e,i){this.host=e,this.store=i}onCardIntersection(e,i){let r=[...e].map(s=>{let a=AN.get(s);if(!a)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:a.elementId,cardId:a.cardId}}),o=[...i].map(s=>{let a=AN.get(s);if(!a)throw new Error("A CardObserver element must have an associated element id and card id.");return{elementId:a.elementId,cardId:a.cardId}});this.store.dispatch(Vg({enteredCards:r,exitedCards:o}))}ngOnInit(){let e=this.host.nativeElement;AN.set(e,{elementId:(oQ++,Symbol(oQ)),cardId:this.cardId}),this.cardObserver||(this.cardObserver=new xy),this.cardObserver.initialize(this.onCardIntersection.bind(this)),this.cardObserver.add(e)}ngOnDestroy(){this.cardObserver&&this.cardObserver.willDestroy(this.host.nativeElement)}hostForTest(){return this.host}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Ae))},n.\u0275dir=we({type:n,selectors:[["","cardLazyLoader",""]],inputs:{cardId:["cardLazyLoader","cardId"],cardObserver:"cardObserver"}}),n})();function USe(n,t){1&n&&(Ot(0),zt(1),kt())}var jSe=["*"],cQ=(()=>{class n{constructor(e,i){this.viewContainerRef=e,this.componentFactoryResolver=i}ngOnInit(){if(this.customizableComponent){let e=this.componentFactoryResolver.resolveComponentFactory(this.customizableComponent.constructor);this.viewContainerRef.createComponent(e)}}}return n.\u0275fac=function(e){return new(e||n)(C(si),C(fo))},n.\u0275cmp=O({type:n,selectors:[["tb-customization"]],inputs:{customizableComponent:"customizableComponent"},ngContentSelectors:jSe,decls:1,vars:1,consts:[[4,"ngIf"]],template:function(e,i){1&e&&(Dn(),S(0,USe,2,0,"ng-container",0)),2&e&&_("ngIf",!i.customizableComponent)},dependencies:[Fe],encapsulation:2}),n})(),WSe=["button"],qSe=["*"],dQ=new ie("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS"),uQ=new ie("MatButtonToggleGroup"),YSe={provide:Mo,useExisting:$n(()=>RN),multi:!0},pQ=0,BT=class{constructor(t,e){this.source=t,this.value=e}},RN=(()=>{class n{get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}get vertical(){return this._vertical}set vertical(e){this._vertical=Rt(e)}get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(i=>i.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=Rt(e),this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._markButtonsForCheck()}constructor(e,i){this._changeDetector=e,this._vertical=!1,this._multiple=!1,this._disabled=!1,this._controlValueAccessorChangeFn=()=>{},this._onTouched=()=>{},this._name="mat-button-toggle-group-"+pQ++,this.valueChange=new F,this.change=new F,this.appearance=i&&i.appearance?i.appearance:"standard"}ngOnInit(){this._selectionModel=new dg(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked))}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_emitChangeEvent(e){let i=new BT(e,this.value);this._controlValueAccessorChangeFn(i.value),this.change.emit(i)}_syncButtonToggle(e,i,r=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?i?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,r)):this._updateModelValue(e,r)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return!(typeof this._rawValue>"u")&&(this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(i=>null!=e.value&&i===e.value):e.value===this._rawValue)}_setSelectionByValue(e){this._rawValue=e,this._buttonToggles&&(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(i=>this._selectValue(i))):(this._clearSelection(),this._selectValue(e)))}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>e.checked=!1)}_selectValue(e){let i=this._buttonToggles.find(r=>null!=r.value&&r.value===e);i&&(i.checked=!0,this._selectionModel.select(i))}_updateModelValue(e,i){i&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}}return n.\u0275fac=function(e){return new(e||n)(C($t),C(dQ,8))},n.\u0275dir=we({type:n,selectors:[["mat-button-toggle-group"]],contentQueries:function(e,i,r){if(1&e&&Ti(r,QSe,5),2&e){let o;Se(o=Ee())&&(i._buttonToggles=o)}},hostAttrs:["role","group",1,"mat-button-toggle-group"],hostVars:5,hostBindings:function(e,i){2&e&&(Be("aria-disabled",i.disabled),nt("mat-button-toggle-vertical",i.vertical)("mat-button-toggle-group-appearance-standard","standard"===i.appearance))},inputs:{appearance:"appearance",name:"name",vertical:"vertical",value:"value",multiple:"multiple",disabled:"disabled"},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[Qt([YSe,{provide:uQ,useExisting:n}])]}),n})(),XSe=us(class{}),QSe=(()=>{class n extends XSe{get buttonId(){return`${this.id}-button`}get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){let i=Rt(e);i!==this._checked&&(this._checked=i,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=Rt(e)}constructor(e,i,r,o,s,a){super(),this._changeDetectorRef=i,this._elementRef=r,this._focusMonitor=o,this._checked=!1,this.ariaLabelledby=null,this._disabled=!1,this.change=new F;let l=Number(s);this.tabIndex=l||0===l?l:null,this.buttonToggleGroup=e,this.appearance=a&&a.appearance?a.appearance:"standard"}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||"mat-button-toggle-"+pQ++,e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){let e=!!this._isSingleSelector()||!this._checked;e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.change.emit(new BT(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this._isSingleSelector()?this.buttonToggleGroup.name:this.name||null}_isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}}return n.\u0275fac=function(e){return new(e||n)(C(uQ,8),C($t),C(Me),C(Xr),yo("tabindex"),C(dQ,8))},n.\u0275cmp=O({type:n,selectors:[["mat-button-toggle"]],viewQuery:function(e,i){if(1&e&&Ge(WSe,5),2&e){let r;Se(r=Ee())&&(i._buttonElement=r.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:12,hostBindings:function(e,i){1&e&&I("focus",function(){return i.focus()}),2&e&&(Be("aria-label",null)("aria-labelledby",null)("id",i.id)("name",null),nt("mat-button-toggle-standalone",!i.buttonToggleGroup)("mat-button-toggle-checked",i.checked)("mat-button-toggle-disabled",i.disabled)("mat-button-toggle-appearance-standard","standard"===i.appearance))},inputs:{disableRipple:"disableRipple",ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",appearance:"appearance",checked:"checked",disabled:"disabled"},outputs:{change:"change"},exportAs:["matButtonToggle"],features:[Ke],ngContentSelectors:qSe,decls:6,vars:9,consts:[["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"id","disabled","click"],["button",""],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"]],template:function(e,i){if(1&e&&(Dn(),h(0,"button",0,1),I("click",function(){return i._onButtonClick()}),h(2,"span",2),zt(3),g()(),P(4,"span",3)(5,"span",4)),2&e){let r=it(1);_("id",i.buttonId)("disabled",i.disabled||null),Be("tabindex",i.disabled?-1:i.tabIndex)("aria-pressed",i.checked)("name",i._getButtonName())("aria-label",i.ariaLabel)("aria-labelledby",i.ariaLabelledby),v(5),_("matRippleTrigger",r)("matRippleDisabled",i.disableRipple||i.disabled)}},dependencies:[mo],styles:[".mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;border-radius:2px;-webkit-tap-highlight-color:rgba(0,0,0,0);transform:translateZ(0)}.cdk-high-contrast-active .mat-button-toggle-standalone,.cdk-high-contrast-active .mat-button-toggle-group{outline:solid 1px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:4px}.cdk-high-contrast-active .mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.cdk-high-contrast-active .mat-button-toggle-group-appearance-standard{outline:0}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:1}.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{opacity:.04}.mat-button-toggle-appearance-standard.cdk-keyboard-focused:not(.mat-button-toggle-disabled) .mat-button-toggle-focus-overlay{opacity:.12}@media(hover: none){.mat-button-toggle-appearance-standard:not(.mat-button-toggle-disabled):hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;line-height:36px;padding:0 16px;position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0}.cdk-high-contrast-active .mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 36px;opacity:.5;height:0}.cdk-high-contrast-active .mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.cdk-high-contrast-active .mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}"],encapsulation:2,changeDetection:0}),n})(),VT=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Bl,fn]}),n})(),KSe=["determinateSpinner"];function JSe(n,t){if(1&n&&(Nn(),h(0,"svg",11),P(1,"circle",12),g()),2&n){let e=w();Be("viewBox",e._viewBox()),v(1),Tt("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),Be("r",e._circleRadius())}}var $Se=zs(class{constructor(n){this._elementRef=n}},"primary"),e1e=new ie("mat-progress-spinner-default-options",{providedIn:"root",factory:function(){return{diameter:fQ}}}),fQ=100,tl=(()=>{class n extends $Se{constructor(e,i,r){super(e),this.mode="mat-spinner"===this._elementRef.nativeElement.nodeName.toLowerCase()?"indeterminate":"determinate",this._value=0,this._diameter=fQ,this._noopAnimations="NoopAnimations"===i&&!!r&&!r._forceAnimations,r&&(r.color&&(this.color=this.defaultColor=r.color),r.diameter&&(this.diameter=r.diameter),r.strokeWidth&&(this.strokeWidth=r.strokeWidth))}get value(){return"determinate"===this.mode?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,_i(e)))}get diameter(){return this._diameter}set diameter(e){this._diameter=_i(e)}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=_i(e)}_circleRadius(){return(this.diameter-10)/2}_viewBox(){let e=2*this._circleRadius()+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return"determinate"===this.mode?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(hi,8),C(e1e))},n.\u0275cmp=O({type:n,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(e,i){if(1&e&&Ge(KSe,5),2&e){let r;Se(r=Ee())&&(i._determinateCircle=r.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:12,hostBindings:function(e,i){2&e&&(Be("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow","determinate"===i.mode?i.value:null)("mode",i.mode),Tt("width",i.diameter,"px")("height",i.diameter,"px"),nt("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate","indeterminate"===i.mode))},inputs:{color:"color",mode:"mode",value:"value",diameter:"diameter",strokeWidth:"strokeWidth"},exportAs:["matProgressSpinner"],features:[Ke],decls:14,vars:11,consts:[["circle",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["determinateSpinner",""],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(e,i){if(1&e&&(S(0,JSe,2,8,"ng-template",null,0,Wt),h(2,"div",1,2),Nn(),h(4,"svg",3),P(5,"circle",4),g()(),Oo(),h(6,"div",5)(7,"div",6)(8,"div",7),li(9,8),g(),h(10,"div",9),li(11,8),g(),h(12,"div",10),li(13,8),g()()()),2&e){let r=it(1);v(4),Be("viewBox",i._viewBox()),v(1),Tt("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Be("r",i._circleRadius()),v(4),_("ngTemplateOutlet",r),v(2),_("ngTemplateOutlet",r),v(2),_("ngTemplateOutlet",r)}},dependencies:[Lr],styles:["@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-color-1-fade-in-out{from{opacity:.99}25%{opacity:.99}26%{opacity:0}89%{opacity:0}90%{opacity:.99}to{opacity:.99}}@keyframes mdc-circular-progress-color-2-fade-in-out{from{opacity:0}15%{opacity:0}25%{opacity:.99}50%{opacity:.99}51%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-3-fade-in-out{from{opacity:0}40%{opacity:0}50%{opacity:.99}75%{opacity:.99}76%{opacity:0}to{opacity:0}}@keyframes mdc-circular-progress-color-4-fade-in-out{from{opacity:0}65%{opacity:0}75%{opacity:.99}90%{opacity:.99}to{opacity:0}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}.mdc-circular-progress{display:inline-flex;position:relative;direction:ltr;line-height:0;transition:opacity 250ms 0ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms 0ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-1{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-1-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-2{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-2-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-3{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-3-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__color-4{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both,mdc-circular-progress-color-4-fade-in-out 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--closed{opacity:0}.mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, transparent)}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-1 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-2 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-3 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}@media screen and (forced-colors: active),(-ms-high-contrast: active){.mat-mdc-progress-spinner .mdc-circular-progress--four-color .mdc-circular-progress__color-4 .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}"],encapsulation:2,changeDetection:0}),n})(),nl=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,fn]}),n})();function i1e(n,t){if(1&n&&(h(0,"b"),T(1),g()),2&n){let e=w().$implicit;v(1),He("",e.displayAlias,":")}}function r1e(n,t){if(1&n&&(h(0,"mat-option",2)(1,"span",3),S(2,i1e,2,1,"b",4),T(3),g()()),2&n){let e=t.$implicit;_("value",e.value)("disabled",e.disabled),v(1),UM("title","",e.displayAlias,": ",e.displayText,""),v(1),_("ngIf",e.displayAlias),v(1),He(" ",e.displayText," ")}}var mQ=(()=>{class n{constructor(){this.value="",this.options=[],this.selectionChange=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-dropdown"]],inputs:{value:"value",options:"options"},outputs:{selectionChange:"selectionChange"},decls:2,vars:3,consts:[[3,"value","hideSingleSelectionIndicator","selectionChange"],[3,"value","disabled",4,"ngFor","ngForOf"],[3,"value","disabled"],[1,"option-content",3,"title"],[4,"ngIf"]],template:function(e,i){1&e&&(h(0,"mat-select",0),I("selectionChange",function(o){return i.selectionChange.emit(o.value)}),S(1,r1e,4,6,"mat-option",1),g()),2&e&&(_("value",i.value)("hideSingleSelectionIndicator",!0),v(1),_("ngForOf",i.options))},dependencies:[nn,Fe,zu,Us],styles:["mat-select[_ngcontent-%COMP%]{border:1px solid #8e98a3;border-radius:3px;box-sizing:border-box;padding:6px;font-size:12px;line-height:normal}mat-select[_ngcontent-%COMP%]     .mat-mdc-select-arrow-wrapper{height:12px}mat-select[_ngcontent-%COMP%]:focus{outline-color:-webkit-focus-ring-color;outline-style:auto}  .mat-mdc-select-panel{max-width:70vw}  mat-option.mat-mdc-option{min-height:32px;font-size:12px}"]}),n})(),s1e=function(n){return{"column-edit-menu-toggle":!0,"toggle-opened":n}};function a1e(n,t){if(1&n){let e=ge();h(0,"button",31),I("click",function(){return X(e),Q(w().onSlideOutToggled.emit())}),P(1,"mat-icon",32),T(2," Edit Table Columns "),g()}if(2&n){let e=w();_("ngClass",In(1,s1e,e.isSlideOutMenuOpen))}}function l1e(n,t){if(1&n){let e=ge();h(0,"section",33)(1,"h3",1),T(2,"Images"),g(),h(3,"div",34)(4,"div",35),T(5,"Brightness"),g(),h(6,"div",13)(7,"mat-slider",36),I("input",function(r){return X(e),Q(w().imageBrightnessSliderChanged$.emit(r.value))}),g(),h(8,"button",37),I("click",function(){return X(e),Q(w().imageBrightnessReset.emit())}),P(9,"mat-icon",16),g()()(),h(10,"div",38)(11,"div",39),T(12,"Contrast"),g(),h(13,"div",13)(14,"mat-slider",40),I("input",function(r){return X(e),Q(w().imageContrastSliderChanged$.emit(r.value))}),g(),h(15,"button",41),I("click",function(){return X(e),Q(w().imageContrastReset.emit())}),P(16,"mat-icon",16),g()()(),h(17,"div",42)(18,"mat-checkbox",25),I("change",function(r){return X(e),Q(w().imageShowActualSizeChanged.emit(r.checked))}),T(19,"Show actual image size"),g()()()}if(2&n){let e=w();v(7),_("max",2e3)("min",0)("step",10)("value",e.imageBrightnessInMilli)("thumbLabel",!0)("displayWith",e.formatMilliToZeroth),v(7),_("max",5e3)("min",0)("step",10)("value",e.imageContrastInMilli)("thumbLabel",!0)("displayWith",e.formatMilliToZeroth),v(4),_("checked",e.imageShowActualSize)}}var gQ=(()=>{class n{constructor(e){this.locale=e,this.linkedTimeToggled=new F,this.stepSelectorToggled=new F,this.rangeSelectionToggled=new F,this.onSlideOutToggled=new F,this.TooltipSortDropdownOptions=[{value:oo.ALPHABETICAL,displayText:"Alphabetical"},{value:oo.ASCENDING,displayText:"Ascending"},{value:oo.DESCENDING,displayText:"Descending"},{value:oo.NEAREST,displayText:"Nearest Pixel"},{value:oo.NEAREST_Y,displayText:"Nearest Y"}],this.tooltipSortChanged=new F,this.ignoreOutliersChanged=new F,this.XAxisType=Pi,this.XAxisTypeDropdownOptions=[{value:Pi.STEP,displayText:"Step"},{value:Pi.RELATIVE,displayText:"Relative"},{value:Pi.WALL_TIME,displayText:"Wall"}],this.xAxisTypeChanged=new F,this.MAX_CARD_WIDTH_SLIDER_VALUE=735,this.MIN_CARD_WIDTH_SLIDER_VALUE=335,this.cardWidthSliderChanged$=new F,this.cardWidthChanged=this.cardWidthSliderChanged$.pipe(sc(250)),this.cardWidthReset=new F,this.HistogramModeDropdownOptions=[{value:Dr.OFFSET,displayText:"Offset"},{value:Dr.OVERLAY,displayText:"Overlay"}],this.histogramModeChanged=new F,this.MAX_SMOOTHING_VALUE=.999,this.MAX_SMOOTHING_SLIDER_VALUE=.99,this.scalarSmoothingControlChanged$=new F,this.scalarSmoothingChanged=this.scalarSmoothingControlChanged$.pipe(sc(250)),this.scalarPartitionXToggled=new F,this.imageBrightnessSliderChanged$=new F,this.imageBrightnessInMilliChanged=this.imageBrightnessSliderChanged$.pipe(sc(250)),this.imageBrightnessReset=new F,this.imageContrastSliderChanged$=new F,this.imageContrastInMilliChanged=this.imageContrastSliderChanged$.pipe(sc(250)),this.imageContrastReset=new F,this.imageShowActualSizeChanged=new F}onScalarSmoothingInput(e){let i=e.target;if(!i.value)return;let r=Math.min(Math.max(0,parseFloat(i.value)),.999);r!==parseFloat(i.value)&&(i.value=String(r)),this.scalarSmoothingControlChanged$.emit(r)}formatMilliToZeroth(e){return $O(e/1e3,this.locale||"en-US","1.0-2")}getLinkedTimeSelectionStartStep(){return this.isLinkedTimeEnabled||null===this.linkedTimeSelection||null!==this.linkedTimeSelection.end?"":this.linkedTimeSelection.start.step}isAxisTypeStep(){return this.xAxisType===Pi.STEP}}return n.\u0275fac=function(e){return new(e||n)(C(cd))},n.\u0275cmp=O({type:n,selectors:[["metrics-dashboard-settings-component"]],inputs:{isLinkedTimeEnabled:"isLinkedTimeEnabled",isScalarStepSelectorEnabled:"isScalarStepSelectorEnabled",isScalarStepSelectorRangeEnabled:"isScalarStepSelectorRangeEnabled",isScalarColumnCustomizationEnabled:"isScalarColumnCustomizationEnabled",linkedTimeSelection:"linkedTimeSelection",stepMinMax:"stepMinMax",isSlideOutMenuOpen:"isSlideOutMenuOpen",isImageSupportEnabled:"isImageSupportEnabled",tooltipSort:"tooltipSort",ignoreOutliers:"ignoreOutliers",xAxisType:"xAxisType",cardMinWidth:"cardMinWidth",histogramMode:"histogramMode",scalarSmoothing:"scalarSmoothing",scalarPartitionX:"scalarPartitionX",imageBrightnessInMilli:"imageBrightnessInMilli",imageContrastInMilli:"imageContrastInMilli",imageShowActualSize:"imageShowActualSize"},outputs:{linkedTimeToggled:"linkedTimeToggled",stepSelectorToggled:"stepSelectorToggled",rangeSelectionToggled:"rangeSelectionToggled",onSlideOutToggled:"onSlideOutToggled",tooltipSortChanged:"tooltipSortChanged",ignoreOutliersChanged:"ignoreOutliersChanged",xAxisTypeChanged:"xAxisTypeChanged",cardWidthChanged:"cardWidthChanged",cardWidthReset:"cardWidthReset",histogramModeChanged:"histogramModeChanged",scalarSmoothingChanged:"scalarSmoothingChanged",scalarPartitionXToggled:"scalarPartitionXToggled",imageBrightnessInMilliChanged:"imageBrightnessInMilliChanged",imageBrightnessReset:"imageBrightnessReset",imageContrastInMilliChanged:"imageContrastInMilliChanged",imageContrastReset:"imageContrastReset",imageShowActualSizeChanged:"imageShowActualSizeChanged"},decls:54,vars:30,consts:function(){let t,e,i;return t=$localize`:A button to reset the card width setting␟ccdc96b003fbba90db7a6959b5b26e3cc58f7d80␟5223111047968102466:Reset card width`,e=$localize`:A button to reset the image brightness setting␟c482b3a47ea0975fa8be01afb3fbec9b76628bd7␟1189161857240378395:Reset brightness`,i=$localize`:A button to reset the image contrast setting␟ed712a8b927041be15252b29eb521ebb1374bad8␟5370703342923611955:Reset contrast`,[[1,"general"],[1,"section-title"],[1,"control-row","x-axis-type"],["id","x-axis-type-label",1,"control-name"],[3,"value","options","selectionChange"],[1,"control-row","scalars-step-selector",3,"title"],[3,"checked","disabled","change"],[1,"indent"],[1,"indent","range-selection"],[1,"control-row","linked-time","indent"],["mat-button","",3,"ngClass","click",4,"ngIf"],[1,"control-row","card-width"],["id","card-width-label",1,"control-name"],[1,"slider-row"],["aria-labelledby","card-width-label","color","primary",3,"max","min","step","value","thumbLabel","input"],["mat-icon-button","","aria-label",t,"title","Reset card width",1,"reset-button",3,"click"],["svgIcon","settings_backup_restore_24px"],[1,"scalars"],[1,"control-row","scalars-smoothing"],["id","scalars-smoothing-label",1,"control-name"],["aria-labelledby","scalars-smoothing-label","color","primary",3,"max","min","step","value","thumbLabel","input"],["aria-labelledby","scalars-smoothing-label","type","number","min","0","step","0.001",1,"slider-input",3,"max","value","input"],[1,"control-row","tooltip-sort"],[1,"control-name"],[1,"control-row","scalars-ignore-outliers"],[3,"checked","change"],[1,"control-row","scalars-partition-x"],["svgIcon","help_outline_24px","title","Non-monotonic steps can occur when reusing a logdir with multiple summary writers and overlapping steps. Line charts, without this option enabled, can appear zig zagged. This is common when restarting from a checkpoint.\n\nWhen enabled, a non-monotonic time series composed of N monotonic pieces will be shown as N monotonic lines.",1,"info"],[1,"Histograms"],[1,"control-row","histogram-mode"],["class","image",4,"ngIf"],["mat-button","",3,"ngClass","click"],["svgIcon","edit_24px"],[1,"image"],[1,"control-row","image-brightness"],["id","image-brightness-label",1,"control-name"],["aria-labelledby","image-brightness-label","color","primary",3,"max","min","step","value","thumbLabel","displayWith","input"],["mat-icon-button","","aria-label",e,"title","Reset brightness",1,"reset-button",3,"click"],[1,"control-row","image-contrast"],["id","image-constrast-label",1,"control-name"],["aria-labelledby","image-constrast-label","color","primary",3,"max","min","step","value","thumbLabel","displayWith","input"],["mat-icon-button","","aria-label",i,"title","Reset contrast",1,"reset-button",3,"click"],[1,"control-row","image-show-actual-size"]]},template:function(e,i){1&e&&(h(0,"section",0)(1,"h3",1),T(2,"General"),g(),h(3,"div",2)(4,"div",3),T(5,"Horizontal Axis"),g(),h(6,"tb-dropdown",4),I("selectionChange",function(o){return i.xAxisTypeChanged.emit(o)}),g()(),h(7,"div",5)(8,"mat-checkbox",6),I("change",function(){return i.stepSelectorToggled.emit()}),T(9,"Enable step selection and data table "),g(),h(10,"span",7),T(11,"(Scalars only)"),g(),h(12,"div",8)(13,"mat-checkbox",6),I("change",function(){return i.rangeSelectionToggled.emit()}),T(14,"Enable Range Selection "),g()(),h(15,"div",9)(16,"mat-checkbox",6),I("change",function(){return i.linkedTimeToggled.emit()}),T(17),g()(),S(18,a1e,3,3,"button",10),g(),h(19,"div",11)(20,"div",12),T(21,"Card Width"),g(),h(22,"div",13)(23,"mat-slider",14),I("input",function(o){return i.cardWidthSliderChanged$.emit(o.value)}),g(),h(24,"button",15),I("click",function(){return i.cardWidthReset.emit()}),P(25,"mat-icon",16),g()()()(),h(26,"section",17)(27,"h3",1),T(28,"Scalars"),g(),h(29,"div",18)(30,"div",19),T(31,"Smoothing"),g(),h(32,"div",13)(33,"mat-slider",20),I("input",function(o){return i.scalarSmoothingControlChanged$.emit(o.value)}),g(),h(34,"input",21),I("input",function(o){return i.onScalarSmoothingInput(o)}),g()()(),h(35,"div",22)(36,"div",23),T(37,"Tooltip sorting method"),g(),h(38,"tb-dropdown",4),I("selectionChange",function(o){return i.tooltipSortChanged.emit(o)}),g()(),h(39,"div",24)(40,"mat-checkbox",25),I("change",function(o){return i.ignoreOutliersChanged.emit(o.checked)}),T(41,"Ignore outliers in chart scaling"),g()(),h(42,"div",26)(43,"mat-checkbox",25),I("change",function(){return i.scalarPartitionXToggled.emit()}),T(44,"Partition non-monotonic X axis"),g(),P(45,"mat-icon",27),g()(),h(46,"section",28)(47,"h3",1),T(48,"Histograms"),g(),h(49,"div",29)(50,"div",23),T(51,"Mode"),g(),h(52,"tb-dropdown",4),I("selectionChange",function(o){return i.histogramModeChanged.emit(o)}),g()()(),S(53,l1e,20,13,"section",30)),2&e&&(v(6),_("value",i.xAxisType)("options",i.XAxisTypeDropdownOptions),v(1),_("title",i.isAxisTypeStep()?"":"Only available when Horizontal Axis is set to step"),v(1),_("checked",i.isScalarStepSelectorEnabled)("disabled",!i.isAxisTypeStep()),v(5),_("checked",i.isScalarStepSelectorRangeEnabled)("disabled",!i.isAxisTypeStep()),v(3),_("checked",i.isLinkedTimeEnabled)("disabled",!i.isAxisTypeStep()),v(1),He("Link by step ",i.getLinkedTimeSelectionStartStep()," "),v(1),_("ngIf",i.isScalarColumnCustomizationEnabled),v(5),_("max",i.MAX_CARD_WIDTH_SLIDER_VALUE)("min",i.MIN_CARD_WIDTH_SLIDER_VALUE)("step",50)("value",i.cardMinWidth)("thumbLabel",!1),v(10),_("max",i.MAX_SMOOTHING_SLIDER_VALUE)("min",0)("step",.01)("value",i.scalarSmoothing)("thumbLabel",!0),v(1),_("max",i.MAX_SMOOTHING_VALUE)("value",i.scalarSmoothing),v(4),_("value",i.tooltipSort)("options",i.TooltipSortDropdownOptions),v(2),_("checked",i.ignoreOutliers),v(3),_("checked",i.scalarPartitionX),v(9),_("value",i.histogramMode)("options",i.HistogramModeDropdownOptions),v(1),_("ngIf",i.isImageSupportEnabled))},dependencies:[yn,Fe,mQ,Ji,$i,ha,En,Dd],styles:["[_nghost-%COMP%]{color:#616161;font-size:12px}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}section[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;padding:16px}body.dark-mode[_nghost-%COMP%]   section[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   section[_ngcontent-%COMP%]{border-bottom:1px solid #555}.section-title[_ngcontent-%COMP%]{color:#212121;text-transform:uppercase;font-weight:500;font-size:13px;line-height:normal;margin:0 0 12px 0}body.dark-mode[_nghost-%COMP%]   .section-title[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .section-title[_ngcontent-%COMP%]{color:#fff}section[_ngcontent-%COMP%]   .control-row[_ngcontent-%COMP%]:not(:has( + .control-row[_ngcontent-%COMP%] > mat-checkbox))[_ngcontent-%COMP%]:not(:last-child){margin-bottom:12px}.control-name[_ngcontent-%COMP%]{margin-bottom:8px}.slider-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:28px}.slider-row[_ngcontent-%COMP%]   .reset-button[_ngcontent-%COMP%]{margin-left:6px}.slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{background-color:inherit;border:1px solid #8e98a3;border-radius:2px;box-sizing:border-box;color:inherit;height:100%;margin-left:12px;padding:0 4px}body.dark-mode[_nghost-%COMP%]   .slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-row[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{border-color:#425066}.scalars-smoothing[_ngcontent-%COMP%]   .slider-input[_ngcontent-%COMP%]{flex:none;width:5em}.scalars-partition-x[_ngcontent-%COMP%]{align-items:center;display:flex}.scalars-partition-x[_ngcontent-%COMP%]   .info[_ngcontent-%COMP%]{height:15px;margin-left:5px;width:15px;min-width:15px}mat-checkbox[_ngcontent-%COMP%]{margin-left:-11px}mat-checkbox[_ngcontent-%COMP%]     label{color:#616161;font-size:12px;letter-spacing:normal;padding-left:0px;white-space:nowrap}body.dark-mode[_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label, body.dark-mode   [_nghost-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label{color:rgba(255,255,255,.7)}mat-slider[_ngcontent-%COMP%]{flex:1;margin-left:-8px;margin-right:-8px}.column-edit-menu-toggle[_ngcontent-%COMP%]{align-items:center;display:flex;cursor:pointer;font-size:inherit;height:28px;padding-left:5px;padding-right:12px}.column-edit-menu-toggle.mat-button-wrapper[_ngcontent-%COMP%]{display:inline-flex;align-items:center}.column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%]{background-color:#eee}body.dark-mode[_nghost-%COMP%]   .column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .column-edit-menu-toggle.toggle-opened[_ngcontent-%COMP%]{background-color:#424242}.column-edit-menu-toggle[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:6px}tb-dropdown[_ngcontent-%COMP%]{display:block}.control-row[_ngcontent-%COMP%]   .indent[_ngcontent-%COMP%]{margin-left:28px}"],changeDetection:0}),n})(),_Q=(()=>{class n{constructor(e){this.store=e,this.isScalarStepSelectorEnabled$=this.store.select(xv),this.isScalarStepSelectorRangeEnabled$=this.store.select(Su),this.isLinkedTimeEnabled$=this.store.select(wu),this.isScalarColumnCustomizationEnabled$=this.store.select(dS),this.linkedTimeSelection$=this.store.select(XF),this.stepMinMax$=this.store.select(YF),this.isSlideOutMenuOpen$=this.store.select(l1),this.isImageSupportEnabled$=this.store.select(vu).pipe(ke(Boolean),Yt(1),Bt(this.store.select(cS)),N(([,i])=>i)),this.tooltipSort$=this.store.select(hf),this.ignoreOutliers$=this.store.select(gf),this.xAxisType$=this.store.select(Ol),this.cardMinWidth$=this.store.select(Xh),this.histogramMode$=this.store.select(t1),this.scalarSmoothing$=this.store.select(bd),this.scalarPartitionX$=this.store.select(n1),this.imageBrightnessInMilli$=this.store.select(i1),this.imageContrastInMilli$=this.store.select(r1),this.imageShowActualSize$=this.store.select(o1)}onTooltipSortChanged(e){this.store.dispatch(mT({sort:e}))}onIgnoreOutliersChanged(){this.store.dispatch(hT())}onXAxisTypeChanged(e){this.store.dispatch(gT({xAxisType:e}))}onCardWidthChanged(e){this.store.dispatch(_T({cardMinWidth:e}))}onCardWidthReset(){this.store.dispatch(bT())}onHistogramModeChanged(e){this.store.dispatch(ET({histogramMode:e}))}onScalarSmoothingChanged(e){this.store.dispatch(vT({smoothing:e}))}onScalarPartitionXToggled(){this.store.dispatch(yT())}onImageBrightnessInMilliChanged(e){this.store.dispatch(xT({brightnessInMilli:e}))}onImageBrightnessReset(){this.store.dispatch(MT())}onImageContrastReset(){this.store.dispatch(wT())}onImageContrastInMilliChanged(e){this.store.dispatch(CT({contrastInMilli:e}))}onImageShowActualSizeChanged(){this.store.dispatch(ST())}onLinkedTimeToggled(){this.store.dispatch(FT({affordance:Ys.CHECK_BOX}))}onStepSelectorToggled(){this.store.dispatch(Id({affordance:Ys.CHECK_BOX}))}onRangeSelectionToggled(){this.store.dispatch(NT({affordance:Ys.CHECK_BOX}))}onSlideOutToggled(){this.store.dispatch(sT())}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-dashboard-settings"]],decls:19,vars:54,consts:[[3,"isImageSupportEnabled","tooltipSort","ignoreOutliers","xAxisType","cardMinWidth","histogramMode","scalarSmoothing","scalarPartitionX","imageBrightnessInMilli","imageContrastInMilli","imageShowActualSize","isScalarStepSelectorEnabled","isScalarStepSelectorRangeEnabled","isLinkedTimeEnabled","isScalarColumnCustomizationEnabled","linkedTimeSelection","stepMinMax","isSlideOutMenuOpen","tooltipSortChanged","ignoreOutliersChanged","xAxisTypeChanged","cardWidthChanged","cardWidthReset","histogramModeChanged","scalarSmoothingChanged","scalarPartitionXToggled","imageBrightnessInMilliChanged","imageBrightnessReset","imageContrastInMilliChanged","imageContrastReset","imageShowActualSizeChanged","linkedTimeToggled","stepSelectorToggled","rangeSelectionToggled","onSlideOutToggled"]],template:function(e,i){1&e&&(h(0,"metrics-dashboard-settings-component",0),I("tooltipSortChanged",function(o){return i.onTooltipSortChanged(o)})("ignoreOutliersChanged",function(){return i.onIgnoreOutliersChanged()})("xAxisTypeChanged",function(o){return i.onXAxisTypeChanged(o)})("cardWidthChanged",function(o){return i.onCardWidthChanged(o)})("cardWidthReset",function(){return i.onCardWidthReset()})("histogramModeChanged",function(o){return i.onHistogramModeChanged(o)})("scalarSmoothingChanged",function(o){return i.onScalarSmoothingChanged(o)})("scalarPartitionXToggled",function(){return i.onScalarPartitionXToggled()})("imageBrightnessInMilliChanged",function(o){return i.onImageBrightnessInMilliChanged(o)})("imageBrightnessReset",function(){return i.onImageBrightnessReset()})("imageContrastInMilliChanged",function(o){return i.onImageContrastInMilliChanged(o)})("imageContrastReset",function(){return i.onImageContrastReset()})("imageShowActualSizeChanged",function(){return i.onImageShowActualSizeChanged()})("linkedTimeToggled",function(){return i.onLinkedTimeToggled()})("stepSelectorToggled",function(){return i.onStepSelectorToggled()})("rangeSelectionToggled",function(){return i.onRangeSelectionToggled()})("onSlideOutToggled",function(){return i.onSlideOutToggled()}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),j(11,"async"),j(12,"async"),j(13,"async"),j(14,"async"),j(15,"async"),j(16,"async"),j(17,"async"),j(18,"async"),g()),2&e&&_("isImageSupportEnabled",W(1,18,i.isImageSupportEnabled$))("tooltipSort",W(2,20,i.tooltipSort$))("ignoreOutliers",W(3,22,i.ignoreOutliers$))("xAxisType",W(4,24,i.xAxisType$))("cardMinWidth",W(5,26,i.cardMinWidth$))("histogramMode",W(6,28,i.histogramMode$))("scalarSmoothing",W(7,30,i.scalarSmoothing$))("scalarPartitionX",W(8,32,i.scalarPartitionX$))("imageBrightnessInMilli",W(9,34,i.imageBrightnessInMilli$))("imageContrastInMilli",W(10,36,i.imageContrastInMilli$))("imageShowActualSize",W(11,38,i.imageShowActualSize$))("isScalarStepSelectorEnabled",W(12,40,i.isScalarStepSelectorEnabled$))("isScalarStepSelectorRangeEnabled",W(13,42,i.isScalarStepSelectorRangeEnabled$))("isLinkedTimeEnabled",W(14,44,i.isLinkedTimeEnabled$))("isScalarColumnCustomizationEnabled",W(15,46,i.isScalarColumnCustomizationEnabled$))("linkedTimeSelection",W(16,48,i.linkedTimeSelection$))("stepMinMax",W(17,50,i.stepMinMax$))("isSlideOutMenuOpen",W(18,52,i.isSlideOutMenuOpen$))},dependencies:[gQ,ct],encapsulation:2,changeDetection:0}),n})(),bQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-dashboard-right-pane"]],decls:1,vars:0,template:function(e,i){1&e&&P(0,"metrics-dashboard-settings")},dependencies:[_Q],encapsulation:2,changeDetection:0}),n})();function h1e(n,t){1&n&&P(0,"mat-icon",4)}function g1e(n,t){1&n&&P(0,"mat-icon",4)}function _1e(n,t){1&n&&P(0,"mat-icon",4)}function b1e(n,t){1&n&&P(0,"div",5)}var zT=(()=>{class n{constructor(){this.ColumnHeaderType=ht}getSpecialTypeClasses(e){switch(e){case ht.STEP_AT_MIN:return"step-at-min";case ht.STEP_AT_MAX:return"step-at-max";default:return""}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-header"]],inputs:{header:"header"},decls:7,vars:6,consts:[[1,"header-container",3,"ngSwitch"],["svgIcon","change_history_24px",4,"ngSwitchCase"],["class","extra-right-padding",4,"ngSwitchDefault"],[3,"ngClass"],["svgIcon","change_history_24px"],[1,"extra-right-padding"]],template:function(e,i){1&e&&(h(0,"div",0),S(1,h1e,1,0,"mat-icon",1),S(2,g1e,1,0,"mat-icon",1),S(3,_1e,1,0,"mat-icon",1),S(4,b1e,1,0,"div",2),h(5,"span",3),T(6),g()()),2&e&&(_("ngSwitch",i.header.type),v(1),_("ngSwitchCase",i.ColumnHeaderType.VALUE_CHANGE),v(1),_("ngSwitchCase",i.ColumnHeaderType.PERCENTAGE_CHANGE),v(1),_("ngSwitchCase",i.ColumnHeaderType.RAW_CHANGE),v(2),_("ngClass",i.getSpecialTypeClasses(i.header.type)),v(1),bt(i.header.displayName))},dependencies:[yn,sr,Sr,uu,En],styles:[".header-container[_ngcontent-%COMP%]{align-items:center;display:flex}.extra-right-padding[_ngcontent-%COMP%]{padding-right:1px}mat-icon[_ngcontent-%COMP%]{height:12px;width:12px;min-width:12px;line-height:12px}.step-at-min[_ngcontent-%COMP%]{min-width:37px}.step-at-max[_ngcontent-%COMP%]{min-width:40px}"],changeDetection:0}),n})();function v1e(n,t){if(1&n){let e=ge();h(0,"div",8),I("dragstart",function(){let o=X(e).$implicit;return Q(w(2).dragStart(o))})("dragend",function(){X(e);let r=w().dataTableMode;return Q(w().dragEnd(r))})("dragenter",function(){let o=X(e).$implicit,s=w().dataTableMode;return Q(w().dragEnter(o,s))}),h(1,"mat-checkbox",9),I("change",function(){let o=X(e).$implicit,s=w().dataTableMode;return Q(w().toggleHeader(o,s))}),P(2,"tb-data-table-header",10),g()()}if(2&n){let e=t.$implicit;_("ngClass",w(2).getHighlightClasses(e)),v(1),_("checked",e.enabled),v(1),_("header",e)}}function y1e(n,t){1&n&&S(0,v1e,3,3,"div",7),2&n&&_("ngForOf",t.headers)}var yQ=function(n,t){return{headers:n,dataTableMode:t}},PN=n=>{n.preventDefault()},x1e=(n,t,e)=>{let i=[...e];return i.splice(n,1),i.splice(t,0,e[n]),i},UT=(n,t)=>t.findIndex(e=>e.name===n.name),Xu=(()=>(function(n){n[n.TOP=0]="TOP",n[n.BOTTOM=1]="BOTTOM"}(Xu||(Xu={})),Xu))(),xQ=(()=>{class n{constructor(e){this.hostElement=e,this.DataTableMode=ro,this.highlightEdge=Xu.TOP,this.onScalarTableColumnEdit=new F,this.onScalarTableColumnToggled=new F,this.onScalarTableColumnEditorClosed=new F,this.onTabChange=new F}ngOnDestroy(){this.hostElement.nativeElement.removeEventListener("dragover",PN)}tabChange(e){this.onTabChange.emit(0===e.index?ro.SINGLE:ro.RANGE)}dragStart(e){this.draggingHeader=e,this.hostElement.nativeElement.addEventListener("dragover",PN)}dragEnd(e){if(!this.draggingHeader||!this.highlightedHeader)return;let i=this.getHeadersForMode(e);this.onScalarTableColumnEdit.emit({dataTableMode:e,headers:x1e(UT(this.draggingHeader,i),UT(this.highlightedHeader,i),i)}),this.draggingHeader=void 0,this.highlightedHeader=void 0,this.hostElement.nativeElement.removeEventListener("dragover",PN)}dragEnter(e,i){if(!this.draggingHeader)return;let r=this.getHeadersForMode(i);this.highlightEdge=UT(e,r)<UT(this.draggingHeader,r)?Xu.TOP:Xu.BOTTOM,this.highlightedHeader=e}toggleHeader(e,i){this.onScalarTableColumnToggled.emit({dataTableMode:i,header:e})}getHighlightClasses(e){return e.name!==this.highlightedHeader?.name?{}:{highlighted:!0,"highlight-top":this.highlightEdge===Xu.TOP,"highlight-bottom":this.highlightEdge===Xu.BOTTOM}}getSelectedTabIndex(){return this.selectedTab===ro.SINGLE?0:1}getHeadersForMode(e){return e===ro.SINGLE?this.singleHeaders:this.rangeHeaders}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275cmp=O({type:n,selectors:[["metrics-scalar-column-editor-component"]],inputs:{rangeHeaders:"rangeHeaders",singleHeaders:"singleHeaders",selectedTab:"selectedTab"},outputs:{onScalarTableColumnEdit:"onScalarTableColumnEdit",onScalarTableColumnToggled:"onScalarTableColumnToggled",onScalarTableColumnEditorClosed:"onScalarTableColumnEditorClosed",onTabChange:"onTabChange"},decls:11,vars:13,consts:function(){let t;return t=$localize`:Label on a button to close the column editor.␟cb616ce9b4327b41e6bdb9344669ba7c72e2c70e␟7205635764713034842:Close column editor`,[[1,"editor-controls"],[1,"tab-group",3,"selectedIndex","selectedTabChange"],[3,"label"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"footer"],["mat-button","","aria-label",t,1,"close-button",3,"click"],["headerList",""],["class","header-list-item","draggable","true",3,"ngClass","dragstart","dragend","dragenter",4,"ngFor","ngForOf"],["draggable","true",1,"header-list-item",3,"ngClass","dragstart","dragend","dragenter"],[3,"checked","change"],[3,"header"]]},template:function(e,i){if(1&e&&(h(0,"div",0)(1,"mat-tab-group",1),I("selectedTabChange",function(o){return i.tabChange(o)}),h(2,"mat-tab",2),P(3,"ngContext",3),g(),h(4,"mat-tab",2),P(5,"ngContext",3),g()()(),h(6,"div",4)(7,"button",5),I("click",function(){return i.onScalarTableColumnEditorClosed.emit()}),T(8," Close "),g()(),S(9,y1e,1,1,"ng-template",null,6,Wt)),2&e){let r=it(10);v(1),_("selectedIndex",i.getSelectedTabIndex()),v(1),_("label","Single"),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",qr(7,yQ,i.singleHeaders,i.DataTableMode.SINGLE)),v(1),_("label","Range"),v(1),_("ngTemplateOutlet",r)("ngTemplateOutletContext",qr(10,yQ,i.rangeHeaders,i.DataTableMode.RANGE))}},dependencies:[yn,nn,Lr,zT,ha,sy,bE,Ji],styles:["[_nghost-%COMP%]     .mat-tab-label{min-width:0;padding:0 30px}.editor-controls[_ngcontent-%COMP%]{height:calc(100% - 45px)}.tab-group[_ngcontent-%COMP%]{position:relative;z-index:0;height:100%}.header-list-item[_ngcontent-%COMP%]{padding:3px;height:24px}.highlighted[_ngcontent-%COMP%]{background-color:#eee}.highlight-bottom[_ngcontent-%COMP%]{border-bottom:2px solid #ff9800}.highlight-top[_ngcontent-%COMP%]{border-top:2px solid #ff9800}.footer[_ngcontent-%COMP%]{display:flex;position:absolute;left:0;bottom:0;box-sizing:border-box;width:100%;align-items:center;justify-content:flex-end;padding:4px;border-top:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .footer[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .footer[_ngcontent-%COMP%]{border-color:#555}.close-button[_ngcontent-%COMP%]{color:#616161;width:84px}body.dark-mode[_nghost-%COMP%]   .close-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .close-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}  .mat-mdc-tab-body-wrapper{flex:1}"],changeDetection:0}),n})(),CQ=(()=>{class n{constructor(e){this.store=e,this.singleHeaders$=this.store.select(Cv),this.rangeHeaders$=this.store.select(Mv),this.selectedTab$=this.store.select(SW)}onScalarTableColumnToggled(e){this.store.dispatch(Ug(e))}onScalarTableColumnEdit(e){this.store.dispatch(zg(e))}onScalarTableColumnEditorClosed(){this.store.dispatch(cT())}onTabChange(e){this.store.dispatch(lT({tab:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-scalar-column-editor"]],decls:4,vars:9,consts:[[3,"singleHeaders","rangeHeaders","selectedTab","onScalarTableColumnToggled","onScalarTableColumnEdit","onScalarTableColumnEditorClosed","onTabChange"]],template:function(e,i){1&e&&(h(0,"metrics-scalar-column-editor-component",0),I("onScalarTableColumnToggled",function(o){return i.onScalarTableColumnToggled(o)})("onScalarTableColumnEdit",function(o){return i.onScalarTableColumnEdit(o)})("onScalarTableColumnEditorClosed",function(){return i.onScalarTableColumnEditorClosed()})("onTabChange",function(o){return i.onTabChange(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("singleHeaders",W(1,3,i.singleHeaders$))("rangeHeaders",W(2,5,i.rangeHeaders$))("selectedTab",W(3,7,i.selectedTab$))},dependencies:[xQ,ct],encapsulation:2,changeDetection:0}),n})(),Wg=(()=>(function(n){n[n.ORIGINAL=0]="ORIGINAL",n[n.DERIVED=1]="DERIVED"}(Wg||(Wg={})),Wg))(),w1e=q(_W,Iu,(n,t)=>new Set(Object.entries(n.scalars.tagToRuns).filter(([,e])=>!t||!t.size||e.some(i=>t?.get(i))).map(([e])=>e))),S1e=q(e1,Iu,wW,w1e,(n,t,e,i)=>{let r=Array.from(t?.values()||[]).some(Boolean);return n.filter(o=>pa(o.plugin)?Boolean(t&&t.get(o.runId)):!e||!r||o.plugin!==zn.SCALARS||i.has(o.tag))}),Nf=q(S1e,n=>n.sort((t,e)=>yy(t.tag,e.tag))),jT={filterRunItemsByRegex:(n,t,e)=>t?n.filter(i=>Qh({runName:i.run.name,experimentAlias:i.experimentAlias},t,e)):n,matchFilter:(n,t)=>void 0===t?n.includeUndefined:n.type===gn.DISCRETE?n.filterValues.includes(t):n.type===gn.INTERVAL&&"number"==typeof t&&n.filterLowerValue<=t&&t<=n.filterUpperValue,filterRunItemsByHparamAndMetricFilter:(n,t,e)=>n.filter(({hparams:i,metrics:r})=>{let o=[...t.entries()].every(([a,l])=>{let c=i.get(a);return jT.matchFilter(l,c)}),s=[...e.entries()].every(([a,l])=>{let c=r.get(a);return jT.matchFilter(l,c)});return o&&s})},MQ=q(KF,m1,h1,(n,t,e)=>new Map([...n,...t,...e])),E1e=q(b1,W6,Iu,Au,za,(n,t,e,i,r)=>n.map(o=>{let s=new Map;(o.hparams||[]).forEach(l=>{s.set(l.name,l.value)});let a=new Map;return(o.metrics||[]).forEach(l=>{a.set(l.tag,l.value)}),{run:o,experimentName:t[o.experimentId]||"",experimentAlias:r[o.experimentId],selected:Boolean(e&&e.get(o.id)),runColor:i[o.id],hparams:s,metrics:a}})),ON=q(vd,E1e,m1,h1,Ha,(n,t,e,i,r)=>{let o=jT.filterRunItemsByRegex(t,n,r===wn.COMPARE_EXPERIMENT);return jT.filterRunItemsByHparamAndMetricFilter(o,e,i)}),wQ=q(ON,n=>new Set(n.map(({run:{id:t}})=>t))),kN=q(f1,lr,({hparams:n},t)=>t?n.map(e=>({type:ht.HPARAM,name:e.name,displayName:e.displayName||e.name,enabled:!1,removable:!0,sortable:!0,movable:!0,filterable:!0})):[]),qg=(Yh(n=>q(d1(n),kN,(t,e)=>[...t,...e])),(()=>{class n{constructor(e,i){this.ref=e,this.cdkScrollable=i,this.onVisibilityChange=new F,this.ngUnsubscribe$=new Ie,this.onEvent$=new Ie}ngOnInit(){let e={root:this.cdkScrollable?this.cdkScrollable.getElementRef().nativeElement:null};this.intersectionObserverMargin&&(e.rootMargin=this.intersectionObserverMargin);let i=new IntersectionObserver(r=>{this.onEvent$.next(r)},e);i.observe(this.ref.nativeElement),this.ngUnsubscribe$.subscribe(()=>{i.unobserve(this.ref.nativeElement)}),this.onEvent$.pipe(ot(this.ngUnsubscribe$)).subscribe(r=>{let o=r.slice(-1)[0];this.onVisibilityChange.emit({visible:o.isIntersecting})})}ngOnDestroy(){this.ngUnsubscribe$.next(),this.ngUnsubscribe$.complete()}waitForEventForTestOnly(){return new Promise(e=>this.onEvent$.pipe(Yt(1)).subscribe(()=>{e()}))}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(Cd,8))},n.\u0275dir=we({type:n,selectors:[["","observeIntersection",""]],inputs:{intersectionObserverMargin:"intersectionObserverMargin"},outputs:{onVisibilityChange:"onVisibilityChange"}}),n})()),SQ="/scalar_summary";function Yg(n,t){let e=n;return t&&n.startsWith(t+"/")&&(e=n.slice(t.length+1)),e.endsWith(SQ)&&(e=e.slice(0,-SQ.length)),e||n}var GT=(()=>{class n{constructor(e,i){this.store=e,this.changeDetectorRef=i,this.hrefAttr=void 0,this.srcAttr=void 0,this.includeFeatureFlags=!0}getUrlWithFeatureFlags(e){return this.store.select(Ph).pipe(N(i=>{if(Object.keys(i).length>0){let r=new URLSearchParams([["tensorBoardFeatureFlags",JSON.stringify(i)]]),o=e.includes("?")?"&":"?";return e+o+String(r)}return e}))}set href(e){e&&IC(this.getUrlWithFeatureFlags(e)).then(i=>{this.hrefAttr=i,this.changeDetectorRef.detectChanges()})}set src(e){e&&IC(this.getUrlWithFeatureFlags(e)).then(i=>{this.srcAttr=i,this.changeDetectorRef.detectChanges()})}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C($t))},n.\u0275dir=we({type:n,selectors:[["a","includeFeatureFlags",""],["img","includeFeatureFlags",""]],hostVars:2,hostBindings:function(e,i){2&e&&Be("href",i.hrefAttr,ka)("src",i.srcAttr,ka)},inputs:{includeFeatureFlags:"includeFeatureFlags",href:"href",src:"src"}}),n})(),T1e=["measurer"],D1e=["input"],TQ=(()=>{class n{constructor(e){this.changeDetector=e,this.placeholder="",this.style="default",this.patternRegex=new RegExp(".*"),this.isValid=!0,this.onValueChange=new F,this.blur=new F,this.focus=new F,this.keydown=new F,this.keyup=new F,this.internalValue="",this.fontChangeListener=this.updateInputWidth.bind(this)}ngOnInit(){document.fonts&&document.fonts.addEventListener("loadingdone",this.fontChangeListener)}ngOnDestroy(){document.fonts&&document.fonts.removeEventListener("loadingdone",this.fontChangeListener)}ngOnChanges(e){e.pattern&&(this.patternRegex=new RegExp(this.pattern??"")),e.value&&(this.internalValue=this.value),this.isValid=this.patternRegex.test(this.internalValue)}ngAfterViewChecked(){this.updateInputWidth()}onInput(e){let i=this.internalValue;this.internalValue=this.inputElRef.nativeElement.value,this.internalValue!==i&&(this.isValid=this.patternRegex.test(this.internalValue),this.changeDetector.markForCheck()),this.onValueChange.emit({value:this.internalValue})}updateInputWidth(){let{width:e}=this.measurerElRef.nativeElement.getBoundingClientRect();this.inputElRef.nativeElement.style.width=`${e}px`}}return n.\u0275fac=function(e){return new(e||n)(C($t))},n.\u0275cmp=O({type:n,selectors:[["content-wrapping-input"]],viewQuery:function(e,i){if(1&e&&(Ge(T1e,7,Me),Ge(D1e,7,Me)),2&e){let r;Se(r=Ee())&&(i.measurerElRef=r.first),Se(r=Ee())&&(i.inputElRef=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&As(i.style)},inputs:{value:"value",placeholder:"placeholder",style:"style",pattern:"pattern"},outputs:{onValueChange:"onValueChange",blur:"blur",focus:"focus",keydown:"keydown",keyup:"keyup"},features:[Gt],decls:6,vars:7,consts:[["aria-hidden","true",1,"measurer"],["measurer",""],["autocomplete","off","spellcheck","false","type","text",3,"value","placeholder","blur","focus","input","keydown","keyup"],["input",""]],template:function(e,i){1&e&&(h(0,"span")(1,"span",0,1),T(3),g(),h(4,"input",2,3),I("blur",function(o){return i.blur.emit(o)})("focus",function(o){return i.focus.emit(o)})("input",function(o){return i.onInput(o)})("keydown",function(o){return i.keydown.emit(o)})("keyup",function(o){return i.keyup.emit(o)}),g()()),2&e&&(nt("container",!0)("is-valid",i.isValid),v(3),bt(i.internalValue||i.placeholder),v(1),_("value",i.value)("placeholder",i.placeholder))},styles:["[_nghost-%COMP%]{display:inline-flex;width:max-content}[_nghost-%COMP%]:focus-within   .container[_ngcontent-%COMP%]{border-color:#f57c00}.default[_nghost-%COMP%]:hover   .container[_ngcontent-%COMP%]{border-color:#ebebeb}.error[_nghost-%COMP%]   .container[_ngcontent-%COMP%], [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid){border-color:#ef9a9a}.error[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:hover, .error[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:focus-within, [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid):hover, [_nghost-%COMP%]   .container[_ngcontent-%COMP%]:not(.is-valid):focus-within{border-color:#ef9a9a}.high-contrast[_nghost-%COMP%]   .container[_ngcontent-%COMP%]{border-color:#bdbdbd}.high-contrast[_nghost-%COMP%]   .container[_ngcontent-%COMP%]:hover{border-color:#757575}.container[_ngcontent-%COMP%]{border-radius:4px;border:2px solid rgba(0,0,0,0);padding:1px 2px;position:relative}.measurer[_ngcontent-%COMP%]{pointer-events:none;position:absolute;visibility:hidden}.measurer[_ngcontent-%COMP%], input[_ngcontent-%COMP%]{font-family:inherit;font-size:inherit;line-height:1.4;padding:0;white-space:pre}.measurer[_ngcontent-%COMP%]:empty, input[_ngcontent-%COMP%]:empty{width:2ch}input[_ngcontent-%COMP%]{appearance:none;background-color:inherit;border:0;color:inherit;display:inline-block;font-family:inherit;outline:0}input[_ngcontent-%COMP%]:focus{padding-right:1ch}"],changeDetection:0}),n})();function A1e(n,t){if(1&n){let e=ge();h(0,"content-wrapping-input",3),I("onValueChange",function(r){return X(e),Q(w().aliasChanged.emit(r))}),g()}if(2&n){let e=w();Fa(e.isAliasNameLegal?"high-contrast":"error"),_("value",e.alias.aliasText)}}function R1e(n,t){if(1&n&&(h(0,"span",4),T(1),g()),2&n){let e=w();nt("illegal",!e.isAliasNameLegal),_("title",e.title),v(1),bt(e.alias.aliasText)}}var Qu=(()=>{class n{constructor(){this.isAliasNameLegal=!0,this.aliasChanged=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-experiment-alias"]],inputs:{alias:"alias",aliasEditable:"aliasEditable",title:"title",isAliasNameLegal:"isAliasNameLegal"},outputs:{aliasChanged:"aliasChanged"},decls:5,vars:3,consts:[[1,"alias-number"],["placeholder","Alias for experiment",3,"style","value","onValueChange",4,"ngIf","ngIfElse"],["noEditAliasName",""],["placeholder","Alias for experiment",3,"value","onValueChange"],[3,"title"]],template:function(e,i){if(1&e&&(h(0,"span",0),T(1),g(),S(2,A1e,1,3,"content-wrapping-input",1),S(3,R1e,2,4,"ng-template",null,2,Wt)),2&e){let r=it(4);v(1),bt(i.alias.aliasNumber),v(1),_("ngIf",i.aliasEditable)("ngIfElse",r)}},dependencies:[Fe,TQ],styles:[".alias-number[_ngcontent-%COMP%]{background-color:#e0e0e0;border:1px solid #ebebeb;color:#212121;border-radius:2px;margin-right:2px;padding:0 2px}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{background-color:#616161}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{border:1px solid #555}body.dark-mode[_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .alias-number[_ngcontent-%COMP%]{color:#fff}[_nghost-%COMP%]{display:inline-flex;align-items:baseline}"]}),n})();function P1e(n,t){1&n&&P(0,"tb-experiment-alias",2),2&n&&_("alias",w().experimentAlias)}function O1e(n,t){1&n&&(h(0,"span"),T(1,"/"),g())}var DQ=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["card-run-name-component"]],inputs:{name:"name",experimentAlias:"experimentAlias"},decls:4,vars:3,consts:[[3,"alias",4,"ngIf"],[4,"ngIf"],[3,"alias"]],template:function(e,i){1&e&&(S(0,P1e,1,1,"tb-experiment-alias",0),S(1,O1e,2,0,"span",1),h(2,"span"),T(3),g()),2&e&&(_("ngIf",null!=i.experimentAlias),v(1),_("ngIf",null!=i.experimentAlias),v(2),bt(i.name))},dependencies:[Fe,Qu],styles:["[_nghost-%COMP%]{color:#616161}body.dark-mode   [_nghost-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),qT=(()=>{class n{constructor(e){this.store=e}ngOnInit(){this.name$=dn([this.store.select(_1,{runId:this.runId})]).pipe(N(([e])=>function(n,t,e){if(!t)return n;let i=t?.name??"...";return i}(this.runId,e))),this.experimentAlias$=dn([this.store.select(g1,{runId:this.runId}),this.store.select(za)]).pipe(N(([e,i])=>e?i[e]:null))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["card-run-name"]],inputs:{runId:"runId"},decls:4,vars:9,consts:[[3,"name","experimentAlias"]],template:function(e,i){1&e&&(P(0,"card-run-name-component",0),j(1,"async"),j(2,"async"),j(3,"async")),2&e&&(_("name",W(1,3,i.name$))("experimentAlias",W(3,7,i.experimentAlias$)),Be("title",W(2,5,i.name$)))},dependencies:[DQ,ct],encapsulation:2,changeDetection:0}),n})();function F1e(n,t){if(1&n&&(h(0,"span",2),T(1),g()),2&n){let e=w();v(1),bt(e.firstTextPart())}}var Xg=(()=>{class n{parseValue(){let e=this.value.lastIndexOf("/");return-1===e?{first:"",second:this.value}:{first:this.value.slice(0,e),second:this.value.slice(e)}}firstTextPart(){return this.parseValue().first}secondTextPart(){return this.parseValue().second}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-truncated-path"]],inputs:{value:"value"},decls:3,vars:2,consts:[["class","first-text-part",4,"ngIf"],[1,"second-text-part"],[1,"first-text-part"]],template:function(e,i){1&e&&(S(0,F1e,2,1,"span",0),h(1,"span",1),T(2),g()),2&e&&(_("ngIf",i.firstTextPart().length>0),v(2),bt(i.secondTextPart()))},dependencies:[Fe],styles:["[_nghost-%COMP%]{display:inline-flex;white-space:nowrap}.first-text-part[_ngcontent-%COMP%]{flex:1 1 4ch;max-width:max-content}.first-text-part[_ngcontent-%COMP%], .second-text-part[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis}"]}),n})();function N1e(n,t){1&n&&P(0,"mat-icon",2)}function L1e(n,t){1&n&&P(0,"mat-icon",3)}var Qg=(()=>{class n{constructor(){this.isClipped=!1,this.isClosestStepHighlighted=!1}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["vis-linked-time-selection-warning"]],inputs:{isClipped:"isClipped",isClosestStepHighlighted:"isClosestStepHighlighted"},decls:2,vars:2,consts:[["data-value","clipped","svgIcon","info_outline_24px","title","Linked step is not found in this visualization. We highlighted the closest step for you.",4,"ngIf"],["data-value","closestStepHighlighted","svgIcon","info_outline_24px","title","Data is not found on selected step. We highlighted the closest step for you.",4,"ngIf"],["data-value","clipped","svgIcon","info_outline_24px","title","Linked step is not found in this visualization. We highlighted the closest step for you."],["data-value","closestStepHighlighted","svgIcon","info_outline_24px","title","Data is not found on selected step. We highlighted the closest step for you."]],template:function(e,i){1&e&&(S(0,N1e,1,0,"mat-icon",0),S(1,L1e,1,0,"mat-icon",1)),2&e&&(_("ngIf",i.isClipped),v(1),_("ngIf",i.isClosestStepHighlighted))},dependencies:[Fe,En],styles:["[_nghost-%COMP%]{color:#d32f2f;height:1em;line-height:0;display:inline-flex}body.dark-mode   [_nghost-%COMP%]{color:#d32f2f}[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:100%;width:100%}"],changeDetection:0}),n})();function B1e(n,t){if(1&n&&(h(0,"span",19),T(1),j(2,"number"),g()),2&n){let e=w();v(1),He("Step ",W(2,1,e.steps[e.stepIndex]),"")}}function V1e(n,t){if(1&n&&(h(0,"span",20),T(1),j(2,"number"),j(3,"number"),g()),2&n){let e=w();v(1),lu("Sample ",W(2,2,e.sample+1),"/",W(3,4,e.numSample),"")}}function H1e(n,t){1&n&&P(0,"mat-spinner",21)}function z1e(n,t){if(1&n&&(h(0,"span"),P(1,"span",30)(2,"span",31),g()),2&n){let e=w(3);v(2),Tt("left",e.sliderStartPosition)("width",e.sliderTrackWidth)}}function U1e(n,t){if(1&n&&P(0,"div",32),2&n){let e=t.$implicit,i=w(3);Tt("left",i.getLinkedTimeTickLeftStyle(e))("margin-left",i.getLinkedTimeTickMarginLeftStyle(e))}}function j1e(n,t){if(1&n&&(h(0,"div",27),S(1,z1e,3,4,"span",28),S(2,U1e,1,4,"div",29),g()),2&n){let e=w(2);v(1),_("ngIf",null!==e.linkedTimeSelection.endStep),v(1),_("ngForOf",e.selectedSteps)}}var G1e=function(n){return[n]},W1e=function(n){return{filter:n}};function q1e(n,t){if(1&n){let e=ge();Ot(0),h(1,"div",22)(2,"mat-slider",23),I("input",function(r){return X(e),Q(w().onSliderInput(r))}),g(),S(3,j1e,3,2,"div",24),g(),h(4,"div",25),P(5,"img",26),g(),kt()}if(2&n){let e=w();v(2),_("ngClass",In(11,G1e,e.linkedTimeSelection&&null!==e.linkedTimeSelection.endStep?"hide-slider":""))("disabled",e.steps.length<=1)("min",0)("max",e.steps.length-1)("step",1)("tickInterval",1)("value",e.stepIndex),v(1),_("ngIf",e.linkedTimeSelection),v(2),fb("alt","Image at step ",e.steps[e.stepIndex],""),Wi("src",e.imageUrl,ka),_("ngStyle",In(13,W1e,e.cssFilter()))}}function Y1e(n,t){1&n&&(h(0,"div",34),T(1," Data failed to load. "),g())}function X1e(n,t){if(1&n&&S(0,Y1e,2,0,"div",33),2&n){let e=w();_("ngIf",e.loadState===e.DataLoadState.FAILED)}}var Q1e=function(n){return{backgroundColor:n}},AQ=(()=>{class n{constructor(){this.DataLoadState=Te,this.sliderStartPosition="",this.sliderTrackWidth="",this.linkedTimeSelection=null,this.isClosestStepHighlighted=!1,this.onActualSizeToggle=new F,this.stepIndexChange=new F,this.onPinClicked=new F}cssFilter(){return`contrast(${this.contrastInMilli/10}%) brightness(${this.brightnessInMilli/1e3})`}onSliderInput(e){this.stepIndexChange.emit(e.value)}changeDistinct(e){return e.currentValue!==e.previousValue}ngOnChanges(e){(e.selectedSteps&&this.changeDistinct(e.selectedSteps)||e.linkedTimeSelection&&this.changeDistinct(e.linkedTimeSelection))&&this.renderRangeSlider()}renderRangeSlider(){if(!this.linkedTimeSelection||!this.linkedTimeSelection.endStep)return;let e=this.steps.length-1,i=this.linkedTimeSelection.startStep<this.steps[0]?this.steps[0]:this.linkedTimeSelection.startStep,r=this.linkedTimeSelection.endStep>this.steps[e]?this.steps[e]:this.linkedTimeSelection.endStep,{startPosition:o,width:s}=this.getTrackStartPositionAndWidth(i,r,e);this.sliderStartPosition=100*o+"%",this.sliderTrackWidth=100*s+"%"}getTrackStartPositionAndWidth(e,i,r){let o=1/r,s=0,a=0,l=0;for(;l<this.steps.length-1;l++){let c=this.steps[l],d=this.steps[l+1];if(c<=e&&e<=d){s+=(e-c)/(d-c);break}}for(s=(s+l)*o;l<this.steps.length-1;l++){let c=this.steps[l],d=this.steps[l+1];if(e>=c&&i<=d){a=(i-e)/(d-c);break}if(e>=c&&i>=d)a+=(d-e)/(d-c);else{if(!(i>=d)){a+=(i-c)/(d-c);break}a+=1}}return a*=o,(s>1||s<0)&&(s=0),{startPosition:s,width:a}}getLinkedTimeTickLeftStyle(e){if(-1==this.steps.indexOf(e))throw new Error("Invalid stepIndex: stepIndex value is not included in steps");return this.steps.indexOf(e)/(this.steps.length-1)*100+"%"}getLinkedTimeTickMarginLeftStyle(e){if(-1==this.steps.indexOf(e))throw new Error("Invalid stepIndex: stepIndex value is not included in steps");return`-${this.steps.indexOf(e)/(this.steps.length-1)*14}px`}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["image-card-component"]],hostVars:2,hostBindings:function(e,i){2&e&&nt("actual-size",i.showActualSize)},inputs:{loadState:"loadState",title:"title",tag:"tag",runId:"runId",sample:"sample",numSample:"numSample",imageUrl:"imageUrl",stepIndex:"stepIndex",steps:"steps",brightnessInMilli:"brightnessInMilli",contrastInMilli:"contrastInMilli",showActualSize:"showActualSize",runColorScale:"runColorScale",allowToggleActualSize:"allowToggleActualSize",isPinned:"isPinned",selectedSteps:"selectedSteps",linkedTimeSelection:"linkedTimeSelection",isClosestStepHighlighted:"isClosestStepHighlighted"},outputs:{onActualSizeToggle:"onActualSizeToggle",stepIndexChange:"stepIndexChange",onPinClicked:"onPinClicked"},features:[Gt],decls:21,vars:16,consts:function(){let t,e;return t=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,e=$localize`:A button on an image card that toggles actual image size.␟3ca05ef3a6e3a37065f5e0f69c5d5a2178d90791␟7635101936664789140:Toggle actual image size`,[[1,"heading"],[1,"line"],[1,"tag"],[1,"tag-path",3,"title","value"],[3,"isClipped","isClosestStepHighlighted"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",e,"title","Toggle actual image size",3,"disabled","click"],["svgIcon","image_search_24px"],[1,"run"],[1,"dot",3,"ngStyle"],[1,"run-text",3,"runId"],[1,"metadata"],["class","step",4,"ngIf"],["class","sample",4,"ngIf"],["class","loading","diameter","18",4,"ngIf"],[4,"ngIf","ngIfElse"],["noImageData",""],[1,"step"],[1,"sample"],["diameter","18",1,"loading"],[1,"slider-row"],["color","primary",1,"step-slider",3,"ngClass","disabled","min","max","step","tickInterval","value","input"],["class","linked-time-wrapper",4,"ngIf"],[1,"img-container"],[3,"alt","src","ngStyle","includeFeatureFlags"],[1,"linked-time-wrapper"],[4,"ngIf"],["class","linked-time-tick",3,"left","margin-left",4,"ngFor","ngForOf"],[1,"slider-track"],[1,"slider-track-fill"],[1,"linked-time-tick"],["class","empty-message",4,"ngIf"],[1,"empty-message"]]},template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div",1)(2,"span",2),P(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),g(),h(5,"span",5)(6,"button",6),I("click",function(){return i.onPinClicked.emit(!i.isPinned)}),P(7,"mat-icon",7),g(),h(8,"button",8),I("click",function(){return i.onActualSizeToggle.emit()}),P(9,"mat-icon",9),g()()(),h(10,"div",1)(11,"span",10),P(12,"span",11)(13,"card-run-name",12),g(),h(14,"div",13),S(15,B1e,3,3,"span",14),S(16,V1e,4,6,"span",15),S(17,H1e,1,0,"mat-spinner",16),g()()(),S(18,q1e,6,15,"ng-container",17),S(19,X1e,1,1,"ng-template",null,18,Wt)),2&e){let r=it(20);v(3),Wi("title",i.tag),Wi("value",i.title),v(1),_("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),v(2),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),_("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(1),_("disabled",!i.allowToggleActualSize),v(4),_("ngStyle",In(14,Q1e,i.runColorScale(i.runId))),v(1),_("runId",i.runId),v(2),_("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length),v(1),_("ngIf",i.numSample>1),v(1),_("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),_("ngIf",null!==i.stepIndex&&i.stepIndex<i.steps.length)("ngIfElse",r)}},dependencies:[yn,nn,Fe,pu,GT,$i,En,tl,Dd,qT,Xg,Qg,La],styles:["[_nghost-%COMP%]{box-sizing:border-box;display:flex;flex-basis:318px;flex-direction:column;flex-grow:1;height:100%;overflow:auto;padding:16px;padding-top:4px}.actual-size[_nghost-%COMP%]{height:auto}.heading[_ngcontent-%COMP%]{align-items:center;font-size:14px;margin-bottom:4px;position:relative}.line[_ngcontent-%COMP%]{align-items:center;display:grid;grid-template-columns:1fr max-content}.tag[_ngcontent-%COMP%]{align-items:center;display:flex;gap:5px}.metadata[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:5px;justify-content:flex-end;max-width:175px;text-align:end}.tag-path[_ngcontent-%COMP%]{overflow:hidden}.run[_ngcontent-%COMP%]{align-self:baseline;display:flex;overflow:hidden;white-space:nowrap}.run[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex:none;display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:4px}.run[_ngcontent-%COMP%]   .run-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;max-width:120px}.run[_ngcontent-%COMP%], .sample[_ngcontent-%COMP%], .step[_ngcontent-%COMP%]{color:#616161;font-size:13px}body.dark-mode[_nghost-%COMP%]   .run[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .run[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .sample[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sample[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .step[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .step[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;justify-self:flex-end;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.img-container[_ngcontent-%COMP%]{flex-grow:1;overflow-y:auto;position:relative}.img-container[_ngcontent-%COMP%]   img[_ngcontent-%COMP%]{image-rendering:-moz-crisp-edges;image-rendering:pixelated}.actual-size[_nghost-%COMP%]   .img-container[_ngcontent-%COMP%]{overflow:auto;flex:none}[_nghost-%COMP%]:not(.actual-size)   img[_ngcontent-%COMP%]{position:absolute;max-height:100%;max-width:100%;width:auto;height:100%;object-fit:contain}.slider-row[_ngcontent-%COMP%]{display:flex;align-items:center;height:24px;position:relative}.step-slider[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]     .mat-slider-min-value .mat-slider-thumb{background-color:#f57c00}[_nghost-%COMP%]     .hide-slider.mat-slider-horizontal .mat-slider-track-wrapper{height:0}.empty-message[_ngcontent-%COMP%]{margin-top:1em;font-size:13px}.linked-time-wrapper[_ngcontent-%COMP%]{position:absolute;top:5px;width:100%}.linked-time-tick[_ngcontent-%COMP%]{background-color:#e0e0e0;border-radius:50%;height:14px;position:absolute;width:14px}body.dark-mode[_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .linked-time-tick[_ngcontent-%COMP%]{background-color:#212121}.slider-track[_ngcontent-%COMP%], .slider-track-fill[_ngcontent-%COMP%]{height:2px;top:6px;position:absolute}.slider-track[_ngcontent-%COMP%]{background:rgba(0,0,0,.26);left:7px;width:calc(100% - 14px)}body.dark-mode[_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%]{background:rgba(255,255,255,.3)}.slider-track-fill[_ngcontent-%COMP%]{background:#f57c00}body.dark-mode[_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%]{background:#ef6c00}"],changeDetection:0}),n})(),RQ=(()=>{class n{constructor(e,i){this.store=e,this.dataSource=i,this.fullWidthChanged=new F,this.pinStateChanged=new F,this.brightnessInMilli$=this.store.select(i1),this.contrastInMilli$=this.store.select(r1),this.actualSizeGlobalSetting$=this.store.select(o1),this.showActualSize=!1,this.actualSizeUiToggled=!1,this.actualSizeUiToggleSubject=new Ai(this.actualSizeUiToggled),this.ngUnsubscribe=new Ie}onStepIndexChanged(e){this.store.dispatch(AT({cardId:this.cardId,stepIndex:e}))}isImageCardMetadata(e){let{plugin:i}=e;return i===zn.IMAGES}onActualSizeToggle(){this.actualSizeUiToggled=!this.actualSizeUiToggled,this.actualSizeUiToggleSubject.next(this.actualSizeUiToggled)}ngOnInit(){dn([this.actualSizeGlobalSetting$,this.actualSizeUiToggleSubject]).pipe(ot(this.ngUnsubscribe),Nt(([l,c])=>{this.showActualSize=l||c,this.fullWidthChanged.emit(this.showActualSize)})).subscribe(()=>{});let i=this.store.select(Wa,this.cardId).pipe(ot(this.ngUnsubscribe),ke(l=>!!l&&this.isImageCardMetadata(l)),N(l=>l),Ms(1)),o=dn([i,this.store.select(Cu,this.cardId)]).pipe(ot(this.ngUnsubscribe),N(([l,c])=>{let d=l.runId;return c&&c.hasOwnProperty(d)?c[d]:[]}),Yn((l,c)=>l.length===c.length&&0===l.length||l===c),Ms(1));this.stepIndex$=this.store.select(qF,this.cardId).pipe(N(l=>l?l.index:null)),this.isClosestStepHighlighted$=this.store.select(qF,this.cardId).pipe(N(l=>!!l&&l.isClosest)),this.loadState$=this.store.select(_d,this.cardId),this.tag$=i.pipe(N(l=>l.tag)),this.title$=this.tag$.pipe(N(l=>Yg(l,this.groupName))),this.runId$=i.pipe(N(l=>l.runId)),this.sample$=i.pipe(N(l=>l.sample)),this.numSample$=i.pipe(N(l=>l.numSample)),this.steps$=this.store.select(vW,this.cardId),this.isPinned$=this.store.select(Mu,this.cardId),this.linkedTimeSelection$=this.store.select(Eu).pipe(Li(this.steps$),N(([l,c])=>l?Uh(l,Math.min(...c),Math.max(...c)):null)),this.selectedSteps$=this.linkedTimeSelection$.pipe(Li(this.steps$),N(([l,c])=>l?null===l.endStep?-1!==c.indexOf(l.startStep)?[l.startStep]:[]:c.filter(d=>d>=l.startStep&&d<=l.endStep):[]));let a=dn([o,this.stepIndex$]).pipe(N(([l,c])=>null!==c&&l[c]?l[c]:null));this.imageUrl$=a.pipe(N(l=>l?this.dataSource.imageUrl(l.imageId):null))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Tc))},n.\u0275cmp=O({type:n,selectors:[["image-card"]],inputs:{cardId:"cardId",groupName:"groupName",runColorScale:"runColorScale"},outputs:{fullWidthChanged:"fullWidthChanged",pinStateChanged:"pinStateChanged"},decls:17,vars:50,consts:[[3,"loadState","title","tag","runId","sample","numSample","imageUrl","stepIndex","steps","isClosestStepHighlighted","brightnessInMilli","contrastInMilli","runColorScale","showActualSize","allowToggleActualSize","isPinned","linkedTimeSelection","selectedSteps","stepIndexChange","onActualSizeToggle","onPinClicked"]],template:function(e,i){1&e&&(h(0,"image-card-component",0),I("stepIndexChange",function(o){return i.onStepIndexChanged(o)})("onActualSizeToggle",function(){return i.onActualSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),j(11,"async"),j(12,"async"),j(13,"async"),j(14,"async"),j(15,"async"),j(16,"async"),g()),2&e&&_("loadState",W(1,18,i.loadState$))("title",W(2,20,i.title$))("tag",W(3,22,i.tag$))("runId",W(4,24,i.runId$))("sample",W(5,26,i.sample$))("numSample",W(6,28,i.numSample$))("imageUrl",W(7,30,i.imageUrl$))("stepIndex",W(8,32,i.stepIndex$))("steps",W(9,34,i.steps$))("isClosestStepHighlighted",W(10,36,i.isClosestStepHighlighted$))("brightnessInMilli",W(11,38,i.brightnessInMilli$))("contrastInMilli",W(12,40,i.contrastInMilli$))("runColorScale",i.runColorScale)("showActualSize",i.showActualSize)("allowToggleActualSize",!1===W(13,42,i.actualSizeGlobalSetting$))("isPinned",W(14,44,i.isPinned$))("linkedTimeSelection",W(15,46,i.linkedTimeSelection$))("selectedSteps",W(16,48,i.selectedSteps$))},dependencies:[AQ,ct],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})(),Qi=(()=>(function(n){n[n.SVG=0]="SVG",n[n.WEBGL=1]="WEBGL"}(Qi||(Qi={})),Qi))(),nr=(()=>(function(n){n[n.LINEAR=0]="LINEAR",n[n.LOG10=1]="LOG10",n[n.TIME=2]="TIME"}(nr||(nr={})),nr))(),Ir=(()=>(function(n){n.NONE="NONE",n.DRAG_ZOOMING="DRAG_ZOOMING",n.SCROLL_ZOOMING="SCROLL_ZOOMING",n.PANNING="PANNING"}(Ir||(Ir={})),Ir))();function $1e(n,t){1&n&&(h(0,"span"),T(1,"scalar"),g())}function eEe(n,t){1&n&&(h(0,"span"),T(1,"histogram"),g())}function tEe(n,t){1&n&&(h(0,"span"),T(1,"unknown"),g())}function nEe(n,t){if(1&n&&(Ot(0,13),S(1,$1e,2,0,"span",14),S(2,eEe,2,0,"span",14),S(3,tEe,2,0,"span",15),kt()),2&n){let e=w(2);_("ngSwitch",e.cardMetadata.plugin),v(1),_("ngSwitchCase",e.PluginType.SCALARS),v(1),_("ngSwitchCase",e.PluginType.HISTOGRAMS)}}function iEe(n,t){1&n&&li(0)}function rEe(n,t){if(1&n&&(h(0,"option",16),T(1),g()),2&n){let e=t.$implicit;_("value",e.id),v(1),bt(e.name)}}function oEe(n,t){if(1&n){let e=ge();Ot(0),h(1,"h2"),S(2,nEe,4,3,"ng-template",null,2,Wt),h(4,"span"),T(5,"Download\xa0"),g(),S(6,iEe,1,0,"ng-container",3),h(7,"span"),T(8,"\xa0data for\xa0"),g(),h(9,"code",4),T(10),g()(),h(11,"mat-dialog-content")(12,"mat-form-field",5)(13,"mat-label"),T(14,"Select a run to download a data for a series"),g(),h(15,"select",6),I("change",function(r){return X(e),Q(w().runSelected.emit(r.target.value))}),h(16,"option",7),T(17,"-"),g(),S(18,rEe,2,2,"option",8),g()(),h(19,"div",9)(20,"span"),T(21,"Download as\u2026"),g(),T(22,"\xa0"),h(23,"a",10),T(24,"JSON"),g(),h(25,"a",10),T(26,"CSV"),g()()(),h(27,"mat-dialog-actions",11)(28,"button",12),T(29,"Close"),g()(),kt()}if(2&n){let e=it(3),i=w();v(6),_("ngTemplateOutlet",e),v(3),_("title",i.cardMetadata.tag),v(1),bt(i.cardMetadata.tag),v(5),_("value",i.selectedRunId||""),v(1),_("value",""),v(2),_("ngForOf",i.runs),v(5),_("disabled",!i.downloadUrlJson)("download",i.getDownloadName("json"))("href",i.downloadUrlJson,ka),v(2),_("disabled",!i.downloadUrlCsv)("download",i.getDownloadName("csv"))("href",i.downloadUrlCsv,ka)}}function sEe(n,t){1&n&&T(0,"Loading...")}var OQ=(()=>{class n{constructor(){this.runSelected=new F,this.PluginType=zn}getDownloadName(e){let i=this.runs.find(r=>r.id===this.selectedRunId);return i?`${i.name}.${e}`:""}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["data_download_dialog_component"]],inputs:{cardMetadata:"cardMetadata",runs:"runs",selectedRunId:"selectedRunId",downloadUrlCsv:"downloadUrlCsv",downloadUrlJson:"downloadUrlJson"},outputs:{runSelected:"runSelected"},decls:3,vars:2,consts:[[4,"ngIf","ngIfElse"],["noCardMetadata",""],["dataName",""],[4,"ngTemplateOutlet"],[1,"tag-name",3,"title"],["appearance","fill",1,"run-selector"],["matNativeControl","","name","run","cdkFocusInitial","","required","",3,"value","change"],["selected","",3,"value"],[3,"value",4,"ngFor","ngForOf"],[1,"download-controls"],["mat-stroked-button","",3,"disabled","download","href","includeFeatureFlags"],["align","end"],["mat-button","","mat-dialog-close",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"NgSwitchDefault"],[3,"value"]],template:function(e,i){if(1&e&&(S(0,oEe,30,12,"ng-container",0),S(1,sEe,1,0,"ng-template",null,1,Wt)),2&e){let r=it(2);_("ngIf",i.cardMetadata)("ngIfElse",r)}},dependencies:[nn,Fe,Lr,sr,Sr,GT,uq,fq,R7,Ji,Z1,K1,J1,Uu,Ka,kc],styles:["h2[_ngcontent-%COMP%]{font-size:1.25em;overflow-wrap:break-word}.run-selector[_ngcontent-%COMP%]{font-size:.9em;width:100%}.download-controls[_ngcontent-%COMP%]{font-size:.9em}.download-controls[_ngcontent-%COMP%]   a[_ngcontent-%COMP%]{margin:3px 10px 3px 0}"],changeDetection:0}),n})(),kQ=(()=>{class n{constructor(e,i,r){this.selectedRunId$=new Ai(null),this.cardMetadata$=e.select(Wa,r.cardId).pipe(ke(o=>Boolean(o))),this.downloadUrlCsv$=dn([e.select(Wa,r.cardId),this.selectedRunId$]).pipe(N(([o,s])=>o&&s?i.downloadUrl(o.plugin,o.tag,s,"csv"):null),qn(null)),this.downloadUrlJson$=dn([e.select(Wa,r.cardId),this.selectedRunId$]).pipe(N(([o,s])=>o&&s?i.downloadUrl(o.plugin,o.tag,s,"json"):null),qn(null)),this.runs$=dn([e.select(VW),e.select(Cu,r.cardId)]).pipe(N(([o,s])=>s?Object.keys(s).map(a=>o.get(a)).filter(Boolean):[]))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Tc),C(Xv))},n.\u0275cmp=O({type:n,selectors:[["data_download_dialog"]],decls:6,vars:15,consts:[[3,"cardMetadata","runs","selectedRunId","downloadUrlCsv","downloadUrlJson","runSelected"]],template:function(e,i){1&e&&(h(0,"data_download_dialog_component",0),I("runSelected",function(o){return i.selectedRunId$.next(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),g()),2&e&&_("cardMetadata",W(1,5,i.cardMetadata$))("runs",W(2,7,i.runs$))("selectedRunId",W(3,9,i.selectedRunId$))("downloadUrlCsv",W(4,11,i.downloadUrlCsv$))("downloadUrlJson",W(5,13,i.downloadUrlJson$))},dependencies:[OQ,ct],encapsulation:2,changeDetection:0}),n})();function il(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function Cy(n){return 1===n.length&&(n=function(n){return function(t,e){return il(n(t),e)}}(n)),{left:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;n(t[o],e)<0?i=o+1:r=o}return i},right:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i<r;){var o=i+r>>>1;n(t[o],e)>0?r=o:i=o+1}return i}}}var Hc=Cy(il).right,BN=Math.sqrt(50),VN=Math.sqrt(10),HN=Math.sqrt(2);function My(n,t,e){var i,o,s,a,r=-1;if(e=+e,(n=+n)==(t=+t)&&e>0)return[n];if((i=t<n)&&(o=n,n=t,t=o),0===(a=Zg(n,t,e))||!isFinite(a))return[];if(a>0)for(n=Math.ceil(n/a),t=Math.floor(t/a),s=new Array(o=Math.ceil(t-n+1));++r<o;)s[r]=(n+r)*a;else for(n=Math.floor(n*a),t=Math.ceil(t*a),s=new Array(o=Math.ceil(n-t+1));++r<o;)s[r]=(n-r)/a;return i&&s.reverse(),s}function Zg(n,t,e){var i=(t-n)/Math.max(0,e),r=Math.floor(Math.log(i)/Math.LN10),o=i/Math.pow(10,r);return r>=0?(o>=BN?10:o>=VN?5:o>=HN?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(o>=BN?10:o>=VN?5:o>=HN?2:1)}function Ad(n,t,e){var i=Math.abs(t-n)/Math.max(0,e),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),o=i/r;return o>=BN?r*=10:o>=VN?r*=5:o>=HN&&(r*=2),t<n?-r:r}var XT=Array.prototype.slice;function HQ(n){return n}var UN=1,ZT=2,jN=3,QT=4,zQ=1e-6;function _Ee(n){return"translate("+(n+.5)+",0)"}function bEe(n){return"translate(0,"+(n+.5)+")"}function vEe(n){return function(t){return+n(t)}}function yEe(n){var t=Math.max(0,n.bandwidth()-1)/2;return n.round()&&(t=Math.round(t)),function(e){return+n(e)+t}}function xEe(){return!this.__axis}function UQ(n,t){var e=[],i=null,r=null,o=6,s=6,a=3,l=n===UN||n===QT?-1:1,c=n===QT||n===ZT?"x":"y",d=n===UN||n===jN?_Ee:bEe;function u(p){var f=i??(t.ticks?t.ticks.apply(t,e):t.domain()),m=r??(t.tickFormat?t.tickFormat.apply(t,e):HQ),b=Math.max(o,0)+a,M=t.range(),y=+M[0]+.5,x=+M[M.length-1]+.5,R=(t.bandwidth?yEe:vEe)(t.copy()),A=p.selection?p.selection():p,V=A.selectAll(".domain").data([null]),te=A.selectAll(".tick").data(f,t).order(),K=te.exit(),xe=te.enter().append("g").attr("class","tick"),Xe=te.select("line"),De=te.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),te=te.merge(xe),Xe=Xe.merge(xe.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),De=De.merge(xe.append("text").attr("fill","currentColor").attr(c,l*b).attr("dy",n===UN?"0em":n===jN?"0.71em":"0.32em")),p!==A&&(V=V.transition(p),te=te.transition(p),Xe=Xe.transition(p),De=De.transition(p),K=K.transition(p).attr("opacity",zQ).attr("transform",function(D){return isFinite(D=R(D))?d(D):this.getAttribute("transform")}),xe.attr("opacity",zQ).attr("transform",function(D){var re=this.parentNode.__axis;return d(re&&isFinite(re=re(D))?re:R(D))})),K.remove(),V.attr("d",n===QT||n==ZT?s?"M"+l*s+","+y+"H0.5V"+x+"H"+l*s:"M0.5,"+y+"V"+x:s?"M"+y+","+l*s+"V0.5H"+x+"V"+l*s:"M"+y+",0.5H"+x),te.attr("opacity",1).attr("transform",function(D){return d(R(D))}),Xe.attr(c+"2",l*o),De.attr(c,l*b).text(m),A.filter(xEe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",n===ZT?"start":n===QT?"end":"middle"),A.each(function(){this.__axis=R})}return u.scale=function(p){return arguments.length?(t=p,u):t},u.ticks=function(){return e=XT.call(arguments),u},u.tickArguments=function(p){return arguments.length?(e=null==p?[]:XT.call(p),u):e.slice()},u.tickValues=function(p){return arguments.length?(i=null==p?null:XT.call(p),u):i&&i.slice()},u.tickFormat=function(p){return arguments.length?(r=p,u):r},u.tickSize=function(p){return arguments.length?(o=s=+p,u):o},u.tickSizeInner=function(p){return arguments.length?(o=+p,u):o},u.tickSizeOuter=function(p){return arguments.length?(s=+p,u):s},u.tickPadding=function(p){return arguments.length?(a=+p,u):a},u}var CEe={value:function(){}};function GQ(){for(var i,n=0,t=arguments.length,e={};n<t;++n){if(!(i=arguments[n]+"")||i in e||/[\s.]/.test(i))throw new Error("illegal type: "+i);e[i]=[]}return new KT(e)}function KT(n){this._=n}function wEe(n,t){for(var r,e=0,i=n.length;e<i;++e)if((r=n[e]).name===t)return r.value}function jQ(n,t,e){for(var i=0,r=n.length;i<r;++i)if(n[i].name===t){n[i]=CEe,n=n.slice(0,i).concat(n.slice(i+1));break}return null!=e&&n.push({name:t,value:e}),n}KT.prototype=GQ.prototype={constructor:KT,on:function(n,t){var r,e=this._,i=function(n,t){return n.trim().split(/^|\s+/).map(function(e){var i="",r=e.indexOf(".");if(r>=0&&(i=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:i}})}(n+"",e),o=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++o<s;)if(r=(n=i[o]).type)e[r]=jQ(e[r],n.name,t);else if(null==t)for(r in e)e[r]=jQ(e[r],n.name,null);return this}for(;++o<s;)if((r=(n=i[o]).type)&&(r=wEe(e[r],n.name)))return r},copy:function(){var n={},t=this._;for(var e in t)n[e]=t[e].slice();return new KT(n)},call:function(n,t){if((r=arguments.length-2)>0)for(var r,o,e=new Array(r),i=0;i<r;++i)e[i]=arguments[i+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(i=0,r=(o=this._[n]).length;i<r;++i)o[i].value.apply(t,e)},apply:function(n,t,e){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var i=this._[n],r=0,o=i.length;r<o;++r)i[r].value.apply(t,e)}};var qN=GQ,JT="http://www.w3.org/1999/xhtml",YN={svg:"http://www.w3.org/2000/svg",xhtml:JT,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rd(n){var t=n+="",e=t.indexOf(":");return e>=0&&"xmlns"!==(t=n.slice(0,e))&&(n=n.slice(e+1)),YN.hasOwnProperty(t)?{space:YN[t],local:n}:n}function SEe(n){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===JT&&t.documentElement.namespaceURI===JT?t.createElement(n):t.createElementNS(e,n)}}function EEe(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function $T(n){var t=Rd(n);return(t.local?EEe:SEe)(t)}function TEe(){}function Lf(n){return null==n?TEe:function(){return this.querySelector(n)}}function DEe(){return[]}function Sy(n){return null==n?DEe:function(){return this.querySelectorAll(n)}}function Ey(n){return function(){return this.matches(n)}}function eD(n){return new Array(n.length)}function Ty(n,t){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=t}Ty.prototype={constructor:Ty,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,t){return this._parent.insertBefore(n,t)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};var ZQ="$";function IEe(n,t,e,i,r,o){for(var a,s=0,l=t.length,c=o.length;s<c;++s)(a=t[s])?(a.__data__=o[s],i[s]=a):e[s]=new Ty(n,o[s]);for(;s<l;++s)(a=t[s])&&(r[s]=a)}function AEe(n,t,e,i,r,o,s){var a,l,f,c={},d=t.length,u=o.length,p=new Array(d);for(a=0;a<d;++a)(l=t[a])&&(p[a]=f=ZQ+s.call(l,l.__data__,a,t),f in c?r[a]=l:c[f]=l);for(a=0;a<u;++a)(l=c[f=ZQ+s.call(n,o[a],a,o)])?(i[a]=l,l.__data__=o[a],c[f]=null):e[a]=new Ty(n,o[a]);for(a=0;a<d;++a)(l=t[a])&&c[p[a]]===l&&(r[a]=l)}function REe(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function PEe(n){return function(){this.removeAttribute(n)}}function OEe(n){return function(){this.removeAttributeNS(n.space,n.local)}}function kEe(n,t){return function(){this.setAttribute(n,t)}}function FEe(n,t){return function(){this.setAttributeNS(n.space,n.local,t)}}function NEe(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}}function LEe(n,t){return function(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}}function tD(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function BEe(n){return function(){this.style.removeProperty(n)}}function VEe(n,t,e){return function(){this.style.setProperty(n,t,e)}}function HEe(n,t,e){return function(){var i=t.apply(this,arguments);null==i?this.style.removeProperty(n):this.style.setProperty(n,i,e)}}function Zu(n,t){return n.style.getPropertyValue(t)||tD(n).getComputedStyle(n,null).getPropertyValue(t)}function zEe(n){return function(){delete this[n]}}function UEe(n,t){return function(){this[n]=t}}function jEe(n,t){return function(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}}function pZ(n){return n.trim().split(/^|\s+/)}function XN(n){return n.classList||new fZ(n)}function fZ(n){this._node=n,this._names=pZ(n.getAttribute("class")||"")}function mZ(n,t){for(var e=XN(n),i=-1,r=t.length;++i<r;)e.add(t[i])}function hZ(n,t){for(var e=XN(n),i=-1,r=t.length;++i<r;)e.remove(t[i])}function GEe(n){return function(){mZ(this,n)}}function WEe(n){return function(){hZ(this,n)}}function qEe(n,t){return function(){(t.apply(this,arguments)?mZ:hZ)(this,n)}}function YEe(){this.textContent=""}function XEe(n){return function(){this.textContent=n}}function QEe(n){return function(){var t=n.apply(this,arguments);this.textContent=t??""}}function ZEe(){this.innerHTML=""}function KEe(n){return function(){this.innerHTML=n}}function JEe(n){return function(){var t=n.apply(this,arguments);this.innerHTML=t??""}}function $Ee(){this.nextSibling&&this.parentNode.appendChild(this)}function eTe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function tTe(){return null}function nTe(){var n=this.parentNode;n&&n.removeChild(this)}function iTe(){var n=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}function rTe(){var n=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(n,this.nextSibling):n}fZ.prototype={add:function(n){this._names.indexOf(n)<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var t=this._names.indexOf(n);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};var TZ={},QN=null;function oTe(n,t,e){return n=DZ(n,t,e),function(i){var r=i.relatedTarget;(!r||r!==this&&!(8&r.compareDocumentPosition(this)))&&n.call(this,i)}}function DZ(n,t,e){return function(i){var r=QN;QN=i;try{n.call(this,this.__data__,t,e)}finally{QN=r}}}function aTe(n){return function(){var t=this.__on;if(t){for(var o,e=0,i=-1,r=t.length;e<r;++e)o=t[e],n.type&&o.type!==n.type||o.name!==n.name?t[++i]=o:this.removeEventListener(o.type,o.listener,o.capture);++i?t.length=i:delete this.__on}}}function lTe(n,t,e){var i=TZ.hasOwnProperty(n.type)?oTe:DZ;return function(r,o,s){var l,a=this.__on,c=i(t,o,s);if(a)for(var d=0,u=a.length;d<u;++d)if((l=a[d]).type===n.type&&l.name===n.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=c,l.capture=e),void(l.value=t);this.addEventListener(n.type,c,e),l={type:n.type,name:n.name,value:t,listener:c,capture:e},a?a.push(l):this.__on=[l]}}function AZ(n,t,e){var i=tD(n),r=i.CustomEvent;"function"==typeof r?r=new r(t,e):(r=i.document.createEvent("Event"),e?(r.initEvent(t,e.bubbles,e.cancelable),r.detail=e.detail):r.initEvent(t,!1,!1)),n.dispatchEvent(r)}function cTe(n,t){return function(){return AZ(this,n,t)}}function dTe(n,t){return function(){return AZ(this,n,t.apply(this,arguments))}}typeof document<"u"&&("onmouseenter"in document.documentElement||(TZ={mouseenter:"mouseover",mouseleave:"mouseout"}));var ZN=[null];function Br(n,t){this._groups=n,this._parents=t}function PZ(){return new Br([[document.documentElement]],ZN)}Br.prototype=PZ.prototype={constructor:Br,select:function(n){"function"!=typeof n&&(n=Lf(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,c,o=t[r],s=o.length,a=i[r]=new Array(s),d=0;d<s;++d)(l=o[d])&&(c=n.call(l,l.__data__,d,o))&&("__data__"in l&&(c.__data__=l.__data__),a[d]=c);return new Br(i,this._parents)},selectAll:function(n){"function"!=typeof n&&(n=Sy(n));for(var t=this._groups,e=t.length,i=[],r=[],o=0;o<e;++o)for(var l,s=t[o],a=s.length,c=0;c<a;++c)(l=s[c])&&(i.push(n.call(l,l.__data__,c,s)),r.push(l));return new Br(i,r)},filter:function(n){"function"!=typeof n&&(n=Ey(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],s=o.length,a=i[r]=[],c=0;c<s;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&a.push(l);return new Br(i,this._parents)},data:function(n,t){if(!n)return f=new Array(this.size()),c=-1,this.each(function(te){f[++c]=te}),f;var e=t?AEe:IEe,i=this._parents,r=this._groups;"function"!=typeof n&&(n=function(n){return function(){return n}}(n));for(var o=r.length,s=new Array(o),a=new Array(o),l=new Array(o),c=0;c<o;++c){var d=i[c],u=r[c],p=u.length,f=n.call(d,d&&d.__data__,c,i),m=f.length,b=a[c]=new Array(m),M=s[c]=new Array(m);e(d,u,b,M,l[c]=new Array(p),f,t);for(var A,V,x=0,R=0;x<m;++x)if(A=b[x]){for(x>=R&&(R=x+1);!(V=M[R])&&++R<m;);A._next=V||null}}return(s=new Br(s,i))._enter=a,s._exit=l,s},enter:function(){return new Br(this._enter||this._groups.map(eD),this._parents)},exit:function(){return new Br(this._exit||this._groups.map(eD),this._parents)},join:function(n,t,e){var i=this.enter(),r=this,o=this.exit();return i="function"==typeof n?n(i):i.append(n+""),null!=t&&(r=t(r)),null==e?o.remove():e(o),i&&r?i.merge(r).order():r},merge:function(n){for(var t=this._groups,e=n._groups,i=t.length,o=Math.min(i,e.length),s=new Array(i),a=0;a<o;++a)for(var p,l=t[a],c=e[a],d=l.length,u=s[a]=new Array(d),f=0;f<d;++f)(p=l[f]||c[f])&&(u[f]=p);for(;a<i;++a)s[a]=t[a];return new Br(s,this._parents)},order:function(){for(var n=this._groups,t=-1,e=n.length;++t<e;)for(var s,i=n[t],r=i.length-1,o=i[r];--r>=0;)(s=i[r])&&(o&&4^s.compareDocumentPosition(o)&&o.parentNode.insertBefore(s,o),o=s);return this},sort:function(n){function t(u,p){return u&&p?n(u.__data__,p.__data__):!u-!p}n||(n=REe);for(var e=this._groups,i=e.length,r=new Array(i),o=0;o<i;++o){for(var c,s=e[o],a=s.length,l=r[o]=new Array(a),d=0;d<a;++d)(c=s[d])&&(l[d]=c);l.sort(t)}return new Br(r,this._parents).order()},call:function(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this},nodes:function(){var n=new Array(this.size()),t=-1;return this.each(function(){n[++t]=this}),n},node:function(){for(var n=this._groups,t=0,e=n.length;t<e;++t)for(var i=n[t],r=0,o=i.length;r<o;++r){var s=i[r];if(s)return s}return null},size:function(){var n=0;return this.each(function(){++n}),n},empty:function(){return!this.node()},each:function(n){for(var t=this._groups,e=0,i=t.length;e<i;++e)for(var a,r=t[e],o=0,s=r.length;o<s;++o)(a=r[o])&&n.call(a,a.__data__,o,r);return this},attr:function(n,t){var e=Rd(n);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==t?e.local?OEe:PEe:"function"==typeof t?e.local?LEe:NEe:e.local?FEe:kEe)(e,t))},style:function(n,t,e){return arguments.length>1?this.each((null==t?BEe:"function"==typeof t?HEe:VEe)(n,t,e??"")):Zu(this.node(),n)},property:function(n,t){return arguments.length>1?this.each((null==t?zEe:"function"==typeof t?jEe:UEe)(n,t)):this.node()[n]},classed:function(n,t){var e=pZ(n+"");if(arguments.length<2){for(var i=XN(this.node()),r=-1,o=e.length;++r<o;)if(!i.contains(e[r]))return!1;return!0}return this.each(("function"==typeof t?qEe:t?GEe:WEe)(e,t))},text:function(n){return arguments.length?this.each(null==n?YEe:("function"==typeof n?QEe:XEe)(n)):this.node().textContent},html:function(n){return arguments.length?this.each(null==n?ZEe:("function"==typeof n?JEe:KEe)(n)):this.node().innerHTML},raise:function(){return this.each($Ee)},lower:function(){return this.each(eTe)},append:function(n){var t="function"==typeof n?n:$T(n);return this.select(function(){return this.appendChild(t.apply(this,arguments))})},insert:function(n,t){var e="function"==typeof n?n:$T(n),i=null==t?tTe:"function"==typeof t?t:Lf(t);return this.select(function(){return this.insertBefore(e.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(nTe)},clone:function(n){return this.select(n?rTe:iTe)},datum:function(n){return arguments.length?this.property("__data__",n):this.node().__data__},on:function(n,t,e){var r,s,i=function(n){return n.trim().split(/^|\s+/).map(function(t){var e="",i=t.indexOf(".");return i>=0&&(e=t.slice(i+1),t=t.slice(0,i)),{type:t,name:e}})}(n+""),o=i.length;if(!(arguments.length<2)){for(a=t?lTe:aTe,null==e&&(e=!1),r=0;r<o;++r)this.each(a(i[r],t,e));return this}var a=this.node().__on;if(a)for(var d,l=0,c=a.length;l<c;++l)for(r=0,d=a[l];r<o;++r)if((s=i[r]).type===d.type&&s.name===d.name)return d.value},dispatch:function(n,t){return this.each(("function"==typeof t?dTe:cTe)(n,t))}};var Pd=PZ;function nD(n){return"string"==typeof n?new Br([[document.querySelector(n)]],[document.documentElement]):new Br([[n]],ZN)}function Bf(n,t,e){n.prototype=t.prototype=e,e.constructor=n}function Kg(n,t){var e=Object.create(n.prototype);for(var i in t)e[i]=t[i];return e}function Ku(){}var rD=1/.7,Jg="\\s*([+-]?\\d+)\\s*",Iy="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Uc="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uTe=/^#([0-9a-f]{3,8})$/,pTe=new RegExp("^rgb\\("+[Jg,Jg,Jg]+"\\)$"),fTe=new RegExp("^rgb\\("+[Uc,Uc,Uc]+"\\)$"),mTe=new RegExp("^rgba\\("+[Jg,Jg,Jg,Iy]+"\\)$"),hTe=new RegExp("^rgba\\("+[Uc,Uc,Uc,Iy]+"\\)$"),gTe=new RegExp("^hsl\\("+[Iy,Uc,Uc]+"\\)$"),_Te=new RegExp("^hsla\\("+[Iy,Uc,Uc,Iy]+"\\)$"),OZ={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};function kZ(){return this.rgb().formatHex()}function FZ(){return this.rgb().formatRgb()}function Gl(n){var t,e;return n=(n+"").trim().toLowerCase(),(t=uTe.exec(n))?(e=t[1].length,t=parseInt(t[1],16),6===e?NZ(t):3===e?new Zo(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===e?iD(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===e?iD(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=pTe.exec(n))?new Zo(t[1],t[2],t[3],1):(t=fTe.exec(n))?new Zo(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=mTe.exec(n))?iD(t[1],t[2],t[3],t[4]):(t=hTe.exec(n))?iD(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=gTe.exec(n))?VZ(t[1],t[2]/100,t[3]/100,1):(t=_Te.exec(n))?VZ(t[1],t[2]/100,t[3]/100,t[4]):OZ.hasOwnProperty(n)?NZ(OZ[n]):"transparent"===n?new Zo(NaN,NaN,NaN,0):null}function NZ(n){return new Zo(n>>16&255,n>>8&255,255&n,1)}function iD(n,t,e,i){return i<=0&&(n=t=e=NaN),new Zo(n,t,e,i)}function $N(n){return n instanceof Ku||(n=Gl(n)),n?new Zo((n=n.rgb()).r,n.g,n.b,n.opacity):new Zo}function $g(n,t,e,i){return 1===arguments.length?$N(n):new Zo(n,t,e,i??1)}function Zo(n,t,e,i){this.r=+n,this.g=+t,this.b=+e,this.opacity=+i}function LZ(){return"#"+KN(this.r)+KN(this.g)+KN(this.b)}function BZ(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===n?")":", "+n+")")}function KN(n){return((n=Math.max(0,Math.min(255,Math.round(n)||0)))<16?"0":"")+n.toString(16)}function VZ(n,t,e,i){return i<=0?n=t=e=NaN:e<=0||e>=1?n=t=NaN:t<=0&&(n=NaN),new zc(n,t,e,i)}function HZ(n){if(n instanceof zc)return new zc(n.h,n.s,n.l,n.opacity);if(n instanceof Ku||(n=Gl(n)),!n)return new zc;if(n instanceof zc)return n;var t=(n=n.rgb()).r/255,e=n.g/255,i=n.b/255,r=Math.min(t,e,i),o=Math.max(t,e,i),s=NaN,a=o-r,l=(o+r)/2;return a?(s=t===o?(e-i)/a+6*(e<i):e===o?(i-t)/a+2:(t-e)/a+4,a/=l<.5?o+r:2-o-r,s*=60):a=l>0&&l<1?0:s,new zc(s,a,l,n.opacity)}function Vf(n,t,e,i){return 1===arguments.length?HZ(n):new zc(n,t,e,i??1)}function zc(n,t,e,i){this.h=+n,this.s=+t,this.l=+e,this.opacity=+i}function JN(n,t,e){return 255*(n<60?t+(e-t)*n/60:n<180?e:n<240?t+(e-t)*(240-n)/60:t)}Bf(Ku,Gl,{copy:function(n){return Object.assign(new this.constructor,this,n)},displayable:function(){return this.rgb().displayable()},hex:kZ,formatHex:kZ,formatHsl:function(){return HZ(this).formatHsl()},formatRgb:FZ,toString:FZ}),Bf(Zo,$g,Kg(Ku,{brighter:function(n){return n=null==n?rD:Math.pow(rD,n),new Zo(this.r*n,this.g*n,this.b*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new Zo(this.r*n,this.g*n,this.b*n,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:LZ,formatHex:LZ,formatRgb:BZ,toString:BZ})),Bf(zc,Vf,Kg(Ku,{brighter:function(n){return n=null==n?rD:Math.pow(rD,n),new zc(this.h,this.s,this.l*n,this.opacity)},darker:function(n){return n=null==n?.7:Math.pow(.7,n),new zc(this.h,this.s,this.l*n,this.opacity)},rgb:function(){var n=this.h%360+360*(this.h<0),t=isNaN(n)||isNaN(this.s)?0:this.s,e=this.l,i=e+(e<.5?e:1-e)*t,r=2*e-i;return new Zo(JN(n>=240?n-240:n+120,r,i),JN(n,r,i),JN(n<120?n+240:n-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var n=this.opacity;return(1===(n=isNaN(n)?1:Math.max(0,Math.min(1,n)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===n?")":", "+n+")")}}));var zZ=Math.PI/180,UZ=180/Math.PI,jZ=.96422,GZ=1,WZ=.82521,qZ=4/29,e0=6/29,YZ=3*e0*e0,vTe=e0*e0*e0;function XZ(n){if(n instanceof jc)return new jc(n.l,n.a,n.b,n.opacity);if(n instanceof Od)return QZ(n);n instanceof Zo||(n=$N(n));var o,s,t=iL(n.r),e=iL(n.g),i=iL(n.b),r=eL((.2225045*t+.7168786*e+.0606169*i)/GZ);return t===e&&e===i?o=s=r:(o=eL((.4360747*t+.3850649*e+.1430804*i)/jZ),s=eL((.0139322*t+.0971045*e+.7141733*i)/WZ)),new jc(116*r-16,500*(o-r),200*(r-s),n.opacity)}function jc(n,t,e,i){this.l=+n,this.a=+t,this.b=+e,this.opacity=+i}function eL(n){return n>vTe?Math.pow(n,1/3):n/YZ+qZ}function tL(n){return n>e0?n*n*n:YZ*(n-qZ)}function nL(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function iL(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Hf(n,t,e,i){return 1===arguments.length?function(n){if(n instanceof Od)return new Od(n.h,n.c,n.l,n.opacity);if(n instanceof jc||(n=XZ(n)),0===n.a&&0===n.b)return new Od(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var t=Math.atan2(n.b,n.a)*UZ;return new Od(t<0?t+360:t,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}(n):new Od(n,t,e,i??1)}function Od(n,t,e,i){this.h=+n,this.c=+t,this.l=+e,this.opacity=+i}function QZ(n){if(isNaN(n.h))return new jc(n.l,0,0,n.opacity);var t=n.h*zZ;return new jc(n.l,Math.cos(t)*n.c,Math.sin(t)*n.c,n.opacity)}function oL(n,t,e,i,r){var o=n*n,s=o*n;return((1-3*n+3*o-s)*t+(4-6*o+3*s)*e+(1+3*n+3*o-3*s)*i+s*r)/6}function t0(n){return function(){return n}}function JZ(n,t){return function(e){return n+e*t}}function sD(n,t){var e=t-n;return e?JZ(n,e>180||e<-180?e-360*Math.round(e/360):e):t0(isNaN(n)?t:n)}function Xs(n,t){var e=t-n;return e?JZ(n,e):t0(isNaN(n)?t:n)}Bf(jc,function(n,t,e,i){return 1===arguments.length?XZ(n):new jc(n,t,e,i??1)},Kg(Ku,{brighter:function(n){return new jc(this.l+18*(n??1),this.a,this.b,this.opacity)},darker:function(n){return new jc(this.l-18*(n??1),this.a,this.b,this.opacity)},rgb:function(){var n=(this.l+16)/116,t=isNaN(this.a)?n:n+this.a/500,e=isNaN(this.b)?n:n-this.b/200;return new Zo(nL(3.1338561*(t=jZ*tL(t))-1.6168667*(n=GZ*tL(n))-.4906146*(e=WZ*tL(e))),nL(-.9787684*t+1.9161415*n+.033454*e),nL(.0719453*t-.2289914*n+1.4052427*e),this.opacity)}})),Bf(Od,Hf,Kg(Ku,{brighter:function(n){return new Od(this.h,this.c,this.l+18*(n??1),this.opacity)},darker:function(n){return new Od(this.h,this.c,this.l-18*(n??1),this.opacity)},rgb:function(){return QZ(this).rgb()}}));var zf=function n(t){var e=function(n){return 1==(n=+n)?Xs:function(t,e){return e-t?function(n,t,e){return n=Math.pow(n,e),t=Math.pow(t,e)-n,e=1/e,function(i){return Math.pow(n+i*t,e)}}(t,e,n):t0(isNaN(t)?e:t)}}(t);function i(r,o){var s=e((r=$g(r)).r,(o=$g(o)).r),a=e(r.g,o.g),l=e(r.b,o.b),c=Xs(r.opacity,o.opacity);return function(d){return r.r=s(d),r.g=a(d),r.b=l(d),r.opacity=c(d),r+""}}return i.gamma=n,i}(1);function eK(n){return function(t){var s,a,e=t.length,i=new Array(e),r=new Array(e),o=new Array(e);for(s=0;s<e;++s)a=$g(t[s]),i[s]=a.r||0,r[s]=a.g||0,o[s]=a.b||0;return i=n(i),r=n(r),o=n(o),a.opacity=1,function(l){return a.r=i(l),a.g=r(l),a.b=o(l),a+""}}}function tK(n,t){t||(t=[]);var r,e=n?Math.min(t.length,n.length):0,i=t.slice();return function(o){for(r=0;r<e;++r)i[r]=n[r]*(1-o)+t[r]*o;return i}}function iK(n,t){var s,e=t?t.length:0,i=n?Math.min(e,n.length):0,r=new Array(i),o=new Array(e);for(s=0;s<i;++s)r[s]=Uf(n[s],t[s]);for(;s<e;++s)o[s]=t[s];return function(a){for(s=0;s<i;++s)o[s]=r[s](a);return o}}function rK(n,t){var e=new Date;return n=+n,t=+t,function(i){return e.setTime(n*(1-i)+t*i),e}}function Bo(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function oK(n,t){var r,e={},i={};for(r in(null===n||"object"!=typeof n)&&(n={}),(null===t||"object"!=typeof t)&&(t={}),t)r in n?e[r]=Uf(n[r],t[r]):i[r]=t[r];return function(o){for(r in e)i[r]=e[r](o);return i}}eK(function(n){var t=n.length-1;return function(e){var i=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),r=n[i],o=n[i+1];return oL((e-i/t)*t,i>0?n[i-1]:2*r-o,r,o,i<t-1?n[i+2]:2*o-r)}}),eK(function(n){var t=n.length;return function(e){var i=Math.floor(((e%=1)<0?++e:e)*t);return oL((e-i/t)*t,n[(i+t-1)%t],n[i%t],n[(i+1)%t],n[(i+2)%t])}});var aL=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,sL=new RegExp(aL.source,"g");function Ay(n,t){var i,r,o,e=aL.lastIndex=sL.lastIndex=0,s=-1,a=[],l=[];for(n+="",t+="";(i=aL.exec(n))&&(r=sL.exec(t));)(o=r.index)>e&&(o=t.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(i=i[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:Bo(i,r)})),e=sL.lastIndex;return e<t.length&&(o=t.slice(e),a[s]?a[s]+=o:a[++s]=o),a.length<2?l[0]?function(n){return function(t){return n(t)+""}}(l[0].x):function(n){return function(){return n}}(t):(t=l.length,function(c){for(var u,d=0;d<t;++d)a[(u=l[d]).i]=u.x(c);return a.join("")})}function Uf(n,t){var i,e=typeof t;return null==t||"boolean"===e?t0(t):("number"===e?Bo:"string"===e?(i=Gl(t))?(t=i,zf):Ay:t instanceof Gl?zf:t instanceof Date?rK:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}(t)?tK:Array.isArray(t)?iK:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?oK:Bo)(n,t)}function lL(n,t){return n=+n,t=+t,function(e){return Math.round(n*(1-e)+t*e)}}var Ry,dL,aK,lD,sK=180/Math.PI,aD={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function cL(n,t,e,i,r,o){var s,a,l;return(s=Math.sqrt(n*n+t*t))&&(n/=s,t/=s),(l=n*e+t*i)&&(e-=n*l,i-=t*l),(a=Math.sqrt(e*e+i*i))&&(e/=a,i/=a,l/=a),n*i<t*e&&(n=-n,t=-t,l=-l,s=-s),{translateX:r,translateY:o,rotate:Math.atan2(t,n)*sK,skewX:Math.atan(l)*sK,scaleX:s,scaleY:a}}function dK(n,t,e,i){function r(c){return c.length?c.pop()+" ":""}return function(c,d){var u=[],p=[];return c=n(c),d=n(d),function(c,d,u,p,f,m){if(c!==u||d!==p){var b=f.push("translate(",null,t,null,e);m.push({i:b-4,x:Bo(c,u)},{i:b-2,x:Bo(d,p)})}else(u||p)&&f.push("translate("+u+t+p+e)}(c.translateX,c.translateY,d.translateX,d.translateY,u,p),function(c,d,u,p){c!==d?(c-d>180?d+=360:d-c>180&&(c+=360),p.push({i:u.push(r(u)+"rotate(",null,i)-2,x:Bo(c,d)})):d&&u.push(r(u)+"rotate("+d+i)}(c.rotate,d.rotate,u,p),function(c,d,u,p){c!==d?p.push({i:u.push(r(u)+"skewX(",null,i)-2,x:Bo(c,d)}):d&&u.push(r(u)+"skewX("+d+i)}(c.skewX,d.skewX,u,p),function(c,d,u,p,f,m){if(c!==u||d!==p){var b=f.push(r(f)+"scale(",null,",",null,")");m.push({i:b-4,x:Bo(c,u)},{i:b-2,x:Bo(d,p)})}else(1!==u||1!==p)&&f.push(r(f)+"scale("+u+","+p+")")}(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,p),c=d=null,function(f){for(var M,m=-1,b=p.length;++m<b;)u[(M=p[m]).i]=M.x(f);return u.join("")}}}var uL=dK(function(n){return"none"===n?aD:(Ry||(Ry=document.createElement("DIV"),dL=document.documentElement,aK=document.defaultView),Ry.style.transform=n,n=aK.getComputedStyle(dL.appendChild(Ry),null).getPropertyValue("transform"),dL.removeChild(Ry),cL(+(n=n.slice(7,-1).split(","))[0],+n[1],+n[2],+n[3],+n[4],+n[5]))},"px, ","px)","deg)"),pL=dK(function(n){return null==n?aD:(lD||(lD=document.createElementNS("http://www.w3.org/2000/svg","g")),lD.setAttribute("transform",n),(n=lD.transform.baseVal.consolidate())?cL((n=n.matrix).a,n.b,n.c,n.d,n.e,n.f):aD)},", ",")",")");function uK(n){return function(t,e){var i=n((t=Vf(t)).h,(e=Vf(e)).h),r=Xs(t.s,e.s),o=Xs(t.l,e.l),s=Xs(t.opacity,e.opacity);return function(a){return t.h=i(a),t.s=r(a),t.l=o(a),t.opacity=s(a),t+""}}}var fL=uK(sD);function pK(n){return function(t,e){var i=n((t=Hf(t)).h,(e=Hf(e)).h),r=Xs(t.c,e.c),o=Xs(t.l,e.l),s=Xs(t.opacity,e.opacity);return function(a){return t.h=i(a),t.c=r(a),t.l=o(a),t.opacity=s(a),t+""}}}uK(Xs);var cD,ky,mL=pK(sD),n0=(pK(Xs),0),Oy=0,Py=0,mK=1e3,dD=0,jf=0,uD=0,Fy="object"==typeof performance&&performance.now?performance:Date,hK="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function i0(){return jf||(hK(DTe),jf=Fy.now()+uD)}function DTe(){jf=0}function Ny(){this._call=this._time=this._next=null}function pD(n,t,e){var i=new Ny;return i.restart(n,t,e),i}function fK(){jf=(dD=Fy.now())+uD,n0=Oy=0;try{!function(){i0(),++n0;for(var t,n=cD;n;)(t=jf-n._time)>=0&&n._call.call(null,t),n=n._next;--n0}()}finally{n0=0,function(){for(var n,e,t=cD,i=1/0;t;)t._call?(i>t._time&&(i=t._time),n=t,t=t._next):(e=t._next,t._next=null,t=n?n._next=e:cD=e);ky=n,hL(i)}(),jf=0}}function ITe(){var n=Fy.now(),t=n-dD;t>mK&&(uD-=t,dD=n)}function hL(n){n0||(Oy&&(Oy=clearTimeout(Oy)),n-jf>24?(n<1/0&&(Oy=setTimeout(fK,n-Fy.now()-uD)),Py&&(Py=clearInterval(Py))):(Py||(dD=Fy.now(),Py=setInterval(ITe,mK)),n0=1,hK(fK)))}function fD(n,t,e){var i=new Ny;return i.restart(function(r){i.stop(),n(r+t)},t=null==t?0:+t,e),i}Ny.prototype=pD.prototype={constructor:Ny,restart:function(n,t,e){if("function"!=typeof n)throw new TypeError("callback is not a function");e=(null==e?i0():+e)+(null==t?0:+t),!this._next&&ky!==this&&(ky?ky._next=this:cD=this,ky=this),this._call=n,this._time=e,hL()},stop:function(){this._call&&(this._call=null,this._time=1/0,hL())}};var RTe=qN("start","end","cancel","interrupt"),PTe=[],bK=0,gL=1,hD=2,mD=3,_K=4,gD=5,Ly=6;function Ju(n,t,e,i,r,o){var s=n.__transition;if(s){if(e in s)return}else n.__transition={};!function(n,t,e){var r,i=n.__transition;function s(c){var d,u,p,f;if(e.state!==gL)return l();for(d in i)if((f=i[d]).name===e.name){if(f.state===mD)return fD(s);f.state===_K?(f.state=Ly,f.timer.stop(),f.on.call("interrupt",n,n.__data__,f.index,f.group),delete i[d]):+d<t&&(f.state=Ly,f.timer.stop(),f.on.call("cancel",n,n.__data__,f.index,f.group),delete i[d])}if(fD(function(){e.state===mD&&(e.state=_K,e.timer.restart(a,e.delay,e.time),a(c))}),e.state=hD,e.on.call("start",n,n.__data__,e.index,e.group),e.state===hD){for(e.state=mD,r=new Array(p=e.tween.length),d=0,u=-1;d<p;++d)(f=e.tween[d].value.call(n,n.__data__,e.index,e.group))&&(r[++u]=f);r.length=u+1}}function a(c){for(var d=c<e.duration?e.ease.call(null,c/e.duration):(e.timer.restart(l),e.state=gD,1),u=-1,p=r.length;++u<p;)r[u].call(n,d);e.state===gD&&(e.on.call("end",n,n.__data__,e.index,e.group),l())}function l(){for(var c in e.state=Ly,e.timer.stop(),delete i[t],i)return;delete n.__transition}i[t]=e,e.timer=pD(function(c){e.state=gL,e.timer.restart(s,e.delay,e.time),e.delay<=c&&s(c-e.delay)},0,e.time)}(n,e,{name:t,index:i,group:r,on:RTe,tween:PTe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:bK})}function By(n,t){var e=ho(n,t);if(e.state>bK)throw new Error("too late; already scheduled");return e}function ms(n,t){var e=ho(n,t);if(e.state>mD)throw new Error("too late; already running");return e}function ho(n,t){var e=n.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function kTe(n,t){var e,i;return function(){var r=ms(this,n),o=r.tween;if(o!==e)for(var s=0,a=(i=e=o).length;s<a;++s)if(i[s].name===t){(i=i.slice()).splice(s,1);break}r.tween=i}}function FTe(n,t,e){var i,r;if("function"!=typeof e)throw new Error;return function(){var o=ms(this,n),s=o.tween;if(s!==i){r=(i=s).slice();for(var a={name:t,value:e},l=0,c=r.length;l<c;++l)if(r[l].name===t){r[l]=a;break}l===c&&r.push(a)}o.tween=r}}function r0(n,t,e){var i=n._id;return n.each(function(){var r=ms(this,i);(r.value||(r.value={}))[t]=e.apply(this,arguments)}),function(r){return ho(r,i).value[t]}}function _D(n,t){var e;return("number"==typeof t?Bo:t instanceof Gl?zf:(e=Gl(t))?(t=e,zf):Ay)(n,t)}function NTe(n){return function(){this.removeAttribute(n)}}function LTe(n){return function(){this.removeAttributeNS(n.space,n.local)}}function BTe(n,t,e){var i,o,r=e+"";return function(){var s=this.getAttribute(n);return s===r?null:s===i?o:o=t(i=s,e)}}function VTe(n,t,e){var i,o,r=e+"";return function(){var s=this.getAttributeNS(n.space,n.local);return s===r?null:s===i?o:o=t(i=s,e)}}function HTe(n,t,e){var i,r,o;return function(){var s,l,a=e(this);return null==a?void this.removeAttribute(n):(s=this.getAttribute(n))===(l=a+"")?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}function zTe(n,t,e){var i,r,o;return function(){var s,l,a=e(this);return null==a?void this.removeAttributeNS(n.space,n.local):(s=this.getAttributeNS(n.space,n.local))===(l=a+"")?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}function GTe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&function(n,t){return function(e){this.setAttributeNS(n.space,n.local,t.call(this,e))}}(n,o)),e}return r._value=t,r}function WTe(n,t){var e,i;function r(){var o=t.apply(this,arguments);return o!==i&&(e=(i=o)&&function(n,t){return function(e){this.setAttribute(n,t.call(this,e))}}(n,o)),e}return r._value=t,r}function qTe(n,t){return function(){By(this,n).delay=+t.apply(this,arguments)}}function YTe(n,t){return t=+t,function(){By(this,n).delay=t}}function XTe(n,t){return function(){ms(this,n).duration=+t.apply(this,arguments)}}function QTe(n,t){return t=+t,function(){ms(this,n).duration=t}}var eDe=Pd.prototype.constructor;function OK(n){return function(){this.style.removeProperty(n)}}var uDe=0;function Ko(n,t,e,i){this._groups=n,this._parents=t,this._name=e,this._id=i}function bD(){return++uDe}var o0=Pd.prototype;Ko.prototype=function(n){return Pd().transition(n)}.prototype={constructor:Ko,select:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=Lf(n));for(var i=this._groups,r=i.length,o=new Array(r),s=0;s<r;++s)for(var d,u,a=i[s],l=a.length,c=o[s]=new Array(l),p=0;p<l;++p)(d=a[p])&&(u=n.call(d,d.__data__,p,a))&&("__data__"in d&&(u.__data__=d.__data__),c[p]=u,Ju(c[p],t,e,p,c,ho(d,e)));return new Ko(o,this._parents,t,e)},selectAll:function(n){var t=this._name,e=this._id;"function"!=typeof n&&(n=Sy(n));for(var i=this._groups,r=i.length,o=[],s=[],a=0;a<r;++a)for(var d,l=i[a],c=l.length,u=0;u<c;++u)if(d=l[u]){for(var f,p=n.call(d,d.__data__,u,l),m=ho(d,e),b=0,M=p.length;b<M;++b)(f=p[b])&&Ju(f,t,e,b,p,m);o.push(p),s.push(d)}return new Ko(o,s,t,e)},filter:function(n){"function"!=typeof n&&(n=Ey(n));for(var t=this._groups,e=t.length,i=new Array(e),r=0;r<e;++r)for(var l,o=t[r],s=o.length,a=i[r]=[],c=0;c<s;++c)(l=o[c])&&n.call(l,l.__data__,c,o)&&a.push(l);return new Ko(i,this._parents,this._name,this._id)},merge:function(n){if(n._id!==this._id)throw new Error;for(var t=this._groups,e=n._groups,i=t.length,o=Math.min(i,e.length),s=new Array(i),a=0;a<o;++a)for(var p,l=t[a],c=e[a],d=l.length,u=s[a]=new Array(d),f=0;f<d;++f)(p=l[f]||c[f])&&(u[f]=p);for(;a<i;++a)s[a]=t[a];return new Ko(s,this._parents,this._name,this._id)},selection:function(){return new eDe(this._groups,this._parents)},transition:function(){for(var n=this._name,t=this._id,e=bD(),i=this._groups,r=i.length,o=0;o<r;++o)for(var l,s=i[o],a=s.length,c=0;c<a;++c)if(l=s[c]){var d=ho(l,t);Ju(l,n,e,c,s,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ko(i,this._parents,n,e)},call:o0.call,nodes:o0.nodes,node:o0.node,size:o0.size,empty:o0.empty,each:o0.each,on:function(n,t){var e=this._id;return arguments.length<2?ho(this.node(),e).on.on(n):this.each(function(n,t,e){var i,r,o=function(n){return(n+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(t)?By:ms;return function(){var s=o(this,n),a=s.on;a!==i&&(r=(i=a).copy()).on(t,e),s.on=r}}(e,n,t))},attr:function(n,t){var e=Rd(n),i="transform"===e?pL:_D;return this.attrTween(n,"function"==typeof t?(e.local?zTe:HTe)(e,i,r0(this,"attr."+n,t)):null==t?(e.local?LTe:NTe)(e):(e.local?VTe:BTe)(e,i,t))},attrTween:function(n,t){var e="attr."+n;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;var i=Rd(n);return this.tween(e,(i.local?GTe:WTe)(i,t))},style:function(n,t,e){var i="transform"==(n+="")?uL:_D;return null==t?this.styleTween(n,function(n,t){var e,i,r;return function(){var o=Zu(this,n),s=(this.style.removeProperty(n),Zu(this,n));return o===s?null:o===e&&s===i?r:r=t(e=o,i=s)}}(n,i)).on("end.style."+n,OK(n)):"function"==typeof t?this.styleTween(n,function(n,t,e){var i,r,o;return function(){var s=Zu(this,n),a=e(this),l=a+"";return null==a&&(this.style.removeProperty(n),l=a=Zu(this,n)),s===l?null:s===i&&l===r?o:(r=l,o=t(i=s,a))}}(n,i,r0(this,"style."+n,t))).each(function(n,t){var e,i,r,a,o="style."+t,s="end."+o;return function(){var l=ms(this,n),c=l.on,d=null==l.value[o]?a||(a=OK(t)):void 0;(c!==e||r!==d)&&(i=(e=c).copy()).on(s,r=d),l.on=i}}(this._id,n)):this.styleTween(n,function(n,t,e){var i,o,r=e+"";return function(){var s=Zu(this,n);return s===r?null:s===i?o:o=t(i=s,e)}}(n,i,t),e).on("end.style."+n,null)},styleTween:function(n,t,e){var i="style."+(n+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==t)return this.tween(i,null);if("function"!=typeof t)throw new Error;return this.tween(i,function(n,t,e){var i,r;function o(){var s=t.apply(this,arguments);return s!==r&&(i=(r=s)&&function(n,t,e){return function(i){this.style.setProperty(n,t.call(this,i),e)}}(n,s,e)),i}return o._value=t,o}(n,t,e??""))},text:function(n){return this.tween("text","function"==typeof n?function(n){return function(){var t=n(this);this.textContent=t??""}}(r0(this,"text",n)):function(n){return function(){this.textContent=n}}(null==n?"":n+""))},textTween:function(n){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==n)return this.tween(t,null);if("function"!=typeof n)throw new Error;return this.tween(t,function(n){var t,e;function i(){var r=n.apply(this,arguments);return r!==e&&(t=(e=r)&&function(n){return function(t){this.textContent=n.call(this,t)}}(r)),t}return i._value=n,i}(n))},remove:function(){return this.on("end.remove",function(n){return function(){var t=this.parentNode;for(var e in this.__transition)if(+e!==n)return;t&&t.removeChild(this)}}(this._id))},tween:function(n,t){var e=this._id;if(n+="",arguments.length<2){for(var s,i=ho(this.node(),e).tween,r=0,o=i.length;r<o;++r)if((s=i[r]).name===n)return s.value;return null}return this.each((null==t?kTe:FTe)(e,n,t))},delay:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?qTe:YTe)(t,n)):ho(this.node(),t).delay},duration:function(n){var t=this._id;return arguments.length?this.each(("function"==typeof n?XTe:QTe)(t,n)):ho(this.node(),t).duration},ease:function(n){var t=this._id;return arguments.length?this.each(function(n,t){if("function"!=typeof t)throw new Error;return function(){ms(this,n).ease=t}}(t,n)):ho(this.node(),t).ease},end:function(){var n,t,e=this,i=e._id,r=e.size();return new Promise(function(o,s){var a={value:s},l={value:function(){0==--r&&o()}};e.each(function(){var c=ms(this,i),d=c.on;d!==n&&((t=(n=d).copy())._.cancel.push(a),t._.interrupt.push(a),t._.end.push(l)),c.on=t})})}};var bL={time:null,delay:0,duration:250,ease:function(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}};function pDe(n,t){for(var e;!(e=n.__transition)||!(e=e[t]);)if(!(n=n.parentNode))return bL.time=i0(),bL;return e}function vL(n){return{type:n}}Pd.prototype.interrupt=function(n){return this.each(function(){!function(n,t){var i,r,s,e=n.__transition,o=!0;if(e){for(s in t=null==t?null:t+"",e)(i=e[s]).name===t?(r=i.state>hD&&i.state<gD,i.state=Ly,i.timer.stop(),i.on.call(r?"interrupt":"cancel",n,n.__data__,i.index,i.group),delete e[s]):o=!1;o&&delete n.__transition}}(this,n)})},Pd.prototype.transition=function(n){var t,e;n instanceof Ko?(t=n._id,n=n._name):(t=bD(),(e=bL).time=i0(),n=null==n?null:n+"");for(var i=this._groups,r=i.length,o=0;o<r;++o)for(var l,s=i[o],a=s.length,c=0;c<a;++c)(l=s[c])&&Ju(l,n,t,c,s,e||pDe(l,t));return new Ko(i,this._parents,n,t)},["w","e"].map(vL),["n","s"].map(vL),["n","w","e","s","nw","ne","sw","se"].map(vL),Math;var _a="$";function yD(){}function jK(n,t){var e=new yD;if(n instanceof yD)n.each(function(a,l){e.set(l,a)});else if(Array.isArray(n)){var o,i=-1,r=n.length;if(null==t)for(;++i<r;)e.set(i,n[i]);else for(;++i<r;)e.set(t(o=n[i],i,n),o)}else if(n)for(var s in n)e.set(s,n[s]);return e}function xD(){}yD.prototype=jK.prototype={constructor:yD,has:function(n){return _a+n in this},get:function(n){return this[_a+n]},set:function(n,t){return this[_a+n]=t,this},remove:function(n){var t=_a+n;return t in this&&delete this[t]},clear:function(){for(var n in this)n[0]===_a&&delete this[n]},keys:function(){var n=[];for(var t in this)t[0]===_a&&n.push(t.slice(1));return n},values:function(){var n=[];for(var t in this)t[0]===_a&&n.push(this[t]);return n},entries:function(){var n=[];for(var t in this)t[0]===_a&&n.push({key:t.slice(1),value:this[t]});return n},size:function(){var n=0;for(var t in this)t[0]===_a&&++n;return n},empty:function(){for(var n in this)if(n[0]===_a)return!1;return!0},each:function(n){for(var t in this)t[0]===_a&&n(this[t],t.slice(1),this)}};var Wf=jK.prototype;function qf(n,t){if((e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"))<0)return null;var e,i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function Gc(n){return(n=qf(Math.abs(n)))?n[1]:NaN}xD.prototype=function(n,t){var e=new xD;if(n instanceof xD)n.each(function(o){e.add(o)});else if(n){var i=-1,r=n.length;if(null==t)for(;++i<r;)e.add(n[i]);else for(;++i<r;)e.add(t(n[i],i,n))}return e}.prototype={constructor:xD,has:Wf.has,add:function(n){return this[_a+(n+="")]=n,this},remove:Wf.remove,clear:Wf.clear,values:Wf.keys,size:Wf.size,empty:Wf.empty,each:Wf.each},Math,Math.sqrt(5);var yL,xDe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $u(n){if(!(t=xDe.exec(n)))throw new Error("invalid format: "+n);var t;return new CD({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function CD(n){this.fill=void 0===n.fill?" ":n.fill+"",this.align=void 0===n.align?">":n.align+"",this.sign=void 0===n.sign?"-":n.sign+"",this.symbol=void 0===n.symbol?"":n.symbol+"",this.zero=!!n.zero,this.width=void 0===n.width?void 0:+n.width,this.comma=!!n.comma,this.precision=void 0===n.precision?void 0:+n.precision,this.trim=!!n.trim,this.type=void 0===n.type?"":n.type+""}function xL(n,t){var e=qf(n,t);if(!e)return n+"";var i=e[0],r=e[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}$u.prototype=CD.prototype,CD.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var CL={"%":function(n,t){return(100*n).toFixed(t)},b:function(n){return Math.round(n).toString(2)},c:function(n){return n+""},d:function(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},g:function(n,t){return n.toPrecision(t)},o:function(n){return Math.round(n).toString(8)},p:function(n,t){return xL(100*n,t)},r:xL,s:function(n,t){var e=qf(n,t);if(!e)return n+"";var i=e[0],r=e[1],o=r-(yL=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,s=i.length;return o===s?i:o>s?i+new Array(o-s+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+qf(n,Math.max(0,t+o-1))[0]},X:function(n){return Math.round(n).toString(16).toUpperCase()},x:function(n){return Math.round(n).toString(16)}};function ML(n){return n}var MD,Qr,wD,KK=Array.prototype.map,JK=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function rl(){return Math.random()}MD=function(n){var t=void 0===n.grouping||void 0===n.thousands?ML:function(n,t){return function(e,i){for(var r=e.length,o=[],s=0,a=n[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),o.push(e.substring(r-=a,r+a)),!((l+=a+1)>i));)a=n[s=(s+1)%n.length];return o.reverse().join(t)}}(KK.call(n.grouping,Number),n.thousands+""),e=void 0===n.currency?"":n.currency[0]+"",i=void 0===n.currency?"":n.currency[1]+"",r=void 0===n.decimal?".":n.decimal+"",o=void 0===n.numerals?ML:function(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}(KK.call(n.numerals,String)),s=void 0===n.percent?"%":n.percent+"",a=void 0===n.minus?"-":n.minus+"",l=void 0===n.nan?"NaN":n.nan+"";function c(u){var p=(u=$u(u)).fill,f=u.align,m=u.sign,b=u.symbol,M=u.zero,y=u.width,x=u.comma,R=u.precision,A=u.trim,V=u.type;"n"===V?(x=!0,V="g"):CL[V]||(void 0===R&&(R=12),A=!0,V="g"),(M||"0"===p&&"="===f)&&(M=!0,p="0",f="=");var te="$"===b?e:"#"===b&&/[boxX]/.test(V)?"0"+V.toLowerCase():"",K="$"===b?i:/[%p]/.test(V)?s:"",xe=CL[V],Xe=/[defgprs%]/.test(V);function De(D){var fe,be,ne,re=te,ce=K;if("c"===V)ce=xe(D)+ce,D="";else{var de=(D=+D)<0||1/D<0;if(D=isNaN(D)?l:xe(Math.abs(D),R),A&&(D=function(n){e:for(var r,t=n.length,e=1,i=-1;e<t;++e)switch(n[e]){case".":i=r=e;break;case"0":0===i&&(i=e),r=e;break;default:if(!+n[e])break e;i>0&&(i=0)}return i>0?n.slice(0,i)+n.slice(r+1):n}(D)),de&&0==+D&&"+"!==m&&(de=!1),re=(de?"("===m?m:a:"-"===m||"("===m?"":m)+re,ce=("s"===V?JK[8+yL/3]:"")+ce+(de&&"("===m?")":""),Xe)for(fe=-1,be=D.length;++fe<be;)if(48>(ne=D.charCodeAt(fe))||ne>57){ce=(46===ne?r+D.slice(fe+1):D.slice(fe))+ce,D=D.slice(0,fe);break}}x&&!M&&(D=t(D,1/0));var pe=re.length+D.length+ce.length,je=pe<y?new Array(y-pe+1).join(p):"";switch(x&&M&&(D=t(je+D,je.length?y-ce.length:1/0),je=""),f){case"<":D=re+D+ce+je;break;case"=":D=re+je+D+ce;break;case"^":D=je.slice(0,pe=je.length>>1)+re+D+ce+je.slice(pe);break;default:D=je+re+D+ce}return o(D)}return R=void 0===R?6:/[gprs]/.test(V)?Math.max(1,Math.min(21,R)):Math.max(0,Math.min(20,R)),De.toString=function(){return u+""},De}return{format:c,formatPrefix:function(u,p){var f=c(((u=$u(u)).type="f",u)),m=3*Math.max(-8,Math.min(8,Math.floor(Gc(p)/3))),b=Math.pow(10,-m),M=JK[8+m/3];return function(y){return f(b*y)+M}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),Qr=MD.format,wD=MD.formatPrefix,function n(t){function e(i,r){return i=null==i?0:+i,r=null==r?1:+r,1===arguments.length?(r=i,i=0):r-=i,function(){return t()*r+i}}return e.source=n,e}(rl);var DL=function n(t){function e(i,r){var o,s;return i=null==i?0:+i,r=null==r?1:+r,function(){var a;if(null!=o)a=o,o=null;else do{o=2*t()-1,a=2*t()-1,s=o*o+a*a}while(!s||s>1);return i+r*a*Math.sqrt(-2*Math.log(s)/s)}}return e.source=n,e}(rl),IL=(function n(t){function e(){var i=DL.source(t).apply(this,arguments);return function(){return Math.exp(i())}}return e.source=n,e}(rl),function n(t){function e(i){return function(){for(var r=0,o=0;o<i;++o)r+=t();return r}}return e.source=n,e}(rl));function Qs(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n)}return this}(function n(t){function e(i){var r=IL.source(t)(i);return function(){return r()/i}}return e.source=n,e})(rl),function n(t){function e(i){return function(){return-Math.log(1-t())/i}}return e.source=n,e}(rl);var eJ=Array.prototype,zy=eJ.map,Yf=eJ.slice;function AL(n){return+n}var nJ=[0,1];function Zs(n){return n}function RL(n,t){return(t-=n=+n)?function(e){return(e-n)/t}:function(n){return function(){return n}}(isNaN(t)?NaN:.5)}function iJ(n){var i,t=n[0],e=n[n.length-1];return t>e&&(i=t,t=e,e=i),function(r){return Math.max(t,Math.min(e,r))}}function TDe(n,t,e){var i=n[0],r=n[1],o=t[0],s=t[1];return r<i?(i=RL(r,i),o=e(s,o)):(i=RL(i,r),o=e(o,s)),function(a){return o(i(a))}}function DDe(n,t,e){var i=Math.min(n.length,t.length)-1,r=new Array(i),o=new Array(i),s=-1;for(n[i]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++s<i;)r[s]=RL(n[s],n[s+1]),o[s]=e(t[s],t[s+1]);return function(a){var l=Hc(n,a,1,i)-1;return o[l](r[l](a))}}function ep(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function Uy(){var i,r,o,a,l,c,n=nJ,t=nJ,e=Uf,s=Zs;function d(){return a=Math.min(n.length,t.length)>2?DDe:TDe,l=c=null,u}function u(p){return isNaN(p=+p)?o:(l||(l=a(n.map(i),t,e)))(i(s(p)))}return u.invert=function(p){return s(r((c||(c=a(t,n.map(i),Bo)))(p)))},u.domain=function(p){return arguments.length?(n=zy.call(p,AL),s===Zs||(s=iJ(n)),d()):n.slice()},u.range=function(p){return arguments.length?(t=Yf.call(p),d()):t.slice()},u.rangeRound=function(p){return t=Yf.call(p),e=lL,d()},u.clamp=function(p){return arguments.length?(s=p?iJ(n):Zs,u):s!==Zs},u.interpolate=function(p){return arguments.length?(e=p,d()):e},u.unknown=function(p){return arguments.length?(o=p,u):o},function(p,f){return i=p,r=f,d()}}function jy(n,t){return Uy()(n,t)}function Wl(){var n=jy(Zs,Zs);return n.copy=function(){return ep(n,Wl())},Qs.apply(n,arguments),function(n){var t=n.domain;return n.ticks=function(e){var i=t();return My(i[0],i[i.length-1],e??10)},n.tickFormat=function(e,i){var r=t();return function(n,t,e,i){var o,r=Ad(n,t,e);switch((i=$u(i??",f")).type){case"s":var s=Math.max(Math.abs(n),Math.abs(t));return null==i.precision&&!isNaN(o=function(n,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Gc(t)/3)))-Gc(Math.abs(n)))}(r,s))&&(i.precision=o),wD(i,s);case"":case"e":case"g":case"p":case"r":null==i.precision&&!isNaN(o=function(n,t){return n=Math.abs(n),t=Math.abs(t)-n,Math.max(0,Gc(t)-Gc(n))+1}(r,Math.max(Math.abs(n),Math.abs(t))))&&(i.precision=o-("e"===i.type));break;case"f":case"%":null==i.precision&&!isNaN(o=function(n){return Math.max(0,-Gc(Math.abs(n)))}(r))&&(i.precision=o-2*("%"===i.type))}return Qr(i)}(r[0],r[r.length-1],e??10,i)},n.nice=function(e){null==e&&(e=10);var l,i=t(),r=0,o=i.length-1,s=i[r],a=i[o];return a<s&&(l=s,s=a,a=l,l=r,r=o,o=l),(l=Zg(s,a,e))>0?l=Zg(s=Math.floor(s/l)*l,a=Math.ceil(a/l)*l,e):l<0&&(l=Zg(s=Math.ceil(s*l)/l,a=Math.floor(a*l)/l,e)),l>0?(i[r]=Math.floor(s/l)*l,i[o]=Math.ceil(a/l)*l,t(i)):l<0&&(i[r]=Math.ceil(s*l)/l,i[o]=Math.floor(a*l)/l,t(i)),n},n}(n)}function SD(n,t){var s,e=0,i=(n=n.slice()).length-1,r=n[e],o=n[i];return o<r&&(s=e,e=i,i=s,s=r,r=o,o=s),n[e]=t.floor(r),n[i]=t.ceil(o),n}function rJ(n){return Math.log(n)}function oJ(n){return Math.exp(n)}function IDe(n){return-Math.log(-n)}function ADe(n){return-Math.exp(-n)}function RDe(n){return isFinite(n)?+("1e"+n):n<0?0:n}function sJ(n){return function(t){return-n(-t)}}function Gy(){var n=function(n){var r,o,t=n(rJ,oJ),e=t.domain,i=10;function s(){return r=function(n){return n===Math.E?Math.log:10===n&&Math.log10||2===n&&Math.log2||(n=Math.log(n),function(t){return Math.log(t)/n})}(i),o=function(n){return 10===n?RDe:n===Math.E?Math.exp:function(t){return Math.pow(n,t)}}(i),e()[0]<0?(r=sJ(r),o=sJ(o),n(IDe,ADe)):n(rJ,oJ),t}return t.base=function(a){return arguments.length?(i=+a,s()):i},t.domain=function(a){return arguments.length?(e(a),s()):e()},t.ticks=function(a){var u,l=e(),c=l[0],d=l[l.length-1];(u=d<c)&&(p=c,c=d,d=p);var m,b,M,p=r(c),f=r(d),y=null==a?10:+a,x=[];if(!(i%1)&&f-p<y){if(p=Math.round(p)-1,f=Math.round(f)+1,c>0){for(;p<f;++p)for(b=1,m=o(p);b<i;++b)if(!((M=m*b)<c)){if(M>d)break;x.push(M)}}else for(;p<f;++p)for(b=i-1,m=o(p);b>=1;--b)if(!((M=m*b)<c)){if(M>d)break;x.push(M)}}else x=My(p,f,Math.min(f-p,y)).map(o);return u?x.reverse():x},t.tickFormat=function(a,l){if(null==l&&(l=10===i?".0e":","),"function"!=typeof l&&(l=Qr(l)),a===1/0)return l;null==a&&(a=10);var c=Math.max(1,i*a/t.ticks().length);return function(d){var u=d/o(Math.round(r(d)));return u*i<i-.5&&(u*=i),u<=c?l(d):""}},t.nice=function(){return e(SD(e(),{floor:function(a){return o(Math.floor(r(a)))},ceil:function(a){return o(Math.ceil(r(a)))}}))},t}(Uy()).domain([1,10]);return n.copy=function(){return ep(n,Gy()).base(n.base())},Qs.apply(n,arguments),n}var kL=new Date,FL=new Date;function ir(n,t,e,i){function r(o){return n(o=0===arguments.length?new Date:new Date(+o)),o}return r.floor=function(o){return n(o=new Date(+o)),o},r.ceil=function(o){return n(o=new Date(o-1)),t(o,1),n(o),o},r.round=function(o){var s=r(o),a=r.ceil(o);return o-s<a-o?s:a},r.offset=function(o,s){return t(o=new Date(+o),null==s?1:Math.floor(s)),o},r.range=function(o,s,a){var c,l=[];if(o=r.ceil(o),a=null==a?1:Math.floor(a),!(o<s&&a>0))return l;do{l.push(c=new Date(+o)),t(o,a),n(o)}while(c<o&&o<s);return l},r.filter=function(o){return ir(function(s){if(s>=s)for(;n(s),!o(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;t(s,-1),!o(s););else for(;--a>=0;)for(;t(s,1),!o(s););})},e&&(r.count=function(o,s){return kL.setTime(+o),FL.setTime(+s),n(kL),n(FL),Math.floor(e(kL,FL))},r.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?r.filter(i?function(s){return i(s)%o==0}:function(s){return r.count(0,s)%o==0}):r:null}),r}var ED=ir(function(){},function(n,t){n.setTime(+n+t)},function(n,t){return t-n});ED.every=function(n){return n=Math.floor(n),isFinite(n)&&n>0?n>1?ir(function(t){t.setTime(Math.floor(t/n)*n)},function(t,e){t.setTime(+t+e*n)},function(t,e){return(e-t)/n}):ED:null};var TD=ED,kd=6e4,ID=6048e5,lJ=ir(function(n){n.setTime(n-n.getMilliseconds())},function(n,t){n.setTime(+n+1e3*t)},function(n,t){return(t-n)/1e3},function(n){return n.getUTCSeconds()}),AD=lJ,dJ=ir(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds())},function(n,t){n.setTime(+n+t*kd)},function(n,t){return(t-n)/kd},function(n){return n.getMinutes()}),LL=dJ,uJ=ir(function(n){n.setTime(n-n.getMilliseconds()-1e3*n.getSeconds()-n.getMinutes()*kd)},function(n,t){n.setTime(+n+36e5*t)},function(n,t){return(t-n)/36e5},function(n){return n.getHours()}),BL=uJ,pJ=ir(function(n){n.setHours(0,0,0,0)},function(n,t){n.setDate(n.getDate()+t)},function(n,t){return(t-n-(t.getTimezoneOffset()-n.getTimezoneOffset())*kd)/864e5},function(n){return n.getDate()-1}),s0=pJ;function Zf(n){return ir(function(t){t.setDate(t.getDate()-(t.getDay()+7-n)%7),t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*kd)/ID})}var Kf=Zf(0),a0=Zf(1),tp=(Zf(2),Zf(3),Zf(4)),bJ=(Zf(5),Zf(6),ir(function(n){n.setDate(1),n.setHours(0,0,0,0)},function(n,t){n.setMonth(n.getMonth()+t)},function(n,t){return t.getMonth()-n.getMonth()+12*(t.getFullYear()-n.getFullYear())},function(n){return n.getMonth()})),VL=bJ,HL=ir(function(n){n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n,t){return t.getFullYear()-n.getFullYear()},function(n){return n.getFullYear()});HL.every=function(n){return isFinite(n=Math.floor(n))&&n>0?ir(function(t){t.setFullYear(Math.floor(t.getFullYear()/n)*n),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e*n)}):null};var Fd=HL,vJ=ir(function(n){n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCDate(n.getUTCDate()+t)},function(n,t){return(t-n)/864e5},function(n){return n.getUTCDate()-1}),RD=vJ;function Jf(n){return ir(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-n)%7),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/ID})}var Wy=Jf(0),l0=Jf(1),np=(Jf(2),Jf(3),Jf(4)),zL=(Jf(5),Jf(6),ir(function(n){n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,t){n.setUTCFullYear(n.getUTCFullYear()+t)},function(n,t){return t.getUTCFullYear()-n.getUTCFullYear()},function(n){return n.getUTCFullYear()}));zL.every=function(n){return isFinite(n=Math.floor(n))&&n>0?ir(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/n)*n),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e*n)}):null};var $f=zL;function UL(n){if(0<=n.y&&n.y<100){var t=new Date(-1,n.m,n.d,n.H,n.M,n.S,n.L);return t.setFullYear(n.y),t}return new Date(n.y,n.m,n.d,n.H,n.M,n.S,n.L)}function jL(n){if(0<=n.y&&n.y<100){var t=new Date(Date.UTC(-1,n.m,n.d,n.H,n.M,n.S,n.L));return t.setUTCFullYear(n.y),t}return new Date(Date.UTC(n.y,n.m,n.d,n.H,n.M,n.S,n.L))}function qy(n,t,e){return{y:n,m:t,d:e,H:0,M:0,S:0,L:0}}var c0,d0,SJ={"-":"",_:" ",0:"0"},To=/^\s*\d+/,$De=/^%/,eIe=/[\\^$*+?|[\]().{}]/g;function Oi(n,t,e){var i=n<0?"-":"",r=(i?-n:n)+"",o=r.length;return i+(o<e?new Array(e-o+1).join(t)+r:r)}function tIe(n){return n.replace(eIe,"\\$&")}function Yy(n){return new RegExp("^(?:"+n.map(tIe).join("|")+")","i")}function Xy(n){for(var t={},e=-1,i=n.length;++e<i;)t[n[e].toLowerCase()]=e;return t}function nIe(n,t,e){var i=To.exec(t.slice(e,e+1));return i?(n.w=+i[0],e+i[0].length):-1}function iIe(n,t,e){var i=To.exec(t.slice(e,e+1));return i?(n.u=+i[0],e+i[0].length):-1}function rIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.U=+i[0],e+i[0].length):-1}function oIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.V=+i[0],e+i[0].length):-1}function sIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.W=+i[0],e+i[0].length):-1}function EJ(n,t,e){var i=To.exec(t.slice(e,e+4));return i?(n.y=+i[0],e+i[0].length):-1}function TJ(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.y=+i[0]+(+i[0]>68?1900:2e3),e+i[0].length):-1}function aIe(n,t,e){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(e,e+6));return i?(n.Z=i[1]?0:-(i[2]+(i[3]||"00")),e+i[0].length):-1}function lIe(n,t,e){var i=To.exec(t.slice(e,e+1));return i?(n.q=3*i[0]-3,e+i[0].length):-1}function cIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.m=i[0]-1,e+i[0].length):-1}function DJ(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.d=+i[0],e+i[0].length):-1}function dIe(n,t,e){var i=To.exec(t.slice(e,e+3));return i?(n.m=0,n.d=+i[0],e+i[0].length):-1}function IJ(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.H=+i[0],e+i[0].length):-1}function uIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.M=+i[0],e+i[0].length):-1}function pIe(n,t,e){var i=To.exec(t.slice(e,e+2));return i?(n.S=+i[0],e+i[0].length):-1}function fIe(n,t,e){var i=To.exec(t.slice(e,e+3));return i?(n.L=+i[0],e+i[0].length):-1}function mIe(n,t,e){var i=To.exec(t.slice(e,e+6));return i?(n.L=Math.floor(i[0]/1e3),e+i[0].length):-1}function hIe(n,t,e){var i=$De.exec(t.slice(e,e+1));return i?e+i[0].length:-1}function gIe(n,t,e){var i=To.exec(t.slice(e));return i?(n.Q=+i[0],e+i[0].length):-1}function _Ie(n,t,e){var i=To.exec(t.slice(e));return i?(n.s=+i[0],e+i[0].length):-1}function AJ(n,t){return Oi(n.getDate(),t,2)}function bIe(n,t){return Oi(n.getHours(),t,2)}function vIe(n,t){return Oi(n.getHours()%12||12,t,2)}function yIe(n,t){return Oi(1+s0.count(Fd(n),n),t,3)}function FJ(n,t){return Oi(n.getMilliseconds(),t,3)}function xIe(n,t){return FJ(n,t)+"000"}function CIe(n,t){return Oi(n.getMonth()+1,t,2)}function MIe(n,t){return Oi(n.getMinutes(),t,2)}function wIe(n,t){return Oi(n.getSeconds(),t,2)}function SIe(n){var t=n.getDay();return 0===t?7:t}function EIe(n,t){return Oi(Kf.count(Fd(n)-1,n),t,2)}function NJ(n){var t=n.getDay();return t>=4||0===t?tp(n):tp.ceil(n)}function TIe(n,t){return n=NJ(n),Oi(tp.count(Fd(n),n)+(4===Fd(n).getDay()),t,2)}function DIe(n){return n.getDay()}function IIe(n,t){return Oi(a0.count(Fd(n)-1,n),t,2)}function AIe(n,t){return Oi(n.getFullYear()%100,t,2)}function RIe(n,t){return Oi((n=NJ(n)).getFullYear()%100,t,2)}function PIe(n,t){return Oi(n.getFullYear()%1e4,t,4)}function OIe(n,t){var e=n.getDay();return Oi((n=e>=4||0===e?tp(n):tp.ceil(n)).getFullYear()%1e4,t,4)}function kIe(n){var t=n.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Oi(t/60|0,"0",2)+Oi(t%60,"0",2)}function RJ(n,t){return Oi(n.getUTCDate(),t,2)}function FIe(n,t){return Oi(n.getUTCHours(),t,2)}function NIe(n,t){return Oi(n.getUTCHours()%12||12,t,2)}function LIe(n,t){return Oi(1+RD.count($f(n),n),t,3)}function LJ(n,t){return Oi(n.getUTCMilliseconds(),t,3)}function BIe(n,t){return LJ(n,t)+"000"}function VIe(n,t){return Oi(n.getUTCMonth()+1,t,2)}function HIe(n,t){return Oi(n.getUTCMinutes(),t,2)}function zIe(n,t){return Oi(n.getUTCSeconds(),t,2)}function UIe(n){var t=n.getUTCDay();return 0===t?7:t}function jIe(n,t){return Oi(Wy.count($f(n)-1,n),t,2)}function BJ(n){var t=n.getUTCDay();return t>=4||0===t?np(n):np.ceil(n)}function GIe(n,t){return n=BJ(n),Oi(np.count($f(n),n)+(4===$f(n).getUTCDay()),t,2)}function WIe(n){return n.getUTCDay()}function qIe(n,t){return Oi(l0.count($f(n)-1,n),t,2)}function YIe(n,t){return Oi(n.getUTCFullYear()%100,t,2)}function XIe(n,t){return Oi((n=BJ(n)).getUTCFullYear()%100,t,2)}function QIe(n,t){return Oi(n.getUTCFullYear()%1e4,t,4)}function ZIe(n,t){var e=n.getUTCDay();return Oi((n=e>=4||0===e?np(n):np.ceil(n)).getUTCFullYear()%1e4,t,4)}function KIe(){return"+0000"}function PJ(){return"%"}function OJ(n){return+n}function kJ(n){return Math.floor(+n/1e3)}c0=function(n){var t=n.dateTime,e=n.date,i=n.time,r=n.periods,o=n.days,s=n.shortDays,a=n.months,l=n.shortMonths,c=Yy(r),d=Xy(r),u=Yy(o),p=Xy(o),f=Yy(s),m=Xy(s),b=Yy(a),M=Xy(a),y=Yy(l),x=Xy(l),R={a:function(ve){return s[ve.getDay()]},A:function(ve){return o[ve.getDay()]},b:function(ve){return l[ve.getMonth()]},B:function(ve){return a[ve.getMonth()]},c:null,d:AJ,e:AJ,f:xIe,g:RIe,G:OIe,H:bIe,I:vIe,j:yIe,L:FJ,m:CIe,M:MIe,p:function(ve){return r[+(ve.getHours()>=12)]},q:function(ve){return 1+~~(ve.getMonth()/3)},Q:OJ,s:kJ,S:wIe,u:SIe,U:EIe,V:TIe,w:DIe,W:IIe,x:null,X:null,y:AIe,Y:PIe,Z:kIe,"%":PJ},A={a:function(ve){return s[ve.getUTCDay()]},A:function(ve){return o[ve.getUTCDay()]},b:function(ve){return l[ve.getUTCMonth()]},B:function(ve){return a[ve.getUTCMonth()]},c:null,d:RJ,e:RJ,f:BIe,g:XIe,G:ZIe,H:FIe,I:NIe,j:LIe,L:LJ,m:VIe,M:HIe,p:function(ve){return r[+(ve.getUTCHours()>=12)]},q:function(ve){return 1+~~(ve.getUTCMonth()/3)},Q:OJ,s:kJ,S:zIe,u:UIe,U:jIe,V:GIe,w:WIe,W:qIe,x:null,X:null,y:YIe,Y:QIe,Z:KIe,"%":PJ},V={a:function(ve,mt,ft){var oe=f.exec(mt.slice(ft));return oe?(ve.w=m[oe[0].toLowerCase()],ft+oe[0].length):-1},A:function(ve,mt,ft){var oe=u.exec(mt.slice(ft));return oe?(ve.w=p[oe[0].toLowerCase()],ft+oe[0].length):-1},b:function(ve,mt,ft){var oe=y.exec(mt.slice(ft));return oe?(ve.m=x[oe[0].toLowerCase()],ft+oe[0].length):-1},B:function(ve,mt,ft){var oe=b.exec(mt.slice(ft));return oe?(ve.m=M[oe[0].toLowerCase()],ft+oe[0].length):-1},c:function(ve,mt,ft){return xe(ve,t,mt,ft)},d:DJ,e:DJ,f:mIe,g:TJ,G:EJ,H:IJ,I:IJ,j:dIe,L:fIe,m:cIe,M:uIe,p:function(ve,mt,ft){var oe=c.exec(mt.slice(ft));return oe?(ve.p=d[oe[0].toLowerCase()],ft+oe[0].length):-1},q:lIe,Q:gIe,s:_Ie,S:pIe,u:iIe,U:rIe,V:oIe,w:nIe,W:sIe,x:function(ve,mt,ft){return xe(ve,e,mt,ft)},X:function(ve,mt,ft){return xe(ve,i,mt,ft)},y:TJ,Y:EJ,Z:aIe,"%":hIe};function te(ve,mt){return function(ft){var ut,sn,Cn,oe=[],st=-1,Ye=0,_t=ve.length;for(ft instanceof Date||(ft=new Date(+ft));++st<_t;)37===ve.charCodeAt(st)&&(oe.push(ve.slice(Ye,st)),null!=(sn=SJ[ut=ve.charAt(++st)])?ut=ve.charAt(++st):sn="e"===ut?" ":"0",(Cn=mt[ut])&&(ut=Cn(ft,sn)),oe.push(ut),Ye=st+1);return oe.push(ve.slice(Ye,st)),oe.join("")}}function K(ve,mt){return function(ft){var Ye,_t,oe=qy(1900,void 0,1);if(xe(oe,ve,ft+="",0)!=ft.length)return null;if("Q"in oe)return new Date(oe.Q);if("s"in oe)return new Date(1e3*oe.s+("L"in oe?oe.L:0));if(mt&&!("Z"in oe)&&(oe.Z=0),"p"in oe&&(oe.H=oe.H%12+12*oe.p),void 0===oe.m&&(oe.m="q"in oe?oe.q:0),"V"in oe){if(oe.V<1||oe.V>53)return null;"w"in oe||(oe.w=1),"Z"in oe?(_t=(Ye=jL(qy(oe.y,0,1))).getUTCDay(),Ye=_t>4||0===_t?l0.ceil(Ye):l0(Ye),Ye=RD.offset(Ye,7*(oe.V-1)),oe.y=Ye.getUTCFullYear(),oe.m=Ye.getUTCMonth(),oe.d=Ye.getUTCDate()+(oe.w+6)%7):(_t=(Ye=UL(qy(oe.y,0,1))).getDay(),Ye=_t>4||0===_t?a0.ceil(Ye):a0(Ye),Ye=s0.offset(Ye,7*(oe.V-1)),oe.y=Ye.getFullYear(),oe.m=Ye.getMonth(),oe.d=Ye.getDate()+(oe.w+6)%7)}else("W"in oe||"U"in oe)&&("w"in oe||(oe.w="u"in oe?oe.u%7:"W"in oe?1:0),_t="Z"in oe?jL(qy(oe.y,0,1)).getUTCDay():UL(qy(oe.y,0,1)).getDay(),oe.m=0,oe.d="W"in oe?(oe.w+6)%7+7*oe.W-(_t+5)%7:oe.w+7*oe.U-(_t+6)%7);return"Z"in oe?(oe.H+=oe.Z/100|0,oe.M+=oe.Z%100,jL(oe)):UL(oe)}}function xe(ve,mt,ft,oe){for(var ut,sn,st=0,Ye=mt.length,_t=ft.length;st<Ye;){if(oe>=_t)return-1;if(37===(ut=mt.charCodeAt(st++))){if(ut=mt.charAt(st++),!(sn=V[ut in SJ?mt.charAt(st++):ut])||(oe=sn(ve,ft,oe))<0)return-1}else if(ut!=ft.charCodeAt(oe++))return-1}return oe}return R.x=te(e,R),R.X=te(i,R),R.c=te(t,R),A.x=te(e,A),A.X=te(i,A),A.c=te(t,A),{format:function(ve){var mt=te(ve+="",R);return mt.toString=function(){return ve},mt},parse:function(ve){var mt=K(ve+="",!1);return mt.toString=function(){return ve},mt},utcFormat:function(ve){var mt=te(ve+="",A);return mt.toString=function(){return ve},mt},utcParse:function(ve){var mt=K(ve+="",!0);return mt.toString=function(){return ve},mt}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),d0=c0.format;var Qy=1e3,Zy=60*Qy,Ky=60*Zy,Jy=24*Ky,JIe=7*Jy,UJ=30*Jy,qL=365*Jy;function $Ie(n){return new Date(n)}function eAe(n){return n instanceof Date?+n:+new Date(+n)}function YL(n,t,e,i,r,o,s,a,l){var c=jy(Zs,Zs),d=c.invert,u=c.domain,p=l(".%L"),f=l(":%S"),m=l("%I:%M"),b=l("%I %p"),M=l("%a %d"),y=l("%b %d"),x=l("%B"),R=l("%Y"),A=[[s,1,Qy],[s,5,5*Qy],[s,15,15*Qy],[s,30,30*Qy],[o,1,Zy],[o,5,5*Zy],[o,15,15*Zy],[o,30,30*Zy],[r,1,Ky],[r,3,3*Ky],[r,6,6*Ky],[r,12,12*Ky],[i,1,Jy],[i,2,2*Jy],[e,1,JIe],[t,1,UJ],[t,3,3*UJ],[n,1,qL]];function V(K){return(s(K)<K?p:o(K)<K?f:r(K)<K?m:i(K)<K?b:t(K)<K?e(K)<K?M:y:n(K)<K?x:R)(K)}function te(K,xe,Xe,De){if(null==K&&(K=10),"number"==typeof K){var D=Math.abs(Xe-xe)/K,re=Cy(function(ce){return ce[2]}).right(A,D);re===A.length?(De=Ad(xe/qL,Xe/qL,K),K=n):re?(De=(re=A[D/A[re-1][2]<A[re][2]/D?re-1:re])[1],K=re[0]):(De=Math.max(Ad(xe,Xe,K),1),K=a)}return null==De?K:K.every(De)}return c.invert=function(K){return new Date(d(K))},c.domain=function(K){return arguments.length?u(zy.call(K,eAe)):u().map($Ie)},c.ticks=function(K,xe){var ce,Xe=u(),De=Xe[0],D=Xe[Xe.length-1],re=D<De;return re&&(ce=De,De=D,D=ce),ce=(ce=te(K,De,D,xe))?ce.range(De,D+1):[],re?ce.reverse():ce},c.tickFormat=function(K,xe){return null==xe?V:l(xe)},c.nice=function(K,xe){var Xe=u();return(K=te(K,Xe[0],Xe[Xe.length-1],xe))?u(SD(Xe,K)):c},c.copy=function(){return ep(c,YL(n,t,e,i,r,o,s,a,l))},c}function em(){return Qs.apply(YL(Fd,VL,Kf,s0,BL,LL,AD,TD,d0).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function XL(){this._=null}function u0(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function $y(n,t){var e=t,i=t.R,r=e.U;r?r.L===e?r.L=i:r.R=i:n._=i,i.U=r,e.U=i,e.R=i.L,e.R&&(e.R.U=e),i.L=e}function ex(n,t){var e=t,i=t.L,r=e.U;r?r.L===e?r.L=i:r.R=i:n._=i,i.U=r,e.U=i,e.L=i.R,e.L&&(e.L.U=e),i.R=e}function GJ(n){for(;n.L;)n=n.L;return n}XL.prototype={constructor:XL,insert:function(n,t){var e,i,r;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=GJ(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)e===(i=e.U).L?(r=i.R)&&r.C?(e.C=r.C=!1,i.C=!0,n=i):(n===e.R&&($y(this,e),e=(n=e).U),e.C=!1,i.C=!0,ex(this,i)):(r=i.L)&&r.C?(e.C=r.C=!1,i.C=!0,n=i):(n===e.L&&(ex(this,e),e=(n=e).U),e.C=!1,i.C=!0,$y(this,i)),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var e,o,s,t=n.U,i=n.L,r=n.R;if(o=i?r?GJ(r):i:r,t?t.L===n?t.L=o:t.R=o:this._=o,i&&r?(s=o.C,o.C=n.C,o.L=i,i.U=o,o!==r?(t=o.U,o.U=n.U,t.L=n=o.R,o.R=r,r.U=o):(o.U=t,t=o,n=o.R)):(s=n.C,n=o),n&&(n.U=t),!s){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===t.L){if((e=t.R).C&&(e.C=!1,t.C=!0,$y(this,t),e=t.R),e.L&&e.L.C||e.R&&e.R.C){(!e.R||!e.R.C)&&(e.L.C=!1,e.C=!0,ex(this,e),e=t.R),e.C=t.C,t.C=e.R.C=!1,$y(this,t),n=this._;break}}else if((e=t.L).C&&(e.C=!1,t.C=!0,ex(this,t),e=t.L),e.L&&e.L.C||e.R&&e.R.C){(!e.L||!e.L.C)&&(e.R.C=!1,e.C=!0,$y(this,e),e=t.L),e.C=t.C,t.C=e.L.C=!1,ex(this,t),n=this._;break}e.C=!0,n=t,t=t.U}while(!n.C);n&&(n.C=!1)}}};var QL=XL;function p0(n,t,e,i){var r=[null,null],o=Do.push(r)-1;return r.left=n,r.right=t,e&&tx(r,n,t,e),i&&tx(r,t,n,i),hs[n.index].halfedges.push(o),hs[t.index].halfedges.push(o),r}function f0(n,t,e){var i=[t,e];return i.left=n,i}function tx(n,t,e,i){n[0]||n[1]?n.left===e?n[1]=i:n[0]=i:(n[0]=i,n.left=t,n.right=e)}function iAe(n,t,e,i,r){var b,o=n[0],s=n[1],a=o[0],l=o[1],u=0,p=1,f=s[0]-a,m=s[1]-l;if(b=t-a,f||!(b>0)){if(b/=f,f<0){if(b<u)return;b<p&&(p=b)}else if(f>0){if(b>p)return;b>u&&(u=b)}if(b=i-a,f||!(b<0)){if(b/=f,f<0){if(b>p)return;b>u&&(u=b)}else if(f>0){if(b<u)return;b<p&&(p=b)}if(b=e-l,m||!(b>0)){if(b/=m,m<0){if(b<u)return;b<p&&(p=b)}else if(m>0){if(b>p)return;b>u&&(u=b)}if(b=r-l,m||!(b<0)){if(b/=m,m<0){if(b>p)return;b>u&&(u=b)}else if(m>0){if(b<u)return;b<p&&(p=b)}return!(u>0)&&!(p<1)||(u>0&&(n[0]=[a+u*f,l+u*m]),p<1&&(n[1]=[a+p*f,l+p*m])),!0}}}}}function rAe(n,t,e,i,r){var o=n[1];if(o)return!0;var b,M,s=n[0],a=n.left,l=n.right,c=a[0],d=a[1],u=l[0],p=l[1],f=(c+u)/2;if(p===d){if(f<t||f>=i)return;if(c>u){if(s){if(s[1]>=r)return}else s=[f,e];o=[f,r]}else{if(s){if(s[1]<e)return}else s=[f,r];o=[f,e]}}else if(M=(d+p)/2-(b=(c-u)/(p-d))*f,b<-1||b>1)if(c>u){if(s){if(s[1]>=r)return}else s=[(e-M)/b,e];o=[(r-M)/b,r]}else{if(s){if(s[1]<e)return}else s=[(r-M)/b,r];o=[(e-M)/b,e]}else if(d<p){if(s){if(s[0]>=i)return}else s=[t,b*t+M];o=[i,b*i+M]}else{if(s){if(s[0]<t)return}else s=[i,b*i+M];o=[t,b*t+M]}return n[0]=s,n[1]=o,!0}function oAe(n,t){var e=n.site,i=t.left,r=t.right;return e===r&&(r=i,i=e),r?Math.atan2(r[1]-i[1],r[0]-i[0]):(e===i?(i=t[1],r=t[0]):(i=t[0],r=t[1]),Math.atan2(i[0]-r[0],r[1]-i[1]))}function ZL(n,t){return t[+(t.left!==n.site)]}function sAe(n,t){return t[+(t.left===n.site)]}var PD,QJ=[];function aAe(){u0(this),this.x=this.y=this.arc=this.site=this.cy=null}function tm(n){var t=n.P,e=n.N;if(t&&e){var i=t.site,r=n.site,o=e.site;if(i!==o){var s=r[0],a=r[1],l=i[0]-s,c=i[1]-a,d=o[0]-s,u=o[1]-a,p=2*(l*u-c*d);if(!(p>=-ZJ)){var f=l*l+c*c,m=d*d+u*u,b=(u*f-c*m)/p,M=(l*m-d*f)/p,y=QJ.pop()||new aAe;y.arc=n,y.site=r,y.x=b+s,y.y=(y.cy=M+a)+Math.sqrt(b*b+M*M),n.circle=y;for(var x=null,R=m0._;R;)if(y.y<R.y||y.y===R.y&&y.x<=R.x){if(!R.L){x=R.P;break}R=R.L}else{if(!R.R){x=R;break}R=R.R}m0.insert(x,y),x||(PD=y)}}}}function nm(n){var t=n.circle;t&&(t.P||(PD=t.N),m0.remove(t),QJ.push(t),u0(t),n.circle=null)}var JJ=[];function lAe(){u0(this),this.edge=this.site=this.circle=null}function KJ(n){var t=JJ.pop()||new lAe;return t.site=n,t}function KL(n){nm(n),im.remove(n),JJ.push(n),u0(n)}function $J(n){var t=n.circle,e=t.x,i=t.cy,r=[e,i],o=n.P,s=n.N,a=[n];KL(n);for(var l=o;l.circle&&Math.abs(e-l.circle.x)<er&&Math.abs(i-l.circle.cy)<er;)o=l.P,a.unshift(l),KL(l),l=o;a.unshift(l),nm(l);for(var c=s;c.circle&&Math.abs(e-c.circle.x)<er&&Math.abs(i-c.circle.cy)<er;)s=c.N,a.push(c),KL(c),c=s;a.push(c),nm(c);var u,d=a.length;for(u=1;u<d;++u)tx((c=a[u]).edge,(l=a[u-1]).site,c.site,r);(c=a[d-1]).edge=p0((l=a[0]).site,c.site,null,r),tm(l),tm(c)}function e$(n){for(var i,r,o,s,t=n[0],e=n[1],a=im._;a;)if((o=t$(a,e)-t)>er)a=a.L;else{if(!((s=t-cAe(a,e))>er)){o>-er?(i=a.P,r=a):s>-er?(i=a,r=a.N):i=r=a;break}if(!a.R){i=a;break}a=a.R}!function(n){hs[n.index]={site:n,halfedges:[]}}(n);var l=KJ(n);if(im.insert(i,l),i||r){if(i===r)return nm(i),r=KJ(i.site),im.insert(l,r),l.edge=r.edge=p0(i.site,l.site),tm(i),void tm(r);if(!r)return void(l.edge=p0(i.site,l.site));nm(i),nm(r);var c=i.site,d=c[0],u=c[1],p=n[0]-d,f=n[1]-u,m=r.site,b=m[0]-d,M=m[1]-u,y=2*(p*M-f*b),x=p*p+f*f,R=b*b+M*M,A=[(M*x-f*R)/y+d,(p*R-b*x)/y+u];tx(r.edge,c,m,A),l.edge=p0(c,n,null,A),r.edge=p0(n,m,null,A),tm(i),tm(r)}}function t$(n,t){var e=n.site,i=e[0],r=e[1],o=r-t;if(!o)return i;var s=n.P;if(!s)return-1/0;var a=(e=s.site)[0],l=e[1],c=l-t;if(!c)return a;var d=a-i,u=1/o-1/c,p=d/c;return u?(-p+Math.sqrt(p*p-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+i:(i+a)/2}function cAe(n,t){var e=n.N;if(e)return t$(e,t);var i=n.site;return i[1]===t?i[0]:1/0}var im,hs,m0,Do,er=1e-6,ZJ=1e-12;function dAe(n,t,e){return(n[0]-e[0])*(t[1]-n[1])-(n[0]-t[0])*(e[1]-n[1])}function uAe(n,t){return t[1]-n[1]||t[0]-n[0]}function OD(n,t){var i,r,o,e=n.sort(uAe).pop();for(Do=[],hs=new Array(n.length),im=new QL,m0=new QL;;)if(o=PD,e&&(!o||e[1]<o.y||e[1]===o.y&&e[0]<o.x))(e[0]!==i||e[1]!==r)&&(e$(e),i=e[0],r=e[1]),e=n.pop();else{if(!o)break;$J(o.arc)}if(function(){for(var e,i,r,o,n=0,t=hs.length;n<t;++n)if((e=hs[n])&&(o=(i=e.halfedges).length)){var s=new Array(o),a=new Array(o);for(r=0;r<o;++r)s[r]=r,a[r]=oAe(e,Do[i[r]]);for(s.sort(function(l,c){return a[c]-a[l]}),r=0;r<o;++r)a[r]=i[s[r]];for(r=0;r<o;++r)i[r]=a[r]}}(),t){var s=+t[0][0],a=+t[0][1],l=+t[1][0],c=+t[1][1];(function(n,t,e,i){for(var o,r=Do.length;r--;)rAe(o=Do[r],n,t,e,i)&&iAe(o,n,t,e,i)&&(Math.abs(o[0][0]-o[1][0])>er||Math.abs(o[0][1]-o[1][1])>er)||delete Do[r]})(s,a,l,c),function(n,t,e,i){var o,s,a,l,c,d,u,p,f,m,b,M,r=hs.length,y=!0;for(o=0;o<r;++o)if(s=hs[o]){for(a=s.site,l=(c=s.halfedges).length;l--;)Do[c[l]]||c.splice(l,1);for(l=0,d=c.length;l<d;)b=(m=sAe(s,Do[c[l]]))[0],M=m[1],p=(u=ZL(s,Do[c[++l%d]]))[0],f=u[1],(Math.abs(b-p)>er||Math.abs(M-f)>er)&&(c.splice(l,0,Do.push(f0(a,m,Math.abs(b-n)<er&&i-M>er?[n,Math.abs(p-n)<er?f:i]:Math.abs(M-i)<er&&e-b>er?[Math.abs(f-i)<er?p:e,i]:Math.abs(b-e)<er&&M-t>er?[e,Math.abs(p-e)<er?f:t]:Math.abs(M-t)<er&&b-n>er?[Math.abs(f-t)<er?p:n,t]:null))-1),++d);d&&(y=!1)}if(y){var x,R,A,V=1/0;for(o=0,y=null;o<r;++o)(s=hs[o])&&(A=(x=(a=s.site)[0]-n)*x+(R=a[1]-t)*R)<V&&(V=A,y=s);if(y){var te=[n,t],K=[n,i],xe=[e,i],Xe=[e,t];y.halfedges.push(Do.push(f0(a=y.site,te,K))-1,Do.push(f0(a,K,xe))-1,Do.push(f0(a,xe,Xe))-1,Do.push(f0(a,Xe,te))-1)}}for(o=0;o<r;++o)(s=hs[o])&&(s.halfedges.length||delete hs[o])}(s,a,l,c)}this.edges=Do,this.cells=hs,im=m0=Do=hs=null}function rm(n,t,e){this.k=n,this.x=t,this.y=e}OD.prototype={constructor:OD,polygons:function(){var n=this.edges;return this.cells.map(function(t){var e=t.halfedges.map(function(i){return ZL(t,n[i])});return e.data=t.site.data,e})},triangles:function(){var n=[],t=this.edges;return this.cells.forEach(function(e,i){if(a=(o=e.halfedges).length)for(var o,a,l,r=e.site,s=-1,c=t[o[a-1]],d=c.left===r?c.right:c.left;++s<a;)l=d,d=(c=t[o[s]]).left===r?c.right:c.left,l&&d&&i<l.index&&i<d.index&&dAe(r,l,d)<0&&n.push([r.data,l.data,d.data])}),n},links:function(){return this.edges.filter(function(n){return n.right}).map(function(n){return{source:n.left.data,target:n.right.data}})},find:function(n,t,e){for(var r,a,i=this,o=i._found||0,s=i.cells.length;!(a=i.cells[o]);)if(++o>=s)return null;var l=n-a.site[0],c=t-a.site[1],d=l*l+c*c;do{a=i.cells[r=o],o=null,a.halfedges.forEach(function(u){var p=i.edges[u],f=p.left;if(f!==a.site&&f||(f=p.right)){var m=n-f[0],b=t-f[1],M=m*m+b*b;M<d&&(d=M,o=f.index)}})}while(null!==o);return i._found=r,null==e||d<=e*e?a.site:null}},rm.prototype={constructor:rm,scale:function(n){return 1===n?this:new rm(this.k*n,this.x,this.y)},translate:function(n,t){return 0===n&0===t?this:new rm(this.k,this.x+this.k*n,this.y+this.k*t)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new rm(1,0,0);var s3=1e4,a3=.001,o$=Qr(".2~e"),pAe=Qr(".4~r"),n$=Qr(",~");function i$(n){if(0===n)return"0";let t=Math.abs(n);return t>=s3||t<a3?o$(n):pAe(n)}var ip={formatTick:i$,formatShort:i$,formatReadable(n){let t=Math.abs(n);return t>=s3||t<a3?o$(n):n$(n)},formatLong:n$},fAe=new Intl.NumberFormat(void 0,{maximumFractionDigits:4});function kD(n){return fAe.format(n)}var g0={formatTick:kD,formatShort:kD,formatReadable:kD,formatLong:kD},mAe=Qr("0.3~s"),hAe=Qr(",.3~f");function FD(n){let t=Math.abs(n);return t>=s3||t<a3?mAe(n):hAe(n)}var l3={formatTick:FD,formatShort:FD,formatReadable:FD,formatLong:FD},n3=1e3,i3=60*n3,r3=60*i3,o3=24*r3,r$=365*o3,h0=Qr(".4~");function ND(n){if(0===n)return"0";let t=Math.sign(n)>0?"":"-",e=Math.abs(n);return t+=e<n3?`${h0(e)} ms`:e<i3?`${h0(e/n3)} sec`:e<r3?`${h0(e/i3)} min`:e<o3?`${h0(e/r3)} hr`:e<r$?`${h0(e/o3)} day`:`${h0(e/r$)} yr`,t}var t3,_0={formatTick:ND,formatShort:ND,formatReadable:ND,formatLong:ND},gAe=em().tickFormat(),s$={formatTick:n=>gAe(new Date(n)),formatShort:n=>new Date(n).toLocaleString(t3,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),formatReadable:n=>new Date(n).toLocaleString(t3,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}),formatLong:n=>new Date(n).toLocaleString(t3,{year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short",fractionalSecondDigits:3})};function ql(n){switch(n){case nr.LINEAR:return new nx;case nr.LOG10:return new c3;case nr.TIME:return new ix;default:throw new RangeError(`ScaleType ${n} not supported.`)}}var nx=class{constructor(){this.defaultFormatter=ip}transform(t,e,i){let[r,o]=t,s=o-r,[a,l]=e;return 0===s?a:(l-a)/s*(i-r)+a}forward(t,e,i){return this.transform(t,e,i)}reverse(t,e,i){return this.transform(e,t,i)}niceDomain(t){let[e,i]=t;if(i<e)throw new Error("Unexpected input: min is larger than max");if(i===e)return 0===e?[-1,1]:e<0?[2*e,0]:[0,2*e];let r=Wl(),o=.05*(i-e+Number.EPSILON),[s,a]=r.domain([e-o,i+o]).nice().domain();return[s,a]}ticks(t,e){return Wl().domain(t).ticks(e)}isSafeNumber(t){return Number.isFinite(t)}},c3=class{constructor(){this.defaultFormatter=ip}transform(t){return Math.log10(t>0?t:Number.MIN_VALUE)}untransform(t){return Math.exp(t/Math.LOG10E)}forward(t,e,i){if(i<=0)return e[0];let[r,o]=t,[s,a]=e,l=this.transform(r),d=this.transform(o)-l,u=a-s;return i=this.transform(i),u/(d+Number.EPSILON)*(i-l)+s}reverse(t,e,i){let[r,o]=t,[s,a]=e,l=this.transform(r),d=this.transform(o)-l;return this.untransform(d/(a-s+Number.EPSILON)*(i-s)+l)}niceDomain(t){let[e,i]=t;if(e>i)throw new Error("Unexpected input: min is larger than max");let r=Math.max(e,Number.MIN_VALUE),o=Math.max(i,Number.MIN_VALUE);return i<=0?[Number.MIN_VALUE,1]:[Math.max(Number.MIN_VALUE,.5*r),2*o]}ticks(t,e){let i=t[0]<=0?Number.MIN_VALUE:t[0],r=t[1]<=0?Number.MIN_VALUE:t[1],o=Gy().domain([i,r]).ticks(e);return o.length?o:t}isSafeNumber(t){return Number.isFinite(t)&&t>0}},ix=class{constructor(){this.scale=em(),this.defaultFormatter=s$}forward(t,e,i){return this.scale.domain(t).range(e)(i)}reverse(t,e,i){return this.scale.domain(t).range(e).invert(i).getTime()}niceDomain(t){let[e,i]=this.scale.domain(t).nice().domain();return[e.getTime(),i.getTime()]}ticks(t,e){return this.scale.domain(t).ticks(e).map(i=>i.getTime())}isSafeNumber(t){return Number.isFinite(t)}},d3=!1;if(self.hasOwnProperty("WebGL2RenderingContext")&&self.hasOwnProperty("document")){let n=document.createElement("canvas");n.addEventListener("webglcontextcreationerror",()=>{d3=!1});let t=n.getContext("webgl2");d3=Boolean(t)}var Yl_convertRectToExtent=function(n){return{x:[n.x,n.x+n.width],y:[n.y,n.y+n.height]}},Yl_isWebGl2Supported=function(){return d3},Yl_isWebGl2OffscreenCanvasSupported=function(){if(!self.hasOwnProperty("OffscreenCanvas"))return!1;let n=new OffscreenCanvas(0,0).getContext("webgl2");return Boolean(n)},Yl_arePolylinesEqual=function(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0},b0=class{constructor(){this.xScale=ql(nr.LINEAR),this.yScale=ql(nr.LINEAR),this.domContainerRect={x:0,width:1,y:0,height:1},this.lastUpdated=0,this.currentViewBoxRect={x:0,width:1,y:0,height:1}}getUpdateIdentifier(){return this.lastUpdated}updateIdentifier(){this.lastUpdated++}isYAxisPointedDown(){return!0}setXScale(t){this.xScale=t,this.updateIdentifier()}setYScale(t){this.yScale=t,this.updateIdentifier()}getCurrentViewBoxRect(){return this.currentViewBoxRect}setViewBoxRect(t){this.currentViewBoxRect=t,this.updateIdentifier()}setDomContainerRect(t){this.domContainerRect=t,this.updateIdentifier()}transformDataToUiCoord(t,e){let i=t,r=Yl_convertRectToExtent(this.currentViewBoxRect);return[this.xScale.forward(r.x,[i.x,i.x+i.width],e[0]),this.yScale.forward(r.y,this.isYAxisPointedDown()?[i.y+i.height,i.y]:[i.y,i.y+i.height],e[1])]}};function LD(n,t,e,i){let{color:r,visible:o,opacity:s}=i,a=n;return a||o?(a=a??t(),a=e(a),a.style.display=o?"":"none",a.style.stroke=r,a.style.opacity=String(s??1),a):null}var dV="137",MAe=0,a$=1,wAe=2,jee=1,SAe=2,mx=3,yx=0,go=1,q0=2,pp=0,gx=1,l$=2,c$=3,d$=4,EAe=5,B0=100,TAe=101,DAe=102,u$=103,p$=104,IAe=200,AAe=201,RAe=202,PAe=203,Wee=204,qee=205,OAe=206,kAe=207,FAe=208,NAe=209,LAe=210,BAe=0,VAe=1,HAe=2,Z3=3,zAe=4,UAe=5,jAe=6,GAe=7,YI=0,WAe=1,qAe=2,fp=0,YAe=1,XAe=2,QAe=3,ZAe=4,KAe=5,Wx=301,qx=302,K3=303,J3=304,XI=306,uV=307,$3=1e3,ya=1001,eB=1002,_o=1003,f$=1004,m$=1005,$o=1006,JAe=1007,QI=1008,mp=1009,$Ae=1010,eRe=1011,xx=1012,tRe=1013,_I=1014,cm=1015,U0=1016,nRe=1017,iRe=1018,j0=1020,rRe=1021,gs=1023,oRe=1024,sRe=1025,um=1026,Y0=1027,aRe=1028,lRe=1029,cRe=1030,dRe=1031,uRe=1033,u3=33776,p3=33777,f3=33778,m3=33779,h$=35840,g$=35841,_$=35842,b$=35843,pRe=36196,v$=37492,y$=37496,x$=37808,C$=37809,M$=37810,w$=37811,S$=37812,E$=37813,T$=37814,D$=37815,I$=37816,A$=37817,R$=37818,P$=37819,O$=37820,k$=37821,F$=36492,V0=2400,H0=2401,_p=3e3,Ar=3001,bRe=3201,o_=0,vRe=1,Cx=35044,xI=35048,N$="300 es",tB=1035,Ud=class{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});let i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;let i=this._listeners;return void 0!==i[t]&&-1!==i[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;let r=this._listeners[t];if(void 0!==r){let o=r.indexOf(e);-1!==o&&r.splice(o,1)}}dispatchEvent(t){if(void 0===this._listeners)return;let i=this._listeners[t.type];if(void 0!==i){t.target=this;let r=i.slice(0);for(let o=0,s=r.length;o<s;o++)r[o].call(this,t);t.target=null}}},Vo=[];for(let n=0;n<256;n++)Vo[n]=(n<16?"0":"")+n.toString(16);var _3=Math.PI/180,nB=180/Math.PI;function Jl(){let n=4294967295*Math.random()|0,t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,i=4294967295*Math.random()|0;return(Vo[255&n]+Vo[n>>8&255]+Vo[n>>16&255]+Vo[n>>24&255]+"-"+Vo[255&t]+Vo[t>>8&255]+"-"+Vo[t>>16&15|64]+Vo[t>>24&255]+"-"+Vo[63&e|128]+Vo[e>>8&255]+"-"+Vo[e>>16&255]+Vo[e>>24&255]+Vo[255&i]+Vo[i>>8&255]+Vo[i>>16&255]+Vo[i>>24&255]).toUpperCase()}function Ks(n,t,e){return Math.max(t,Math.min(e,n))}function b3(n,t,e){return(1-e)*n+e*t}function L$(n){return 0==(n&n-1)&&0!==n}function CRe(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}var $e=class{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(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(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(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(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(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(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,i=this.y,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6],this.y=r[1]*e+r[4]*i+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(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(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(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,i){return void 0!==i&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let i=Math.cos(e),r=Math.sin(e),o=this.x-t.x,s=this.y-t.y;return this.x=o*i-s*r+t.x,this.y=o*r+s*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};$e.prototype.isVector2=!0;var bo=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,i,r,o,s,a,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=o,d[5]=l,d[6]=i,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let 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(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,r=e.elements,o=this.elements,s=i[0],a=i[3],l=i[6],c=i[1],d=i[4],u=i[7],p=i[2],f=i[5],m=i[8],b=r[0],M=r[3],y=r[6],x=r[1],R=r[4],A=r[7],V=r[2],te=r[5],K=r[8];return o[0]=s*b+a*x+l*V,o[3]=s*M+a*R+l*te,o[6]=s*y+a*A+l*K,o[1]=c*b+d*x+u*V,o[4]=c*M+d*R+u*te,o[7]=c*y+d*A+u*K,o[2]=p*b+f*x+m*V,o[5]=p*M+f*R+m*te,o[8]=p*y+f*A+m*K,this}multiplyScalar(t){let 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(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8];return e*s*d-e*a*c-i*o*d+i*a*l+r*o*c-r*s*l}invert(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8],u=d*s-a*c,p=a*l-d*o,f=c*o-s*l,m=e*u+i*p+r*f;if(0===m)return this.set(0,0,0,0,0,0,0,0,0);let b=1/m;return t[0]=u*b,t[1]=(r*c-d*i)*b,t[2]=(a*i-r*s)*b,t[3]=p*b,t[4]=(d*e-r*l)*b,t[5]=(r*o-a*e)*b,t[6]=f*b,t[7]=(i*l-c*e)*b,t[8]=(s*e-i*o)*b,this}transpose(){let 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(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let 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(t,e,i,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(i*l,i*c,-i*(l*s+c*a)+s+t,-r*c,r*l,-r*(-c*s+l*a)+a+e,0,0,1),this}scale(t,e){let i=this.elements;return i[0]*=t,i[3]*=t,i[6]*=t,i[1]*=e,i[4]*=e,i[7]*=e,this}rotate(t){let e=Math.cos(t),i=Math.sin(t),r=this.elements,o=r[0],s=r[3],a=r[6],l=r[1],c=r[4],d=r[7];return r[0]=e*o+i*l,r[3]=e*s+i*c,r[6]=e*a+i*d,r[1]=-i*o+e*l,r[4]=-i*s+e*c,r[7]=-i*a+e*d,this}translate(t,e){let i=this.elements;return i[0]+=t*i[2],i[3]+=t*i[5],i[6]+=t*i[8],i[1]+=e*i[2],i[4]+=e*i[5],i[7]+=e*i[8],this}equals(t){let e=this.elements,i=t.elements;for(let r=0;r<9;r++)if(e[r]!==i[r])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return(new this.constructor).fromArray(this.elements)}};function Qee(n){for(let t=n.length-1;t>=0;--t)if(n[t]>65535)return!0;return!1}function Mx(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}bo.prototype.isMatrix3=!0;var B$={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},Xl={h:0,s:0,l:0},BD={h:0,s:0,l:0};function v3(n,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?n+6*(t-n)*e:e<.5?t:e<2/3?n+6*(t-n)*(2/3-e):n}function G0(n){return n<.04045?.0773993808*n:Math.pow(.9478672986*n+.0521327014,2.4)}function y3(n){return n<.0031308?12.92*n:1.055*Math.pow(n,.41666)-.055}var an=(()=>{class n{constructor(e,i,r){return void 0===i&&void 0===r?this.set(e):this.setRGB(e,i,r)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,this}setRGB(e,i,r){return this.r=e,this.g=i,this.b=r,this}setHSL(e,i,r){if(e=function(n,t){return(n%1+1)%1}(e),i=Ks(i,0,1),r=Ks(r,0,1),0===i)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+i):r+i-r*i,s=2*r-o;this.r=v3(s,o,e+1/3),this.g=v3(s,o,e),this.b=v3(s,o,e-1/3)}return this}setStyle(e){function i(o){void 0!==o&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let o,a=r[2];switch(r[1]){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,i(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,i(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return i(o[4]),this.setHSL(l,c,d)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(3===s)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(6===s)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let i=B$[e.toLowerCase()];return void 0!==i?this.setHex(i):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=G0(e.r),this.g=G0(e.g),this.b=G0(e.b),this}copyLinearToSRGB(e){return this.r=y3(e.r),this.g=y3(e.g),this.b=y3(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return 255*this.r<<16^255*this.g<<8^255*this.b<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let l,c,i=this.r,r=this.g,o=this.b,s=Math.max(i,r,o),a=Math.min(i,r,o),d=(a+s)/2;if(a===s)l=0,c=0;else{let u=s-a;switch(c=d<=.5?u/(s+a):u/(2-s-a),s){case i:l=(r-o)/u+(r<o?6:0);break;case r:l=(o-i)/u+2;break;case o:l=(i-r)/u+4}l/=6}return e.h=l,e.s=c,e.l=d,e}getStyle(){return"rgb("+(255*this.r|0)+","+(255*this.g|0)+","+(255*this.b|0)+")"}offsetHSL(e,i,r){return this.getHSL(Xl),Xl.h+=e,Xl.s+=i,Xl.l+=r,this.setHSL(Xl.h,Xl.s,Xl.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,i){return this.r=e.r+i.r,this.g=e.g+i.g,this.b=e.b+i.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,i){return this.r+=(e.r-this.r)*i,this.g+=(e.g-this.g)*i,this.b+=(e.b-this.b)*i,this}lerpColors(e,i,r){return this.r=e.r+(i.r-e.r)*r,this.g=e.g+(i.g-e.g)*r,this.b=e.b+(i.b-e.b)*r,this}lerpHSL(e,i){this.getHSL(Xl),e.getHSL(BD);let r=b3(Xl.h,BD.h,i),o=b3(Xl.s,BD.s,i),s=b3(Xl.l,BD.l,i);return this.setHSL(r,o,s),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,i=0){return this.r=e[i],this.g=e[i+1],this.b=e[i+2],this}toArray(e=[],i=0){return e[i]=this.r,e[i+1]=this.g,e[i+2]=this.b,e}fromBufferAttribute(e,i){return this.r=e.getX(i),this.g=e.getY(i),this.b=e.getZ(i),!0===e.normalized&&(this.r/=255,this.g/=255,this.b/=255),this}toJSON(){return this.getHex()}}return n.NAMES=B$,n})();an.prototype.isColor=!0,an.prototype.r=1,an.prototype.g=1,an.prototype.b=1;var v0,jd=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===v0&&(v0=Mx("canvas")),v0.width=t.width,v0.height=t.height;let i=v0.getContext("2d");t instanceof ImageData?i.putImageData(t,0,0):i.drawImage(t,0,0,t.width,t.height),e=v0}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Mx("canvas");e.width=t.width,e.height=t.height;let i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);let r=i.getImageData(0,0,t.width,t.height),o=r.data;for(let s=0;s<o.length;s++)o[s]=255*G0(o[s]/255);return i.putImageData(r,0,0),e}if(t.data){let e=t.data.slice(0);for(let i=0;i<e.length;i++)e[i]=e instanceof Uint8Array||e instanceof Uint8ClampedArray?Math.floor(255*G0(e[i]/255)):G0(e[i]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},MRe=0,lo=class extends Ud{constructor(t=lo.DEFAULT_IMAGE,e=lo.DEFAULT_MAPPING,i=ya,r=ya,o=$o,s=QI,a=gs,l=mp,c=1,d=_p){super(),Object.defineProperty(this,"id",{value:MRe++}),this.uuid=Jl(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=i,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new $e(0,0),this.repeat=new $e(1,1),this.center=new $e(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new bo,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(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.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){let e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];let i={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){let r=this.image;if(void 0===r.uuid&&(r.uuid=Jl()),!e&&void 0===t.images[r.uuid]){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s<a;s++)o.push(x3(r[s].isDataTexture?r[s].image:r[s]))}else o=x3(r);t.images[r.uuid]={uuid:r.uuid,url:o}}i.image=r.uuid}return"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case $3:t.x=t.x-Math.floor(t.x);break;case ya:t.x=t.x<0?0:1;break;case eB:t.x=1===Math.abs(Math.floor(t.x)%2)?Math.ceil(t.x)-t.x:t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case $3:t.y=t.y-Math.floor(t.y);break;case ya:t.y=t.y<0?0:1;break;case eB:t.y=1===Math.abs(Math.floor(t.y)%2)?Math.ceil(t.y)-t.y:t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&this.version++}};function x3(n){return typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&n instanceof ImageBitmap?jd.getDataURL(n):n.data?{data:Array.prototype.slice.call(n.data),width:n.width,height:n.height,type:n.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}lo.DEFAULT_IMAGE=void 0,lo.DEFAULT_MAPPING=300,lo.prototype.isTexture=!0;var Zi=class{constructor(t=0,e=0,i=0,r=1){this.x=t,this.y=e,this.z=i,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,r){return this.x=t,this.y=e,this.z=i,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(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(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(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(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(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(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(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(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}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,i=this.y,r=this.z,o=this.w,s=t.elements;return this.x=s[0]*e+s[4]*i+s[8]*r+s[12]*o,this.y=s[1]*e+s[5]*i+s[9]*r+s[13]*o,this.z=s[2]*e+s[6]*i+s[10]*r+s[14]*o,this.w=s[3]*e+s[7]*i+s[11]*r+s[15]*o,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let 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(t){let e,i,r,o,l=t.elements,c=l[0],d=l[4],u=l[8],p=l[1],f=l[5],m=l[9],b=l[2],M=l[6],y=l[10];if(Math.abs(d-p)<.01&&Math.abs(u-b)<.01&&Math.abs(m-M)<.01){if(Math.abs(d+p)<.1&&Math.abs(u+b)<.1&&Math.abs(m+M)<.1&&Math.abs(c+f+y-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let R=(c+1)/2,A=(f+1)/2,V=(y+1)/2,te=(d+p)/4,K=(u+b)/4,xe=(m+M)/4;return R>A&&R>V?R<.01?(i=0,r=.707106781,o=.707106781):(i=Math.sqrt(R),r=te/i,o=K/i):A>V?A<.01?(i=.707106781,r=0,o=.707106781):(r=Math.sqrt(A),i=te/r,o=xe/r):V<.01?(i=.707106781,r=.707106781,o=0):(o=Math.sqrt(V),i=K/o,r=xe/o),this.set(i,r,o,e),this}let x=Math.sqrt((M-m)*(M-m)+(u-b)*(u-b)+(p-d)*(p-d));return Math.abs(x)<.001&&(x=1),this.x=(M-m)/x,this.y=(u-b)/x,this.z=(p-d)/x,this.w=Math.acos((c+f+y-1)/2),this}min(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(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(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(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(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,i){return void 0!==i&&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}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}};Zi.prototype.isVector4=!0;var Js=class extends Ud{constructor(t,e,i={}){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new Zi(0,0,t,e),this.scissorTest=!1,this.viewport=new Zi(0,0,t,e),this.texture=new lo(void 0,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:e,depth:1},this.texture.generateMipmaps=void 0!==i.generateMipmaps&&i.generateMipmaps,this.texture.internalFormat=void 0!==i.internalFormat?i.internalFormat:null,this.texture.minFilter=void 0!==i.minFilter?i.minFilter:$o,this.depthBuffer=void 0===i.depthBuffer||i.depthBuffer,this.stencilBuffer=void 0!==i.stencilBuffer&&i.stencilBuffer,this.depthTexture=void 0!==i.depthTexture?i.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,i=1){(this.width!==t||this.height!==e||this.depth!==i)&&(this.width=t,this.height=e,this.depth=i,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=i,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image=Object.assign({},t.texture.image),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};Js.prototype.isWebGLRenderTarget=!0,class extends Js{constructor(t,e,i){super(t,e);let r=this.texture;this.texture=[];for(let o=0;o<i;o++)this.texture[o]=r.clone()}setSize(t,e,i=1){if(this.width!==t||this.height!==e||this.depth!==i){this.width=t,this.height=e,this.depth=i;for(let r=0,o=this.texture.length;r<o;r++)this.texture[r].image.width=t,this.texture[r].image.height=e,this.texture[r].image.depth=i;this.dispose()}return this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e),this}copy(t){this.dispose(),this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this.texture.length=0;for(let e=0,i=t.texture.length;e<i;e++)this.texture[e]=t.texture[e].clone();return this}}.prototype.isWebGLMultipleRenderTargets=!0;var wx=class extends Js{constructor(t,e,i={}){super(t,e,i),this.samples=4,this.ignoreDepthForMultisampleCopy=void 0===i.ignoreDepth||i.ignoreDepth,this.useRenderToTexture=void 0!==i.useRenderToTexture&&i.useRenderToTexture,this.useRenderbuffer=!1===this.useRenderToTexture}copy(t){return super.copy.call(this,t),this.samples=t.samples,this.useRenderToTexture=t.useRenderToTexture,this.useRenderbuffer=t.useRenderbuffer,this}};wx.prototype.isWebGLMultisampleRenderTarget=!0;var ts=class{constructor(t=0,e=0,i=0,r=1){this._x=t,this._y=e,this._z=i,this._w=r}static slerp(t,e,i,r){return console.warn("THREE.Quaternion: Static .slerp() has been deprecated. Use qm.slerpQuaternions( qa, qb, t ) instead."),i.slerpQuaternions(t,e,r)}static slerpFlat(t,e,i,r,o,s,a){let l=i[r+0],c=i[r+1],d=i[r+2],u=i[r+3],p=o[s+0],f=o[s+1],m=o[s+2],b=o[s+3];if(0===a)return t[e+0]=l,t[e+1]=c,t[e+2]=d,void(t[e+3]=u);if(1===a)return t[e+0]=p,t[e+1]=f,t[e+2]=m,void(t[e+3]=b);if(u!==b||l!==p||c!==f||d!==m){let M=1-a,y=l*p+c*f+d*m+u*b,x=y>=0?1:-1,R=1-y*y;if(R>Number.EPSILON){let V=Math.sqrt(R),te=Math.atan2(V,y*x);M=Math.sin(M*te)/V,a=Math.sin(a*te)/V}let A=a*x;if(l=l*M+p*A,c=c*M+f*A,d=d*M+m*A,u=u*M+b*A,M===1-a){let V=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=V,c*=V,d*=V,u*=V}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=u}static multiplyQuaternionsFlat(t,e,i,r,o,s){let a=i[r],l=i[r+1],c=i[r+2],d=i[r+3],u=o[s],p=o[s+1],f=o[s+2],m=o[s+3];return t[e]=a*m+d*u+l*f-c*p,t[e+1]=l*m+d*p+c*u-a*f,t[e+2]=c*m+d*f+a*p-l*u,t[e+3]=d*m-a*u-l*p-c*f,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,r){return this._x=t,this._y=e,this._z=i,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!t||!t.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let i=t._x,r=t._y,o=t._z,s=t._order,a=Math.cos,l=Math.sin,c=a(i/2),d=a(r/2),u=a(o/2),p=l(i/2),f=l(r/2),m=l(o/2);switch(s){case"XYZ":this._x=p*d*u+c*f*m,this._y=c*f*u-p*d*m,this._z=c*d*m+p*f*u,this._w=c*d*u-p*f*m;break;case"YXZ":this._x=p*d*u+c*f*m,this._y=c*f*u-p*d*m,this._z=c*d*m-p*f*u,this._w=c*d*u+p*f*m;break;case"ZXY":this._x=p*d*u-c*f*m,this._y=c*f*u+p*d*m,this._z=c*d*m+p*f*u,this._w=c*d*u-p*f*m;break;case"ZYX":this._x=p*d*u-c*f*m,this._y=c*f*u+p*d*m,this._z=c*d*m-p*f*u,this._w=c*d*u+p*f*m;break;case"YZX":this._x=p*d*u+c*f*m,this._y=c*f*u+p*d*m,this._z=c*d*m-p*f*u,this._w=c*d*u-p*f*m;break;case"XZY":this._x=p*d*u-c*f*m,this._y=c*f*u-p*d*m,this._z=c*d*m+p*f*u,this._w=c*d*u+p*f*m;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return!1!==e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let i=e/2,r=Math.sin(i);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,i=e[0],r=e[4],o=e[8],s=e[1],a=e[5],l=e[9],c=e[2],d=e[6],u=e[10],p=i+a+u;if(p>0){let f=.5/Math.sqrt(p+1);this._w=.25/f,this._x=(d-l)*f,this._y=(o-c)*f,this._z=(s-r)*f}else if(i>a&&i>u){let f=2*Math.sqrt(1+i-a-u);this._w=(d-l)/f,this._x=.25*f,this._y=(r+s)/f,this._z=(o+c)/f}else if(a>u){let f=2*Math.sqrt(1+a-i-u);this._w=(o-c)/f,this._x=(r+s)/f,this._y=.25*f,this._z=(l+d)/f}else{let f=2*Math.sqrt(1+u-i-a);this._w=(s-r)/f,this._x=(o+c)/f,this._y=(l+d)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return i<Number.EPSILON?(i=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=i):(this._x=0,this._y=-t.z,this._z=t.y,this._w=i)):(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=i),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ks(this.dot(t),-1,1)))}rotateTowards(t,e){let i=this.angleTo(t);if(0===i)return this;let r=Math.min(1,e/i);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let 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(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(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let i=t._x,r=t._y,o=t._z,s=t._w,a=e._x,l=e._y,c=e._z,d=e._w;return this._x=i*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-i*c,this._z=o*d+s*c+i*l-r*a,this._w=s*d-i*a-r*l-o*c,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);let i=this._x,r=this._y,o=this._z,s=this._w,a=s*t._w+i*t._x+r*t._y+o*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=s,this._x=i,this._y=r,this._z=o,this;let l=1-a*a;if(l<=Number.EPSILON){let f=1-e;return this._w=f*s+e*this._w,this._x=f*i+e*this._x,this._y=f*r+e*this._y,this._z=f*o+e*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),d=Math.atan2(c,a),u=Math.sin((1-e)*d)/c,p=Math.sin(e*d)/c;return this._w=s*u+this._w*p,this._x=i*u+this._x*p,this._y=r*u+this._y*p,this._z=o*u+this._z*p,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){let t=Math.random(),e=Math.sqrt(1-t),i=Math.sqrt(t),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(e*Math.cos(r),i*Math.sin(o),i*Math.cos(o),e*Math.sin(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(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(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};ts.prototype.isQuaternion=!0;var $=class{constructor(t=0,e=0,i=0){this.x=t,this.y=e,this.z=i}set(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(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(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(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(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(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(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(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(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(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(V$.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(V$.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[3]*i+o[6]*r,this.y=o[1]*e+o[4]*i+o[7]*r,this.z=o[2]*e+o[5]*i+o[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,i=this.y,r=this.z,o=t.elements,s=1/(o[3]*e+o[7]*i+o[11]*r+o[15]);return this.x=(o[0]*e+o[4]*i+o[8]*r+o[12])*s,this.y=(o[1]*e+o[5]*i+o[9]*r+o[13])*s,this.z=(o[2]*e+o[6]*i+o[10]*r+o[14])*s,this}applyQuaternion(t){let e=this.x,i=this.y,r=this.z,o=t.x,s=t.y,a=t.z,l=t.w,c=l*e+s*r-a*i,d=l*i+a*e-o*r,u=l*r+o*i-s*e,p=-o*e-s*i-a*r;return this.x=c*l+p*-o+d*-a-u*-s,this.y=d*l+p*-s+u*-o-c*-a,this.z=u*l+p*-a+c*-s-d*-o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,i=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[4]*i+o[8]*r,this.y=o[1]*e+o[5]*i+o[9]*r,this.z=o[2]*e+o[6]*i+o[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(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(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(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(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(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(t,Math.min(e,i)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(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(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(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(t,e){let i=t.x,r=t.y,o=t.z,s=e.x,a=e.y,l=e.z;return this.x=r*l-o*a,this.y=o*s-i*l,this.z=i*a-r*s,this}projectOnVector(t){let e=t.lengthSq();if(0===e)return this.set(0,0,0);let i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return C3.copy(this).projectOnVector(t),this.sub(C3)}reflect(t){return this.sub(C3.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;let i=this.dot(t)/e;return Math.acos(Ks(i,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y,r=this.z-t.z;return e*e+i*i+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){let r=Math.sin(e)*t;return this.x=r*Math.sin(i),this.y=Math.cos(e)*t,this.z=r*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,i){return void 0!==i&&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}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=2*(Math.random()-.5),e=Math.random()*Math.PI*2,i=Math.sqrt(1-t**2);return this.x=i*Math.cos(e),this.y=i*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};$.prototype.isVector3=!0;var C3=new $,V$=new ts,xa=class{constructor(t=new $(1/0,1/0,1/0),e=new $(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,i=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=t.length;l<c;l+=3){let d=t[l],u=t[l+1],p=t[l+2];d<e&&(e=d),u<i&&(i=u),p<r&&(r=p),d>o&&(o=d),u>s&&(s=u),p>a&&(a=p)}return this.min.set(e,i,r),this.max.set(o,s,a),this}setFromBufferAttribute(t){let e=1/0,i=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=t.count;l<c;l++){let d=t.getX(l),u=t.getY(l),p=t.getZ(l);d<e&&(e=d),u<i&&(i=u),p<r&&(r=p),d>o&&(o=d),u>s&&(s=u),p>a&&(a=p)}return this.min.set(e,i,r),this.max.set(o,s,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let i=om.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let i=t.geometry;if(void 0!==i)if(e&&null!=i.attributes&&void 0!==i.attributes.position){let o=i.attributes.position;for(let s=0,a=o.count;s<a;s++)om.fromBufferAttribute(o,s).applyMatrix4(t.matrixWorld),this.expandByPoint(om)}else null===i.boundingBox&&i.computeBoundingBox(),M3.copy(i.boundingBox),M3.applyMatrix4(t.matrixWorld),this.union(M3);let r=t.children;for(let o=0,s=r.length;o<s;o++)this.expandByObject(r[o],e);return this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y||t.z<this.min.z||t.z>this.max.z)}containsBox(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(t,e){return 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(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y||t.max.z<this.min.z||t.min.z>this.max.z)}intersectsSphere(t){return this.clampPoint(t.center,om),om.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(ox),VD.subVectors(this.max,ox),y0.subVectors(t.a,ox),x0.subVectors(t.b,ox),C0.subVectors(t.c,ox),rp.subVectors(x0,y0),op.subVectors(C0,x0),sm.subVectors(y0,C0);let e=[0,-rp.z,rp.y,0,-op.z,op.y,0,-sm.z,sm.y,rp.z,0,-rp.x,op.z,0,-op.x,sm.z,0,-sm.x,-rp.y,rp.x,0,-op.y,op.x,0,-sm.y,sm.x,0];return!(!w3(e,y0,x0,C0,VD)||(e=[1,0,0,0,1,0,0,0,1],!w3(e,y0,x0,C0,VD)))&&(HD.crossVectors(rp,op),e=[HD.x,HD.y,HD.z],w3(e,y0,x0,C0,VD))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return om.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=.5*this.getSize(om).length(),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(Nd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Nd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Nd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Nd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Nd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Nd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Nd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Nd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Nd)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};xa.prototype.isBox3=!0;var Nd=[new $,new $,new $,new $,new $,new $,new $,new $],om=new $,M3=new xa,y0=new $,x0=new $,C0=new $,rp=new $,op=new $,sm=new $,ox=new $,VD=new $,HD=new $,am=new $;function w3(n,t,e,i,r){for(let o=0,s=n.length-3;o<=s;o+=3){am.fromArray(n,o);let a=r.x*Math.abs(am.x)+r.y*Math.abs(am.y)+r.z*Math.abs(am.z),l=t.dot(am),c=e.dot(am),d=i.dot(am);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var wRe=new xa,H$=new $,zD=new $,S3=new $,bp=class{constructor(t=new $,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let i=this.center;void 0!==e?i.copy(e):wRe.setFromPoints(t).getCenter(i);let r=0;for(let o=0,s=t.length;o<s;o++)r=Math.max(r,i.distanceToSquared(t[o]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let i=this.center.distanceToSquared(t);return e.copy(t),i>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){S3.subVectors(t,this.center);let e=S3.lengthSq();if(e>this.radius*this.radius){let i=Math.sqrt(e),r=.5*(i-this.radius);this.center.add(S3.multiplyScalar(r/i)),this.radius+=r}return this}union(t){return!0===this.center.equals(t.center)?zD.set(0,0,1).multiplyScalar(t.radius):zD.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(H$.copy(t.center).add(zD)),this.expandByPoint(H$.copy(t.center).sub(zD)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}},Ld=new $,E3=new $,UD=new $,sp=new $,T3=new $,jD=new $,D3=new $,vp=class{constructor(t=new $,e=new $(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Ld)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(i).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=Ld.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Ld.copy(this.direction).multiplyScalar(e).add(this.origin),Ld.distanceToSquared(t))}distanceSqToSegment(t,e,i,r){E3.copy(t).add(e).multiplyScalar(.5),UD.copy(e).sub(t).normalize(),sp.copy(this.origin).sub(E3);let u,p,f,m,o=.5*t.distanceTo(e),s=-this.direction.dot(UD),a=sp.dot(this.direction),l=-sp.dot(UD),c=sp.lengthSq(),d=Math.abs(1-s*s);if(d>0)if(u=s*l-a,p=s*a-l,m=o*d,u>=0)if(p>=-m)if(p<=m){let b=1/d;u*=b,p*=b,f=u*(u+s*p+2*a)+p*(s*u+p+2*l)+c}else p=o,u=Math.max(0,-(s*p+a)),f=-u*u+p*(p+2*l)+c;else p=-o,u=Math.max(0,-(s*p+a)),f=-u*u+p*(p+2*l)+c;else p<=-m?(u=Math.max(0,-(-s*o+a)),p=u>0?-o:Math.min(Math.max(-o,-l),o),f=-u*u+p*(p+2*l)+c):p<=m?(u=0,p=Math.min(Math.max(-o,-l),o),f=p*(p+2*l)+c):(u=Math.max(0,-(s*o+a)),p=u>0?o:Math.min(Math.max(-o,-l),o),f=-u*u+p*(p+2*l)+c);else p=s>0?-o:o,u=Math.max(0,-(s*p+a)),f=-u*u+p*(p+2*l)+c;return i&&i.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(UD).multiplyScalar(p).add(E3),f}intersectSphere(t,e){Ld.subVectors(t.center,this.origin);let i=Ld.dot(this.direction),r=Ld.dot(Ld)-i*i,o=t.radius*t.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=i-s,l=i+s;return a<0&&l<0?null:this.at(a<0?l:a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;let i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){let i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return 0===e||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let i,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,p=this.origin;return c>=0?(i=(t.min.x-p.x)*c,r=(t.max.x-p.x)*c):(i=(t.max.x-p.x)*c,r=(t.min.x-p.x)*c),d>=0?(o=(t.min.y-p.y)*d,s=(t.max.y-p.y)*d):(o=(t.max.y-p.y)*d,s=(t.min.y-p.y)*d),i>s||o>r||((o>i||i!=i)&&(i=o),(s<r||r!=r)&&(r=s),u>=0?(a=(t.min.z-p.z)*u,l=(t.max.z-p.z)*u):(a=(t.max.z-p.z)*u,l=(t.min.z-p.z)*u),i>l||a>r)||((a>i||i!=i)&&(i=a),(l<r||r!=r)&&(r=l),r<0)?null:this.at(i>=0?i:r,e)}intersectsBox(t){return null!==this.intersectBox(t,Ld)}intersectTriangle(t,e,i,r,o){T3.subVectors(e,t),jD.subVectors(i,t),D3.crossVectors(T3,jD);let a,s=this.direction.dot(D3);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}sp.subVectors(this.origin,t);let l=a*this.direction.dot(jD.crossVectors(sp,jD));if(l<0)return null;let c=a*this.direction.dot(T3.cross(sp));if(c<0||l+c>s)return null;let d=-a*sp.dot(D3);return d<0?null:this.at(d/s,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}},xn=class{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,i,r,o,s,a,l,c,d,u,p,f,m,b,M){let y=this.elements;return y[0]=t,y[4]=e,y[8]=i,y[12]=r,y[1]=o,y[5]=s,y[9]=a,y[13]=l,y[2]=c,y[6]=d,y[10]=u,y[14]=p,y[3]=f,y[7]=m,y[11]=b,y[15]=M,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new xn).fromArray(this.elements)}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){let e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,i=t.elements,r=1/M0.setFromMatrixColumn(t,0).length(),o=1/M0.setFromMatrixColumn(t,1).length(),s=1/M0.setFromMatrixColumn(t,2).length();return e[0]=i[0]*r,e[1]=i[1]*r,e[2]=i[2]*r,e[3]=0,e[4]=i[4]*o,e[5]=i[5]*o,e[6]=i[6]*o,e[7]=0,e[8]=i[8]*s,e[9]=i[9]*s,e[10]=i[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let e=this.elements,i=t.x,r=t.y,o=t.z,s=Math.cos(i),a=Math.sin(i),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if("XYZ"===t.order){let p=s*d,f=s*u,m=a*d,b=a*u;e[0]=l*d,e[4]=-l*u,e[8]=c,e[1]=f+m*c,e[5]=p-b*c,e[9]=-a*l,e[2]=b-p*c,e[6]=m+f*c,e[10]=s*l}else if("YXZ"===t.order){let p=l*d,f=l*u,m=c*d,b=c*u;e[0]=p+b*a,e[4]=m*a-f,e[8]=s*c,e[1]=s*u,e[5]=s*d,e[9]=-a,e[2]=f*a-m,e[6]=b+p*a,e[10]=s*l}else if("ZXY"===t.order){let p=l*d,f=l*u,m=c*d,b=c*u;e[0]=p-b*a,e[4]=-s*u,e[8]=m+f*a,e[1]=f+m*a,e[5]=s*d,e[9]=b-p*a,e[2]=-s*c,e[6]=a,e[10]=s*l}else if("ZYX"===t.order){let p=s*d,f=s*u,m=a*d,b=a*u;e[0]=l*d,e[4]=m*c-f,e[8]=p*c+b,e[1]=l*u,e[5]=b*c+p,e[9]=f*c-m,e[2]=-c,e[6]=a*l,e[10]=s*l}else if("YZX"===t.order){let p=s*l,f=s*c,m=a*l,b=a*c;e[0]=l*d,e[4]=b-p*u,e[8]=m*u+f,e[1]=u,e[5]=s*d,e[9]=-a*d,e[2]=-c*d,e[6]=f*u+m,e[10]=p-b*u}else if("XZY"===t.order){let p=s*l,f=s*c,m=a*l,b=a*c;e[0]=l*d,e[4]=-u,e[8]=c*d,e[1]=p*u+b,e[5]=s*d,e[9]=f*u-m,e[2]=m*u-f,e[6]=a*d,e[10]=b*u+p}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(SRe,t,ERe)}lookAt(t,e,i){let r=this.elements;return ba.subVectors(t,e),0===ba.lengthSq()&&(ba.z=1),ba.normalize(),ap.crossVectors(i,ba),0===ap.lengthSq()&&(1===Math.abs(i.z)?ba.x+=1e-4:ba.z+=1e-4,ba.normalize(),ap.crossVectors(i,ba)),ap.normalize(),GD.crossVectors(ba,ap),r[0]=ap.x,r[4]=GD.x,r[8]=ba.x,r[1]=ap.y,r[5]=GD.y,r[9]=ba.y,r[2]=ap.z,r[6]=GD.z,r[10]=ba.z,this}multiply(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(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,r=e.elements,o=this.elements,s=i[0],a=i[4],l=i[8],c=i[12],d=i[1],u=i[5],p=i[9],f=i[13],m=i[2],b=i[6],M=i[10],y=i[14],x=i[3],R=i[7],A=i[11],V=i[15],te=r[0],K=r[4],xe=r[8],Xe=r[12],De=r[1],D=r[5],re=r[9],ce=r[13],fe=r[2],be=r[6],ne=r[10],de=r[14],pe=r[3],je=r[7],Ce=r[11],Ne=r[15];return o[0]=s*te+a*De+l*fe+c*pe,o[4]=s*K+a*D+l*be+c*je,o[8]=s*xe+a*re+l*ne+c*Ce,o[12]=s*Xe+a*ce+l*de+c*Ne,o[1]=d*te+u*De+p*fe+f*pe,o[5]=d*K+u*D+p*be+f*je,o[9]=d*xe+u*re+p*ne+f*Ce,o[13]=d*Xe+u*ce+p*de+f*Ne,o[2]=m*te+b*De+M*fe+y*pe,o[6]=m*K+b*D+M*be+y*je,o[10]=m*xe+b*re+M*ne+y*Ce,o[14]=m*Xe+b*ce+M*de+y*Ne,o[3]=x*te+R*De+A*fe+V*pe,o[7]=x*K+R*D+A*be+V*je,o[11]=x*xe+R*re+A*ne+V*Ce,o[15]=x*Xe+R*ce+A*de+V*Ne,this}multiplyScalar(t){let 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(){let t=this.elements,e=t[0],i=t[4],r=t[8],o=t[12],s=t[1],a=t[5],l=t[9],c=t[13],d=t[2],u=t[6],p=t[10],f=t[14];return t[3]*(+o*l*u-r*c*u-o*a*p+i*c*p+r*a*f-i*l*f)+t[7]*(+e*l*f-e*c*p+o*s*p-r*s*f+r*c*d-o*l*d)+t[11]*(+e*c*u-e*a*f-o*s*u+i*s*f+o*a*d-i*c*d)+t[15]*(-r*a*d-e*l*u+e*a*p+r*s*u-i*s*p+i*l*d)}transpose(){let e,t=this.elements;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,i){let r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=i),this}invert(){let t=this.elements,e=t[0],i=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8],u=t[9],p=t[10],f=t[11],m=t[12],b=t[13],M=t[14],y=t[15],x=u*M*c-b*p*c+b*l*f-a*M*f-u*l*y+a*p*y,R=m*p*c-d*M*c-m*l*f+s*M*f+d*l*y-s*p*y,A=d*b*c-m*u*c+m*a*f-s*b*f-d*a*y+s*u*y,V=m*u*l-d*b*l-m*a*p+s*b*p+d*a*M-s*u*M,te=e*x+i*R+r*A+o*V;if(0===te)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let K=1/te;return t[0]=x*K,t[1]=(b*p*o-u*M*o-b*r*f+i*M*f+u*r*y-i*p*y)*K,t[2]=(a*M*o-b*l*o+b*r*c-i*M*c-a*r*y+i*l*y)*K,t[3]=(u*l*o-a*p*o-u*r*c+i*p*c+a*r*f-i*l*f)*K,t[4]=R*K,t[5]=(d*M*o-m*p*o+m*r*f-e*M*f-d*r*y+e*p*y)*K,t[6]=(m*l*o-s*M*o-m*r*c+e*M*c+s*r*y-e*l*y)*K,t[7]=(s*p*o-d*l*o+d*r*c-e*p*c-s*r*f+e*l*f)*K,t[8]=A*K,t[9]=(m*u*o-d*b*o-m*i*f+e*b*f+d*i*y-e*u*y)*K,t[10]=(s*b*o-m*a*o+m*i*c-e*b*c-s*i*y+e*a*y)*K,t[11]=(d*a*o-s*u*o-d*i*c+e*u*c+s*i*f-e*a*f)*K,t[12]=V*K,t[13]=(d*b*r-m*u*r+m*i*p-e*b*p-d*i*M+e*u*M)*K,t[14]=(m*a*r-s*b*r-m*i*l+e*b*l+s*i*M-e*a*M)*K,t[15]=(s*u*r-d*a*r+d*i*l-e*u*l-s*i*p+e*a*p)*K,this}scale(t){let e=this.elements,i=t.x,r=t.y,o=t.z;return e[0]*=i,e[4]*=r,e[8]*=o,e[1]*=i,e[5]*=r,e[9]*=o,e[2]*=i,e[6]*=r,e[10]*=o,e[3]*=i,e[7]*=r,e[11]*=o,this}getMaxScaleOnAxis(){let t=this.elements;return Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1]+t[2]*t[2],t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}makeTranslation(t,e,i){return this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let i=Math.cos(e),r=Math.sin(e),o=1-i,s=t.x,a=t.y,l=t.z,c=o*s,d=o*a;return this.set(c*s+i,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+i,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,r,o,s){return this.set(1,i,o,0,t,1,s,0,e,r,1,0,0,0,0,1),this}compose(t,e,i){let r=this.elements,o=e._x,s=e._y,a=e._z,l=e._w,c=o+o,d=s+s,u=a+a,p=o*c,f=o*d,m=o*u,b=s*d,M=s*u,y=a*u,x=l*c,R=l*d,A=l*u,V=i.x,te=i.y,K=i.z;return r[0]=(1-(b+y))*V,r[1]=(f+A)*V,r[2]=(m-R)*V,r[3]=0,r[4]=(f-A)*te,r[5]=(1-(p+y))*te,r[6]=(M+x)*te,r[7]=0,r[8]=(m+R)*K,r[9]=(M-x)*K,r[10]=(1-(p+b))*K,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,i){let r=this.elements,o=M0.set(r[0],r[1],r[2]).length(),s=M0.set(r[4],r[5],r[6]).length(),a=M0.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),t.x=r[12],t.y=r[13],t.z=r[14],Ql.copy(this);let c=1/o,d=1/s,u=1/a;return Ql.elements[0]*=c,Ql.elements[1]*=c,Ql.elements[2]*=c,Ql.elements[4]*=d,Ql.elements[5]*=d,Ql.elements[6]*=d,Ql.elements[8]*=u,Ql.elements[9]*=u,Ql.elements[10]*=u,e.setFromRotationMatrix(Ql),i.x=o,i.y=s,i.z=a,this}makePerspective(t,e,i,r,o,s){void 0===s&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,c=2*o/(i-r),d=(e+t)/(e-t),u=(i+r)/(i-r),p=-(s+o)/(s-o),f=-2*s*o/(s-o);return a[0]=2*o/(e-t),a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=p,a[14]=f,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,i,r,o,s){let a=this.elements,l=1/(e-t),c=1/(i-r),d=1/(s-o),u=(e+t)*l,p=(i+r)*c,f=(s+o)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-p,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-f,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){let e=this.elements,i=t.elements;for(let r=0;r<16;r++)if(e[r]!==i[r])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}};xn.prototype.isMatrix4=!0;var M0=new $,Ql=new xn,SRe=new $(0,0,0),ERe=new $(1,1,1),ap=new $,GD=new $,ba=new $,z$=new xn,U$=new ts,yp=class{constructor(t=0,e=0,i=0,r=yp.DefaultOrder){this._x=t,this._y=e,this._z=i,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,r=this._order){return this._x=t,this._y=e,this._z=i,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){let r=t.elements,o=r[0],s=r[4],a=r[8],l=r[1],c=r[5],d=r[9],u=r[2],p=r[6],f=r[10];switch(e){case"XYZ":this._y=Math.asin(Ks(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,f),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(p,c),this._z=0);break;case"YXZ":this._x=Math.asin(-Ks(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,f),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(Ks(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-u,f),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-Ks(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(p,f),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(Ks(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,f));break;case"XZY":this._z=Math.asin(-Ks(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(p,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-d,f),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return z$.makeRotationFromQuaternion(t),this.setFromRotationMatrix(z$,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return U$.setFromEuler(this),this.setFromQuaternion(U$,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(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(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new $(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};yp.prototype.isEuler=!0,yp.DefaultOrder="XYZ",yp.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var CI=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}isEnabled(t){return 0!=(this.mask&(1<<t|0))}},TRe=0,j$=new $,w0=new ts,Bd=new xn,WD=new $,sx=new $,DRe=new $,IRe=new ts,G$=new $(1,0,0),W$=new $(0,1,0),q$=new $(0,0,1),ARe={type:"added"},Y$={type:"removed"},Bi=class extends Ud{constructor(){super(),Object.defineProperty(this,"id",{value:TRe++}),this.uuid=Jl(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Bi.DefaultUp.clone();let t=new $,e=new yp,i=new ts,r=new $(1,1,1);e._onChange(function(){i.setFromEuler(e,!1)}),i._onChange(function(){e.setFromQuaternion(i,void 0,!1)}),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:i},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new xn},normalMatrix:{value:new bo}}),this.matrix=new xn,this.matrixWorld=new xn,this.matrixAutoUpdate=Bi.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.layers=new CI,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return w0.setFromAxisAngle(t,e),this.quaternion.multiply(w0),this}rotateOnWorldAxis(t,e){return w0.setFromAxisAngle(t,e),this.quaternion.premultiply(w0),this}rotateX(t){return this.rotateOnAxis(G$,t)}rotateY(t){return this.rotateOnAxis(W$,t)}rotateZ(t){return this.rotateOnAxis(q$,t)}translateOnAxis(t,e){return j$.copy(t).applyQuaternion(this.quaternion),this.position.add(j$.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(G$,t)}translateY(t){return this.translateOnAxis(W$,t)}translateZ(t){return this.translateOnAxis(q$,t)}localToWorld(t){return t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return t.applyMatrix4(Bd.copy(this.matrixWorld).invert())}lookAt(t,e,i){t.isVector3?WD.copy(t):WD.set(t,e,i);let r=this.parent;this.updateWorldMatrix(!0,!1),sx.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Bd.lookAt(sx,WD,this.up):Bd.lookAt(WD,sx,this.up),this.quaternion.setFromRotationMatrix(Bd),r&&(Bd.extractRotation(r.matrixWorld),w0.setFromRotationMatrix(Bd),this.quaternion.premultiply(w0.invert()))}add(t){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(null!==t.parent&&t.parent.remove(t),t.parent=this,this.children.push(t),t.dispatchEvent(ARe)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let i=0;i<arguments.length;i++)this.remove(arguments[i]);return this}let e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(Y$)),this}removeFromParent(){let t=this.parent;return null!==t&&t.remove(this),this}clear(){for(let t=0;t<this.children.length;t++){let e=this.children[t];e.parent=null,e.dispatchEvent(Y$)}return this.children.length=0,this}attach(t){return this.updateWorldMatrix(!0,!1),Bd.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),Bd.multiply(t.parent.matrixWorld)),t.applyMatrix4(Bd),this.add(t),t.updateWorldMatrix(!1,!0),this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let i=0,r=this.children.length;i<r;i++){let s=this.children[i].getObjectByProperty(t,e);if(void 0!==s)return s}}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sx,t,DRe),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(sx,IRe,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].traverseVisible(t)}traverseAncestors(t){let e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,t=!0);let e=this.children;for(let i=0,r=e.length;i<r;i++)e[i].updateMatrixWorld(t)}updateWorldMatrix(t,e){let i=this.parent;if(!0===t&&null!==i&&i.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===e){let r=this.children;for(let o=0,s=r.length;o<s;o++)r[o].updateWorldMatrix(!1,!0)}}toJSON(t){let e=void 0===t||"string"==typeof t,i={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{}},i.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});let r={};function o(a,l){return void 0===a[l.uuid]&&(a[l.uuid]=l.toJSON(t)),l.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),"{}"!==JSON.stringify(this.userData)&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=o(t.geometries,this.geometry);let a=this.geometry.parameters;if(void 0!==a&&void 0!==a.shapes){let l=a.shapes;if(Array.isArray(l))for(let c=0,d=l.length;c<d;c++)o(t.shapes,l[c]);else o(t.shapes,l)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(o(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){let a=[];for(let l=0,c=this.material.length;l<c;l++)a.push(o(t.materials,this.material[l]));r.material=a}else r.material=o(t.materials,this.material);if(this.children.length>0){r.children=[];for(let a=0;a<this.children.length;a++)r.children.push(this.children[a].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let a=0;a<this.animations.length;a++)r.animations.push(o(t.animations,this.animations[a]))}if(e){let a=s(t.geometries),l=s(t.materials),c=s(t.textures),d=s(t.images),u=s(t.shapes),p=s(t.skeletons),f=s(t.animations);a.length>0&&(i.geometries=a),l.length>0&&(i.materials=l),c.length>0&&(i.textures=c),d.length>0&&(i.images=d),u.length>0&&(i.shapes=u),p.length>0&&(i.skeletons=p),f.length>0&&(i.animations=f)}return i.object=r,i;function s(a){let l=[];for(let c in a){let d=a[c];delete d.metadata,l.push(d)}return l}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,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(let i=0;i<t.children.length;i++)this.add(t.children[i].clone());return this}};Bi.DefaultUp=new $(0,1,0),Bi.DefaultMatrixAutoUpdate=!0,Bi.prototype.isObject3D=!0;var Zl=new $,Vd=new $,I3=new $,Hd=new $,S0=new $,E0=new $,X$=new $,A3=new $,R3=new $,P3=new $,Vr=class{constructor(t=new $,e=new $,i=new $){this.a=t,this.b=e,this.c=i}static getNormal(t,e,i,r){r.subVectors(i,e),Zl.subVectors(t,e),r.cross(Zl);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,e,i,r,o){Zl.subVectors(r,e),Vd.subVectors(i,e),I3.subVectors(t,e);let s=Zl.dot(Zl),a=Zl.dot(Vd),l=Zl.dot(I3),c=Vd.dot(Vd),d=Vd.dot(I3),u=s*c-a*a;if(0===u)return o.set(-2,-1,-1);let p=1/u,f=(c*l-a*d)*p,m=(s*d-a*l)*p;return o.set(1-f-m,m,f)}static containsPoint(t,e,i,r){return this.getBarycoord(t,e,i,r,Hd),Hd.x>=0&&Hd.y>=0&&Hd.x+Hd.y<=1}static getUV(t,e,i,r,o,s,a,l){return this.getBarycoord(t,e,i,r,Hd),l.set(0,0),l.addScaledVector(o,Hd.x),l.addScaledVector(s,Hd.y),l.addScaledVector(a,Hd.z),l}static isFrontFacing(t,e,i,r){return Zl.subVectors(i,e),Vd.subVectors(t,e),Zl.cross(Vd).dot(r)<0}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,r){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,i,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,r),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return Zl.subVectors(this.c,this.b),Vd.subVectors(this.a,this.b),.5*Zl.cross(Vd).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Vr.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Vr.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,i,r,o){return Vr.getUV(t,this.a,this.b,this.c,e,i,r,o)}containsPoint(t){return Vr.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Vr.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let s,a,i=this.a,r=this.b,o=this.c;S0.subVectors(r,i),E0.subVectors(o,i),A3.subVectors(t,i);let l=S0.dot(A3),c=E0.dot(A3);if(l<=0&&c<=0)return e.copy(i);R3.subVectors(t,r);let d=S0.dot(R3),u=E0.dot(R3);if(d>=0&&u<=d)return e.copy(r);let p=l*u-d*c;if(p<=0&&l>=0&&d<=0)return s=l/(l-d),e.copy(i).addScaledVector(S0,s);P3.subVectors(t,o);let f=S0.dot(P3),m=E0.dot(P3);if(m>=0&&f<=m)return e.copy(o);let b=f*c-l*m;if(b<=0&&c>=0&&m<=0)return a=c/(c-m),e.copy(i).addScaledVector(E0,a);let M=d*m-f*u;if(M<=0&&u-d>=0&&f-m>=0)return X$.subVectors(o,r),a=(u-d)/(u-d+(f-m)),e.copy(r).addScaledVector(X$,a);let y=1/(M+b+p);return s=b*y,a=p*y,e.copy(i).addScaledVector(S0,s).addScaledVector(E0,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},RRe=0,Ao=class extends Ud{constructor(){super(),Object.defineProperty(this,"id",{value:RRe++}),this.uuid=Jl(),this.name="",this.type="Material",this.fog=!0,this.blending=gx,this.side=yx,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=Wee,this.blendDst=qee,this.blendEquation=B0,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=Z3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.alphaWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(let e in t){let i=t[e];if(void 0===i){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if("shading"===e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===i;continue}let r=this[e];void 0!==r?r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[e]=i:console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.")}}toJSON(t){let e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});let i={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(o){let s=[];for(let a in o){let l=o[a];delete l.metadata,s.push(l)}return s}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==gx&&(i.blending=this.blending),this.side!==yx&&(i.side=this.side),this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=this.transparent),i.depthFunc=this.depthFunc,i.depthTest=this.depthTest,i.depthWrite=this.depthWrite,i.colorWrite=this.colorWrite,i.alphaWrite=this.alphaWrite,i.stencilWrite=this.stencilWrite,i.stencilWriteMask=this.stencilWriteMask,i.stencilFunc=this.stencilFunc,i.stencilRef=this.stencilRef,i.stencilFuncMask=this.stencilFuncMask,i.stencilFail=this.stencilFail,i.stencilZFail=this.stencilZFail,i.stencilZPass=this.stencilZPass,this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(i.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(i.wireframe=this.wireframe),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=this.flatShading),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),"{}"!==JSON.stringify(this.userData)&&(i.userData=this.userData),e){let o=r(t.textures),s=r(t.images);o.length>0&&(i.textures=o),s.length>0&&(i.images=s)}return i}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,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;let e=t.clippingPlanes,i=null;if(null!==e){let r=e.length;i=new Array(r);for(let o=0;o!==r;++o)i[o]=e[o].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.alphaWrite=t.alphaWrite,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.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}};Ao.prototype.isMaterial=!0;var pm=class extends Ao{constructor(t){super(),this.type="MeshBasicMaterial",this.color=new an(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=YI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(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}};pm.prototype.isMeshBasicMaterial=!0;var dr=new $,qD=new $e,Pr=class{constructor(t,e,i){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===i,this.usage=Cx,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(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(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[t+r]=e.array[i+r];return this}copyArray(t){return this.array.set(t),this}copyColorsArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyColorsArray(): color is undefined",r),s=new an),e[i++]=s.r,e[i++]=s.g,e[i++]=s.b}return this}copyVector2sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector2sArray(): vector is undefined",r),s=new $e),e[i++]=s.x,e[i++]=s.y}return this}copyVector3sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector3sArray(): vector is undefined",r),s=new $),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z}return this}copyVector4sArray(t){let e=this.array,i=0;for(let r=0,o=t.length;r<o;r++){let s=t[r];void 0===s&&(console.warn("THREE.BufferAttribute.copyVector4sArray(): vector is undefined",r),s=new Zi),e[i++]=s.x,e[i++]=s.y,e[i++]=s.z,e[i++]=s.w}return this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,i=this.count;e<i;e++)qD.fromBufferAttribute(this,e),qD.applyMatrix3(t),this.setXY(e,qD.x,qD.y);else if(3===this.itemSize)for(let e=0,i=this.count;e<i;e++)dr.fromBufferAttribute(this,e),dr.applyMatrix3(t),this.setXYZ(e,dr.x,dr.y,dr.z);return this}applyMatrix4(t){for(let e=0,i=this.count;e<i;e++)dr.x=this.getX(e),dr.y=this.getY(e),dr.z=this.getZ(e),dr.applyMatrix4(t),this.setXYZ(e,dr.x,dr.y,dr.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)dr.x=this.getX(e),dr.y=this.getY(e),dr.z=this.getZ(e),dr.applyNormalMatrix(t),this.setXYZ(e,dr.x,dr.y,dr.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)dr.x=this.getX(e),dr.y=this.getY(e),dr.z=this.getZ(e),dr.transformDirection(t),this.setXYZ(e,dr.x,dr.y,dr.z);return this}set(t,e=0){return this.array.set(t,e),this}getX(t){return this.array[t*this.itemSize]}setX(t,e){return this.array[t*this.itemSize]=e,this}getY(t){return this.array[t*this.itemSize+1]}setY(t,e){return this.array[t*this.itemSize+1]=e,this}getZ(t){return this.array[t*this.itemSize+2]}setZ(t,e){return this.array[t*this.itemSize+2]=e,this}getW(t){return this.array[t*this.itemSize+3]}setW(t,e){return this.array[t*this.itemSize+3]=e,this}setXY(t,e,i){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this}setXYZ(t,e,i,r){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this.array[t+2]=r,this}setXYZW(t,e,i,r,o){return this.array[0+(t*=this.itemSize)]=e,this.array[t+1]=i,this.array[t+2]=r,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.prototype.slice.call(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),this.usage!==Cx&&(t.usage=this.usage),(0!==this.updateRange.offset||-1!==this.updateRange.count)&&(t.updateRange=this.updateRange),t}};Pr.prototype.isBufferAttribute=!0;var MI=class extends Pr{constructor(t,e,i){super(new Uint16Array(t),e,i)}},wI=class extends Pr{constructor(t,e,i){super(new Uint32Array(t),e,i)}};(class extends Pr{constructor(t,e,i){super(new Uint16Array(t),e,i)}}).prototype.isFloat16BufferAttribute=!0;var Nr=class extends Pr{constructor(t,e,i){super(new Float32Array(t),e,i)}},PRe=0,ol=new xn,O3=new Bi,T0=new $,va=new xa,ax=new xa,Io=new $,Ui=class extends Ud{constructor(){super(),Object.defineProperty(this,"id",{value:PRe++}),this.uuid=Jl(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return this.index=Array.isArray(t)?new(Qee(t)?wI:MI)(t,1):t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,i=0){this.groups.push({start:t,count:e,materialIndex:i})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);let i=this.attributes.normal;if(void 0!==i){let o=(new bo).getNormalMatrix(t);i.applyNormalMatrix(o),i.needsUpdate=!0}let 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}applyQuaternion(t){return ol.makeRotationFromQuaternion(t),this.applyMatrix4(ol),this}rotateX(t){return ol.makeRotationX(t),this.applyMatrix4(ol),this}rotateY(t){return ol.makeRotationY(t),this.applyMatrix4(ol),this}rotateZ(t){return ol.makeRotationZ(t),this.applyMatrix4(ol),this}translate(t,e,i){return ol.makeTranslation(t,e,i),this.applyMatrix4(ol),this}scale(t,e,i){return ol.makeScale(t,e,i),this.applyMatrix4(ol),this}lookAt(t){return O3.lookAt(t),O3.updateMatrix(),this.applyMatrix4(O3.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(T0).negate(),this.translate(T0.x,T0.y,T0.z),this}setFromPoints(t){let e=[];for(let i=0,r=t.length;i<r;i++){let o=t[i];e.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new Nr(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new xa);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new $(-1/0,-1/0,-1/0),new $(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let i=0,r=e.length;i<r;i++)va.setFromBufferAttribute(e[i]),this.morphTargetsRelative?(Io.addVectors(this.boundingBox.min,va.min),this.boundingBox.expandByPoint(Io),Io.addVectors(this.boundingBox.max,va.max),this.boundingBox.expandByPoint(Io)):(this.boundingBox.expandByPoint(va.min),this.boundingBox.expandByPoint(va.max))}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new bp);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new $,1/0);if(t){let i=this.boundingSphere.center;if(va.setFromBufferAttribute(t),e)for(let o=0,s=e.length;o<s;o++)ax.setFromBufferAttribute(e[o]),this.morphTargetsRelative?(Io.addVectors(va.min,ax.min),va.expandByPoint(Io),Io.addVectors(va.max,ax.max),va.expandByPoint(Io)):(va.expandByPoint(ax.min),va.expandByPoint(ax.max));va.getCenter(i);let r=0;for(let o=0,s=t.count;o<s;o++)Io.fromBufferAttribute(t,o),r=Math.max(r,i.distanceToSquared(Io));if(e)for(let o=0,s=e.length;o<s;o++){let a=e[o],l=this.morphTargetsRelative;for(let c=0,d=a.count;c<d;c++)Io.fromBufferAttribute(a,c),l&&(T0.fromBufferAttribute(t,c),Io.add(T0)),r=Math.max(r,i.distanceToSquared(Io))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");let i=t.array,r=e.position.array,o=e.normal.array,s=e.uv.array,a=r.length/3;void 0===e.tangent&&this.setAttribute("tangent",new Pr(new Float32Array(4*a),4));let l=e.tangent.array,c=[],d=[];for(let De=0;De<a;De++)c[De]=new $,d[De]=new $;let u=new $,p=new $,f=new $,m=new $e,b=new $e,M=new $e,y=new $,x=new $;function R(De,D,re){u.fromArray(r,3*De),p.fromArray(r,3*D),f.fromArray(r,3*re),m.fromArray(s,2*De),b.fromArray(s,2*D),M.fromArray(s,2*re),p.sub(u),f.sub(u),b.sub(m),M.sub(m);let ce=1/(b.x*M.y-M.x*b.y);!isFinite(ce)||(y.copy(p).multiplyScalar(M.y).addScaledVector(f,-b.y).multiplyScalar(ce),x.copy(f).multiplyScalar(b.x).addScaledVector(p,-M.x).multiplyScalar(ce),c[De].add(y),c[D].add(y),c[re].add(y),d[De].add(x),d[D].add(x),d[re].add(x))}let A=this.groups;0===A.length&&(A=[{start:0,count:i.length}]);for(let De=0,D=A.length;De<D;++De){let re=A[De],ce=re.start;for(let be=ce,ne=ce+re.count;be<ne;be+=3)R(i[be+0],i[be+1],i[be+2])}let V=new $,te=new $,K=new $,xe=new $;function Xe(De){K.fromArray(o,3*De),xe.copy(K);let D=c[De];V.copy(D),V.sub(K.multiplyScalar(K.dot(D))).normalize(),te.crossVectors(xe,D);let ce=te.dot(d[De])<0?-1:1;l[4*De]=V.x,l[4*De+1]=V.y,l[4*De+2]=V.z,l[4*De+3]=ce}for(let De=0,D=A.length;De<D;++De){let re=A[De],ce=re.start;for(let be=ce,ne=ce+re.count;be<ne;be+=3)Xe(i[be+0]),Xe(i[be+1]),Xe(i[be+2])}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(void 0!==e){let i=this.getAttribute("normal");if(void 0===i)i=new Pr(new Float32Array(3*e.count),3),this.setAttribute("normal",i);else for(let p=0,f=i.count;p<f;p++)i.setXYZ(p,0,0,0);let r=new $,o=new $,s=new $,a=new $,l=new $,c=new $,d=new $,u=new $;if(t)for(let p=0,f=t.count;p<f;p+=3){let m=t.getX(p+0),b=t.getX(p+1),M=t.getX(p+2);r.fromBufferAttribute(e,m),o.fromBufferAttribute(e,b),s.fromBufferAttribute(e,M),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),a.fromBufferAttribute(i,m),l.fromBufferAttribute(i,b),c.fromBufferAttribute(i,M),a.add(d),l.add(d),c.add(d),i.setXYZ(m,a.x,a.y,a.z),i.setXYZ(b,l.x,l.y,l.z),i.setXYZ(M,c.x,c.y,c.z)}else for(let p=0,f=e.count;p<f;p+=3)r.fromBufferAttribute(e,p+0),o.fromBufferAttribute(e,p+1),s.fromBufferAttribute(e,p+2),d.subVectors(s,o),u.subVectors(r,o),d.cross(u),i.setXYZ(p+0,d.x,d.y,d.z),i.setXYZ(p+1,d.x,d.y,d.z),i.setXYZ(p+2,d.x,d.y,d.z);this.normalizeNormals(),i.needsUpdate=!0}}merge(t,e){if(!t||!t.isBufferGeometry)return void console.error("THREE.BufferGeometry.merge(): geometry not an instance of THREE.BufferGeometry.",t);void 0===e&&(e=0,console.warn("THREE.BufferGeometry.merge(): Overwriting original geometry, starting at offset=0. Use BufferGeometryUtils.mergeBufferGeometries() for lossless merge."));let i=this.attributes;for(let r in i){if(void 0===t.attributes[r])continue;let s=i[r].array,a=t.attributes[r],l=a.array,c=a.itemSize*e,d=Math.min(l.length,s.length-c);for(let u=0,p=c;u<d;u++,p++)s[p]=l[u]}return this}normalizeNormals(){let t=this.attributes.normal;for(let e=0,i=t.count;e<i;e++)Io.fromBufferAttribute(t,e),Io.normalize(),t.setXYZ(e,Io.x,Io.y,Io.z)}toNonIndexed(){function t(a,l){let c=a.array,d=a.itemSize,u=a.normalized,p=new c.constructor(l.length*d),f=0,m=0;for(let b=0,M=l.length;b<M;b++){f=a.isInterleavedBufferAttribute?l[b]*a.data.stride+a.offset:l[b]*d;for(let y=0;y<d;y++)p[m++]=c[f++]}return new Pr(p,d,u)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new Ui,i=this.index.array,r=this.attributes;for(let a in r){let c=t(r[a],i);e.setAttribute(a,c)}let o=this.morphAttributes;for(let a in o){let l=[],c=o[a];for(let d=0,u=c.length;d<u;d++){let f=t(c[d],i);l.push(f)}e.morphAttributes[a]=l}e.morphTargetsRelative=this.morphTargetsRelative;let s=this.groups;for(let a=0,l=s.length;a<l;a++){let c=s[a];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){let l=this.parameters;for(let c in l)void 0!==l[c]&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let i=this.attributes;for(let l in i)t.data.attributes[l]=i[l].toJSON(t.data);let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,p=c.length;u<p;u++)d.push(c[u].toJSON(t.data));d.length>0&&(r[l]=d,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let i=t.index;null!==i&&this.setIndex(i.clone(e));let r=t.attributes;for(let c in r)this.setAttribute(c,r[c].clone(e));let o=t.morphAttributes;for(let c in o){let d=[],u=o[c];for(let p=0,f=u.length;p<f;p++)d.push(u[p].clone(e));this.morphAttributes[c]=d}this.morphTargetsRelative=t.morphTargetsRelative;let s=t.groups;for(let c=0,d=s.length;c<d;c++){let u=s[c];this.addGroup(u.start,u.count,u.materialIndex)}let a=t.boundingBox;null!==a&&(this.boundingBox=a.clone());let l=t.boundingSphere;return null!==l&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,void 0!==t.parameters&&(this.parameters=Object.assign({},t.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}};Ui.prototype.isBufferGeometry=!0;var Q$=new xn,D0=new vp,k3=new bp,lp=new $,cp=new $,dp=new $,F3=new $,N3=new $,L3=new $,YD=new $,XD=new $,QD=new $,ZD=new $e,KD=new $e,JD=new $e,B3=new $,$D=new $,ao=class extends Bi{constructor(t=new Ui,e=new pm){super(),this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=t.material,this.geometry=t.geometry,this}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){let s,i=this.geometry,r=this.material,o=this.matrixWorld;if(void 0!==r&&(null===i.boundingSphere&&i.computeBoundingSphere(),k3.copy(i.boundingSphere),k3.applyMatrix4(o),!1!==t.ray.intersectsSphere(k3))&&(Q$.copy(o).invert(),D0.copy(t.ray).applyMatrix4(Q$),null===i.boundingBox||!1!==D0.intersectsBox(i.boundingBox)))if(i.isBufferGeometry){let a=i.index,l=i.attributes.position,c=i.morphAttributes.position,d=i.morphTargetsRelative,u=i.attributes.uv,p=i.attributes.uv2,f=i.groups,m=i.drawRange;if(null!==a)if(Array.isArray(r))for(let b=0,M=f.length;b<M;b++){let y=f[b],x=r[y.materialIndex];for(let V=Math.max(y.start,m.start),te=Math.min(a.count,Math.min(y.start+y.count,m.start+m.count));V<te;V+=3){let K=a.getX(V),xe=a.getX(V+1),Xe=a.getX(V+2);s=eI(this,x,t,D0,l,c,d,u,p,K,xe,Xe),s&&(s.faceIndex=Math.floor(V/3),s.face.materialIndex=y.materialIndex,e.push(s))}}else for(let y=Math.max(0,m.start),x=Math.min(a.count,m.start+m.count);y<x;y+=3){let R=a.getX(y),A=a.getX(y+1),V=a.getX(y+2);s=eI(this,r,t,D0,l,c,d,u,p,R,A,V),s&&(s.faceIndex=Math.floor(y/3),e.push(s))}else if(void 0!==l)if(Array.isArray(r))for(let b=0,M=f.length;b<M;b++){let y=f[b],x=r[y.materialIndex];for(let V=Math.max(y.start,m.start),te=Math.min(l.count,Math.min(y.start+y.count,m.start+m.count));V<te;V+=3)s=eI(this,x,t,D0,l,c,d,u,p,V,V+1,V+2),s&&(s.faceIndex=Math.floor(V/3),s.face.materialIndex=y.materialIndex,e.push(s))}else for(let y=Math.max(0,m.start),x=Math.min(l.count,m.start+m.count);y<x;y+=3)s=eI(this,r,t,D0,l,c,d,u,p,y,y+1,y+2),s&&(s.faceIndex=Math.floor(y/3),e.push(s))}else i.isGeometry&&console.error("THREE.Mesh.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}};function eI(n,t,e,i,r,o,s,a,l,c,d,u){lp.fromBufferAttribute(r,c),cp.fromBufferAttribute(r,d),dp.fromBufferAttribute(r,u);let p=n.morphTargetInfluences;if(o&&p){YD.set(0,0,0),XD.set(0,0,0),QD.set(0,0,0);for(let m=0,b=o.length;m<b;m++){let M=p[m],y=o[m];0!==M&&(F3.fromBufferAttribute(y,c),N3.fromBufferAttribute(y,d),L3.fromBufferAttribute(y,u),s?(YD.addScaledVector(F3,M),XD.addScaledVector(N3,M),QD.addScaledVector(L3,M)):(YD.addScaledVector(F3.sub(lp),M),XD.addScaledVector(N3.sub(cp),M),QD.addScaledVector(L3.sub(dp),M)))}lp.add(YD),cp.add(XD),dp.add(QD)}n.isSkinnedMesh&&(n.boneTransform(c,lp),n.boneTransform(d,cp),n.boneTransform(u,dp));let f=function(n,t,e,i,r,o,s,a){let l;if(l=t.side===go?i.intersectTriangle(s,o,r,!0,a):i.intersectTriangle(r,o,s,t.side!==q0,a),null===l)return null;$D.copy(a),$D.applyMatrix4(n.matrixWorld);let c=e.ray.origin.distanceTo($D);return c<e.near||c>e.far?null:{distance:c,point:$D.clone(),object:n}}(n,t,e,i,lp,cp,dp,B3);if(f){a&&(ZD.fromBufferAttribute(a,c),KD.fromBufferAttribute(a,d),JD.fromBufferAttribute(a,u),f.uv=Vr.getUV(B3,lp,cp,dp,ZD,KD,JD,new $e)),l&&(ZD.fromBufferAttribute(l,c),KD.fromBufferAttribute(l,d),JD.fromBufferAttribute(l,u),f.uv2=Vr.getUV(B3,lp,cp,dp,ZD,KD,JD,new $e));let m={a:c,b:d,c:u,normal:new $,materialIndex:0};Vr.getNormal(lp,cp,dp,m.normal),f.face=m}return f}ao.prototype.isMesh=!0;var fm=class extends Ui{constructor(t=1,e=1,i=1,r=1,o=1,s=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:r,heightSegments:o,depthSegments:s};let a=this;r=Math.floor(r),o=Math.floor(o),s=Math.floor(s);let l=[],c=[],d=[],u=[],p=0,f=0;function m(b,M,y,x,R,A,V,te,K,xe,Xe){let De=A/K,D=V/xe,re=A/2,ce=V/2,fe=te/2,be=K+1,ne=xe+1,de=0,pe=0,je=new $;for(let Ce=0;Ce<ne;Ce++){let Ne=Ce*D-ce;for(let lt=0;lt<be;lt++)je[b]=(lt*De-re)*x,je[M]=Ne*R,je[y]=fe,c.push(je.x,je.y,je.z),je[b]=0,je[M]=0,je[y]=te>0?1:-1,d.push(je.x,je.y,je.z),u.push(lt/K),u.push(1-Ce/xe),de+=1}for(let Ce=0;Ce<xe;Ce++)for(let Ne=0;Ne<K;Ne++){let Mt=p+Ne+be*(Ce+1),pt=p+(Ne+1)+be*(Ce+1),Oe=p+(Ne+1)+be*Ce;l.push(p+Ne+be*Ce,Mt,Oe),l.push(Mt,pt,Oe),pe+=6}a.addGroup(f,pe,Xe),f+=pe,p+=de}m("z","y","x",-1,-1,i,e,t,s,o,0),m("z","y","x",1,-1,i,e,-t,s,o,1),m("x","z","y",1,1,t,i,e,r,s,2),m("x","z","y",1,-1,t,i,-e,r,s,3),m("x","y","z",1,-1,t,e,i,r,o,4),m("x","y","z",-1,-1,t,e,-i,r,o,5),this.setIndex(l),this.setAttribute("position",new Nr(c,3)),this.setAttribute("normal",new Nr(d,3)),this.setAttribute("uv",new Nr(u,2))}static fromJSON(t){return new fm(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function X0(n){let t={};for(let e in n){t[e]={};for(let i in n[e]){let r=n[e][i];t[e][i]=r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.clone():Array.isArray(r)?r.slice():r}}return t}function Jo(n){let t={};for(let e=0;e<n.length;e++){let i=X0(n[e]);for(let r in i)t[r]=i[r]}return t}var kRe={clone:X0,merge:Jo},Gd=class extends Ao{constructor(t){super(),this.type="ShaderMaterial",this.defines={},this.uniforms={},this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&(void 0!==t.attributes&&console.error("THREE.ShaderMaterial: attributes should now be defined in THREE.BufferGeometry instead."),this.setValues(t))}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=X0(t.uniforms),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){let e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(let r in this.uniforms){let s=this.uniforms[r].value;e.uniforms[r]=s&&s.isTexture?{type:"t",value:s.toJSON(t).uuid}:s&&s.isColor?{type:"c",value:s.getHex()}:s&&s.isVector2?{type:"v2",value:s.toArray()}:s&&s.isVector3?{type:"v3",value:s.toArray()}:s&&s.isVector4?{type:"v4",value:s.toArray()}:s&&s.isMatrix3?{type:"m3",value:s.toArray()}:s&&s.isMatrix4?{type:"m4",value:s.toArray()}:{value:s}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let i={};for(let r in this.extensions)!0===this.extensions[r]&&(i[r]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}};Gd.prototype.isShaderMaterial=!0;var Sx=class extends Bi{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new xn,this.projectionMatrix=new xn,this.projectionMatrixInverse=new xn}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}};Sx.prototype.isCamera=!0;var es=class extends Sx{constructor(t=50,e=1,i=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(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(t){let e=.5*this.getFilmHeight()/t;this.fov=2*nB*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(.5*_3*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*nB*Math.atan(Math.tan(.5*_3*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,i,r,o,s){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=i,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(.5*_3*this.fov)/this.zoom,i=2*e,r=this.aspect*i,o=-.5*r,s=this.view;if(null!==this.view&&this.view.enabled){let l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*r/l,e-=s.offsetY*i/c,r*=s.width/l,i*=s.height/c}let a=this.filmOffset;0!==a&&(o+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,e,e-i,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(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}};es.prototype.isPerspectiveCamera=!0;var Ex=class extends Bi{constructor(t,e,i){if(super(),this.type="CubeCamera",!0!==i.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=i;let r=new es(90,1,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new $(1,0,0)),this.add(r);let o=new es(90,1,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new $(-1,0,0)),this.add(o);let s=new es(90,1,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new $(0,1,0)),this.add(s);let a=new es(90,1,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new $(0,-1,0)),this.add(a);let l=new es(90,1,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new $(0,0,1)),this.add(l);let c=new es(90,1,t,e);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new $(0,0,-1)),this.add(c)}update(t,e){null===this.parent&&this.updateMatrixWorld();let i=this.renderTarget,[r,o,s,a,l,c]=this.children,d=t.xr.enabled,u=t.getRenderTarget();t.xr.enabled=!1;let p=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0),t.render(e,r),t.setRenderTarget(i,1),t.render(e,o),t.setRenderTarget(i,2),t.render(e,s),t.setRenderTarget(i,3),t.render(e,a),t.setRenderTarget(i,4),t.render(e,l),i.texture.generateMipmaps=p,t.setRenderTarget(i,5),t.render(e,c),t.setRenderTarget(u),t.xr.enabled=d,i.texture.needsPMREMUpdate=!0}},Q0=class extends lo{constructor(t,e,i,r,o,s,a,l,c,d){super(t=void 0!==t?t:[],e=void 0!==e?e:Wx,i,r,o,s,a,l,c,d),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};Q0.prototype.isCubeTexture=!0;var SI=class extends Js{constructor(t,e,i){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=i),super(t,t,e),this.texture=new Q0(void 0,(e=e||{}).mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:$o}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=gs,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let i_uniforms={tEquirect:{value:null}},i_vertexShader="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i_fragmentShader="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",r=new fm(5,5,5),o=new Gd({name:"CubemapFromEquirect",uniforms:X0(i_uniforms),vertexShader:i_vertexShader,fragmentShader:i_fragmentShader,side:go,blending:pp});o.uniforms.tEquirect.value=e;let s=new ao(r,o),a=e.minFilter;return e.minFilter===QI&&(e.minFilter=$o),new Ex(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,i,r){let o=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(e,i,r);t.setRenderTarget(o)}};SI.prototype.isWebGLCubeRenderTarget=!0;var V3=new $,LRe=new $,BRe=new bo,Kl=class{constructor(t=new $(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,i,r){return this.normal.set(t,e,i),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,i){let r=V3.subVectors(i,e).cross(LRe.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let i=t.delta(V3),r=this.normal.dot(i);if(0===r)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;let o=-(t.start.dot(this.normal)+this.constant)/r;return o<0||o>1?null:e.copy(i).multiplyScalar(o).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let i=e||BRe.getNormalMatrix(t),r=this.coplanarPoint(V3).applyMatrix4(t),o=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}};Kl.prototype.isPlane=!0;var R0=new bp,tI=new $,Z0=class{constructor(t=new Kl,e=new Kl,i=new Kl,r=new Kl,o=new Kl,s=new Kl){this.planes=[t,e,i,r,o,s]}set(t,e,i,r,o,s){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(r),a[4].copy(o),a[5].copy(s),this}copy(t){let e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t){let e=this.planes,i=t.elements,r=i[0],o=i[1],s=i[2],a=i[3],l=i[4],c=i[5],d=i[6],u=i[7],p=i[8],f=i[9],m=i[10],b=i[11],M=i[12],y=i[13],x=i[14],R=i[15];return e[0].setComponents(a-r,u-l,b-p,R-M).normalize(),e[1].setComponents(a+r,u+l,b+p,R+M).normalize(),e[2].setComponents(a+o,u+c,b+f,R+y).normalize(),e[3].setComponents(a-o,u-c,b-f,R-y).normalize(),e[4].setComponents(a-s,u-d,b-m,R-x).normalize(),e[5].setComponents(a+s,u+d,b+m,R+x).normalize(),this}intersectsObject(t){let e=t.geometry;return null===e.boundingSphere&&e.computeBoundingSphere(),R0.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(R0)}intersectsSprite(t){return R0.center.set(0,0,0),R0.radius=.7071067811865476,R0.applyMatrix4(t.matrixWorld),this.intersectsSphere(R0)}intersectsSphere(t){let e=this.planes,i=t.center,r=-t.radius;for(let o=0;o<6;o++)if(e[o].distanceToPoint(i)<r)return!1;return!0}intersectsBox(t){let e=this.planes;for(let i=0;i<6;i++){let r=e[i];if(tI.x=r.normal.x>0?t.max.x:t.min.x,tI.y=r.normal.y>0?t.max.y:t.min.y,tI.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(tI)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let i=0;i<6;i++)if(e[i].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}};function Zee(){let n=null,t=!1,e=null,i=null;function r(o,s){e(o,s),i=n.requestAnimationFrame(r)}return{start:function(){!0!==t&&null!==e&&(i=n.requestAnimationFrame(r),t=!0)},stop:function(){n.cancelAnimationFrame(i),t=!1},setAnimationLoop:function(o){e=o},setContext:function(o){n=o}}}function VRe(n,t){let e=t.isWebGL2,i=new WeakMap;return{get:function(c){return c.isInterleavedBufferAttribute&&(c=c.data),i.get(c)},remove:function(c){c.isInterleavedBufferAttribute&&(c=c.data);let d=i.get(c);d&&(n.deleteBuffer(d.buffer),i.delete(c))},update:function(c,d){if(c.isGLBufferAttribute){let p=i.get(c);return void((!p||p.version<c.version)&&i.set(c,{buffer:c.buffer,type:c.type,bytesPerElement:c.elementSize,version:c.version}))}c.isInterleavedBufferAttribute&&(c=c.data);let u=i.get(c);void 0===u?i.set(c,function(c,d){let u=c.array,p=c.usage,f=n.createBuffer();n.bindBuffer(d,f),n.bufferData(d,u,p),c.onUploadCallback();let m=5126;return u instanceof Float32Array?m=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?c.isFloat16BufferAttribute?e?m=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):m=5123:u instanceof Int16Array?m=5122:u instanceof Uint32Array?m=5125:u instanceof Int32Array?m=5124:u instanceof Int8Array?m=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(m=5121),{buffer:f,type:m,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}(c,d)):u.version<c.version&&(function(c,d,u){let p=d.array,f=d.updateRange;n.bindBuffer(u,c),-1===f.count?n.bufferSubData(u,0,p):(e?n.bufferSubData(u,f.offset*p.BYTES_PER_ELEMENT,p,f.offset,f.count):n.bufferSubData(u,f.offset*p.BYTES_PER_ELEMENT,p.subarray(f.offset,f.offset+f.count)),f.count=-1)}(u.buffer,c,d),u.version=c.version)}}}var Tx=class extends Ui{constructor(t=1,e=1,i=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:i,heightSegments:r};let o=t/2,s=e/2,a=Math.floor(i),l=Math.floor(r),c=a+1,d=l+1,u=t/a,p=e/l,f=[],m=[],b=[],M=[];for(let y=0;y<d;y++){let x=y*p-s;for(let R=0;R<c;R++)m.push(R*u-o,-x,0),b.push(0,0,1),M.push(R/a),M.push(1-y/l)}for(let y=0;y<l;y++)for(let x=0;x<a;x++){let A=x+c*(y+1),V=x+1+c*(y+1),te=x+1+c*y;f.push(x+c*y,A,te),f.push(A,V,te)}this.setIndex(f),this.setAttribute("position",new Nr(m,3)),this.setAttribute("normal",new Nr(b,3)),this.setAttribute("uv",new Nr(M,2))}static fromJSON(t){return new Tx(t.width,t.height,t.widthSegments,t.heightSegments)}},bi={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_maxMipLevel 8.0\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_maxTileSize 256.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tfloat texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ) + 0.5;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tif ( mipInt < cubeUV_maxMipLevel ) {\n\t\t\tuv.y += 2.0 * cubeUV_maxTileSize;\n\t\t}\n\t\tuv.y += filterInt * 2.0 * cubeUV_minTileSize;\n\t\tuv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize );\n\t\tuv *= texelSize;\n\t\treturn texture2D( envMap, uv ).rgb;\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\t#ifdef ENVMAP_MODE_REFRACTION\n\t\tuniform float refractionRatio;\n\t#endif\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec;\n\t\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\t\treflectVec = reflect( - viewDir, normal );\n\t\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\t#else\n\t\t\t\treflectVec = refract( - viewDir, normal, refractionRatio );\n\t\t\t#endif\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\tlightMapIrradiance *= PI;\n\t#endif\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    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#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\t#ifndef PHYSICALLY_CORRECT_LIGHTS\n\t\t\tlightMapIrradiance *= PI;\n\t\t#endif\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform vec2 morphTargetsTextureSize;\n\t\tvec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) {\n\t\t\tfloat texelIndex = float( vertexIndex * stride + offset );\n\t\t\tfloat y = floor( texelIndex / morphTargetsTextureSize.x );\n\t\t\tfloat x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tvec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex );\n\t\t\treturn texture( morphTargetsTexture, morphUV ).xyz;\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\t#ifndef USE_MORPHNORMALS\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ];\n\t\t\t#else\n\t\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ];\n\t\t\t#endif\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t  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\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\t#ifdef BONE_TEXTURE\n\t\tuniform highp sampler2D boneTexture;\n\t\tuniform int boneTextureSize;\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tfloat j = i * 4.0;\n\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\ty = dy * ( y + 0.5 );\n\t\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\treturn bone;\n\t\t}\n\t#else\n\t\tuniform mat4 boneMatrices[ MAX_BONES ];\n\t\tmat4 getBoneMatrix( const in float i ) {\n\t\t\tmat4 bone = boneMatrices[ int(i) ];\n\t\t\treturn bone;\n\t\t}\n\t#endif\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef TEXTURE_LOD_EXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include <envmap_common_pars_fragment>\nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include <envmap_fragment>\n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel= texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <lights_lambert_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <fog_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <emissivemap_fragment>\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include <lightmap_fragment>\n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <cube_uv_reflection_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},It={common:{diffuse:{value:new an(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new bo},uv2Transform:{value:new bo},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new $e(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 an(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new an(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new bo}},sprite:{diffuse:{value:new an(16777215)},opacity:{value:1},center:{value:new $e(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new bo}}},qc={basic:{uniforms:Jo([It.common,It.specularmap,It.envmap,It.aomap,It.lightmap,It.fog]),vertexShader:bi.meshbasic_vert,fragmentShader:bi.meshbasic_frag},lambert:{uniforms:Jo([It.common,It.specularmap,It.envmap,It.aomap,It.lightmap,It.emissivemap,It.fog,It.lights,{emissive:{value:new an(0)}}]),vertexShader:bi.meshlambert_vert,fragmentShader:bi.meshlambert_frag},phong:{uniforms:Jo([It.common,It.specularmap,It.envmap,It.aomap,It.lightmap,It.emissivemap,It.bumpmap,It.normalmap,It.displacementmap,It.fog,It.lights,{emissive:{value:new an(0)},specular:{value:new an(1118481)},shininess:{value:30}}]),vertexShader:bi.meshphong_vert,fragmentShader:bi.meshphong_frag},standard:{uniforms:Jo([It.common,It.envmap,It.aomap,It.lightmap,It.emissivemap,It.bumpmap,It.normalmap,It.displacementmap,It.roughnessmap,It.metalnessmap,It.fog,It.lights,{emissive:{value:new an(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag},toon:{uniforms:Jo([It.common,It.aomap,It.lightmap,It.emissivemap,It.bumpmap,It.normalmap,It.displacementmap,It.gradientmap,It.fog,It.lights,{emissive:{value:new an(0)}}]),vertexShader:bi.meshtoon_vert,fragmentShader:bi.meshtoon_frag},matcap:{uniforms:Jo([It.common,It.bumpmap,It.normalmap,It.displacementmap,It.fog,{matcap:{value:null}}]),vertexShader:bi.meshmatcap_vert,fragmentShader:bi.meshmatcap_frag},points:{uniforms:Jo([It.points,It.fog]),vertexShader:bi.points_vert,fragmentShader:bi.points_frag},dashed:{uniforms:Jo([It.common,It.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:bi.linedashed_vert,fragmentShader:bi.linedashed_frag},depth:{uniforms:Jo([It.common,It.displacementmap]),vertexShader:bi.depth_vert,fragmentShader:bi.depth_frag},normal:{uniforms:Jo([It.common,It.bumpmap,It.normalmap,It.displacementmap,{opacity:{value:1}}]),vertexShader:bi.meshnormal_vert,fragmentShader:bi.meshnormal_frag},sprite:{uniforms:Jo([It.sprite,It.fog]),vertexShader:bi.sprite_vert,fragmentShader:bi.sprite_frag},background:{uniforms:{uvTransform:{value:new bo},t2D:{value:null}},vertexShader:bi.background_vert,fragmentShader:bi.background_frag},cube:{uniforms:Jo([It.envmap,{opacity:{value:1}}]),vertexShader:bi.cube_vert,fragmentShader:bi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:bi.equirect_vert,fragmentShader:bi.equirect_frag},distanceRGBA:{uniforms:Jo([It.common,It.displacementmap,{referencePosition:{value:new $},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:bi.distanceRGBA_vert,fragmentShader:bi.distanceRGBA_frag},shadow:{uniforms:Jo([It.lights,It.fog,{color:{value:new an(0)},opacity:{value:1}}]),vertexShader:bi.shadow_vert,fragmentShader:bi.shadow_frag}};function pke(n,t,e,i,r,o){let l,c,s=new an(0),a=!0===r?0:1,d=null,u=0,p=null;function m(b,M){e.buffers.color.setClear(b.r,b.g,b.b,M,o)}return{getClearColor:function(){return s},setClearColor:function(b,M=1){s.set(b),a=M,m(s,a)},getClearAlpha:function(){return a},setClearAlpha:function(b){a=b,m(s,a)},render:function(b,M){let y=!1,x=!0===M.isScene?M.background:null;x&&x.isTexture&&(x=t.get(x));let R=n.xr,A=R.getSession&&R.getSession();A&&"additive"===A.environmentBlendMode&&(x=null),null===x?m(s,a):x&&x.isColor&&(m(x,1),y=!0),(n.autoClear||y)&&n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil),x&&(x.isCubeTexture||x.mapping===XI)?(void 0===c&&(c=new ao(new fm(1,1,1),new Gd({name:"BackgroundCubeMaterial",uniforms:X0(qc.cube.uniforms),vertexShader:qc.cube.vertexShader,fragmentShader:qc.cube.fragmentShader,side:go,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(V,te,K){this.matrixWorld.copyPosition(K.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=x,c.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,(d!==x||u!==x.version||p!==n.toneMapping)&&(c.material.needsUpdate=!0,d=x,u=x.version,p=n.toneMapping),b.unshift(c,c.geometry,c.material,0,0,null)):x&&x.isTexture&&(void 0===l&&(l=new ao(new Tx(2,2),new Gd({name:"BackgroundMaterial",uniforms:X0(qc.background.uniforms),vertexShader:qc.background.vertexShader,fragmentShader:qc.background.fragmentShader,side:yx,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=x,!0===x.matrixAutoUpdate&&x.updateMatrix(),l.material.uniforms.uvTransform.value.copy(x.matrix),(d!==x||u!==x.version||p!==n.toneMapping)&&(l.material.needsUpdate=!0,d=x,u=x.version,p=n.toneMapping),b.unshift(l,l.geometry,l.material,0,0,null))}}}function fke(n,t,e,i){let r=n.getParameter(34921),o=i.isWebGL2?null:t.get("OES_vertex_array_object"),s=i.isWebGL2||null!==o,a={},l=b(null),c=l;function p(ce){return i.isWebGL2?n.bindVertexArray(ce):o.bindVertexArrayOES(ce)}function f(ce){return i.isWebGL2?n.deleteVertexArray(ce):o.deleteVertexArrayOES(ce)}function b(ce){let fe=[],be=[],ne=[];for(let de=0;de<r;de++)fe[de]=0,be[de]=0,ne[de]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:fe,enabledAttributes:be,attributeDivisors:ne,object:ce,attributes:{},index:null}}function x(){let ce=c.newAttributes;for(let fe=0,be=ce.length;fe<be;fe++)ce[fe]=0}function R(ce){A(ce,0)}function A(ce,fe){let ne=c.enabledAttributes,de=c.attributeDivisors;c.newAttributes[ce]=1,0===ne[ce]&&(n.enableVertexAttribArray(ce),ne[ce]=1),de[ce]!==fe&&((i.isWebGL2?n:t.get("ANGLE_instanced_arrays"))[i.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](ce,fe),de[ce]=fe)}function V(){let ce=c.newAttributes,fe=c.enabledAttributes;for(let be=0,ne=fe.length;be<ne;be++)fe[be]!==ce[be]&&(n.disableVertexAttribArray(be),fe[be]=0)}function te(ce,fe,be,ne,de,pe){!0!==i.isWebGL2||5124!==be&&5125!==be?n.vertexAttribPointer(ce,fe,be,ne,de,pe):n.vertexAttribIPointer(ce,fe,be,de,pe)}function D(){re(),c!==l&&(c=l,p(c.object))}function re(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(ce,fe,be,ne,de){let pe=!1;if(s){let je=function(ce,fe,be){let ne=!0===be.wireframe,de=a[ce.id];void 0===de&&(de={},a[ce.id]=de);let pe=de[fe.id];void 0===pe&&(pe={},de[fe.id]=pe);let je=pe[ne];return void 0===je&&(je=b(i.isWebGL2?n.createVertexArray():o.createVertexArrayOES()),pe[ne]=je),je}(ne,be,fe);c!==je&&(c=je,p(c.object)),pe=function(ce,fe){let be=c.attributes,ne=ce.attributes,de=0;for(let pe in ne){let je=be[pe],Ce=ne[pe];if(void 0===je||je.attribute!==Ce||je.data!==Ce.data)return!0;de++}return c.attributesNum!==de||c.index!==fe}(ne,de),pe&&function(ce,fe){let be={},ne=ce.attributes,de=0;for(let pe in ne){let je=ne[pe],Ce={};Ce.attribute=je,je.data&&(Ce.data=je.data),be[pe]=Ce,de++}c.attributes=be,c.attributesNum=de,c.index=fe}(ne,de)}else{let je=!0===fe.wireframe;(c.geometry!==ne.id||c.program!==be.id||c.wireframe!==je)&&(c.geometry=ne.id,c.program=be.id,c.wireframe=je,pe=!0)}!0===ce.isInstancedMesh&&(pe=!0),null!==de&&e.update(de,34963),pe&&(function(ce,fe,be,ne){if(!1===i.isWebGL2&&(ce.isInstancedMesh||ne.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;x();let de=ne.attributes,pe=be.getAttributes(),je=fe.defaultAttributeValues;for(let Ce in pe){let Ne=pe[Ce];if(Ne.location>=0){let lt=de[Ce];if(void 0===lt&&("instanceMatrix"===Ce&&ce.instanceMatrix&&(lt=ce.instanceMatrix),"instanceColor"===Ce&&ce.instanceColor&&(lt=ce.instanceColor)),void 0!==lt){let Mt=lt.normalized,pt=lt.itemSize,Oe=e.get(lt);if(void 0===Oe)continue;let An=Oe.buffer,wt=Oe.type,on=Oe.bytesPerElement;if(lt.isInterleavedBufferAttribute){let ve=lt.data,mt=ve.stride,ft=lt.offset;if(ve&&ve.isInstancedInterleavedBuffer){for(let oe=0;oe<Ne.locationSize;oe++)A(Ne.location+oe,ve.meshPerAttribute);!0!==ce.isInstancedMesh&&void 0===ne._maxInstanceCount&&(ne._maxInstanceCount=ve.meshPerAttribute*ve.count)}else for(let oe=0;oe<Ne.locationSize;oe++)R(Ne.location+oe);n.bindBuffer(34962,An);for(let oe=0;oe<Ne.locationSize;oe++)te(Ne.location+oe,pt/Ne.locationSize,wt,Mt,mt*on,(ft+pt/Ne.locationSize*oe)*on)}else{if(lt.isInstancedBufferAttribute){for(let ve=0;ve<Ne.locationSize;ve++)A(Ne.location+ve,lt.meshPerAttribute);!0!==ce.isInstancedMesh&&void 0===ne._maxInstanceCount&&(ne._maxInstanceCount=lt.meshPerAttribute*lt.count)}else for(let ve=0;ve<Ne.locationSize;ve++)R(Ne.location+ve);n.bindBuffer(34962,An);for(let ve=0;ve<Ne.locationSize;ve++)te(Ne.location+ve,pt/Ne.locationSize,wt,Mt,pt*on,pt/Ne.locationSize*ve*on)}}else if(void 0!==je){let Mt=je[Ce];if(void 0!==Mt)switch(Mt.length){case 2:n.vertexAttrib2fv(Ne.location,Mt);break;case 3:n.vertexAttrib3fv(Ne.location,Mt);break;case 4:n.vertexAttrib4fv(Ne.location,Mt);break;default:n.vertexAttrib1fv(Ne.location,Mt)}}}}V()}(ce,fe,be,ne),null!==de&&n.bindBuffer(34963,e.get(de).buffer))},reset:D,resetDefaultState:re,dispose:function(){D();for(let ce in a){let fe=a[ce];for(let be in fe){let ne=fe[be];for(let de in ne)f(ne[de].object),delete ne[de];delete fe[be]}delete a[ce]}},releaseStatesOfGeometry:function(ce){if(void 0===a[ce.id])return;let fe=a[ce.id];for(let be in fe){let ne=fe[be];for(let de in ne)f(ne[de].object),delete ne[de];delete fe[be]}delete a[ce.id]},releaseStatesOfProgram:function(ce){for(let fe in a){let be=a[fe];if(void 0===be[ce.id])continue;let ne=be[ce.id];for(let de in ne)f(ne[de].object),delete ne[de];delete be[ce.id]}},initAttributes:x,enableAttribute:R,disableUnusedAttributes:V}}function mke(n,t,e,i){let o,r=i.isWebGL2;this.setMode=function(c){o=c},this.render=function(c,d){n.drawArrays(o,c,d),e.update(d,o,1)},this.renderInstances=function(c,d,u){if(0===u)return;let p,f;if(r)p=n,f="drawArraysInstanced";else if(p=t.get("ANGLE_instanced_arrays"),f="drawArraysInstancedANGLE",null===p)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");p[f](o,c,d,u),e.update(d,o,u)}}function hke(n,t,e){let i;function o(K){if("highp"===K){if(n.getShaderPrecisionFormat(35633,36338).precision>0&&n.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";K="mediump"}return"mediump"===K&&n.getShaderPrecisionFormat(35633,36337).precision>0&&n.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&n instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&n instanceof WebGL2ComputeRenderingContext,a=void 0!==e.precision?e.precision:"highp",l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);let c=s||t.has("WEBGL_draw_buffers"),d=!0===e.logarithmicDepthBuffer,u=n.getParameter(34930),p=n.getParameter(35660),f=n.getParameter(3379),m=n.getParameter(34076),b=n.getParameter(34921),M=n.getParameter(36347),y=n.getParameter(36348),x=n.getParameter(36349),R=p>0,A=s||t.has("OES_texture_float");return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===t.has("EXT_texture_filter_anisotropic")){let K=t.get("EXT_texture_filter_anisotropic");i=n.getParameter(K.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:o,precision:a,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:p,maxTextureSize:f,maxCubemapSize:m,maxAttributes:b,maxVertexUniforms:M,maxVaryings:y,maxFragmentUniforms:x,vertexTextures:R,floatFragmentTextures:A,floatVertexTextures:R&&A,maxSamples:s?n.getParameter(36183):0}}function gke(n){let t=this,e=null,i=0,r=!1,o=!1,s=new Kl,a=new bo,l={value:null,needsUpdate:!1};function c(){l.value!==e&&(l.value=e,l.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function d(u,p,f,m){let b=null!==u?u.length:0,M=null;if(0!==b){if(M=l.value,!0!==m||null===M){let y=f+4*b,x=p.matrixWorldInverse;a.getNormalMatrix(x),(null===M||M.length<y)&&(M=new Float32Array(y));for(let R=0,A=f;R!==b;++R,A+=4)s.copy(u[R]).applyMatrix4(x,a),s.normal.toArray(M,A),M[A+3]=s.constant}l.value=M,l.needsUpdate=!0}return t.numPlanes=b,t.numIntersection=0,M}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,p,f){let m=0!==u.length||p||0!==i||r;return r=p,e=d(u,f,0),i=u.length,m},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,c()},this.setState=function(u,p,f){let m=u.clippingPlanes,b=u.clipIntersection,M=u.clipShadows,y=n.get(u);if(!r||null===m||0===m.length||o&&!M)o?d(null):c();else{let x=o?0:i,R=4*x,A=y.clippingState||null;l.value=A,A=d(m,p,R,f);for(let V=0;V!==R;++V)A[V]=e[V];y.clippingState=A,this.numIntersection=b?this.numPlanes:0,this.numPlanes+=x}}}function _ke(n){let t=new WeakMap;function e(s,a){return a===K3?s.mapping=Wx:a===J3&&(s.mapping=qx),s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let l=t.get(a);void 0!==l&&(t.delete(a),l.dispose())}return{get:function(s){if(s&&s.isTexture&&!1===s.isRenderTargetTexture){let a=s.mapping;if(a===K3||a===J3){if(t.has(s))return e(t.get(s).texture,s.mapping);{let l=s.image;if(l&&l.height>0){let c=new SI(l.height/2);return c.fromEquirectangularTexture(n,s),t.set(s,c),s.addEventListener("dispose",r),e(c.texture,s.mapping)}return null}}}return s},dispose:function(){t=new WeakMap}}}qc.physical={uniforms:Jo([qc.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new $e(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new an(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new $e},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new an(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new an(1,1,1)},specularColorMap:{value:null}}]),vertexShader:bi.meshphysical_vert,fragmentShader:bi.meshphysical_frag};var mm=class extends Sx{constructor(t=-1,e=1,i=1,r=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=i,this.bottom=r,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,i,r,o,s){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=i,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=i-t,s=i+t,a=r+e,l=r-e;if(null!==this.view&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}};mm.prototype.isOrthographicCamera=!0;var K0=class extends Gd{constructor(t){super(t),this.type="RawShaderMaterial"}};K0.prototype.isRawShaderMaterial=!0;var W0=4,hp=8,Wc=Math.pow(2,hp),Kee=[.125,.215,.35,.446,.526,.582],Jee=hp-W0+1+Kee.length,H3=new mm,{_lodPlanes:lx,_sizeLods:Z$,_sigmas:nI}=bke(),K$=new an,z3=null,lm=(1+Math.sqrt(5))/2,O0=1/lm,J$=[new $(1,1,1),new $(-1,1,1),new $(1,1,-1),new $(-1,1,-1),new $(0,lm,O0),new $(0,lm,-O0),new $(O0,0,lm),new $(-O0,0,lm),new $(lm,O0,0),new $(-lm,O0,0)],EI=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=function(n){let t=new Float32Array(20),e=new $(0,1,0);return new K0({name:"SphericalGaussianBlur",defines:{n:20},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:e}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:pp,depthTest:!1,depthWrite:!1})}(),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,i=.1,r=100){z3=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(t,i,r,o),e>0&&this._blur(o,0,0,e),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapShader&&(this._cubemapShader=tee(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){null===this._equirectShader&&(this._equirectShader=eee(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose(),null!==this._cubemapShader&&this._cubemapShader.dispose(),null!==this._equirectShader&&this._equirectShader.dispose();for(let t=0;t<lx.length;t++)lx[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(z3),t.scissorTest=!1,iI(t,0,0,t.width,t.height)}_fromTexture(t,e){z3=this._renderer.getRenderTarget();let i=e||this._allocateTargets(t);return this._textureToCubeUV(t,i),this._applyPMREM(i),this._cleanup(i),i}_allocateTargets(t){let e={magFilter:$o,minFilter:$o,generateMipmaps:!1,type:U0,format:gs,encoding:_p,depthBuffer:!1},i=$$(e);return i.depthBuffer=!t,null===this._pingPongRenderTarget&&(this._pingPongRenderTarget=$$(e)),i}_compileMaterial(t){let e=new ao(lx[0],t);this._renderer.compile(e,H3)}_sceneToCubeUV(t,e,i,r){let a=new es(90,1,e,i),l=[1,-1,1,1,1,1],c=[1,1,1,-1,-1,-1],d=this._renderer,u=d.autoClear,p=d.toneMapping;d.getClearColor(K$),d.toneMapping=fp,d.autoClear=!1;let f=new pm({name:"PMREM.Background",side:go,depthWrite:!1,depthTest:!1}),m=new ao(new fm,f),b=!1,M=t.background;M?M.isColor&&(f.color.copy(M),t.background=null,b=!0):(f.color.copy(K$),b=!0);for(let y=0;y<6;y++){let x=y%3;0===x?(a.up.set(0,l[y],0),a.lookAt(c[y],0,0)):1===x?(a.up.set(0,0,l[y]),a.lookAt(0,c[y],0)):(a.up.set(0,l[y],0),a.lookAt(0,0,c[y])),iI(r,x*Wc,y>2?Wc:0,Wc,Wc),d.setRenderTarget(r),b&&d.render(m,a),d.render(t,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.autoClear=u,t.background=M}_textureToCubeUV(t,e){let i=this._renderer,r=t.mapping===Wx||t.mapping===qx;r?(null===this._cubemapShader&&(this._cubemapShader=tee()),this._cubemapShader.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectShader&&(this._equirectShader=eee());let o=r?this._cubemapShader:this._equirectShader,s=new ao(lx[0],o),a=o.uniforms;a.envMap.value=t,r||a.texelSize.value.set(1/t.image.width,1/t.image.height),iI(e,0,0,3*Wc,2*Wc),i.setRenderTarget(e),i.render(s,H3)}_applyPMREM(t){let e=this._renderer,i=e.autoClear;e.autoClear=!1;for(let r=1;r<Jee;r++){let o=Math.sqrt(nI[r]*nI[r]-nI[r-1]*nI[r-1]);this._blur(t,r-1,r,o,J$[(r-1)%J$.length])}e.autoClear=i}_blur(t,e,i,r,o){let s=this._pingPongRenderTarget;this._halfBlur(t,s,e,i,r,"latitudinal",o),this._halfBlur(s,t,i,i,r,"longitudinal",o)}_halfBlur(t,e,i,r,o,s,a){let l=this._renderer,c=this._blurMaterial;"latitudinal"!==s&&"longitudinal"!==s&&console.error("blur direction must be either latitudinal or longitudinal!");let u=new ao(lx[r],c),p=c.uniforms,f=Z$[i]-1,m=isFinite(o)?Math.PI/(2*f):2*Math.PI/39,b=o/m,M=isFinite(o)?1+Math.floor(3*b):20;M>20&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${M} samples when the maximum is set to 20`);let y=[],x=0;for(let te=0;te<20;++te){let K=te/b,xe=Math.exp(-K*K/2);y.push(xe),0===te?x+=xe:te<M&&(x+=2*xe)}for(let te=0;te<y.length;te++)y[te]=y[te]/x;p.envMap.value=t.texture,p.samples.value=M,p.weights.value=y,p.latitudinal.value="latitudinal"===s,a&&(p.poleAxis.value=a),p.dTheta.value=m,p.mipInt.value=hp-i;let R=Z$[r];iI(e,3*Math.max(0,Wc-2*R),(0===r?0:2*Wc)+2*R*(r>hp-W0?r-hp+W0:0),3*R,2*R),l.setRenderTarget(e),l.render(u,H3)}};function bke(){let n=[],t=[],e=[],i=hp;for(let r=0;r<Jee;r++){let o=Math.pow(2,i);t.push(o);let s=1/o;r>hp-W0?s=Kee[r-hp+W0-1]:0===r&&(s=0),e.push(s);let a=1/(o-1),l=-a/2,c=1+a/2,d=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,p=6,f=3,m=2,b=1,M=new Float32Array(f*p*u),y=new Float32Array(m*p*u),x=new Float32Array(b*p*u);for(let A=0;A<u;A++){let V=A%3*2/3-1,te=A>2?0:-1;M.set([V,te,0,V+2/3,te,0,V+2/3,te+1,0,V,te,0,V+2/3,te+1,0,V,te+1,0],f*p*A),y.set(d,m*p*A),x.set([A,A,A,A,A,A],b*p*A)}let R=new Ui;R.setAttribute("position",new Pr(M,f)),R.setAttribute("uv",new Pr(y,m)),R.setAttribute("faceIndex",new Pr(x,b)),n.push(R),i>W0&&i--}return{_lodPlanes:n,_sizeLods:t,_sigmas:e}}function $$(n){let t=new Js(3*Wc,3*Wc,n);return t.texture.mapping=XI,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function iI(n,t,e,i,r){n.viewport.set(t,e,i,r),n.scissor.set(t,e,i,r)}function eee(){let n=new $e(1,1);return new K0({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:n}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform vec2 texelSize;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tvec2 f = fract( uv / texelSize - 0.5 );\n\t\t\t\tuv -= f * texelSize;\n\t\t\t\tvec3 tl = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x += texelSize.x;\n\t\t\t\tvec3 tr = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.y += texelSize.y;\n\t\t\t\tvec3 br = texture2D ( envMap, uv ).rgb;\n\t\t\t\tuv.x -= texelSize.x;\n\t\t\t\tvec3 bl = texture2D ( envMap, uv ).rgb;\n\n\t\t\t\tvec3 tm = mix( tl, tr, f.x );\n\t\t\t\tvec3 bm = mix( bl, br, f.x );\n\t\t\t\tgl_FragColor.rgb = mix( tm, bm, f.y );\n\n\t\t\t}\n\t\t",blending:pp,depthTest:!1,depthWrite:!1})}function tee(){return new K0({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute vec3 position;\n\t\tattribute vec2 uv;\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:pp,depthTest:!1,depthWrite:!1})}function yke(n){let t=new WeakMap,e=null;function o(a){let l=a.target;l.removeEventListener("dispose",o);let c=t.get(l);void 0!==c&&(t.delete(l),c.dispose())}return{get:function(a){if(a&&a.isTexture){let l=a.mapping,c=l===K3||l===J3,d=l===Wx||l===qx;if(c||d){if(a.isRenderTargetTexture&&!0===a.needsPMREMUpdate){a.needsPMREMUpdate=!1;let u=t.get(a);return null===e&&(e=new EI(n)),u=c?e.fromEquirectangular(a,u):e.fromCubemap(a,u),t.set(a,u),u.texture}if(t.has(a))return t.get(a).texture;{let u=a.image;if(c&&u&&u.height>0||d&&u&&function(a){let l=0;for(let d=0;d<6;d++)void 0!==a[d]&&l++;return 6===l}(u)){null===e&&(e=new EI(n));let p=c?e.fromEquirectangular(a):e.fromCubemap(a);return t.set(a,p),a.addEventListener("dispose",o),p.texture}return null}}}return a},dispose:function(){t=new WeakMap,null!==e&&(e.dispose(),e=null)}}}function xke(n){let t={};function e(i){if(void 0!==t[i])return t[i];let r;switch(i){case"WEBGL_depth_texture":r=n.getExtension("WEBGL_depth_texture")||n.getExtension("MOZ_WEBGL_depth_texture")||n.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=n.getExtension("EXT_texture_filter_anisotropic")||n.getExtension("MOZ_EXT_texture_filter_anisotropic")||n.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=n.getExtension("WEBGL_compressed_texture_s3tc")||n.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=n.getExtension("WEBGL_compressed_texture_pvrtc")||n.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=n.getExtension(i)}return t[i]=r,r}return{has:function(i){return null!==e(i)},init:function(i){i.isWebGL2?e("EXT_color_buffer_float"):(e("WEBGL_depth_texture"),e("OES_texture_float"),e("OES_texture_half_float"),e("OES_texture_half_float_linear"),e("OES_standard_derivatives"),e("OES_element_index_uint"),e("OES_vertex_array_object"),e("ANGLE_instanced_arrays")),e("OES_texture_float_linear"),e("EXT_color_buffer_half_float"),e("WEBGL_multisampled_render_to_texture")},get:function(i){let r=e(i);return null===r&&console.warn("THREE.WebGLRenderer: "+i+" extension not supported."),r}}}function Cke(n,t,e,i){let r={},o=new WeakMap;function s(u){let p=u.target;null!==p.index&&t.remove(p.index);for(let m in p.attributes)t.remove(p.attributes[m]);p.removeEventListener("dispose",s),delete r[p.id];let f=o.get(p);f&&(t.remove(f),o.delete(p)),i.releaseStatesOfGeometry(p),!0===p.isInstancedBufferGeometry&&delete p._maxInstanceCount,e.memory.geometries--}function c(u){let p=[],f=u.index,m=u.attributes.position,b=0;if(null!==f){let x=f.array;b=f.version;for(let R=0,A=x.length;R<A;R+=3){let V=x[R+0],te=x[R+1],K=x[R+2];p.push(V,te,te,K,K,V)}}else{b=m.version;for(let R=0,A=m.array.length/3-1;R<A;R+=3){let V=R+0,te=R+1,K=R+2;p.push(V,te,te,K,K,V)}}let M=new(Qee(p)?wI:MI)(p,1);M.version=b;let y=o.get(u);y&&t.remove(y),o.set(u,M)}return{get:function(u,p){return!0===r[p.id]||(p.addEventListener("dispose",s),r[p.id]=!0,e.memory.geometries++),p},update:function(u){let p=u.attributes;for(let m in p)t.update(p[m],34962);let f=u.morphAttributes;for(let m in f){let b=f[m];for(let M=0,y=b.length;M<y;M++)t.update(b[M],34962)}},getWireframeAttribute:function(u){let p=o.get(u);if(p){let f=u.index;null!==f&&p.version<f.version&&c(u)}else c(u);return o.get(u)}}}function Mke(n,t,e,i){let o,a,l,r=i.isWebGL2;this.setMode=function(p){o=p},this.setIndex=function(p){a=p.type,l=p.bytesPerElement},this.render=function(p,f){n.drawElements(o,f,a,p*l),e.update(f,o,1)},this.renderInstances=function(p,f,m){if(0===m)return;let b,M;if(r)b=n,M="drawElementsInstanced";else if(b=t.get("ANGLE_instanced_arrays"),M="drawElementsInstancedANGLE",null===b)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");b[M](o,f,a,p*l,m),e.update(f,o,m)}}function wke(n){let 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(o,s,a){switch(e.calls++,s){case 4:e.triangles+=a*(o/3);break;case 1:e.lines+=a*(o/2);break;case 3:e.lines+=a*(o-1);break;case 2:e.lines+=a*o;break;case 0:e.points+=a*o;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",s)}}}}var Dx=class extends lo{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=_o,this.minFilter=_o,this.wrapR=ya,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};function Ske(n,t){return n[0]-t[0]}function Eke(n,t){return Math.abs(t[1])-Math.abs(n[1])}function nee(n,t){let e=1,i=t.isInterleavedBufferAttribute?t.data.array:t.array;i instanceof Int8Array?e=127:i instanceof Int16Array?e=32767:i instanceof Int32Array?e=2147483647:console.error("THREE.WebGLMorphtargets: Unsupported morph attribute data type: ",i),n.divideScalar(e)}function Tke(n,t,e){let i={},r=new Float32Array(8),o=new WeakMap,s=new $,a=[];for(let c=0;c<8;c++)a[c]=[c,0];return{update:function(c,d,u,p){let f=c.morphTargetInfluences;if(!0===t.isWebGL2){let m=d.morphAttributes.position.length,b=o.get(d);if(void 0===b||b.count!==m){let re=function(){De.dispose(),o.delete(d),d.removeEventListener("dispose",re)};void 0!==b&&b.texture.dispose();let x=void 0!==d.morphAttributes.normal,R=d.morphAttributes.position,A=d.morphAttributes.normal||[],te=!0===x?2:1,K=d.attributes.position.count*te,xe=1;K>t.maxTextureSize&&(xe=Math.ceil(K/t.maxTextureSize),K=t.maxTextureSize);let Xe=new Float32Array(K*xe*4*m),De=new Dx(Xe,K,xe,m);De.format=gs,De.type=cm,De.needsUpdate=!0;let D=4*te;for(let ce=0;ce<m;ce++){let fe=R[ce],be=A[ce],ne=K*xe*4*ce;for(let de=0;de<fe.count;de++){s.fromBufferAttribute(fe,de),!0===fe.normalized&&nee(s,fe);let pe=de*D;Xe[ne+pe+0]=s.x,Xe[ne+pe+1]=s.y,Xe[ne+pe+2]=s.z,Xe[ne+pe+3]=0,!0===x&&(s.fromBufferAttribute(be,de),!0===be.normalized&&nee(s,be),Xe[ne+pe+4]=s.x,Xe[ne+pe+5]=s.y,Xe[ne+pe+6]=s.z,Xe[ne+pe+7]=0)}}b={count:m,texture:De,size:new $e(K,xe)},o.set(d,b),d.addEventListener("dispose",re)}let M=0;for(let x=0;x<f.length;x++)M+=f[x];let y=d.morphTargetsRelative?1:1-M;p.getUniforms().setValue(n,"morphTargetBaseInfluence",y),p.getUniforms().setValue(n,"morphTargetInfluences",f),p.getUniforms().setValue(n,"morphTargetsTexture",b.texture,e),p.getUniforms().setValue(n,"morphTargetsTextureSize",b.size)}else{let m=void 0===f?0:f.length,b=i[d.id];if(void 0===b||b.length!==m){b=[];for(let A=0;A<m;A++)b[A]=[A,0];i[d.id]=b}for(let A=0;A<m;A++){let V=b[A];V[0]=A,V[1]=f[A]}b.sort(Eke);for(let A=0;A<8;A++)A<m&&b[A][1]?(a[A][0]=b[A][0],a[A][1]=b[A][1]):(a[A][0]=Number.MAX_SAFE_INTEGER,a[A][1]=0);a.sort(Ske);let M=d.morphAttributes.position,y=d.morphAttributes.normal,x=0;for(let A=0;A<8;A++){let V=a[A],te=V[0],K=V[1];te!==Number.MAX_SAFE_INTEGER&&K?(M&&d.getAttribute("morphTarget"+A)!==M[te]&&d.setAttribute("morphTarget"+A,M[te]),y&&d.getAttribute("morphNormal"+A)!==y[te]&&d.setAttribute("morphNormal"+A,y[te]),r[A]=K,x+=K):(M&&!0===d.hasAttribute("morphTarget"+A)&&d.deleteAttribute("morphTarget"+A),y&&!0===d.hasAttribute("morphNormal"+A)&&d.deleteAttribute("morphNormal"+A),r[A]=0)}let R=d.morphTargetsRelative?1:1-x;p.getUniforms().setValue(n,"morphTargetBaseInfluence",R),p.getUniforms().setValue(n,"morphTargetInfluences",r)}}}}function Dke(n,t,e,i){let r=new WeakMap;function a(l){let c=l.target;c.removeEventListener("dispose",a),e.remove(c.instanceMatrix),null!==c.instanceColor&&e.remove(c.instanceColor)}return{update:function(l){let c=i.render.frame,u=t.get(l,l.geometry);return r.get(u)!==c&&(t.update(u),r.set(u,c)),l.isInstancedMesh&&(!1===l.hasEventListener("dispose",a)&&l.addEventListener("dispose",a),e.update(l.instanceMatrix,34962),null!==l.instanceColor&&e.update(l.instanceColor,34962)),u},dispose:function(){r=new WeakMap}}}Dx.prototype.isDataTexture2DArray=!0;var TI=class extends lo{constructor(t=null,e=1,i=1,r=1){super(null),this.image={data:t,width:e,height:i,depth:r},this.magFilter=_o,this.minFilter=_o,this.wrapR=ya,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};TI.prototype.isDataTexture3D=!0;var $ee=new lo,ete=new Dx,tte=new TI,nte=new Q0,iee=[],ree=[],oee=new Float32Array(16),see=new Float32Array(9),aee=new Float32Array(4);function s_(n,t,e){let i=n[0];if(i<=0||i>0)return n;let r=t*e,o=iee[r];if(void 0===o&&(o=new Float32Array(r),iee[r]=o),0!==t){i.toArray(o,0);for(let s=1,a=0;s!==t;++s)a+=e,n[s].toArray(o,a)}return o}function _s(n,t){if(n.length!==t.length)return!1;for(let e=0,i=n.length;e<i;e++)if(n[e]!==t[e])return!1;return!0}function ns(n,t){for(let e=0,i=t.length;e<i;e++)n[e]=t[e]}function ZI(n,t){let e=ree[t];void 0===e&&(e=new Int32Array(t),ree[t]=e);for(let i=0;i!==t;++i)e[i]=n.allocateTextureUnit();return e}function Ike(n,t){let e=this.cache;e[0]!==t&&(n.uniform1f(this.addr,t),e[0]=t)}function Ake(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y)&&(n.uniform2f(this.addr,t.x,t.y),e[0]=t.x,e[1]=t.y);else{if(_s(e,t))return;n.uniform2fv(this.addr,t),ns(e,t)}}function Rke(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z)&&(n.uniform3f(this.addr,t.x,t.y,t.z),e[0]=t.x,e[1]=t.y,e[2]=t.z);else if(void 0!==t.r)(e[0]!==t.r||e[1]!==t.g||e[2]!==t.b)&&(n.uniform3f(this.addr,t.r,t.g,t.b),e[0]=t.r,e[1]=t.g,e[2]=t.b);else{if(_s(e,t))return;n.uniform3fv(this.addr,t),ns(e,t)}}function Pke(n,t){let e=this.cache;if(void 0!==t.x)(e[0]!==t.x||e[1]!==t.y||e[2]!==t.z||e[3]!==t.w)&&(n.uniform4f(this.addr,t.x,t.y,t.z,t.w),e[0]=t.x,e[1]=t.y,e[2]=t.z,e[3]=t.w);else{if(_s(e,t))return;n.uniform4fv(this.addr,t),ns(e,t)}}function Oke(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_s(e,t))return;n.uniformMatrix2fv(this.addr,!1,t),ns(e,t)}else{if(_s(e,i))return;aee.set(i),n.uniformMatrix2fv(this.addr,!1,aee),ns(e,i)}}function kke(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_s(e,t))return;n.uniformMatrix3fv(this.addr,!1,t),ns(e,t)}else{if(_s(e,i))return;see.set(i),n.uniformMatrix3fv(this.addr,!1,see),ns(e,i)}}function Fke(n,t){let e=this.cache,i=t.elements;if(void 0===i){if(_s(e,t))return;n.uniformMatrix4fv(this.addr,!1,t),ns(e,t)}else{if(_s(e,i))return;oee.set(i),n.uniformMatrix4fv(this.addr,!1,oee),ns(e,i)}}function Nke(n,t){let e=this.cache;e[0]!==t&&(n.uniform1i(this.addr,t),e[0]=t)}function Lke(n,t){let e=this.cache;_s(e,t)||(n.uniform2iv(this.addr,t),ns(e,t))}function Bke(n,t){let e=this.cache;_s(e,t)||(n.uniform3iv(this.addr,t),ns(e,t))}function Vke(n,t){let e=this.cache;_s(e,t)||(n.uniform4iv(this.addr,t),ns(e,t))}function Hke(n,t){let e=this.cache;e[0]!==t&&(n.uniform1ui(this.addr,t),e[0]=t)}function zke(n,t){let e=this.cache;_s(e,t)||(n.uniform2uiv(this.addr,t),ns(e,t))}function Uke(n,t){let e=this.cache;_s(e,t)||(n.uniform3uiv(this.addr,t),ns(e,t))}function jke(n,t){let e=this.cache;_s(e,t)||(n.uniform4uiv(this.addr,t),ns(e,t))}function Gke(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTexture2D(t||$ee,r)}function Wke(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture3D(t||tte,r)}function qke(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.safeSetTextureCube(t||nte,r)}function Yke(n,t,e){let i=this.cache,r=e.allocateTextureUnit();i[0]!==r&&(n.uniform1i(this.addr,r),i[0]=r),e.setTexture2DArray(t||ete,r)}function Qke(n,t){n.uniform1fv(this.addr,t)}function Zke(n,t){let e=s_(t,this.size,2);n.uniform2fv(this.addr,e)}function Kke(n,t){let e=s_(t,this.size,3);n.uniform3fv(this.addr,e)}function Jke(n,t){let e=s_(t,this.size,4);n.uniform4fv(this.addr,e)}function $ke(n,t){let e=s_(t,this.size,4);n.uniformMatrix2fv(this.addr,!1,e)}function eFe(n,t){let e=s_(t,this.size,9);n.uniformMatrix3fv(this.addr,!1,e)}function tFe(n,t){let e=s_(t,this.size,16);n.uniformMatrix4fv(this.addr,!1,e)}function nFe(n,t){n.uniform1iv(this.addr,t)}function iFe(n,t){n.uniform2iv(this.addr,t)}function rFe(n,t){n.uniform3iv(this.addr,t)}function oFe(n,t){n.uniform4iv(this.addr,t)}function sFe(n,t){n.uniform1uiv(this.addr,t)}function aFe(n,t){n.uniform2uiv(this.addr,t)}function lFe(n,t){n.uniform3uiv(this.addr,t)}function cFe(n,t){n.uniform4uiv(this.addr,t)}function dFe(n,t,e){let i=t.length,r=ZI(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTexture2D(t[o]||$ee,r[o])}function uFe(n,t,e){let i=t.length,r=ZI(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture3D(t[o]||tte,r[o])}function pFe(n,t,e){let i=t.length,r=ZI(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.safeSetTextureCube(t[o]||nte,r[o])}function fFe(n,t,e){let i=t.length,r=ZI(e,i);n.uniform1iv(this.addr,r);for(let o=0;o!==i;++o)e.setTexture2DArray(t[o]||ete,r[o])}function hFe(n,t,e){this.id=n,this.addr=e,this.cache=[],this.setValue=function(n){switch(n){case 5126:return Ike;case 35664:return Ake;case 35665:return Rke;case 35666:return Pke;case 35674:return Oke;case 35675:return kke;case 35676:return Fke;case 5124:case 35670:return Nke;case 35667:case 35671:return Lke;case 35668:case 35672:return Bke;case 35669:case 35673:return Vke;case 5125:return Hke;case 36294:return zke;case 36295:return Uke;case 36296:return jke;case 35678:case 36198:case 36298:case 36306:case 35682:return Gke;case 35679:case 36299:case 36307:return Wke;case 35680:case 36300:case 36308:case 36293:return qke;case 36289:case 36303:case 36311:case 36292:return Yke}}(t.type)}function ite(n,t,e){this.id=n,this.addr=e,this.cache=[],this.size=t.size,this.setValue=function(n){switch(n){case 5126:return Qke;case 35664:return Zke;case 35665:return Kke;case 35666:return Jke;case 35674:return $ke;case 35675:return eFe;case 35676:return tFe;case 5124:case 35670:return nFe;case 35667:case 35671:return iFe;case 35668:case 35672:return rFe;case 35669:case 35673:return oFe;case 5125:return sFe;case 36294:return aFe;case 36295:return lFe;case 36296:return cFe;case 35678:case 36198:case 36298:case 36306:case 35682:return dFe;case 35679:case 36299:case 36307:return uFe;case 35680:case 36300:case 36308:case 36293:return pFe;case 36289:case 36303:case 36311:case 36292:return fFe}}(t.type)}function rte(n){this.id=n,this.seq=[],this.map={}}ite.prototype.updateCache=function(n){let t=this.cache;n instanceof Float32Array&&t.length!==n.length&&(this.cache=new Float32Array(n.length)),ns(t,n)},rte.prototype.setValue=function(n,t,e){let i=this.seq;for(let r=0,o=i.length;r!==o;++r){let s=i[r];s.setValue(n,t[s.id],e)}};var U3=/(\w+)(\])?(\[|\.)?/g;function lee(n,t){n.seq.push(t),n.map[t.id]=t}function gFe(n,t,e){let i=n.name,r=i.length;for(U3.lastIndex=0;;){let o=U3.exec(i),a=o[1],c=o[3];if("]"===o[2]&&(a|=0),void 0===c||"["===c&&U3.lastIndex+2===r){lee(e,void 0===c?new hFe(a,n,t):new ite(a,n,t));break}{let u=e.map[a];void 0===u&&(u=new rte(a),lee(e,u)),e=u}}}function gp(n,t){this.seq=[],this.map={};let e=n.getProgramParameter(t,35718);for(let i=0;i<e;++i){let r=n.getActiveUniform(t,i);gFe(r,n.getUniformLocation(t,r.name),this)}}function cee(n,t,e){let i=n.createShader(t);return n.shaderSource(i,e),n.compileShader(i),i}gp.prototype.setValue=function(n,t,e,i){let r=this.map[t];void 0!==r&&r.setValue(n,e,i)},gp.prototype.setOptional=function(n,t,e){let i=t[e];void 0!==i&&this.setValue(n,e,i)},gp.upload=function(n,t,e,i){for(let r=0,o=t.length;r!==o;++r){let s=t[r],a=e[s.id];!1!==a.needsUpdate&&s.setValue(n,a.value,i)}},gp.seqWithValue=function(n,t){let e=[];for(let i=0,r=n.length;i!==r;++i){let o=n[i];o.id in t&&e.push(o)}return e};var _Fe=0;function dee(n,t,e){let i=n.getShaderParameter(t,35713),r=n.getShaderInfoLog(t).trim();return i&&""===r?"":e.toUpperCase()+"\n\n"+r+"\n\n"+function(n){let t=n.split("\n");for(let e=0;e<t.length;e++)t[e]=e+1+": "+t[e];return t.join("\n")}(n.getShaderSource(t))}function yFe(n,t){let e=function(n){switch(n){case _p:return["Linear","( value )"];case Ar:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",n),["Linear","( value )"]}}(t);return"vec4 "+n+"( vec4 value ) { return LinearTo"+e[0]+e[1]+"; }"}function xFe(n,t){let e;switch(t){case YAe:e="Linear";break;case XAe:e="Reinhard";break;case QAe:e="OptimizedCineon";break;case ZAe:e="ACESFilmic";break;case KAe:e="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),e="Linear"}return"vec3 "+n+"( vec3 color ) { return "+e+"ToneMapping( color ); }"}function hx(n){return""!==n}function uee(n,t){return n.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function pee(n,t){return n.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}var SFe=/^[ \t]*#include +<([\w\d./]+)>/gm;function oB(n){return n.replace(SFe,EFe)}function EFe(n,t){let e=bi[t];if(void 0===e)throw new Error("Can not resolve #include <"+t+">");return oB(e)}var TFe=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,DFe=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function fee(n){return n.replace(DFe,ote).replace(TFe,IFe)}function IFe(n,t,e,i){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),ote(0,t,e,i)}function ote(n,t,e,i){let r="";for(let o=parseInt(t);o<parseInt(e);o++)r+=i.replace(/\[\s*i\s*\]/g,"[ "+o+" ]").replace(/UNROLLED_LOOP_INDEX/g,o);return r}function mee(n){let t="precision "+n.precision+" float;\nprecision "+n.precision+" int;";return"highp"===n.precision?t+="\n#define HIGH_PRECISION":"mediump"===n.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===n.precision&&(t+="\n#define LOW_PRECISION"),t}function kFe(n,t,e,i){let b,M,r=n.getContext(),o=e.defines,s=e.vertexShader,a=e.fragmentShader,l=function(n){let t="SHADOWMAP_TYPE_BASIC";return n.shadowMapType===jee?t="SHADOWMAP_TYPE_PCF":n.shadowMapType===SAe?t="SHADOWMAP_TYPE_PCF_SOFT":n.shadowMapType===mx&&(t="SHADOWMAP_TYPE_VSM"),t}(e),c=function(n){let t="ENVMAP_TYPE_CUBE";if(n.envMap)switch(n.envMapMode){case Wx:case qx:t="ENVMAP_TYPE_CUBE";break;case XI:case uV:t="ENVMAP_TYPE_CUBE_UV"}return t}(e),d=function(n){let t="ENVMAP_MODE_REFLECTION";if(n.envMap)switch(n.envMapMode){case qx:case uV:t="ENVMAP_MODE_REFRACTION"}return t}(e),u=function(n){let t="ENVMAP_BLENDING_NONE";if(n.envMap)switch(n.combine){case YI:t="ENVMAP_BLENDING_MULTIPLY";break;case WAe:t="ENVMAP_BLENDING_MIX";break;case qAe:t="ENVMAP_BLENDING_ADD"}return t}(e),p=e.isWebGL2?"":function(n){return[n.extensionDerivatives||n.envMapCubeUV||n.bumpMap||n.tangentSpaceNormalMap||n.clearcoatNormalMap||n.flatShading||"physical"===n.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(n.extensionFragDepth||n.logarithmicDepthBuffer)&&n.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",n.extensionDrawBuffers&&n.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(n.extensionShaderTextureLOD||n.envMap||n.transmission)&&n.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(hx).join("\n")}(e),f=function(n){let t=[];for(let e in n){let i=n[e];!1!==i&&t.push("#define "+e+" "+i)}return t.join("\n")}(o),m=r.createProgram(),y=e.glslVersion?"#version "+e.glslVersion+"\n":"";e.isRawShaderMaterial?(b=[f].filter(hx).join("\n"),b.length>0&&(b+="\n"),M=[p,f].filter(hx).join("\n"),M.length>0&&(M+="\n")):(b=[mee(e),"#define SHADER_NAME "+e.shaderName,f,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define MAX_BONES "+e.maxBones,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+d:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.useVertexTexture?"#define BONE_TEXTURE":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&!1===e.flatShading?"#define USE_MORPHNORMALS":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(hx).join("\n"),M=[p,mee(e),"#define SHADER_NAME "+e.shaderName,f,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+c:"",e.envMap?"#define "+d:"",e.envMap?"#define "+u:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==fp?"#define TONE_MAPPING":"",e.toneMapping!==fp?bi.tonemapping_pars_fragment:"",e.toneMapping!==fp?xFe("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.alphaWrite?"":"#define OPAQUE",bi.encodings_pars_fragment,yFe("linearToOutputTexel",e.outputEncoding),e.depthPacking?"#define DEPTH_PACKING "+e.depthPacking:"","\n"].filter(hx).join("\n")),s=oB(s),s=uee(s,e),s=pee(s,e),a=oB(a),a=uee(a,e),a=pee(a,e),s=fee(s),a=fee(a),e.isWebGL2&&!0!==e.isRawShaderMaterial&&(y="#version 300 es\n",b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+b,M=["#define varying in",e.glslVersion===N$?"":"layout(location = 0) out highp vec4 pc_fragColor;",e.glslVersion===N$?"":"#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"+M);let te,K,R=y+M+a,A=cee(r,35633,y+b+s),V=cee(r,35632,R);if(r.attachShader(m,A),r.attachShader(m,V),void 0!==e.index0AttributeName?r.bindAttribLocation(m,0,e.index0AttributeName):!0===e.morphTargets&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),n.debug.checkShaderErrors){let xe=r.getProgramInfoLog(m).trim(),Xe=r.getShaderInfoLog(A).trim(),De=r.getShaderInfoLog(V).trim(),D=!0,re=!0;if(!1===r.getProgramParameter(m,35714)){D=!1;let ce=dee(r,A,"vertex"),fe=dee(r,V,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+"\n\nProgram Info Log: "+xe+"\n"+ce+"\n"+fe)}else""!==xe?console.warn("THREE.WebGLProgram: Program Info Log:",xe):(""===Xe||""===De)&&(re=!1);re&&(this.diagnostics={runnable:D,programLog:xe,vertexShader:{log:Xe,prefix:b},fragmentShader:{log:De,prefix:M}})}return r.deleteShader(A),r.deleteShader(V),this.getUniforms=function(){return void 0===te&&(te=new gp(r,m)),te},this.getAttributes=function(){return void 0===K&&(K=function(n,t){let e={},i=n.getProgramParameter(t,35721);for(let r=0;r<i;r++){let o=n.getActiveAttrib(t,r),s=o.name,a=1;35674===o.type&&(a=2),35675===o.type&&(a=3),35676===o.type&&(a=4),e[s]={type:o.type,location:n.getAttribLocation(t,s),locationSize:a}}return e}(r,m)),K},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=e.shaderName,this.id=_Fe++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=A,this.fragmentShader=V,this}var FFe=0,sB=class{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){let i=t.fragmentShader,r=this._getShaderStage(t.vertexShader),o=this._getShaderStage(i),s=this._getShaderCacheForMaterial(t);return!1===s.has(r)&&(s.add(r),r.usedTimes++),!1===s.has(o)&&(s.add(o),o.usedTimes++),this}remove(t){let e=this.materialCache.get(t);for(let i of e)i.usedTimes--,0===i.usedTimes&&this.shaderCache.delete(i);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){let e=this.materialCache;return!1===e.has(t)&&e.set(t,new Set),e.get(t)}_getShaderStage(t){let e=this.shaderCache;if(!1===e.has(t)){let i=new aB;e.set(t,i)}return e.get(t)}},aB=class{constructor(){this.id=FFe++,this.usedTimes=0}};function NFe(n,t,e,i,r,o,s){let a=new CI,l=new sB,c=[],d=r.isWebGL2,u=r.logarithmicDepthBuffer,p=r.floatVertexTextures,f=r.maxVertexUniforms,m=r.vertexTextures,b=r.precision,M={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(D,re,ce,fe,be){let Ne,lt,Mt,pt,ne=fe.fog,pe=(D.isMeshStandardMaterial?e:t).get(D.envMap||(D.isMeshStandardMaterial?fe.environment:null)),je=M[D.type],Ce=be.isSkinnedMesh?function(D){let ce=D.skeleton.bones;if(p)return 1024;{let be=Math.floor((f-20)/4),ne=Math.min(be,ce.length);return ne<ce.length?(console.warn("THREE.WebGLRenderer: Skeleton has "+ce.length+" bones. This GPU supports "+ne+"."),0):ne}}(be):0;if(null!==D.precision&&(b=r.getMaxPrecision(D.precision),b!==D.precision&&console.warn("THREE.WebGLProgram.getParameters:",D.precision,"not supported, using",b,"instead.")),je){let ve=qc[je];Ne=ve.vertexShader,lt=ve.fragmentShader}else Ne=D.vertexShader,lt=D.fragmentShader,l.update(D),Mt=l.getVertexShaderID(D),pt=l.getFragmentShaderID(D);let Oe=n.getRenderTarget(),wt=D.clearcoat>0;return{isWebGL2:d,shaderID:je,shaderName:D.type,vertexShader:Ne,fragmentShader:lt,defines:D.defines,customVertexShaderID:Mt,customFragmentShaderID:pt,isRawShaderMaterial:!0===D.isRawShaderMaterial,glslVersion:D.glslVersion,precision:b,instancing:!0===be.isInstancedMesh,instancingColor:!0===be.isInstancedMesh&&null!==be.instanceColor,supportsVertexTextures:m,outputEncoding:null===Oe?n.outputEncoding:!0===Oe.isXRRenderTarget?Oe.texture.encoding:_p,map:!!D.map,matcap:!!D.matcap,envMap:!!pe,envMapMode:pe&&pe.mapping,envMapCubeUV:!!pe&&(pe.mapping===XI||pe.mapping===uV),lightMap:!!D.lightMap,aoMap:!!D.aoMap,emissiveMap:!!D.emissiveMap,bumpMap:!!D.bumpMap,normalMap:!!D.normalMap,objectSpaceNormalMap:D.normalMapType===vRe,tangentSpaceNormalMap:D.normalMapType===o_,decodeVideoTexture:!!D.map&&!0===D.map.isVideoTexture&&D.map.encoding===Ar,clearcoat:wt,clearcoatMap:wt&&!!D.clearcoatMap,clearcoatRoughnessMap:wt&&!!D.clearcoatRoughnessMap,clearcoatNormalMap:wt&&!!D.clearcoatNormalMap,displacementMap:!!D.displacementMap,roughnessMap:!!D.roughnessMap,metalnessMap:!!D.metalnessMap,specularMap:!!D.specularMap,specularIntensityMap:!!D.specularIntensityMap,specularColorMap:!!D.specularColorMap,alphaMap:!!D.alphaMap,alphaTest:D.alphaTest>0,alphaWrite:D.alphaWrite||D.transparent,gradientMap:!!D.gradientMap,sheen:D.sheen>0,sheenColorMap:!!D.sheenColorMap,sheenRoughnessMap:!!D.sheenRoughnessMap,transmission:D.transmission>0,transmissionMap:!!D.transmissionMap,thicknessMap:!!D.thicknessMap,combine:D.combine,vertexTangents:!!D.normalMap&&!!be.geometry&&!!be.geometry.attributes.tangent,vertexColors:D.vertexColors,vertexAlphas:!0===D.vertexColors&&!!be.geometry&&!!be.geometry.attributes.color&&4===be.geometry.attributes.color.itemSize,vertexUvs:!!(D.map||D.bumpMap||D.normalMap||D.specularMap||D.alphaMap||D.emissiveMap||D.roughnessMap||D.metalnessMap||D.clearcoatMap||D.clearcoatRoughnessMap||D.clearcoatNormalMap||D.displacementMap||D.transmissionMap||D.thicknessMap||D.specularIntensityMap||D.specularColorMap||D.sheenColorMap||D.sheenRoughnessMap),uvsVertexOnly:!(D.map||D.bumpMap||D.normalMap||D.specularMap||D.alphaMap||D.emissiveMap||D.roughnessMap||D.metalnessMap||D.clearcoatNormalMap||D.transmission>0||D.transmissionMap||D.thicknessMap||D.specularIntensityMap||D.specularColorMap||D.sheen>0||D.sheenColorMap||D.sheenRoughnessMap||!D.displacementMap),fog:!!ne,useFog:D.fog,fogExp2:ne&&ne.isFogExp2,flatShading:!!D.flatShading,sizeAttenuation:D.sizeAttenuation,logarithmicDepthBuffer:u,skinning:!0===be.isSkinnedMesh&&Ce>0,maxBones:Ce,useVertexTexture:p,morphTargets:!!be.geometry&&!!be.geometry.morphAttributes.position,morphNormals:!!be.geometry&&!!be.geometry.morphAttributes.normal,morphTargetsCount:be.geometry&&be.geometry.morphAttributes.position?be.geometry.morphAttributes.position.length:0,numDirLights:re.directional.length,numPointLights:re.point.length,numSpotLights:re.spot.length,numRectAreaLights:re.rectArea.length,numHemiLights:re.hemi.length,numDirLightShadows:re.directionalShadowMap.length,numPointLightShadows:re.pointShadowMap.length,numSpotLightShadows:re.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:D.dithering,shadowMapEnabled:n.shadowMap.enabled&&ce.length>0,shadowMapType:n.shadowMap.type,toneMapping:D.toneMapped?n.toneMapping:fp,physicallyCorrectLights:n.physicallyCorrectLights,premultipliedAlpha:D.premultipliedAlpha,doubleSided:D.side===q0,flipSided:D.side===go,depthPacking:void 0!==D.depthPacking&&D.depthPacking,index0AttributeName:D.index0AttributeName,extensionDerivatives:D.extensions&&D.extensions.derivatives,extensionFragDepth:D.extensions&&D.extensions.fragDepth,extensionDrawBuffers:D.extensions&&D.extensions.drawBuffers,extensionShaderTextureLOD:D.extensions&&D.extensions.shaderTextureLOD,rendererExtensionFragDepth:d||i.has("EXT_frag_depth"),rendererExtensionDrawBuffers:d||i.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:d||i.has("EXT_shader_texture_lod"),customProgramCacheKey:D.customProgramCacheKey()}},getProgramCacheKey:function(D){let re=[];if(D.shaderID?re.push(D.shaderID):(re.push(D.customVertexShaderID),re.push(D.customFragmentShaderID)),void 0!==D.defines)for(let ce in D.defines)re.push(ce),re.push(D.defines[ce]);return!1===D.isRawShaderMaterial&&(function(D,re){D.push(re.precision),D.push(re.outputEncoding),D.push(re.envMapMode),D.push(re.combine),D.push(re.vertexUvs),D.push(re.fogExp2),D.push(re.sizeAttenuation),D.push(re.maxBones),D.push(re.morphTargetsCount),D.push(re.numDirLights),D.push(re.numPointLights),D.push(re.numSpotLights),D.push(re.numHemiLights),D.push(re.numRectAreaLights),D.push(re.numDirLightShadows),D.push(re.numPointLightShadows),D.push(re.numSpotLightShadows),D.push(re.shadowMapType),D.push(re.toneMapping),D.push(re.numClippingPlanes),D.push(re.numClipIntersection),D.push(re.alphaWrite)}(re,D),function(D,re){a.disableAll(),re.isWebGL2&&a.enable(0),re.supportsVertexTextures&&a.enable(1),re.instancing&&a.enable(2),re.instancingColor&&a.enable(3),re.map&&a.enable(4),re.matcap&&a.enable(5),re.envMap&&a.enable(6),re.envMapCubeUV&&a.enable(7),re.lightMap&&a.enable(8),re.aoMap&&a.enable(9),re.emissiveMap&&a.enable(10),re.bumpMap&&a.enable(11),re.normalMap&&a.enable(12),re.objectSpaceNormalMap&&a.enable(13),re.tangentSpaceNormalMap&&a.enable(14),re.clearcoat&&a.enable(15),re.clearcoatMap&&a.enable(16),re.clearcoatRoughnessMap&&a.enable(17),re.clearcoatNormalMap&&a.enable(18),re.displacementMap&&a.enable(19),re.specularMap&&a.enable(20),re.roughnessMap&&a.enable(21),re.metalnessMap&&a.enable(22),re.gradientMap&&a.enable(23),re.alphaMap&&a.enable(24),re.alphaTest&&a.enable(25),re.vertexColors&&a.enable(26),re.vertexAlphas&&a.enable(27),re.vertexUvs&&a.enable(28),re.vertexTangents&&a.enable(29),re.uvsVertexOnly&&a.enable(30),re.fog&&a.enable(31),D.push(a.mask),a.disableAll(),re.useFog&&a.enable(0),re.flatShading&&a.enable(1),re.logarithmicDepthBuffer&&a.enable(2),re.skinning&&a.enable(3),re.useVertexTexture&&a.enable(4),re.morphTargets&&a.enable(5),re.morphNormals&&a.enable(6),re.premultipliedAlpha&&a.enable(7),re.shadowMapEnabled&&a.enable(8),re.physicallyCorrectLights&&a.enable(9),re.doubleSided&&a.enable(10),re.flipSided&&a.enable(11),re.depthPacking&&a.enable(12),re.dithering&&a.enable(13),re.specularIntensityMap&&a.enable(14),re.specularColorMap&&a.enable(15),re.transmission&&a.enable(16),re.transmissionMap&&a.enable(17),re.thicknessMap&&a.enable(18),re.sheen&&a.enable(19),re.sheenColorMap&&a.enable(20),re.sheenRoughnessMap&&a.enable(21),re.decodeVideoTexture&&a.enable(22),D.push(a.mask)}(re,D),re.push(n.outputEncoding)),re.push(D.customProgramCacheKey),re.join()},getUniforms:function(D){let ce,re=M[D.type];return ce=re?kRe.clone(qc[re].uniforms):D.uniforms,ce},acquireProgram:function(D,re){let ce;for(let fe=0,be=c.length;fe<be;fe++){let ne=c[fe];if(ne.cacheKey===re){ce=ne,++ce.usedTimes;break}}return void 0===ce&&(ce=new kFe(n,re,D,o),c.push(ce)),ce},releaseProgram:function(D){if(0==--D.usedTimes){let re=c.indexOf(D);c[re]=c[c.length-1],c.pop(),D.destroy()}},releaseShaderCache:function(D){l.remove(D)},programs:c,dispose:function(){l.dispose()}}}function LFe(){let n=new WeakMap;return{get:function(o){let s=n.get(o);return void 0===s&&(s={},n.set(o,s)),s},remove:function(o){n.delete(o)},update:function(o,s,a){n.get(o)[s]=a},dispose:function(){n=new WeakMap}}}function BFe(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.material.id!==t.material.id?n.material.id-t.material.id:n.z!==t.z?n.z-t.z:n.id-t.id}function hee(n,t){return n.groupOrder!==t.groupOrder?n.groupOrder-t.groupOrder:n.renderOrder!==t.renderOrder?n.renderOrder-t.renderOrder:n.z!==t.z?t.z-n.z:n.id-t.id}function gee(){let n=[],t=0,e=[],i=[],r=[];function s(u,p,f,m,b,M){let y=n[t];return void 0===y?(y={id:u.id,object:u,geometry:p,material:f,groupOrder:m,renderOrder:u.renderOrder,z:b,group:M},n[t]=y):(y.id=u.id,y.object=u,y.geometry=p,y.material=f,y.groupOrder=m,y.renderOrder=u.renderOrder,y.z=b,y.group=M),t++,y}return{opaque:e,transmissive:i,transparent:r,init:function(){t=0,e.length=0,i.length=0,r.length=0},push:function(u,p,f,m,b,M){let y=s(u,p,f,m,b,M);f.transmission>0?i.push(y):!0===f.transparent?r.push(y):e.push(y)},unshift:function(u,p,f,m,b,M){let y=s(u,p,f,m,b,M);f.transmission>0?i.unshift(y):!0===f.transparent?r.unshift(y):e.unshift(y)},finish:function(){for(let u=t,p=n.length;u<p;u++){let f=n[u];if(null===f.id)break;f.id=null,f.object=null,f.geometry=null,f.material=null,f.group=null}},sort:function(u,p){e.length>1&&e.sort(u||BFe),i.length>1&&i.sort(p||hee),r.length>1&&r.sort(p||hee)}}}function VFe(){let n=new WeakMap;return{get:function(i,r){let o;return!1===n.has(i)?(o=new gee,n.set(i,[o])):r>=n.get(i).length?(o=new gee,n.get(i).push(o)):o=n.get(i)[r],o},dispose:function(){n=new WeakMap}}}function HFe(){let n={};return{get:function(t){if(void 0!==n[t.id])return n[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new $,color:new an};break;case"SpotLight":e={position:new $,direction:new $,color:new an,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new $,color:new an,distance:0,decay:0};break;case"HemisphereLight":e={direction:new $,skyColor:new an,groundColor:new an};break;case"RectAreaLight":e={color:new an,position:new $,halfWidth:new $,halfHeight:new $}}return n[t.id]=e,e}}}var UFe=0;function jFe(n,t){return(t.castShadow?1:0)-(n.castShadow?1:0)}function GFe(n,t){let e=new HFe,i=function(){let n={};return{get:function(t){if(void 0!==n[t.id])return n[t.id];let e;switch(t.type){case"DirectionalLight":case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $e};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new $e,shadowCameraNear:1,shadowCameraFar:1e3}}return n[t.id]=e,e}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new $);let o=new $,s=new xn,a=new xn;return{setup:function(d,u){let p=0,f=0,m=0;for(let Xe=0;Xe<9;Xe++)r.probe[Xe].set(0,0,0);let b=0,M=0,y=0,x=0,R=0,A=0,V=0,te=0;d.sort(jFe);let K=!0!==u?Math.PI:1;for(let Xe=0,De=d.length;Xe<De;Xe++){let D=d[Xe],re=D.color,ce=D.intensity,fe=D.distance,be=D.shadow&&D.shadow.map?D.shadow.map.texture:null;if(D.isAmbientLight)p+=re.r*ce*K,f+=re.g*ce*K,m+=re.b*ce*K;else if(D.isLightProbe)for(let ne=0;ne<9;ne++)r.probe[ne].addScaledVector(D.sh.coefficients[ne],ce);else if(D.isDirectionalLight){let ne=e.get(D);if(ne.color.copy(D.color).multiplyScalar(D.intensity*K),D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,r.directionalShadow[b]=pe,r.directionalShadowMap[b]=be,r.directionalShadowMatrix[b]=D.shadow.matrix,A++}r.directional[b]=ne,b++}else if(D.isSpotLight){let ne=e.get(D);if(ne.position.setFromMatrixPosition(D.matrixWorld),ne.color.copy(re).multiplyScalar(ce*K),ne.distance=fe,ne.coneCos=Math.cos(D.angle),ne.penumbraCos=Math.cos(D.angle*(1-D.penumbra)),ne.decay=D.decay,D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,r.spotShadow[y]=pe,r.spotShadowMap[y]=be,r.spotShadowMatrix[y]=D.shadow.matrix,te++}r.spot[y]=ne,y++}else if(D.isRectAreaLight){let ne=e.get(D);ne.color.copy(re).multiplyScalar(ce),ne.halfWidth.set(.5*D.width,0,0),ne.halfHeight.set(0,.5*D.height,0),r.rectArea[x]=ne,x++}else if(D.isPointLight){let ne=e.get(D);if(ne.color.copy(D.color).multiplyScalar(D.intensity*K),ne.distance=D.distance,ne.decay=D.decay,D.castShadow){let de=D.shadow,pe=i.get(D);pe.shadowBias=de.bias,pe.shadowNormalBias=de.normalBias,pe.shadowRadius=de.radius,pe.shadowMapSize=de.mapSize,pe.shadowCameraNear=de.camera.near,pe.shadowCameraFar=de.camera.far,r.pointShadow[M]=pe,r.pointShadowMap[M]=be,r.pointShadowMatrix[M]=D.shadow.matrix,V++}r.point[M]=ne,M++}else if(D.isHemisphereLight){let ne=e.get(D);ne.skyColor.copy(D.color).multiplyScalar(ce*K),ne.groundColor.copy(D.groundColor).multiplyScalar(ce*K),r.hemi[R]=ne,R++}}x>0&&(t.isWebGL2||!0===n.has("OES_texture_float_linear")?(r.rectAreaLTC1=It.LTC_FLOAT_1,r.rectAreaLTC2=It.LTC_FLOAT_2):!0===n.has("OES_texture_half_float_linear")?(r.rectAreaLTC1=It.LTC_HALF_1,r.rectAreaLTC2=It.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=p,r.ambient[1]=f,r.ambient[2]=m;let xe=r.hash;(xe.directionalLength!==b||xe.pointLength!==M||xe.spotLength!==y||xe.rectAreaLength!==x||xe.hemiLength!==R||xe.numDirectionalShadows!==A||xe.numPointShadows!==V||xe.numSpotShadows!==te)&&(r.directional.length=b,r.spot.length=y,r.rectArea.length=x,r.point.length=M,r.hemi.length=R,r.directionalShadow.length=A,r.directionalShadowMap.length=A,r.pointShadow.length=V,r.pointShadowMap.length=V,r.spotShadow.length=te,r.spotShadowMap.length=te,r.directionalShadowMatrix.length=A,r.pointShadowMatrix.length=V,r.spotShadowMatrix.length=te,xe.directionalLength=b,xe.pointLength=M,xe.spotLength=y,xe.rectAreaLength=x,xe.hemiLength=R,xe.numDirectionalShadows=A,xe.numPointShadows=V,xe.numSpotShadows=te,r.version=UFe++)},setupView:function(d,u){let p=0,f=0,m=0,b=0,M=0,y=u.matrixWorldInverse;for(let x=0,R=d.length;x<R;x++){let A=d[x];if(A.isDirectionalLight){let V=r.directional[p];V.direction.setFromMatrixPosition(A.matrixWorld),o.setFromMatrixPosition(A.target.matrixWorld),V.direction.sub(o),V.direction.transformDirection(y),p++}else if(A.isSpotLight){let V=r.spot[m];V.position.setFromMatrixPosition(A.matrixWorld),V.position.applyMatrix4(y),V.direction.setFromMatrixPosition(A.matrixWorld),o.setFromMatrixPosition(A.target.matrixWorld),V.direction.sub(o),V.direction.transformDirection(y),m++}else if(A.isRectAreaLight){let V=r.rectArea[b];V.position.setFromMatrixPosition(A.matrixWorld),V.position.applyMatrix4(y),a.identity(),s.copy(A.matrixWorld),s.premultiply(y),a.extractRotation(s),V.halfWidth.set(.5*A.width,0,0),V.halfHeight.set(0,.5*A.height,0),V.halfWidth.applyMatrix4(a),V.halfHeight.applyMatrix4(a),b++}else if(A.isPointLight){let V=r.point[f];V.position.setFromMatrixPosition(A.matrixWorld),V.position.applyMatrix4(y),f++}else if(A.isHemisphereLight){let V=r.hemi[M];V.direction.setFromMatrixPosition(A.matrixWorld),V.direction.transformDirection(y),V.direction.normalize(),M++}}},state:r}}function _ee(n,t){let e=new GFe(n,t),i=[],r=[];return{init:function(){i.length=0,r.length=0},state:{lightsArray:i,shadowsArray:r,lights:e},setupLights:function(u){e.setup(i,u)},setupLightsView:function(u){e.setupView(i,u)},pushLight:function(u){i.push(u)},pushShadow:function(u){r.push(u)}}}function WFe(n,t){let e=new WeakMap;return{get:function(o,s=0){let a;return!1===e.has(o)?(a=new _ee(n,t),e.set(o,[a])):s>=e.get(o).length?(a=new _ee(n,t),e.get(o).push(a)):a=e.get(o)[s],a},dispose:function(){e=new WeakMap}}}var DI=class extends Ao{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,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}};DI.prototype.isMeshDepthMaterial=!0;var II=class extends Ao{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new $,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}};II.prototype.isMeshDistanceMaterial=!0;var qFe="void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",YFe="uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}";function ste(n,t,e){let i=new Z0,r=new $e,o=new $e,s=new Zi,a=new DI({depthPacking:bRe}),l=new II,c={},d=e.maxTextureSize,u={0:go,1:yx,2:q0},p=new Gd({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new $e},radius:{value:4}},vertexShader:qFe,fragmentShader:YFe}),f=p.clone();f.defines.HORIZONTAL_PASS=1;let m=new Ui;m.setAttribute("position",new Pr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let b=new ao(m,p),M=this;function y(A,V){let te=t.update(b);p.defines.VSM_SAMPLES!==A.blurSamples&&(p.defines.VSM_SAMPLES=A.blurSamples,f.defines.VSM_SAMPLES=A.blurSamples,p.needsUpdate=!0,f.needsUpdate=!0),p.uniforms.shadow_pass.value=A.map.texture,p.uniforms.resolution.value=A.mapSize,p.uniforms.radius.value=A.radius,n.setRenderTarget(A.mapPass),n.clear(),n.renderBufferDirect(V,null,te,p,b,null),f.uniforms.shadow_pass.value=A.mapPass.texture,f.uniforms.resolution.value=A.mapSize,f.uniforms.radius.value=A.radius,n.setRenderTarget(A.map),n.clear(),n.renderBufferDirect(V,null,te,f,b,null)}function x(A,V,te,K,xe,Xe,De){let D=null,re=!0===K.isPointLight?A.customDistanceMaterial:A.customDepthMaterial;if(D=void 0!==re?re:!0===K.isPointLight?l:a,n.localClippingEnabled&&!0===te.clipShadows&&0!==te.clippingPlanes.length||te.displacementMap&&0!==te.displacementScale||te.alphaMap&&te.alphaTest>0){let ce=D.uuid,fe=te.uuid,be=c[ce];void 0===be&&(be={},c[ce]=be);let ne=be[fe];void 0===ne&&(ne=D.clone(),be[fe]=ne),D=ne}return D.visible=te.visible,D.wireframe=te.wireframe,D.side=De===mx?null!==te.shadowSide?te.shadowSide:te.side:null!==te.shadowSide?te.shadowSide:u[te.side],D.alphaMap=te.alphaMap,D.alphaTest=te.alphaTest,D.clipShadows=te.clipShadows,D.clippingPlanes=te.clippingPlanes,D.clipIntersection=te.clipIntersection,D.displacementMap=te.displacementMap,D.displacementScale=te.displacementScale,D.displacementBias=te.displacementBias,D.wireframeLinewidth=te.wireframeLinewidth,D.linewidth=te.linewidth,!0===K.isPointLight&&!0===D.isMeshDistanceMaterial&&(D.referencePosition.setFromMatrixPosition(K.matrixWorld),D.nearDistance=xe,D.farDistance=Xe),D}function R(A,V,te,K,xe){if(!1===A.visible)return;if(A.layers.test(V.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&xe===mx)&&(!A.frustumCulled||i.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(te.matrixWorldInverse,A.matrixWorld);let D=t.update(A),re=A.material;if(Array.isArray(re)){let ce=D.groups;for(let fe=0,be=ce.length;fe<be;fe++){let ne=ce[fe],de=re[ne.materialIndex];if(de&&de.visible){let pe=x(A,0,de,K,te.near,te.far,xe);n.renderBufferDirect(te,null,D,pe,A,ne)}}}else if(re.visible){let ce=x(A,0,re,K,te.near,te.far,xe);n.renderBufferDirect(te,null,D,ce,A,null)}}let De=A.children;for(let D=0,re=De.length;D<re;D++)R(De[D],V,te,K,xe)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=jee,this.render=function(A,V,te){if(!1===M.enabled||!1===M.autoUpdate&&!1===M.needsUpdate||0===A.length)return;let K=n.getRenderTarget(),xe=n.getActiveCubeFace(),Xe=n.getActiveMipmapLevel(),De=n.state;De.setBlending(pp),De.buffers.color.setClear(1,1,1,1),De.buffers.depth.setTest(!0),De.setScissorTest(!1);for(let D=0,re=A.length;D<re;D++){let ce=A[D],fe=ce.shadow;if(void 0===fe){console.warn("THREE.WebGLShadowMap:",ce,"has no shadow.");continue}if(!1===fe.autoUpdate&&!1===fe.needsUpdate)continue;r.copy(fe.mapSize);let be=fe.getFrameExtents();if(r.multiply(be),o.copy(fe.mapSize),(r.x>d||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/be.x),r.x=o.x*be.x,fe.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/be.y),r.y=o.y*be.y,fe.mapSize.y=o.y)),null===fe.map&&!fe.isPointLightShadow&&this.type===mx){let de={minFilter:$o,magFilter:$o,format:gs};fe.map=new Js(r.x,r.y,de),fe.map.texture.name=ce.name+".shadowMap",fe.mapPass=new Js(r.x,r.y,de),fe.camera.updateProjectionMatrix()}null===fe.map&&(fe.map=new Js(r.x,r.y,{minFilter:_o,magFilter:_o,format:gs}),fe.map.texture.name=ce.name+".shadowMap",fe.camera.updateProjectionMatrix()),n.setRenderTarget(fe.map),n.clear();let ne=fe.getViewportCount();for(let de=0;de<ne;de++){let pe=fe.getViewport(de);s.set(o.x*pe.x,o.y*pe.y,o.x*pe.z,o.y*pe.w),De.viewport(s),fe.updateMatrices(ce,de),i=fe.getFrustum(),R(V,te,fe.camera,ce,this.type)}!fe.isPointLightShadow&&this.type===mx&&y(fe,te),fe.needsUpdate=!1}M.needsUpdate=!1,n.setRenderTarget(K,xe,Xe)}}function XFe(n,t,e){let i=e.isWebGL2,a=new function(){let ae=!1,Jt=new Zi,jt=null,Tn=new Zi(0,0,0,0);return{setMask:function(We){jt!==We&&!ae&&(n.colorMask(We,We,We,We),jt=We)},setLocked:function(We){ae=We},setClear:function(We,bn,ui,ur,zo){!0===zo&&(We*=ur,bn*=ur,ui*=ur),Jt.set(We,bn,ui,ur),!1===Tn.equals(Jt)&&(n.clearColor(We,bn,ui,ur),Tn.copy(Jt))},reset:function(){ae=!1,jt=null,Tn.set(-1,0,0,0)}}},l=new function(){let ae=!1,Jt=null,jt=null,Tn=null;return{setTest:function(We){We?Oe(2929):An(2929)},setMask:function(We){Jt!==We&&!ae&&(n.depthMask(We),Jt=We)},setFunc:function(We){if(jt!==We){if(We)switch(We){case BAe:n.depthFunc(512);break;case VAe:n.depthFunc(519);break;case HAe:n.depthFunc(513);break;case Z3:n.depthFunc(515);break;case zAe:n.depthFunc(514);break;case UAe:n.depthFunc(518);break;case jAe:n.depthFunc(516);break;case GAe:n.depthFunc(517);break;default:n.depthFunc(515)}else n.depthFunc(515);jt=We}},setLocked:function(We){ae=We},setClear:function(We){Tn!==We&&(n.clearDepth(We),Tn=We)},reset:function(){ae=!1,Jt=null,jt=null,Tn=null}}},c=new function(){let ae=!1,Jt=null,jt=null,Tn=null,We=null,bn=null,ui=null,ur=null,zo=null;return{setTest:function(Cr){ae||(Cr?Oe(2960):An(2960))},setMask:function(Cr){Jt!==Cr&&!ae&&(n.stencilMask(Cr),Jt=Cr)},setFunc:function(Cr,Ma,vs){(jt!==Cr||Tn!==Ma||We!==vs)&&(n.stencilFunc(Cr,Ma,vs),jt=Cr,Tn=Ma,We=vs)},setOp:function(Cr,Ma,vs){(bn!==Cr||ui!==Ma||ur!==vs)&&(n.stencilOp(Cr,Ma,vs),bn=Cr,ui=Ma,ur=vs)},setLocked:function(Cr){ae=Cr},setClear:function(Cr){zo!==Cr&&(n.clearStencil(Cr),zo=Cr)},reset:function(){ae=!1,Jt=null,jt=null,Tn=null,We=null,bn=null,ui=null,ur=null,zo=null}}},d={},u={},p=new WeakMap,f=[],m=null,b=!1,M=null,y=null,x=null,R=null,A=null,V=null,te=null,K=!1,xe=null,Xe=null,De=null,D=null,re=null,ce=n.getParameter(35661),fe=!1,be=0,ne=n.getParameter(7938);-1!==ne.indexOf("WebGL")?(be=parseFloat(/^WebGL (\d)/.exec(ne)[1]),fe=be>=1):-1!==ne.indexOf("OpenGL ES")&&(be=parseFloat(/^OpenGL ES (\d)/.exec(ne)[1]),fe=be>=2);let de=null,pe={},je=n.getParameter(3088),Ce=n.getParameter(2978),Ne=(new Zi).fromArray(je),lt=(new Zi).fromArray(Ce);function Mt(ae,Jt,jt){let Tn=new Uint8Array(4),We=n.createTexture();n.bindTexture(ae,We),n.texParameteri(ae,10241,9728),n.texParameteri(ae,10240,9728);for(let bn=0;bn<jt;bn++)n.texImage2D(Jt+bn,0,6408,1,1,0,6408,5121,Tn);return We}let pt={};function Oe(ae){!0!==d[ae]&&(n.enable(ae),d[ae]=!0)}function An(ae){!1!==d[ae]&&(n.disable(ae),d[ae]=!1)}pt[3553]=Mt(3553,3553,1),pt[34067]=Mt(34067,34069,6),a.setClear(0,0,0,1),l.setClear(1),c.setClear(0),Oe(2929),l.setFunc(Z3),Ye(!1),_t(a$),Oe(2884),oe(pp);let mt={[B0]:32774,[TAe]:32778,[DAe]:32779};if(i)mt[u$]=32775,mt[p$]=32776;else{let ae=t.get("EXT_blend_minmax");null!==ae&&(mt[u$]=ae.MIN_EXT,mt[p$]=ae.MAX_EXT)}let ft={[IAe]:0,[AAe]:1,[RAe]:768,[Wee]:770,[LAe]:776,[FAe]:774,[OAe]:772,[PAe]:769,[qee]:771,[NAe]:775,[kAe]:773};function oe(ae,Jt,jt,Tn,We,bn,ui,ur){if(ae!==pp){if(!1===b&&(Oe(3042),b=!0),ae===EAe)We=We||Jt,bn=bn||jt,ui=ui||Tn,(Jt!==y||We!==A)&&(n.blendEquationSeparate(mt[Jt],mt[We]),y=Jt,A=We),(jt!==x||Tn!==R||bn!==V||ui!==te)&&(n.blendFuncSeparate(ft[jt],ft[Tn],ft[bn],ft[ui]),x=jt,R=Tn,V=bn,te=ui),M=ae,K=null;else if(ae!==M||ur!==K){if((y!==B0||A!==B0)&&(n.blendEquation(32774),y=B0,A=B0),ur)switch(ae){case gx:n.blendFuncSeparate(1,771,1,771);break;case l$:n.blendFunc(1,1);break;case c$:n.blendFuncSeparate(0,769,0,1);break;case d$:n.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",ae)}else switch(ae){case gx:n.blendFuncSeparate(770,771,1,771);break;case l$:n.blendFunc(770,1);break;case c$:n.blendFuncSeparate(0,769,0,1);break;case d$:n.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",ae)}x=null,R=null,V=null,te=null,M=ae,K=ur}}else!0===b&&(An(3042),b=!1)}function Ye(ae){xe!==ae&&(n.frontFace(ae?2304:2305),xe=ae)}function _t(ae){ae!==MAe?(Oe(2884),ae!==Xe&&n.cullFace(ae===a$?1029:ae===wAe?1028:1032)):An(2884),Xe=ae}function sn(ae,Jt,jt){ae?(Oe(32823),(D!==Jt||re!==jt)&&(n.polygonOffset(Jt,jt),D=Jt,re=jt)):An(32823)}function ti(ae){void 0===ae&&(ae=33984+ce-1),de!==ae&&(n.activeTexture(ae),de=ae)}return{buffers:{color:a,depth:l,stencil:c},enable:Oe,disable:An,bindFramebuffer:function(ae,Jt){return u[ae]!==Jt&&(n.bindFramebuffer(ae,Jt),u[ae]=Jt,i&&(36009===ae&&(u[36160]=Jt),36160===ae&&(u[36009]=Jt)),!0)},drawBuffers:function(ae,Jt){let jt=f,Tn=!1;if(ae)if(jt=p.get(Jt),void 0===jt&&(jt=[],p.set(Jt,jt)),ae.isWebGLMultipleRenderTargets){let We=ae.texture;if(jt.length!==We.length||36064!==jt[0]){for(let bn=0,ui=We.length;bn<ui;bn++)jt[bn]=36064+bn;jt.length=We.length,Tn=!0}}else 36064!==jt[0]&&(jt[0]=36064,Tn=!0);else 1029!==jt[0]&&(jt[0]=1029,Tn=!0);Tn&&(e.isWebGL2?n.drawBuffers(jt):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(jt))},useProgram:function(ae){return m!==ae&&(n.useProgram(ae),m=ae,!0)},setBlending:oe,setMaterial:function(ae,Jt){ae.side===q0?An(2884):Oe(2884);let jt=ae.side===go;Jt&&(jt=!jt),Ye(jt),ae.blending===gx&&!1===ae.transparent?oe(pp):oe(ae.blending,ae.blendEquation,ae.blendSrc,ae.blendDst,ae.blendEquationAlpha,ae.blendSrcAlpha,ae.blendDstAlpha,ae.premultipliedAlpha),l.setFunc(ae.depthFunc),l.setTest(ae.depthTest),l.setMask(ae.depthWrite),a.setMask(ae.colorWrite);let Tn=ae.stencilWrite;c.setTest(Tn),Tn&&(c.setMask(ae.stencilWriteMask),c.setFunc(ae.stencilFunc,ae.stencilRef,ae.stencilFuncMask),c.setOp(ae.stencilFail,ae.stencilZFail,ae.stencilZPass)),sn(ae.polygonOffset,ae.polygonOffsetFactor,ae.polygonOffsetUnits),!0===ae.alphaToCoverage?Oe(32926):An(32926)},setFlipSided:Ye,setCullFace:_t,setLineWidth:function(ae){ae!==De&&(fe&&n.lineWidth(ae),De=ae)},setPolygonOffset:sn,setScissorTest:function(ae){ae?Oe(3089):An(3089)},activeTexture:ti,bindTexture:function(ae,Jt){null===de&&ti();let jt=pe[de];void 0===jt&&(jt={type:void 0,texture:void 0},pe[de]=jt),(jt.type!==ae||jt.texture!==Jt)&&(n.bindTexture(ae,Jt||pt[ae]),jt.type=ae,jt.texture=Jt)},unbindTexture:function(){let ae=pe[de];void 0!==ae&&void 0!==ae.type&&(n.bindTexture(ae.type,null),ae.type=void 0,ae.texture=void 0)},compressedTexImage2D:function(){try{n.compressedTexImage2D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texImage2D:function(){try{n.texImage2D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texImage3D:function(){try{n.texImage3D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texStorage2D:function(){try{n.texStorage2D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texStorage3D:function(){try{n.texStorage3D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texSubImage2D:function(){try{n.texSubImage2D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},texSubImage3D:function(){try{n.texSubImage3D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},compressedTexSubImage2D:function(){try{n.compressedTexSubImage2D.apply(n,arguments)}catch(ae){console.error("THREE.WebGLState:",ae)}},scissor:function(ae){!1===Ne.equals(ae)&&(n.scissor(ae.x,ae.y,ae.z,ae.w),Ne.copy(ae))},viewport:function(ae){!1===lt.equals(ae)&&(n.viewport(ae.x,ae.y,ae.z,ae.w),lt.copy(ae))},reset:function(){n.disable(3042),n.disable(2884),n.disable(2929),n.disable(32823),n.disable(3089),n.disable(2960),n.disable(32926),n.blendEquation(32774),n.blendFunc(1,0),n.blendFuncSeparate(1,0,1,0),n.colorMask(!0,!0,!0,!0),n.clearColor(0,0,0,0),n.depthMask(!0),n.depthFunc(513),n.clearDepth(1),n.stencilMask(4294967295),n.stencilFunc(519,0,4294967295),n.stencilOp(7680,7680,7680),n.clearStencil(0),n.cullFace(1029),n.frontFace(2305),n.polygonOffset(0,0),n.activeTexture(33984),n.bindFramebuffer(36160,null),!0===i&&(n.bindFramebuffer(36009,null),n.bindFramebuffer(36008,null)),n.useProgram(null),n.lineWidth(1),n.scissor(0,0,n.canvas.width,n.canvas.height),n.viewport(0,0,n.canvas.width,n.canvas.height),d={},de=null,pe={},u={},p=new WeakMap,f=[],m=null,b=!1,M=null,y=null,x=null,R=null,A=null,V=null,te=null,K=!1,xe=null,Xe=null,De=null,D=null,re=null,Ne.set(0,0,n.canvas.width,n.canvas.height),lt.set(0,0,n.canvas.width,n.canvas.height),a.reset(),l.reset(),c.reset()}}}function QFe(n,t,e,i,r,o,s){let b,a=r.isWebGL2,l=r.maxTextures,c=r.maxCubemapSize,d=r.maxTextureSize,u=r.maxSamples,f=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):void 0,m=new WeakMap,M=!1;try{M=typeof OffscreenCanvas<"u"&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch{}function y(Z,L){return M?new OffscreenCanvas(Z,L):Mx("canvas")}function x(Z,L,Ve,vt){let en=1;if((Z.width>vt||Z.height>vt)&&(en=vt/Math.max(Z.width,Z.height)),en<1||!0===L){if(typeof HTMLImageElement<"u"&&Z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&Z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&Z instanceof ImageBitmap){let Le=L?CRe:Math.floor,mn=Le(en*Z.width),ln=Le(en*Z.height);void 0===b&&(b=y(mn,ln));let Ft=Ve?y(mn,ln):b;return Ft.width=mn,Ft.height=ln,Ft.getContext("2d").drawImage(Z,0,0,mn,ln),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+Z.width+"x"+Z.height+") to ("+mn+"x"+ln+")."),Ft}return"data"in Z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+Z.width+"x"+Z.height+")."),Z}return Z}function R(Z){return L$(Z.width)&&L$(Z.height)}function V(Z,L){return Z.generateMipmaps&&L&&Z.minFilter!==_o&&Z.minFilter!==$o}function te(Z){n.generateMipmap(Z)}function K(Z,L,Ve,vt,en=!1){if(!1===a)return L;if(null!==Z){if(void 0!==n[Z])return n[Z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+Z+"'")}let Le=L;return 6403===L&&(5126===Ve&&(Le=33326),5131===Ve&&(Le=33325),5121===Ve&&(Le=33321)),33319===L&&(5126===Ve&&(Le=33328),5131===Ve&&(Le=33327),5121===Ve&&(Le=33323)),6408===L&&(5126===Ve&&(Le=34836),5131===Ve&&(Le=34842),5121===Ve&&(Le=vt===Ar&&!1===en?35907:32856),32819===Ve&&(Le=32854),32820===Ve&&(Le=32855)),(33325===Le||33326===Le||33327===Le||33328===Le||34842===Le||34836===Le)&&t.get("EXT_color_buffer_float"),Le}function xe(Z,L,Ve){return!0===V(Z,Ve)||Z.isFramebufferTexture&&Z.minFilter!==_o&&Z.minFilter!==$o?Math.log2(Math.max(L.width,L.height))+1:void 0!==Z.mipmaps&&Z.mipmaps.length>0?Z.mipmaps.length:Z.isCompressedTexture&&Array.isArray(Z.image)?L.mipmaps.length:1}function Xe(Z){return Z===_o||Z===f$||Z===m$?9728:9729}function De(Z){let L=Z.target;L.removeEventListener("dispose",De),function(Z){let L=i.get(Z);void 0!==L.__webglInit&&(n.deleteTexture(L.__webglTexture),i.remove(Z))}(L),L.isVideoTexture&&m.delete(L),s.memory.textures--}function D(Z){let L=Z.target;L.removeEventListener("dispose",D),function(Z){let L=Z.texture,Ve=i.get(Z),vt=i.get(L);if(Z){if(void 0!==vt.__webglTexture&&(n.deleteTexture(vt.__webglTexture),s.memory.textures--),Z.depthTexture&&Z.depthTexture.dispose(),Z.isWebGLCubeRenderTarget)for(let en=0;en<6;en++)n.deleteFramebuffer(Ve.__webglFramebuffer[en]),Ve.__webglDepthbuffer&&n.deleteRenderbuffer(Ve.__webglDepthbuffer[en]);else n.deleteFramebuffer(Ve.__webglFramebuffer),Ve.__webglDepthbuffer&&n.deleteRenderbuffer(Ve.__webglDepthbuffer),Ve.__webglMultisampledFramebuffer&&n.deleteFramebuffer(Ve.__webglMultisampledFramebuffer),Ve.__webglColorRenderbuffer&&n.deleteRenderbuffer(Ve.__webglColorRenderbuffer),Ve.__webglDepthRenderbuffer&&n.deleteRenderbuffer(Ve.__webglDepthRenderbuffer);if(Z.isWebGLMultipleRenderTargets)for(let en=0,Le=L.length;en<Le;en++){let mn=i.get(L[en]);mn.__webglTexture&&(n.deleteTexture(mn.__webglTexture),s.memory.textures--),i.remove(L[en])}i.remove(L),i.remove(Z)}}(L)}let fe=0;function de(Z,L){let Ve=i.get(Z);if(Z.isVideoTexture&&function(Z){let L=s.render.frame;m.get(Z)!==L&&(m.set(Z,L),Z.update())}(Z),Z.version>0&&Ve.__version!==Z.version){let vt=Z.image;if(void 0===vt)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else{if(!1!==vt.complete)return void Oe(Ve,Z,L);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}e.activeTexture(33984+L),e.bindTexture(3553,Ve.__webglTexture)}function Ce(Z,L){let Ve=i.get(Z);Z.version>0&&Ve.__version!==Z.version?function(Z,L,Ve){if(6!==L.image.length)return;pt(Z,L),e.activeTexture(33984+Ve),e.bindTexture(34067,Z.__webglTexture),n.pixelStorei(37440,L.flipY),n.pixelStorei(37441,L.premultiplyAlpha),n.pixelStorei(3317,L.unpackAlignment),n.pixelStorei(37443,0);let vt=L&&(L.isCompressedTexture||L.image[0].isCompressedTexture),en=L.image[0]&&L.image[0].isDataTexture,Le=[];for(let We=0;We<6;We++)Le[We]=vt||en?en?L.image[We].image:L.image[We]:x(L.image[We],!1,!0,c),Le[We]=sn(L,Le[We]);let Tn,mn=Le[0],ln=R(mn)||a,Ft=o.convert(L.format,L.encoding),Pt=o.convert(L.type),Ln=K(L.internalFormat,Ft,Pt,L.encoding),ae=a&&!0!==L.isVideoTexture,Jt=void 0===Z.__version,jt=xe(L,mn,ln);if(Mt(34067,L,ln),vt){ae&&Jt&&e.texStorage2D(34067,jt,Ln,mn.width,mn.height);for(let We=0;We<6;We++){Tn=Le[We].mipmaps;for(let bn=0;bn<Tn.length;bn++){let ui=Tn[bn];L.format!==gs?null!==Ft?ae?e.compressedTexSubImage2D(34069+We,bn,0,0,ui.width,ui.height,Ft,ui.data):e.compressedTexImage2D(34069+We,bn,Ln,ui.width,ui.height,0,ui.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):ae?e.texSubImage2D(34069+We,bn,0,0,ui.width,ui.height,Ft,Pt,ui.data):e.texImage2D(34069+We,bn,Ln,ui.width,ui.height,0,Ft,Pt,ui.data)}}}else{Tn=L.mipmaps,ae&&Jt&&(Tn.length>0&&jt++,e.texStorage2D(34067,jt,Ln,Le[0].width,Le[0].height));for(let We=0;We<6;We++)if(en){ae?e.texSubImage2D(34069+We,0,0,0,Le[We].width,Le[We].height,Ft,Pt,Le[We].data):e.texImage2D(34069+We,0,Ln,Le[We].width,Le[We].height,0,Ft,Pt,Le[We].data);for(let bn=0;bn<Tn.length;bn++){let ur=Tn[bn].image[We].image;ae?e.texSubImage2D(34069+We,bn+1,0,0,ur.width,ur.height,Ft,Pt,ur.data):e.texImage2D(34069+We,bn+1,Ln,ur.width,ur.height,0,Ft,Pt,ur.data)}}else{ae?e.texSubImage2D(34069+We,0,0,0,Ft,Pt,Le[We]):e.texImage2D(34069+We,0,Ln,Ft,Pt,Le[We]);for(let bn=0;bn<Tn.length;bn++){let ui=Tn[bn];ae?e.texSubImage2D(34069+We,bn+1,0,0,Ft,Pt,ui.image[We]):e.texImage2D(34069+We,bn+1,Ln,Ft,Pt,ui.image[We])}}}V(L,ln)&&te(34067),Z.__version=L.version,L.onUpdate&&L.onUpdate(L)}(Ve,Z,L):(e.activeTexture(33984+L),e.bindTexture(34067,Ve.__webglTexture))}let Ne={[$3]:10497,[ya]:33071,[eB]:33648},lt={[_o]:9728,[f$]:9984,[m$]:9986,[$o]:9729,[JAe]:9985,[QI]:9987};function Mt(Z,L,Ve){if(Ve?(n.texParameteri(Z,10242,Ne[L.wrapS]),n.texParameteri(Z,10243,Ne[L.wrapT]),(32879===Z||35866===Z)&&n.texParameteri(Z,32882,Ne[L.wrapR]),n.texParameteri(Z,10240,lt[L.magFilter]),n.texParameteri(Z,10241,lt[L.minFilter])):(n.texParameteri(Z,10242,33071),n.texParameteri(Z,10243,33071),(32879===Z||35866===Z)&&n.texParameteri(Z,32882,33071),(L.wrapS!==ya||L.wrapT!==ya)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),n.texParameteri(Z,10240,Xe(L.magFilter)),n.texParameteri(Z,10241,Xe(L.minFilter)),L.minFilter!==_o&&L.minFilter!==$o&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){let vt=t.get("EXT_texture_filter_anisotropic");if(L.type===cm&&!1===t.has("OES_texture_float_linear")||!1===a&&L.type===U0&&!1===t.has("OES_texture_half_float_linear"))return;(L.anisotropy>1||i.get(L).__currentAnisotropy)&&(n.texParameterf(Z,vt.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(L.anisotropy,r.getMaxAnisotropy())),i.get(L).__currentAnisotropy=L.anisotropy)}}function pt(Z,L){void 0===Z.__webglInit&&(Z.__webglInit=!0,L.addEventListener("dispose",De),Z.__webglTexture=n.createTexture(),s.memory.textures++)}function Oe(Z,L,Ve){let vt=3553;L.isDataTexture2DArray&&(vt=35866),L.isDataTexture3D&&(vt=32879),pt(Z,L),e.activeTexture(33984+Ve),e.bindTexture(vt,Z.__webglTexture),n.pixelStorei(37440,L.flipY),n.pixelStorei(37441,L.premultiplyAlpha),n.pixelStorei(3317,L.unpackAlignment),n.pixelStorei(37443,0);let en=function(Z){return!a&&(Z.wrapS!==ya||Z.wrapT!==ya||Z.minFilter!==_o&&Z.minFilter!==$o)}(L)&&!1===R(L.image),Le=x(L.image,en,!1,d);Le=sn(L,Le);let mn=R(Le)||a,ln=o.convert(L.format,L.encoding),Ft=o.convert(L.type),Pt=K(L.internalFormat,ln,Ft,L.encoding,L.isVideoTexture);Mt(vt,L,mn);let Ln,ae=L.mipmaps,Jt=a&&!0!==L.isVideoTexture,jt=void 0===Z.__version,Tn=xe(L,Le,mn);if(L.isDepthTexture)Pt=6402,a?Pt=L.type===cm?36012:L.type===_I?33190:L.type===j0?35056:33189:L.type===cm&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),L.format===um&&6402===Pt&&L.type!==xx&&L.type!==_I&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),L.type=xx,Ft=o.convert(L.type)),L.format===Y0&&6402===Pt&&(Pt=34041,L.type!==j0&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),L.type=j0,Ft=o.convert(L.type))),Jt&&jt?e.texStorage2D(3553,1,Pt,Le.width,Le.height):e.texImage2D(3553,0,Pt,Le.width,Le.height,0,ln,Ft,null);else if(L.isDataTexture)if(ae.length>0&&mn){Jt&&jt&&e.texStorage2D(3553,Tn,Pt,ae[0].width,ae[0].height);for(let We=0,bn=ae.length;We<bn;We++)Ln=ae[We],Jt?e.texSubImage2D(3553,0,0,0,Ln.width,Ln.height,ln,Ft,Ln.data):e.texImage2D(3553,We,Pt,Ln.width,Ln.height,0,ln,Ft,Ln.data);L.generateMipmaps=!1}else Jt?(jt&&e.texStorage2D(3553,Tn,Pt,Le.width,Le.height),e.texSubImage2D(3553,0,0,0,Le.width,Le.height,ln,Ft,Le.data)):e.texImage2D(3553,0,Pt,Le.width,Le.height,0,ln,Ft,Le.data);else if(L.isCompressedTexture){Jt&&jt&&e.texStorage2D(3553,Tn,Pt,ae[0].width,ae[0].height);for(let We=0,bn=ae.length;We<bn;We++)Ln=ae[We],L.format!==gs?null!==ln?Jt?e.compressedTexSubImage2D(3553,We,0,0,Ln.width,Ln.height,ln,Ln.data):e.compressedTexImage2D(3553,We,Pt,Ln.width,Ln.height,0,Ln.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):Jt?e.texSubImage2D(3553,We,0,0,Ln.width,Ln.height,ln,Ft,Ln.data):e.texImage2D(3553,We,Pt,Ln.width,Ln.height,0,ln,Ft,Ln.data)}else if(L.isDataTexture2DArray)Jt?(jt&&e.texStorage3D(35866,Tn,Pt,Le.width,Le.height,Le.depth),e.texSubImage3D(35866,0,0,0,0,Le.width,Le.height,Le.depth,ln,Ft,Le.data)):e.texImage3D(35866,0,Pt,Le.width,Le.height,Le.depth,0,ln,Ft,Le.data);else if(L.isDataTexture3D)Jt?(jt&&e.texStorage3D(32879,Tn,Pt,Le.width,Le.height,Le.depth),e.texSubImage3D(32879,0,0,0,0,Le.width,Le.height,Le.depth,ln,Ft,Le.data)):e.texImage3D(32879,0,Pt,Le.width,Le.height,Le.depth,0,ln,Ft,Le.data);else if(L.isFramebufferTexture)Jt&&jt?e.texStorage2D(3553,Tn,Pt,Le.width,Le.height):e.texImage2D(3553,0,Pt,Le.width,Le.height,0,ln,Ft,null);else if(ae.length>0&&mn){Jt&&jt&&e.texStorage2D(3553,Tn,Pt,ae[0].width,ae[0].height);for(let We=0,bn=ae.length;We<bn;We++)Ln=ae[We],Jt?e.texSubImage2D(3553,We,0,0,ln,Ft,Ln):e.texImage2D(3553,We,Pt,ln,Ft,Ln);L.generateMipmaps=!1}else Jt?(jt&&e.texStorage2D(3553,Tn,Pt,Le.width,Le.height),e.texSubImage2D(3553,0,0,0,ln,Ft,Le)):e.texImage2D(3553,0,Pt,ln,Ft,Le);V(L,mn)&&te(vt),Z.__version=L.version,L.onUpdate&&L.onUpdate(L)}function wt(Z,L,Ve,vt,en){let Le=o.convert(Ve.format,Ve.encoding),mn=o.convert(Ve.type),ln=K(Ve.internalFormat,Le,mn,Ve.encoding);i.get(L).__hasExternalTextures||(32879===en||35866===en?e.texImage3D(en,0,ln,L.width,L.height,L.depth,0,Le,mn,null):e.texImage2D(en,0,ln,L.width,L.height,0,Le,mn,null)),e.bindFramebuffer(36160,Z),L.useRenderToTexture?f.framebufferTexture2DMultisampleEXT(36160,vt,en,i.get(Ve).__webglTexture,0,_t(L)):n.framebufferTexture2D(36160,vt,en,i.get(Ve).__webglTexture,0),e.bindFramebuffer(36160,null)}function on(Z,L,Ve){if(n.bindRenderbuffer(36161,Z),L.depthBuffer&&!L.stencilBuffer){let vt=33189;if(Ve||L.useRenderToTexture){let en=L.depthTexture;en&&en.isDepthTexture&&(en.type===cm?vt=36012:en.type===_I&&(vt=33190));let Le=_t(L);L.useRenderToTexture?f.renderbufferStorageMultisampleEXT(36161,Le,vt,L.width,L.height):n.renderbufferStorageMultisample(36161,Le,vt,L.width,L.height)}else n.renderbufferStorage(36161,vt,L.width,L.height);n.framebufferRenderbuffer(36160,36096,36161,Z)}else if(L.depthBuffer&&L.stencilBuffer){let vt=_t(L);Ve&&L.useRenderbuffer?n.renderbufferStorageMultisample(36161,vt,35056,L.width,L.height):L.useRenderToTexture?f.renderbufferStorageMultisampleEXT(36161,vt,35056,L.width,L.height):n.renderbufferStorage(36161,34041,L.width,L.height),n.framebufferRenderbuffer(36160,33306,36161,Z)}else{let vt=!0===L.isWebGLMultipleRenderTargets?L.texture[0]:L.texture,en=o.convert(vt.format,vt.encoding),Le=o.convert(vt.type),mn=K(vt.internalFormat,en,Le,vt.encoding),ln=_t(L);Ve&&L.useRenderbuffer?n.renderbufferStorageMultisample(36161,ln,mn,L.width,L.height):L.useRenderToTexture?f.renderbufferStorageMultisampleEXT(36161,ln,mn,L.width,L.height):n.renderbufferStorage(36161,mn,L.width,L.height)}n.bindRenderbuffer(36161,null)}function mt(Z){let L=i.get(Z),Ve=!0===Z.isWebGLCubeRenderTarget;if(Z.depthTexture&&!L.__autoAllocateDepthBuffer){if(Ve)throw new Error("target.depthTexture not supported in Cube render targets");!function(Z,L){if(L&&L.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(e.bindFramebuffer(36160,Z),!L.depthTexture||!L.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!i.get(L.depthTexture).__webglTexture||L.depthTexture.image.width!==L.width||L.depthTexture.image.height!==L.height)&&(L.depthTexture.image.width=L.width,L.depthTexture.image.height=L.height,L.depthTexture.needsUpdate=!0),de(L.depthTexture,0);let vt=i.get(L.depthTexture).__webglTexture,en=_t(L);if(L.depthTexture.format===um)L.useRenderToTexture?f.framebufferTexture2DMultisampleEXT(36160,36096,3553,vt,0,en):n.framebufferTexture2D(36160,36096,3553,vt,0);else{if(L.depthTexture.format!==Y0)throw new Error("Unknown depthTexture format");L.useRenderToTexture?f.framebufferTexture2DMultisampleEXT(36160,33306,3553,vt,0,en):n.framebufferTexture2D(36160,33306,3553,vt,0)}}(L.__webglFramebuffer,Z)}else if(Ve){L.__webglDepthbuffer=[];for(let vt=0;vt<6;vt++)e.bindFramebuffer(36160,L.__webglFramebuffer[vt]),L.__webglDepthbuffer[vt]=n.createRenderbuffer(),on(L.__webglDepthbuffer[vt],Z,!1)}else e.bindFramebuffer(36160,L.__webglFramebuffer),L.__webglDepthbuffer=n.createRenderbuffer(),on(L.__webglDepthbuffer,Z,!1);e.bindFramebuffer(36160,null)}function _t(Z){return a&&(Z.useRenderbuffer||Z.useRenderToTexture)?Math.min(u,Z.samples):0}function sn(Z,L){let Ve=Z.encoding,vt=Z.format,en=Z.type;return!0===Z.isCompressedTexture||!0===Z.isVideoTexture||Z.format===tB||Ve!==_p&&(Ve===Ar?!1===a?!0===t.has("EXT_sRGB")&&vt===gs?(Z.format=tB,Z.minFilter=$o,Z.generateMipmaps=!1):L=jd.sRGBToLinear(L):(vt!==gs||en!==mp)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",Ve)),L}let Cn=!1,ti=!1;this.allocateTextureUnit=function(){let Z=fe;return Z>=l&&console.warn("THREE.WebGLTextures: Trying to use "+Z+" texture units while this GPU supports only "+l),fe+=1,Z},this.resetTextureUnits=function(){fe=0},this.setTexture2D=de,this.setTexture2DArray=function(Z,L){let Ve=i.get(Z);Z.version>0&&Ve.__version!==Z.version?Oe(Ve,Z,L):(e.activeTexture(33984+L),e.bindTexture(35866,Ve.__webglTexture))},this.setTexture3D=function(Z,L){let Ve=i.get(Z);Z.version>0&&Ve.__version!==Z.version?Oe(Ve,Z,L):(e.activeTexture(33984+L),e.bindTexture(32879,Ve.__webglTexture))},this.setTextureCube=Ce,this.rebindTextures=function(Z,L,Ve){let vt=i.get(Z);void 0!==L&&wt(vt.__webglFramebuffer,Z,Z.texture,36064,3553),void 0!==Ve&&mt(Z)},this.setupRenderTarget=function(Z){let L=Z.texture,Ve=i.get(Z),vt=i.get(L);Z.addEventListener("dispose",D),!0!==Z.isWebGLMultipleRenderTargets&&(void 0===vt.__webglTexture&&(vt.__webglTexture=n.createTexture()),vt.__version=L.version,s.memory.textures++);let en=!0===Z.isWebGLCubeRenderTarget,Le=!0===Z.isWebGLMultipleRenderTargets,mn=L.isDataTexture3D||L.isDataTexture2DArray,ln=R(Z)||a;if(en){Ve.__webglFramebuffer=[];for(let Ft=0;Ft<6;Ft++)Ve.__webglFramebuffer[Ft]=n.createFramebuffer()}else if(Ve.__webglFramebuffer=n.createFramebuffer(),Le)if(r.drawBuffers){let Ft=Z.texture;for(let Pt=0,Ln=Ft.length;Pt<Ln;Pt++){let ae=i.get(Ft[Pt]);void 0===ae.__webglTexture&&(ae.__webglTexture=n.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(Z.useRenderbuffer)if(a){Ve.__webglMultisampledFramebuffer=n.createFramebuffer(),Ve.__webglColorRenderbuffer=n.createRenderbuffer(),n.bindRenderbuffer(36161,Ve.__webglColorRenderbuffer);let Ft=o.convert(L.format,L.encoding),Pt=o.convert(L.type),Ln=K(L.internalFormat,Ft,Pt,L.encoding),ae=_t(Z);n.renderbufferStorageMultisample(36161,ae,Ln,Z.width,Z.height),e.bindFramebuffer(36160,Ve.__webglMultisampledFramebuffer),n.framebufferRenderbuffer(36160,36064,36161,Ve.__webglColorRenderbuffer),n.bindRenderbuffer(36161,null),Z.depthBuffer&&(Ve.__webglDepthRenderbuffer=n.createRenderbuffer(),on(Ve.__webglDepthRenderbuffer,Z,!0)),e.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(en){e.bindTexture(34067,vt.__webglTexture),Mt(34067,L,ln);for(let Ft=0;Ft<6;Ft++)wt(Ve.__webglFramebuffer[Ft],Z,L,36064,34069+Ft);V(L,ln)&&te(34067),e.unbindTexture()}else if(Le){let Ft=Z.texture;for(let Pt=0,Ln=Ft.length;Pt<Ln;Pt++){let ae=Ft[Pt],Jt=i.get(ae);e.bindTexture(3553,Jt.__webglTexture),Mt(3553,ae,ln),wt(Ve.__webglFramebuffer,Z,ae,36064+Pt,3553),V(ae,ln)&&te(3553)}e.unbindTexture()}else{let Ft=3553;mn&&(a?Ft=L.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),e.bindTexture(Ft,vt.__webglTexture),Mt(Ft,L,ln),wt(Ve.__webglFramebuffer,Z,L,36064,Ft),V(L,ln)&&te(Ft),e.unbindTexture()}Z.depthBuffer&&mt(Z)},this.updateRenderTargetMipmap=function(Z){let L=R(Z)||a,Ve=!0===Z.isWebGLMultipleRenderTargets?Z.texture:[Z.texture];for(let vt=0,en=Ve.length;vt<en;vt++){let Le=Ve[vt];if(V(Le,L)){let mn=Z.isWebGLCubeRenderTarget?34067:3553,ln=i.get(Le).__webglTexture;e.bindTexture(mn,ln),te(mn),e.unbindTexture()}}},this.updateMultisampleRenderTarget=function(Z){if(Z.useRenderbuffer)if(a){let L=Z.width,Ve=Z.height,vt=16384,en=[36064],Le=Z.stencilBuffer?33306:36096;Z.depthBuffer&&en.push(Le),Z.ignoreDepthForMultisampleCopy||(Z.depthBuffer&&(vt|=256),Z.stencilBuffer&&(vt|=1024));let mn=i.get(Z);e.bindFramebuffer(36008,mn.__webglMultisampledFramebuffer),e.bindFramebuffer(36009,mn.__webglFramebuffer),Z.ignoreDepthForMultisampleCopy&&(n.invalidateFramebuffer(36008,[Le]),n.invalidateFramebuffer(36009,[Le])),n.blitFramebuffer(0,0,L,Ve,0,0,L,Ve,vt,9728),n.invalidateFramebuffer(36008,en),e.bindFramebuffer(36008,null),e.bindFramebuffer(36009,mn.__webglMultisampledFramebuffer)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.")},this.setupDepthRenderbuffer=mt,this.setupFrameBufferTexture=wt,this.safeSetTexture2D=function(Z,L){Z&&Z.isWebGLRenderTarget&&(!1===Cn&&(console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."),Cn=!0),Z=Z.texture),de(Z,L)},this.safeSetTextureCube=function(Z,L){Z&&Z.isWebGLCubeRenderTarget&&(!1===ti&&(console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."),ti=!0),Z=Z.texture),Ce(Z,L)}}function ZFe(n,t,e){let i=e.isWebGL2;return{convert:function(o,s=null){let a;if(o===mp)return 5121;if(o===nRe)return 32819;if(o===iRe)return 32820;if(o===$Ae)return 5120;if(o===eRe)return 5122;if(o===xx)return 5123;if(o===tRe)return 5124;if(o===_I)return 5125;if(o===cm)return 5126;if(o===U0)return i?5131:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(o===rRe)return 6406;if(o===gs)return 6408;if(o===oRe)return 6409;if(o===sRe)return 6410;if(o===um)return 6402;if(o===Y0)return 34041;if(o===aRe)return 6403;if(o===tB)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(o===lRe)return 36244;if(o===cRe)return 33319;if(o===dRe)return 33320;if(o===uRe)return 36249;if(o===u3||o===p3||o===f3||o===m3)if(s===Ar){if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===a)return null;if(o===u3)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(o===p3)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(o===f3)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(o===m3)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(a=t.get("WEBGL_compressed_texture_s3tc"),null===a)return null;if(o===u3)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(o===p3)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(o===f3)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(o===m3)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(o===h$||o===g$||o===_$||o===b$){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(o===h$)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(o===g$)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(o===_$)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(o===b$)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(o===pRe)return a=t.get("WEBGL_compressed_texture_etc1"),null!==a?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(o===v$||o===y$){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(o===v$)return s===Ar?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(o===y$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(o===x$||o===C$||o===M$||o===w$||o===S$||o===E$||o===T$||o===D$||o===I$||o===A$||o===R$||o===P$||o===O$||o===k$){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(o===x$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(o===C$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(o===M$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(o===w$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(o===S$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(o===E$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(o===T$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(o===D$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(o===I$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(o===A$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(o===R$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(o===P$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(o===O$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(o===k$)return s===Ar?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(o===F$){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(o===F$)return s===Ar?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}return o===j0?i?34042:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0}}}var AI=class extends es{constructor(t=[]){super(),this.cameras=t}};AI.prototype.isArrayCamera=!0;var dm=class extends Bi{constructor(){super(),this.type="Group"}};dm.prototype.isGroup=!0;var KFe={type:"move"},_x=class{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new dm,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new dm,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new $,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new $),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new dm,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new $,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new $),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,i){let r=null,o=null,s=null,a=this._targetRay,l=this._grip,c=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState)if(null!==a&&(r=e.getPose(t.targetRaySpace,i),null!==r&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(KFe))),c&&t.hand){s=!0;for(let b of t.hand.values()){let M=e.getJointPose(b,i);if(void 0===c.joints[b.jointName]){let x=new dm;x.matrixAutoUpdate=!1,x.visible=!1,c.joints[b.jointName]=x,c.add(x)}let y=c.joints[b.jointName];null!==M&&(y.matrix.fromArray(M.transform.matrix),y.matrix.decompose(y.position,y.rotation,y.scale),y.jointRadius=M.radius),y.visible=null!==M}let p=c.joints["index-finger-tip"].position.distanceTo(c.joints["thumb-tip"].position),f=.02,m=.005;c.inputState.pinching&&p>f+m?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&p<=f-m&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==l&&t.gripSpace&&(o=e.getPose(t.gripSpace,i),null!==o&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return null!==a&&(a.visible=null!==r),null!==l&&(l.visible=null!==o),null!==c&&(c.visible=null!==s),this}},Ix=class extends lo{constructor(t,e,i,r,o,s,a,l,c,d){if((d=void 0!==d?d:um)!==um&&d!==Y0)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===i&&d===um&&(i=xx),void 0===i&&d===Y0&&(i=j0),super(null,r,o,s,a,l,d,i,c),this.image={width:t,height:e},this.magFilter=void 0!==a?a:_o,this.minFilter=void 0!==l?l:_o,this.flipY=!1,this.generateMipmaps=!1}};Ix.prototype.isDepthTexture=!0;var lB=class extends Ud{constructor(t,e){super();let i=this,r=null,o=1,s=null,a="local-floor",l=t.extensions.has("WEBGL_multisampled_render_to_texture"),c=null,d=null,u=null,p=null,f=!1,m=null,b=e.getContextAttributes(),M=null,y=null,x=[],R=new Map,A=new es;A.layers.enable(1),A.viewport=new Zi;let V=new es;V.layers.enable(2),V.viewport=new Zi;let te=[A,V],K=new AI;K.layers.enable(1),K.layers.enable(2);let xe=null,Xe=null;function De(Ce){let Ne=R.get(Ce.inputSource);Ne&&Ne.dispatchEvent({type:Ce.type,data:Ce.inputSource})}function D(){R.forEach(function(Ce,Ne){Ce.disconnect(Ne)}),R.clear(),xe=null,Xe=null,t.setRenderTarget(M),p=null,u=null,d=null,r=null,y=null,je.stop(),i.isPresenting=!1,i.dispatchEvent({type:"sessionend"})}function re(Ce){let Ne=r.inputSources;for(let lt=0;lt<x.length;lt++)R.set(Ne[lt],x[lt]);for(let lt=0;lt<Ce.removed.length;lt++){let Mt=Ce.removed[lt],pt=R.get(Mt);pt&&(pt.dispatchEvent({type:"disconnected",data:Mt}),R.delete(Mt))}for(let lt=0;lt<Ce.added.length;lt++){let Mt=Ce.added[lt],pt=R.get(Mt);pt&&pt.dispatchEvent({type:"connected",data:Mt})}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(Ce){let Ne=x[Ce];return void 0===Ne&&(Ne=new _x,x[Ce]=Ne),Ne.getTargetRaySpace()},this.getControllerGrip=function(Ce){let Ne=x[Ce];return void 0===Ne&&(Ne=new _x,x[Ce]=Ne),Ne.getGripSpace()},this.getHand=function(Ce){let Ne=x[Ce];return void 0===Ne&&(Ne=new _x,x[Ce]=Ne),Ne.getHandSpace()},this.setFramebufferScaleFactor=function(Ce){o=Ce,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(Ce){a=Ce,!0===i.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s},this.getBaseLayer=function(){return null!==u?u:p},this.getBinding=function(){return d},this.getFrame=function(){return m},this.getSession=function(){return r},this.setSession=async function(Ce){if(r=Ce,null!==r){if(M=t.getRenderTarget(),r.addEventListener("select",De),r.addEventListener("selectstart",De),r.addEventListener("selectend",De),r.addEventListener("squeeze",De),r.addEventListener("squeezestart",De),r.addEventListener("squeezeend",De),r.addEventListener("end",D),r.addEventListener("inputsourceschange",re),!0!==b.xrCompatible&&await e.makeXRCompatible(),void 0===r.renderState.layers||!1===t.capabilities.isWebGL2)p=new XRWebGLLayer(r,e,{antialias:void 0!==r.renderState.layers||b.antialias,alpha:b.alpha,depth:b.depth,stencil:b.stencil,framebufferScaleFactor:o}),r.updateRenderState({baseLayer:p}),y=new Js(p.framebufferWidth,p.framebufferHeight,{format:gs,type:mp,encoding:t.outputEncoding});else{f=b.antialias;let Ne=null,lt=null,Mt=null;b.depth&&(Mt=b.stencil?35056:33190,Ne=b.stencil?Y0:um,lt=b.stencil?j0:xx);let pt={colorFormat:t.outputEncoding===Ar?35907:32856,depthFormat:Mt,scaleFactor:o};d=new XRWebGLBinding(r,e),u=d.createProjectionLayer(pt),r.updateRenderState({layers:[u]}),y=f?new wx(u.textureWidth,u.textureHeight,{format:gs,type:mp,depthTexture:new Ix(u.textureWidth,u.textureHeight,lt,void 0,void 0,void 0,void 0,void 0,void 0,Ne),stencilBuffer:b.stencil,ignoreDepth:u.ignoreDepthValues,useRenderToTexture:l,encoding:t.outputEncoding}):new Js(u.textureWidth,u.textureHeight,{format:gs,type:mp,depthTexture:new Ix(u.textureWidth,u.textureHeight,lt,void 0,void 0,void 0,void 0,void 0,void 0,Ne),stencilBuffer:b.stencil,ignoreDepth:u.ignoreDepthValues,encoding:t.outputEncoding})}y.isXRRenderTarget=!0,this.setFoveation(1),s=await r.requestReferenceSpace(a),je.setContext(r),je.start(),i.isPresenting=!0,i.dispatchEvent({type:"sessionstart"})}};let ce=new $,fe=new $;function ne(Ce,Ne){null===Ne?Ce.matrixWorld.copy(Ce.matrix):Ce.matrixWorld.multiplyMatrices(Ne.matrixWorld,Ce.matrix),Ce.matrixWorldInverse.copy(Ce.matrixWorld).invert()}this.updateCamera=function(Ce){if(null===r)return;K.near=V.near=A.near=Ce.near,K.far=V.far=A.far=Ce.far,(xe!==K.near||Xe!==K.far)&&(r.updateRenderState({depthNear:K.near,depthFar:K.far}),xe=K.near,Xe=K.far);let Ne=Ce.parent,lt=K.cameras;ne(K,Ne);for(let pt=0;pt<lt.length;pt++)ne(lt[pt],Ne);K.matrixWorld.decompose(K.position,K.quaternion,K.scale),Ce.position.copy(K.position),Ce.quaternion.copy(K.quaternion),Ce.scale.copy(K.scale),Ce.matrix.copy(K.matrix),Ce.matrixWorld.copy(K.matrixWorld);let Mt=Ce.children;for(let pt=0,Oe=Mt.length;pt<Oe;pt++)Mt[pt].updateMatrixWorld(!0);2===lt.length?function(Ce,Ne,lt){ce.setFromMatrixPosition(Ne.matrixWorld),fe.setFromMatrixPosition(lt.matrixWorld);let Mt=ce.distanceTo(fe),pt=Ne.projectionMatrix.elements,Oe=lt.projectionMatrix.elements,An=pt[14]/(pt[10]-1),wt=pt[14]/(pt[10]+1),on=(pt[9]+1)/pt[5],ve=(pt[9]-1)/pt[5],mt=(pt[8]-1)/pt[0],ft=(Oe[8]+1)/Oe[0],oe=An*mt,st=An*ft,Ye=Mt/(-mt+ft),_t=Ye*-mt;Ne.matrixWorld.decompose(Ce.position,Ce.quaternion,Ce.scale),Ce.translateX(_t),Ce.translateZ(Ye),Ce.matrixWorld.compose(Ce.position,Ce.quaternion,Ce.scale),Ce.matrixWorldInverse.copy(Ce.matrixWorld).invert();let ut=An+Ye,sn=wt+Ye;Ce.projectionMatrix.makePerspective(oe-_t,st+(Mt-_t),on*wt/sn*ut,ve*wt/sn*ut,ut,sn)}(K,A,V):K.projectionMatrix.copy(A.projectionMatrix)},this.getCamera=function(){return K},this.getFoveation=function(){return null!==u?u.fixedFoveation:null!==p?p.fixedFoveation:void 0},this.setFoveation=function(Ce){null!==u&&(u.fixedFoveation=Ce),null!==p&&void 0!==p.fixedFoveation&&(p.fixedFoveation=Ce)};let de=null,je=new Zee;je.setAnimationLoop(function(Ce,Ne){if(c=Ne.getViewerPose(s),m=Ne,null!==c){let Mt=c.views;null!==p&&(t.setRenderTargetFramebuffer(y,p.framebuffer),t.setRenderTarget(y));let pt=!1;Mt.length!==K.cameras.length&&(K.cameras.length=0,pt=!0);for(let Oe=0;Oe<Mt.length;Oe++){let An=Mt[Oe],wt=null;if(null!==p)wt=p.getViewport(An);else{let ve=d.getViewSubImage(u,An);wt=ve.viewport,0===Oe&&(t.setRenderTargetTextures(y,ve.colorTexture,u.ignoreDepthValues?void 0:ve.depthStencilTexture),t.setRenderTarget(y))}let on=te[Oe];on.matrix.fromArray(An.transform.matrix),on.projectionMatrix.fromArray(An.projectionMatrix),on.viewport.set(wt.x,wt.y,wt.width,wt.height),0===Oe&&K.matrix.copy(on.matrix),!0===pt&&K.cameras.push(on)}}let lt=r.inputSources;for(let Mt=0;Mt<x.length;Mt++)x[Mt].update(lt[Mt],Ne,s);de&&de(Ce,Ne),m=null}),this.setAnimationLoop=function(Ce){de=Ce},this.dispose=function(){}}};function JFe(n){function i(y,x){y.opacity.value=x.opacity,x.color&&y.diffuse.value.copy(x.color),x.emissive&&y.emissive.value.copy(x.emissive).multiplyScalar(x.emissiveIntensity),x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.specularMap&&(y.specularMap.value=x.specularMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest);let A,V,R=n.get(x).envMap;R&&(y.envMap.value=R,y.flipEnvMap.value=R.isCubeTexture&&!1===R.isRenderTargetTexture?-1:1,y.reflectivity.value=x.reflectivity,y.ior.value=x.ior,y.refractionRatio.value=x.refractionRatio),x.lightMap&&(y.lightMap.value=x.lightMap,y.lightMapIntensity.value=x.lightMapIntensity),x.aoMap&&(y.aoMap.value=x.aoMap,y.aoMapIntensity.value=x.aoMapIntensity),x.map?A=x.map:x.specularMap?A=x.specularMap:x.displacementMap?A=x.displacementMap:x.normalMap?A=x.normalMap:x.bumpMap?A=x.bumpMap:x.roughnessMap?A=x.roughnessMap:x.metalnessMap?A=x.metalnessMap:x.alphaMap?A=x.alphaMap:x.emissiveMap?A=x.emissiveMap:x.clearcoatMap?A=x.clearcoatMap:x.clearcoatNormalMap?A=x.clearcoatNormalMap:x.clearcoatRoughnessMap?A=x.clearcoatRoughnessMap:x.specularIntensityMap?A=x.specularIntensityMap:x.specularColorMap?A=x.specularColorMap:x.transmissionMap?A=x.transmissionMap:x.thicknessMap?A=x.thicknessMap:x.sheenColorMap?A=x.sheenColorMap:x.sheenRoughnessMap&&(A=x.sheenRoughnessMap),void 0!==A&&(A.isWebGLRenderTarget&&(A=A.texture),!0===A.matrixAutoUpdate&&A.updateMatrix(),y.uvTransform.value.copy(A.matrix)),x.aoMap?V=x.aoMap:x.lightMap&&(V=x.lightMap),void 0!==V&&(V.isWebGLRenderTarget&&(V=V.texture),!0===V.matrixAutoUpdate&&V.updateMatrix(),y.uv2Transform.value.copy(V.matrix))}function u(y,x){y.roughness.value=x.roughness,y.metalness.value=x.metalness,x.roughnessMap&&(y.roughnessMap.value=x.roughnessMap),x.metalnessMap&&(y.metalnessMap.value=x.metalnessMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===go&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===go&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),n.get(x).envMap&&(y.envMapIntensity.value=x.envMapIntensity)}return{refreshFogUniforms:function(y,x){y.fogColor.value.copy(x.color),x.isFog?(y.fogNear.value=x.near,y.fogFar.value=x.far):x.isFogExp2&&(y.fogDensity.value=x.density)},refreshMaterialUniforms:function(y,x,R,A,V){x.isMeshBasicMaterial?i(y,x):x.isMeshLambertMaterial?(i(y,x),function(y,x){x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap)}(y,x)):x.isMeshToonMaterial?(i(y,x),function(y,x){x.gradientMap&&(y.gradientMap.value=x.gradientMap),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===go&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===go&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshPhongMaterial?(i(y,x),function(y,x){y.specular.value.copy(x.specular),y.shininess.value=Math.max(x.shininess,1e-4),x.emissiveMap&&(y.emissiveMap.value=x.emissiveMap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===go&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===go&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshStandardMaterial?(i(y,x),x.isMeshPhysicalMaterial?function(y,x,R){u(y,x),y.ior.value=x.ior,x.sheen>0&&(y.sheenColor.value.copy(x.sheenColor).multiplyScalar(x.sheen),y.sheenRoughness.value=x.sheenRoughness,x.sheenColorMap&&(y.sheenColorMap.value=x.sheenColorMap),x.sheenRoughnessMap&&(y.sheenRoughnessMap.value=x.sheenRoughnessMap)),x.clearcoat>0&&(y.clearcoat.value=x.clearcoat,y.clearcoatRoughness.value=x.clearcoatRoughness,x.clearcoatMap&&(y.clearcoatMap.value=x.clearcoatMap),x.clearcoatRoughnessMap&&(y.clearcoatRoughnessMap.value=x.clearcoatRoughnessMap),x.clearcoatNormalMap&&(y.clearcoatNormalScale.value.copy(x.clearcoatNormalScale),y.clearcoatNormalMap.value=x.clearcoatNormalMap,x.side===go&&y.clearcoatNormalScale.value.negate())),x.transmission>0&&(y.transmission.value=x.transmission,y.transmissionSamplerMap.value=R.texture,y.transmissionSamplerSize.value.set(R.width,R.height),x.transmissionMap&&(y.transmissionMap.value=x.transmissionMap),y.thickness.value=x.thickness,x.thicknessMap&&(y.thicknessMap.value=x.thicknessMap),y.attenuationDistance.value=x.attenuationDistance,y.attenuationColor.value.copy(x.attenuationColor)),y.specularIntensity.value=x.specularIntensity,y.specularColor.value.copy(x.specularColor),x.specularIntensityMap&&(y.specularIntensityMap.value=x.specularIntensityMap),x.specularColorMap&&(y.specularColorMap.value=x.specularColorMap)}(y,x,V):u(y,x)):x.isMeshMatcapMaterial?(i(y,x),function(y,x){x.matcap&&(y.matcap.value=x.matcap),x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===go&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===go&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshDepthMaterial?(i(y,x),function(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isMeshDistanceMaterial?(i(y,x),function(y,x){x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias),y.referencePosition.value.copy(x.referencePosition),y.nearDistance.value=x.nearDistance,y.farDistance.value=x.farDistance}(y,x)):x.isMeshNormalMaterial?(i(y,x),function(y,x){x.bumpMap&&(y.bumpMap.value=x.bumpMap,y.bumpScale.value=x.bumpScale,x.side===go&&(y.bumpScale.value*=-1)),x.normalMap&&(y.normalMap.value=x.normalMap,y.normalScale.value.copy(x.normalScale),x.side===go&&y.normalScale.value.negate()),x.displacementMap&&(y.displacementMap.value=x.displacementMap,y.displacementScale.value=x.displacementScale,y.displacementBias.value=x.displacementBias)}(y,x)):x.isLineBasicMaterial?(function(y,x){y.diffuse.value.copy(x.color),y.opacity.value=x.opacity}(y,x),x.isLineDashedMaterial&&function(y,x){y.dashSize.value=x.dashSize,y.totalSize.value=x.dashSize+x.gapSize,y.scale.value=x.scale}(y,x)):x.isPointsMaterial?function(y,x,R,A){let V;y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.size.value=x.size*R,y.scale.value=.5*A,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest),x.map?V=x.map:x.alphaMap&&(V=x.alphaMap),void 0!==V&&(!0===V.matrixAutoUpdate&&V.updateMatrix(),y.uvTransform.value.copy(V.matrix))}(y,x,R,A):x.isSpriteMaterial?function(y,x){let R;y.diffuse.value.copy(x.color),y.opacity.value=x.opacity,y.rotation.value=x.rotation,x.map&&(y.map.value=x.map),x.alphaMap&&(y.alphaMap.value=x.alphaMap),x.alphaTest>0&&(y.alphaTest.value=x.alphaTest),x.map?R=x.map:x.alphaMap&&(R=x.alphaMap),void 0!==R&&(!0===R.matrixAutoUpdate&&R.updateMatrix(),y.uvTransform.value.copy(R.matrix))}(y,x):x.isShadowMaterial?(y.color.value.copy(x.color),y.opacity.value=x.opacity):x.isShaderMaterial&&(x.uniformsNeedUpdate=!1)}}}function ji(n={}){let t=void 0!==n.canvas?n.canvas:function(){let n=Mx("canvas");return n.style.display="block",n}(),e=void 0!==n.context?n.context:null,i=void 0!==n.alpha&&n.alpha,r=void 0===n.depth||n.depth,o=void 0===n.stencil||n.stencil,s=void 0!==n.antialias&&n.antialias,a=void 0===n.premultipliedAlpha||n.premultipliedAlpha,l=void 0!==n.preserveDrawingBuffer&&n.preserveDrawingBuffer,c=void 0!==n.powerPreference?n.powerPreference:"default",d=void 0!==n.failIfMajorPerformanceCaveat&&n.failIfMajorPerformanceCaveat,u=null,p=null,f=[],m=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=_p,this.physicallyCorrectLights=!1,this.toneMapping=fp,this.toneMappingExposure=1;let b=this,M=!1,y=0,x=0,R=null,A=-1,V=null,te=new Zi,K=new Zi,xe=null,Xe=t.width,De=t.height,D=1,re=null,ce=null,fe=new Zi(0,0,Xe,De),be=new Zi(0,0,Xe,De),ne=!1,de=new Z0,pe=!1,je=!1,Ce=null,Ne=new xn,lt=new $,Mt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function pt(){return null===R?D:1}let wt,on,ve,mt,ft,oe,st,Ye,_t,ut,sn,Cn,ti,ki,Fi,Z,L,Ve,vt,en,Le,mn,ln,Oe=e;function An(E,H){for(let Y=0;Y<E.length;Y++){let se=t.getContext(E[Y],H);if(null!==se)return se}return null}try{let E={alpha:!0,depth:r,stencil:o,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${dV}`),t.addEventListener("webglcontextlost",Ln,!1),t.addEventListener("webglcontextrestored",ae,!1),null===Oe){let H=["webgl2","webgl","experimental-webgl"];if(!0===b.isWebGL1Renderer&&H.shift(),Oe=An(H,E),null===Oe)throw An(H)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===Oe.getShaderPrecisionFormat&&(Oe.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(E){throw console.error("THREE.WebGLRenderer: "+E.message),E}function Ft(){wt=new xke(Oe),on=new hke(Oe,wt,n),wt.init(on),mn=new ZFe(Oe,wt,on),ve=new XFe(Oe,wt,on),mt=new wke(Oe),ft=new LFe,oe=new QFe(Oe,wt,ve,ft,on,mn,mt),st=new _ke(b),Ye=new yke(b),_t=new VRe(Oe,on),ln=new fke(Oe,wt,_t,on),ut=new Cke(Oe,_t,mt,ln),sn=new Dke(Oe,ut,_t,mt),vt=new Tke(Oe,on,oe),Z=new gke(ft),Cn=new NFe(b,st,Ye,wt,on,ln,Z),ti=new JFe(ft),ki=new VFe,Fi=new WFe(wt,on),Ve=new pke(b,st,ve,sn,i,a),L=new ste(b,sn,on),en=new mke(Oe,wt,mt,on),Le=new Mke(Oe,wt,mt,on),mt.programs=Cn.programs,b.capabilities=on,b.extensions=wt,b.properties=ft,b.renderLists=ki,b.shadowMap=L,b.state=ve,b.info=mt}Ft();let Pt=new lB(b,Oe);function Ln(E){E.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function ae(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;let E=mt.autoReset,H=L.enabled,Y=L.autoUpdate,J=L.needsUpdate,se=L.type;Ft(),mt.autoReset=E,L.enabled=H,L.autoUpdate=Y,L.needsUpdate=J,L.type=se}function Jt(E){let H=E.target;H.removeEventListener("dispose",Jt),function(E){(function(E){let H=ft.get(E).programs;void 0!==H&&(H.forEach(function(Y){Cn.releaseProgram(Y)}),E.isShaderMaterial&&Cn.releaseShaderCache(E))})(E),ft.remove(E)}(H)}this.xr=Pt,this.getContext=function(){return Oe},this.getContextAttributes=function(){return Oe.getContextAttributes()},this.forceContextLoss=function(){let E=wt.get("WEBGL_lose_context");E&&E.loseContext()},this.forceContextRestore=function(){let E=wt.get("WEBGL_lose_context");E&&E.restoreContext()},this.getPixelRatio=function(){return D},this.setPixelRatio=function(E){void 0!==E&&(D=E,this.setSize(Xe,De,!1))},this.getSize=function(E){return E.set(Xe,De)},this.setSize=function(E,H,Y){Pt.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(Xe=E,De=H,t.width=Math.floor(E*D),t.height=Math.floor(H*D),!1!==Y&&(t.style.width=E+"px",t.style.height=H+"px"),this.setViewport(0,0,E,H))},this.getDrawingBufferSize=function(E){return E.set(Xe*D,De*D).floor()},this.setDrawingBufferSize=function(E,H,Y){Xe=E,De=H,D=Y,t.width=Math.floor(E*Y),t.height=Math.floor(H*Y),this.setViewport(0,0,E,H)},this.getCurrentViewport=function(E){return E.copy(te)},this.getViewport=function(E){return E.copy(fe)},this.setViewport=function(E,H,Y,J){E.isVector4?fe.set(E.x,E.y,E.z,E.w):fe.set(E,H,Y,J),ve.viewport(te.copy(fe).multiplyScalar(D).floor())},this.getScissor=function(E){return E.copy(be)},this.setScissor=function(E,H,Y,J){E.isVector4?be.set(E.x,E.y,E.z,E.w):be.set(E,H,Y,J),ve.scissor(K.copy(be).multiplyScalar(D).floor())},this.getScissorTest=function(){return ne},this.setScissorTest=function(E){ve.setScissorTest(ne=E)},this.setOpaqueSort=function(E){re=E},this.setTransparentSort=function(E){ce=E},this.getClearColor=function(E){return E.copy(Ve.getClearColor())},this.setClearColor=function(){Ve.setClearColor.apply(Ve,arguments)},this.getClearAlpha=function(){return Ve.getClearAlpha()},this.setClearAlpha=function(){Ve.setClearAlpha.apply(Ve,arguments)},this.clear=function(E,H,Y){let J=0;(void 0===E||E)&&(J|=16384),(void 0===H||H)&&(J|=256),(void 0===Y||Y)&&(J|=1024),Oe.clear(J)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Ln,!1),t.removeEventListener("webglcontextrestored",ae,!1),ki.dispose(),Fi.dispose(),ft.dispose(),st.dispose(),Ye.dispose(),sn.dispose(),ln.dispose(),Cn.dispose(),Pt.dispose(),Pt.removeEventListener("sessionstart",ui),Pt.removeEventListener("sessionend",ur),Ce&&(Ce.dispose(),Ce=null),zo.stop()},this.renderBufferDirect=function(E,H,Y,J,se,ze){null===H&&(H=Mt);let et=se.isMesh&&se.matrixWorld.determinant()<0,qe=function(E,H,Y,J,se){!0!==H.isScene&&(H=Mt),oe.resetTextureUnits();let ze=H.fog,qe=null===R?b.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:_p,rt=(J.isMeshStandardMaterial?Ye:st).get(J.envMap||(J.isMeshStandardMaterial?H.environment:null)),dt=!0===J.vertexColors&&!!Y.attributes.color&&4===Y.attributes.color.itemSize,St=!!J.normalMap&&!!Y.attributes.tangent,Dt=!!Y.morphAttributes.position,cn=!!Y.morphAttributes.normal,Gi=Y.morphAttributes.position?Y.morphAttributes.position.length:0,vi=J.toneMapped?b.toneMapping:fp,pn=ft.get(J),Pn=p.state.lights;!0!==pe||!0!==je&&E===V||Z.setState(J,E,E===V&&J.id===A);let Et=!1;J.version===pn.__version?(pn.needsLights&&pn.lightsStateVersion!==Pn.state.version||pn.outputEncoding!==qe||se.isInstancedMesh&&!1===pn.instancing||!se.isInstancedMesh&&!0===pn.instancing||se.isSkinnedMesh&&!1===pn.skinning||!se.isSkinnedMesh&&!0===pn.skinning||pn.envMap!==rt||J.fog&&pn.fog!==ze||void 0!==pn.numClippingPlanes&&(pn.numClippingPlanes!==Z.numPlanes||pn.numIntersection!==Z.numIntersection)||pn.vertexAlphas!==dt||pn.vertexTangents!==St||pn.morphTargets!==Dt||pn.morphNormals!==cn||pn.toneMapping!==vi||!0===on.isWebGL2&&pn.morphTargetsCount!==Gi)&&(Et=!0):(Et=!0,pn.__version=J.version);let pi=pn.currentProgram;!0===Et&&(pi=x_(J,H,se));let Qn=!1,Vn=!1,Wn=!1,Ut=pi.getUniforms(),Ni=pn.uniforms;if(ve.useProgram(pi.program)&&(Qn=!0,Vn=!0,Wn=!0),J.id!==A&&(A=J.id,Vn=!0),Qn||V!==E){if(Ut.setValue(Oe,"projectionMatrix",E.projectionMatrix),on.logarithmicDepthBuffer&&Ut.setValue(Oe,"logDepthBufFC",2/(Math.log(E.far+1)/Math.LN2)),V!==E&&(V=E,Vn=!0,Wn=!0),J.isShaderMaterial||J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshStandardMaterial||J.envMap){let vn=Ut.map.cameraPosition;void 0!==vn&&vn.setValue(Oe,lt.setFromMatrixPosition(E.matrixWorld))}(J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial)&&Ut.setValue(Oe,"isOrthographic",!0===E.isOrthographicCamera),(J.isMeshPhongMaterial||J.isMeshToonMaterial||J.isMeshLambertMaterial||J.isMeshBasicMaterial||J.isMeshStandardMaterial||J.isShaderMaterial||J.isShadowMaterial||se.isSkinnedMesh)&&Ut.setValue(Oe,"viewMatrix",E.matrixWorldInverse)}if(se.isSkinnedMesh){Ut.setOptional(Oe,se,"bindMatrix"),Ut.setOptional(Oe,se,"bindMatrixInverse");let vn=se.skeleton;vn&&(on.floatVertexTextures?(null===vn.boneTexture&&vn.computeBoneTexture(),Ut.setValue(Oe,"boneTexture",vn.boneTexture,oe),Ut.setValue(Oe,"boneTextureSize",vn.boneTextureSize)):Ut.setOptional(Oe,vn,"boneMatrices"))}return!!Y&&(void 0!==Y.morphAttributes.position||void 0!==Y.morphAttributes.normal)&&vt.update(se,Y,J,pi),(Vn||pn.receiveShadow!==se.receiveShadow)&&(pn.receiveShadow=se.receiveShadow,Ut.setValue(Oe,"receiveShadow",se.receiveShadow)),Vn&&(Ut.setValue(Oe,"toneMappingExposure",b.toneMappingExposure),pn.needsLights&&function(E,H){E.ambientLightColor.needsUpdate=H,E.lightProbe.needsUpdate=H,E.directionalLights.needsUpdate=H,E.directionalLightShadows.needsUpdate=H,E.pointLights.needsUpdate=H,E.pointLightShadows.needsUpdate=H,E.spotLights.needsUpdate=H,E.spotLightShadows.needsUpdate=H,E.rectAreaLights.needsUpdate=H,E.hemisphereLights.needsUpdate=H}(Ni,Wn),ze&&J.fog&&ti.refreshFogUniforms(Ni,ze),ti.refreshMaterialUniforms(Ni,J,D,De,Ce),gp.upload(Oe,pn.uniformsList,Ni,oe)),J.isShaderMaterial&&!0===J.uniformsNeedUpdate&&(gp.upload(Oe,pn.uniformsList,Ni,oe),J.uniformsNeedUpdate=!1),J.isSpriteMaterial&&Ut.setValue(Oe,"center",se.center),Ut.setValue(Oe,"modelViewMatrix",se.modelViewMatrix),Ut.setValue(Oe,"normalMatrix",se.normalMatrix),Ut.setValue(Oe,"modelMatrix",se.matrixWorld),pi}(E,H,Y,J,se);ve.setMaterial(J,et);let rt=Y.index,dt=Y.attributes.position;if(null===rt){if(void 0===dt||0===dt.count)return}else if(0===rt.count)return;let St=1;!0===J.wireframe&&(rt=ut.getWireframeAttribute(Y),St=2),ln.setup(se,J,qe,Y,rt);let Dt,cn=en;null!==rt&&(Dt=_t.get(rt),cn=Le,cn.setIndex(Dt));let Gi=null!==rt?rt.count:dt.count,vi=Y.drawRange.start*St,pn=Y.drawRange.count*St,Pn=null!==ze?ze.start*St:0,Et=null!==ze?ze.count*St:1/0,pi=Math.max(vi,Pn),Qn=Math.min(Gi,vi+pn,Pn+Et)-1,Vn=Math.max(0,Qn-pi+1);if(0!==Vn){if(se.isMesh)!0===J.wireframe?(ve.setLineWidth(J.wireframeLinewidth*pt()),cn.setMode(1)):cn.setMode(4);else if(se.isLine){let Wn=J.linewidth;void 0===Wn&&(Wn=1),ve.setLineWidth(Wn*pt()),cn.setMode(se.isLineSegments?1:se.isLineLoop?2:3)}else se.isPoints?cn.setMode(0):se.isSprite&&cn.setMode(4);if(se.isInstancedMesh)cn.renderInstances(pi,Vn,se.count);else if(Y.isInstancedBufferGeometry){let Wn=Math.min(Y.instanceCount,Y._maxInstanceCount);cn.renderInstances(pi,Vn,Wn)}else cn.render(pi,Vn)}},this.compile=function(E,H){p=Fi.get(E),p.init(),m.push(p),E.traverseVisible(function(Y){Y.isLight&&Y.layers.test(H.layers)&&(p.pushLight(Y),Y.castShadow&&p.pushShadow(Y))}),p.setupLights(b.physicallyCorrectLights),E.traverse(function(Y){let J=Y.material;if(J)if(Array.isArray(J))for(let se=0;se<J.length;se++)x_(J[se],E,Y);else x_(J,E,Y)}),m.pop(),p=null};let We=null;function ui(){zo.stop()}function ur(){zo.start()}let zo=new Zee;function Cr(E,H,Y,J){if(!1===E.visible)return;if(E.layers.test(H.layers))if(E.isGroup)Y=E.renderOrder;else if(E.isLOD)!0===E.autoUpdate&&E.update(H);else if(E.isLight)p.pushLight(E),E.castShadow&&p.pushShadow(E);else if(E.isSprite){if(!E.frustumCulled||de.intersectsSprite(E)){J&&lt.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Ne);let et=sn.update(E),qe=E.material;qe.visible&&u.push(E,et,qe,Y,lt.z,null)}}else if((E.isMesh||E.isLine||E.isPoints)&&(E.isSkinnedMesh&&E.skeleton.frame!==mt.render.frame&&(E.skeleton.update(),E.skeleton.frame=mt.render.frame),!E.frustumCulled||de.intersectsObject(E))){J&&lt.setFromMatrixPosition(E.matrixWorld).applyMatrix4(Ne);let et=sn.update(E),qe=E.material;if(Array.isArray(qe)){let rt=et.groups;for(let dt=0,St=rt.length;dt<St;dt++){let Dt=rt[dt],cn=qe[Dt.materialIndex];cn&&cn.visible&&u.push(E,et,cn,Y,lt.z,Dt)}}else qe.visible&&u.push(E,et,qe,Y,lt.z,null)}let ze=E.children;for(let et=0,qe=ze.length;et<qe;et++)Cr(ze[et],H,Y,J)}function Ma(E,H,Y,J){let se=E.opaque,ze=E.transmissive,et=E.transparent;p.setupLightsView(Y),ze.length>0&&function(E,H,Y){null===Ce&&(Ce=new(!0===s&&!0===on.isWebGL2?wx:Js)(1024,1024,{generateMipmaps:!0,type:null!==mn.convert(U0)?U0:mp,minFilter:QI,magFilter:_o,wrapS:ya,wrapT:ya,useRenderToTexture:wt.has("WEBGL_multisampled_render_to_texture")}));let J=b.getRenderTarget();b.setRenderTarget(Ce),b.clear();let se=b.toneMapping;b.toneMapping=fp,dl(E,H,Y),b.toneMapping=se,oe.updateMultisampleRenderTarget(Ce),oe.updateRenderTargetMipmap(Ce),b.setRenderTarget(J)}(se,H,Y),J&&ve.viewport(te.copy(J)),se.length>0&&dl(se,H,Y),ze.length>0&&dl(ze,H,Y),et.length>0&&dl(et,H,Y)}function dl(E,H,Y){let J=!0===H.isScene?H.overrideMaterial:null;for(let se=0,ze=E.length;se<ze;se++){let et=E[se],qe=et.object,rt=et.geometry,dt=null===J?et.material:J,St=et.group;qe.layers.test(Y.layers)&&PA(qe,H,Y,rt,dt,St)}}function PA(E,H,Y,J,se,ze){E.onBeforeRender(b,H,Y,J,se,ze),E.modelViewMatrix.multiplyMatrices(Y.matrixWorldInverse,E.matrixWorld),E.normalMatrix.getNormalMatrix(E.modelViewMatrix),se.onBeforeRender(b,H,Y,J,E,ze),!0===se.transparent&&se.side===q0?(se.side=go,se.needsUpdate=!0,b.renderBufferDirect(Y,H,J,se,E,ze),se.side=yx,se.needsUpdate=!0,b.renderBufferDirect(Y,H,J,se,E,ze),se.side=q0):b.renderBufferDirect(Y,H,J,se,E,ze),E.onAfterRender(b,H,Y,J,se,ze)}function x_(E,H,Y){!0!==H.isScene&&(H=Mt);let J=ft.get(E),se=p.state.lights,et=se.state.version,qe=Cn.getParameters(E,se.state,p.state.shadowsArray,H,Y),rt=Cn.getProgramCacheKey(qe),dt=J.programs;J.environment=E.isMeshStandardMaterial?H.environment:null,J.fog=H.fog,J.envMap=(E.isMeshStandardMaterial?Ye:st).get(E.envMap||J.environment),void 0===dt&&(E.addEventListener("dispose",Jt),dt=new Map,J.programs=dt);let St=dt.get(rt);if(void 0!==St){if(J.currentProgram===St&&J.lightsStateVersion===et)return eC(E,qe),St}else qe.uniforms=Cn.getUniforms(E),E.onBuild(Y,qe,b),E.onBeforeCompile(qe,b),St=Cn.acquireProgram(qe,rt),dt.set(rt,St),J.uniforms=qe.uniforms;let Dt=J.uniforms;(!E.isShaderMaterial&&!E.isRawShaderMaterial||!0===E.clipping)&&(Dt.clippingPlanes=Z.uniform),eC(E,qe),J.needsLights=function(E){return E.isMeshLambertMaterial||E.isMeshToonMaterial||E.isMeshPhongMaterial||E.isMeshStandardMaterial||E.isShadowMaterial||E.isShaderMaterial&&!0===E.lights}(E),J.lightsStateVersion=et,J.needsLights&&(Dt.ambientLightColor.value=se.state.ambient,Dt.lightProbe.value=se.state.probe,Dt.directionalLights.value=se.state.directional,Dt.directionalLightShadows.value=se.state.directionalShadow,Dt.spotLights.value=se.state.spot,Dt.spotLightShadows.value=se.state.spotShadow,Dt.rectAreaLights.value=se.state.rectArea,Dt.ltc_1.value=se.state.rectAreaLTC1,Dt.ltc_2.value=se.state.rectAreaLTC2,Dt.pointLights.value=se.state.point,Dt.pointLightShadows.value=se.state.pointShadow,Dt.hemisphereLights.value=se.state.hemi,Dt.directionalShadowMap.value=se.state.directionalShadowMap,Dt.directionalShadowMatrix.value=se.state.directionalShadowMatrix,Dt.spotShadowMap.value=se.state.spotShadowMap,Dt.spotShadowMatrix.value=se.state.spotShadowMatrix,Dt.pointShadowMap.value=se.state.pointShadowMap,Dt.pointShadowMatrix.value=se.state.pointShadowMatrix);let cn=St.getUniforms(),Gi=gp.seqWithValue(cn.seq,Dt);return J.currentProgram=St,J.uniformsList=Gi,St}function eC(E,H){let Y=ft.get(E);Y.outputEncoding=H.outputEncoding,Y.instancing=H.instancing,Y.skinning=H.skinning,Y.morphTargets=H.morphTargets,Y.morphNormals=H.morphNormals,Y.morphTargetsCount=H.morphTargetsCount,Y.numClippingPlanes=H.numClippingPlanes,Y.numIntersection=H.numClipIntersection,Y.vertexAlphas=H.vertexAlphas,Y.vertexTangents=H.vertexTangents,Y.toneMapping=H.toneMapping}zo.setAnimationLoop(function(E){We&&We(E)}),typeof window<"u"&&zo.setContext(window),this.setAnimationLoop=function(E){We=E,Pt.setAnimationLoop(E),null===E?zo.stop():zo.start()},Pt.addEventListener("sessionstart",ui),Pt.addEventListener("sessionend",ur),this.render=function(E,H){if(void 0===H||!0===H.isCamera){if(!0!==M){if(!0===E.autoUpdate&&E.updateMatrixWorld(),null===H.parent&&H.updateMatrixWorld(),!0===Pt.enabled&&!0===Pt.isPresenting&&(!0===Pt.cameraAutoUpdate&&Pt.updateCamera(H),H=Pt.getCamera()),!0===E.isScene&&E.onBeforeRender(b,E,H,R),p=Fi.get(E,m.length),p.init(),m.push(p),Ne.multiplyMatrices(H.projectionMatrix,H.matrixWorldInverse),de.setFromProjectionMatrix(Ne),je=this.localClippingEnabled,pe=Z.init(this.clippingPlanes,je,H),u=ki.get(E,f.length),u.init(),f.push(u),Cr(E,H,0,b.sortObjects),u.finish(),!0===b.sortObjects&&u.sort(re,ce),!0===pe&&Z.beginShadows(),L.render(p.state.shadowsArray,E,H),!0===pe&&Z.endShadows(),!0===this.info.autoReset&&this.info.reset(),Ve.render(u,E),p.setupLights(b.physicallyCorrectLights),H.isArrayCamera){let J=H.cameras;for(let se=0,ze=J.length;se<ze;se++){let et=J[se];Ma(u,E,et,et.viewport)}}else Ma(u,E,H);null!==R&&(oe.updateMultisampleRenderTarget(R),oe.updateRenderTargetMipmap(R)),!0===E.isScene&&E.onAfterRender(b,E,H),ve.buffers.depth.setTest(!0),ve.buffers.depth.setMask(!0),ve.buffers.color.setMask(!0),ve.setPolygonOffset(!1),ln.resetDefaultState(),A=-1,V=null,m.pop(),p=m.length>0?m[m.length-1]:null,f.pop(),u=f.length>0?f[f.length-1]:null}}else console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.")},this.getActiveCubeFace=function(){return y},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return R},this.setRenderTargetTextures=function(E,H,Y){ft.get(E.texture).__webglTexture=H,ft.get(E.depthTexture).__webglTexture=Y;let J=ft.get(E);J.__hasExternalTextures=!0,J.__hasExternalTextures&&(J.__autoAllocateDepthBuffer=void 0===Y,J.__autoAllocateDepthBuffer||E.useRenderToTexture&&(console.warn("render-to-texture extension was disabled because an external texture was provided"),E.useRenderToTexture=!1,E.useRenderbuffer=!0))},this.setRenderTargetFramebuffer=function(E,H){let Y=ft.get(E);Y.__webglFramebuffer=H,Y.__useDefaultFramebuffer=void 0===H},this.setRenderTarget=function(E,H=0,Y=0){R=E,y=H,x=Y;let J=!0;if(E){let rt=ft.get(E);void 0!==rt.__useDefaultFramebuffer?(ve.bindFramebuffer(36160,null),J=!1):void 0===rt.__webglFramebuffer?oe.setupRenderTarget(E):rt.__hasExternalTextures&&oe.rebindTextures(E,ft.get(E.texture).__webglTexture,ft.get(E.depthTexture).__webglTexture)}let se=null,ze=!1,et=!1;if(E){let rt=E.texture;(rt.isDataTexture3D||rt.isDataTexture2DArray)&&(et=!0);let dt=ft.get(E).__webglFramebuffer;E.isWebGLCubeRenderTarget?(se=dt[H],ze=!0):se=E.useRenderbuffer?ft.get(E).__webglMultisampledFramebuffer:dt,te.copy(E.viewport),K.copy(E.scissor),xe=E.scissorTest}else te.copy(fe).multiplyScalar(D).floor(),K.copy(be).multiplyScalar(D).floor(),xe=ne;if(ve.bindFramebuffer(36160,se)&&on.drawBuffers&&J&&ve.drawBuffers(E,se),ve.viewport(te),ve.scissor(K),ve.setScissorTest(xe),ze){let rt=ft.get(E.texture);Oe.framebufferTexture2D(36160,36064,34069+H,rt.__webglTexture,Y)}else if(et){let rt=ft.get(E.texture);Oe.framebufferTextureLayer(36160,36064,rt.__webglTexture,Y||0,H||0)}A=-1},this.readRenderTargetPixels=function(E,H,Y,J,se,ze,et){if(!E||!E.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let qe=ft.get(E).__webglFramebuffer;if(E.isWebGLCubeRenderTarget&&void 0!==et&&(qe=qe[et]),qe){ve.bindFramebuffer(36160,qe);try{let rt=E.texture,dt=rt.format,St=rt.type;if(dt!==gs&&mn.convert(dt)!==Oe.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");let Dt=St===U0&&(wt.has("EXT_color_buffer_half_float")||on.isWebGL2&&wt.has("EXT_color_buffer_float"));if(!(St===mp||mn.convert(St)===Oe.getParameter(35738)||St===cm&&(on.isWebGL2||wt.has("OES_texture_float")||wt.has("WEBGL_color_buffer_float"))||Dt))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");36053===Oe.checkFramebufferStatus(36160)?H>=0&&H<=E.width-J&&Y>=0&&Y<=E.height-se&&Oe.readPixels(H,Y,J,se,mn.convert(dt),mn.convert(St),ze):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let rt=null!==R?ft.get(R).__webglFramebuffer:null;ve.bindFramebuffer(36160,rt)}}},this.copyFramebufferToTexture=function(E,H,Y=0){if(!0!==H.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");let J=Math.pow(2,-Y),se=Math.floor(H.image.width*J),ze=Math.floor(H.image.height*J);oe.setTexture2D(H,0),Oe.copyTexSubImage2D(3553,Y,0,0,E.x,E.y,se,ze),ve.unbindTexture()},this.copyTextureToTexture=function(E,H,Y,J=0){let se=H.image.width,ze=H.image.height,et=mn.convert(Y.format),qe=mn.convert(Y.type);oe.setTexture2D(Y,0),Oe.pixelStorei(37440,Y.flipY),Oe.pixelStorei(37441,Y.premultiplyAlpha),Oe.pixelStorei(3317,Y.unpackAlignment),H.isDataTexture?Oe.texSubImage2D(3553,J,E.x,E.y,se,ze,et,qe,H.image.data):H.isCompressedTexture?Oe.compressedTexSubImage2D(3553,J,E.x,E.y,H.mipmaps[0].width,H.mipmaps[0].height,et,H.mipmaps[0].data):Oe.texSubImage2D(3553,J,E.x,E.y,et,qe,H.image),0===J&&Y.generateMipmaps&&Oe.generateMipmap(3553),ve.unbindTexture()},this.copyTextureToTexture3D=function(E,H,Y,J,se=0){if(b.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");let St,ze=E.max.x-E.min.x+1,et=E.max.y-E.min.y+1,qe=E.max.z-E.min.z+1,rt=mn.convert(J.format),dt=mn.convert(J.type);if(J.isDataTexture3D)oe.setTexture3D(J,0),St=32879;else{if(!J.isDataTexture2DArray)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");oe.setTexture2DArray(J,0),St=35866}Oe.pixelStorei(37440,J.flipY),Oe.pixelStorei(37441,J.premultiplyAlpha),Oe.pixelStorei(3317,J.unpackAlignment);let Dt=Oe.getParameter(3314),cn=Oe.getParameter(32878),Gi=Oe.getParameter(3316),vi=Oe.getParameter(3315),pn=Oe.getParameter(32877),Pn=Y.isCompressedTexture?Y.mipmaps[0]:Y.image;Oe.pixelStorei(3314,Pn.width),Oe.pixelStorei(32878,Pn.height),Oe.pixelStorei(3316,E.min.x),Oe.pixelStorei(3315,E.min.y),Oe.pixelStorei(32877,E.min.z),Y.isDataTexture||Y.isDataTexture3D?Oe.texSubImage3D(St,se,H.x,H.y,H.z,ze,et,qe,rt,dt,Pn.data):Y.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Oe.compressedTexSubImage3D(St,se,H.x,H.y,H.z,ze,et,qe,rt,Pn.data)):Oe.texSubImage3D(St,se,H.x,H.y,H.z,ze,et,qe,rt,dt,Pn),Oe.pixelStorei(3314,Dt),Oe.pixelStorei(32878,cn),Oe.pixelStorei(3316,Gi),Oe.pixelStorei(3315,vi),Oe.pixelStorei(32877,pn),0===se&&J.generateMipmaps&&Oe.generateMipmap(St),ve.unbindTexture()},this.initTexture=function(E){oe.setTexture2D(E,0),ve.unbindTexture()},this.resetState=function(){y=0,x=0,R=null,ve.reset(),ln.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}ji.prototype.isWebGLRenderer=!0,class extends ji{}.prototype.isWebGL1Renderer=!0;var Ax=class{constructor(t,e=25e-5){this.name="",this.color=new an(t),this.density=e}clone(){return new Ax(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Ax.prototype.isFogExp2=!0;var Rx=class{constructor(t,e=1,i=1e3){this.name="",this.color=new an(t),this.near=e,this.far=i}clone(){return new Rx(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};Rx.prototype.isFog=!0;var J0=class extends Bi{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),e}};J0.prototype.isScene=!0;var hm=class{constructor(t,e){this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=Cx,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Jl()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let r=0,o=this.stride;r<o;r++)this.array[t+r]=e.array[i+r];return this}set(t,e=0){return this.array.set(t,e),this}clone(t){void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Jl()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);let e=new this.array.constructor(t.arrayBuffers[this.array.buffer._uuid]),i=new this.constructor(e,this.stride);return i.setUsage(this.usage),i}onUpload(t){return this.onUploadCallback=t,this}toJSON(t){return void 0===t.arrayBuffers&&(t.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=Jl()),void 0===t.arrayBuffers[this.array.buffer._uuid]&&(t.arrayBuffers[this.array.buffer._uuid]=Array.prototype.slice.call(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}};hm.prototype.isInterleavedBuffer=!0;var Zr=new $,gm=class{constructor(t,e,i,r=!1){this.name="",this.data=t,this.itemSize=e,this.offset=i,this.normalized=!0===r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(t){this.data.needsUpdate=t}applyMatrix4(t){for(let e=0,i=this.data.count;e<i;e++)Zr.x=this.getX(e),Zr.y=this.getY(e),Zr.z=this.getZ(e),Zr.applyMatrix4(t),this.setXYZ(e,Zr.x,Zr.y,Zr.z);return this}applyNormalMatrix(t){for(let e=0,i=this.count;e<i;e++)Zr.x=this.getX(e),Zr.y=this.getY(e),Zr.z=this.getZ(e),Zr.applyNormalMatrix(t),this.setXYZ(e,Zr.x,Zr.y,Zr.z);return this}transformDirection(t){for(let e=0,i=this.count;e<i;e++)Zr.x=this.getX(e),Zr.y=this.getY(e),Zr.z=this.getZ(e),Zr.transformDirection(t),this.setXYZ(e,Zr.x,Zr.y,Zr.z);return this}setX(t,e){return this.data.array[t*this.data.stride+this.offset]=e,this}setY(t,e){return this.data.array[t*this.data.stride+this.offset+1]=e,this}setZ(t,e){return this.data.array[t*this.data.stride+this.offset+2]=e,this}setW(t,e){return this.data.array[t*this.data.stride+this.offset+3]=e,this}getX(t){return this.data.array[t*this.data.stride+this.offset]}getY(t){return this.data.array[t*this.data.stride+this.offset+1]}getZ(t){return this.data.array[t*this.data.stride+this.offset+2]}getW(t){return this.data.array[t*this.data.stride+this.offset+3]}setXY(t,e,i){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this}setXYZ(t,e,i,r){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=r,this}setXYZW(t,e,i,r,o){return this.data.array[(t=t*this.data.stride+this.offset)+0]=e,this.data.array[t+1]=i,this.data.array[t+2]=r,this.data.array[t+3]=o,this}clone(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interlaved buffer attribute will deinterleave buffer data.");let e=[];for(let i=0;i<this.count;i++){let r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[r+o])}return new Pr(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.clone(t)),new gm(t.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(t){if(void 0===t){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interlaved buffer attribute will deinterleave buffer data.");let e=[];for(let i=0;i<this.count;i++){let r=i*this.data.stride+this.offset;for(let o=0;o<this.itemSize;o++)e.push(this.data.array[r+o])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===t.interleavedBuffers&&(t.interleavedBuffers={}),void 0===t.interleavedBuffers[this.data.uuid]&&(t.interleavedBuffers[this.data.uuid]=this.data.toJSON(t)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}};gm.prototype.isInterleavedBufferAttribute=!0;var RI=class extends Ao{constructor(t){super(),this.type="SpriteMaterial",this.color=new an(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.rotation=t.rotation,this.sizeAttenuation=t.sizeAttenuation,this}};RI.prototype.isSpriteMaterial=!0;var k0,cx=new $,F0=new $,N0=new $,L0=new $e,dx=new $e,ate=new xn,rI=new $,ux=new $,oI=new $,bee=new $e,j3=new $e,vee=new $e;function sI(n,t,e,i,r,o){L0.subVectors(n,e).addScalar(.5).multiply(i),void 0!==r?(dx.x=o*L0.x-r*L0.y,dx.y=r*L0.x+o*L0.y):dx.copy(L0),n.copy(t),n.x+=dx.x,n.y+=dx.y,n.applyMatrix4(ate)}(class extends Bi{constructor(t){if(super(),this.type="Sprite",void 0===k0){k0=new Ui;let e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),i=new hm(e,5);k0.setIndex([0,1,2,0,2,3]),k0.setAttribute("position",new gm(i,3,0,!1)),k0.setAttribute("uv",new gm(i,2,3,!1))}this.geometry=k0,this.material=void 0!==t?t:new RI,this.center=new $e(.5,.5)}raycast(t,e){null===t.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),F0.setFromMatrixScale(this.matrixWorld),ate.copy(t.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(t.camera.matrixWorldInverse,this.matrixWorld),N0.setFromMatrixPosition(this.modelViewMatrix),t.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&F0.multiplyScalar(-N0.z);let r,o,i=this.material.rotation;0!==i&&(o=Math.cos(i),r=Math.sin(i));let s=this.center;sI(rI.set(-.5,-.5,0),N0,s,F0,r,o),sI(ux.set(.5,-.5,0),N0,s,F0,r,o),sI(oI.set(.5,.5,0),N0,s,F0,r,o),bee.set(0,0),j3.set(1,0),vee.set(1,1);let a=t.ray.intersectTriangle(rI,ux,oI,!1,cx);if(null===a&&(sI(ux.set(-.5,.5,0),N0,s,F0,r,o),j3.set(0,1),a=t.ray.intersectTriangle(rI,oI,ux,!1,cx),null===a))return;let l=t.ray.origin.distanceTo(cx);l<t.near||l>t.far||e.push({distance:l,point:cx.clone(),uv:Vr.getUV(cx,rI,ux,oI,bee,j3,vee,new $e),face:null,object:this})}copy(t){return super.copy(t),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}).prototype.isSprite=!0;var yee=new $,xee=new Zi,Cee=new Zi,e2e=new $,Mee=new xn,PI=class extends ao{constructor(t,e){super(t,e),this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new xn,this.bindMatrixInverse=new xn}copy(t){return super.copy(t),this.bindMode=t.bindMode,this.bindMatrix.copy(t.bindMatrix),this.bindMatrixInverse.copy(t.bindMatrixInverse),this.skeleton=t.skeleton,this}bind(t,e){this.skeleton=t,void 0===e&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),e=this.matrixWorld),this.bindMatrix.copy(e),this.bindMatrixInverse.copy(e).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){let t=new Zi,e=this.geometry.attributes.skinWeight;for(let i=0,r=e.count;i<r;i++){t.x=e.getX(i),t.y=e.getY(i),t.z=e.getZ(i),t.w=e.getW(i);let o=1/t.manhattanLength();o!==1/0?t.multiplyScalar(o):t.set(1,0,0,0),e.setXYZW(i,t.x,t.y,t.z,t.w)}}updateMatrixWorld(t){super.updateMatrixWorld(t),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(t,e){let i=this.skeleton,r=this.geometry;xee.fromBufferAttribute(r.attributes.skinIndex,t),Cee.fromBufferAttribute(r.attributes.skinWeight,t),yee.copy(e).applyMatrix4(this.bindMatrix),e.set(0,0,0);for(let o=0;o<4;o++){let s=Cee.getComponent(o);if(0!==s){let a=xee.getComponent(o);Mee.multiplyMatrices(i.bones[a].matrixWorld,i.boneInverses[a]),e.addScaledVector(e2e.copy(yee).applyMatrix4(Mee),s)}}return e.applyMatrix4(this.bindMatrixInverse)}};PI.prototype.isSkinnedMesh=!0,class extends Bi{constructor(){super(),this.type="Bone"}}.prototype.isBone=!0,class extends lo{constructor(t=null,e=1,i=1,r,o,s,a,l,c=_o,d=_o,u,p){super(null,s,a,l,c,d,r,o,u,p),this.image={data:t,width:e,height:i},this.magFilter=c,this.minFilter=d,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}.prototype.isDataTexture=!0;var Px=class extends Pr{constructor(t,e,i,r=1){"number"==typeof i&&(r=i,i=!1,console.error("THREE.InstancedBufferAttribute: The constructor now expects normalized as the third argument.")),super(t,e,i),this.meshPerAttribute=r}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}toJSON(){let t=super.toJSON();return t.meshPerAttribute=this.meshPerAttribute,t.isInstancedBufferAttribute=!0,t}};Px.prototype.isInstancedBufferAttribute=!0;var wee=new xn,See=new xn,aI=[],px=new ao;(class extends ao{constructor(t,e,i){super(t,e),this.instanceMatrix=new Px(new Float32Array(16*i),16),this.instanceColor=null,this.count=i,this.frustumCulled=!1}copy(t){return super.copy(t),this.instanceMatrix.copy(t.instanceMatrix),null!==t.instanceColor&&(this.instanceColor=t.instanceColor.clone()),this.count=t.count,this}getColorAt(t,e){e.fromArray(this.instanceColor.array,3*t)}getMatrixAt(t,e){e.fromArray(this.instanceMatrix.array,16*t)}raycast(t,e){let i=this.matrixWorld,r=this.count;if(px.geometry=this.geometry,px.material=this.material,void 0!==px.material)for(let o=0;o<r;o++){this.getMatrixAt(o,wee),See.multiplyMatrices(i,wee),px.matrixWorld=See,px.raycast(t,aI);for(let s=0,a=aI.length;s<a;s++){let l=aI[s];l.instanceId=o,l.object=this,e.push(l)}aI.length=0}}setColorAt(t,e){null===this.instanceColor&&(this.instanceColor=new Px(new Float32Array(3*this.instanceMatrix.count),3)),e.toArray(this.instanceColor.array,3*t)}setMatrixAt(t,e){e.toArray(this.instanceMatrix.array,16*t)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}).prototype.isInstancedMesh=!0;var Wd=class extends Ao{constructor(t){super(),this.type="LineBasicMaterial",this.color=new an(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this}};Wd.prototype.isLineBasicMaterial=!0;var Eee=new $,Tee=new $,Dee=new xn,G3=new vp,lI=new bp,Ox=class extends Bi{constructor(t=new Ui,e=new Wd){super(),this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(null===t.index){let e=t.attributes.position,i=[0];for(let r=1,o=e.count;r<o;r++)Eee.fromBufferAttribute(e,r-1),Tee.fromBufferAttribute(e,r),i[r]=i[r-1],i[r]+=Eee.distanceTo(Tee);t.setAttribute("lineDistance",new Nr(i,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.Line.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}raycast(t,e){let i=this.geometry,r=this.matrixWorld,o=t.params.Line.threshold,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),lI.copy(i.boundingSphere),lI.applyMatrix4(r),lI.radius+=o,!1===t.ray.intersectsSphere(lI))return;Dee.copy(r).invert(),G3.copy(t.ray).applyMatrix4(Dee);let a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a,c=new $,d=new $,u=new $,p=new $,f=this.isLineSegments?2:1;if(i.isBufferGeometry){let m=i.index,M=i.attributes.position;if(null!==m)for(let R=Math.max(0,s.start),A=Math.min(m.count,s.start+s.count)-1;R<A;R+=f){let V=m.getX(R),te=m.getX(R+1);if(c.fromBufferAttribute(M,V),d.fromBufferAttribute(M,te),G3.distanceSqToSegment(c,d,p,u)>l)continue;p.applyMatrix4(this.matrixWorld);let xe=t.ray.origin.distanceTo(p);xe<t.near||xe>t.far||e.push({distance:xe,point:u.clone().applyMatrix4(this.matrixWorld),index:R,face:null,faceIndex:null,object:this})}else for(let R=Math.max(0,s.start),A=Math.min(M.count,s.start+s.count)-1;R<A;R+=f){if(c.fromBufferAttribute(M,R),d.fromBufferAttribute(M,R+1),G3.distanceSqToSegment(c,d,p,u)>l)continue;p.applyMatrix4(this.matrixWorld);let te=t.ray.origin.distanceTo(p);te<t.near||te>t.far||e.push({distance:te,point:u.clone().applyMatrix4(this.matrixWorld),index:R,face:null,faceIndex:null,object:this})}}else i.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Ox.prototype.isLine=!0;var Iee=new $,Aee=new $,kx=class extends Ox{constructor(t,e){super(t,e),this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(null===t.index){let e=t.attributes.position,i=[];for(let r=0,o=e.count;r<o;r+=2)Iee.fromBufferAttribute(e,r),Aee.fromBufferAttribute(e,r+1),i[r]=0===r?0:i[r-1],i[r+1]=i[r]+Iee.distanceTo(Aee);t.setAttribute("lineDistance",new Nr(i,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");else t.isGeometry&&console.error("THREE.LineSegments.computeLineDistances() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.");return this}};kx.prototype.isLineSegments=!0,class extends Ox{constructor(t,e){super(t,e),this.type="LineLoop"}}.prototype.isLineLoop=!0;var OI=class extends Ao{constructor(t){super(),this.type="PointsMaterial",this.color=new an(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.alphaMap=t.alphaMap,this.size=t.size,this.sizeAttenuation=t.sizeAttenuation,this}};OI.prototype.isPointsMaterial=!0;var Ree=new xn,hB=new vp,cI=new bp,dI=new $;function Pee(n,t,e,i,r,o,s){let a=hB.distanceSqToPoint(n);if(a<e){let l=new $;hB.closestPointToPoint(n,l),l.applyMatrix4(i);let c=r.ray.origin.distanceTo(l);if(c<r.near||c>r.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:s})}}(class extends Bi{constructor(t=new Ui,e=new OI){super(),this.type="Points",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t){return super.copy(t),this.material=t.material,this.geometry=t.geometry,this}raycast(t,e){let i=this.geometry,r=this.matrixWorld,o=t.params.Points.threshold,s=i.drawRange;if(null===i.boundingSphere&&i.computeBoundingSphere(),cI.copy(i.boundingSphere),cI.applyMatrix4(r),cI.radius+=o,!1===t.ray.intersectsSphere(cI))return;Ree.copy(r).invert(),hB.copy(t.ray).applyMatrix4(Ree);let a=o/((this.scale.x+this.scale.y+this.scale.z)/3),l=a*a;if(i.isBufferGeometry){let c=i.index,u=i.attributes.position;if(null!==c)for(let m=Math.max(0,s.start),b=Math.min(c.count,s.start+s.count);m<b;m++){let M=c.getX(m);dI.fromBufferAttribute(u,M),Pee(dI,M,l,r,t,e,this)}else for(let m=Math.max(0,s.start),b=Math.min(u.count,s.start+s.count);m<b;m++)dI.fromBufferAttribute(u,m),Pee(dI,m,l,r,t,e,this)}else console.error("THREE.Points.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,i=Object.keys(e);if(i.length>0){let r=e[i[0]];if(void 0!==r){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o<s;o++){let a=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[a]=o}}}}else{let e=t.morphTargets;void 0!==e&&e.length>0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}).prototype.isPoints=!0,class extends lo{constructor(t,e,i,r,o,s,a,l,c){super(t,e,i,r,o,s,a,l,c),this.minFilter=void 0!==s?s:$o,this.magFilter=void 0!==o?o:$o,this.generateMipmaps=!1;let d=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function u(){d.needsUpdate=!0,t.requestVideoFrameCallback(u)})}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;"requestVideoFrameCallback"in t==0&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}.prototype.isVideoTexture=!0,class extends lo{constructor(t,e,i){super({width:t,height:e}),this.format=i,this.magFilter=_o,this.minFilter=_o,this.generateMipmaps=!1,this.needsUpdate=!0}}.prototype.isFramebufferTexture=!0,class extends lo{constructor(t,e,i,r,o,s,a,l,c,d,u,p){super(null,s,a,l,c,d,r,o,u,p),this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}.prototype.isCompressedTexture=!0,class extends lo{constructor(t,e,i,r,o,s,a,l,c){super(t,e,i,r,o,s,a,l,c),this.needsUpdate=!0}}.prototype.isCanvasTexture=!0;var $0=class extends Ui{constructor(t=1,e=8,i=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:i,thetaLength:r},e=Math.max(3,e);let o=[],s=[],a=[],l=[],c=new $,d=new $e;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let u=0,p=3;u<=e;u++,p+=3){let f=i+u/e*r;c.x=t*Math.cos(f),c.y=t*Math.sin(f),s.push(c.x,c.y,c.z),a.push(0,0,1),d.x=(s[p]/t+1)/2,d.y=(s[p+1]/t+1)/2,l.push(d.x,d.y)}for(let u=1;u<=e;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new Nr(s,3)),this.setAttribute("normal",new Nr(a,3)),this.setAttribute("uv",new Nr(l,2))}static fromJSON(t){return new $0(t.radius,t.segments,t.thetaStart,t.thetaLength)}},$s=(new $,new $,new $,new Vr,class{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(t,e){let i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let i,e=[],r=this.getPoint(0),o=0;e.push(0);for(let s=1;s<=t;s++)i=this.getPoint(s/t),o+=i.distanceTo(r),e.push(o),r=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e){let s,i=this.getLengths(),r=0,o=i.length;s=e||t*i[o-1];let c,a=0,l=o-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),c=i[r]-s,c<0)a=r+1;else{if(!(c>0)){l=r;break}l=r-1}if(r=l,i[r]===s)return r/(o-1);let d=i[r];return(r+(s-d)/(i[r+1]-d))/(o-1)}getTangent(t,e){let r=t-1e-4,o=t+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),l=e||(s.isVector2?new $e:new $);return l.copy(a).sub(s).normalize(),l}getTangentAt(t,e){let i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e){let i=new $,r=[],o=[],s=[],a=new $,l=new xn;for(let f=0;f<=t;f++)r[f]=this.getTangentAt(f/t,new $);o[0]=new $,s[0]=new $;let c=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),p=Math.abs(r[0].z);d<=c&&(c=d,i.set(1,0,0)),u<=c&&(c=u,i.set(0,1,0)),p<=c&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let f=1;f<=t;f++){if(o[f]=o[f-1].clone(),s[f]=s[f-1].clone(),a.crossVectors(r[f-1],r[f]),a.length()>Number.EPSILON){a.normalize();let m=Math.acos(Ks(r[f-1].dot(r[f]),-1,1));o[f].applyMatrix4(l.makeRotationAxis(a,m))}s[f].crossVectors(r[f],o[f])}if(!0===e){let f=Math.acos(Ks(o[0].dot(o[t]),-1,1));f/=t,r[0].dot(a.crossVectors(o[0],o[t]))>0&&(f=-f);for(let m=1;m<=t;m++)o[m].applyMatrix4(l.makeRotationAxis(r[m],f*m)),s[m].crossVectors(r[m],o[m])}return{tangents:r,normals:o,binormals:s}}clone(){return(new this.constructor).copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),e_=class extends $s{constructor(t=0,e=0,i=1,r=1,o=0,s=2*Math.PI,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(t,e){let i=e||new $e,r=2*Math.PI,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)<Number.EPSILON;for(;o<0;)o+=r;for(;o>r;)o-=r;o<Number.EPSILON&&(o=s?0:r),!0===this.aClockwise&&!s&&(o===r?o=-r:o-=r);let a=this.aStartAngle+t*o,l=this.aX+this.xRadius*Math.cos(a),c=this.aY+this.yRadius*Math.sin(a);if(0!==this.aRotation){let d=Math.cos(this.aRotation),u=Math.sin(this.aRotation),p=l-this.aX,f=c-this.aY;l=p*d-f*u+this.aX,c=p*u+f*d+this.aY}return i.set(l,c)}copy(t){return super.copy(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}toJSON(){let t=super.toJSON();return t.aX=this.aX,t.aY=this.aY,t.xRadius=this.xRadius,t.yRadius=this.yRadius,t.aStartAngle=this.aStartAngle,t.aEndAngle=this.aEndAngle,t.aClockwise=this.aClockwise,t.aRotation=this.aRotation,t}fromJSON(t){return super.fromJSON(t),this.aX=t.aX,this.aY=t.aY,this.xRadius=t.xRadius,this.yRadius=t.yRadius,this.aStartAngle=t.aStartAngle,this.aEndAngle=t.aEndAngle,this.aClockwise=t.aClockwise,this.aRotation=t.aRotation,this}};e_.prototype.isEllipseCurve=!0;var kI=class extends e_{constructor(t,e,i,r,o,s){super(t,e,i,i,r,o,s),this.type="ArcCurve"}};function mV(){let n=0,t=0,e=0,i=0;function r(o,s,a,l){n=o,t=a,e=-3*o+3*s-2*a-l,i=2*o-2*s+a+l}return{initCatmullRom:function(o,s,a,l,c){r(s,a,c*(a-o),c*(l-s))},initNonuniformCatmullRom:function(o,s,a,l,c,d,u){let p=(s-o)/c-(a-o)/(c+d)+(a-s)/d,f=(a-s)/d-(l-s)/(d+u)+(l-a)/u;p*=d,f*=d,r(s,a,p,f)},calc:function(o){let s=o*o;return n+t*o+e*s+i*(s*o)}}}kI.prototype.isArcCurve=!0;var uI=new $,W3=new mV,q3=new mV,Y3=new mV,FI=class extends $s{constructor(t=[],e=!1,i="centripetal",r=.5){super(),this.type="CatmullRomCurve3",this.points=t,this.closed=e,this.curveType=i,this.tension=r}getPoint(t,e=new $){let c,d,i=e,r=this.points,o=r.length,s=(o-(this.closed?0:1))*t,a=Math.floor(s),l=s-a;this.closed?a+=a>0?0:(Math.floor(Math.abs(a)/o)+1)*o:0===l&&a===o-1&&(a=o-2,l=1),this.closed||a>0?c=r[(a-1)%o]:(uI.subVectors(r[0],r[1]).add(r[0]),c=uI);let u=r[a%o],p=r[(a+1)%o];if(this.closed||a+2<o?d=r[(a+2)%o]:(uI.subVectors(r[o-1],r[o-2]).add(r[o-1]),d=uI),"centripetal"===this.curveType||"chordal"===this.curveType){let f="chordal"===this.curveType?.5:.25,m=Math.pow(c.distanceToSquared(u),f),b=Math.pow(u.distanceToSquared(p),f),M=Math.pow(p.distanceToSquared(d),f);b<1e-4&&(b=1),m<1e-4&&(m=b),M<1e-4&&(M=b),W3.initNonuniformCatmullRom(c.x,u.x,p.x,d.x,m,b,M),q3.initNonuniformCatmullRom(c.y,u.y,p.y,d.y,m,b,M),Y3.initNonuniformCatmullRom(c.z,u.z,p.z,d.z,m,b,M)}else"catmullrom"===this.curveType&&(W3.initCatmullRom(c.x,u.x,p.x,d.x,this.tension),q3.initCatmullRom(c.y,u.y,p.y,d.y,this.tension),Y3.initCatmullRom(c.z,u.z,p.z,d.z,this.tension));return i.set(W3.calc(l),q3.calc(l),Y3.calc(l)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}toJSON(){let t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t.closed=this.closed,t.curveType=this.curveType,t.tension=this.tension,t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){let r=t.points[e];this.points.push((new $).fromArray(r))}return this.closed=t.closed,this.curveType=t.curveType,this.tension=t.tension,this}};function Oee(n,t,e,i,r){let o=.5*(i-t),s=.5*(r-e),a=n*n;return(2*e-2*i+o+s)*(n*a)+(-3*e+3*i-2*o-s)*a+o*n+e}function bx(n,t,e,i){return function(n,t){let e=1-n;return e*e*t}(n,t)+function(n,t){return 2*(1-n)*n*t}(n,e)+function(n,t){return n*n*t}(n,i)}function vx(n,t,e,i,r){return function(n,t){let e=1-n;return e*e*e*t}(n,t)+function(n,t){let e=1-n;return 3*e*e*n*t}(n,e)+function(n,t){return 3*(1-n)*n*n*t}(n,i)+function(n,t){return n*n*n*t}(n,r)}FI.prototype.isCatmullRomCurve3=!0;var Fx=class extends $s{constructor(t=new $e,e=new $e,i=new $e,r=new $e){super(),this.type="CubicBezierCurve",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new $e){let i=e,r=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(vx(t,r.x,o.x,s.x,a.x),vx(t,r.y,o.y,s.y,a.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};Fx.prototype.isCubicBezierCurve=!0;var NI=class extends $s{constructor(t=new $,e=new $,i=new $,r=new $){super(),this.type="CubicBezierCurve3",this.v0=t,this.v1=e,this.v2=i,this.v3=r}getPoint(t,e=new $){let i=e,r=this.v0,o=this.v1,s=this.v2,a=this.v3;return i.set(vx(t,r.x,o.x,s.x,a.x),vx(t,r.y,o.y,s.y,a.y),vx(t,r.z,o.z,s.z,a.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this.v3.copy(t.v3),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t.v3=this.v3.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this.v3.fromArray(t.v3),this}};NI.prototype.isCubicBezierCurve3=!0;var t_=class extends $s{constructor(t=new $e,e=new $e){super(),this.type="LineCurve",this.v1=t,this.v2=e}getPoint(t,e=new $e){let i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}getTangent(t,e){let i=e||new $e;return i.copy(this.v2).sub(this.v1).normalize(),i}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};t_.prototype.isLineCurve=!0;var Nx=class extends $s{constructor(t=new $e,e=new $e,i=new $e){super(),this.type="QuadraticBezierCurve",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new $e){let i=e,r=this.v0,o=this.v1,s=this.v2;return i.set(bx(t,r.x,o.x,s.x),bx(t,r.y,o.y,s.y)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};Nx.prototype.isQuadraticBezierCurve=!0;var LI=class extends $s{constructor(t=new $,e=new $,i=new $){super(),this.type="QuadraticBezierCurve3",this.v0=t,this.v1=e,this.v2=i}getPoint(t,e=new $){let i=e,r=this.v0,o=this.v1,s=this.v2;return i.set(bx(t,r.x,o.x,s.x),bx(t,r.y,o.y,s.y),bx(t,r.z,o.z,s.z)),i}copy(t){return super.copy(t),this.v0.copy(t.v0),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v0=this.v0.toArray(),t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v0.fromArray(t.v0),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}};LI.prototype.isQuadraticBezierCurve3=!0;var Lx=class extends $s{constructor(t=[]){super(),this.type="SplineCurve",this.points=t}getPoint(t,e=new $e){let i=e,r=this.points,o=(r.length-1)*t,s=Math.floor(o),a=o-s,l=r[0===s?s:s-1],c=r[s],d=r[s>r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return i.set(Oee(a,l.x,c.x,d.x,u.x),Oee(a,l.y,c.y,d.y,u.y)),i}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++)this.points.push(t.points[e].clone());return this}toJSON(){let t=super.toJSON();t.points=[];for(let e=0,i=this.points.length;e<i;e++)t.points.push(this.points[e].toArray());return t}fromJSON(t){super.fromJSON(t),this.points=[];for(let e=0,i=t.points.length;e<i;e++){let r=t.points[e];this.points.push((new $e).fromArray(r))}return this}};Lx.prototype.isSplineCurve=!0;var lte=Object.freeze({__proto__:null,ArcCurve:kI,CatmullRomCurve3:FI,CubicBezierCurve:Fx,CubicBezierCurve3:NI,EllipseCurve:e_,LineCurve:t_,LineCurve3:class extends $s{constructor(t=new $,e=new $){super(),this.type="LineCurve3",this.isLineCurve3=!0,this.v1=t,this.v2=e}getPoint(t,e=new $){let i=e;return 1===t?i.copy(this.v2):(i.copy(this.v2).sub(this.v1),i.multiplyScalar(t).add(this.v1)),i}getPointAt(t,e){return this.getPoint(t,e)}copy(t){return super.copy(t),this.v1.copy(t.v1),this.v2.copy(t.v2),this}toJSON(){let t=super.toJSON();return t.v1=this.v1.toArray(),t.v2=this.v2.toArray(),t}fromJSON(t){return super.fromJSON(t),this.v1.fromArray(t.v1),this.v2.fromArray(t.v2),this}},QuadraticBezierCurve:Nx,QuadraticBezierCurve3:LI,SplineCurve:Lx}),CB=class extends $s{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(t){this.curves.push(t)}closePath(){let t=this.curves[0].getPoint(0),e=this.curves[this.curves.length-1].getPoint(1);t.equals(e)||this.curves.push(new t_(e,t))}getPoint(t,e){let i=t*this.getLength(),r=this.getCurveLengths(),o=0;for(;o<r.length;){if(r[o]>=i){let s=r[o]-i,a=this.curves[o],l=a.getLength();return a.getPointAt(0===l?0:1-s/l,e)}o++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],e=0;for(let i=0,r=this.curves.length;i<r;i++)e+=this.curves[i].getLength(),t.push(e);return this.cacheLengths=t,t}getSpacedPoints(t=40){let e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return this.autoClose&&e.push(e[0]),e}getPoints(t=12){let i,e=[];for(let r=0,o=this.curves;r<o.length;r++){let s=o[r],l=s.getPoints(s&&s.isEllipseCurve?2*t:s&&(s.isLineCurve||s.isLineCurve3)?1:s&&s.isSplineCurve?t*s.points.length:t);for(let c=0;c<l.length;c++){let d=l[c];i&&i.equals(d)||(e.push(d),i=d)}}return this.autoClose&&e.length>1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,i=t.curves.length;e<i;e++)this.curves.push(t.curves[e].clone());return this.autoClose=t.autoClose,this}toJSON(){let t=super.toJSON();t.autoClose=this.autoClose,t.curves=[];for(let e=0,i=this.curves.length;e<i;e++)t.curves.push(this.curves[e].toJSON());return t}fromJSON(t){super.fromJSON(t),this.autoClose=t.autoClose,this.curves=[];for(let e=0,i=t.curves.length;e<i;e++){let r=t.curves[e];this.curves.push((new lte[r.type]).fromJSON(r))}return this}},Bx=class extends CB{constructor(t){super(),this.type="Path",this.currentPoint=new $e,t&&this.setFromPoints(t)}setFromPoints(t){this.moveTo(t[0].x,t[0].y);for(let e=1,i=t.length;e<i;e++)this.lineTo(t[e].x,t[e].y);return this}moveTo(t,e){return this.currentPoint.set(t,e),this}lineTo(t,e){let i=new t_(this.currentPoint.clone(),new $e(t,e));return this.curves.push(i),this.currentPoint.set(t,e),this}quadraticCurveTo(t,e,i,r){let o=new Nx(this.currentPoint.clone(),new $e(t,e),new $e(i,r));return this.curves.push(o),this.currentPoint.set(i,r),this}bezierCurveTo(t,e,i,r,o,s){let a=new Fx(this.currentPoint.clone(),new $e(t,e),new $e(i,r),new $e(o,s));return this.curves.push(a),this.currentPoint.set(o,s),this}splineThru(t){let e=[this.currentPoint.clone()].concat(t),i=new Lx(e);return this.curves.push(i),this.currentPoint.copy(t[t.length-1]),this}arc(t,e,i,r,o,s){return this.absarc(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,s),this}absarc(t,e,i,r,o,s){return this.absellipse(t,e,i,i,r,o,s),this}ellipse(t,e,i,r,o,s,a,l){return this.absellipse(t+this.currentPoint.x,e+this.currentPoint.y,i,r,o,s,a,l),this}absellipse(t,e,i,r,o,s,a,l){let c=new e_(t,e,i,r,o,s,a,l);if(this.curves.length>0){let u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);let d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}},qd=class extends Bx{constructor(t){super(t),this.uuid=Jl(),this.type="Shape",this.holes=[]}getPointsHoles(t){let e=[];for(let i=0,r=this.holes.length;i<r;i++)e[i]=this.holes[i].getPoints(t);return e}extractPoints(t){return{shape:this.getPoints(t),holes:this.getPointsHoles(t)}}copy(t){super.copy(t),this.holes=[];for(let e=0,i=t.holes.length;e<i;e++)this.holes.push(t.holes[e].clone());return this}toJSON(){let t=super.toJSON();t.uuid=this.uuid,t.holes=[];for(let e=0,i=this.holes.length;e<i;e++)t.holes.push(this.holes[e].toJSON());return t}fromJSON(t){super.fromJSON(t),this.uuid=t.uuid,this.holes=[];for(let e=0,i=t.holes.length;e<i;e++){let r=t.holes[e];this.holes.push((new Bx).fromJSON(r))}return this}};function cte(n,t,e,i,r){let o,s;if(r===function(n,t,e,i){let r=0;for(let o=t,s=e-i;o<e;o+=i)r+=(n[s]-n[o])*(n[o+1]+n[s+1]),s=o;return r}(n,t,e,i)>0)for(o=t;o<e;o+=i)s=kee(o,n[o],n[o+1],s);else for(o=e-i;o>=t;o-=i)s=kee(o,n[o],n[o+1],s);return s&&KI(s,s.next)&&(zx(s),s=s.next),s}function xp(n,t){if(!n)return n;t||(t=n);let i,e=n;do{if(i=!1,e.steiner||!KI(e,e.next)&&0!==Fr(e.prev,e,e.next))e=e.next;else{if(zx(e),e=t=e.prev,e===e.next)break;i=!0}}while(i||e!==t);return t}function Vx(n,t,e,i,r,o,s){if(!n)return;!s&&o&&function(n,t,e,i){let r=n;do{null===r.z&&(r.z=MB(r.x,r.y,t,e,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,function(n){let t,e,i,r,o,s,a,l,c=1;do{for(e=n,n=null,o=null,s=0;e;){for(s++,i=e,a=0,t=0;t<c&&(a++,i=i.nextZ,i);t++);for(l=c;a>0||l>0&&i;)0!==a&&(0===l||!i||e.z<=i.z)?(r=e,e=e.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:n=r,r.prevZ=o,o=r;e=i}o.nextZ=null,c*=2}while(s>1)}(r)}(n,i,r,o);let l,c,a=n;for(;n.prev!==n.next;)if(l=n.prev,c=n.next,o?d2e(n,i,r,o):c2e(n))t.push(l.i/e),t.push(n.i/e),t.push(c.i/e),zx(n),n=c.next,a=c.next;else if((n=c)===a){s?1===s?Vx(n=u2e(xp(n),t,e),t,e,i,r,o,2):2===s&&p2e(n,t,e,i,r,o):Vx(xp(n),t,e,i,r,o,1);break}}function c2e(n){let t=n.prev,e=n,i=n.next;if(Fr(t,e,i)>=0)return!1;let r=n.next.next;for(;r!==n.prev;){if(z0(t.x,t.y,e.x,e.y,i.x,i.y,r.x,r.y)&&Fr(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function d2e(n,t,e,i){let r=n.prev,o=n,s=n.next;if(Fr(r,o,s)>=0)return!1;let c=r.x>o.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,d=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=MB(r.x<o.x?r.x<s.x?r.x:s.x:o.x<s.x?o.x:s.x,r.y<o.y?r.y<s.y?r.y:s.y:o.y<s.y?o.y:s.y,t,e,i),p=MB(c,d,t,e,i),f=n.prevZ,m=n.nextZ;for(;f&&f.z>=u&&m&&m.z<=p;){if(f!==n.prev&&f!==n.next&&z0(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Fr(f.prev,f,f.next)>=0||(f=f.prevZ,m!==n.prev&&m!==n.next&&z0(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&Fr(m.prev,m,m.next)>=0))return!1;m=m.nextZ}for(;f&&f.z>=u;){if(f!==n.prev&&f!==n.next&&z0(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&Fr(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;m&&m.z<=p;){if(m!==n.prev&&m!==n.next&&z0(r.x,r.y,o.x,o.y,s.x,s.y,m.x,m.y)&&Fr(m.prev,m,m.next)>=0)return!1;m=m.nextZ}return!0}function u2e(n,t,e){let i=n;do{let r=i.prev,o=i.next.next;!KI(r,o)&&dte(r,i,i.next,o)&&Hx(r,o)&&Hx(o,r)&&(t.push(r.i/e),t.push(i.i/e),t.push(o.i/e),zx(i),zx(i.next),i=n=o),i=i.next}while(i!==n);return xp(i)}function p2e(n,t,e,i,r,o){let s=n;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&x2e(s,a)){let l=ute(s,a);return s=xp(s,s.next),l=xp(l,l.next),Vx(s,t,e,i,r,o),void Vx(l,t,e,i,r,o)}a=a.next}s=s.next}while(s!==n)}function m2e(n,t){return n.x-t.x}function h2e(n,t){if(t=function(n,t){let s,e=t,i=n.x,r=n.y,o=-1/0;do{if(r<=e.y&&r>=e.next.y&&e.next.y!==e.y){let p=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(p<=i&&p>o){if(o=p,p===i){if(r===e.y)return e;if(r===e.next.y)return e.next}s=e.x<e.next.x?e:e.next}}e=e.next}while(e!==t);if(!s)return null;if(i===o)return s;let u,a=s,l=s.x,c=s.y,d=1/0;e=s;do{i>=e.x&&e.x>=l&&i!==e.x&&z0(r<c?i:o,r,l,c,r<c?o:i,r,e.x,e.y)&&(u=Math.abs(r-e.y)/(i-e.x),Hx(e,n)&&(u<d||u===d&&(e.x>s.x||e.x===s.x&&_2e(s,e)))&&(s=e,d=u)),e=e.next}while(e!==a);return s}(n,t),t){let e=ute(t,n);xp(t,t.next),xp(e,e.next)}}function _2e(n,t){return Fr(n.prev,n,t.prev)<0&&Fr(t.next,n,n.next)<0}function MB(n,t,e,i,r){return(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-e)*r)|n<<8))|n<<4))|n<<2))|n<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-i)*r)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function y2e(n){let t=n,e=n;do{(t.x<e.x||t.x===e.x&&t.y<e.y)&&(e=t),t=t.next}while(t!==n);return e}function z0(n,t,e,i,r,o,s,a){return(r-s)*(t-a)-(n-s)*(o-a)>=0&&(n-s)*(i-a)-(e-s)*(t-a)>=0&&(e-s)*(o-a)-(r-s)*(i-a)>=0}function x2e(n,t){return n.next.i!==t.i&&n.prev.i!==t.i&&!function(n,t){let e=n;do{if(e.i!==n.i&&e.next.i!==n.i&&e.i!==t.i&&e.next.i!==t.i&&dte(e,e.next,n,t))return!0;e=e.next}while(e!==n);return!1}(n,t)&&(Hx(n,t)&&Hx(t,n)&&function(n,t){let e=n,i=!1,r=(n.x+t.x)/2,o=(n.y+t.y)/2;do{e.y>o!=e.next.y>o&&e.next.y!==e.y&&r<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(i=!i),e=e.next}while(e!==n);return i}(n,t)&&(Fr(n.prev,n,t.prev)||Fr(n,t.prev,t))||KI(n,t)&&Fr(n.prev,n,n.next)>0&&Fr(t.prev,t,t.next)>0)}function Fr(n,t,e){return(t.y-n.y)*(e.x-t.x)-(t.x-n.x)*(e.y-t.y)}function KI(n,t){return n.x===t.x&&n.y===t.y}function dte(n,t,e,i){let r=fI(Fr(n,t,e)),o=fI(Fr(n,t,i)),s=fI(Fr(e,i,n)),a=fI(Fr(e,i,t));return!!(r!==o&&s!==a||0===r&&pI(n,e,t)||0===o&&pI(n,i,t)||0===s&&pI(e,n,i)||0===a&&pI(e,t,i))}function pI(n,t,e){return t.x<=Math.max(n.x,e.x)&&t.x>=Math.min(n.x,e.x)&&t.y<=Math.max(n.y,e.y)&&t.y>=Math.min(n.y,e.y)}function fI(n){return n>0?1:n<0?-1:0}function Hx(n,t){return Fr(n.prev,n,n.next)<0?Fr(n,t,n.next)>=0&&Fr(n,n.prev,t)>=0:Fr(n,t,n.prev)<0||Fr(n,n.next,t)<0}function ute(n,t){let e=new wB(n.i,n.x,n.y),i=new wB(t.i,t.x,t.y),r=n.next,o=t.prev;return n.next=t,t.prev=n,e.next=r,r.prev=e,i.next=e,e.prev=i,o.next=i,i.prev=o,i}function kee(n,t,e,i){let r=new wB(n,t,e);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function zx(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function wB(n,t,e){this.i=n,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}var Yc=class{static area(t){let e=t.length,i=0;for(let r=e-1,o=0;o<e;r=o++)i+=t[r].x*t[o].y-t[o].x*t[r].y;return.5*i}static isClockWise(t){return Yc.area(t)<0}static triangulateShape(t,e){let i=[],r=[],o=[];Fee(t),Nee(i,t);let s=t.length;e.forEach(Fee);for(let l=0;l<e.length;l++)r.push(s),s+=e[l].length,Nee(i,e[l]);let a=function(n,t,e=2){let a,l,c,d,u,p,f,i=t&&t.length,r=i?t[0]*e:n.length,o=cte(n,0,r,e,!0),s=[];if(!o||o.next===o.prev)return s;if(i&&(o=function(n,t,e,i){let o,s,a,l,c,r=[];for(o=0,s=t.length;o<s;o++)a=t[o]*i,l=o<s-1?t[o+1]*i:n.length,c=cte(n,a,l,i,!1),c===c.next&&(c.steiner=!0),r.push(y2e(c));for(r.sort(m2e),o=0;o<r.length;o++)h2e(r[o],e),e=xp(e,e.next);return e}(n,t,o,e)),n.length>80*e){a=c=n[0],l=d=n[1];for(let m=e;m<r;m+=e)u=n[m],p=n[m+1],u<a&&(a=u),p<l&&(l=p),u>c&&(c=u),p>d&&(d=p);f=Math.max(c-a,d-l),f=0!==f?1/f:0}return Vx(o,s,e,a,l,f),s}(i,r);for(let l=0;l<a.length;l+=3)o.push(a.slice(l,l+3));return o}};function Fee(n){let t=n.length;t>2&&n[t-1].equals(n[0])&&n.pop()}function Nee(n,t){for(let e=0;e<t.length;e++)n.push(t[e].x),n.push(t[e].y)}var Cp=class extends Ui{constructor(t=new qd([new $e(.5,.5),new $e(-.5,.5),new $e(-.5,-.5),new $e(.5,-.5)]),e={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:t,options:e},t=Array.isArray(t)?t:[t];let i=this,r=[],o=[];for(let a=0,l=t.length;a<l;a++)s(t[a]);function s(a){let l=[],c=void 0!==e.curveSegments?e.curveSegments:12,d=void 0!==e.steps?e.steps:1,u=void 0!==e.depth?e.depth:1,p=void 0===e.bevelEnabled||e.bevelEnabled,f=void 0!==e.bevelThickness?e.bevelThickness:.2,m=void 0!==e.bevelSize?e.bevelSize:f-.1,b=void 0!==e.bevelOffset?e.bevelOffset:0,M=void 0!==e.bevelSegments?e.bevelSegments:3,y=e.extrudePath,x=void 0!==e.UVGenerator?e.UVGenerator:S2e;void 0!==e.amount&&(console.warn("THREE.ExtrudeBufferGeometry: amount has been renamed to depth."),u=e.amount);let R,V,te,K,xe,A=!1;y&&(R=y.getSpacedPoints(d),A=!0,p=!1,V=y.computeFrenetFrames(d,!1),te=new $,K=new $,xe=new $),p||(M=0,f=0,m=0,b=0);let Xe=a.extractPoints(c),De=Xe.shape,D=Xe.holes;if(!Yc.isClockWise(De)){De=De.reverse();for(let oe=0,st=D.length;oe<st;oe++){let Ye=D[oe];Yc.isClockWise(Ye)&&(D[oe]=Ye.reverse())}}let ce=Yc.triangulateShape(De,D),fe=De;for(let oe=0,st=D.length;oe<st;oe++)De=De.concat(D[oe]);function be(oe,st,Ye){return st||console.error("THREE.ExtrudeGeometry: vec does not exist"),st.clone().multiplyScalar(Ye).add(oe)}let ne=De.length,de=ce.length;function pe(oe,st,Ye){let _t,ut,sn,Cn=oe.x-st.x,ti=oe.y-st.y,ki=Ye.x-oe.x,Fi=Ye.y-oe.y,Z=Cn*Cn+ti*ti;if(Math.abs(Cn*Fi-ti*ki)>Number.EPSILON){let Ve=Math.sqrt(Z),vt=Math.sqrt(ki*ki+Fi*Fi),en=st.x-ti/Ve,Le=st.y+Cn/Ve,Ft=((Ye.x-Fi/vt-en)*Fi-(Ye.y+ki/vt-Le)*ki)/(Cn*Fi-ti*ki);_t=en+Cn*Ft-oe.x,ut=Le+ti*Ft-oe.y;let Pt=_t*_t+ut*ut;if(Pt<=2)return new $e(_t,ut);sn=Math.sqrt(Pt/2)}else{let Ve=!1;Cn>Number.EPSILON?ki>Number.EPSILON&&(Ve=!0):Cn<-Number.EPSILON?ki<-Number.EPSILON&&(Ve=!0):Math.sign(ti)===Math.sign(Fi)&&(Ve=!0),Ve?(_t=-ti,ut=Cn,sn=Math.sqrt(Z)):(_t=Cn,ut=ti,sn=Math.sqrt(Z/2))}return new $e(_t/sn,ut/sn)}let je=[];for(let oe=0,st=fe.length,Ye=st-1,_t=oe+1;oe<st;oe++,Ye++,_t++)Ye===st&&(Ye=0),_t===st&&(_t=0),je[oe]=pe(fe[oe],fe[Ye],fe[_t]);let Ne,Ce=[],lt=je.concat();for(let oe=0,st=D.length;oe<st;oe++){let Ye=D[oe];Ne=[];for(let _t=0,ut=Ye.length,sn=ut-1,Cn=_t+1;_t<ut;_t++,sn++,Cn++)sn===ut&&(sn=0),Cn===ut&&(Cn=0),Ne[_t]=pe(Ye[_t],Ye[sn],Ye[Cn]);Ce.push(Ne),lt=lt.concat(Ne)}for(let oe=0;oe<M;oe++){let st=oe/M,Ye=f*Math.cos(st*Math.PI/2),_t=m*Math.sin(st*Math.PI/2)+b;for(let ut=0,sn=fe.length;ut<sn;ut++){let Cn=be(fe[ut],je[ut],_t);wt(Cn.x,Cn.y,-Ye)}for(let ut=0,sn=D.length;ut<sn;ut++){let Cn=D[ut];Ne=Ce[ut];for(let ti=0,ki=Cn.length;ti<ki;ti++){let Fi=be(Cn[ti],Ne[ti],_t);wt(Fi.x,Fi.y,-Ye)}}}let Mt=m+b;for(let oe=0;oe<ne;oe++){let st=p?be(De[oe],lt[oe],Mt):De[oe];A?(K.copy(V.normals[0]).multiplyScalar(st.x),te.copy(V.binormals[0]).multiplyScalar(st.y),xe.copy(R[0]).add(K).add(te),wt(xe.x,xe.y,xe.z)):wt(st.x,st.y,0)}for(let oe=1;oe<=d;oe++)for(let st=0;st<ne;st++){let Ye=p?be(De[st],lt[st],Mt):De[st];A?(K.copy(V.normals[oe]).multiplyScalar(Ye.x),te.copy(V.binormals[oe]).multiplyScalar(Ye.y),xe.copy(R[oe]).add(K).add(te),wt(xe.x,xe.y,xe.z)):wt(Ye.x,Ye.y,u/d*oe)}for(let oe=M-1;oe>=0;oe--){let st=oe/M,Ye=f*Math.cos(st*Math.PI/2),_t=m*Math.sin(st*Math.PI/2)+b;for(let ut=0,sn=fe.length;ut<sn;ut++){let Cn=be(fe[ut],je[ut],_t);wt(Cn.x,Cn.y,u+Ye)}for(let ut=0,sn=D.length;ut<sn;ut++){let Cn=D[ut];Ne=Ce[ut];for(let ti=0,ki=Cn.length;ti<ki;ti++){let Fi=be(Cn[ti],Ne[ti],_t);A?wt(Fi.x,Fi.y+R[d-1].y,R[d-1].x+Ye):wt(Fi.x,Fi.y,u+Ye)}}}function An(oe,st){let Ye=oe.length;for(;--Ye>=0;){let _t=Ye,ut=Ye-1;ut<0&&(ut=oe.length-1);for(let sn=0,Cn=d+2*M;sn<Cn;sn++){let ti=ne*sn,ki=ne*(sn+1);ve(st+_t+ti,st+ut+ti,st+ut+ki,st+_t+ki)}}}function wt(oe,st,Ye){l.push(oe),l.push(st),l.push(Ye)}function on(oe,st,Ye){mt(oe),mt(st),mt(Ye);let _t=r.length/3,ut=x.generateTopUV(i,r,_t-3,_t-2,_t-1);ft(ut[0]),ft(ut[1]),ft(ut[2])}function ve(oe,st,Ye,_t){mt(oe),mt(st),mt(_t),mt(st),mt(Ye),mt(_t);let ut=r.length/3,sn=x.generateSideWallUV(i,r,ut-6,ut-3,ut-2,ut-1);ft(sn[0]),ft(sn[1]),ft(sn[3]),ft(sn[1]),ft(sn[2]),ft(sn[3])}function mt(oe){r.push(l[3*oe+0]),r.push(l[3*oe+1]),r.push(l[3*oe+2])}function ft(oe){o.push(oe.x),o.push(oe.y)}(function(){let oe=r.length/3;if(p){let st=0,Ye=ne*st;for(let _t=0;_t<de;_t++){let ut=ce[_t];on(ut[2]+Ye,ut[1]+Ye,ut[0]+Ye)}st=d+2*M,Ye=ne*st;for(let _t=0;_t<de;_t++){let ut=ce[_t];on(ut[0]+Ye,ut[1]+Ye,ut[2]+Ye)}}else{for(let st=0;st<de;st++){let Ye=ce[st];on(Ye[2],Ye[1],Ye[0])}for(let st=0;st<de;st++){let Ye=ce[st];on(Ye[0]+ne*d,Ye[1]+ne*d,Ye[2]+ne*d)}}i.addGroup(oe,r.length/3-oe,0)})(),function(){let oe=r.length/3,st=0;An(fe,st),st+=fe.length;for(let Ye=0,_t=D.length;Ye<_t;Ye++){let ut=D[Ye];An(ut,st),st+=ut.length}i.addGroup(oe,r.length/3-oe,1)}()}this.setAttribute("position",new Nr(r,3)),this.setAttribute("uv",new Nr(o,2)),this.computeVertexNormals()}toJSON(){let t=super.toJSON();return function(n,t,e){if(e.shapes=[],Array.isArray(n))for(let i=0,r=n.length;i<r;i++)e.shapes.push(n[i].uuid);else e.shapes.push(n.uuid);return void 0!==t.extrudePath&&(e.options.extrudePath=t.extrudePath.toJSON()),e}(this.parameters.shapes,this.parameters.options,t)}static fromJSON(t,e){let i=[];for(let o=0,s=t.shapes.length;o<s;o++)i.push(e[t.shapes[o]]);let r=t.options.extrudePath;return void 0!==r&&(t.options.extrudePath=(new lte[r.type]).fromJSON(r)),new Cp(i,t.options)}},S2e={generateTopUV:function(n,t,e,i,r){let a=t[3*i],l=t[3*i+1],c=t[3*r],d=t[3*r+1];return[new $e(t[3*e],t[3*e+1]),new $e(a,l),new $e(c,d)]},generateSideWallUV:function(n,t,e,i,r,o){let s=t[3*e],a=t[3*e+1],l=t[3*e+2],c=t[3*i],d=t[3*i+1],u=t[3*i+2],p=t[3*r],f=t[3*r+1],m=t[3*r+2],b=t[3*o],M=t[3*o+1],y=t[3*o+2];return Math.abs(a-d)<Math.abs(s-c)?[new $e(s,1-l),new $e(c,1-u),new $e(p,1-m),new $e(b,1-y)]:[new $e(a,1-l),new $e(d,1-u),new $e(f,1-m),new $e(M,1-y)]}},_m=class extends Ui{constructor(t=new qd([new $e(0,.5),new $e(-.5,-.5),new $e(.5,-.5)]),e=12){super(),this.type="ShapeGeometry",this.parameters={shapes:t,curveSegments:e};let i=[],r=[],o=[],s=[],a=0,l=0;if(!1===Array.isArray(t))c(t);else for(let d=0;d<t.length;d++)c(t[d]),this.addGroup(a,l,d),a+=l,l=0;function c(d){let u=r.length/3,p=d.extractPoints(e),f=p.shape,m=p.holes;!1===Yc.isClockWise(f)&&(f=f.reverse());for(let M=0,y=m.length;M<y;M++){let x=m[M];!0===Yc.isClockWise(x)&&(m[M]=x.reverse())}let b=Yc.triangulateShape(f,m);for(let M=0,y=m.length;M<y;M++)f=f.concat(m[M]);for(let M=0,y=f.length;M<y;M++){let x=f[M];r.push(x.x,x.y,0),o.push(0,0,1),s.push(x.x,x.y)}for(let M=0,y=b.length;M<y;M++){let x=b[M];i.push(x[0]+u,x[1]+u,x[2]+u),l+=3}}this.setIndex(i),this.setAttribute("position",new Nr(r,3)),this.setAttribute("normal",new Nr(o,3)),this.setAttribute("uv",new Nr(s,2))}toJSON(){let t=super.toJSON();return function(n,t){if(t.shapes=[],Array.isArray(n))for(let e=0,i=n.length;e<i;e++)t.shapes.push(n[e].uuid);else t.shapes.push(n.uuid);return t}(this.parameters.shapes,t)}static fromJSON(t,e){let i=[];for(let r=0,o=t.shapes.length;r<o;r++)i.push(e[t.shapes[r]]);return new _m(i,t.curveSegments)}};(class extends Ao{constructor(t){super(),this.type="ShadowMaterial",this.color=new an(0),this.transparent=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this}}).prototype.isShadowMaterial=!0;var BI=class extends Ao{constructor(t){super(),this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new an(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 an(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=o_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}};BI.prototype.isMeshStandardMaterial=!0,class extends BI{constructor(t){super(),this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new $e(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Ks(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.sheenColor=new an(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=0,this.attenuationColor=new an(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new an(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._transmission=0,this.setValues(t)}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(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.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}.prototype.isMeshPhysicalMaterial=!0,class extends Ao{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new an(16777215),this.specular=new an(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new an(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=o_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=YI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}}.prototype.isMeshPhongMaterial=!0,class extends Ao{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new an(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new an(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=o_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),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.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}}.prototype.isMeshToonMaterial=!0,class extends Ao{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=o_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}}.prototype.isMeshNormalMaterial=!0,class extends Ao{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new an(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new an(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=YI,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(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}}.prototype.isMeshLambertMaterial=!0,class extends Ao{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new an(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=o_,this.normalScale=new $e(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(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.flatShading=t.flatShading,this}}.prototype.isMeshMatcapMaterial=!0,class extends Wd{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}.prototype.isLineDashedMaterial=!0;var Rr={arraySlice:function(n,t,e){return Rr.isTypedArray(n)?new n.constructor(n.subarray(t,void 0!==e?e:n.length)):n.slice(t,e)},convertArray:function(n,t,e){return!n||!e&&n.constructor===t?n:"number"==typeof t.BYTES_PER_ELEMENT?new t(n):Array.prototype.slice.call(n)},isTypedArray:function(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)},getKeyframeOrder:function(n){let e=n.length,i=new Array(e);for(let r=0;r!==e;++r)i[r]=r;return i.sort(function(r,o){return n[r]-n[o]}),i},sortedArray:function(n,t,e){let i=n.length,r=new n.constructor(i);for(let o=0,s=0;s!==i;++o){let a=e[o]*t;for(let l=0;l!==t;++l)r[s++]=n[a+l]}return r},flattenJSON:function(n,t,e,i){let r=1,o=n[0];for(;void 0!==o&&void 0===o[i];)o=n[r++];if(void 0===o)return;let s=o[i];if(void 0!==s)if(Array.isArray(s))do{s=o[i],void 0!==s&&(t.push(o.time),e.push.apply(e,s)),o=n[r++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[i],void 0!==s&&(t.push(o.time),s.toArray(e,e.length)),o=n[r++]}while(void 0!==o);else do{s=o[i],void 0!==s&&(t.push(o.time),e.push(s)),o=n[r++]}while(void 0!==o)},subclip:function(n,t,e,i,r=30){let o=n.clone();o.name=t;let s=[];for(let l=0;l<o.tracks.length;++l){let c=o.tracks[l],d=c.getValueSize(),u=[],p=[];for(let f=0;f<c.times.length;++f){let m=c.times[f]*r;if(!(m<e||m>=i)){u.push(c.times[f]);for(let b=0;b<d;++b)p.push(c.values[f*d+b])}}0!==u.length&&(c.times=Rr.convertArray(u,c.times.constructor),c.values=Rr.convertArray(p,c.values.constructor),s.push(c))}o.tracks=s;let a=1/0;for(let l=0;l<o.tracks.length;++l)a>o.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l<o.tracks.length;++l)o.tracks[l].shift(-1*a);return o.resetDuration(),o},makeClipAdditive:function(n,t=0,e=n,i=30){i<=0&&(i=30);let r=e.tracks.length,o=t/i;for(let s=0;s<r;++s){let a=e.tracks[s],l=a.ValueTypeName;if("bool"===l||"string"===l)continue;let c=n.tracks.find(function(y){return y.name===a.name&&y.ValueTypeName===l});if(void 0===c)continue;let d=0,u=a.getValueSize();a.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(d=u/3);let p=0,f=c.getValueSize();c.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(p=f/3);let b,m=a.times.length-1;if(o<=a.times[0])b=Rr.arraySlice(a.values,d,u-d);else if(o>=a.times[m]){let y=m*u+d;b=Rr.arraySlice(a.values,y,y+u-d)}else{let y=a.createInterpolant(),x=d,R=u-d;y.evaluate(o),b=Rr.arraySlice(y.resultBuffer,x,R)}"quaternion"===l&&(new ts).fromArray(b).normalize().conjugate().toArray(b);let M=c.times.length;for(let y=0;y<M;++y){let x=y*f+p;if("quaternion"===l)ts.multiplyQuaternionsFlat(c.values,x,b,0,c.values,x);else{let R=f-2*p;for(let A=0;A<R;++A)c.values[x+A]-=b[A]}}}return n.blendMode=2501,n}},Xc=class{constructor(t,e,i,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(i),this.sampleValues=e,this.valueSize=i,this.settings=null,this.DefaultSettings_={}}evaluate(t){let e=this.parameterPositions,i=this._cachedIndex,r=e[i],o=e[i-1];e:{t:{let s;n:{i:if(!(t<r)){for(let a=i+2;;){if(void 0===r){if(t<o)break i;return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,t,o)}if(i===a)break;if(o=r,r=e[++i],t<r)break t}s=e.length;break n}if(t>=o)break e;{let a=e[1];t<a&&(i=2,o=a);for(let l=i-2;;){if(void 0===o)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(i===l)break;if(r=o,o=e[--i-1],t>=o)break t}s=i,i=0}}for(;i<s;){let a=i+s>>>1;t<e[a]?s=a:i=a+1}if(r=e[i],o=e[i-1],void 0===o)return this._cachedIndex=0,this.beforeStart_(0,t,r);if(void 0===r)return i=e.length,this._cachedIndex=i,this.afterEnd_(i-1,o,t)}this._cachedIndex=i,this.intervalChanged_(i,o,r)}return this.interpolate_(i,o,t,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){let e=this.resultBuffer,i=this.sampleValues,r=this.valueSize,o=t*r;for(let s=0;s!==r;++s)e[s]=i[o+s];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}};Xc.prototype.beforeStart_=Xc.prototype.copySampleValue_,Xc.prototype.afterEnd_=Xc.prototype.copySampleValue_;var OB=class extends Xc{constructor(t,e,i,r){super(t,e,i,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:V0,endingEnd:V0}}intervalChanged_(t,e,i){let r=this.parameterPositions,o=t-2,s=t+1,a=r[o],l=r[s];if(void 0===a)switch(this.getSettings_().endingStart){case H0:o=t,a=2*e-i;break;case 2402:o=r.length-2,a=e+r[o]-r[o+1];break;default:o=t,a=i}if(void 0===l)switch(this.getSettings_().endingEnd){case H0:s=t,l=2*i-e;break;case 2402:s=1,l=i+r[1]-r[0];break;default:s=t-1,l=e}let c=.5*(i-e),d=this.valueSize;this._weightPrev=c/(e-a),this._weightNext=c/(l-i),this._offsetPrev=o*d,this._offsetNext=s*d}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,d=this._offsetPrev,u=this._offsetNext,p=this._weightPrev,f=this._weightNext,m=(i-e)/(r-e),b=m*m,M=b*m,y=-p*M+2*p*b-p*m,x=(1+p)*M+(-1.5-2*p)*b+(-.5+p)*m+1,R=(-1-f)*M+(1.5+f)*b+.5*m,A=f*M-f*b;for(let V=0;V!==a;++V)o[V]=y*s[d+V]+x*s[c+V]+R*s[l+V]+A*s[u+V];return o}},VI=class extends Xc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=t*a,c=l-a,d=(i-e)/(r-e),u=1-d;for(let p=0;p!==a;++p)o[p]=s[c+p]*u+s[l+p]*d;return o}},kB=class extends Xc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t){return this.copySampleValue_(t-1)}},sl=class{constructor(t,e,i,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Rr.convertArray(e,this.TimeBufferType),this.values=Rr.convertArray(i,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(t){let i,e=t.constructor;if(e.toJSON!==this.toJSON)i=e.toJSON(t);else{i={name:t.name,times:Rr.convertArray(t.times,Array),values:Rr.convertArray(t.values,Array)};let r=t.getInterpolation();r!==t.DefaultInterpolation&&(i.interpolation=r)}return i.type=t.ValueTypeName,i}InterpolantFactoryMethodDiscrete(t){return new kB(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new VI(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new OB(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){let i="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(i);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",i),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){let e=this.times;for(let i=0,r=e.length;i!==r;++i)e[i]+=t}return this}scale(t){if(1!==t){let e=this.times;for(let i=0,r=e.length;i!==r;++i)e[i]*=t}return this}trim(t,e){let i=this.times,r=i.length,o=0,s=r-1;for(;o!==r&&i[o]<t;)++o;for(;-1!==s&&i[s]>e;)--s;if(++s,0!==o||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=Rr.arraySlice(i,o,s),this.values=Rr.arraySlice(this.values,o*a,s*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let i=this.times,r=this.values,o=i.length;0===o&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let a=0;a!==o;a++){let l=i[a];if("number"==typeof l&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(null!==s&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),t=!1;break}s=l}if(void 0!==r&&Rr.isTypedArray(r))for(let a=0,l=r.length;a!==l;++a){let c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=Rr.arraySlice(this.times),e=Rr.arraySlice(this.values),i=this.getValueSize(),r=2302===this.getInterpolation(),o=t.length-1,s=1;for(let a=1;a<o;++a){let l=!1,c=t[a];if(c!==t[a+1]&&(1!==a||c!==t[0]))if(r)l=!0;else{let u=a*i,p=u-i,f=u+i;for(let m=0;m!==i;++m){let b=e[u+m];if(b!==e[p+m]||b!==e[f+m]){l=!0;break}}}if(l){if(a!==s){t[s]=t[a];let u=a*i,p=s*i;for(let f=0;f!==i;++f)e[p+f]=e[u+f]}++s}}if(o>0){t[s]=t[o];for(let a=o*i,l=s*i,c=0;c!==i;++c)e[l+c]=e[a+c];++s}return s!==t.length?(this.times=Rr.arraySlice(t,0,s),this.values=Rr.arraySlice(e,0,s*i)):(this.times=t,this.values=e),this}clone(){let t=Rr.arraySlice(this.times,0),e=Rr.arraySlice(this.values,0),r=new(0,this.constructor)(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}};sl.prototype.TimeBufferType=Float32Array,sl.prototype.ValueBufferType=Float32Array,sl.prototype.DefaultInterpolation=2301;var Mp=class extends sl{};Mp.prototype.ValueTypeName="bool",Mp.prototype.ValueBufferType=Array,Mp.prototype.DefaultInterpolation=2300,Mp.prototype.InterpolantFactoryMethodLinear=void 0,Mp.prototype.InterpolantFactoryMethodSmooth=void 0;var HI=class extends sl{};HI.prototype.ValueTypeName="color";var n_=class extends sl{};n_.prototype.ValueTypeName="number";var FB=class extends Xc{constructor(t,e,i,r){super(t,e,i,r)}interpolate_(t,e,i,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(i-e)/(r-e),c=t*a;for(let d=c+a;c!==d;c+=4)ts.slerpFlat(o,0,s,c-a,s,c,l);return o}},bm=class extends sl{InterpolantFactoryMethodLinear(t){return new FB(this.times,this.values,this.getValueSize(),t)}};bm.prototype.ValueTypeName="quaternion",bm.prototype.DefaultInterpolation=2301,bm.prototype.InterpolantFactoryMethodSmooth=void 0;var wp=class extends sl{};wp.prototype.ValueTypeName="string",wp.prototype.ValueBufferType=Array,wp.prototype.DefaultInterpolation=2300,wp.prototype.InterpolantFactoryMethodLinear=void 0,wp.prototype.InterpolantFactoryMethodSmooth=void 0;var i_=class extends sl{};i_.prototype.ValueTypeName="vector";var zI=class{constructor(t,e=-1,i,r=2500){this.name=t,this.tracks=i,this.duration=e,this.blendMode=r,this.uuid=Jl(),this.duration<0&&this.resetDuration()}static parse(t){let e=[],i=t.tracks,r=1/(t.fps||1);for(let s=0,a=i.length;s!==a;++s)e.push(I2e(i[s]).scale(r));let o=new this(t.name,t.duration,e,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){let e=[],i=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,s=i.length;o!==s;++o)e.push(sl.toJSON(i[o]));return r}static CreateFromMorphTargetSequence(t,e,i,r){let o=e.length,s=[];for(let a=0;a<o;a++){let l=[],c=[];l.push((a+o-1)%o,a,(a+1)%o),c.push(0,1,0);let d=Rr.getKeyframeOrder(l);l=Rr.sortedArray(l,1,d),c=Rr.sortedArray(c,1,d),!r&&0===l[0]&&(l.push(o),c.push(c[0])),s.push(new n_(".morphTargetInfluences["+e[a].name+"]",l,c).scale(1/i))}return new this(t,-1,s)}static findByName(t,e){let i=t;Array.isArray(t)||(i=t.geometry&&t.geometry.animations||t.animations);for(let r=0;r<i.length;r++)if(i[r].name===e)return i[r];return null}static CreateClipsFromMorphTargetSequences(t,e,i){let r={},o=/^([\w-]*?)([\d]+)$/;for(let a=0,l=t.length;a<l;a++){let c=t[a],d=c.name.match(o);if(d&&d.length>1){let u=d[1],p=r[u];p||(r[u]=p=[]),p.push(c)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],e,i));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(u,p,f,m,b){if(0!==f.length){let M=[],y=[];Rr.flattenJSON(f,M,y,m),0!==M.length&&b.push(new u(p,M,y))}},r=[],o=t.name||"default",s=t.fps||30,a=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let u=0;u<c.length;u++){let p=c[u].keys;if(p&&0!==p.length)if(p[0].morphTargets){let m,f={};for(m=0;m<p.length;m++)if(p[m].morphTargets)for(let b=0;b<p[m].morphTargets.length;b++)f[p[m].morphTargets[b]]=-1;for(let b in f){let M=[],y=[];for(let x=0;x!==p[m].morphTargets.length;++x){let R=p[m];M.push(R.time),y.push(R.morphTarget===b?1:0)}r.push(new n_(".morphTargetInfluence["+b+"]",M,y))}l=f.length*(s||1)}else{let f=".bones["+e[u].name+"]";i(i_,f+".position",p,"pos",r),i(bm,f+".quaternion",p,"rot",r),i(i_,f+".scale",p,"scl",r)}}return 0===r.length?null:new this(o,l,r,a)}resetDuration(){let e=0;for(let i=0,r=this.tracks.length;i!==r;++i){let o=this.tracks[i];e=Math.max(e,o.times[o.times.length-1])}return this.duration=e,this}trim(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].trim(0,this.duration);return this}validate(){let t=!0;for(let e=0;e<this.tracks.length;e++)t=t&&this.tracks[e].validate();return t}optimize(){for(let t=0;t<this.tracks.length;t++)this.tracks[t].optimize();return this}clone(){let t=[];for(let e=0;e<this.tracks.length;e++)t.push(this.tracks[e].clone());return new this.constructor(this.name,this.duration,t,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}};function I2e(n){if(void 0===n.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");let t=function(n){switch(n.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return n_;case"vector":case"vector2":case"vector3":case"vector4":return i_;case"color":return HI;case"quaternion":return bm;case"bool":case"boolean":return Mp;case"string":return wp}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+n)}(n.type);if(void 0===n.times){let e=[],i=[];Rr.flattenJSON(n.keys,e,i,"value"),n.times=e,n.values=i}return void 0!==t.parse?t.parse(n):new t(n.name,n.times,n.values,n.interpolation)}var r_={enabled:!1,files:{},add:function(n,t){!1!==this.enabled&&(this.files[n]=t)},get:function(n){if(!1!==this.enabled)return this.files[n]},remove:function(n){delete this.files[n]},clear:function(){this.files={}}},A2e=new class{constructor(t,e,i){let l,r=this,o=!1,s=0,a=0,c=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=i,this.itemStart=function(d){a++,!1===o&&void 0!==r.onStart&&r.onStart(d,s,a),o=!0},this.itemEnd=function(d){s++,void 0!==r.onProgress&&r.onProgress(d,s,a),s===a&&(o=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(d){void 0!==r.onError&&r.onError(d)},this.resolveURL=function(d){return l?l(d):d},this.setURLModifier=function(d){return l=d,this},this.addHandler=function(d,u){return c.push(d,u),this},this.removeHandler=function(d){let u=c.indexOf(d);return-1!==u&&c.splice(u,2),this},this.getHandler=function(d){for(let u=0,p=c.length;u<p;u+=2){let f=c[u],m=c[u+1];if(f.global&&(f.lastIndex=0),f.test(d))return m}return null}}},Qc=class{constructor(t){this.manager=void 0!==t?t:A2e,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){let i=this;return new Promise(function(r,o){i.load(t,r,e,o)})}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}},zd={},LB=class extends Qc{constructor(t){super(t)}load(t,e,i,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=r_.get(t);if(void 0!==o)return this.manager.itemStart(t),setTimeout(()=>{e&&e(o),this.manager.itemEnd(t)},0),o;if(void 0!==zd[t])return void zd[t].push({onLoad:e,onProgress:i,onError:r});zd[t]=[],zd[t].push({onLoad:e,onProgress:i,onError:r});let s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,l=this.responseType;fetch(s).then(c=>{if(200===c.status||0===c.status){if(0===c.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||void 0===c.body.getReader)return c;let d=zd[t],u=c.body.getReader(),p=c.headers.get("Content-Length"),f=p?parseInt(p):0,m=0!==f,b=0,M=new ReadableStream({start(y){!function x(){u.read().then(({done:R,value:A})=>{if(R)y.close();else{b+=A.byteLength;let V=new ProgressEvent("progress",{lengthComputable:m,loaded:b,total:f});for(let te=0,K=d.length;te<K;te++){let xe=d[te];xe.onProgress&&xe.onProgress(V)}y.enqueue(A),x()}})}()}});return new Response(M)}throw Error(`fetch for "${c.url}" responded with ${c.status}: ${c.statusText}`)}).then(c=>{switch(l){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(d=>(new DOMParser).parseFromString(d,a));case"json":return c.json();default:if(void 0===a)return c.text();{let u=/charset="?([^;"\s]*)"?/i.exec(a),p=u&&u[1]?u[1].toLowerCase():void 0,f=new TextDecoder(p);return c.arrayBuffer().then(m=>f.decode(m))}}}).then(c=>{r_.add(t,c);let d=zd[t];delete zd[t];for(let u=0,p=d.length;u<p;u++){let f=d[u];f.onLoad&&f.onLoad(c)}}).catch(c=>{let d=zd[t];if(void 0===d)throw this.manager.itemError(t),c;delete zd[t];for(let u=0,p=d.length;u<p;u++){let f=d[u];f.onError&&f.onError(c)}this.manager.itemError(t)}).finally(()=>{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}},UI=class extends Qc{constructor(t){super(t)}load(t,e,i,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,s=r_.get(t);if(void 0!==s)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;let a=Mx("img");function l(){d(),r_.add(t,this),e&&e(this),o.manager.itemEnd(t)}function c(u){d(),r&&r(u),o.manager.itemError(t),o.manager.itemEnd(t)}function d(){a.removeEventListener("load",l,!1),a.removeEventListener("error",c,!1)}return a.addEventListener("load",l,!1),a.addEventListener("error",c,!1),"data:"!==t.substr(0,5)&&void 0!==this.crossOrigin&&(a.crossOrigin=this.crossOrigin),o.manager.itemStart(t),a.src=t,a}},BB=class extends Qc{constructor(t){super(t)}load(t,e,i,r){let o=new Q0,s=new UI(this.manager);s.setCrossOrigin(this.crossOrigin),s.setPath(this.path);let a=0;function l(c){s.load(t[c],function(d){o.images[c]=d,a++,6===a&&(o.needsUpdate=!0,e&&e(o))},void 0,r)}for(let c=0;c<t.length;++c)l(c);return o}},VB=class extends Qc{constructor(t){super(t)}load(t,e,i,r){let o=new lo,s=new UI(this.manager);return s.setCrossOrigin(this.crossOrigin),s.setPath(this.path),s.load(t,function(a){o.image=a,o.needsUpdate=!0,void 0!==e&&e(o)},i,r),o}},al=class extends Bi{constructor(t,e=1){super(),this.type="Light",this.color=new an(t),this.intensity=e}dispose(){}copy(t){return super.copy(t),this.color.copy(t.color),this.intensity=t.intensity,this}toJSON(t){let e=super.toJSON(t);return e.object.color=this.color.getHex(),e.object.intensity=this.intensity,void 0!==this.groundColor&&(e.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(e.object.distance=this.distance),void 0!==this.angle&&(e.object.angle=this.angle),void 0!==this.decay&&(e.object.decay=this.decay),void 0!==this.penumbra&&(e.object.penumbra=this.penumbra),void 0!==this.shadow&&(e.object.shadow=this.shadow.toJSON()),e}};al.prototype.isLight=!0,class extends al{constructor(t,e,i){super(t,i),this.type="HemisphereLight",this.position.copy(Bi.DefaultUp),this.updateMatrix(),this.groundColor=new an(e)}copy(t){return al.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}}.prototype.isHemisphereLight=!0;var Lee=new xn,Bee=new $,Vee=new $,Ux=class{constructor(t){this.camera=t,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new $e(512,512),this.map=null,this.mapPass=null,this.matrix=new xn,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Z0,this._frameExtents=new $e(1,1),this._viewportCount=1,this._viewports=[new Zi(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(t){let e=this.camera,i=this.matrix;Bee.setFromMatrixPosition(t.matrixWorld),e.position.copy(Bee),Vee.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(Vee),e.updateMatrixWorld(),Lee.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Lee),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(e.projectionMatrix),i.multiply(e.matrixWorldInverse)}getViewport(t){return this._viewports[t]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){let t={};return 0!==this.bias&&(t.bias=this.bias),0!==this.normalBias&&(t.normalBias=this.normalBias),1!==this.radius&&(t.radius=this.radius),(512!==this.mapSize.x||512!==this.mapSize.y)&&(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}},jI=class extends Ux{constructor(){super(new es(50,1,.5,500)),this.focus=1}updateMatrices(t){let e=this.camera,i=2*nB*t.angle*this.focus,r=this.mapSize.width/this.mapSize.height,o=t.distance||e.far;(i!==e.fov||r!==e.aspect||o!==e.far)&&(e.fov=i,e.aspect=r,e.far=o,e.updateProjectionMatrix()),super.updateMatrices(t)}copy(t){return super.copy(t),this.focus=t.focus,this}};jI.prototype.isSpotLightShadow=!0,class extends al{constructor(t,e,i=0,r=Math.PI/3,o=0,s=1){super(t,e),this.type="SpotLight",this.position.copy(Bi.DefaultUp),this.updateMatrix(),this.target=new Bi,this.distance=i,this.angle=r,this.penumbra=o,this.decay=s,this.shadow=new jI}get power(){return this.intensity*Math.PI}set power(t){this.intensity=t/Math.PI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.angle=t.angle,this.penumbra=t.penumbra,this.decay=t.decay,this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}.prototype.isSpotLight=!0;var Hee=new xn,fx=new $,X3=new $,GI=class extends Ux{constructor(){super(new es(90,1,.5,500)),this._frameExtents=new $e(4,2),this._viewportCount=6,this._viewports=[new Zi(2,1,1,1),new Zi(0,1,1,1),new Zi(3,1,1,1),new Zi(1,1,1,1),new Zi(3,0,1,1),new Zi(1,0,1,1)],this._cubeDirections=[new $(1,0,0),new $(-1,0,0),new $(0,0,1),new $(0,0,-1),new $(0,1,0),new $(0,-1,0)],this._cubeUps=[new $(0,1,0),new $(0,1,0),new $(0,1,0),new $(0,1,0),new $(0,0,1),new $(0,0,-1)]}updateMatrices(t,e=0){let i=this.camera,r=this.matrix,o=t.distance||i.far;o!==i.far&&(i.far=o,i.updateProjectionMatrix()),fx.setFromMatrixPosition(t.matrixWorld),i.position.copy(fx),X3.copy(i.position),X3.add(this._cubeDirections[e]),i.up.copy(this._cubeUps[e]),i.lookAt(X3),i.updateMatrixWorld(),r.makeTranslation(-fx.x,-fx.y,-fx.z),Hee.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Hee)}};GI.prototype.isPointLightShadow=!0,class extends al{constructor(t,e,i=0,r=1){super(t,e),this.type="PointLight",this.distance=i,this.decay=r,this.shadow=new GI}get power(){return 4*this.intensity*Math.PI}set power(t){this.intensity=t/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.distance=t.distance,this.decay=t.decay,this.shadow=t.shadow.clone(),this}}.prototype.isPointLight=!0;var WI=class extends Ux{constructor(){super(new mm(-5,5,5,-5,.5,500))}};WI.prototype.isDirectionalLightShadow=!0,class extends al{constructor(t,e){super(t,e),this.type="DirectionalLight",this.position.copy(Bi.DefaultUp),this.updateMatrix(),this.target=new Bi,this.shadow=new WI}dispose(){this.shadow.dispose()}copy(t){return super.copy(t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}}.prototype.isDirectionalLight=!0,class extends al{constructor(t,e){super(t,e),this.type="AmbientLight"}}.prototype.isAmbientLight=!0,class extends al{constructor(t,e,i=10,r=10){super(t,e),this.type="RectAreaLight",this.width=i,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(t){this.intensity=t/(this.width*this.height*Math.PI)}copy(t){return super.copy(t),this.width=t.width,this.height=t.height,this}toJSON(t){let e=super.toJSON(t);return e.object.width=this.width,e.object.height=this.height,e}}.prototype.isRectAreaLight=!0;var qI=class{constructor(){this.coefficients=[];for(let t=0;t<9;t++)this.coefficients.push(new $)}set(t){for(let e=0;e<9;e++)this.coefficients[e].copy(t[e]);return this}zero(){for(let t=0;t<9;t++)this.coefficients[t].set(0,0,0);return this}getAt(t,e){let i=t.x,r=t.y,o=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.282095),e.addScaledVector(s[1],.488603*r),e.addScaledVector(s[2],.488603*o),e.addScaledVector(s[3],.488603*i),e.addScaledVector(s[4],i*r*1.092548),e.addScaledVector(s[5],r*o*1.092548),e.addScaledVector(s[6],.315392*(3*o*o-1)),e.addScaledVector(s[7],i*o*1.092548),e.addScaledVector(s[8],.546274*(i*i-r*r)),e}getIrradianceAt(t,e){let i=t.x,r=t.y,o=t.z,s=this.coefficients;return e.copy(s[0]).multiplyScalar(.886227),e.addScaledVector(s[1],1.023328*r),e.addScaledVector(s[2],1.023328*o),e.addScaledVector(s[3],1.023328*i),e.addScaledVector(s[4],.858086*i*r),e.addScaledVector(s[5],.858086*r*o),e.addScaledVector(s[6],.743125*o*o-.247708),e.addScaledVector(s[7],.858086*i*o),e.addScaledVector(s[8],.429043*(i*i-r*r)),e}add(t){for(let e=0;e<9;e++)this.coefficients[e].add(t.coefficients[e]);return this}addScaledSH(t,e){for(let i=0;i<9;i++)this.coefficients[i].addScaledVector(t.coefficients[i],e);return this}scale(t){for(let e=0;e<9;e++)this.coefficients[e].multiplyScalar(t);return this}lerp(t,e){for(let i=0;i<9;i++)this.coefficients[i].lerp(t.coefficients[i],e);return this}equals(t){for(let e=0;e<9;e++)if(!this.coefficients[e].equals(t.coefficients[e]))return!1;return!0}copy(t){return this.set(t.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(t,e=0){let i=this.coefficients;for(let r=0;r<9;r++)i[r].fromArray(t,e+3*r);return this}toArray(t=[],e=0){let i=this.coefficients;for(let r=0;r<9;r++)i[r].toArray(t,e+3*r);return t}static getBasisAt(t,e){let i=t.x,r=t.y,o=t.z;e[0]=.282095,e[1]=.488603*r,e[2]=.488603*o,e[3]=.488603*i,e[4]=1.092548*i*r,e[5]=1.092548*r*o,e[6]=.315392*(3*o*o-1),e[7]=1.092548*i*o,e[8]=.546274*(i*i-r*r)}};qI.prototype.isSphericalHarmonics3=!0;var jx=class extends al{constructor(t=new qI,e=1){super(void 0,e),this.sh=t}copy(t){return super.copy(t),this.sh.copy(t.sh),this}fromJSON(t){return this.intensity=t.intensity,this.sh.fromArray(t.sh),this}toJSON(t){let e=super.toJSON(t);return e.object.sh=this.sh.toArray(),e}};jx.prototype.isLightProbe=!0;var qB=class{static decodeText(t){if(typeof TextDecoder<"u")return(new TextDecoder).decode(t);let e="";for(let i=0,r=t.length;i<r;i++)e+=String.fromCharCode(t[i]);try{return decodeURIComponent(escape(e))}catch{return e}}static extractUrlBase(t){let e=t.lastIndexOf("/");return-1===e?"./":t.substr(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t)?t:e+t)}};(class extends Ui{constructor(){super(),this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}clone(){return(new this.constructor).copy(this)}toJSON(){let t=super.toJSON(this);return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}).prototype.isInstancedBufferGeometry=!0,class extends Qc{constructor(t){super(t),typeof createImageBitmap>"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,i,r){void 0===t&&(t=""),void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,s=r_.get(t);if(void 0!==s)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;let a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader,fetch(t,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){r_.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){r&&r(l),o.manager.itemError(t),o.manager.itemEnd(t)}),o.manager.itemStart(t)}}.prototype.isImageBitmapLoader=!0;var mI,QB=class extends Qc{constructor(t){super(t)}load(t,e,i,r){let o=this,s=new LB(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(a){try{let l=a.slice(0);(void 0===mI&&(mI=new(window.AudioContext||window.webkitAudioContext)),mI).decodeAudioData(l,function(d){e(d)})}catch(l){r?r(l):console.error(l),o.manager.itemError(t)}},i,r)}};(class extends jx{constructor(t,e,i=1){super(void 0,i);let r=(new an).set(t),o=(new an).set(e),s=new $(r.r,r.g,r.b),a=new $(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}}).prototype.isHemisphereLightProbe=!0,class extends jx{constructor(t,e=1){super(void 0,e);let i=(new an).set(t);this.sh.coefficients[0].set(i.r,i.g,i.b).multiplyScalar(2*Math.sqrt(Math.PI))}}.prototype.isAmbientLightProbe=!0;var eV=class{constructor(t,e,i){let r,o,s;switch(this.binding=t,this.valueSize=i,e){case"quaternion":r=this._slerp,o=this._slerpAdditive,s=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*i),this._workIndex=5;break;case"string":case"bool":r=this._select,o=this._select,s=this._setAdditiveIdentityOther,this.buffer=new Array(5*i);break;default:r=this._lerp,o=this._lerpAdditive,s=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*i)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=o,this._setIdentity=s,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(t,e){let i=this.buffer,r=this.valueSize,o=t*r+r,s=this.cumulativeWeight;if(0===s){for(let a=0;a!==r;++a)i[o+a]=i[a];s=e}else s+=e,this._mixBufferRegion(i,o,0,e/s,r);this.cumulativeWeight=s}accumulateAdditive(t){let e=this.buffer,i=this.valueSize,r=i*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(e,r,0,t,i),this.cumulativeWeightAdditive+=t}apply(t){let e=this.valueSize,i=this.buffer,r=t*e+e,o=this.cumulativeWeight,s=this.cumulativeWeightAdditive,a=this.binding;this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,o<1&&this._mixBufferRegion(i,r,e*this._origIndex,1-o,e),s>0&&this._mixBufferRegionAdditive(i,r,this._addIndex*e,1,e);for(let l=e,c=e+e;l!==c;++l)if(i[l]!==i[l+e]){a.setValue(i,r);break}}saveOriginalState(){let e=this.buffer,i=this.valueSize,r=i*this._origIndex;this.binding.getValue(e,r);for(let o=i,s=r;o!==s;++o)e[o]=e[r+o%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){this.binding.setValue(this.buffer,3*this.valueSize)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i<e;i++)this.buffer[i]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){let t=this._origIndex*this.valueSize,e=this._addIndex*this.valueSize;for(let i=0;i<this.valueSize;i++)this.buffer[e+i]=this.buffer[t+i]}_select(t,e,i,r,o){if(r>=.5)for(let s=0;s!==o;++s)t[e+s]=t[i+s]}_slerp(t,e,i,r){ts.slerpFlat(t,e,t,e,t,i,r)}_slerpAdditive(t,e,i,r,o){let s=this._workIndex*o;ts.multiplyQuaternionsFlat(t,s,t,e,t,i),ts.slerpFlat(t,e,t,e,t,s,r)}_lerp(t,e,i,r,o){let s=1-r;for(let a=0;a!==o;++a){let l=e+a;t[l]=t[l]*s+t[i+a]*r}}_lerpAdditive(t,e,i,r,o){for(let s=0;s!==o;++s){let a=e+s;t[a]=t[a]+t[i+s]*r}}},hV="\\[\\]\\.:\\/",P2e=new RegExp("["+hV+"]","g"),gV="[^"+hV+"]",O2e="[^"+hV.replace("\\.","")+"]",k2e=/((?:WC+[\/:])*)/.source.replace("WC",gV),F2e=/(WCOD+)?/.source.replace("WCOD",O2e),N2e=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",gV),L2e=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",gV),B2e=new RegExp("^"+k2e+F2e+N2e+L2e+"$"),V2e=["material","materials","bones"],tV=class{constructor(t,e,i){let r=i||xr.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}getValue(t,e){this.bind();let r=this._bindings[this._targetGroup.nCachedObjects_];void 0!==r&&r.getValue(t,e)}setValue(t,e){let i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=i.length;r!==o;++r)i[r].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}},xr=(()=>{class n{constructor(e,i,r){this.path=i,this.parsedPath=r||n.parseTrackName(i),this.node=n.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,i,r){return e&&e.isAnimationObjectGroup?new n.Composite(e,i,r):new n(e,i,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(P2e,"")}static parseTrackName(e){let i=B2e.exec(e);if(!i)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let r={nodeName:i[2],objectName:i[3],objectIndex:i[4],propertyName:i[5],propertyIndex:i[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(void 0!==o&&-1!==o){let s=r.nodeName.substring(o+1);-1!==V2e.indexOf(s)&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}if(null===r.propertyName||0===r.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,i){if(!i||""===i||"."===i||-1===i||i===e.name||i===e.uuid)return e;if(e.skeleton){let r=e.skeleton.getBoneByName(i);if(void 0!==r)return r}if(e.children){let r=function(s){for(let a=0;a<s.length;a++){let l=s[a];if(l.name===i||l.uuid===i)return l;let c=r(l.children);if(c)return c}return null},o=r(e.children);if(o)return o}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,i){e[i]=this.targetObject[this.propertyName]}_getValue_array(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++o)e[i++]=r[o]}_getValue_arrayElement(e,i){e[i]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,i){this.resolvedProperty.toArray(e,i)}_setValue_direct(e,i){this.targetObject[this.propertyName]=e[i]}_setValue_direct_setNeedsUpdate(e,i){this.targetObject[this.propertyName]=e[i],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,i){this.targetObject[this.propertyName]=e[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++o)r[o]=e[i++]}_setValue_array_setNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++o)r[o]=e[i++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,i){let r=this.resolvedProperty;for(let o=0,s=r.length;o!==s;++o)r[o]=e[i++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,i){this.resolvedProperty[this.propertyIndex]=e[i]}_setValue_arrayElement_setNeedsUpdate(e,i){this.resolvedProperty[this.propertyIndex]=e[i],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,i){this.resolvedProperty[this.propertyIndex]=e[i],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,i){this.resolvedProperty.fromArray(e,i)}_setValue_fromArray_setNeedsUpdate(e,i){this.resolvedProperty.fromArray(e,i),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,i){this.resolvedProperty.fromArray(e,i),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,i){this.bind(),this.getValue(e,i)}_setValue_unbound(e,i){this.bind(),this.setValue(e,i)}bind(){let e=this.node,i=this.parsedPath,r=i.objectName,o=i.propertyName,s=i.propertyIndex;if(e||(e=n.findNode(this.rootNode,i.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(r){let d=i.objectIndex;switch(r){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let u=0;u<e.length;u++)if(e[u].name===d){d=u;break}break;default:if(void 0===e[r])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[r]}if(void 0!==d){if(void 0===e[d])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[d]}}let a=e[o];if(void 0===a)return void console.error("THREE.PropertyBinding: Trying to update property for track: "+i.nodeName+"."+o+" but it wasn't found.",e);let l=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?l=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(l=this.Versioning.MatrixWorldNeedsUpdate);let c=this.BindingType.Direct;if(void 0!==s){if("morphTargetInfluences"===o){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.isBufferGeometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences on THREE.Geometry. Use THREE.BufferGeometry instead.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[s]&&(s=e.morphTargetDictionary[s])}c=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=s}else void 0!==a.fromArray&&void 0!==a.toArray?(c=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(c=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=o;this.getValue=this.GetterByBindingType[c],this.setValue=this.SetterByBindingTypeAndVersioning[c][l]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}return n.Composite=tV,n})();xr.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},xr.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},xr.prototype.GetterByBindingType=[xr.prototype._getValue_direct,xr.prototype._getValue_array,xr.prototype._getValue_arrayElement,xr.prototype._getValue_toArray],xr.prototype.SetterByBindingTypeAndVersioning=[[xr.prototype._setValue_direct,xr.prototype._setValue_direct_setNeedsUpdate,xr.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[xr.prototype._setValue_array,xr.prototype._setValue_array_setNeedsUpdate,xr.prototype._setValue_array_setMatrixWorldNeedsUpdate],[xr.prototype._setValue_arrayElement,xr.prototype._setValue_arrayElement_setNeedsUpdate,xr.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[xr.prototype._setValue_fromArray,xr.prototype._setValue_fromArray_setNeedsUpdate,xr.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]],class extends Ud{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){let i=t._localRoot||this._root,r=t._clip.tracks,o=r.length,s=t._propertyBindings,a=t._interpolants,l=i.uuid,c=this._bindingsByRootAndName,d=c[l];void 0===d&&(d={},c[l]=d);for(let u=0;u!==o;++u){let p=r[u],f=p.name,m=d[f];if(void 0!==m)++m.referenceCount,s[u]=m;else{if(m=s[u],void 0!==m){null===m._cacheIndex&&(++m.referenceCount,this._addInactiveBinding(m,l,f));continue}m=new eV(xr.create(i,f,e&&e._propertyBindings[u].binding.parsedPath),p.ValueTypeName,p.getValueSize()),++m.referenceCount,this._addInactiveBinding(m,l,f),s[u]=m}a[u].resultBuffer=m.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){let i=(t._localRoot||this._root).uuid,r=t._clip.uuid,o=this._actionsByClip[r];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,r,i)}let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==o.useCount++&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==--o.useCount&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let 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(t){let e=t._cacheIndex;return null!==e&&e<this._nActiveActions}_addInactiveAction(t,e,i){let r=this._actions,o=this._actionsByClip,s=o[e];if(void 0===s)s={knownActions:[t],actionByRoot:{}},t._byClipCacheIndex=0,o[e]=s;else{let a=s.knownActions;t._byClipCacheIndex=a.length,a.push(t)}t._cacheIndex=r.length,r.push(t),s.actionByRoot[i]=t}_removeInactiveAction(t){let e=this._actions,i=e[e.length-1],r=t._cacheIndex;i._cacheIndex=r,e[r]=i,e.pop(),t._cacheIndex=null;let o=t._clip.uuid,s=this._actionsByClip,a=s[o],l=a.knownActions,c=l[l.length-1],d=t._byClipCacheIndex;c._byClipCacheIndex=d,l[d]=c,l.pop(),t._byClipCacheIndex=null,delete a.actionByRoot[(t._localRoot||this._root).uuid],0===l.length&&delete s[o],this._removeInactiveBindingsForAction(t)}_removeInactiveBindingsForAction(t){let e=t._propertyBindings;for(let i=0,r=e.length;i!==r;++i){let o=e[i];0==--o.referenceCount&&this._removeInactiveBinding(o)}}_lendAction(t){let e=this._actions,i=t._cacheIndex,r=this._nActiveActions++,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_takeBackAction(t){let e=this._actions,i=t._cacheIndex,r=--this._nActiveActions,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_addInactiveBinding(t,e,i){let r=this._bindingsByRootAndName,o=this._bindings,s=r[e];void 0===s&&(s={},r[e]=s),s[i]=t,t._cacheIndex=o.length,o.push(t)}_removeInactiveBinding(t){let e=this._bindings,i=t.binding,r=i.rootNode.uuid,o=i.path,s=this._bindingsByRootAndName,a=s[r],l=e[e.length-1],c=t._cacheIndex;l._cacheIndex=c,e[c]=l,e.pop(),delete a[o],0===Object.keys(a).length&&delete s[r]}_lendBinding(t){let e=this._bindings,i=t._cacheIndex,r=this._nActiveBindings++,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_takeBackBinding(t){let e=this._bindings,i=t._cacheIndex,r=--this._nActiveBindings,o=e[r];t._cacheIndex=r,e[r]=t,o._cacheIndex=i,e[i]=o}_lendControlInterpolant(){let t=this._controlInterpolants,e=this._nActiveControlInterpolants++,i=t[e];return void 0===i&&(i=new VI(new Float32Array(2),new Float32Array(2),1,this._controlInterpolantsResultBuffer),i.__cacheIndex=e,t[e]=i),i}_takeBackControlInterpolant(t){let e=this._controlInterpolants,i=t.__cacheIndex,r=--this._nActiveControlInterpolants,o=e[r];t.__cacheIndex=r,e[r]=t,o.__cacheIndex=i,e[i]=o}clipAction(t,e,i){let r=e||this._root,o=r.uuid,s="string"==typeof t?zI.findByName(r,t):t,a=null!==s?s.uuid:t,l=this._actionsByClip[a],c=null;if(void 0===i&&(i=null!==s?s.blendMode:2500),void 0!==l){let u=l.actionByRoot[o];if(void 0!==u&&u.blendMode===i)return u;c=l.knownActions[0],null===s&&(s=c._clip)}if(null===s)return null;let d=new class{constructor(t,e,i=null,r=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=i,this.blendMode=r;let o=e.tracks,s=o.length,a=new Array(s),l={endingStart:V0,endingEnd:V0};for(let c=0;c!==s;++c){let d=o[c].createInterpolant(null);a[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=2201,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,i){if(t.fadeOut(e),this.fadeIn(e),i){let r=this._clip.duration,o=t._clip.duration,a=r/o;t.warp(1,o/r,e),this.warp(a,1,e)}return this}crossFadeTo(t,e,i){return t.crossFadeFrom(this,e,i)}stopFading(){let t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,i){let r=this._mixer,o=r.time,s=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+i,c[0]=t/s,c[1]=e/s,this}stopWarping(){let t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,i,r){if(!this.enabled)return void this._updateWeight(t);let o=this._startTime;if(null!==o){let l=(t-o)*i;if(l<0||0===i)return;this._startTime=null,e=i*l}e*=this._updateTimeScale(t);let s=this._updateTime(e),a=this._updateWeight(t);if(a>0){let l=this._interpolants,c=this._propertyBindings;if(2501===this.blendMode)for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulateAdditive(a);else for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulate(r,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;let i=this._weightInterpolant;if(null!==i){let r=i.evaluate(t)[0];e*=r,t>i.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;let i=this._timeScaleInterpolant;null!==i&&(e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){let e=this._clip.duration,i=this.loop,r=this.time+t,o=this._loopCount,s=2202===i;if(0===t)return-1===o?r:s&&1==(1&o)?e-r:r;if(2200===i){-1===o&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=e)r=e;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===o&&(t>=0?(o=0,this._setEndings(!0,0===this.repetitions,s)):this._setEndings(0===this.repetitions,!0,s)),r>=e||r<0){let a=Math.floor(r/e);r-=e*a,o+=Math.abs(a);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=t>0?e:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===l){let c=t<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&1==(1&o))return e-r}return r}_setEndings(t,e,i){let r=this._interpolantSettings;i?(r.endingStart=H0,r.endingEnd=H0):(r.endingStart=t?this.zeroSlopeAtStart?H0:V0:2402,r.endingEnd=e?this.zeroSlopeAtEnd?H0:V0:2402)}_scheduleFading(t,e,i){let r=this._mixer,o=r.time,s=this._weightInterpolant;null===s&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=e,a[1]=o+t,l[1]=i,this}}(this,s,e,i);return this._bindAction(d,c),this._addInactiveAction(d,a,o),d}existingAction(t,e){let i=e||this._root,r=i.uuid,o="string"==typeof t?zI.findByName(i,t):t,a=this._actionsByClip[o?o.uuid:t];return void 0!==a&&a.actionByRoot[r]||null}stopAllAction(){let t=this._actions;for(let i=this._nActiveActions-1;i>=0;--i)t[i].stop();return this}update(t){let e=this._actions,i=this._nActiveActions,r=this.time+=t*=this.timeScale,o=Math.sign(t),s=this._accuIndex^=1;for(let c=0;c!==i;++c)e[c]._update(r,t,o,s);let a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(t){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(t)}getRoot(){return this._root}uncacheClip(t){let e=this._actions,i=t.uuid,r=this._actionsByClip,o=r[i];if(void 0!==o){let s=o.knownActions;for(let a=0,l=s.length;a!==l;++a){let c=s[a];this._deactivateAction(c);let d=c._cacheIndex,u=e[e.length-1];c._cacheIndex=null,c._byClipCacheIndex=null,u._cacheIndex=d,e[d]=u,e.pop(),this._removeInactiveBindingsForAction(c)}delete r[i]}}uncacheRoot(t){let e=t.uuid,i=this._actionsByClip;for(let s in i){let l=i[s].actionByRoot[e];void 0!==l&&(this._deactivateAction(l),this._removeInactiveAction(l))}let o=this._bindingsByRootAndName[e];if(void 0!==o)for(let s in o){let a=o[s];a.restoreOriginalState(),this._removeInactiveBinding(a)}}uncacheAction(t,e){let i=this.existingAction(t,e);null!==i&&(this._deactivateAction(i),this._removeInactiveAction(i))}}.prototype._controlInterpolantsResultBuffer=new Float32Array(1);var Gx=class{constructor(t){"string"==typeof t&&(console.warn("THREE.Uniform: Type parameter is no longer needed."),t=arguments[1]),this.value=t}clone(){return new Gx(void 0===this.value.clone?this.value:this.value.clone())}};(class extends hm{constructor(t,e,i=1){super(t,e),this.meshPerAttribute=i}copy(t){return super.copy(t),this.meshPerAttribute=t.meshPerAttribute,this}clone(t){let e=super.clone(t);return e.meshPerAttribute=this.meshPerAttribute,e}toJSON(t){let e=super.toJSON(t);return e.isInstancedInterleavedBuffer=!0,e.meshPerAttribute=this.meshPerAttribute,e}}).prototype.isInstancedInterleavedBuffer=!0;var zee=new $e,vm=class{constructor(t=new $e(1/0,1/0),e=new $e(-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromPoints(t){this.makeEmpty();for(let e=0,i=t.length;e<i;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let i=zee.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(i),this.max.copy(t).add(i),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(t){return this.isEmpty()?t.set(0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}containsPoint(t){return!(t.x<this.min.x||t.x>this.max.x||t.y<this.min.y||t.y>this.max.y)}containsBox(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(t,e){return 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(t){return!(t.max.x<this.min.x||t.min.x>this.max.x||t.max.y<this.min.y||t.min.y>this.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return zee.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};vm.prototype.isBox2=!0;var up=new $,gI=new xn,Q3=new xn;function pte(n){let t=[];n&&n.isBone&&t.push(n);for(let e=0;e<n.children.length;e++)t.push.apply(t,pte(n.children[e]));return t}var H2e=new Float32Array(1);function _V(n,t,e){if(1===e)return new an(t);let i=Vf(t);if(!i)throw new Error(`d3 failed to recognize the color: ${t}`);return new an(fL(i,n)(1-e))}new Int32Array(H2e.buffer),$s.create=function(n,t){return console.log("THREE.Curve.create() has been deprecated"),n.prototype=Object.create($s.prototype),n.prototype.constructor=n,n.prototype.getPoint=t,n},Bx.prototype.fromPoints=function(n){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(n)},class extends kx{constructor(t=10,e=10,i=4473924,r=8947848){i=new an(i),r=new an(r);let o=e/2,s=t/e,a=t/2,l=[],c=[];for(let p=0,f=0,m=-a;p<=e;p++,m+=s){l.push(-a,0,m,a,0,m),l.push(m,0,-a,m,0,a);let b=p===o?i:r;b.toArray(c,f),f+=3,b.toArray(c,f),f+=3,b.toArray(c,f),f+=3,b.toArray(c,f),f+=3}let d=new Ui;d.setAttribute("position",new Nr(l,3)),d.setAttribute("color",new Nr(c,3)),super(d,new Wd({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}}.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},class extends kx{constructor(t){let e=pte(t),i=new Ui,r=[],o=[],s=new an(0,0,1),a=new an(0,1,0);for(let c=0;c<e.length;c++){let d=e[c];d.parent&&d.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),o.push(s.r,s.g,s.b),o.push(a.r,a.g,a.b))}i.setAttribute("position",new Nr(r,3)),i.setAttribute("color",new Nr(o,3)),super(i,new Wd({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.type="SkeletonHelper",this.isSkeletonHelper=!0,this.root=t,this.bones=e,this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(t){let e=this.bones,i=this.geometry,r=i.getAttribute("position");Q3.copy(this.root.matrixWorld).invert();for(let o=0,s=0;o<e.length;o++){let a=e[o];a.parent&&a.parent.isBone&&(gI.multiplyMatrices(Q3,a.matrixWorld),up.setFromMatrixPosition(gI),r.setXYZ(s,up.x,up.y,up.z),gI.multiplyMatrices(Q3,a.parent.matrixWorld),up.setFromMatrixPosition(gI),r.setXYZ(s+1,up.x,up.y,up.z),s+=2)}i.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(t)}}.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")},Qc.prototype.extractUrlBase=function(n){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qB.extractUrlBase(n)},Qc.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}},vm.prototype.center=function(n){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(n)},vm.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},vm.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},vm.prototype.size=function(n){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(n)},xa.prototype.center=function(n){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(n)},xa.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},xa.prototype.isIntersectionBox=function(n){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},xa.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},xa.prototype.size=function(n){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(n)},bp.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Z0.prototype.setFromMatrix=function(n){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(n)},bo.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},bo.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},bo.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},bo.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),n.applyMatrix3(this)},bo.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},bo.prototype.getInverse=function(n){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},xn.prototype.extractPosition=function(n){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(n)},xn.prototype.flattenToArrayOffset=function(n,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(n,t)},xn.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new $).setFromMatrixColumn(this,3)},xn.prototype.setRotationFromQuaternion=function(n){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(n)},xn.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},xn.prototype.multiplyVector3=function(n){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},xn.prototype.multiplyVector4=function(n){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},xn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},xn.prototype.rotateAxis=function(n){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),n.transformDirection(this)},xn.prototype.crossVector=function(n){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},xn.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},xn.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},xn.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},xn.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},xn.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},xn.prototype.applyToBufferAttribute=function(n){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),n.applyMatrix4(this)},xn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},xn.prototype.makeFrustum=function(n,t,e,i,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(n,t,i,e,r,o)},xn.prototype.getInverse=function(n){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(n).invert()},Kl.prototype.isIntersectionLine=function(n){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(n)},ts.prototype.multiplyVector3=function(n){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),n.applyQuaternion(this)},ts.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},vp.prototype.isIntersectionBox=function(n){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(n)},vp.prototype.isIntersectionPlane=function(n){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(n)},vp.prototype.isIntersectionSphere=function(n){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(n)},Vr.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},Vr.prototype.barycoordFromPoint=function(n,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(n,t)},Vr.prototype.midpoint=function(n){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(n)},Vr.prototypenormal=function(n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(n)},Vr.prototype.plane=function(n){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(n)},Vr.barycoordFromPoint=function(n,t,e,i,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),Vr.getBarycoord(n,t,e,i,r)},Vr.normal=function(n,t,e,i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),Vr.getNormal(n,t,e,i)},qd.prototype.extractAllPoints=function(n){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(n)},qd.prototype.extrude=function(n){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Cp(this,n)},qd.prototype.makeGeometry=function(n){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new _m(this,n)},$e.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},$e.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},$e.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},$.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},$.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},$.prototype.getPositionFromMatrix=function(n){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(n)},$.prototype.getScaleFromMatrix=function(n){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(n)},$.prototype.getColumnFromMatrix=function(n,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,n)},$.prototype.applyProjection=function(n){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(n)},$.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},$.prototype.distanceToManhattan=function(n){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(n)},$.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Zi.prototype.fromAttribute=function(n,t,e){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(n,t,e)},Zi.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Bi.prototype.getChildByName=function(n){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(n)},Bi.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},Bi.prototype.translate=function(n,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,n)},Bi.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},Bi.prototype.applyMatrix=function(n){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(Bi.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(n){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=n}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ao.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ao.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),0},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),PI.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},es.prototype.setLens=function(n,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(n)},Object.defineProperties(al.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(n){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=n}},shadowCameraLeft:{set:function(n){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=n}},shadowCameraRight:{set:function(n){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=n}},shadowCameraTop:{set:function(n){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=n}},shadowCameraBottom:{set:function(n){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=n}},shadowCameraNear:{set:function(n){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=n}},shadowCameraFar:{set:function(n){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=n}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(n){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=n}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(n){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=n}},shadowMapHeight:{set:function(n){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=n}}}),Object.defineProperties(Pr.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===xI},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(xI)}}}),Pr.prototype.setDynamic=function(n){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?xI:Cx),this},Pr.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Pr.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Ui.prototype.addIndex=function(n){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(n)},Ui.prototype.addAttribute=function(n,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===n?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(n,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(n,new Pr(arguments[1],arguments[2])))},Ui.prototype.addDrawCall=function(n,t,e){void 0!==e&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(n,t)},Ui.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Ui.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Ui.prototype.removeAttribute=function(n){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(n)},Ui.prototype.applyMatrix=function(n){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(n)},Object.defineProperties(Ui.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),hm.prototype.setDynamic=function(n){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===n?xI:Cx),this},hm.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Cp.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Cp.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Cp.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},J0.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Gx.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Ao.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new an}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(n){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=1===n}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(n){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=n}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(Gd.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(n){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=n}}}),ji.prototype.clearTarget=function(n,t,e,i){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(n),this.clear(t,e,i)},ji.prototype.animate=function(n){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(n)},ji.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},ji.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},ji.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},ji.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},ji.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},ji.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},ji.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},ji.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},ji.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},ji.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},ji.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},ji.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},ji.prototype.enableScissorTest=function(n){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(n)},ji.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},ji.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},ji.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},ji.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},ji.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},ji.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},ji.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},ji.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},ji.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},ji.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(ji.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(n){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=n}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(n){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=n}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(n){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===n?Ar:_p}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(ste.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}}),Object.defineProperties(Js.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(n){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=n}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(n){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=n}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(n){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=n}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(n){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=n}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(n){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=n}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(n){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=n}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(n){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=n}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(n){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=n}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(n){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=n}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(n){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=n}}}),class extends Bi{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;let e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].connect(this.filters[t]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t<e;t++)this.filters[t-1].disconnect(this.filters[t]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(t){return t||(t=[]),!0===this._connected?(this.disconnect(),this.filters=t.slice(),this.connect()):this.filters=t.slice(),this}setDetune(t){if(this.detune=t,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(t){return this.setFilters(t?[t]:[])}setPlaybackRate(t){if(!1!==this.hasPlaybackControl)return this.playbackRate=t,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(t){if(!1!==this.hasPlaybackControl)return this.loop=t,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(t){return this.loopStart=t,this}setLoopEnd(t){return this.loopEnd=t,this}getVolume(){return this.gain.gain.value}setVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}}.prototype.load=function(n){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return(new QB).load(n,function(i){t.setBuffer(i)}),this},Ex.prototype.updateCubeMap=function(n,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(n,t)},Ex.prototype.clear=function(n,t,e,i){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(n,t,e,i)},jd.crossOrigin=void 0,jd.loadTexture=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new VB;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},jd.loadTextureCube=function(n,t,e,i){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new BB;r.setCrossOrigin(this.crossOrigin);let o=r.load(n,e,void 0,i);return t&&(o.mapping=t),o},jd.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},jd.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:dV}})),typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=dV);var $l=(()=>(function(n){n[n.CIRCLE=0]="CIRCLE",n[n.LINE=1]="LINE",n[n.TRIANGLE=2]="TRIANGLE",n[n.TRAPEZOID=3]="TRAPEZOID"}($l||($l={})),$l))();function mte(n,t){let e=t.length/2,i=n.attributes.position;(!i||i.count!==3*e)&&(i=new Pr(new Float32Array(3*e),3),n.setAttribute("position",i));let r=i.array;for(let o=0;o<e;o++)r[3*o]=t[2*o],r[3*o+1]=t[2*o+1];i.needsUpdate=!0,n.setDrawRange(0,3*e),n.computeBoundingSphere()}function hte(n,t,e){let i=Math.max(t.length/2-1,0),r=2*i*3,o=3*r,s=n.attributes.position;(!s||s.count!==r)&&(s=new Pr(new Float32Array(o),3),n.setAttribute("position",s));let a=s.array;for(let l=0;l<i;l++){let[c,d,u,p]=[t[2*l],t[2*l+1],t[2*l+2],t[2*l+3]],f=new $e(c,d),m=new $e(u,p),b=new $e(u-c,p-d),M=new $e(-b.y,b.x).setLength(e/2),y=f.clone().add(M),x=f.clone().sub(M),R=m.clone().add(M),A=m.clone().sub(M),V=[y.x,y.y,0,x.x,x.y,0,R.x,R.y,0,R.x,R.y,0,x.x,x.y,0,A.x,A.y,0];a.set(V,l*V.length)}s.needsUpdate=!0,n.setDrawRange(0,o),n.computeBoundingSphere()}function JI(n,t,e,i){let{visible:r,color:o,opacity:s}=i;if(Array.isArray(t.material))throw new Error("Invariant error: only expect one material on an object");let a=t.material;if(a.visible!==r&&(a.visible=r,a.needsUpdate=!0),!r)return!1;let l=_V(n,o,s??1),c=e(t.geometry);return t.geometry!==c&&(t.geometry=c),a.color.equals(l)||(a.color.set(l),a.needsUpdate=!0),!0}var eA=class{constructor(t){this.rawSeriesData=[],this.series=[],this.paintDirty=!0,this.renderCache=new class{constructor(){this.prevFrameCache=new Map,this.currFrameCache=new Map}getFromPreviousFrame(t){return this.prevFrameCache.get(t)??null}setToCurrentFrame(t,e){this.currFrameCache.set(t,e)}finalizeFrameAndGetRemoved(){let t=[];for(let[e,i]of this.prevFrameCache.entries())this.currFrameCache.has(e)||t.push(i);return this.prevFrameCache=this.currFrameCache,this.currFrameCache=new Map,t}},this.coordinateIdentifier=null,this.layout={x:0,width:1,y:0,height:1},this.getMetadataMapImpl=t.getMetadataMap,this.coordinator=t.coordinator,this.renderer=t.renderer,this.paintBrush=new class{constructor(t,e){this.renderCache=t,this.renderer=e}setLine(t,e,i){let r=this.renderer.createOrUpdateLineObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setTriangle(t,e,i){let r=this.renderer.createOrUpdateTriangleObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setCircle(t,e,i){let r=this.renderer.createOrUpdateCircleObject(this.renderCache.getFromPreviousFrame(t),e,i);r&&this.renderCache.setToCurrentFrame(t,r)}setTrapezoid(t,e,i,r){let o=this.renderer.createOrUpdateTrapezoidObject(this.renderCache.getFromPreviousFrame(t),e,i,r);o&&this.renderCache.setToCurrentFrame(t,o)}}(this.renderCache,this.renderer)}setLayoutRect(t){(this.layout.x!==t.x||this.layout.width!==t.width||this.layout.y!==t.y||this.layout.height!==t.height)&&(this.paintDirty=!0),this.layout=t}getLayoutRect(){return this.layout}getMetadataMap(){return this.getMetadataMapImpl()}markAsPaintDirty(){this.paintDirty=!0}render(){if(this.transformCoordinatesIfStale(),this.paintDirty){this.redraw();for(let t of this.renderCache.finalizeFrameAndGetRemoved())this.renderer.destroyObject(t);this.paintDirty=!1}}isCoordinateUpdated(){return this.coordinator.getUpdateIdentifier()!==this.coordinateIdentifier}clearCoordinateIdentifier(){this.coordinateIdentifier=null}setData(t){this.clearCoordinateIdentifier(),this.rawSeriesData=t}transformCoordinatesIfStale(){if(!this.isCoordinateUpdated())return;let t=this.getLayoutRect();this.series=new Array(this.rawSeriesData.length);for(let e=0;e<this.rawSeriesData.length;e++){let i=this.rawSeriesData[e];this.series[e]={id:i.id,polyline:new Float32Array(2*i.points.length)};for(let r=0;r<i.points.length;r++){let[o,s]=this.coordinator.transformDataToUiCoord(t,[i.points[r].x,i.points[r].y]);this.series[e].polyline[2*r]=o,this.series[e].polyline[2*r+1]=s}}this.coordinateIdentifier=this.coordinator.getUpdateIdentifier(),this.markAsPaintDirty()}},a_=(()=>(function(n){n[n.NUMBER=0]="NUMBER",n[n.NAN=1]="NAN"}(a_||(a_={})),a_))(),tA=class extends eA{recordPartition(t,e,i){return t?{type:a_.NUMBER,polyline:e}:{type:a_.NAN,polyline:e.map((r,o)=>isNaN(r)?o%2==0?i.x:i.y:r)}}partitionPolyline(t){let e=[],i=0,r=!1,o=this.coordinator.transformDataToUiCoord(this.getLayoutRect(),[0,0]),s={x:o[0],y:o[1]},a=null;for(let l=0;l<t.length;l+=2){let c=t[l],d=t[l+1],u=isNaN(c)||isNaN(d);u!==r&&i!==l&&(e.push(this.recordPartition(!r,t.slice(i,l),null===a?{x:c,y:d}:a)),i=l),u||(a={x:c,y:d}),r=u}return i!==t.length-1&&e.push(this.recordPartition(!r,t.slice(i,t.length),a??s)),e}redraw(){for(let t of this.series){let i=this.getMetadataMap()[t.id];if(!i)continue;if(t.polyline.length%2!=0)throw new Error(`Cannot have odd length-ed polyline: ${t.polyline.length}`);let r=this.partitionPolyline(t.polyline);for(let[o,{type:s,polyline:a}]of r.entries())if(s===a_.NUMBER)2===a.length?this.paintBrush.setCircle(JSON.stringify(["circle",t.id,o]),{x:a[0],y:a[1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,radius:4}):this.paintBrush.setLine(JSON.stringify(["line",t.id,o]),a,{color:i.color,visible:i.visible,opacity:i.opacity??1,width:2});else if(!i.aux)for(let l=0;l<a.length;l+=2)this.paintBrush.setTriangle(JSON.stringify(["NaN",t.id,a[l],a[l+1]]),{x:a[l],y:a[l+1]},{color:i.color,visible:i.visible,opacity:i.opacity??1,size:12})}}},nA=class extends b0{constructor(){super(...arguments),this.camera=new mm(0,1e3,1e3,0,0,100)}isYAxisPointedDown(){return!1}setDomContainerRect(t){super.setDomContainerRect(t),this.camera.left=t.x,this.camera.right=t.x+t.width,this.camera.top=t.y+t.height,this.camera.bottom=t.y,this.camera.updateProjectionMatrix()}getCamera(){return this.camera}},iA=class{constructor(t){switch(this.metadataMap={},this.shouldRepaint=!1,this.callbacks=t.callbacks,t.type){case Qi.SVG:this.coordinator=new b0,this.renderer=new class{constructor(t){this.svg=t}flush(){}onResize(t){}destroyObject(t){this.svg.removeChild(t.dom)}setUseDarkMode(t){}createPathDString(t){if(!t.length)return"";let e=new Array(t.length/2);e[0]=`M${t[0]},${t[1]}`;for(let i=1;i<t.length/2;i++)e[i]=`L${t[2*i]},${t[2*i+1]}`;return e.join("")}createOrUpdateLineObject(t,e,i){let r=LD(t?.dom,()=>{let o=document.createElementNS("http://www.w3.org/2000/svg","path");o.style.fill="none";let s=this.createPathDString(e);return o.setAttribute("d",s),this.svg.appendChild(o),o},o=>{if(!t?.data||!Yl_arePolylinesEqual(e,t?.data)){let s=this.createPathDString(e);o.setAttribute("d",s)}return o},i);return null===r?null:(r.style.strokeWidth=String(i.width),{dom:r,data:e})}createOrUpdateTriangleObject(t,e,i){let{size:r,color:o}=i,s=r*Math.sqrt(3)/2,a=new Float32Array([e.x-r/2,e.y+s/3,e.x+r/2,e.y+s/3,e.x,e.y-2*s/3]),l=LD(t?.dom,()=>{let c=document.createElementNS("http://www.w3.org/2000/svg","path");c.classList.add("triangle"),c.style.fill="none";let d=this.createPathDString(a);return c.setAttribute("d",d+"Z"),this.svg.appendChild(c),c},c=>{let d=this.createPathDString(a);return c.setAttribute("d",d+"Z"),c},i);return null===l?null:(l.style.fill=o,{dom:l,data:a})}createOrUpdateCircleObject(t,e,i){let{color:r,radius:o}=i,s=LD(t?.dom,()=>{let a=document.createElementNS("http://www.w3.org/2000/svg","circle");return a.style.fill=r,a.setAttribute("cx",String(e.x)),a.setAttribute("cy",String(e.y)),a.setAttribute("r",String(o)),this.svg.appendChild(a),a},a=>(a.style.fill=r,a.setAttribute("cx",String(e.x)),a.setAttribute("cy",String(e.y)),a.setAttribute("r",String(o)),a),i);return null===s?null:{dom:s,data:e}}createOrUpdateTrapezoidObject(t,e,i,r){if(e.y!==i.y)throw new RangeError("Input error: start.y != end.y.");let{altitude:o,color:s}=r,a=2/Math.sqrt(3)*o,l=new Float32Array([e.x-a/2,e.y+o/2,e.x,e.y-o/2,i.x,i.y-o/2,i.x+a/2,i.y+o/2]),c=LD(t?.dom,()=>{let d=document.createElementNS("http://www.w3.org/2000/svg","path");d.classList.add("trapezoid"),d.style.fill="none";let u=this.createPathDString(l);return d.setAttribute("d",u+"Z"),this.svg.appendChild(d),d},d=>{let u=this.createPathDString(l);return d.setAttribute("d",u+"Z"),d},r);return null===c?null:(c.style.fill=s,{dom:c,data:l})}dispose(){}}(t.container);break;case Qi.WEBGL:{let e=new nA;this.coordinator=e,this.renderer=new class{constructor(t,e,i,r){this.coordinator=e,this.scene=new J0,this.backgroundColor="#fff",Yl_isWebGl2OffscreenCanvasSupported()&&t instanceof OffscreenCanvas&&(t.style=t.style||{}),r&&t.addEventListener("webglcontextlost",r),this.renderer=new ji({canvas:t,antialias:!0,alpha:!0}),this.renderer.setPixelRatio(i)}onResize(t){this.renderer.setSize(t.width,t.height)}destroyObject(t){let e=t.obj3d;if(this.scene.remove(e),e instanceof ao){e.geometry.dispose();let i=Array.isArray(e.material)?e.material:[e.material];for(let r of i)r.dispose()}}setUseDarkMode(t){this.backgroundColor=t?"#303030":"#fff"}createOrUpdateLineObject(t,e,i){if(!t&&!i.visible)return null;let{visible:r,width:o}=i;if(!t){let d=_V(this.backgroundColor,i.color,i.opacity??1),u=new Ui,p=new Wd({color:d}),f=new ao(u,p);return p.visible=r,hte(u,e,o),this.scene.add(f),{type:$l.LINE,data:e,obj3d:f,width:o}}let{data:s,obj3d:a,width:l}=t;return JI(this.backgroundColor,a,d=>((o!==l||!s||!Yl_arePolylinesEqual(s,e))&&hte(d,e,o),d),i)?{type:$l.LINE,data:e,obj3d:a,width:o}:t}createMesh(t,e){if(!e.visible)return null;let{visible:i,color:r,opacity:o}=e,s=_V(this.backgroundColor,r,o??1),a=new pm({color:s,visible:i});return new ao(t,a)}createOrUpdateTriangleObject(t,e,i){let{size:r}=i,o=r*Math.sqrt(3)/2,s=new Float32Array([e.x-r/2,e.y-o/3,e.x+r/2,e.y-o/3,e.x,e.y+2*o/3]);if(!t){let l=new Ui;mte(l,s);let c=this.createMesh(l,i);return null===c?null:(this.scene.add(c),{type:$l.TRIANGLE,data:e,obj3d:c})}return JI(this.backgroundColor,t.obj3d,l=>(mte(l,s),l),i)?{type:$l.TRIANGLE,data:e,obj3d:t.obj3d}:t}createOrUpdateCircleObject(t,e,i){let{radius:r}=i,o=new $0(i.radius);if(!t){let a=this.createMesh(o,i);return null===a?null:(a.position.set(e.x,e.y,0),this.scene.add(a),{type:$l.CIRCLE,data:{loc:e,radius:r},obj3d:a})}return JI(this.backgroundColor,t.obj3d,()=>o,i)?(t.obj3d.position.set(e.x,e.y,0),{type:$l.CIRCLE,data:{loc:e,radius:r},obj3d:t.obj3d}):t}createOrUpdateTrapezoidObject(t,e,i,r){if(e.y!==i.y)throw new RangeError("Input error: start.y != end.y.");let{altitude:o}=r,s=2/Math.sqrt(3)*o,a=new qd([new $e(e.x-s/2,e.y-o/2),new $e(e.x,e.y+o/2),new $e(i.x,i.y+o/2),new $e(i.x+s/2,i.y-o/2)]);a.autoClose=!0;let l=new _m(a);if(!t){let d=this.createMesh(l,r);return null===d?null:(this.scene.add(d),{type:$l.TRAPEZOID,data:[e,i],obj3d:d})}return JI(this.backgroundColor,t.obj3d,()=>l,r)?{type:$l.TRAPEZOID,data:[e,i],obj3d:t.obj3d}:t}flush(){this.renderer.render(this.scene,this.coordinator.getCamera())}dispose(){this.renderer.dispose()}}(t.container,e,t.devicePixelRatio,t.callbacks.onContextLost);break}}this.renderer.setUseDarkMode(t.useDarkMode),this.seriesLineView=new tA({renderer:this.renderer,coordinator:this.coordinator,getMetadataMap:()=>this.metadataMap}),this.resize(t.domDimension)}dispose(){}setXScaleType(t){this.coordinator.setXScale(ql(t)),this.scheduleRepaint()}setYScaleType(t){this.coordinator.setYScale(ql(t)),this.scheduleRepaint()}resize(t){this.coordinator.setDomContainerRect({x:0,y:0,...t}),this.renderer.onResize({x:0,y:0,...t}),this.seriesLineView.setLayoutRect({...t,x:0,y:0}),this.scheduleRepaint()}setMetadata(t){let e=!1;Object.entries(t).forEach(([i,r])=>{let o=this.metadataMap[i];(!o||r.color!==o.color||r.visible!==o.visible||r.opacity!==o.opacity)&&(e=!0),this.metadataMap[i]=r}),e&&this.seriesLineView.markAsPaintDirty(),this.scheduleRepaint()}setViewBox(t){this.coordinator.setViewBoxRect({x:t.x[0],width:t.x[1]-t.x[0],y:t.y[0],height:t.y[1]-t.y[0]}),this.scheduleRepaint()}setData(t){this.seriesLineView.setData(t),this.scheduleRepaint()}setUseDarkMode(t){this.renderer.setUseDarkMode(t),this.seriesLineView.markAsPaintDirty(),this.scheduleRepaint()}scheduleRepaint(){this.shouldRepaint||(this.shouldRepaint=!0,(n=>{self.requestAnimationFrame(n)})(()=>{this.repaint(),this.shouldRepaint=!1}))}repaint(){this.seriesLineView.render(),this.renderer.flush(),this.callbacks.onDrawEnd()}},Ca=(()=>(function(n){n[n.SERIES_DATA_UPDATED=0]="SERIES_DATA_UPDATED",n[n.SERIES_METADATA_CHANGED=1]="SERIES_METADATA_CHANGED",n[n.SCALE_UPDATED=2]="SCALE_UPDATED",n[n.VIEW_BOX_UPDATED=3]="VIEW_BOX_UPDATED",n[n.INIT=4]="INIT",n[n.DOM_RESIZED=5]="DOM_RESIZED",n[n.DARK_MODE_UPDATED=6]="DARK_MODE_UPDATED",n[n.DISPOSED=7]="DISPOSED"}(Ca||(Ca={})),Ca))(),l_=(()=>(function(n){n[n.ON_REDRAW_END=0]="ON_REDRAW_END",n[n.ON_CONTEXT_LOST=1]="ON_CONTEXT_LOST"}(l_||(l_={})),l_))();function _te(n){if(n.includes("/"))throw new RangeError("Worker factory only allows file name and no resource path.");return new Worker(n)}var ym=class{constructor(t){if(this.callbacks=t.callbacks,t.type!==Qi.WEBGL)throw new RangeError(`Cannot use non WEBGL renderer for the offscreen line chart. Received ${Qi[t.type]} `);let e=new MessageChannel;e.port1.onmessage=o=>{this.onMessageFromWorker(o.data)},this.txMessagePort=e.port1;let i=t.container.transferControlToOffscreen();this.workerInstance=ym.workerPool.getNext();let r={type:Ca.INIT,canvas:i,devicePixelRatio:window.devicePixelRatio,dim:t.domDimension,rendererType:t.type,useDarkMode:t.useDarkMode};this.workerInstance.postMessage(r,[i,e.port2])}dispose(){this.sendMessage({type:Ca.DISPOSED}),this.workerInstance.free(),this.txMessagePort.close()}setXScaleType(t){this.sendMessage({type:Ca.SCALE_UPDATED,axis:"x",scaleType:t})}setYScaleType(t){this.sendMessage({type:Ca.SCALE_UPDATED,axis:"y",scaleType:t})}resize(t){this.sendMessage({type:Ca.DOM_RESIZED,dim:t})}setMetadata(t){this.sendMessage({type:Ca.SERIES_METADATA_CHANGED,metadata:t})}setViewBox(t){this.sendMessage({type:Ca.VIEW_BOX_UPDATED,extent:t})}setData(t){let e=function(n){let t=n.reduce((o,s)=>o+s.points.length,0),e=0,i=new Float64Array(2*t),r=[];for(let o of n){r.push({id:o.id,length:o.points.length});for(let s=0;s<o.points.length;s++)i[e++]=o.points[s].x,i[e++]=o.points[s].y}return{idsAndLengths:r,flattenedSeries:i.buffer}}(t);this.sendMessage({type:Ca.SERIES_DATA_UPDATED,compactDataSeries:e},[e.flattenedSeries])}setUseDarkMode(t){this.sendMessage({type:Ca.DARK_MODE_UPDATED,useDarkMode:t})}sendMessage(t,e){e?this.txMessagePort.postMessage(t,e):this.txMessagePort.postMessage(t)}onMessageFromWorker(t){switch(t.type){case l_.ON_REDRAW_END:this.callbacks.onDrawEnd();break;case l_.ON_CONTEXT_LOST:this.callbacks.onContextLost()}}};function Zc(n,t){return"x"===t?[0,n.width]:[n.height,0]}function Xx(n,t){let e=Math.floor(n/50);return Math.min(e,t)}function oA(n,t,e,i){return{major:[],minor:n.ticks(i,e).map(o=>({value:o,tickFormattedString:t.formatTick(o)}))}}ym.workerPool=new class{constructor(t,e=10,i=_te){this.workerResourcePath=t,this.maxPoolSize=e,this.workerFactory=i,this.workers=[]}getNext(){let t;if(this.workers.every(({activeCount:i})=>i>0)&&this.workers.length<this.maxPoolSize){let i=this.workerFactory(this.workerResourcePath);t={activeCount:0,postMessage:(r,o)=>{i.postMessage(r,o)},free:()=>{t.activeCount=Math.max(t.activeCount-1,0)}},this.workers.push(t)}else{let i=this.workers.map(({activeCount:o})=>o),r=i.indexOf(Math.min(...i));t=this.workers[r]}return t.activeCount++,t}}("chart_worker.js?_file_hash=2c1e71c5");var vV=document.createElement("canvas").getContext("2d");function xte(n){for(let t of n)if(String(t).includes("e"))return!0;return!1}var Qx={getStandardTicks:oA,getTicksForTemporalScale:function(n,t,e,i){let[r,o]=i,s=n.ticks(i,2);if(o-r>=864e5||s.length>2)return oA(n,t,e,i);let a=n.ticks(i,e);return{major:s.map(l=>({start:l,tickFormattedString:t.formatShort(l)})),minor:a.map(l=>({value:l,tickFormattedString:t.formatTick(l)}))}},getTicksForLinearScale:function(n,t,e,i){let[r,o]=i,s=Math.abs(o-r);if(s>.001)return oA(n,t,e,i);let a=n.ticks([r,o],e),l=n.ticks([r,o],2);if(xte(a)||xte(l))return oA(n,t,e,i);let c=[],d=function(n){let t=n.toExponential().split("e-",2);return 2===t.length?Number(t[1])-1:0}(s);s<1&&l.every(f=>{let m=Math.abs(f);return m>=0&&m<1})&&(d+=1);let u=new Map;for(let f of l){let[m,b=""]=String(f).split(".",2),M=Number(m+"."+b.slice(0,d));u.set(M,{start:M,tickFormattedString:0===M?"\u2014":t.formatReadable(M)})}let p=10*Math.pow(10,-d);for(let f of a)for(let m of[...u.keys()].reverse()){let b=f-m;if(b>=0&&b<p){if(0===m)c.push({value:f,tickFormattedString:t.formatTick(f)});else{let M=String(f).slice(String(m).length);c.push({value:f,tickFormattedString:`\u2026${M||"0"}`})}break}}return{major:Array.from(u.values()),minor:c}},filterTicksByVisibility:function(n,t,e,i,r=5){if(!n.length||!vV)return n;let o="x"===e?1:-1,s=null;return n.filter(a=>{let l=t(a);vV.font=i;let c=vV.measureText(a.tickFormattedString),d="x"===e?c.width:c.actualBoundingBoxAscent-c.actualBoundingBoxDescent;return null===s?!(l+o*d<0||(s=l+o*d,0)):!(o*(s+o*r-l)>0||(s=l+o*d,0))})}};function Y2e(n,t){if(1&n&&(Nn(),h(0,"g",17)(1,"text"),T(2),g(),h(3,"title"),T(4),g()()),2&n){let e=t.$implicit,i=w();v(1),Tt("font",i.axisFont),Be("x",i.textXPosition(e.value))("y",i.textYPosition(e.value)),v(1),He(" ",e.tickFormattedString," "),v(2),bt(i.getFormatter().formatLong(e.value))}}function X2e(n,t){if(1&n&&(h(0,"span",20)(1,"span"),T(2),g()()),2&n){let e=t.$implicit,i=t.index,r=t.last,o=w(2);Tt("left",o.getMajorXPosition(e),"px")("width",o.getMajorWidthString(e,r,o.majorTicks[i+1]))("bottom",o.getMajorYPosition(e),"px")("height",o.getMajorHeightString(e,r,o.majorTicks[i+1]))("font",o.axisFont),nt("major-label",!0)("last",r),_("title",o.getFormatter().formatLong(e.start)),v(2),bt(e.tickFormattedString)}}function Q2e(n,t){if(1&n&&(h(0,"div",18),S(1,X2e,3,16,"span",19),g()),2&n){let e=w();v(1),_("ngForOf",e.majorTicks)("ngForTrackBy",e.trackByMajorTick)}}var Cte=(()=>{class n{constructor(){this.onViewExtentChange=new F,this.editMenuOpened=!1,this.majorTicks=[],this.minorTicks=[]}ngOnChanges(){let e=null,r=Xx("x"===this.axis?this.domDim.width:this.domDim.height,this.gridCount);e=this.scale instanceof nx?Qx.getTicksForLinearScale(this.scale,this.getFormatter(),r,this.axisExtent):this.scale instanceof ix?Qx.getTicksForTemporalScale(this.scale,this.getFormatter(),r,this.axisExtent):Qx.getStandardTicks(this.scale,this.getFormatter(),r,this.axisExtent),this.majorTicks=e.major,this.minorTicks=Qx.filterTicksByVisibility(e.minor,o=>this.getDomPos(o.value),this.axis,"11px Roboto, sans-serif")}getFormatter(){return this.customFormatter??this.scale.defaultFormatter}trackByMinorTick(e){return e.value}trackByMajorTick(e){return e.start}getDomPos(e){return this.scale.forward(this.axisExtent,Zc(this.domDim,this.axis),e)}textXPosition(e){return"x"===this.axis?String(this.getDomPos(e)):"100%"}textYPosition(e){return"x"===this.axis?"":String(this.getDomPos(e))}getMajorXPosition(e){return"y"===this.axis?0:Math.min(this.domDim.width,Math.max(0,this.getDomPos(e.start)))}getMajorWidthString(e,i,r){return"y"===this.axis?"":(i||!r?this.domDim.width:this.getMajorXPosition(r))-this.getMajorXPosition(e)+"px"}getMajorYPosition(e){return"x"===this.axis?0:this.domDim.height-Math.min(this.domDim.height,Math.max(0,this.getDomPos(e.start)))}getMajorHeightString(e,i,r){return"x"===this.axis?"":(i||!r?this.domDim.height:this.getMajorYPosition(r))-this.getMajorYPosition(e)+"px"}keydownPreventClose(e){"Escape"!==e.key&&e.stopPropagation()}extentChanged(e,i){let r=Number(e),o=Number(i);if(o<r){let s=r;r=o,o=s}!Number.isFinite(r)||!Number.isFinite(o)||this.onViewExtentChange.emit([r,o])}onAxisUpdateMenuOpen(e,i,r){e.value=String(r[0]),i.value=String(r[1]),e.focus()}setEditMenuOpened(e){this.editMenuOpened=e}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["line-chart-axis"]],inputs:{axisExtent:"axisExtent",axis:"axis",scale:"scale",gridCount:"gridCount",domDim:"domDim",customFormatter:"customFormatter"},outputs:{onViewExtentChange:"onViewExtentChange"},features:[Gt],decls:26,vars:11,consts:[[1,"line"],[1,"minor"],[1,"ticks"],["class","minor-tick-label",4,"ngFor","ngForOf","ngForTrackBy"],["mat-icon-button","","title","Click to manually set min & max values",1,"extent-edit-button",3,"matMenuTriggerFor","menuOpened","menuClosed"],["matMenuTrigger","matMenuTrigger"],["svgIcon","edit_24px"],["class","major ticks",4,"ngIf"],["xPosition","before",3,"yPosition"],["manualControl","matMenu"],[1,"extent-edit-input",3,"click","keydown"],["type","number",3,"value"],["minInput",""],["maxInput",""],[1,"extent-edit-control",3,"keydown"],["mat-raised-button","","color","primary",1,"extent-edit-change",3,"click"],["mat-stroked-button","",1,"extent-edit-cancel",3,"click"],[1,"minor-tick-label"],[1,"major","ticks"],[3,"major-label","last","left","width","bottom","height","font","title",4,"ngFor","ngForOf","ngForTrackBy"],[3,"title"]],template:function(e,i){if(1&e){let r=ge();h(0,"div"),P(1,"div",0),h(2,"div",1),Nn(),h(3,"svg",2),S(4,Y2e,5,6,"g",3),g(),Oo(),h(5,"button",4,5),I("menuOpened",function(){X(r);let s=it(15),a=it(20);return i.onAxisUpdateMenuOpen(s,a,i.axisExtent),Q(i.setEditMenuOpened(!0))})("menuClosed",function(){return i.setEditMenuOpened(!1)}),P(7,"mat-icon",6),g()(),S(8,Q2e,2,2,"div",7),g(),h(9,"mat-menu",8,9)(11,"div",10),I("click",function(s){return s.stopPropagation()})("keydown",function(s){return i.keydownPreventClose(s)}),h(12,"label"),T(13,"min"),g(),P(14,"input",11,12),g(),h(16,"div",10),I("click",function(s){return s.stopPropagation()})("keydown",function(s){return i.keydownPreventClose(s)}),h(17,"label"),T(18,"max"),g(),P(19,"input",11,13),g(),h(21,"div",14),I("keydown",function(s){return i.keydownPreventClose(s)}),h(22,"button",15),I("click",function(){X(r);let s=it(15),a=it(20),l=it(6);return i.extentChanged(s.value,a.value),Q(l.closeMenu())}),T(23," Change "),g(),h(24,"button",16),I("click",function(){return X(r),Q(it(6).closeMenu())}),T(25," Cancel "),g()()()}if(2&e){let r=it(10);As(i.axis+"-axis axis"),v(4),_("ngForOf",i.minorTicks)("ngForTrackBy",i.trackByMinorTick),v(1),nt("extent-edit-menu-opened",i.editMenuOpened),_("matMenuTriggerFor",r),v(3),_("ngIf",i.majorTicks.length),v(1),_("yPosition","y"===i.axis?"above":"below"),v(5),_("value",i.axisExtent[0]),v(5),_("value",i.axisExtent[1])}},dependencies:[nn,Fe,Ji,$i,En,Nc,Lc],styles:["[_nghost-%COMP%]{contain:strict;display:flex;overflow:hidden}.major-label[_ngcontent-%COMP%], text[_ngcontent-%COMP%]{fill:currentColor;font-size:11px;user-select:none}.axis[_ngcontent-%COMP%]{display:flex;height:100%;width:100%}.axis[_ngcontent-%COMP%]   .extent-edit-button[_ngcontent-%COMP%]{--tb-icon-size: 16px;height:24px;position:absolute;right:5px;top:5px;visibility:hidden;width:24px;padding:0}.major[_ngcontent-%COMP%], .minor[_ngcontent-%COMP%]{flex:1 0;overflow:hidden}.line[_ngcontent-%COMP%]{background-color:#aaa;flex:0 0 1px;justify-content:stretch}.ticks[_ngcontent-%COMP%]{height:100%;position:relative;width:100%}.x-axis[_ngcontent-%COMP%]{flex-direction:column}.x-axis[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-bottom:3px}.x-axis[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{dominant-baseline:text-before-edge;text-anchor:middle}.x-axis[_ngcontent-%COMP%]   .ticks[_ngcontent-%COMP%]{-webkit-mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.y-axis[_ngcontent-%COMP%]{flex-direction:row-reverse}.y-axis[_ngcontent-%COMP%]   .line[_ngcontent-%COMP%]{margin-left:5px}.y-axis[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{dominant-baseline:central;text-anchor:end}.y-axis[_ngcontent-%COMP%]   .ticks[_ngcontent-%COMP%]{-webkit-mask-image:linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.extent-edit-input[_ngcontent-%COMP%]{align-items:center;column-gap:5px;display:grid;font-size:12px;grid-template-columns:30px minmax(auto, 100px);height:30px;margin:10px 20px}.extent-edit-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background-color:inherit;border-radius:4px;border-style:solid;color:inherit}.extent-edit-control[_ngcontent-%COMP%]{align-items:center;display:flex;flex-direction:row-reverse;justify-content:flex-end;margin:10px 20px}.extent-edit-control[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-size:12px;height:30px;line-height:1.4;margin-left:5px;padding:0 10px}.axis[_ngcontent-%COMP%]:hover   .extent-edit-button[_ngcontent-%COMP%], .axis[_ngcontent-%COMP%]:focus-within   .extent-edit-button[_ngcontent-%COMP%], .extent-edit-menu-opened[_ngcontent-%COMP%]{visibility:visible}.major[_ngcontent-%COMP%]{position:relative;overflow:hidden;contain:strict}.major[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;display:inline-flex;justify-content:center;overflow:hidden;position:absolute;white-space:nowrap}.major[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]   span[_ngcontent-%COMP%]{max-width:100%}.x-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{border-left:1px solid #9e9e9e;padding:0 5px}.x-axis[_ngcontent-%COMP%]   .major-label.last[_ngcontent-%COMP%]{border-right:1px solid #9e9e9e}.y-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%]{border-bottom:1px solid #9e9e9e;height:100%;padding:5px 0;width:100%}.y-axis[_ngcontent-%COMP%]   .major-label.last[_ngcontent-%COMP%]{border-top:1px solid #9e9e9e}.y-axis[_ngcontent-%COMP%]   .major-label[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{transform:rotate(-90deg);transform-origin:center}"],changeDetection:0}),n})();function Zx(n,t){let e=Math.min(Hc(n.map(({x:o})=>o),t),n.length-1),i=Math.max(0,e-1);return Math.abs(n[i].x-t)-Math.abs(n[e].x-t)<=0?i:e}function Mte(n,t,e,i,r,o){let s;switch(n.deltaMode){case WheelEvent.DOM_DELTA_PIXEL:s=1;break;case WheelEvent.DOM_DELTA_LINE:s=8;break;case WheelEvent.DOM_DELTA_PAGE:s=20;break;default:s=1,console.warn(`Unknown WheelEvent deltaMode: ${n.deltaMode}.`)}let a=n.deltaY*s,l=a<0?Math.max(a*i,-.95):a*i,{width:c,height:d}=e,u=[r.reverse(t.x,[0,c],-n.offsetX*l),r.reverse(t.x,[0,c],c+(c-n.offsetX)*l)],p=[o.reverse(t.y,[d,0],-n.offsetY*l),o.reverse(t.y,[d,0],d+(d-n.offsetY)*l)];return{x:u[1]<u[0]?[u[1],u[0]]:u,y:p[1]<p[0]?[p[1],p[0]]:p}}var J2e=["dots"];function $2e(n,t){if(1&n&&(Nn(),P(0,"circle",11)),2&n){let e=w().$implicit,i=w(2);Be("cx",i.getDomX(e.dataPoint.x))("cy",i.getDomY(e.dataPoint.y))("fill",e.metadata.color)}}function eNe(n,t){if(1&n&&(Nn(),Ot(0),S(1,$2e,1,3,"circle",10),kt()),2&n){let e=t.$implicit,i=w(2);v(1),_("ngIf",i.shouldRenderTooltipPoint(e.dataPoint))}}function tNe(n,t){if(1&n&&(Nn(),Ot(0),S(1,eNe,2,1,"ng-container",9),kt()),2&n){let e=w();v(1),_("ngForOf",e.cursoredData)("ngForTrackBy",e.trackBySeriesName)}}function nNe(n,t){if(1&n&&(Nn(),P(0,"rect",12)),2&n){let e=w();Be("x",e.zoomBoxInUiCoordinate.x)("width",e.zoomBoxInUiCoordinate.width)("y",e.zoomBoxInUiCoordinate.y)("height",e.zoomBoxInUiCoordinate.height)}}var iNe=function(n,t,e){return{data:n,cursorLocationInDataCoord:t,cursorLocation:e}};function rNe(n,t){if(1&n&&(h(0,"div",14),li(1,15),g()),2&n){let e=w(2),i=it(11);v(1),_("ngTemplateOutlet",e.tooltipTemplate?e.tooltipTemplate:i)("ngTemplateOutletContext",gb(2,iNe,e.cursoredData,e.cursorLocationInDataCoord,e.cursorLocation))}}function oNe(n,t){if(1&n){let e=ge();S(0,rNe,2,6,"ng-template",13),I("detach",function(){return X(e),Q(w().onTooltipDisplayDetached())})}if(2&n){let e=w();_("cdkConnectedOverlayOrigin",e.tooltipOriginEl)("cdkConnectedOverlayOpen",e.tooltipDisplayAttached&&e.state.getValue()===e.InteractionState.NONE)("cdkConnectedOverlayPositions",e.tooltipPositions)("cdkConnectedOverlayScrollStrategy",e.scrollStrategy)("cdkConnectedOverlayLockPosition",!1)("cdkConnectedOverlayFlexibleDimensions",!0)("cdkConnectedOverlayGrowAfterOpen",!0)}}function sNe(n,t){if(1&n&&(Ot(0),h(1,"tr",17)(2,"td",18),P(3,"span"),g(),h(4,"td",19),T(5),g(),h(6,"td"),T(7),g(),h(8,"td"),T(9),g()(),kt()),2&n){let e=t.$implicit;v(3),Tt("background-color",e.metadata.color),v(2),bt(e.metadata.displayName),v(2),bt(e.dataPoint.y),v(2),bt(e.dataPoint.x)}}function aNe(n,t){if(1&n&&(h(0,"table")(1,"thead")(2,"tr"),P(3,"th",16),h(4,"th"),T(5,"Name"),g(),h(6,"th"),T(7,"Y"),g(),h(8,"th"),T(9,"X"),g()()(),h(10,"tbody"),S(11,sNe,10,5,"ng-container",9),g()()),2&n){let e=t.data,i=w();v(11),_("ngForOf",e)("ngForTrackBy",i.trackBySeriesName)}}function cNe(n){return n.scrollStrategies.reposition()}var wte=(()=>{class n{constructor(e,i){this.changeDetector=e,this.scrollStrategy=i,this.onViewExtentChange=new F,this.onViewExtentReset=new F,this.onInteractionStateChange=new F,this.InteractionState=Ir,this.state=new Ai(Ir.NONE),this.specialKeyPressed=!1,this.zoomBoxInUiCoordinate={x:0,width:0,height:0,y:0},this.tooltipPositions=[{offsetY:5,originX:"start",overlayX:"start",originY:"bottom",overlayY:"top"},{offsetY:5,originX:"end",overlayX:"end",originY:"bottom",overlayY:"top"},{offsetY:-15,originX:"start",overlayX:"start",originY:"top",overlayY:"bottom"},{offsetY:-15,originX:"end",overlayX:"end",originY:"top",overlayY:"bottom"},{offsetX:5,originX:"end",overlayX:"start",originY:"top",overlayY:"top"},{offsetX:-5,originX:"start",overlayX:"end",originY:"top",overlayY:"top"}],this.cursorLocationInDataCoord=null,this.cursorLocation=null,this.cursoredData=[],this.tooltipDisplayAttached=!1,this.showZoomInstruction=!1,this.dragStartCoord=null,this.isCursorInside=!1,this.ngUnsubscribe=new Ie,this.subscriptions=[]}ngAfterViewInit(){this.subscriptions.push(this.state.subscribe(e=>{this.onInteractionStateChange.emit(e)})),this.ngUnsubscribe.pipe(N(()=>{this.subscriptions.forEach(e=>e.unsubscribe())})),mi(this.dotsContainer.nativeElement,"dblclick",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(()=>{this.onViewExtentReset.emit(),this.state.next(Ir.NONE),this.changeDetector.markForCheck()}),mi(window,"keydown",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),mi(window,"keyup",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{let i=this.shouldPan(e);i!==this.specialKeyPressed&&(this.specialKeyPressed=i,this.changeDetector.markForCheck())}),mi(this.dotsContainer.nativeElement,"mousedown",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{let i=this.state.getValue(),r=this.shouldPan(e)?Ir.PANNING:Ir.DRAG_ZOOMING;i===Ir.NONE&&r===Ir.DRAG_ZOOMING&&(this.dragStartCoord={x:e.offsetX,y:e.offsetY},this.zoomBoxInUiCoordinate={x:e.offsetX,width:0,y:e.offsetY,height:0}),i!==r&&(this.state.next(r),this.changeDetector.markForCheck())}),mi(this.dotsContainer.nativeElement,"mouseup",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{let i=(e.buttons&ga.LEFT)===ga.LEFT;this.dragStartCoord=null;let r=this.zoomBoxInUiCoordinate;if(!i&&this.state.getValue()===Ir.DRAG_ZOOMING&&r.width>0&&r.height>0){let o=this.getDataX(r.x),s=this.getDataX(r.x+r.width),a=this.getDataY(r.y+r.height),l=this.getDataY(r.y);this.onViewExtentChange.emit({dataExtent:{x:[o,s],y:[a,l]}})}this.state.getValue()!==Ir.NONE&&(this.state.next(Ir.NONE),this.changeDetector.markForCheck())}),mi(this.dotsContainer.nativeElement,"mouseenter",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{this.isCursorInside=!0,this.updateTooltip(e),this.changeDetector.markForCheck()}),mi(this.dotsContainer.nativeElement,"mouseleave",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{this.dragStartCoord=null,this.isCursorInside=!1,this.updateTooltip(e),this.state.next(Ir.NONE),this.changeDetector.markForCheck()}),mi(this.dotsContainer.nativeElement,"mousemove",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{switch(this.state.getValue()){case Ir.SCROLL_ZOOMING:this.state.next(Ir.NONE),this.updateTooltip(e),this.changeDetector.markForCheck();break;case Ir.NONE:this.updateTooltip(e),this.changeDetector.markForCheck();break;case Ir.PANNING:{let i=-e.movementX,r=-e.movementY,{width:o,height:s}=this.domDim,a=this.getDataX(i),l=this.getDataX(o+i),c=this.getDataY(s+r),d=this.getDataY(r);this.onViewExtentChange.emit({dataExtent:{x:[a,l],y:[c,d]}});break}case Ir.DRAG_ZOOMING:{if(!this.dragStartCoord)break;let i=[this.dragStartCoord.x,e.offsetX],r=[this.dragStartCoord.y,e.offsetY];this.zoomBoxInUiCoordinate={x:Math.min(...i),width:Math.max(...i)-Math.min(...i),y:Math.min(...r),height:Math.max(...r)-Math.min(...r)}}this.changeDetector.markForCheck()}}),mi(this.dotsContainer.nativeElement,"wheel",{passive:!1}).pipe(ot(this.ngUnsubscribe),Jn(e=>{let i=!e.ctrlKey&&!e.shiftKey&&e.altKey;return this.showZoomInstruction=!i,this.changeDetector.markForCheck(),i?(e.preventDefault(),Ht(e)):na(3e3).pipe(Nt(()=>{this.showZoomInstruction=!1,this.changeDetector.markForCheck()}),N(()=>null))}),ke(e=>Boolean(e))).subscribe(e=>{this.onViewExtentChange.emit({dataExtent:Mte(e,this.viewExtent,this.domDim,.01,this.xScale,this.yScale)}),this.state.getValue()!==Ir.SCROLL_ZOOMING&&(this.state.next(Ir.SCROLL_ZOOMING),this.changeDetector.markForCheck())})}ngOnChanges(){this.updateCursoredDataAndTooltipVisibility()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}shouldPan(e){let i=e.shiftKey||e.altKey;if(e instanceof KeyboardEvent)return i;let r=(e.buttons&ga.LEFT)===ga.LEFT,o=(e.buttons&ga.MIDDLE)===ga.MIDDLE;return!(!r&&!o)&&(o&&!r||i)}trackBySeriesName(e,i){return i.id}getDomX(e){return this.xScale.forward(this.viewExtent.x,Zc(this.domDim,"x"),e)}getDataX(e){return this.xScale.reverse(this.viewExtent.x,Zc(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Zc(this.domDim,"y"),e)}getDataY(e){return this.yScale.reverse(this.viewExtent.y,Zc(this.domDim,"y"),e)}shouldRenderTooltipPoint(e){return null!==e&&!isNaN(e.x)&&!isNaN(e.y)}updateTooltip(e){this.cursorLocationInDataCoord={x:this.getDataX(e.offsetX),y:this.getDataY(e.offsetY)},this.cursorLocation={x:e.offsetX,y:e.offsetY},this.updateCursoredDataAndTooltipVisibility()}onTooltipDisplayDetached(){this.tooltipDisplayAttached=!1}updateCursoredDataAndTooltipVisibility(){let e=this.cursorLocationInDataCoord;if(null===e)return this.cursoredData=[],void(this.tooltipDisplayAttached=!1);this.cursoredData=this.isCursorInside?this.seriesData.map(i=>({seriesDatum:i,metadata:this.seriesMetadataMap[i.id]})).filter(({metadata:i})=>i&&i.visible&&!Boolean(i.aux)).map(({seriesDatum:i,metadata:r})=>{let o=Zx(i.points,e.x),s=i.points[o];return{id:i.id,closestPointIndex:o,dataPoint:s,domPoint:{x:this.getDomX(s.x),y:this.getDomY(s.y)},metadata:r}}).filter(i=>i):[],this.tooltipDisplayAttached=Boolean(this.cursoredData.length)}}return n.\u0275fac=function(e){return new(e||n)(C($t),C(xf))},n.\u0275cmp=O({type:n,selectors:[["line-chart-interactive-view"]],viewQuery:function(e,i){if(1&e&&(Ge(J2e,7,Me),Ge(Bu,5)),2&e){let r;Se(r=Ee())&&(i.dotsContainer=r.first),Se(r=Ee())&&(i.overlay=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&nt("show-zoom-instruction",i.showZoomInstruction)},inputs:{seriesData:"seriesData",seriesMetadataMap:"seriesMetadataMap",viewExtent:"viewExtent",xScale:"xScale",yScale:"yScale",domDim:"domDim",tooltipOriginEl:"tooltipOriginEl",tooltipTemplate:"tooltipTemplate",disableTooltip:"disableTooltip"},outputs:{onViewExtentChange:"onViewExtentChange",onViewExtentReset:"onViewExtentReset",onInteractionStateChange:"onInteractionStateChange"},features:[Qt([{provide:xf,useFactory:cNe,deps:[zi]}]),Gt],decls:12,vars:9,consts:[[1,"dots"],["dots",""],[4,"ngIf"],["class","zoom-box",4,"ngIf"],[1,"zoom-instruction"],[1,"instruction-content"],["cdkOverlayOrigin","",1,"tooltip-origin"],["tooltipOrigin","cdkOverlayOrigin"],["defaultTooltip",""],[4,"ngFor","ngForOf","ngForTrackBy"],["r","4",4,"ngIf"],["r","4"],[1,"zoom-box"],["cdkConnectedOverlay","",3,"cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayLockPosition","cdkConnectedOverlayFlexibleDimensions","cdkConnectedOverlayGrowAfterOpen","detach"],[1,"tooltip-container"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"circle-header"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[1,"name"]],template:function(e,i){1&e&&(Nn(),h(0,"svg",0,1),S(2,tNe,2,2,"ng-container",2),S(3,nNe,1,4,"rect",3),g(),Oo(),h(4,"div",4)(5,"span",5),T(6,"Alt + Scroll to Zoom"),g()(),P(7,"div",6,7),S(9,oNe,1,7,null,2),S(10,aNe,12,2,"ng-template",null,8,Wt)),2&e&&(nt("pannable",i.specialKeyPressed)("draggable",i.state.getValue()===i.InteractionState.NONE||i.state.getValue()===i.InteractionState.DRAG_ZOOMING)("panning",i.state.getValue()===i.InteractionState.PANNING),v(2),_("ngIf",i.state.getValue()===i.InteractionState.NONE),v(1),_("ngIf",i.state.getValue()===i.InteractionState.DRAG_ZOOMING),v(6),_("ngIf",!i.disableTooltip))},dependencies:[nn,Fe,Lr,Bu,wd],styles:["[_nghost-%COMP%]{display:flex;position:relative;user-select:none}.dots[_ngcontent-%COMP%]{height:100%;width:100%}.dots.draggable[_ngcontent-%COMP%]{cursor:crosshair}.dots.pannable[_ngcontent-%COMP%]{cursor:grab}.dots.panning[_ngcontent-%COMP%]{cursor:grabbing}.tooltip-row-circle[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:12px;width:12px}.tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.6);display:inline-block;height:10px;width:10px}.tooltip-origin[_ngcontent-%COMP%]{bottom:0;left:0;position:absolute;right:0}.tooltip-container[_ngcontent-%COMP%]{background:rgba(0,0,0,.85);border-radius:4px;color:#fff;contain:paint style layout;font-size:.9em;overflow:auto;padding:5px;pointer-events:none;width:100%}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{padding:2px 5px;text-align:left}th[_ngcontent-%COMP%]{font-weight:500;padding-bottom:5px}.zoom-box[_ngcontent-%COMP%]{fill-opacity:.03;fill:#000;stroke:#ccc}.zoom-instruction[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;left:0;opacity:0;pointer-events:none;position:absolute;right:0;top:10px;transition:opacity .5s;z-index:1}.instruction-content[_ngcontent-%COMP%]{background:rgba(0,0,0,.6);border-radius:5px;color:#fff;padding:5px 10px;user-select:none}.show-zoom-instruction[_nghost-%COMP%]   .zoom-instruction[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0}),n})();function uNe(n,t){if(1&n&&(Nn(),P(0,"line",2)),2&n){let e=t.$implicit,i=w();nt("zero",0===e),Be("x1",i.getDomX(e))("x2",i.getDomX(e))("y2",i.domDim.height)}}function pNe(n,t){if(1&n&&(Nn(),P(0,"line",3)),2&n){let e=t.$implicit,i=w();nt("zero",0===e),Be("y1",i.getDomY(e))("x2",i.domDim.width)("y2",i.getDomY(e))}}var Ste=(()=>{class n{getDomX(e){return this.xScale.forward(this.viewExtent.x,Zc(this.domDim,"x"),e)}getDomY(e){return this.yScale.forward(this.viewExtent.y,Zc(this.domDim,"y"),e)}getXTicks(){return this.xScale.ticks(this.viewExtent.x,Xx(this.domDim.width,this.xGridCount))}getYTicks(){return this.yScale.ticks(this.viewExtent.y,Xx(this.domDim.height,this.yGridCount))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["line-chart-grid-view"]],inputs:{viewExtent:"viewExtent",xScale:"xScale",xGridCount:"xGridCount",yScale:"yScale",yGridCount:"yGridCount",domDim:"domDim"},decls:3,vars:2,consts:[["y1","0",3,"zero",4,"ngFor","ngForOf"],["x1","0",3,"zero",4,"ngFor","ngForOf"],["y1","0"],["x1","0"]],template:function(e,i){1&e&&(Nn(),h(0,"svg"),S(1,uNe,1,5,"line",0),S(2,pNe,1,5,"line",1),g()),2&e&&(v(1),_("ngForOf",i.getXTicks()),v(1),_("ngForOf",i.getYTicks()))},dependencies:[nn],styles:["[_nghost-%COMP%] {\n        display: flex;\n        overflow: hidden;\n      }\n\n      svg[_ngcontent-%COMP%] {\n        height: 100%;\n        width: 100%;\n      }\n\n      line[_ngcontent-%COMP%] {\n        stroke: #ccc;\n        stroke-width: 1px;\n      }\n\n      .zero[_ngcontent-%COMP%] {\n        stroke: #aaa;\n        stroke-width: 1.5px;\n      }"],changeDetection:0}),n})(),mNe=["seriesView"],hNe=["xAxis"],gNe=["yAxis"],_Ne=["chartEl"];function bNe(n,t){if(1&n&&P(0,"line-chart-grid-view",16),2&n){let e=w();_("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("xGridCount",e.X_GRID_COUNT)("yGridCount",e.Y_GRID_COUNT)("domDim",e.domDimensions.main)}}function vNe(n,t){1&n&&(Nn(),P(0,"svg",null,17))}function yNe(n,t){1&n&&P(0,"canvas",null,17)}function xNe(n,t){if(1&n&&(Ot(0),S(1,vNe,2,0,"svg",5),S(2,yNe,2,0,"canvas",5),kt()),2&n){let e=w();v(1),_("ngIf",e.getRendererType()===e.RendererType.SVG),v(1),_("ngIf",e.getRendererType()===e.RendererType.WEBGL)}}function CNe(n,t){if(1&n){let e=ge();h(0,"line-chart-interactive-view",18),I("onViewExtentChange",function(r){return X(e),Q(w().onViewBoxChanged(r))})("onViewExtentReset",function(){return X(e),Q(w().viewBoxReset())})("onInteractionStateChange",function(r){return X(e),Q(w().onInteractionStateChange(r))}),g()}if(2&n){let e=w(),i=it(1);_("seriesData",e.seriesData)("seriesMetadataMap",e.seriesMetadataMap)("viewExtent",e.viewBox)("xScale",e.xScale)("yScale",e.yScale)("tooltipOriginEl",i)("domDim",e.domDimensions.main)("tooltipTemplate",e.tooltipTemplate)("disableTooltip",e.disableTooltip)}}var MNe=function(n,t,e,i){return{xScale:n,yScale:t,domDimension:e,viewExtent:i}};function wNe(n,t){if(1&n&&(h(0,"div",19),li(1,20),g()),2&n){let e=w();v(1),_("ngTemplateOutlet",e.customVisTemplate)("ngTemplateOutletContext",AO(2,MNe,e.xScale,e.yScale,e.domDimensions.main,e.viewBox))}}function SNe(n,t){if(1&n){let e=ge();h(0,"line-chart-axis",21),I("onViewExtentChange",function(r){return X(e),Q(w().onViewBoxChangedFromAxis(r,"y"))}),g()}if(2&n){let e=w();_("axisExtent",e.viewBox.y)("customFormatter",e.customYFormatter)("domDim",e.domDimensions.yAxis)("gridCount",e.Y_GRID_COUNT)("scale",e.yScale)}}function ENe(n,t){if(1&n){let e=ge();h(0,"line-chart-axis",22),I("onViewExtentChange",function(r){return X(e),Q(w().onViewBoxChangedFromAxis(r,"x"))}),g()}if(2&n){let e=w();_("axisExtent",e.viewBox.x)("customFormatter",e.customXFormatter)("domDim",e.domDimensions.xAxis)("gridCount",e.X_GRID_COUNT)("scale",e.xScale)}}function TNe(n,t){1&n&&(h(0,"div",23),P(1,"span",24),g())}var DNe=function(n,t,e,i,r){return{xScale:n,yScale:t,domDimension:e,viewExtent:i,interactionState:r}};function INe(n,t){if(1&n&&(h(0,"div",25,26),li(2,20),g()),2&n){let e=w();v(2),_("ngTemplateOutlet",e.customChartOverlayTemplate)("ngTemplateOutletContext",RO(2,DNe,e.xScale,e.yScale,e.domDimensions.main,e.viewBox,e.interactionState))}}var ANe=function(n,t){return{container:!0,"dark-mode":n,"line-only-mode":t,"line-chart":!0}},yV={x:[0,1],y:[0,1]},c_=(()=>{class n{constructor(e){this.changeDetector=e,this.RendererType=Qi,this.useDarkMode=!1,this.preferredRendererType=Qi.WEBGL,this.xScaleType=nr.LINEAR,this.yScaleType=nr.LINEAR,this.userViewBox=null,this.lineOnly=!1,this.disableTooltip=!1,this.viewBoxChanged=new F,this.onViewBoxOverridden=new Rp(1),this.ignoreYOutliers=!1,this.Y_GRID_COUNT=6,this.X_GRID_COUNT=10,this.xScale=ql(this.xScaleType),this.yScale=ql(this.xScaleType),this.viewBox=yV,this.domDimensions={main:{width:0,height:0},xAxis:{width:0,height:0},yAxis:{width:0,height:0}},this.showChartRendererElement=!0,this.interactionState=Ir.NONE,this.lineChart=null,this.isDataUpdated=!1,this.isMetadataUpdated=!1,this.isFixedViewBoxUpdated=!1,this.isViewBoxOverridden=!1,this.useDarkModeUpdated=!1,this.userViewBoxUpdated=!1,this.isViewBoxChanged=!0,this.scaleUpdated=!0,this.isRenderingContextLost=!1}ngOnInit(){this.onViewBoxOverridden.next(this.isViewBoxOverridden)}ngOnChanges(e){e.xScaleType&&(this.xScale=ql(this.xScaleType),this.scaleUpdated=!0),e.yScaleType&&(this.yScale=ql(this.yScaleType),this.scaleUpdated=!0),e.seriesData&&(this.isDataUpdated=!0),e.fixedViewBox&&(this.isFixedViewBoxUpdated=!0),e.seriesMetadataMap&&(this.isMetadataUpdated=!0),e.useDarkMode&&(this.useDarkModeUpdated=!0),e.userViewBox&&(this.userViewBoxUpdated=!0),this.userViewBoxUpdated?this.setIsViewBoxOverridden(!!this.userViewBox):this.scaleUpdated&&this.setIsViewBoxOverridden(!1),this.isViewBoxChanged=this.isViewBoxChanged||this.userViewBoxUpdated||this.scaleUpdated||!this.isViewBoxOverridden&&this.shouldUpdateDefaultViewBox(e),this.updateLineChart()}ngAfterViewInit(){this.initializeChart(),this.updateLineChart(),this.changeDetector.detectChanges()}recoverRendererIfNeeded(){!this.isRenderingContextLost||this.disableUpdate||(this.showChartRendererElement=!1,this.changeDetector.detectChanges(),this.showChartRendererElement=!0,this.changeDetector.detectChanges(),this.initializeChart(),this.scaleUpdated=!0,this.isMetadataUpdated=!0,this.isDataUpdated=!0,this.useDarkModeUpdated=!0,this.isFixedViewBoxUpdated=!0,this.isViewBoxChanged=!0,this.isRenderingContextLost=!1)}onViewResize(){!this.lineChart||(this.readAndUpdateDomDimensions(),this.lineChart.resize(this.domDimensions.main),this.changeDetector.detectChanges())}shouldUpdateDefaultViewBox(e){if(e.xScaleType||e.yScaleType||e.ignoreYOutliers||e.seriesData)return!0;let r=e.seriesMetadataMap;if(r){let o=r.previousValue;if(Object.keys(this.seriesMetadataMap).length!==Object.keys(o??{}).length)return!0;for(let[s,a]of Object.entries(this.seriesMetadataMap)){let l=o&&o[s];if(!l||a.visible!==l.visible)return!0}}return!1}onContextLost(){this.isRenderingContextLost=!0,this.lineChart&&(this.lineChart.dispose(),this.lineChart=null)}triggerContextLostForTest(){this.onContextLost()}getLineChartForTest(){return this.lineChart}initializeChart(){this.lineChart&&this.lineChart.dispose();let e=this.getRendererType(),i={onDrawEnd:()=>{},onContextLost:this.onContextLost.bind(this)},r=null;switch(this.readAndUpdateDomDimensions(),e){case Qi.SVG:r={type:Qi.SVG,container:this.chartEl.nativeElement,callbacks:i,domDimension:this.domDimensions.main,useDarkMode:this.useDarkMode};break;case Qi.WEBGL:r={type:Qi.WEBGL,container:this.chartEl.nativeElement,devicePixelRatio:window.devicePixelRatio,callbacks:i,domDimension:this.domDimensions.main,useDarkMode:this.useDarkMode};break;default:throw new Error(`<line-chart> does not yet support rendererType: ${e}`)}let s=e!==Qi.SVG&&Yl_isWebGl2OffscreenCanvasSupported()?ym:iA;this.lineChart=new s(r)}ngOnDestroy(){this.lineChart&&this.lineChart.dispose()}getRendererType(){return function(n){switch(n){case Qi.SVG:return Qi.SVG;case Qi.WEBGL:return Yl_isWebGl2Supported()?Qi.WEBGL:Qi.SVG;default:throw new Error(`Unknown rendererType: ${n}`)}}(this.preferredRendererType)}readAndUpdateDomDimensions(){this.domDimensions={main:{width:this.seriesView.nativeElement.clientWidth,height:this.seriesView.nativeElement.clientHeight},xAxis:{width:this.xAxis.nativeElement.clientWidth,height:this.xAxis.nativeElement.clientHeight},yAxis:{width:this.yAxis.nativeElement.clientWidth,height:this.yAxis.nativeElement.clientHeight}}}updateLineChart(){if(this.recoverRendererIfNeeded(),this.lineChart&&!this.disableUpdate){if(this.scaleUpdated&&(this.scaleUpdated=!1,this.lineChart.setXScaleType(this.xScaleType),this.lineChart.setYScaleType(this.yScaleType)),this.isMetadataUpdated&&(this.isMetadataUpdated=!1,this.lineChart.setMetadata(this.seriesMetadataMap)),this.isDataUpdated&&(this.isDataUpdated=!1,this.lineChart.setData(this.seriesData)),this.useDarkModeUpdated&&(this.useDarkModeUpdated=!1,this.lineChart.setUseDarkMode(this.useDarkMode)),this.userViewBoxUpdated&&(this.userViewBoxUpdated=!1),this.isViewBoxOverridden&&this.userViewBox)this.viewBox=this.userViewBox;else if(!this.isViewBoxOverridden&&this.fixedViewBox)this.viewBox=this.fixedViewBox;else if(!this.isViewBoxOverridden&&this.isViewBoxChanged){let i=function(n,t,e,i,r){let o=null,s=null,a=[];for(let{id:u,points:p}of n){let f=t[u];if(f&&!f.aux&&f.visible)for(let m=0;m<p.length;m++){let{x:b,y:M}=p[m];i(b)&&(o=null===o||b<o?b:o,s=null===s||b>s?b:s),r(M)&&a.push(M)}}a.sort(il);let c=a[0],d=a[a.length-1];return e&&a.length>2&&(c=a[Math.ceil(.05*(a.length-1))],d=a[Math.floor(.95*(a.length-1))]),{x:null!==o&&null!==s?[o,s]:void 0,y:void 0!==c&&void 0!==d?[c,d]:void 0}}(this.seriesData,this.seriesMetadataMap,this.ignoreYOutliers,this.xScale.isSafeNumber,this.yScale.isSafeNumber);this.viewBox={x:this.xScale.niceDomain(i.x??yV.x),y:this.yScale.niceDomain(i.y??yV.y)}}(this.isFixedViewBoxUpdated||this.isViewBoxChanged)&&(this.isFixedViewBoxUpdated=!1,this.isViewBoxChanged=!1,this.lineChart.setViewBox(this.viewBox),this.changeDetector.detectChanges())}}onViewBoxChanged({dataExtent:e}){this.viewBoxChanged.emit(e)}viewBoxReset(){this.viewBoxChanged.emit(null)}setIsViewBoxOverridden(e){let i=this.isViewBoxOverridden;this.isViewBoxOverridden=e,i!==e&&this.onViewBoxOverridden.next(e)}onInteractionStateChange(e){this.interactionState=e}getIsViewBoxOverridden(){return this.onViewBoxOverridden}onViewBoxChangedFromAxis(e,i){let r={...this.viewBox,[i]:e};this.onViewBoxChanged({dataExtent:r})}}return n.\u0275fac=function(e){return new(e||n)(C($t))},n.\u0275cmp=O({type:n,selectors:[["line-chart"]],viewQuery:function(e,i){if(1&e&&(Ge(mNe,7,Me),Ge(hNe,7,Me),Ge(gNe,7,Me),Ge(_Ne,5,Me)),2&e){let r;Se(r=Ee())&&(i.seriesView=r.first),Se(r=Ee())&&(i.xAxis=r.first),Se(r=Ee())&&(i.yAxis=r.first),Se(r=Ee())&&(i.chartEl=r.first)}},inputs:{customVisTemplate:"customVisTemplate",customChartOverlayTemplate:"customChartOverlayTemplate",useDarkMode:"useDarkMode",preferredRendererType:"preferredRendererType",seriesData:"seriesData",fixedViewBox:"fixedViewBox",seriesMetadataMap:"seriesMetadataMap",xScaleType:"xScaleType",yScaleType:"yScaleType",customXFormatter:"customXFormatter",customYFormatter:"customYFormatter",tooltipTemplate:"tooltipTemplate",userViewBox:"userViewBox",lineOnly:"lineOnly",disableTooltip:"disableTooltip",disableUpdate:"disableUpdate",ignoreYOutliers:"ignoreYOutliers"},outputs:{viewBoxChanged:"viewBoxChanged"},features:[Gt],decls:16,vars:13,consts:[["detectResize","","cdkOverlayOrigin","",3,"ngClass","resizeEventDebouncePeriodInMs","onResize"],["overlayTarget","cdkOverlayOrigin"],[1,"series-view"],["seriesView",""],[3,"viewExtent","xScale","yScale","xGridCount","yGridCount","domDim",4,"ngIf"],[4,"ngIf"],[3,"seriesData","seriesMetadataMap","viewExtent","xScale","yScale","tooltipOriginEl","domDim","tooltipTemplate","disableTooltip","onViewExtentChange","onViewExtentReset","onInteractionStateChange",4,"ngIf"],["class","custom-vis",4,"ngIf"],[1,"y-axis"],["yAxis",""],["axis","y",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange",4,"ngIf"],[1,"x-axis"],["xAxis",""],["axis","x",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange",4,"ngIf"],["class","dot",4,"ngIf"],["class","custom-vis custom-chart-overlay-vis",4,"ngIf"],[3,"viewExtent","xScale","yScale","xGridCount","yGridCount","domDim"],["chartEl",""],[3,"seriesData","seriesMetadataMap","viewExtent","xScale","yScale","tooltipOriginEl","domDim","tooltipTemplate","disableTooltip","onViewExtentChange","onViewExtentReset","onInteractionStateChange"],[1,"custom-vis"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["axis","y",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange"],["axis","x",3,"axisExtent","customFormatter","domDim","gridCount","scale","onViewExtentChange"],[1,"dot"],[1,"rect"],[1,"custom-vis","custom-chart-overlay-vis"],["customChartOverlay",""]],template:function(e,i){1&e&&(h(0,"div",0,1),I("onResize",function(){return i.onViewResize()}),h(2,"div",2,3),S(4,bNe,1,6,"line-chart-grid-view",4),S(5,xNe,3,2,"ng-container",5),S(6,CNe,1,9,"line-chart-interactive-view",6),S(7,wNe,2,7,"div",7),g(),h(8,"div",8,9),S(10,SNe,1,5,"line-chart-axis",10),g(),h(11,"div",11,12),S(13,ENe,1,5,"line-chart-axis",13),g(),S(14,TNe,2,0,"div",14),S(15,INe,3,8,"div",15),g()),2&e&&(_("ngClass",qr(10,ANe,i.useDarkMode,i.lineOnly))("resizeEventDebouncePeriodInMs",0),v(4),_("ngIf",!i.lineOnly),v(1),_("ngIf",i.showChartRendererElement),v(1),_("ngIf",!i.lineOnly),v(1),_("ngIf",i.customVisTemplate),v(3),_("ngIf",!i.lineOnly),v(3),_("ngIf",!i.lineOnly),v(1),_("ngIf",!i.lineOnly),v(1),_("ngIf",i.customChartOverlayTemplate))},dependencies:[yn,Fe,Lr,wd,Cte,wte,Ste,Of],styles:['[_nghost-%COMP%]{contain:strict;display:flex;flex-direction:column}[_nghost-%COMP%]     .line-chart:has(.horizontal-prospective-area:hover) .x-axis .extent-edit-button{visibility:visible}[_nghost-%COMP%]   .custom-vis[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%]{background:inherit;display:grid;flex-grow:1;height:100%;overflow:hidden;width:100%;grid-template-areas:"yaxis series" "dot xaxis" ". customChartOverlay";grid-template-columns:50px 1fr;grid-auto-rows:1fr 30px 0px}.container.dark-mode[_ngcontent-%COMP%]{color:#fff}.container.line-only-mode[_ngcontent-%COMP%]{grid-template-columns:0 1fr;grid-auto-rows:1fr 0}.series-view[_ngcontent-%COMP%]{grid-area:series;position:relative;overflow:hidden}.series-view[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   canvas[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   svg[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   line-chart-grid-view[_ngcontent-%COMP%], .series-view[_ngcontent-%COMP%]   line-chart-interactive-view[_ngcontent-%COMP%]{height:100%;left:0;position:absolute;top:0;width:100%}.x-axis[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%], .y-axis[_ngcontent-%COMP%]   .custom-vis[_ngcontent-%COMP%]{height:100%;left:0;overflow:hidden;position:absolute;top:0;width:100%;-webkit-mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%);mask-image:linear-gradient(to right, rgba(0, 0, 0, 0) 0%, #000 10%, #000 90%, rgba(0, 0, 0, 0) 100%)}.x-axis[_ngcontent-%COMP%]   line-chart-axis[_ngcontent-%COMP%], .y-axis[_ngcontent-%COMP%]   line-chart-axis[_ngcontent-%COMP%]{height:100%}.x-axis[_ngcontent-%COMP%]{grid-area:xaxis;position:relative}.y-axis[_ngcontent-%COMP%]{grid-area:yaxis}.dot[_ngcontent-%COMP%]{align-items:flex-start;display:flex;grid-area:dot;justify-content:flex-end}.dot[_ngcontent-%COMP%]   .rect[_ngcontent-%COMP%]{height:1px;width:1px;background-color:#aaa}.custom-chart-overlay-vis[_ngcontent-%COMP%]{grid-area:customChartOverlay;grid-row-end:2;grid-row-start:1}'],changeDetection:0}),n})();function RNe(n,t){1&n&&li(0)}var Tte=function(n){return{$implicit:n}};function PNe(n,t){if(1&n&&(h(0,"div",4),S(1,RNe,1,0,"ng-container",5),T(2),g()),2&n){let e=w(),i=it(6);v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",In(3,Tte,e.datum)),v(1),He(" ",e.getFormattedDataForColumn()," ")}}function ONe(n,t){1&n&&li(0)}function kNe(n,t){if(1&n&&(h(0,"div",4),S(1,ONe,1,0,"ng-container",5),T(2),g()),2&n){let e=w(),i=it(6);v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",In(3,Tte,e.datum)),v(1),He(" ",e.getFormattedDataForColumn()," ")}}function FNe(n,t){if(1&n&&(h(0,"div",6),T(1),g()),2&n){let e=w();v(1),He(" ",e.getFormattedDataForColumn()," ")}}function NNe(n,t){1&n&&P(0,"mat-icon",9)}function LNe(n,t){1&n&&P(0,"mat-icon",10)}function BNe(n,t){if(1&n&&(S(0,NNe,1,0,"mat-icon",7),S(1,LNe,1,0,"mat-icon",8)),2&n){let e=t.$implicit;_("ngIf",e>=0),v(1),_("ngIf",e<0)}}var VNe=["*"],d_=(()=>{class n{constructor(){this.contextMenuOpened=new F,this.ColumnHeaderType=ht}getFormattedDataForColumn(){if(void 0===this.datum)return"";switch(this.header.type){case ht.RUN:return this.datum;case ht.VALUE:case ht.STEP:case ht.SMOOTHED:case ht.START_STEP:case ht.END_STEP:case ht.START_VALUE:case ht.END_VALUE:case ht.MIN_VALUE:case ht.MAX_VALUE:case ht.STEP_AT_MAX:case ht.STEP_AT_MIN:case ht.MEAN:case ht.HPARAM:return"number"==typeof this.datum?g0.formatShort(this.datum):this.datum;case ht.TIME:return new Date(this.datum).toISOString();case ht.RELATIVE_TIME:return _0.formatReadable(this.datum);case ht.VALUE_CHANGE:return g0.formatShort(Math.abs(this.datum));case ht.PERCENTAGE_CHANGE:return Math.round(100*this.datum).toString()+"%";case ht.RAW_CHANGE:return ip.formatShort(Math.abs(this.datum));default:return""}}onContextMenuOpened(e){this.contextMenuOpened.emit(e)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-content-cell"]],hostBindings:function(e,i){1&e&&I("contextmenu",function(o){return i.onContextMenuOpened(o)})},inputs:{header:"header",datum:"datum"},outputs:{contextMenuOpened:"contextMenuOpened"},ngContentSelectors:VNe,decls:7,vars:3,consts:[[3,"ngSwitch"],["class","cell",4,"ngSwitchCase"],["class","cell extra-right-padding",4,"ngSwitchDefault"],["arrow",""],[1,"cell"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"cell","extra-right-padding"],["svgIcon","arrow_upward_24px",4,"ngIf"],["svgIcon","arrow_downward_24px",4,"ngIf"],["svgIcon","arrow_upward_24px"],["svgIcon","arrow_downward_24px"]],template:function(e,i){1&e&&(Dn(),Ot(0,0),S(1,PNe,3,5,"div",1),S(2,kNe,3,5,"div",1),S(3,FNe,2,1,"div",2),zt(4),kt(),S(5,BNe,2,2,"ng-template",null,3,Wt)),2&e&&(_("ngSwitch",i.header.type),v(1),_("ngSwitchCase",i.ColumnHeaderType.VALUE_CHANGE),v(1),_("ngSwitchCase",i.ColumnHeaderType.PERCENTAGE_CHANGE))},dependencies:[Fe,Lr,sr,Sr,uu,En],styles:["[_nghost-%COMP%]{display:table-cell}.cell[_ngcontent-%COMP%]{align-items:center;display:flex}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:12px;width:12px}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]     path{fill:unset}.extra-right-padding[_ngcontent-%COMP%]{padding-right:1px}"],changeDetection:0}),n})(),HNe=["*"],sA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-content-row"]],ngContentSelectors:HNe,decls:1,vars:0,template:function(e,i){1&e&&(Dn(),zt(0))},styles:["[_nghost-%COMP%] {\n        display: table-row;\n      }"],changeDetection:0}),n})();function zNe(n,t){if(1&n&&P(0,"mat-icon",7),2&n){let e=w(2);_("ngClass",e.header.name===e.sortingInfo.name?"show":"show-on-hover")}}function UNe(n,t){if(1&n&&P(0,"mat-icon",8),2&n){let e=w(2);_("ngClass",e.header.name===e.sortingInfo.name?"show":"show-on-hover")}}function jNe(n,t){if(1&n){let e=ge();h(0,"button",4),I("click",function(r){X(e);let o=w();return r.stopPropagation(),Q(o.headerClickedHandler())}),S(1,zNe,1,1,"mat-icon",5),S(2,UNe,1,1,"mat-icon",6),g()}if(2&n){let e=w();v(1),_("ngIf",e.sortingInfo.order===e.SortingOrder.ASCENDING||e.header.name!==e.sortingInfo.name),v(1),_("ngIf",e.sortingInfo.order===e.SortingOrder.DESCENDING&&e.header.name===e.sortingInfo.name)}}function GNe(n,t){if(1&n){let e=ge();h(0,"button",9),I("click",function(r){return X(e),Q(w().onContextMenuOpened(r))}),P(1,"mat-icon",10),g()}}var WNe=["*"],u_=(()=>{class n{constructor(){this.hparamsEnabled=!1,this.disableContextMenu=!1,this.dragStart=new F,this.dragEnd=new F,this.dragEnter=new F,this.headerClicked=new F,this.contextMenuOpened=new F,this.highlightStyle$=new Ai({}),this.SortingOrder=io}onContextMenuOpened(e){this.disableContextMenu||this.contextMenuOpened.emit(e)}headerClickedHandler(){this.header.sortable&&this.headerClicked.emit(this.header.name)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-header-cell"]],hostBindings:function(e,i){1&e&&I("contextmenu",function(o){return i.onContextMenuOpened(o)})},inputs:{header:"header",sortingInfo:"sortingInfo",hparamsEnabled:"hparamsEnabled",disableContextMenu:"disableContextMenu"},outputs:{dragStart:"dragStart",dragEnd:"dragEnd",dragEnter:"dragEnter",headerClicked:"headerClicked",contextMenuOpened:"contextMenuOpened"},ngContentSelectors:WNe,decls:6,vars:7,consts:[[1,"cell",3,"draggable","ngClass","dragstart","dragend","dragenter","click"],[3,"header"],["mat-icon-button","","class","sorting-icon-container",3,"click",4,"ngIf"],["mat-icon-button","","class","context-menu-container show-on-hover",3,"click",4,"ngIf"],["mat-icon-button","",1,"sorting-icon-container",3,"click"],["svgIcon","arrow_upward_24px",3,"ngClass",4,"ngIf"],["svgIcon","arrow_downward_24px",3,"ngClass",4,"ngIf"],["svgIcon","arrow_upward_24px",3,"ngClass"],["svgIcon","arrow_downward_24px",3,"ngClass"],["mat-icon-button","",1,"context-menu-container","show-on-hover",3,"click"],["svgIcon","more_vert_24px"]],template:function(e,i){1&e&&(Dn(),h(0,"div",0),I("dragstart",function(){return i.dragStart.emit(i.header)})("dragend",function(){return i.dragEnd.emit()})("dragenter",function(){return i.dragEnter.emit(i.header)})("click",function(){return i.headerClickedHandler()}),j(1,"async"),zt(2),P(3,"tb-data-table-header",1),S(4,jNe,3,2,"button",2),S(5,GNe,2,0,"button",3),g()),2&e&&(_("draggable",i.header.movable)("ngClass",W(1,5,i.highlightStyle$)),v(3),_("header",i.header),v(1),_("ngIf",i.header.sortable),v(1),_("ngIf",(i.header.removable||i.header.sortable)&&!i.disableContextMenu))},dependencies:[yn,Fe,En,$i,zT,ct],styles:["[_nghost-%COMP%]{display:table-cell;vertical-align:bottom}[_nghost-%COMP%]:hover   .show-on-hover[_ngcontent-%COMP%]{opacity:.3}[_nghost-%COMP%]   .show-on-hover[_ngcontent-%COMP%]:hover{opacity:1}[_nghost-%COMP%]   .show-on-hover[_ngcontent-%COMP%]:focus{opacity:1}.cell[_ngcontent-%COMP%]{align-items:center;display:flex}.cell[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{height:12px;width:12px;line-height:1}.cell[_ngcontent-%COMP%]   button[mat-icon-button].mat-mdc-icon-button.sorting-icon-container[_ngcontent-%COMP%], .cell[_ngcontent-%COMP%]   button[mat-icon-button].mat-mdc-icon-button.context-menu-container[_ngcontent-%COMP%]{width:16px;height:16px;--tb-icon-size: 12px;border-radius:5px;font-size:12px;padding:4px}.cell[_ngcontent-%COMP%]   .sorting-icon-container[_ngcontent-%COMP%]     path{fill:unset}.show[_ngcontent-%COMP%]{opacity:1}.show-on-hover[_ngcontent-%COMP%]{opacity:0}.highlight[_ngcontent-%COMP%]{background-color:#eee}.highlight-border-right[_ngcontent-%COMP%]{border-right:2px solid #ff9800}.highlight-border-left[_ngcontent-%COMP%]{border-left:2px solid #ff9800}"],changeDetection:0}),n})(),qNe=["content"];function YNe(n,t){1&n&&(Ot(0),zt(1),kt())}var XNe=["*"],Rte=(()=>{class n{constructor(e){this.viewRef=e,this.onOpen=new F,this.onClose=new F,this.visible$=new Ai(!1),this.canClose=!0,this.clickListener=this.maybeClose.bind(this)}ngOnInit(){this.visible$.subscribe(e=>{window.requestAnimationFrame(()=>{this.canClose=!0,e?(this.ensureContentIsWithinWindow(),this.onOpen.emit()):this.onClose.emit()})})}openAtPosition(e){let i=this.viewRef.element.nativeElement,r=i.getBoundingClientRect().top;0!==r&&(i.style.top=-1*r+i.offsetTop+"px"),this.content.nativeElement.style.left=e.x+"px",this.content.nativeElement.style.top=e.y+"px",this.canClose=!1,this.visible$.next(!0),document.addEventListener("click",this.clickListener)}ensureContentIsWithinWindow(){if(!this.content)return;let e=this.content.nativeElement.getBoundingClientRect();e.left<0&&(this.content.nativeElement.style.left=0),e.left+e.width>window.innerWidth&&(this.content.nativeElement.style.left=window.innerWidth-e.width+"px"),e.top<0&&(this.content.nativeElement.style.top=0),e.top+e.height>window.innerHeight&&(this.content.nativeElement.style.top=window.innerHeight-e.height+"px")}maybeClose(){!this.canClose||this.close()}close(){document.removeEventListener("click",this.clickListener),this.visible$.next(!1)}}return n.\u0275fac=function(e){return new(e||n)(C(si))},n.\u0275cmp=O({type:n,selectors:[["custom-modal"]],viewQuery:function(e,i){if(1&e&&Ge(qNe,5),2&e){let r;Se(r=Ee())&&(i.content=r.first)}},hostBindings:function(e,i){1&e&&I("keydown.escape",function(o){return i.maybeClose(o)},0,hc)},outputs:{onOpen:"onOpen",onClose:"onClose"},ngContentSelectors:XNe,decls:4,vars:3,consts:[[1,"content",3,"click"],["content",""],[4,"ngIf"]],template:function(e,i){1&e&&(Dn(),h(0,"div",0,1),I("click",function(o){return o.stopPropagation()}),S(2,YNe,2,0,"ng-container",2),j(3,"async"),g()),2&e&&(v(2),_("ngIf",W(3,1,i.visible$)))},dependencies:[Fe,ct],styles:["[_nghost-%COMP%] {\n        position: fixed;\n        left: 0;\n        z-index: 9001;\n      }\n\n      .content[_ngcontent-%COMP%] {\n        position: absolute;\n      }"]}),n})(),ZNe=["search"],KNe=["columnList"],JNe=function(n){return{selected:n}};function $Ne(n,t){if(1&n){let e=ge();h(0,"button",8),I("click",function(){let o=X(e).$implicit;return Q(w().selectColumn(o))}),j(1,"async"),T(2),g()}if(2&n){let e=t.$implicit,i=t.index,r=w();_("ngClass",In(4,JNe,i===W(1,2,r.selectedIndex$))),v(2),He(" ",e.displayName," ")}}var aA=(()=>{class n{constructor(){this.selectableColumns=[],this.columnSelected=new F,this.searchInput="",this.selectedIndex$=new Ai(0),this.isActive=!1}ngOnInit(){this.selectedIndex$.subscribe(()=>{if(!this.columnList)return;let e=this.columnList.nativeElement.querySelector("button.selected");if(!e)return;let i=this.columnList.nativeElement.getBoundingClientRect().height,r=e.getBoundingClientRect().height,o=this.columnList.nativeElement.scrollTop;this.selectedIndex$.getValue()*r<o&&(this.columnList.nativeElement.scrollTop=this.selectedIndex$.getValue()*r),(this.selectedIndex$.getValue()+1)*r>o+i&&(this.columnList.nativeElement.scrollTop=(this.selectedIndex$.getValue()+1)*r-i)})}ngAfterViewInit(){this.searchInput="",this.searchField.nativeElement.focus(),this.selectedIndex$.next(0)}focus(){this.searchField?.nativeElement.focus()}getFilteredColumns(){return this.selectableColumns.filter(e=>e.name.toLowerCase().match(this.searchInput.toLowerCase())||e.displayName.toLowerCase().match(this.searchInput.toLowerCase()))}searchInputChanged(){this.selectedIndex$.next(Math.min(this.selectedIndex$.getValue(),this.selectableColumns.length-1))}selectColumn(e){this.selectedIndex$.next(0),this.columnSelected.emit(e)}activate(){this.isActive=!0}deactivate(){this.isActive=!1}onUpArrow(){!this.isActive||this.selectedIndex$.next(Math.max(this.selectedIndex$.getValue()-1,0))}onDownArrow(){!this.isActive||this.selectedIndex$.next(Math.min(this.selectedIndex$.getValue()+1,this.getFilteredColumns().length-1))}onEnterPressed(){!this.isActive||this.selectColumn(this.getFilteredColumns()[this.selectedIndex$.getValue()])}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-column-selector-component"]],viewQuery:function(e,i){if(1&e&&(Ge(ZNe,5),Ge(KNe,5)),2&e){let r;Se(r=Ee())&&(i.searchField=r.first),Se(r=Ee())&&(i.columnList=r.first)}},hostBindings:function(e,i){1&e&&I("keydown.arrowup",function(o){return i.onUpArrow(o)},0,hc)("keydown.arrowdown",function(o){return i.onDownArrow(o)},!1,hc)("keydown.enter",function(o){return i.onEnterPressed(o)},!1,hc)},inputs:{selectableColumns:"selectableColumns"},outputs:{columnSelected:"columnSelected"},decls:10,vars:2,consts:[[1,"contents"],[1,"search-area"],["matPrefix","","svgIcon","search_24px",1,"search-icon"],["matInput","",3,"ngModel","ngModelChange"],["search",""],[1,"column-list"],["columnList",""],["mat-button","","class","column-button",3,"ngClass","click",4,"ngFor","ngForOf"],["mat-button","",1,"column-button",3,"ngClass","click"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"mat-form-field",1),P(2,"mat-icon",2),h(3,"mat-label"),T(4,"Search"),g(),h(5,"input",3,4),I("ngModelChange",function(o){return i.searchInput=o})("ngModelChange",function(){return i.searchInputChanged()}),g()(),h(7,"div",5,6),S(9,$Ne,3,6,"button",7),g()()),2&e&&(v(5),_("ngModel",i.searchInput),v(4),_("ngForOf",i.getFilteredColumns()))},dependencies:[yn,nn,En,Uu,Ka,kc,S9,Ji,bg,cE,q2,ct],styles:[".contents[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;padding:8px;border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .contents[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .contents[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.contents[_ngcontent-%COMP%]   .search-area[_ngcontent-%COMP%]{margin-bottom:4px}.contents[_ngcontent-%COMP%]   .column-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;max-height:300px;overflow-y:auto}.contents[_ngcontent-%COMP%]   .column-button[_ngcontent-%COMP%]{flex-shrink:0;height:48px;justify-content:left;width:100%}.contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%]{background-color:#eee}body.dark-mode[_nghost-%COMP%]   .contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .contents[_ngcontent-%COMP%]   .column-button.selected[_ngcontent-%COMP%]{background-color:#bdbdbd}"],changeDetection:0}),n})(),tLe=["panel"];function nLe(n,t){if(1&n&&(h(0,"div",0,1),zt(2),g()),2&n){let e=t.id,i=w();_("id",i.id)("ngClass",i._classList)("@panelAnimation",i.isOpen?"visible":"hidden"),Be("aria-label",i.ariaLabel||null)("aria-labelledby",i._getPanelAriaLabelledby(e))}}var iLe=["*"],rLe=_r("panelAnimation",[wi("void, hidden",rn({opacity:0,transform:"scaleY(0.8)"})),gi(":enter, hidden => visible",[Ob([Ci("0.03s linear",rn({opacity:1})),Ci("0.12s cubic-bezier(0, 0, 0.2, 1)",rn({transform:"scaleY(1)"}))])]),gi(":leave, visible => hidden",[Ci("0.075s linear",rn({opacity:0}))])]),oLe=0,sLe=us(class{}),Pte=new ie("mat-autocomplete-default-options",{providedIn:"root",factory:function(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1}}}),lLe=(()=>{class n extends sLe{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._setThemeClasses(this._classList)}get autoActiveFirstOption(){return this._autoActiveFirstOption}set autoActiveFirstOption(e){this._autoActiveFirstOption=Rt(e)}get autoSelectActiveOption(){return this._autoSelectActiveOption}set autoSelectActiveOption(e){this._autoSelectActiveOption=Rt(e)}set classList(e){this._classList=e&&e.length?function(n,t=/\s+/){let e=[];if(null!=n){let i=Array.isArray(n)?n:`${n}`.split(t);for(let r of i){let o=`${r}`.trim();o&&e.push(o)}}return e}(e).reduce((i,r)=>(i[r]=!0,i),{}):{},this._setVisibilityClasses(this._classList),this._setThemeClasses(this._classList),this._elementRef.nativeElement.className=""}constructor(e,i,r,o){super(),this._changeDetectorRef=e,this._elementRef=i,this._defaults=r,this._activeOptionChanges=Mn.EMPTY,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this._autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this._autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.optionSelected=new F,this.opened=new F,this.closed=new F,this.optionActivated=new F,this._classList={},this.id="mat-autocomplete-"+oLe++,this.inertGroups=o?.SAFARI||!1}ngAfterContentInit(){this._keyManager=new og(this.options).withWrap(),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._setVisibilityClasses(this._classList),this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let i=new class{constructor(t,e){this.source=t,this.option=e}}(this,e);this.optionSelected.emit(i)}_getPanelAriaLabelledby(e){return this.ariaLabel?null:this.ariaLabelledby?(e?e+" ":"")+this.ariaLabelledby:e}_setVisibilityClasses(e){e[this._visibleClass]=this.showPanel,e[this._hiddenClass]=!this.showPanel}_setThemeClasses(e){e["mat-primary"]="primary"===this._color,e["mat-warn"]="warn"===this._color,e["mat-accent"]="accent"===this._color}}return n.\u0275fac=function(e){return new(e||n)(C($t),C(Me),C(Pte),C(Gn))},n.\u0275dir=we({type:n,viewQuery:function(e,i){if(1&e&&(Ge(Si,7),Ge(tLe,5)),2&e){let r;Se(r=Ee())&&(i.template=r.first),Se(r=Ee())&&(i.panel=r.first)}},inputs:{ariaLabel:["aria-label","ariaLabel"],ariaLabelledby:["aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:"autoActiveFirstOption",autoSelectActiveOption:"autoSelectActiveOption",panelWidth:"panelWidth",classList:["class","classList"]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},features:[Ke]}),n})(),Ote=(()=>{class n extends lLe{constructor(){super(...arguments),this._visibleClass="mat-mdc-autocomplete-visible",this._hiddenClass="mat-mdc-autocomplete-hidden",this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=Rt(e),this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275cmp=O({type:n,selectors:[["mat-autocomplete"]],contentQueries:function(e,i,r){if(1&e&&(Ti(r,Uv,5),Ti(r,Us,5)),2&e){let o;Se(o=Ee())&&(i.optionGroups=o),Se(o=Ee())&&(i.options=o)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{disableRipple:"disableRipple",hideSingleSelectionIndicator:"hideSingleSelectionIndicator"},exportAs:["matAutocomplete"],features:[Qt([{provide:zv,useExisting:n}]),Ke],ngContentSelectors:iLe,decls:1,vars:0,consts:[["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id","ngClass"],["panel",""]],template:function(e,i){1&e&&(Dn(),S(0,nLe,3,5,"ng-template"))},dependencies:[yn],styles:[".mdc-menu-surface{display:none;position:absolute;box-sizing:border-box;max-width:calc(100vw - 32px);max-width:var(--mdc-menu-max-width, calc(100vw - 32px));max-height:calc(100vh - 32px);max-height:var(--mdc-menu-max-height, calc(100vh - 32px));margin:0;padding:0;transform:scale(1);transform-origin:top left;opacity:0;overflow:auto;will-change:transform,opacity;z-index:8;border-radius:4px;border-radius:var(--mdc-shape-medium, 4px);transform-origin-left:top left;transform-origin-right:top right}.mdc-menu-surface:focus{outline:none}.mdc-menu-surface--animating-open{display:inline-block;transform:scale(0.8);opacity:0}.mdc-menu-surface--open{display:inline-block;transform:scale(1);opacity:1}.mdc-menu-surface--animating-closed{display:inline-block;opacity:0}[dir=rtl] .mdc-menu-surface,.mdc-menu-surface[dir=rtl]{transform-origin-left:top right;transform-origin-right:top left}.mdc-menu-surface--anchor{position:relative;overflow:visible}.mdc-menu-surface--fixed{position:fixed}.mdc-menu-surface--fullwidth{width:100%}.mdc-menu-surface.mat-mdc-autocomplete-panel{width:100%;max-height:256px;position:static;visibility:hidden;transform-origin:center top;margin:0;padding:8px 0;list-style-type:none}.mdc-menu-surface.mat-mdc-autocomplete-panel:focus{outline:none}.cdk-high-contrast-active .mdc-menu-surface.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) .mdc-menu-surface.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above .mdc-menu-surface.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}.mdc-menu-surface.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[rLe]},changeDetection:0}),n})(),cLe={provide:Mo,useExisting:$n(()=>Kx),multi:!0},kte=new ie("mat-autocomplete-scroll-strategy"),uLe={provide:kte,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.reposition()}},pLe=(()=>{class n{get autocompleteDisabled(){return this._autocompleteDisabled}set autocompleteDisabled(e){this._autocompleteDisabled=Rt(e)}constructor(e,i,r,o,s,a,l,c,d,u,p){this._element=e,this._overlay=i,this._viewContainerRef=r,this._zone=o,this._changeDetectorRef=s,this._dir=l,this._formField=c,this._document=d,this._viewportRuler=u,this._defaults=p,this._componentDestroyed=!1,this._autocompleteDisabled=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Mn.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new Ie,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._overlayAttached=!1,this.optionSelections=ta(()=>{let f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(qn(f),Jn(()=>tn(...f.map(m=>m.onSelectionChange)))):this._zone.onStable.pipe(Yt(1),Jn(()=>this.optionSelections))}),this._scrollStrategy=a}ngAfterViewInit(){let e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._attachOverlay(),this._floatLabel()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._isOpen=this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._componentDestroyed||this._changeDetectorRef.detectChanges())}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return tn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(ke(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(ke(()=>this._overlayAttached)):Ht()).pipe(N(e=>e instanceof Hv?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return tn(mi(this._document,"click"),mi(this._document,"auxclick"),mi(this._document,"touchend")).pipe(ke(e=>{let i=ma(e),r=this._formField?this._formField._elementRef.nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&i!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(i))&&(!o||!o.contains(i))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(i)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let i=e.keyCode,r=vr(e);if(27===i&&!r&&e.preventDefault(),this.activeOption&&13===i&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,s=38===i||40===i;9===i||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this.openPanel(),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._element.nativeElement.value),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let i=e.target,r=i.value;"number"===i.type&&(r=""==r?null:parseFloat(r)),this._previousValue!==r&&(this._previousValue=r,this._pendingAutoselectedOption=null,this._onChange(r),this._canOpen()&&this._document.activeElement===e.target&&this.openPanel())}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this.openPanel()}_floatLabel(e=!1){this._formField&&"auto"===this._formField.floatLabel&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){return tn(this._zone.onStable.pipe(Yt(1)),this.autocomplete.options.changes.pipe(Nt(()=>this._positionStrategy.reapplyLastPosition()),Sa(0))).pipe(Jn(()=>(this._zone.run(()=>{let r=this.panelOpen;this._resetActiveItem(),this.autocomplete._setVisibility(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this.autocomplete.opened.emit():this.autocomplete.closed.emit())}),this.panelClosingActions)),Yt(1)).subscribe(r=>this._setValueAndClose(r))}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_assignOptionValue(e){let i=this.autocomplete&&this.autocomplete.displayWith?this.autocomplete.displayWith(e):e;this._updateNativeInputValue(i??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let i=e?e.source:this._pendingAutoselectedOption;i&&(this._clearPreviousSelectedOption(i),this._assignOptionValue(i.value),this._onChange(i.value),this.autocomplete._emitSelectEvent(i),this._element.nativeElement.focus()),this.closePanel()}_clearPreviousSelectedOption(e){this.autocomplete.options.forEach(i=>{i!==e&&i.selected&&i.deselect()})}_attachOverlay(){let e=this._overlayRef;e?(this._positionStrategy.setOrigin(this._getConnectedElement()),e.updateSize({width:this._getPanelWidth()})):(this._portal=new Yo(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),e=this._overlay.create(this._getOverlayConfig()),this._overlayRef=e,this._handleOverlayEvents(e),this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&e&&e.updateSize({width:this._getPanelWidth()})})),e&&!e.hasAttached()&&(e.attach(this._portal),this._closingActionsSubscription=this._subscribeToClosingActions());let i=this.panelOpen;this.autocomplete._setVisibility(),this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._setColor(this._formField?.color),this.panelOpen&&i!==this.panelOpen&&this.autocomplete.opened.emit()}_getOverlayConfig(){return new Qa({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let s,i=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}];s="above"===this.position?o:"below"===this.position?i:[...i,...o],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;e.autoActiveFirstOption?e._keyManager.setFirstItemActive():e._keyManager.setActiveItem(-1)}_canOpen(){let e=this._element.nativeElement;return!e.readOnly&&!e.disabled&&!this._autocompleteDisabled}_getWindow(){return this._document?.defaultView||window}_scrollToOption(e){let i=this.autocomplete,r=z1(e,i.options,i.optionGroups);if(0===e&&1===r)i._setScrollTop(0);else if(i.panel){let o=i.options.toArray()[e];if(o){let s=o._getHostElement(),a=U1(s.offsetTop,s.offsetHeight,i._getScrollTop(),i.panel.nativeElement.offsetHeight);i._setScrollTop(a)}}}_handleOverlayEvents(e){e.keydownEvents().subscribe(i=>{(27===i.keyCode&&!vr(i)||38===i.keyCode&&vr(i,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),i.stopPropagation(),i.preventDefault())}),e.outsidePointerEvents().subscribe()}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(zi),C(si),C(at),C($t),C(kte),C(Xi,8),C(Sf,9),C(Lt,8),C(js),C(Pte,8))},n.\u0275dir=we({type:n,inputs:{autocomplete:["matAutocomplete","autocomplete"],position:["matAutocompletePosition","position"],connectedTo:["matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:["autocomplete","autocompleteAttribute"],autocompleteDisabled:["matAutocompleteDisabled","autocompleteDisabled"]},features:[Gt]}),n})(),Kx=(()=>{class n extends pLe{constructor(){super(...arguments),this._aboveClass="mat-mdc-autocomplete-panel-above"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275dir=we({type:n,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(e,i){1&e&&I("focusin",function(){return i._handleFocus()})("blur",function(){return i._onTouched()})("input",function(o){return i._handleInput(o)})("keydown",function(o){return i._handleKeydown(o)})("click",function(){return i._handleClick()}),2&e&&Be("autocomplete",i.autocompleteAttribute)("role",i.autocompleteDisabled?null:"combobox")("aria-autocomplete",i.autocompleteDisabled?null:"list")("aria-activedescendant",i.panelOpen&&i.activeOption?i.activeOption.id:null)("aria-expanded",i.autocompleteDisabled?null:i.panelOpen.toString())("aria-owns",i.autocompleteDisabled||!i.panelOpen||null==i.autocomplete?null:i.autocomplete.id)("aria-haspopup",i.autocompleteDisabled?null:"listbox")},exportAs:["matAutocompleteTrigger"],features:[Qt([cLe]),Ke]}),n})(),lA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[uLe],imports:[Co,cg,fn,Pe,Pc,cg,fn]}),n})(),Sp=(()=>{class n{constructor(){this.value="",this.placeholder=""}onInputKeyUp(e){"Enter"===e.key&&this.autocompleteTrigger.closePanel()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-filter-input"]],viewQuery:function(e,i){if(1&e&&Ge(Kx,5),2&e){let r;Se(r=Ee())&&(i.autocompleteTrigger=r.first)}},inputs:{value:"value",matAutocomplete:"matAutocomplete",placeholder:"placeholder"},decls:2,vars:4,consts:[["svgIcon","search_24px"],["type","text","autocomplete","off",3,"placeholder","matAutocomplete","matAutocompleteDisabled","value","keyup"]],template:function(e,i){1&e&&(P(0,"mat-icon",0),h(1,"input",1),I("keyup",function(o){return i.onInputKeyUp(o)}),g()),2&e&&(v(1),_("placeholder",i.placeholder)("matAutocomplete",i.matAutocomplete)("matAutocompleteDisabled",!i.matAutocomplete)("value",i.value))},dependencies:[Kx,En],styles:["[_nghost-%COMP%]{display:flex;font-size:13px}mat-icon[_ngcontent-%COMP%]{color:#616161;flex:none;margin-right:5px}body.dark-mode[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}input[_ngcontent-%COMP%]{background-color:inherit;caret-color:currentColor;color:currentColor;font:inherit;border:none;outline:none;padding:0;flex-grow:1}"]}),n})(),fLe=["container"];function mLe(n,t){if(1&n){let e=ge();h(0,"mat-slider",4),I("input",function(r){return X(e),Q(w().handleSingleSliderChange(r.value))}),g()}if(2&n){let e=w();_("disabled",!e.enabled)("min",e.min)("max",e.max)("step",1)("value",e.lowerValue)}}function hLe(n,t){if(1&n){let e=ge();h(0,"span",6,7),P(2,"span",8)(3,"span",9),h(4,"span",10),I("mousedown",function(r){X(e);let o=w(2);return Q(o.handleMouseDown(r,o.Position.LEFT))}),g(),h(5,"span",10),I("mousedown",function(r){X(e);let o=w(2);return Q(o.handleMouseDown(r,o.Position.RIGHT))}),g()()}if(2&n){let e=w(2);v(3),Tt("left",e.getThumbPosition(e.lowerValue))("width",e.getTrackWidth()),v(1),Tt("left",e.getThumbPosition(e.lowerValue)),nt("active",e.isThumbActive(e.Position.LEFT)),v(1),Tt("left",e.getThumbPosition(e.upperValue)),nt("active",e.isThumbActive(e.Position.RIGHT))}}function gLe(n,t){if(1&n&&S(0,hLe,6,12,"span",5),2&n){let e=w();_("ngIf",e.min!==e.max)}}var ll=(()=>(function(n){n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT"}(ll||(ll={})),ll))(),dA=(()=>{class n{constructor(e){this.changeDetector=e,this.tickCount=20,this.enabled=!0,this.returnIntegers=!1,this.rangeValuesChanged=new F,this.singleValueChanged=new F,this.Position=ll,this.activeThumb=ll.NONE,this.offsetXFromOriginOfActiveThumb=0,this.ngUnsubscribe=new Ie}getThumbPosition(e){let i=this.getClippedValue(e),r=this.max-this.min;return r<=0?"50%":(i-this.min)/r*100+"%"}getTrackWidth(){if(null===this.upperValue)return"0%";let e=this.max-this.min;return e<=0?"0%":(this.getClippedValue(this.upperValue)-this.getClippedValue(this.lowerValue))/e*100+"%"}getClippedValue(e){return Math.min(Math.max(e,this.min),this.max)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngOnInit(){mi(document,"mousemove",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{this.handleMouseMove(e)}),mi(document,"mouseup",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>{this.handleMouseOut(e)})}handleMouseDown(e,i){e.stopPropagation(),e.preventDefault(),this.activeThumb=i,this.offsetXFromOriginOfActiveThumb=6-e.offsetX}calculateValueFromMouseEvent(e){let a,{left:i,right:r}=this.container.nativeElement.getBoundingClientRect(),s=e.clientX-i+this.offsetXFromOriginOfActiveThumb;if(null!==this.tickCount&&this.tickCount>0){let c=(r-i)/this.tickCount;a=Math.round(s/c)*c/(r-i)}else a=s/(r-i);let l=this.getClippedValue(this.min+(this.max-this.min)*a);return this.returnIntegers?Math.round(l):Number(l.toFixed(10))}handleMouseMove(e){if(this.activeThumb===ll.NONE||null===this.upperValue)return;let i=this.calculateValueFromMouseEvent(e),r=[this.lowerValue,this.upperValue];this.activeThumb===ll.LEFT?(i>this.upperValue&&(this.activeThumb=ll.RIGHT),r=[i,this.upperValue]):(i<this.lowerValue&&(this.activeThumb=ll.LEFT),r=[this.lowerValue,i]),this.maybeNotifyNextRangeValues(r,"SLIDER"),this.changeDetector.markForCheck()}maybeNotifyNextRangeValues(e,i){let[r,o]=e.sort((s,a)=>s-a);(this.lowerValue!==r||this.upperValue!==o)&&this.rangeValuesChanged.emit({lowerValue:r,upperValue:o,source:i})}handleMouseOut(e){this.activeThumb!==ll.NONE&&(this.activeThumb=ll.NONE,this.changeDetector.markForCheck())}handleSingleSliderChange(e){this.singleValueChanged.emit({value:e,source:"SLIDER"})}handleInputChange(e,i){let r=e.target,o=this.getClippedValue(Number(r.value));isNaN(o)||(i===ll.LEFT?null===this.upperValue?this.singleValueChanged.emit({value:o,source:"TEXT"}):this.maybeNotifyNextRangeValues([o,this.upperValue],"TEXT"):""===r.value?this.singleValueChanged.emit({value:this.lowerValue,source:"TEXT_DELETED"}):this.maybeNotifyNextRangeValues([this.lowerValue,o],"TEXT"))}isThumbActive(e){return this.activeThumb===e}}return n.\u0275fac=function(e){return new(e||n)(C($t))},n.\u0275cmp=O({type:n,selectors:[["tb-range-input"]],viewQuery:function(e,i){if(1&e&&Ge(fLe,5,Me),2&e){let r;Se(r=Ee())&&(i.container=r.first)}},inputs:{min:"min",max:"max",lowerValue:"lowerValue",upperValue:"upperValue",tickCount:"tickCount",enabled:"enabled",returnIntegers:"returnIntegers"},outputs:{rangeValuesChanged:"rangeValuesChanged",singleValueChanged:"singleValueChanged"},decls:5,vars:6,consts:[["type","number",1,"lower-input",3,"disabled","value","change"],["type","number",1,"upper-input",3,"disabled","value","change"],["class","single-slider","color","primary",3,"disabled","min","max","step","value","input",4,"ngIf","ngIfElse"],["range",""],["color","primary",1,"single-slider",3,"disabled","min","max","step","value","input"],["class","container",4,"ngIf"],[1,"container"],["container",""],[1,"slider-track"],[1,"slider-track-fill"],[1,"thumb",3,"mousedown"]],template:function(e,i){if(1&e&&(h(0,"input",0),I("change",function(o){return i.handleInputChange(o,i.Position.LEFT)}),g(),h(1,"input",1),I("change",function(o){return i.handleInputChange(o,i.Position.RIGHT)}),g(),S(2,mLe,1,5,"mat-slider",2),S(3,gLe,1,1,"ng-template",null,3,Wt)),2&e){let r=it(4);_("disabled",!i.enabled)("value",i.lowerValue),v(1),_("disabled",!i.enabled)("value",null!==i.upperValue?i.upperValue:""),v(1),_("ngIf",null===i.upperValue)("ngIfElse",r)}},dependencies:[Fe,Dd],styles:['[_nghost-%COMP%]{box-sizing:border-box;display:inline-grid;grid-gap:10px;grid-template-areas:"lower-input upper-input" "slider slider";grid-template-columns:1fr 1fr;font-size:0;min-width:100px;padding:6px}input[_ngcontent-%COMP%]{background-color:inherit;border-style:solid;box-sizing:border-box;color:inherit;overflow:hidden;width:100%}.lower-input[_ngcontent-%COMP%]{grid-area:lower-input}.upper-input[_ngcontent-%COMP%]{grid-area:upper-input;justify-self:flex-end}.single-slider[_ngcontent-%COMP%]{grid-area:slider;padding:0px}.single-slider[_ngcontent-%COMP%]     .mat-slider-wrapper{top:5px;left:0px;right:0px}  .single-slider.mat-slider-horizontal{height:12px}.container[_ngcontent-%COMP%]{grid-area:slider;align-items:center;box-sizing:border-box;display:inline-flex;height:12px;justify-content:center;position:relative;width:100%}.slider-track[_ngcontent-%COMP%]{background:rgba(0,0,0,.26);height:2px;width:100%}body.dark-mode[_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track[_ngcontent-%COMP%]{background:rgba(255,255,255,.3)}.slider-track-fill[_ngcontent-%COMP%]{position:absolute;height:2px}.thumb[_ngcontent-%COMP%]{box-sadhow:0 0 0 1px rgba(0,0,0,.26);border-radius:100%;display:inline-block;height:12px;margin-left:-6px;position:absolute;top:0;transform-origin:center;transition:transform .3s ease;width:12px;will-change:transform}body.dark-mode[_nghost-%COMP%]   .thumb[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .thumb[_ngcontent-%COMP%]{box-sadhow:0 0 0 1px rgba(255,255,255,.3)}.thumb[_ngcontent-%COMP%]:hover{cursor:grab}.thumb[_ngcontent-%COMP%]:active{cursor:grabbing}.thumb.active[_ngcontent-%COMP%]{transform:scale(1.2)}.slider-track-fill[_ngcontent-%COMP%], .thumb[_ngcontent-%COMP%]{background:#f57c00}body.dark-mode[_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slider-track-fill[_ngcontent-%COMP%]{background:#ef6c00}body.dark-mode[_nghost-%COMP%]   .thumb[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .thumb[_ngcontent-%COMP%]{background:#ef6c00}'],changeDetection:0}),n})();function bLe(n,t){if(1&n){let e=ge();h(0,"tb-filter-input",9),I("keyup",function(r){return X(e),Q(w(2).discreteValueKeyUp(r))}),g()}2&n&&_("value",w(2).discreteValueFilter)}function vLe(n,t){1&n&&(h(0,"div",10),T(1," No Matching Values "),g())}function yLe(n,t){if(1&n){let e=ge();h(0,"div",13),I("click",function(r){return r.stopPropagation()}),h(1,"mat-checkbox",3),I("change",function(){let o=X(e).$implicit;return Q(w(3).discreteFilterChanged.emit(o))}),h(2,"span"),T(3),g()()()}if(2&n){let e=t.$implicit,i=w(3);v(1),_("checked",i.filter.filterValues.includes(e)),v(2),bt(e)}}function xLe(n,t){if(1&n&&(h(0,"div",11),S(1,yLe,4,2,"div",12),g()),2&n){let e=w(2);v(1),_("ngForOf",e.getPossibleValues())}}function CLe(n,t){if(1&n&&(h(0,"div",4)(1,"div",5),S(2,bLe,1,1,"tb-filter-input",6),g(),S(3,vLe,2,0,"div",7),S(4,xLe,2,1,"div",8),g()),2&n){let e=w();v(2),_("ngIf",e.filter.possibleValues),v(1),_("ngIf",!e.getPossibleValues().length),v(1),_("ngIf",e.getPossibleValues().length)}}function MLe(n,t){if(1&n){let e=ge();h(0,"div",14),I("click",function(r){return r.stopPropagation()}),h(1,"tb-range-input",15),I("rangeValuesChanged",function(r){return X(e),Q(w().intervalFilterChanged.emit(r))}),g()()}if(2&n){let e=w();v(1),_("min",e.filter.minValue)("max",e.filter.maxValue)("lowerValue",e.filter.filterLowerValue)("upperValue",e.filter.filterUpperValue)}}var Lte=(()=>{class n{constructor(){this.DomainType=gn,this.discreteValueFilter="",this.discreteFilterChanged=new F,this.intervalFilterChanged=new F,this.includeUndefinedToggled=new F}getPossibleValues(){let e=this.filter.possibleValues??[];return this.discreteValueFilter?e.filter(i=>i.toString().match(this.discreteValueFilter)):e}discreteValueKeyUp(e){this.discreteValueFilter=e.target.value}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table-filter"]],inputs:{filter:"filter"},outputs:{discreteFilterChanged:"discreteFilterChanged",intervalFilterChanged:"intervalFilterChanged",includeUndefinedToggled:"includeUndefinedToggled"},decls:5,vars:3,consts:[[1,"filter-dialog"],["class","filter-container",4,"ngIf"],["class","filter-container","disableRipple","",3,"click",4,"ngIf"],[3,"checked","change"],[1,"filter-container"],[1,"input-container"],["placeholder","Filter Discrete Values (regex)",3,"value","keyup",4,"ngIf"],["class","no-matches",4,"ngIf"],["class","discrete-filters-container",4,"ngIf"],["placeholder","Filter Discrete Values (regex)",3,"value","keyup"],[1,"no-matches"],[1,"discrete-filters-container"],["class","discrete-value",3,"click",4,"ngFor","ngForIndex","ngForOf"],[1,"discrete-value",3,"click"],["disableRipple","",1,"filter-container",3,"click"],[1,"range-input",3,"min","max","lowerValue","upperValue","rangeValuesChanged"]],template:function(e,i){1&e&&(h(0,"div",0),S(1,CLe,5,3,"div",1),S(2,MLe,2,4,"div",2),h(3,"mat-checkbox",3),I("change",function(){return i.includeUndefinedToggled.emit()}),T(4,"Include Undefined"),g()()),2&e&&(v(1),_("ngIf",i.filter.type===i.DomainType.DISCRETE),v(1),_("ngIf",i.filter.type===i.DomainType.INTERVAL),v(1),_("checked",i.filter.includeUndefined))},dependencies:[nn,Fe,ha,Sp,dA],styles:[".filter-dialog[_ngcontent-%COMP%]{padding:16px 8px;border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .filter-dialog[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-dialog[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.input-container[_ngcontent-%COMP%]{margin-bottom:8px}.discrete-filters-container[_ngcontent-%COMP%]{max-height:300px;overflow-y:auto}.no-matches[_ngcontent-%COMP%]{padding:8px 12px}.filter-container[_ngcontent-%COMP%]{padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .filter-container[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-container[_ngcontent-%COMP%]{border-bottom-color:#555}.range-input[_ngcontent-%COMP%]{padding:4px 8px;width:200px}.discrete-value[_ngcontent-%COMP%]{overflow:hidden}.discrete-value[_ngcontent-%COMP%]     mat-checkbox, .discrete-value[_ngcontent-%COMP%]     .mdc-form-field, .discrete-value[_ngcontent-%COMP%]     label{width:100%}"]}),n})(),SLe=["columnSelectorModal"],ELe=["contextMenu"],TLe=["filterModal"];function DLe(n,t){1&n&&(h(0,"div",14),T(1," No Actions Available "),g())}function ILe(n,t){if(1&n){let e=ge();h(0,"button",15),I("click",function(){return X(e),Q(w().contextMenuRemoveColumn())}),P(1,"mat-icon",16),T(2,"Remove "),g()}}function ALe(n,t){if(1&n){let e=ge();h(0,"button",17),I("click",function(){X(e);let r=w();return Q(r.sortByHeader(null==r.contextMenuHeader?null:r.contextMenuHeader.name))}),P(1,"mat-icon",18),T(2,"Sort Descending "),g()}}function RLe(n,t){if(1&n){let e=ge();h(0,"button",17),I("click",function(){X(e);let r=w();return Q(r.sortByHeader(null==r.contextMenuHeader?null:r.contextMenuHeader.name))}),P(1,"mat-icon",19),T(2,"Sort Ascending "),g()}}function PLe(n,t){if(1&n){let e=ge();h(0,"button",15),I("click",function(r){X(e);let o=w();return Q(o.openFilterMenu(r,o.contextMenuHeader))}),P(1,"mat-icon",20),T(2," Filter "),g()}}function OLe(n,t){if(1&n){let e=ge();h(0,"button",15),I("click",function(r){X(e);let o=w();return Q(o.openColumnSelector(r,{insertTo:o.Side.LEFT,isSubMenu:!0}))}),P(1,"mat-icon",21),T(2,"Insert Column Left "),g()}}function kLe(n,t){if(1&n){let e=ge();h(0,"button",15),I("click",function(r){X(e);let o=w();return Q(o.openColumnSelector(r,{insertTo:o.Side.RIGHT,isSubMenu:!0}))}),P(1,"mat-icon",21),T(2,"Insert Column Right "),g()}}function FLe(n,t){if(1&n){let e=ge();h(0,"custom-modal",22,23),I("onOpen",function(){return X(e),Q(w().focusColumnSelector())})("onClose",function(){return X(e),Q(w().onColumnSelectorClosed())}),h(2,"tb-data-table-column-selector-component",24),I("columnSelected",function(r){return X(e),Q(w().onColumnAdded(r))}),g()()}if(2&n){let e=w();v(2),_("selectableColumns",e.selectableColumns)}}function NLe(n,t){if(1&n){let e=ge();h(0,"tb-data-table-filter",25),I("intervalFilterChanged",function(r){return X(e),Q(w().intervalFilterChanged(r))})("discreteFilterChanged",function(r){return X(e),Q(w().discreteFilterChanged(r))})("includeUndefinedToggled",function(){return X(e),Q(w().includeUndefinedToggled())}),g()}2&n&&_("filter",w().getCurrentColumnFilter())}function LLe(n,t){if(1&n){let e=ge();h(0,"div",26)(1,"button",27),I("click",function(r){return X(e),Q(w().openColumnSelector(r))}),P(2,"mat-icon",21),g()()}}function BLe(n,t){1&n&&(h(0,"div",28),P(1,"mat-spinner",29),g())}var VLe=[[["","header",""]],[["","content",""]]],HLe=["[header]","[content]"],ec=(()=>(function(n){n[n.RIGHT=0]="RIGHT",n[n.LEFT=1]="LEFT"}(ec||(ec={})),ec))(),CV=function(n){n.preventDefault()},uA=(()=>{class n{constructor(){this.loading=!1,this.headerCellSubscriptions=[],this.contentCellSubscriptions=[],this.contextMenuHeader=void 0,this.insertColumnTo=void 0,this.filterColumn=void 0,this.sortDataBy=new F,this.orderColumns=new F,this.removeColumn=new F,this.addColumn=new F,this.addFilter=new F,this.ColumnHeaders=ht,this.SortingOrder=io,this.Side=ec,this.highlightSide=ec.RIGHT}ngOnDestroy(){document.removeEventListener("dragover",CV),this.headerCellSubscriptions.forEach(e=>{e.unsubscribe()})}ngAfterContentInit(){this.syncHeaders(),this.headerCells.changes.subscribe(this.syncHeaders.bind(this)),this.syncContent(),this.contentCells.changes.subscribe(this.syncContent.bind(this))}syncHeaders(){this.headerCellSubscriptions.forEach(e=>{e.unsubscribe()}),this.headerCellSubscriptions=[],this.headerCells.forEach(e=>{this.headerCellSubscriptions.push(e.dragStart.subscribe(this.dragStart.bind(this)),e.dragEnter.subscribe(this.dragEnter.bind(this)),e.dragEnd.subscribe(this.dragEnd.bind(this)),e.headerClicked.subscribe(this.sortByHeader.bind(this)),e.contextMenuOpened.subscribe(this.openContextMenu.bind(this,e.header)))})}syncContent(){this.contentCellSubscriptions.forEach(e=>{e.unsubscribe()}),this.contentCellSubscriptions=this.contentCells.map(e=>[e.contextMenuOpened.subscribe(this.openContextMenu.bind(this,e.header))]).flat()}sortByHeader(e){this.sortDataBy.emit(this.sortingInfo.name!==e||this.sortingInfo.order!==io.ASCENDING?{name:e,order:io.ASCENDING}:{name:e,order:io.DESCENDING})}dragStart(e){this.draggingHeaderName=e.name,document.addEventListener("dragover",CV)}dragEnd(){!this.draggingHeaderName||!this.highlightedColumnName||(this.orderColumns.emit(this.moveHeader(this.getIndexOfHeaderWithName(this.draggingHeaderName),this.getIndexOfHeaderWithName(this.highlightedColumnName))),this.draggingHeaderName=void 0,this.highlightedColumnName=void 0,document.removeEventListener("dragover",CV),this.headerCells.forEach(e=>{e.highlightStyle$.next({})}))}dragEnter(e){!this.draggingHeaderName||(this.highlightSide=this.getIndexOfHeaderWithName(e.name)<this.getIndexOfHeaderWithName(this.draggingHeaderName)?ec.LEFT:ec.RIGHT,this.highlightedColumnName=e.name,this.headerCells.forEach(i=>{i.highlightStyle$.next(this.getHeaderHighlightStyle(i.header.name))}))}moveHeader(e,i){let r=[...this.headers];return r.splice(e,1),r.splice(i,0,this.headers[e]),r}getHeaderHighlightStyle(e){return e!==this.highlightedColumnName?{}:{highlight:!0,"highlight-border-right":this.highlightSide===ec.RIGHT,"highlight-border-left":this.highlightSide===ec.LEFT}}getIndexOfHeaderWithName(e){return this.headers.findIndex(i=>e===i.name)}focusColumnSelector(){this.columnSelector.focus()}openContextMenu(e,i){i.stopPropagation(),i.preventDefault(),this.columnSelectorModal?.close(),this.filterModal?.close(),this.contextMenuHeader=e,this.contextMenu.openAtPosition({x:i.clientX,y:i.clientY})}onContextMenuClosed(){this.contextMenuHeader=void 0}openColumnSelector(e,i){i?.isSubMenu&&e.stopPropagation(),this.filterModal?.close(),this.insertColumnTo=i?.insertTo;let r=e.target.closest("button").getBoundingClientRect();this.columnSelectorModal.openAtPosition({x:r.x+r.width,y:r.y}),this.columnSelector.activate()}onColumnSelectorClosed(){this.insertColumnTo=void 0,this.columnSelector.deactivate()}canContextMenuRemoveColumn(){return this.contextMenuHeader?.removable}canContextMenuInsert(){return this.selectableColumns&&this.selectableColumns.length&&this.contextMenuHeader?.movable}isContextMenuEmpty(){return!(this.contextMenuHeader?.removable||this.contextMenuHeader?.sortable||this.canContextMenuInsert()||this.contextMenuHeader?.filterable)}contextMenuRemoveColumn(){void 0!==this.contextMenuHeader&&(this.removeColumn.emit(this.contextMenuHeader),this.contextMenu.close(),this.filterModal?.close())}getInsertIndex(){if(void 0===this.contextMenuHeader||void 0===this.insertColumnTo)return;let e=this.headers.indexOf(this.contextMenuHeader);return this.insertColumnTo===ec.LEFT?e:this.insertColumnTo===ec.RIGHT?Math.min(e+1,this.headers.length):e}onColumnAdded(e){this.addColumn.emit({header:e,index:this.getInsertIndex()})}openFilterMenu(e,i){this.filterColumn=i;let r=e.target.closest("button").getBoundingClientRect();e.stopPropagation(),this.columnSelectorModal?.close(),this.filterModal.openAtPosition({x:r.x+r.width,y:r.y})}getCurrentColumnFilter(){if(this.filterColumn)return this.columnFilters.get(this.filterColumn.name)}onFilterClosed(){this.filterColumn=void 0}intervalFilterChanged(e){if(!this.filterColumn)return;let i=this.getCurrentColumnFilter();!i||this.addFilter.emit({header:this.filterColumn,value:{...i,filterLowerValue:e.lowerValue,filterUpperValue:e.upperValue}})}discreteFilterChanged(e){if(!this.filterColumn)return;let i=this.getCurrentColumnFilter();if(!i)return;let r=new Set([...i.filterValues]);r.has(e)?r.delete(e):r.add(e),this.addFilter.emit({header:this.filterColumn,value:{...i,filterValues:Array.from(r)}})}includeUndefinedToggled(){if(!this.filterColumn)return;let e=this.getCurrentColumnFilter();!e||this.addFilter.emit({header:this.filterColumn,value:{...e,includeUndefined:!e.includeUndefined}})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tb-data-table"]],contentQueries:function(e,i,r){if(1&e&&(Ti(r,u_,4),Ti(r,d_,5)),2&e){let o;Se(o=Ee())&&(i.headerCells=o),Se(o=Ee())&&(i.contentCells=o)}},viewQuery:function(e,i){if(1&e&&(Ge(SLe,5),Ge(aA,5),Ge(ELe,5),Ge(TLe,5)),2&e){let r;Se(r=Ee())&&(i.columnSelectorModal=r.first),Se(r=Ee())&&(i.columnSelector=r.first),Se(r=Ee())&&(i.contextMenu=r.first),Se(r=Ee())&&(i.filterModal=r.first)}},inputs:{headers:"headers",sortingInfo:"sortingInfo",columnCustomizationEnabled:"columnCustomizationEnabled",selectableColumns:"selectableColumns",columnFilters:"columnFilters",loading:"loading"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns",removeColumn:"removeColumn",addColumn:"addColumn",addFilter:"addFilter"},ngContentSelectors:HLe,decls:20,vars:11,consts:[[3,"onClose"],["contextMenu",""],[1,"context-menu"],["class","no-actions-message",4,"ngIf"],["class","context-menu-button","mat-button","",3,"click",4,"ngIf"],["class","context-menu-button sort-button","mat-button","",3,"click",4,"ngIf"],["mat-button","","class","context-menu-button",3,"click",4,"ngIf"],[3,"onOpen","onClose",4,"ngIf"],["filterModal",""],[3,"filter","intervalFilterChanged","discreteFilterChanged","includeUndefinedToggled",4,"ngIf"],[1,"data-table"],[1,"header"],["class","add-button-cell",4,"ngIf"],["class","loading",4,"ngIf"],[1,"no-actions-message"],["mat-button","",1,"context-menu-button",3,"click"],["svgIcon","close_24px"],["mat-button","",1,"context-menu-button","sort-button",3,"click"],["svgIcon","arrow_downward_24px"],["svgIcon","arrow_upward_24px"],["svgIcon","filter_alt_24px"],["svgIcon","add_24px"],[3,"onOpen","onClose"],["columnSelectorModal",""],[3,"selectableColumns","columnSelected"],[3,"filter","intervalFilterChanged","discreteFilterChanged","includeUndefinedToggled"],[1,"add-button-cell"],["mat-icon-button","","title","Add Column",1,"add-column-btn",3,"click"],[1,"loading"],["mode","indeterminate","diameter","28"]],template:function(e,i){1&e&&(Dn(VLe),h(0,"custom-modal",0,1),I("onClose",function(){return i.onContextMenuClosed()}),h(2,"div",2),S(3,DLe,2,0,"div",3),S(4,ILe,3,0,"button",4),S(5,ALe,3,0,"button",5),S(6,RLe,3,0,"button",5),S(7,PLe,3,0,"button",4),S(8,OLe,3,0,"button",6),S(9,kLe,3,0,"button",6),g()(),S(10,FLe,3,1,"custom-modal",7),h(11,"custom-modal",0,8),I("onClose",function(){return i.onFilterClosed()}),S(13,NLe,1,1,"tb-data-table-filter",9),g(),h(14,"div",10)(15,"div",11),zt(16),S(17,LLe,3,0,"div",12),g(),zt(18,1),g(),S(19,BLe,2,0,"div",13)),2&e&&(v(3),_("ngIf",i.isContextMenuEmpty()),v(1),_("ngIf",null==i.contextMenuHeader?null:i.contextMenuHeader.removable),v(1),_("ngIf",(null==i.contextMenuHeader?null:i.contextMenuHeader.sortable)&&i.sortingInfo.order===i.SortingOrder.ASCENDING&&i.sortingInfo.name===(null==i.contextMenuHeader?null:i.contextMenuHeader.name)),v(1),_("ngIf",(null==i.contextMenuHeader?null:i.contextMenuHeader.sortable)&&(i.sortingInfo.order!==i.SortingOrder.ASCENDING||i.sortingInfo.name!==(null==i.contextMenuHeader?null:i.contextMenuHeader.name))),v(1),_("ngIf",null==i.contextMenuHeader?null:i.contextMenuHeader.filterable),v(1),_("ngIf",i.canContextMenuInsert()),v(1),_("ngIf",i.canContextMenuInsert()),v(1),_("ngIf",i.selectableColumns&&i.selectableColumns.length),v(3),_("ngIf",i.getCurrentColumnFilter()),v(4),_("ngIf",i.selectableColumns&&i.selectableColumns.length),v(2),_("ngIf",i.loading))},dependencies:[Fe,En,Ji,$i,tl,Rte,aA,Lte],styles:[".data-table[_ngcontent-%COMP%]{font-size:13px;display:table;width:100%}.data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{display:table-row;z-index:1}.data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{background-color:#fff;position:sticky;text-align:left;top:0;font-weight:bold;vertical-align:bottom}.data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]:hover{cursor:pointer}body.dark-mode[_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .data-table[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{background-color:#303030}.loading[_ngcontent-%COMP%]{align-items:center;border:0;border-bottom:1px solid #ebebeb;display:flex;height:48px;padding:0 24px;justify-content:center}body.dark-mode[_nghost-%COMP%]   .loading[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .loading[_ngcontent-%COMP%]{border-bottom:1px solid #555}.add-button-cell[_ngcontent-%COMP%]{display:table-cell;width:40px}.context-menu[_ngcontent-%COMP%]{border-radius:4px;border:1px solid;box-shadow:0px 4px 4px rgba(0,0,0,.25);border-color:#ebebeb;background-color:#fff}body.dark-mode[_nghost-%COMP%]   .context-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .context-menu[_ngcontent-%COMP%]{border-color:#555;background-color:#303030}.context-menu[_ngcontent-%COMP%]   .context-menu-button[_ngcontent-%COMP%]{justify-content:left;width:100%;text-wrap:nowrap}.context-menu[_ngcontent-%COMP%]   .no-actions-message[_ngcontent-%COMP%]{padding:8px;text-wrap:nowrap}.context-menu[_ngcontent-%COMP%]   .sort-button[_ngcontent-%COMP%]     path{fill:unset}"],changeDetection:0}),n})();function zLe(n,t){if(1&n&&P(0,"tb-data-table-header-cell",5),2&n){let e=w().$implicit,i=w();_("header",e)("sortingInfo",i.sortingInfo)("hparamsEnabled",i.hparamsEnabled)}}function ULe(n,t){if(1&n&&(Ot(0),S(1,zLe,1,3,"tb-data-table-header-cell",4),kt()),2&n){let e=t.$implicit,i=w();v(1),_("ngIf",e.enabled&&(e.type!==i.ColumnHeaderType.SMOOTHED||i.smoothingEnabled))}}function jLe(n,t){if(1&n&&(h(0,"div",9),P(1,"span"),g()),2&n){let e=w(3).$implicit;v(1),Tt("background-color",e.color)}}function GLe(n,t){if(1&n&&(h(0,"tb-data-table-content-cell",7),S(1,jLe,2,2,"div",8),g()),2&n){let e=w().$implicit,i=w().$implicit,r=w();_("header",e)("datum",i[e.name]),v(1),_("ngIf",e.type===r.ColumnHeaderType.COLOR)}}function WLe(n,t){if(1&n&&(Ot(0),S(1,GLe,2,3,"tb-data-table-content-cell",6),kt()),2&n){let e=t.$implicit,i=w(2);v(1),_("ngIf",e.enabled&&(e.type!==i.ColumnHeaderType.SMOOTHED||i.smoothingEnabled))}}function qLe(n,t){if(1&n&&(Ot(0),h(1,"tb-data-table-content-row"),S(2,WLe,2,1,"ng-container",2),g(),kt()),2&n){let e=w();v(2),_("ngForOf",e.getHeaders())}}var Hte=(()=>{class n{constructor(){this.sortDataBy=new F,this.editColumnHeaders=new F,this.removeColumn=new F,this.ColumnHeaderType=ht}getHeaders(){return[{name:"color",displayName:"",type:ht.COLOR,enabled:!0}].concat(this.columnHeaders)}getMinPointInRange(e,i,r){let o=e[i].y,s=e[i];for(let a=i;a<=r;a++)o>e[a].y&&(o=e[a].y,s=e[a]);return s}getMaxPointInRange(e,i,r){let o=e[i].y,s=e[i];for(let a=i;a<=r;a++)o<e[a].y&&(o=e[a].y,s=e[a]);return s}getMean(e,i,r){let o=0;for(let s=i;s<=r;s++)o+=e[s].value;return o/(r-i+1)}getTimeSelectionTableData(){if(!this.stepOrLinkedTimeSelection)return[];let e=this.stepOrLinkedTimeSelection.start.step,i=this.stepOrLinkedTimeSelection.end?.step,r=this.dataSeries.filter(s=>HS(s,this.chartMetadataMap)).map(s=>{let a=this.chartMetadataMap[s.id],l=Zx(s.points,e),c=s.points[l],d=null,u=null;null!=i&&(u=Zx(s.points,i),d=s.points[u]);let p={id:s.id,color:a.color};for(let f of this.columnHeaders)switch(f.type){case ht.RUN:let m="";a.alias&&(m=`${a.alias.aliasNumber} ${a.alias.aliasText}/`),p[f.name]=`${m}${a.displayName}`;continue;case ht.STEP:p[f.name]=c.step;continue;case ht.VALUE:p[f.name]=c.value;continue;case ht.RELATIVE_TIME:p[f.name]=c.relativeTimeInMs;continue;case ht.SMOOTHED:p[f.name]=c.y;continue;case ht.VALUE_CHANGE:if(!d)continue;p[f.name]=d.y-c.y;continue;case ht.START_STEP:p[f.name]=c.step;continue;case ht.END_STEP:if(!d)continue;p[f.name]=d.step;continue;case ht.START_VALUE:p[f.name]=c.y;continue;case ht.END_VALUE:if(!d)continue;p[f.name]=d.y;continue;case ht.MIN_VALUE:if(!u)continue;p[f.name]=this.getMinPointInRange(s.points,l,u).y;continue;case ht.MAX_VALUE:if(!u)continue;p[f.name]=this.getMaxPointInRange(s.points,l,u).y;continue;case ht.PERCENTAGE_CHANGE:if(!d)continue;p[f.name]=(d.y-c.y)/c.y;continue;case ht.STEP_AT_MAX:if(!u)continue;p[f.name]=this.getMaxPointInRange(s.points,l,u).step;continue;case ht.STEP_AT_MIN:if(!u)continue;p[f.name]=this.getMinPointInRange(s.points,l,u).step;continue;case ht.MEAN:if(!u)continue;p[f.name]=this.getMean(s.points,l,u);continue;case ht.RAW_CHANGE:if(!d)continue;p[f.name]=d.value-c.value;continue;default:continue}return p}),o=this.columnHeaders.find(s=>s.name===this.sortingInfo.name);return void 0!==o&&r.sort((s,a)=>{if(!o)return 0;let l=this.getSortableValue(s,o),c=this.getSortableValue(a,o);return l<c?this.sortingInfo.order===io.ASCENDING?-1:1:l>c?this.sortingInfo.order===io.ASCENDING?1:-1:0}),r}getSortableValue(e,i){return function(n){return"object"==typeof n||Number.isNaN(n)||"NaN"===n||null==n?-1/0:n}(i.type===ht.RUN?this.chartMetadataMap[e.id].displayName:e[i.name])}orderColumns(e){this.editColumnHeaders.emit({headers:e,dataTableMode:this.stepOrLinkedTimeSelection.end?ro.RANGE:ro.SINGLE})}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["scalar-card-data-table"]],inputs:{chartMetadataMap:"chartMetadataMap",dataSeries:"dataSeries",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",columnHeaders:"columnHeaders",sortingInfo:"sortingInfo",columnCustomizationEnabled:"columnCustomizationEnabled",smoothingEnabled:"smoothingEnabled",hparamsEnabled:"hparamsEnabled"},outputs:{sortDataBy:"sortDataBy",editColumnHeaders:"editColumnHeaders",removeColumn:"removeColumn"},decls:5,vars:5,consts:[[3,"headers","sortingInfo","columnCustomizationEnabled","sortDataBy","orderColumns","removeColumn"],["header",""],[4,"ngFor","ngForOf"],["content",""],["disableContextMenu","true",3,"header","sortingInfo","hparamsEnabled",4,"ngIf"],["disableContextMenu","true",3,"header","sortingInfo","hparamsEnabled"],[3,"header","datum",4,"ngIf"],[3,"header","datum"],["class","row-circle",4,"ngIf"],[1,"row-circle"]],template:function(e,i){1&e&&(h(0,"tb-data-table",0),I("sortDataBy",function(o){return i.sortDataBy.emit(o)})("orderColumns",function(o){return i.orderColumns(o)})("removeColumn",function(o){return i.removeColumn.emit(o)}),Ot(1,1),S(2,ULe,2,1,"ng-container",2),kt(),Ot(3,3),S(4,qLe,3,1,"ng-container",2),kt(),g()),2&e&&(_("headers",i.columnHeaders)("sortingInfo",i.sortingInfo)("columnCustomizationEnabled",i.columnCustomizationEnabled),v(2),_("ngForOf",i.getHeaders()),v(2),_("ngForOf",i.getTimeSelectionTableData()))},dependencies:[nn,Fe,d_,sA,uA,u_],styles:["tb-data-table-content-cell[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{padding:4px}.row-circle[_ngcontent-%COMP%]{height:12px;width:12px}.row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.4);display:inline-block;height:10px;width:10px;vertical-align:middle}"],changeDetection:0}),n})();var XLe=["stepSpan"];function QLe(n,t){if(1&n){let e=ge();h(0,"button",4),I("click",function(){return X(e),Q(w().fobRemoved.emit())}),P(1,"mat-icon",5),g()}}function ZLe(n,t){if(1&n){let e=ge();h(0,"button",4),I("click",function(){return X(e),Q(w().fobRemoved.emit())}),P(1,"mat-icon",6),g()}}var KLe=function(n,t){return{fob:!0,unremovable:n,prospective:t}},zte=(()=>{class n{constructor(){this.allowRemoval=!0,this.isProspective=!1,this.stepChanged=new F,this.fobRemoved=new F}ngOnChanges(e){e.step&&document.activeElement===this.stepSpan.nativeElement&&this.stepSpan.nativeElement.blur()}validateStep(e){let i=String.fromCharCode(e.which);(" "===e.key||isNaN(Number(i)))&&e.preventDefault()}stepTyped(e){e.preventDefault();let i=e.target.innerText;this.stepChanged.emit(""!==i?Number(i):null)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["card-fob"]],viewQuery:function(e,i){if(1&e&&Ge(XLe,7,Me),2&e){let r;Se(r=Ee())&&(i.stepSpan=r.first)}},inputs:{step:"step",allowRemoval:"allowRemoval",isProspective:"isProspective"},outputs:{stepChanged:"stepChanged",fobRemoved:"fobRemoved"},features:[Gt],decls:5,vars:7,consts:[[3,"ngClass"],["contenteditable","","role","textbox","aria-label","Edit step",3,"innerHTML","blur","keypress","keydown.enter","keydown.shift.enter"],["stepSpan",""],["aria-label","Deselect fob",3,"click",4,"ngIf"],["aria-label","Deselect fob",3,"click"],["svgIcon","close_24px"],["svgIcon","keep_24px"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"span",1,2),I("blur",function(o){return i.stepTyped(o)})("keypress",function(o){return i.validateStep(o)})("keydown.enter",function(o){return i.stepTyped(o)})("keydown.shift.enter",function(o){return o.preventDefault()}),g(),S(3,QLe,2,0,"button",3),S(4,ZLe,2,0,"button",3),g()),2&e&&(_("ngClass",qr(4,KLe,!i.allowRemoval,i.isProspective)),v(1),_("innerHTML",i.step,fO),v(2),_("ngIf",i.allowRemoval),v(1),_("ngIf",i.isProspective))},dependencies:[yn,Fe,En],styles:["[_nghost-%COMP%]{display:inline-block}.fob[_ngcontent-%COMP%]{display:inline-flex;background-color:#e0e0e0;border-radius:25px;padding:2px 2px 2px 4px;font-size:11px;text-align:center;width:min-content}.fob[_ngcontent-%COMP%] > .prospective[_ngcontent-%COMP%]{padding-top:1px}.fob[_ngcontent-%COMP%]:hover{cursor:grab}.fob[_ngcontent-%COMP%]:hover.prospective{cursor:pointer}.fob[_ngcontent-%COMP%]:active{cursor:grabbing}.fob.unremovable[_ngcontent-%COMP%]{padding:2px 4px}.fob.prospective[_ngcontent-%COMP%]{align-items:center;box-sizing:border-box;border:1px dashed #9e9e9e;font-weight:bold;height:17px}span[_ngcontent-%COMP%]{color:inherit;display:inline-block}body.dark-mode[_nghost-%COMP%]   span[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   span[_ngcontent-%COMP%]{color:#616161}button[_ngcontent-%COMP%]{margin-left:2px;padding:0;border:0;border-radius:50%;font-size:11px;width:11px;height:11px;background-color:inherit;color:inherit}button[_ngcontent-%COMP%]   .mat-icon[_ngcontent-%COMP%]{width:100%;height:110%}body.dark-mode[_nghost-%COMP%]   button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   button[_ngcontent-%COMP%]{color:#616161}button[_ngcontent-%COMP%]:hover{background-color:#9e9e9e;color:#eee;cursor:pointer}body.dark-mode[_nghost-%COMP%]   button[_ngcontent-%COMP%]:hover, body.dark-mode   [_nghost-%COMP%]   button[_ngcontent-%COMP%]:hover{background-color:#616161;color:#e0e0e0}"],changeDetection:0}),n})(),$Le=["startFobWrapper"],e3e=["endFobWrapper"],t3e=["prospectiveFobWrapper"];function n3e(n,t){1&n&&P(0,"div",6)}function i3e(n,t){if(1&n&&(h(0,"div",2,3),S(2,n3e,1,0,"div",4),P(3,"card-fob",5),g()),2&n){let e=w();Tt("transform",e.getCssTranslatePxForProspectiveFob()),v(2),_("ngIf",e.showExtendedLine),v(1),_("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("allowRemoval",!1)("isProspective",!0)("step",e.prospectiveStep)}}function r3e(n,t){if(1&n){let e=ge();h(0,"div",10),I("mousedown",function(r){X(e);let o=w(2);return Q(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),g()}}function o3e(n,t){if(1&n){let e=ge();h(0,"div",2,7),S(2,r3e,1,0,"div",8),h(3,"card-fob",9),I("mousedown",function(r){X(e);let o=w();return Q(o.startDrag(o.Fob.START,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){X(e);let o=w();return Q(o.stepTyped(o.Fob.START,r))})("fobRemoved",function(){X(e);let r=w();return Q(r.onFobRemoved(r.Fob.START))}),g()()}if(2&n){let e=w();Tt("transform",e.getCssTranslatePxForStartFob()),v(2),_("ngIf",e.showExtendedLine),v(1),_("allowRemoval",!!e.allowFobRemoval||e.timeSelection.end)("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.start.step)}}function s3e(n,t){if(1&n){let e=ge();h(0,"div",10),I("mousedown",function(r){X(e);let o=w(2);return Q(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.EXTENDED_LINE,r))}),g()}}function a3e(n,t){if(1&n){let e=ge();h(0,"div",2,11),S(2,s3e,1,0,"div",8),h(3,"card-fob",12),I("mousedown",function(r){X(e);let o=w();return Q(o.startDrag(o.Fob.END,o.TimeSelectionAffordance.FOB,r))})("stepChanged",function(r){X(e);let o=w();return Q(o.stepTyped(o.Fob.END,r))})("fobRemoved",function(){X(e);let r=w();return Q(r.onFobRemoved(r.Fob.END))}),g()()}if(2&n){let e=w();Tt("transform",e.getCssTranslatePxForEndFob()),v(2),_("ngIf",e.showExtendedLine),v(1),_("ngClass",e.isVertical()?"vertical-fob":"horizontal-fob")("step",e.timeSelection.end.step)}}var Or=(()=>(function(n){n[n.NONE=0]="NONE",n[n.START=1]="START",n[n.END=2]="END"}(Or||(Or={})),Or))(),l3e={start:Or.START,end:Or.END},pA=(()=>{class n{constructor(e){this.root=e,this.showExtendedLine=!1,this.prospectiveStep=null,this.prospectiveStepAxisPosition=null,this.allowFobRemoval=!0,this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.onProspectiveStepChanged=new F,this.hasFobMoved=!1,this.currentDraggingFob=Or.NONE,this.affordance=qs.NONE,this.mouseListener=this.mouseMove.bind(this),this.stopListener=this.stopDrag.bind(this),this.Fob=Or,this.TimeSelectionAffordance=qs}getCssTranslatePxForStartFob(){return this.axisDirection===fs.VERTICAL?`translate(0px, ${this.startStepAxisPosition}px)`:`translate(${this.startStepAxisPosition}px, 0px)`}getCssTranslatePxForEndFob(){return null===this.endStepAxisPosition?"":this.axisDirection===fs.VERTICAL?`translate(0px, ${this.endStepAxisPosition}px)`:`translate(${this.endStepAxisPosition}px, 0px)`}getCssTranslatePxForProspectiveFob(){return null===this.prospectiveStep?"":this.axisDirection===fs.VERTICAL?`translate(0px, ${this.prospectiveStepAxisPosition}px)`:`translate(${this.prospectiveStepAxisPosition}px, 0px)`}stopEventPropagation(e){e.stopPropagation(),e.preventDefault()}startDrag(e,i,r){i!==qs.FOB&&this.stopEventPropagation(r),document.addEventListener("mousemove",this.mouseListener),document.addEventListener("mouseup",this.stopListener),this.currentDraggingFob=e,this.affordance=i}stopDrag(){document.removeEventListener("mousemove",this.mouseListener),document.removeEventListener("mouseup",this.stopListener),this.currentDraggingFob=Or.NONE,this.hasFobMoved&&this.timeSelection&&this.onTimeSelectionChanged.emit({timeSelection:this.timeSelection,affordance:this.affordance}),this.affordance=qs.NONE,this.hasFobMoved=!1}isVertical(){return this.axisDirection===fs.VERTICAL}shouldSwapFobs(e){return!(!this.timeSelection||!this.timeSelection.end)&&(this.currentDraggingFob===Or.END?e<this.timeSelection.start.step:this.currentDraggingFob===Or.START&&e>this.timeSelection.end.step)}getNewTimeSelection(e,i){let r={...i};if(!this.timeSelection)return r;if(!this.timeSelection.end)return r.start={step:e},r;if(this.shouldSwapFobs(e)){let[o,s]=this.currentDraggingFob===Or.END?["end","start"]:["start","end"];return this.currentDraggingFob=l3e[s],r[o]=this.timeSelection[s],r[s]={step:e},r}return this.currentDraggingFob===Or.END?(r.end={step:e},r):(r.start={step:e},r)}getNewStepFromMouseEvent(e){let i=null,r=this.getMousePositionFromEvent(e),o=this.axisDirection===fs.VERTICAL?e.movementY:e.movementX;return this.isMovingHigher(r,o)?i=this.cardFobHelper.getStepHigherThanAxisPosition(r):this.isMovingLower(r,o)&&(i=this.cardFobHelper.getStepLowerThanAxisPosition(r)),null===i?null:i}mouseMove(e){if(this.currentDraggingFob===Or.NONE)return;let i=this.getNewStepFromMouseEvent(e);if(null===i||!this.timeSelection)return;let r=this.getNewTimeSelection(i,this.timeSelection);this.onTimeSelectionChanged.emit({timeSelection:r}),this.hasFobMoved=!0}mouseOverProspectiveFobArea(e){if(null!=this.timeSelection?.end)return;let i=this.getNewStepFromMouseEvent(e);null!==i&&this.onProspectiveStepChanged.emit(i)}isMovingLower(e,i){if(this.currentDraggingFob===Or.NONE&&null===this.prospectiveStep)return!0;let r=this.getCurrentFobStep();return void 0!==r&&e<this.getDraggingFobCenter()&&i<0&&r>this.lowestStep}isMovingHigher(e,i){if(this.currentDraggingFob===Or.NONE&&null===this.prospectiveStep)return!0;let r=this.getCurrentFobStep();return void 0!==r&&e>this.getDraggingFobCenter()&&i>0&&r<this.highestStep}getDraggingFobCenter(){let e=this.getCurrentFob()?.nativeElement;if(!e)return 0;let i=e.getBoundingClientRect().top,r=e.getBoundingClientRect().left;return this.axisDirection===fs.VERTICAL?i-this.root.nativeElement.getBoundingClientRect().top:r-this.root.nativeElement.getBoundingClientRect().left}getCurrentFob(){switch(this.currentDraggingFob){case Or.START:return this.startFobWrapper;case Or.END:return this.endFobWrapper;case Or.NONE:return this.prospectiveFobWrapper}}getCurrentFobStep(){switch(this.currentDraggingFob){case Or.START:return this.timeSelection?.start.step;case Or.END:return this.timeSelection?.end?.step;case Or.NONE:return this.prospectiveStep??void 0}}getMousePositionFromEvent(e){return this.axisDirection===fs.VERTICAL?e.clientY-this.root.nativeElement.getBoundingClientRect().top:e.clientX-this.root.nativeElement.getBoundingClientRect().left}stepTyped(e,i){if(null===i)return void(null!==this.timeSelection.end&&this.onFobRemoved(e));let r={...this.timeSelection};e===Or.START?r.start={step:i}:e===Or.END&&(r.end={step:i}),null!==r.end&&r.start.step>r.end.step&&(r={start:r.end,end:r.start}),this.onTimeSelectionChanged.emit({timeSelection:r,affordance:qs.FOB_TEXT})}prospectiveFobClicked(e){e.stopPropagation();let i=this.getProspectiveTimeSelection();!i||(this.onTimeSelectionChanged.emit({affordance:qs.FOB_ADDED,timeSelection:i}),this.onProspectiveStepChanged.emit(null))}getProspectiveTimeSelection(){if(this.prospectiveStep)return this.timeSelection?{start:{step:Math.min(this.timeSelection.start.step,this.prospectiveStep)},end:{step:Math.max(this.timeSelection.start.step,this.prospectiveStep)}}:{start:{step:this.prospectiveStep},end:null}}onFobRemoved(e){e!==Or.END?null===this.timeSelection.end?this.onTimeSelectionToggled.emit():this.onTimeSelectionChanged.emit({affordance:qs.FOB_REMOVED,timeSelection:{start:this.timeSelection.end,end:null}}):this.onTimeSelectionChanged.emit({affordance:qs.FOB_REMOVED,timeSelection:{...this.timeSelection,end:null}})}onProspectiveAreaMouseLeave(){this.onProspectiveStepChanged.emit(null)}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275cmp=O({type:n,selectors:[["card-fob-controller"]],viewQuery:function(e,i){if(1&e&&(Ge($Le,5),Ge(e3e,5),Ge(t3e,5)),2&e){let r;Se(r=Ee())&&(i.startFobWrapper=r.first),Se(r=Ee())&&(i.endFobWrapper=r.first),Se(r=Ee())&&(i.prospectiveFobWrapper=r.first)}},inputs:{axisDirection:"axisDirection",timeSelection:"timeSelection",cardFobHelper:"cardFobHelper",startStepAxisPosition:"startStepAxisPosition",endStepAxisPosition:"endStepAxisPosition",highestStep:"highestStep",lowestStep:"lowestStep",showExtendedLine:"showExtendedLine",prospectiveStep:"prospectiveStep",prospectiveStepAxisPosition:"prospectiveStepAxisPosition",allowFobRemoval:"allowFobRemoval"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled",onProspectiveStepChanged:"onProspectiveStepChanged"},decls:6,vars:4,consts:[["class","time-fob-wrapper",3,"transform",4,"ngIf"],[1,"prospective-fob-area",3,"ngClass","mousemove","click","mouseleave"],[1,"time-fob-wrapper"],["prospectiveFobWrapper",""],["class","extended-line",4,"ngIf"],[3,"ngClass","allowRemoval","isProspective","step"],[1,"extended-line"],["startFobWrapper",""],["class","extended-line",3,"mousedown",4,"ngIf"],[1,"startFob",3,"allowRemoval","ngClass","step","mousedown","stepChanged","fobRemoved"],[1,"extended-line",3,"mousedown"],["endFobWrapper",""],[1,"endFob",3,"ngClass","step","mousedown","stepChanged","fobRemoved"]],template:function(e,i){1&e&&(h(0,"div"),Ot(1),S(2,i3e,4,7,"div",0),h(3,"div",1),I("mousemove",function(o){return i.mouseOverProspectiveFobArea(o)})("click",function(o){return i.prospectiveFobClicked(o)})("mouseleave",function(){return i.onProspectiveAreaMouseLeave()}),g(),kt(),S(4,o3e,4,6,"div",0),S(5,a3e,4,5,"div",0),g()),2&e&&(v(2),_("ngIf",null!==i.prospectiveStep),v(1),_("ngClass",i.isVertical()?"vertical-prospective-area":"horizontal-prospective-area"),v(1),_("ngIf",i.timeSelection),v(1),_("ngIf",i.timeSelection&&i.timeSelection.end))},dependencies:[yn,Fe,zte],styles:["[_nghost-%COMP%]{pointer-events:all}.time-fob-wrapper[_ngcontent-%COMP%]{display:inline-block;position:absolute;top:0;width:0}.vertical-fob[_ngcontent-%COMP%]{transform:translateY(-50%)}.horizontal-fob[_ngcontent-%COMP%]{transform:translateX(-50%)}.extended-line[_ngcontent-%COMP%]{border-style:dashed;border-width:0 1px;height:calc(100% - 30px)}.extended-line[_ngcontent-%COMP%]:hover{background:linear-gradient(to right, transparent 18px, #ccc 19px, #ccc 21px, transparent 22px);border:0;cursor:ew-resize;margin-left:-20px;padding:0 20px}.horizontal-prospective-area[_ngcontent-%COMP%]{bottom:0;cursor:pointer;position:absolute;height:30px;width:calc(100% - 74px)}.prospective-area[_ngcontent-%COMP%]{display:block}"],changeDetection:0}),n})(),MV=(()=>{class n{constructor(){this.disableInteraction=!1,this.allowFobRemoval=!0,this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.axisDirection=fs.HORIZONTAL,this.cardFobHelper={getStepHigherThanAxisPosition:this.getStepHigherThanAxisPosition.bind(this),getStepLowerThanAxisPosition:this.getStepLowerThanAxisPosition.bind(this)},this.prospectiveStep=null}getAxisPositionFromStartStep(){return this.timeSelection?this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.timeSelection.start.step):""}getAxisPositionFromEndStep(){return this.timeSelection?.end?this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.timeSelection?.end.step??this.minMaxStep.maxStep):null}getAxisPositionFromProspectiveStep(){return null===this.prospectiveStep?null:this.scale.forward(this.minMaxHorizontalViewExtend,[0,this.axisSize],this.prospectiveStep)}onProspectiveStepChanged(e){this.prospectiveStep=e}getHighestStep(){return this.minMaxStep.maxStep}getLowestStep(){return this.minMaxStep.minStep}getStepHigherThanAxisPosition(e){return this.getStepAtMousePostion(e)}getStepLowerThanAxisPosition(e){return this.getStepAtMousePostion(e)}getStepAtMousePostion(e){let i=Math.round(this.scale.reverse(this.minMaxHorizontalViewExtend,[0,this.axisSize],e));return i>this.getHighestStep()?this.getHighestStep():i<this.getLowestStep()?this.getLowestStep():i}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["scalar-card-fob-controller"]],inputs:{timeSelection:"timeSelection",scale:"scale",minMaxHorizontalViewExtend:"minMaxHorizontalViewExtend",minMaxStep:"minMaxStep",axisSize:"axisSize",disableInteraction:"disableInteraction",allowFobRemoval:"allowFobRemoval"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled"},decls:1,vars:13,consts:[[3,"axisDirection","timeSelection","startStepAxisPosition","endStepAxisPosition","prospectiveStepAxisPosition","highestStep","lowestStep","prospectiveStep","cardFobHelper","showExtendedLine","allowFobRemoval","onProspectiveStepChanged","onTimeSelectionChanged","onTimeSelectionToggled"]],template:function(e,i){1&e&&(h(0,"card-fob-controller",0),I("onProspectiveStepChanged",function(o){return i.onProspectiveStepChanged(o)})("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(o){return i.onTimeSelectionToggled.emit(o)}),g()),2&e&&(Tt("pointer-events",i.disableInteraction?"none":"all"),_("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("prospectiveStepAxisPosition",i.getAxisPositionFromProspectiveStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("prospectiveStep",i.prospectiveStep)("cardFobHelper",i.cardFobHelper)("showExtendedLine",!0)("allowFobRemoval",i.allowFobRemoval))},dependencies:[pA],styles:["scalar-card-fob-controller .time-fob-wrapper{height:100%}"],changeDetection:0}),n})(),c3e=["dataTableContainer"];function d3e(n,t){if(1&n){let e=ge();h(0,"button",27),I("click",function(){return X(e),Q(w().openTableEditMenu())}),P(1,"mat-icon",28),h(2,"span"),T(3,"Edit Table Columns"),g()()}}function u3e(n,t){1&n&&P(0,"mat-spinner",29)}function p3e(n,t){1&n&&(h(0,"th"),T(1,"Smoothed"),g())}function f3e(n,t){if(1&n&&(Ot(0),P(1,"tb-experiment-alias",35),T(2,"/"),kt()),2&n){let e=w().$implicit;v(1),_("alias",e.metadata.alias)}}function m3e(n,t){if(1&n&&(h(0,"td"),T(1),g()),2&n){let e=w().$implicit,i=w(2);v(1),He(" ",i.valueFormatter.formatShort(e.dataPoint.y)," ")}}function h3e(n,t){if(1&n&&(Ot(0),h(1,"tr",33)(2,"td",34),P(3,"span"),g(),h(4,"td",2),S(5,f3e,3,1,"ng-container",24),T(6),g(),S(7,m3e,2,1,"td",24),h(8,"td"),T(9),g(),h(10,"td"),T(11),g(),h(12,"td"),T(13),j(14,"date"),g(),h(15,"td"),T(16),g()(),kt()),2&n){let e=t.$implicit,i=w(2);v(1),nt("closest",e.metadata.closest),v(2),Tt("background-color",e.metadata.color),v(2),_("ngIf",e.metadata.alias),v(1),He("",e.metadata.displayName," "),v(1),_("ngIf",i.smoothingEnabled),v(2),bt(i.valueFormatter.formatShort(e.dataPoint.value)),v(2),bt(i.stepFormatter.formatShort(e.dataPoint.step)),v(2),bt(qp(14,11,e.dataPoint.wallTime,"short")),v(3),He(" ",i.relativeXFormatter.formatReadable(e.dataPoint.relativeTimeInMs)," ")}}function g3e(n,t){if(1&n&&(h(0,"table",30)(1,"thead")(2,"tr"),P(3,"th",31),h(4,"th"),T(5,"Run"),g(),S(6,p3e,2,0,"th",24),h(7,"th"),T(8,"Value"),g(),h(9,"th"),T(10,"Step"),g(),h(11,"th"),T(12,"Time"),g(),h(13,"th"),T(14,"Relative"),g()()(),h(15,"tbody"),S(16,h3e,17,14,"ng-container",32),g()()),2&n){let e=t.data,i=t.cursorLocationInDataCoord,r=t.cursorLocation,o=w();v(6),_("ngIf",o.smoothingEnabled),v(10),_("ngForOf",o.getCursorAwareTooltipData(e,i,r))("ngForTrackBy",o.trackByTooltipDatum)}}function _3e(n,t){if(1&n){let e=ge();h(0,"button",41),I("click",function(){return X(e),Q(w(2).toggleTableExpanded())}),P(1,"mat-icon",9),g()}if(2&n){let e=w(2);_("title",e.shouldExpandTable()?"Expand Table":"Collapse Table"),v(1),_("svgIcon",e.shouldExpandTable()?"expand_more_24px":"expand_less_24px")}}var b3e=function(n){return{"data-table-container":!0,expanded:n}};function v3e(n,t){if(1&n){let e=ge();Ot(0),h(1,"div",36,37)(3,"scalar-card-data-table",38),I("sortDataBy",function(r){return X(e),Q(w().sortDataBy(r))})("editColumnHeaders",function(r){return X(e),Q(w().editColumnHeaders.emit(r))})("removeColumn",function(r){return X(e),Q(w().removeColumn.emit(r))}),g()(),h(4,"div",39),S(5,_3e,2,2,"button",40),g(),kt()}if(2&n){let e=w();v(1),_("ngClass",In(10,b3e,e.cardState.tableExpanded)),v(2),_("chartMetadataMap",e.chartMetadataMap)("dataSeries",e.dataSeries)("stepOrLinkedTimeSelection",e.stepOrLinkedTimeSelection)("columnHeaders",e.columnHeaders)("sortingInfo",e.sortingInfo)("columnCustomizationEnabled",e.columnCustomizationEnabled)("smoothingEnabled",e.smoothingEnabled)("hparamsEnabled",e.hparamsEnabled),v(2),_("ngIf",e.canExpandTable())}}var y3e=function(n){return[0,n]},x3e=function(){return{"out-of-selected-time":!0,end:!0,range:!0}};function C3e(n,t){if(1&n&&P(0,"div",36),2&n){let e=w(2),i=e.viewExtent,r=e.domDimension,o=e.xScale,s=w();Tt("left",o.forward(i.x,In(3,y3e,r.width),null==s.stepOrLinkedTimeSelection.end?null:s.stepOrLinkedTimeSelection.end.step)+"px"),_("ngClass",cu(5,x3e))}}var M3e=function(n){return[n,0]},w3e=function(n){return{"out-of-selected-time":!0,start:!0,range:n}};function S3e(n,t){if(1&n&&(Ot(0),P(1,"div",36),S(2,C3e,1,6,"div",42),kt()),2&n){let e=w(),i=e.viewExtent,r=e.domDimension,o=e.xScale,s=w();v(1),Tt("right",o.forward(i.x,In(4,M3e,r.width),s.stepOrLinkedTimeSelection.start.step)+"px"),_("ngClass",In(6,w3e,!(null==s.stepOrLinkedTimeSelection.end||!s.stepOrLinkedTimeSelection.end.step))),v(1),_("ngIf",null==s.stepOrLinkedTimeSelection.end?null:s.stepOrLinkedTimeSelection.end.step)}}function E3e(n,t){1&n&&S(0,S3e,3,8,"ng-container",24),2&n&&_("ngIf",w().stepOrLinkedTimeSelection)}function T3e(n,t){if(1&n){let e=ge();Ot(0),h(1,"scalar-card-fob-controller",43),I("onTimeSelectionChanged",function(r){return X(e),Q(w(2).onTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return X(e),Q(w(2).onFobRemoved())}),g(),kt()}if(2&n){let e=w(),i=e.interactionState,r=e.xScale,o=e.viewExtent,s=e.domDimension,a=w();v(1),_("disableInteraction","NONE"!==i)("timeSelection",a.stepOrLinkedTimeSelection)("scale",r)("minMaxHorizontalViewExtend",o.x)("minMaxStep",a.minMaxStep)("axisSize",s.width)}}function D3e(n,t){1&n&&S(0,T3e,2,6,"ng-container",24),2&n&&_("ngIf",w().showFobController())}var Gte=(()=>{class n{constructor(e,i){this.ref=e,this.dialog=i,this.DataLoadState=Te,this.RendererType=Qi,this.ScaleType=nr,this.onFullSizeToggle=new F,this.onPinClicked=new F,this.onTimeSelectionChanged=new F,this.onStepSelectorToggled=new F,this.onDataTableSorting=new F,this.editColumnHeaders=new F,this.openTableEditMenuToMode=new F,this.removeColumn=new F,this.onLineChartZoom=new F,this.onCardStateChanged=new F,this.sortingInfo={name:"run",order:io.ASCENDING},this.yScaleType=nr.LINEAR,this.isViewBoxOverridden=!1,this.relativeXFormatter=_0,this.valueFormatter=ip,this.stepFormatter=g0}toggleYScaleType(){this.yScaleType=this.yScaleType===nr.LINEAR?nr.LOG10:nr.LINEAR}sortDataBy(e){this.sortingInfo=e,this.onDataTableSorting.emit(e)}resetDomain(){this.lineChart&&this.lineChart.viewBoxReset()}trackByTooltipDatum(e,i){return i.id}getCustomXFormatter(){switch(this.xAxisType){case Pi.RELATIVE:return _0;case Pi.STEP:return l3;default:return}}getCursorAwareTooltipData(e,i,r){let o=e.map(l=>({...l,metadata:{...l.metadata,closest:!1,distToCursorPixels:Math.hypot(l.domPoint.x-r.x,l.domPoint.y-r.y),distToCursorX:l.dataPoint.x-i.x,distToCursorY:l.dataPoint.y-i.y}})),s=1/0,a=0;for(let l=0;l<o.length;l++)s>o[l].metadata.distToCursorPixels&&(s=o[l].metadata.distToCursorPixels,a=l);switch(o.length&&(o[a].metadata.closest=!0),this.tooltipSort){case oo.ASCENDING:return o.sort((l,c)=>l.dataPoint.y-c.dataPoint.y);case oo.DESCENDING:return o.sort((l,c)=>c.dataPoint.y-l.dataPoint.y);case oo.NEAREST:return o.sort((l,c)=>l.metadata.distToCursorPixels-c.metadata.distToCursorPixels);case oo.NEAREST_Y:return o.sort((l,c)=>l.metadata.distToCursorY-c.metadata.distToCursorY);case oo.DEFAULT:case oo.ALPHABETICAL:return o.sort((l,c)=>l.metadata.displayName<c.metadata.displayName?-1:l.metadata.displayName>c.metadata.displayName?1:0)}}openDataDownloadDialog(){this.dialog.open(this.DataDownloadComponent,{data:{cardId:this.cardId}})}onFobRemoved(){this.onStepSelectorToggled.emit(Ys.FOB_DESELECT)}showDataTable(){return this.xAxisType===Pi.STEP&&this.stepOrLinkedTimeSelection}showFobController(){return this.xAxisType===Pi.STEP&&this.minMaxStep}canExpandTable(){return this.dataSeries.filter(i=>HS(i,this.chartMetadataMap)).length>3}shouldExpandTable(){return Boolean(this.dataTableContainer?.nativeElement.style.height||!this.cardState?.tableExpanded)}toggleTableExpanded(){this.onCardStateChanged.emit({...this.cardState,tableExpanded:this.shouldExpandTable()}),this.dataTableContainer&&(this.dataTableContainer.nativeElement.style.height="")}openTableEditMenu(){this.openTableEditMenuToMode.emit(this.rangeEnabled?ro.RANGE:ro.SINGLE)}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(zl))},n.\u0275cmp=O({type:n,selectors:[["scalar-card-component"]],viewQuery:function(e,i){if(1&e&&(Ge(c_,5),Ge(c3e,5)),2&e){let r;Se(r=Ee())&&(i.lineChart=r.first),Se(r=Ee())&&(i.dataTableContainer=r.first)}},inputs:{cardId:"cardId",chartMetadataMap:"chartMetadataMap",cardState:"cardState",DataDownloadComponent:"DataDownloadComponent",dataSeries:"dataSeries",ignoreOutliers:"ignoreOutliers",isCardVisible:"isCardVisible",isPinned:"isPinned",loadState:"loadState",showFullWidth:"showFullWidth",smoothingEnabled:"smoothingEnabled",tag:"tag",title:"title",tooltipSort:"tooltipSort",xAxisType:"xAxisType",xScaleType:"xScaleType",useDarkMode:"useDarkMode",forceSvg:"forceSvg",columnCustomizationEnabled:"columnCustomizationEnabled",linkedTimeSelection:"linkedTimeSelection",stepOrLinkedTimeSelection:"stepOrLinkedTimeSelection",minMaxStep:"minMaxStep",userViewBox:"userViewBox",columnHeaders:"columnHeaders",rangeEnabled:"rangeEnabled",hparamsEnabled:"hparamsEnabled"},outputs:{onFullSizeToggle:"onFullSizeToggle",onPinClicked:"onPinClicked",onTimeSelectionChanged:"onTimeSelectionChanged",onStepSelectorToggled:"onStepSelectorToggled",onDataTableSorting:"onDataTableSorting",editColumnHeaders:"editColumnHeaders",openTableEditMenuToMode:"openTableEditMenuToMode",removeColumn:"removeColumn",onLineChartZoom:"onLineChartZoom",onCardStateChanged:"onCardStateChanged"},decls:38,vars:29,consts:function(){let t,e,i,r,o,s;return t=$localize`:A button that resets line chart domain to the data␟e68a552941ab427a99e7437e08443f30ac71ccd6␟3830646521058268558:Fit line chart domains to data`,e=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,i=$localize`:A button on line chart that toggles full size mode.␟fc8f767d0b9f930187a1bae34477ad28736ece33␟915721563638926597:Toggle full size mode`,r=$localize`:An overflow menu button that opens more line chart options␟b260fab946a3077ce20fd28e336979f586720e8d␟878053740210336435:More line chart options`,o=$localize`:A button that toggles log scale on y-axis on a line chart␟fe91f96ab9b3baca5a48913f2b0fae84483d93e3␟3374645620638883926:Toggle Y-axis log scale on line chart`,s=$localize`:Expand Table␟9e59ff50bfcb479272e2b103e1e9b11518e2e4ce␟6374880341393020610:Expand Table`,[[1,"always-visible"],[1,"heading"],[1,"name"],[1,"tag",3,"title","value"],[3,"isClipped"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"disabled","title","click"],["svgIcon","settings_overscan_24px"],["mat-icon-button","","aria-label",e,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",i,"title","Toggle full size mode",3,"click"],["mat-icon-button","","aria-label",r,"title","More line chart options",3,"matMenuTriggerFor"],["svgIcon","more_vert_24px"],["menu","matMenu"],["mat-menu-item","","aria-label",o,3,"click"],["svgIcon","line_weight_24px"],["mat-menu-item","","aria-label","Open dialog to download data",3,"click"],["svgIcon","get_app_24px"],["mat-menu-item","","aria-label","Open menu to edit data table columns",3,"click",4,"ngIf"],[1,"chart-container"],["chartContainer",""],["diameter","18",4,"ngIf"],[3,"disableUpdate","preferredRendererType","seriesData","seriesMetadataMap","xScaleType","yScaleType","customXFormatter","ignoreYOutliers","tooltipTemplate","useDarkMode","userViewBox","customVisTemplate","customChartOverlayTemplate","onViewBoxOverridden","viewBoxChanged"],["tooltip",""],[4,"ngIf"],["lineChartCustomVis",""],["lineChartCustomXAxisVis",""],["mat-menu-item","","aria-label","Open menu to edit data table columns",3,"click"],["svgIcon","edit_24px"],["diameter","18"],[1,"tooltip"],[1,"circle-header"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"tooltip-row"],[1,"tooltip-row-circle"],[3,"alias"],[3,"ngClass"],["dataTableContainer",""],[3,"chartMetadataMap","dataSeries","stepOrLinkedTimeSelection","columnHeaders","sortingInfo","columnCustomizationEnabled","smoothingEnabled","hparamsEnabled","sortDataBy","editColumnHeaders","removeColumn"],[1,"bottom-area"],["mat-icon-button","","class","expand-button","aria-label",s,3,"title","click",4,"ngIf"],["mat-icon-button","","aria-label",s,1,"expand-button",3,"title","click"],[3,"ngClass","left",4,"ngIf"],[3,"disableInteraction","timeSelection","scale","minMaxHorizontalViewExtend","minMaxStep","axisSize","onTimeSelectionChanged","onTimeSelectionToggled"]]},template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div",1)(2,"span",2),P(3,"tb-truncated-path",3)(4,"vis-linked-time-selection-warning",4),g(),h(5,"span",5)(6,"button",6),I("click",function(){return i.resetDomain()}),j(7,"async"),j(8,"async"),P(9,"mat-icon",7),g(),h(10,"button",8),I("click",function(){return i.onPinClicked.emit(!i.isPinned)}),P(11,"mat-icon",9),g(),h(12,"button",10),I("click",function(){return i.onFullSizeToggle.emit()}),P(13,"mat-icon",9),g(),h(14,"button",11),P(15,"mat-icon",12),g(),h(16,"mat-menu",null,13)(18,"button",14),I("click",function(){return i.toggleYScaleType()}),P(19,"mat-icon",15),h(20,"span"),T(21,"Toggle Y-axis log scale"),g()(),h(22,"button",16),I("click",function(){return i.openDataDownloadDialog()}),P(23,"mat-icon",17),h(24,"span"),T(25,"Download data"),g()(),S(26,d3e,4,0,"button",18),g()()(),h(27,"div",19,20),S(29,u3e,1,0,"mat-spinner",21),h(30,"line-chart",22),I("onViewBoxOverridden",function(o){return i.isViewBoxOverridden=o})("viewBoxChanged",function(o){return i.onLineChartZoom.emit(o)}),g(),S(31,g3e,17,3,"ng-template",null,23,Wt),g()(),S(33,v3e,6,12,"ng-container",24),S(34,E3e,1,1,"ng-template",null,25,Wt),S(36,D3e,1,1,"ng-template",null,26,Wt)),2&e){let r=it(17),o=it(32),s=it(35),a=it(37);v(3),Wi("title",i.tag),Wi("value",i.title),v(1),_("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped),v(2),_("disabled",!i.lineChart||!W(7,25,i.lineChart.getIsViewBoxOverridden()))("title",i.lineChart&&W(8,27,i.lineChart.getIsViewBoxOverridden())?"Line chart is already fitted to data. When data updates, the line chart will auto fit to its domain.":"Fit line chart domains to data"),v(4),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),_("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(2),_("svgIcon",i.showFullWidth?"fullscreen_exit_24px":"fullscreen_24px"),v(1),_("matMenuTriggerFor",r),v(12),_("ngIf",i.columnCustomizationEnabled),v(3),_("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),_("disableUpdate",!i.isCardVisible)("preferredRendererType",i.forceSvg?i.RendererType.SVG:i.RendererType.WEBGL)("seriesData",i.dataSeries)("seriesMetadataMap",i.chartMetadataMap)("xScaleType",i.xScaleType)("yScaleType",i.yScaleType)("customXFormatter",i.getCustomXFormatter())("ignoreYOutliers",i.ignoreOutliers)("tooltipTemplate",o)("useDarkMode",i.useDarkMode)("userViewBox",i.userViewBox)("customVisTemplate",s)("customChartOverlayTemplate",a),v(3),_("ngIf",i.showDataTable())}},dependencies:[yn,nn,Fe,Qu,c_,$i,En,Nc,jl,Lc,tl,Hte,MV,Xg,Qg,ct,gh],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;height:100%;padding:16px;padding-top:4px}[_nghost-%COMP%]:has(.expand-button){padding:4px 16px 0}.always-visible[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-basis:298px}.always-visible[_ngcontent-%COMP%]:not(:has(.expand-button)){flex-grow:1}.heading[_ngcontent-%COMP%]{align-items:center;display:flex;font-size:14px;justify-content:space-between;margin-bottom:4px;position:relative}.heading[_ngcontent-%COMP%]   .name[_ngcontent-%COMP%]{align-items:center;display:grid;gap:5px;grid-template-columns:auto auto}.heading[_ngcontent-%COMP%]   vis-selected-time-clipped[_ngcontent-%COMP%]{font-size:1.2em;line-height:0}.tag[_ngcontent-%COMP%]{overflow:hidden}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.chart-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex-grow:1;overflow:hidden;resize:vertical}.chart-container[_ngcontent-%COMP%]   mat-spinner[_ngcontent-%COMP%]{position:absolute;right:11px;top:11px}.chart-container[_ngcontent-%COMP%]   line-chart[_ngcontent-%COMP%]{flex-grow:1}.tooltip[_ngcontent-%COMP%]{border-spacing:4px;font-size:13px}.tooltip[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{text-align:left}.tooltip[_ngcontent-%COMP%]   .tooltip-row[_ngcontent-%COMP%]{white-space:nowrap}.tooltip[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%]{align-items:center;display:inline-flex;height:12px;width:12px}.tooltip[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-radius:50%;border:1px solid rgba(255,255,255,.4);display:inline-block;height:10px;width:10px}.tooltip[_ngcontent-%COMP%]   .closest[_ngcontent-%COMP%]   .tooltip-row-circle[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{border-color:#fff;box-shadow:inset 0 0 0 1px #fff}.out-of-selected-time[_ngcontent-%COMP%]{height:100%;position:absolute}.out-of-selected-time.start[_ngcontent-%COMP%]{border-right-width:2px;margin-left:-1px}.out-of-selected-time.start.range[_ngcontent-%COMP%]{left:0}.out-of-selected-time.end[_ngcontent-%COMP%]{border-left-width:2px;margin-right:-1px;right:0}.out-of-selected-time.range[_ngcontent-%COMP%]{background-color:rgba(255,255,255,.5)}body.dark-mode[_nghost-%COMP%]   .out-of-selected-time.range[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .out-of-selected-time.range[_ngcontent-%COMP%]{background-color:rgba(0,0,0,.4)}.data-table-container[_ngcontent-%COMP%]{height:100px;min-height:100px;max-height:50em;overflow:auto;resize:vertical}.data-table-container.expanded[_ngcontent-%COMP%]{height:auto}.bottom-area[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center}.bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .bottom-area[_ngcontent-%COMP%]   .expand-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7);background-color:#303030}"],changeDetection:0}),n})();function A3e(n,t){return n.length===t.length&&n.every((e,i)=>{let r=t[i],o=e.points,s=r.points;return e.runId===r.runId&&o.length===s.length&&o.every((a,l)=>{let c=s[l];return a.x===c.x&&a.y===c.y})})}var Wte=(()=>{class n{constructor(e){this.store=e,this.DataDownloadComponent=kQ,this.pinStateChanged=new F,this.isVisible=!1,this.useDarkMode$=this.store.select(Rl),this.ignoreOutliers$=this.store.select(gf),this.tooltipSort$=this.store.select(hf),this.xAxisType$=this.store.select(Ol),this.forceSvg$=this.store.select(yF),this.columnCustomizationEnabled$=this.store.select(dS),this.xScaleType$=this.store.select(Ol).pipe(N(i=>{switch(i){case Pi.STEP:case Pi.RELATIVE:return nr.LINEAR;case Pi.WALL_TIME:return nr.TIME;default:throw new Error(`Invalid xAxisType for line chart. ${i}`)}})),this.scalarSmoothing$=this.store.select(bd),this.smoothingEnabled$=this.store.select(bd).pipe(N(i=>i>0)),this.showFullWidth$=this.store.select(qa).pipe(N(i=>i[this.cardId]?.fullWidth)),this.ngUnsubscribe=new Ie}onVisibilityChange({visible:e}){this.isVisible=e}isScalarCardMetadata(e){let{plugin:i}=e;return i===zn.SCALARS}onFullSizeToggle(){this.store.dispatch(Bg({cardId:this.cardId}))}ngOnInit(){let i=this.store.select(Wa,this.cardId).pipe(ke(l=>!!l&&this.isScalarCardMetadata(l)),N(l=>l));function s(l){return JSON.stringify(["smoothed",l])}let a=this.store.select(Cu,this.cardId).pipe(ot(this.ngUnsubscribe),ke(l=>Boolean(l)),N(l=>l),Ms(1)).pipe(Li(this.store.select(Ol)),N(([l,c])=>Object.keys(l).map(p=>({runId:p,points:this.stepSeriesToLineSeries(l[p],c)}))),Yn(A3e)).pipe(Li(this.store.select(n1)),ot(this.ngUnsubscribe),N(([l,c])=>c?function(n){let t=[];for(let e of n){let i=[],r=Number.isFinite(e.points[0]?.x)?e.points[0].x:-1/0,o=[];for(let s of e.points)Number.isFinite(s.x)?(s.x<r&&(i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o}),o=[]),o.push(s),r=s.x):o.push(s);i.push({seriesId:JSON.stringify([e.runId,i.length]),runId:e.runId,points:o});for(let s=0;s<i.length;s++)t.push({...i[s],partitionIndex:s,partitionSize:i.length})}return t}(l):l.map(d=>({...d,seriesId:d.runId,partitionIndex:0,partitionSize:1}))),N(l=>l.map(c=>{let d=c.points[0]?.wallTime;return{...c,points:c.points.map(u=>({...u,relativeTimeInMs:u.wallTime-d}))}})),Li(this.store.select(Ol)),N(([l,c])=>l.map(d=>({...d,points:d.points.map(u=>{let p;switch(c){case Pi.RELATIVE:p=u.relativeTimeInMs;break;case Pi.WALL_TIME:p=u.wallTime;break;default:p=u.step}return{...u,x:p}})}))),Ms(1));this.userViewBox$=this.store.select(QF,this.cardId),this.minMaxSteps$=dn([this.store.select(EW,this.cardId),this.store.select(TW,this.cardId)]).pipe(N(([l,c])=>{if(l&&c)return{minStep:Math.max(l?.minStep,c?.minStep),maxStep:Math.min(l?.maxStep,c?.maxStep)}})),this.dataSeries$=a.pipe(Li(this.store.select(bd)),Jn(([l,c])=>{let d=l.map(({seriesId:u,points:p})=>({id:u,points:p}));return c<=0?Ht(d):$r(async function(n,t){Number.isFinite(t)||(t=0),t=Math.max(0,Math.min(t,1));let e=[];for(let i of n){let r=i.points[0]?.y;if(i.points.every(c=>c.y==r)){e.push(i);continue}let s=i.points.length>0?0:NaN,a=0,l=i.points.map(c=>{let d=c.y;if(Number.isFinite(d)){s=s*t+(1-t)*d,a++;let u=1===t?1:1-Math.pow(t,a);return{x:c.x,y:s/u}}return{x:c.x,y:d}});e.push({id:i.id,points:l})}return e}(d,c)).pipe(N(u=>{let p=d.map((f,m)=>({id:s(f.id),points:u[m].points.map(({y:b},M)=>({...f.points[M],y:b}))}));return[...d,...p]}))}),qn([])),this.linkedTimeSelection$=dn([this.minMaxSteps$,this.store.select(wu),this.store.select(Eu),this.store.select(Ol)]).pipe(N(([l,c,d,u])=>l&&c&&u===Pi.STEP&&d?Uh(d,l.minStep,l.maxStep):null)),this.stepOrLinkedTimeSelection$=this.store.select(DW,this.cardId),this.columnHeaders$=this.store.select(d1(this.cardId)),this.chartMetadataMap$=a.pipe(Jn(l=>dn(l.map(c=>this.getRunDisplayNameAndAlias(c.runId).pipe(N(d=>({...c,...d})))))),Li(this.store.select(Iu),this.store.select(md),this.store.select(wQ),this.store.select(Au),this.store.select(bd)),wr(0),N(([l,c,d,u,p,f])=>{let m={},b=f>0;for(let M of l){let{seriesId:y,runId:x,displayName:R,alias:A,partitionIndex:V,partitionSize:te}=M;m[y]={type:Wg.ORIGINAL,id:y,alias:A,displayName:te>1?`${R}: ${V}`:R,visible:Boolean(c&&c.get(x)&&(!d||u.has(x))),color:p[x]??"#fff",aux:!1,opacity:1}}if(!b)return m;for(let[M,y]of Object.entries(m)){let x=s(M);m[x]={...y,id:x,type:Wg.DERIVED,aux:!1,originalSeriesId:M},y.aux=!0,y.opacity=.25}return m}),qn({})),this.loadState$=this.store.select(_d,this.cardId),this.tag$=i.pipe(N(l=>l.tag)),this.cardState$=this.store.select(qa).pipe(N(l=>l[this.cardId]||{})),this.title$=this.tag$.pipe(N(l=>Yg(l,this.groupName))),this.isPinned$=this.store.select(Mu,this.cardId),this.rangeEnabled$=this.store.select(c1(this.cardId)),this.hparamsEnabled$=this.store.select(md)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}getRunDisplayNameAndAlias(e){return dn([this.store.select(g1,{runId:e}),this.store.select(za),this.store.select(_1,{runId:e})]).pipe(N(([i,r,o])=>{let s=null!==i?r[i]??null:null;return{displayName:o||s?o?.name??"...":e,alias:s}}))}stepSeriesToLineSeries(e,i){let r=i===Pi.STEP;return e.map(o=>{let s=1e3*o.wallTime;return{...o,x:r?o.step:s,y:o.value,wallTime:s,relativeTimeInMs:0}})}onDataTableSorting(e){this.store.dispatch(XX(e))}onCardStateChanged(e){this.store.dispatch(fT({cardId:this.cardId,settings:e}))}onTimeSelectionChanged(e){this.store.dispatch(kf({...e,cardId:this.cardId}))}onStepSelectorToggled(e){this.store.dispatch(Id({affordance:e,cardId:this.cardId}))}onLineChartZoom(e){this.store.dispatch(by({userViewBox:e,cardId:this.cardId}))}editColumnHeaders(e){this.store.dispatch(zg(e))}openTableEditMenuToMode(e){this.store.dispatch(aT({mode:e}))}onRemoveColumn(e){this.store.dispatch(Ug({header:e,cardId:this.cardId}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["scalar-card"]],inputs:{DataDownloadComponent:"DataDownloadComponent",cardId:"cardId",groupName:"groupName"},outputs:{pinStateChanged:"pinStateChanged"},decls:24,vars:72,consts:[["observeIntersection","",3,"cardId","chartMetadataMap","DataDownloadComponent","dataSeries","ignoreOutliers","isCardVisible","isPinned","loadState","showFullWidth","smoothingEnabled","tag","title","cardState","tooltipSort","xAxisType","xScaleType","useDarkMode","linkedTimeSelection","stepOrLinkedTimeSelection","forceSvg","columnCustomizationEnabled","minMaxStep","userViewBox","columnHeaders","rangeEnabled","hparamsEnabled","onFullSizeToggle","onPinClicked","onVisibilityChange","onTimeSelectionChanged","onStepSelectorToggled","onDataTableSorting","onLineChartZoom","editColumnHeaders","onCardStateChanged","openTableEditMenuToMode","removeColumn"]],template:function(e,i){1&e&&(h(0,"scalar-card-component",0),I("onFullSizeToggle",function(){return i.onFullSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)})("onVisibilityChange",function(o){return i.onVisibilityChange(o)})("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged(o)})("onStepSelectorToggled",function(o){return i.onStepSelectorToggled(o)})("onDataTableSorting",function(o){return i.onDataTableSorting(o)})("onLineChartZoom",function(o){return i.onLineChartZoom(o)})("editColumnHeaders",function(o){return i.editColumnHeaders(o)})("onCardStateChanged",function(o){return i.onCardStateChanged(o)})("openTableEditMenuToMode",function(o){return i.openTableEditMenuToMode(o)})("removeColumn",function(o){return i.onRemoveColumn(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),j(11,"async"),j(12,"async"),j(13,"async"),j(14,"async"),j(15,"async"),j(16,"async"),j(17,"async"),j(18,"async"),j(19,"async"),j(20,"async"),j(21,"async"),j(22,"async"),j(23,"async"),g()),2&e&&_("cardId",i.cardId)("chartMetadataMap",W(1,26,i.chartMetadataMap$))("DataDownloadComponent",i.DataDownloadComponent)("dataSeries",W(2,28,i.dataSeries$))("ignoreOutliers",W(3,30,i.ignoreOutliers$))("isCardVisible",i.isVisible)("isPinned",W(4,32,i.isPinned$))("loadState",W(5,34,i.loadState$))("showFullWidth",W(6,36,i.showFullWidth$))("smoothingEnabled",W(7,38,i.smoothingEnabled$))("tag",W(8,40,i.tag$))("title",W(9,42,i.title$))("cardState",W(10,44,i.cardState$))("tooltipSort",W(11,46,i.tooltipSort$))("xAxisType",W(12,48,i.xAxisType$))("xScaleType",W(13,50,i.xScaleType$))("useDarkMode",W(14,52,i.useDarkMode$))("linkedTimeSelection",W(15,54,i.linkedTimeSelection$))("stepOrLinkedTimeSelection",W(16,56,i.stepOrLinkedTimeSelection$))("forceSvg",W(17,58,i.forceSvg$))("columnCustomizationEnabled",W(18,60,i.columnCustomizationEnabled$))("minMaxStep",W(19,62,i.minMaxSteps$))("userViewBox",W(20,64,i.userViewBox$))("columnHeaders",W(21,66,i.columnHeaders$))("rangeEnabled",W(22,68,i.rangeEnabled$))("hparamsEnabled",W(23,70,i.hparamsEnabled$))},dependencies:[qg,Gte,ct],styles:["[_nghost-%COMP%] {\n        display: block;\n        height: 100%;\n      }"],changeDetection:0}),n})();function O3e(n,t,e){let i=[],{left:r,right:o}=t,s=(o-r)/e,a=0,l=0;for(let c=0;c<e;c++){let d=r+c*s,u=d+s,p=c===e-1,f=l;for(l=0;a<n.length;){let m=n[a],b=k3e(m,d,u,!p);if(f+=b.curr,l+=b.next,m.x+m.dx>u)break;a++}i.push({x:d,dx:s,y:f})}return i}function k3e(n,t,e,i){let r=n.x,o=n.x+n.dx;if(r>e||o<t)return{curr:0,next:0};if(0===n.dx)return i&&o>=e?{curr:0,next:n.y}:{curr:n.y,next:0};let s=Math.min(o,e)-Math.max(r,t);return{curr:n.y*s/n.dx,next:0}}var F3e=1e4,N3e=.001,L3e=Qr(".2~s"),B3e=Qr(".4~r"),V3e=Qr(".2~e");function Yte(n){if(0===n)return"0";let t=Math.abs(n);return t>=F3e?L3e(n):t<N3e?V3e(n):B3e(n)}var H3e=["main"],z3e=["xAxis"],U3e=["yAxis"],j3e=["content"],G3e=["histograms"];function W3e(n,t){if(1&n&&(Nn(),h(0,"g")(1,"text"),T(2),g()()),2&n){let e=w();Tt("transform",e.getCssTranslatePx(e.tooltipData.xAxis.position,9)),v(2),bt(e.tooltipData.xAxis.label)}}function q3e(n,t){if(1&n&&(Nn(),h(0,"g")(1,"text"),T(2),g()()),2&n){let e=w();Tt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),v(1),Be("y",e.tooltipData.yAxis.position),v(1),He(" ",e.tooltipData.yAxis.label," ")}}function Y3e(n,t){if(1&n){let e=ge();Nn(),Oo(),Ot(0),h(1,"histogram-card-fob-controller",16),I("onTimeSelectionChanged",function(r){return X(e),Q(w().onLinkedTimeSelectionChanged.emit(r))})("onTimeSelectionToggled",function(){return X(e),Q(w().onLinkedTimeToggled.emit())}),g(),kt()}if(2&n){let e=w();v(1),_("timeSelection",e.timeSelection)("steps",e.getSteps())("temporalScale",e.scales.temporalScale)}}function X3e(n,t){if(1&n&&(Nn(),h(0,"g"),P(1,"line",17),g()),2&n){let e=t.$implicit;Tt("transform",w().getCssTranslatePx(0,e))}}function Q3e(n,t){1&n&&(Nn(),P(0,"line",21))}function Z3e(n,t){if(1&n&&(Nn(),P(0,"circle",22)),2&n){let e=w().$implicit,i=w();Tt("transform",i.getCssTranslatePx(i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).x,i.getUiCoordFromBinForContent(i.getClosestBinFromBinCoordinate(e,i.tooltipData.xPositionInBinCoord)).y))}}function K3e(n,t){if(1&n){let e=ge();Nn(),h(0,"g",18),I("mouseenter",function(r){let s=X(e).$implicit;return Q(w().updateColorOnHover(r,s,!0))})("mouseleave",function(r){let s=X(e).$implicit;return Q(w().updateColorOnHover(r,s,!1))})("click",function(){let o=X(e).$implicit;return Q(w().onLinkedTimeRangeChanged(o))}),S(1,Q3e,1,0,"line",19),P(2,"path"),S(3,Z3e,1,2,"circle",20),g()}if(2&n){let e=t.$implicit,i=w();Tt("transform",i.getGroupTransform(e))("color",i.getHistogramFill(e)),nt("histogram",!0)("no-color",!i.isDatumInTimeSelectionRange(e)),v(1),_("ngIf",i.mode===i.HistogramMode.OFFSET),v(1),Be("d",i.getHistogramPath(e)),v(1),_("ngIf",i.tooltipData)}}function J3e(n,t){if(1&n&&(Nn(),P(0,"circle",22)),2&n){let e=w(2);Be("cx",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).x)("cy",e.getUiCoordFromBinForContent(e.tooltipData.closestBin).y)}}function $3e(n,t){if(1&n&&(Nn(),h(0,"g",4)(1,"g"),P(2,"path"),S(3,J3e,1,2,"circle",23),g(),h(4,"g",24)(5,"text",25),T(6),g()()()),2&n){let e=w();v(1),Tt("transform",e.getGroupTransform(e.tooltipData.closestDatum)),v(1),Be("d",e.getHistogramPath(e.tooltipData.closestDatum)),v(1),_("ngIf",e.tooltipData.closestBin),v(1),Tt("transform",e.getCssTranslatePx(e.tooltipData.value.position.x,e.tooltipData.value.position.y)),v(2),bt(e.tooltipData.value.label)}}var fA=(()=>{class n{constructor(e){this.changeDetector=e,this.mode=Dr.OFFSET,this.timeProperty=no.STEP,this.timeSelection=null,this.onLinkedTimeSelectionChanged=new F,this.onLinkedTimeToggled=new F,this.HistogramMode=Dr,this.TimeProperty=no,this.tooltipData=null,this.ngUnsubscribe=new Ie,this.layout={histogramHeight:0,contentClientRect:{height:0,width:0}},this.scales=null,this.formatters={binNumber:Yte,count:Qr(".3n"),wallTime:d0("%m/%d %X"),step:Qr(".0f"),relative:i=>Qr(".1r")(i/36e5)+"h"},this.domVisible=!1}ngOnChanges(){this.updateChartIfVisible()}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}ngAfterViewInit(){mi(this.main.nativeElement,"mousemove",{passive:!0}).pipe(ot(this.ngUnsubscribe)).subscribe(e=>this.onMouseMove(e))}getCssTranslatePx(e,i){return`translate(${e}px, ${i}px)`}getClosestBinFromBinCoordinate(e,i){if(!e.bins.length)return{x:0,dx:0,y:0};let r=e.bins[0],o=e.bins.slice(-1)[0];return i<r.x?r:i>=o.x+o.dx?o:e.bins.find(a=>a.x<=i&&i<a.x+a.dx)}getUiCoordFromBinForContent(e){return this.scales?{x:this.scales.binScale(Jx(e)),y:this.scales.countScale(e.y)}:{x:0,y:0}}getHistogramPath(e){if(!this.scales||!e.bins.length)return"";let i=this.scales.binScale,r=this.scales.countScale,o=e.bins[0],s=e.bins.slice(-1)[0],a=[`M${i(Jx(o))},${r(0)}`];for(let l of e.bins)a.push(`L${i(Jx(l))},${r(l.y)}`);return a.push(`L${i(Jx(s))},${r(0)}`),a.join("")}trackByWallTime(e){return e.wallTime}getGroupTransform(e){return this.scales&&this.mode!==Dr.OVERLAY?this.getCssTranslatePx(0,this.scales.temporalScale(this.getTimeValue(e))):""}getSteps(){return this.data.map(e=>e.step)}isTimeSelectionEnabled(e){return Boolean(this.mode===Dr.OFFSET&&this.timeProperty===no.STEP&&this.scales&&e)}isDatumInTimeSelectionRange(e){return!this.isTimeSelectionEnabled(this.timeSelection)||(null===this.timeSelection.end?this.timeSelection.start.step===e.step:this.timeSelection.start.step<=e.step&&this.timeSelection.end.step>=e.step)}getHistogramFill(e){return this.scales?this.scales.d3ColorScale(this.getTimeValue(e)):""}updateColorOnHover(e,i,r){!this.isTimeSelectionEnabled(this.timeSelection)||this.isDatumInTimeSelectionRange(i)||(r?e.target.classList.remove("no-color"):e.target.classList.add("no-color"))}getGridTickYLocs(){if(!this.scales||this.mode===Dr.OFFSET)return[];let e=this.scales.countScale;return e.ticks().map(i=>e(i))}onResize(){this.updateClientRects(),this.updateChartIfVisible()}onVisibilityChange({visible:e}){this.domVisible=e,e&&(this.updateClientRects(),this.updateChartIfVisible())}onLinkedTimeRangeChanged(e){if(!this.isTimeSelectionEnabled(this.timeSelection))return;let i=this.timeSelection.start.step,r=this.timeSelection.end?.step,o=e.step<i?e.step:i,s=r;s=void 0===s?e.step>i?e.step:i:e.step>s?e.step:s,(o!==i||s!==r)&&o!==s&&this.onLinkedTimeSelectionChanged.emit({timeSelection:{start:{step:o},end:{step:s}},affordance:qs.HISTOGRAM_CLICK_TO_RANGE})}getTimeValue(e){switch(this.timeProperty){case no.WALL_TIME:return e.wallTime;case no.STEP:return e.step;case no.RELATIVE:return e.wallTime-this.data[0].wallTime}}updateClientRects(){this.content&&(this.layout.contentClientRect=this.content.nativeElement.getBoundingClientRect(),this.layout.histogramHeight=this.layout.contentClientRect.height/2.5)}updateChartIfVisible(){!this.domVisible||(this.scales=this.computeScales(this.data),this.renderXAxis(),this.renderYAxis(),this.changeDetector.detectChanges())}computeScales(e){let{width:i,height:r}=this.layout.contentClientRect,{min:o,max:s}=Xte(e,y=>function(n,t){return n.reduce((e,i)=>Math.min(e,i.x),1/0)}(y.bins),y=>wV(y.bins,({x:x,dx:R})=>x+R)),a=wV(e,y=>wV(y.bins,({y:x})=>x)),l=Wl().domain([o,s]).nice(),c=this.mode!==Dr.OVERLAY&&this.timeProperty==no.WALL_TIME?em():Wl(),d=e.map(y=>this.getTimeValue(y)),{min:u,max:p}=Xte(d,y=>y),f=[u,p];c.domain(f);let m=Wl();m.domain([0,a]);let b=Hf(this.color||"#000"),M=Wl();return M.domain(f),l.range([0,i]),M.range([b.brighter(),b.darker()]),M.interpolate(mL),this.mode===Dr.OVERLAY?(c.range([r,r]),m.range([r,0])):(c.range([r-(this.mode===Dr.OFFSET?r-this.layout.histogramHeight:0),r]),m.range([0,-this.layout.histogramHeight])),{binScale:l,d3ColorScale:M,countScale:m,temporalScale:c}}renderXAxis(){if(!this.scales)return;let{width:e}=this.layout.contentClientRect,i=function(n){return UQ(jN,n)}(this.scales.binScale).ticks(Math.max(2,e/20));i.tickFormat(this.formatters.binNumber),i(nD(this.xAxis.nativeElement))}getYAxisFormatter(){if(this.mode===Dr.OVERLAY)return this.formatters.count;switch(this.timeProperty){case no.WALL_TIME:return this.formatters.wallTime;case no.STEP:return this.formatters.step;case no.RELATIVE:return this.formatters.relative;default:throw RangeError(`Y axis formatter for ${this.timeProperty} must be implemented`)}}getMaxTicks(e){let{height:i}=this.layout.contentClientRect,r=i/15;if(this.timeProperty===no.STEP){let[o,s]=e.domain(),a=Math.max(s-o+1,1);return Math.min(a,r)}return r}renderYAxis(){if(!this.scales)return;let e=this.mode===Dr.OVERLAY?this.scales.countScale:this.scales.temporalScale,i=this.getMaxTicks(e),r=function(n){return UQ(ZT,n)}(e).ticks(Math.max(2,i));r.tickFormat(this.getYAxisFormatter()),r(nD(this.yAxis.nativeElement))}findClosestDatumIndex(e){let i=e.target,r=i;for(;i&&i!==this.histograms.nativeElement;)r=i,i=i.parentElement;return i?Array.from(i.children).indexOf(r):-1}onMouseMoveForTestOnly(e){return this.onMouseMove(e)}onMouseMove(e){if(!this.scales)return;let i=e.offsetX,r=e.offsetY,o=this.findClosestDatumIndex(e);if(o<0)return;let s=this.scales.binScale.invert(i),a=this.data[o],l=this.getClosestBinFromBinCoordinate(a,s);this.tooltipData={value:{position:{x:i,y:r},label:this.mode===Dr.OFFSET?this.formatters.count(l.y):`Step: ${this.formatters.step(a.step)}`},xAxis:{position:this.getUiCoordFromBinForContent(l).x,label:this.formatters.binNumber(Jx(l))},yAxis:{position:this.scales.countScale(this.mode===Dr.OFFSET?0:l.y),label:this.mode===Dr.OFFSET?this.getYAxisFormatter()(this.getTimeValue(a)):this.formatters.binNumber(l.y)},xPositionInBinCoord:s,closestDatum:a,closestBin:l},this.changeDetector.detectChanges()}}return n.\u0275fac=function(e){return new(e||n)(C($t))},n.\u0275cmp=O({type:n,selectors:[["tb-histogram"]],viewQuery:function(e,i){if(1&e&&(Ge(H3e,5),Ge(z3e,5),Ge(U3e,5),Ge(j3e,5),Ge(G3e,5)),2&e){let r;Se(r=Ee())&&(i.main=r.first),Se(r=Ee())&&(i.xAxis=r.first),Se(r=Ee())&&(i.yAxis=r.first),Se(r=Ee())&&(i.content=r.first),Se(r=Ee())&&(i.histograms=r.first)}},inputs:{mode:"mode",timeProperty:"timeProperty",color:"color",data:"data",timeSelection:"timeSelection"},outputs:{onLinkedTimeSelectionChanged:"onLinkedTimeSelectionChanged",onLinkedTimeToggled:"onLinkedTimeToggled"},features:[Gt],decls:22,vars:15,consts:[["detectResize","","observeIntersection","",3,"onResize","onVisibilityChange"],["main",""],[1,"axis","x-axis"],["xAxis",""],[1,"tooltip"],[3,"transform",4,"ngIf"],[1,"axis","y-axis"],["yAxis",""],[4,"ngIf"],[1,"content"],["content",""],[1,"grid"],[3,"transform",4,"ngFor","ngForOf"],["histograms",""],[3,"transform","histogram","no-color","color","mouseenter","mouseleave","click",4,"ngFor","ngForOf","ngForTrackBy"],["class","tooltip",4,"ngIf"],[1,"histogram-card-fob",3,"timeSelection","steps","temporalScale","onTimeSelectionChanged","onTimeSelectionToggled"],["x2","100%",1,"tick"],[3,"mouseenter","mouseleave","click"],["class","baseline","x2","100%",4,"ngIf"],["r","2",3,"transform",4,"ngIf"],["x2","100%",1,"baseline"],["r","2"],["r","2",4,"ngIf"],[1,"value-label"],["x","3","y","-3"]],template:function(e,i){1&e&&(h(0,"div",0,1),I("onResize",function(){return i.onResize()})("onVisibilityChange",function(o){return i.onVisibilityChange(o)}),Nn(),h(2,"svg",2),P(3,"g",null,3),h(5,"g",4),S(6,W3e,3,3,"g",5),g()(),Oo(),h(7,"div",6),Nn(),h(8,"svg"),P(9,"g",null,7),h(11,"g",4),S(12,q3e,3,4,"g",5),g()(),S(13,Y3e,2,3,"ng-container",8),g(),h(14,"svg",9,10)(16,"g",11),S(17,X3e,2,2,"g",12),g(),h(18,"g",null,13),S(20,K3e,4,11,"g",14),g(),S(21,$3e,7,7,"g",15),g()()),2&e&&(As("main "+i.mode+" "+i.timeProperty),v(6),_("ngIf",i.tooltipData),v(5),Tt("transform",i.getCssTranslatePx(9,0)),v(1),_("ngIf",i.tooltipData),v(1),_("ngIf",i.isTimeSelectionEnabled(i.timeSelection)),v(4),_("ngForOf",i.getGridTickYLocs()),v(1),nt("histograms",!0)("linked-time-single-step",i.timeSelection&&!i.timeSelection.end),v(2),_("ngForOf",i.data)("ngForTrackBy",i.trackByWallTime),v(1),_("ngIf",i.tooltipData))},styles:['[_nghost-%COMP%], .main[_ngcontent-%COMP%]{display:inline-block;height:100%;width:100%}[_nghost-%COMP%]{box-sizing:border-box;padding:10px}.main[_ngcontent-%COMP%]{display:grid;grid-template-areas:"content y-axis" "x-axis .";grid-template-columns:1fr 50px;grid-template-rows:1fr 30px}.main.wall_time[_ngcontent-%COMP%]{grid-template-columns:1fr 75px}.tooltip[_ngcontent-%COMP%], .baseline[_ngcontent-%COMP%]{color:#000}body.dark-mode[_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .tooltip[_ngcontent-%COMP%]{color:#fff}body.dark-mode[_nghost-%COMP%]   .baseline[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .baseline[_ngcontent-%COMP%]{color:#fff}.linked-time-fob[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   text[_ngcontent-%COMP%]{font-weight:bold;font-size:10px}.linked-time-fob[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .linked-time-fob[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   text[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{fill:currentColor}.linked-time-fob[_ngcontent-%COMP%]   .value-label[_ngcontent-%COMP%], .tooltip[_ngcontent-%COMP%]   .value-label[_ngcontent-%COMP%]{dominant-baseline:ideographic;text-anchor:start}.axis[_ngcontent-%COMP%]    {color:#616161;position:relative;overflow:hidden}body.dark-mode[_nghost-%COMP%]   .axis[_ngcontent-%COMP%]    , body.dark-mode   [_nghost-%COMP%]   .axis[_ngcontent-%COMP%]    {color:rgba(255,255,255,.7)}.axis[_ngcontent-%COMP%]     .domain, .axis[_ngcontent-%COMP%]     .tick text{display:none}.axis[_ngcontent-%COMP%]     .tick:nth-child(2n+1) text{display:initial}svg[_ngcontent-%COMP%]{height:100%;width:100%;pointer-events:visiblePainted}svg[_ngcontent-%COMP%]   line[_ngcontent-%COMP%], svg[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], svg[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{pointer-events:none}svg[_ngcontent-%COMP%]   g[_ngcontent-%COMP%]{will-change:transform}.x-axis[_ngcontent-%COMP%]{grid-area:x-axis}.x-axis[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{dominant-baseline:hanging;text-anchor:middle}.y-axis[_ngcontent-%COMP%]{grid-area:y-axis;overflow:clip visible}.y-axis[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]{dominant-baseline:middle;text-anchor:start}.histogram-card-fob[_ngcontent-%COMP%]{left:9px;position:absolute}.content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%], .axis[_ngcontent-%COMP%]     .tick line{stroke:#ddd}body.dark-mode[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%]{stroke:#555}body.dark-mode[_nghost-%COMP%]   .axis[_ngcontent-%COMP%]     .tick line, body.dark-mode   [_nghost-%COMP%]   .axis[_ngcontent-%COMP%]     .tick line{stroke:#555}.content[_ngcontent-%COMP%]{grid-area:content;overflow:visible;z-index:1}.content[_ngcontent-%COMP%]   .tick[_ngcontent-%COMP%]{stroke-width:1px;stroke-dasharray:2}.content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{fill:currentColor;stroke-opacity:.6;stroke-width:1px}.content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{filter:drop-shadow(0 0 1px rgba(0, 0, 0, 0.6));stroke:#fff;will-change:transform}.content[_ngcontent-%COMP%]   .baseline[_ngcontent-%COMP%]{stroke-opacity:.1;stroke-width:1px;stroke:currentColor;width:100%}.content[_ngcontent-%COMP%]   .tooltip[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke-opacity:1;stroke:currentColor;fill:rgba(0,0,0,0)}.content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]{color:rgba(221,221,221,.4) !important}.content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke-opacity:.2}body.dark-mode[_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .content[_ngcontent-%COMP%]   .no-color[_ngcontent-%COMP%]{color:rgba(51,51,51,.4) !important}.offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#fff}body.dark-mode[_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{stroke:#555}.offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%]{stroke:#000}body.dark-mode[_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .offset[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   .histograms.linked-time-single-step[_ngcontent-%COMP%]   [_ngcontent-%COMP%]:not(.no-color)   path[_ngcontent-%COMP%]{stroke:#fff}.overlay[_ngcontent-%COMP%]   .x-axis[_ngcontent-%COMP%]     .tick line{display:none}.overlay[_ngcontent-%COMP%]   .content[_ngcontent-%COMP%]   path[_ngcontent-%COMP%]{fill-opacity:0;stroke:currentColor}.tooltip[_ngcontent-%COMP%], .content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%]{display:none}.main[_ngcontent-%COMP%]:hover   .content[_ngcontent-%COMP%]   circle[_ngcontent-%COMP%], .main[_ngcontent-%COMP%]:hover   .tooltip[_ngcontent-%COMP%]{display:block}'],changeDetection:0}),n})();function wV(n,t){return n.reduce((e,i)=>Math.max(e,t(i)),-1/0)}function Xte(n,t,e){e||(e=t);let i=1/0,r=-1/0;for(let o of n)i=Math.min(i,t(o)),r=Math.max(r,e(o));return{min:i,max:r}}function Jx(n){return n.x+.5*n.dx}function nBe(n,t){1&n&&(h(0,"span",14),P(1,"mat-spinner",15),g())}function iBe(n,t){if(1&n){let e=ge();h(0,"tb-histogram",16),I("onLinkedTimeSelectionChanged",function(r){return X(e),Q(w().onLinkedTimeSelectionChanged.emit(r))})("onLinkedTimeToggled",function(){return X(e),Q(w().onLinkedTimeToggled.emit())}),g()}if(2&n){let e=w();_("data",e.data)("mode",e.mode)("timeProperty",e.timeProperty(e.xAxisType))("color",e.runColorScale(e.runId))("timeSelection",e.convertToTimeSelection(e.linkedTimeSelection))}}function rBe(n,t){1&n&&(h(0,"div",18),T(1," Data failed to load. "),g())}function oBe(n,t){if(1&n&&S(0,rBe,2,0,"div",17),2&n){let e=w();_("ngIf",e.loadState===e.DataLoadState.FAILED)}}var sBe=function(n){return{backgroundColor:n}},Qte=(()=>{class n{constructor(){this.DataLoadState=Te,this.onFullSizeToggle=new F,this.onPinClicked=new F,this.onLinkedTimeSelectionChanged=new F,this.onLinkedTimeToggled=new F}timeProperty(e){switch(e){case Pi.STEP:return no.STEP;case Pi.WALL_TIME:return no.WALL_TIME;case Pi.RELATIVE:return no.RELATIVE;default:throw new Error("Invalid xAxisType for histogram time property.")}}convertToTimeSelection(e){return null===e?null:{start:{step:e.startStep},end:e.endStep?{step:e.endStep}:null}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["histogram-card-component"]],inputs:{loadState:"loadState",title:"title",tag:"tag",runId:"runId",data:"data",mode:"mode",xAxisType:"xAxisType",runColorScale:"runColorScale",showFullWidth:"showFullWidth",isPinned:"isPinned",linkedTimeSelection:"linkedTimeSelection",isClosestStepHighlighted:"isClosestStepHighlighted"},outputs:{onFullSizeToggle:"onFullSizeToggle",onPinClicked:"onPinClicked",onLinkedTimeSelectionChanged:"onLinkedTimeSelectionChanged",onLinkedTimeToggled:"onLinkedTimeToggled"},decls:16,vars:14,consts:function(){let t,e;return t=$localize`:A button to pin a card.␟e665dc712bd5f18d4dfa3a29e125d565cc51e2f6␟7284606426234375344:Pin card`,e=$localize`:A button on a histogram card that toggles full size mode.␟fc8f767d0b9f930187a1bae34477ad28736ece33␟915721563638926597:Toggle full size mode`,[[1,"heading"],[1,"tag"],[3,"title","value"],[3,"isClipped","isClosestStepHighlighted"],[1,"run"],[1,"dot",3,"ngStyle"],[1,"run-text",3,"runId"],[1,"controls"],["mat-icon-button","","aria-label",t,3,"click"],[3,"svgIcon"],["mat-icon-button","","aria-label",e,"title","Toggle full size mode",3,"click"],["class","spinner",4,"ngIf"],[3,"data","mode","timeProperty","color","timeSelection","onLinkedTimeSelectionChanged","onLinkedTimeToggled",4,"ngIf","ngIfElse"],["noData",""],[1,"spinner"],["diameter","18"],[3,"data","mode","timeProperty","color","timeSelection","onLinkedTimeSelectionChanged","onLinkedTimeToggled"],["class","empty-message",4,"ngIf"],[1,"empty-message"]]},template:function(e,i){if(1&e&&(h(0,"div",0)(1,"div",1),P(2,"tb-truncated-path",2)(3,"vis-linked-time-selection-warning",3),g(),h(4,"div",4),P(5,"span",5)(6,"card-run-name",6),g(),h(7,"span",7)(8,"button",8),I("click",function(){return i.onPinClicked.emit(!i.isPinned)}),P(9,"mat-icon",9),g(),h(10,"button",10),I("click",function(){return i.onFullSizeToggle.emit()}),P(11,"mat-icon",9),g()(),S(12,nBe,2,0,"span",11),g(),S(13,iBe,1,5,"tb-histogram",12),S(14,oBe,1,1,"ng-template",null,13,Wt)),2&e){let r=it(15);v(2),_("title",i.tag)("value",i.title),v(1),_("isClipped",i.linkedTimeSelection&&i.linkedTimeSelection.clipped)("isClosestStepHighlighted",i.isClosestStepHighlighted),v(2),_("ngStyle",In(12,sBe,i.runColorScale(i.runId))),v(1),_("runId",i.runId),v(2),Be("title",i.isPinned?"Unpin card":"Pin card"),v(1),_("svgIcon",i.isPinned?"keep_24px":"keep_outline_24px"),v(2),_("svgIcon",i.showFullWidth?"fullscreen_exit_24px":"fullscreen_24px"),v(1),_("ngIf",i.loadState===i.DataLoadState.LOADING),v(1),_("ngIf",i.data&&i.data.length)("ngIfElse",r)}},dependencies:[Fe,pu,fA,$i,En,tl,qT,Xg,Qg],styles:['[_nghost-%COMP%]{box-sizing:border-box;display:flex;flex-basis:318px;flex-direction:column;flex-grow:1;height:100%;overflow:auto;padding:16px;padding-top:4px}.heading[_ngcontent-%COMP%]{align-items:center;display:grid;grid-template-areas:"tag controls" "run spinner";grid-template-columns:1fr auto;font-size:14px;margin-bottom:4px}.tag[_ngcontent-%COMP%]{align-items:center;display:flex;gap:5px;grid-area:tag;overflow:hidden}.tag[_ngcontent-%COMP%]   vis-selected-time-clipped[_ngcontent-%COMP%]{line-height:0}.run[_ngcontent-%COMP%]{grid-area:run;display:flex;white-space:nowrap;font-size:13px}.run[_ngcontent-%COMP%]   .dot[_ngcontent-%COMP%]{flex:none;display:inline-block;width:13px;height:13px;border-radius:50%;margin-right:4px}.run[_ngcontent-%COMP%]   .run-text[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;max-width:120px}.controls[_ngcontent-%COMP%]{color:#616161;white-space:nowrap;grid-area:controls;justify-self:flex-end;flex-shrink:0;margin-right:-12px}body.dark-mode[_nghost-%COMP%]   .controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.spinner[_ngcontent-%COMP%]{display:flex;grid-area:spinner;height:100%;justify-content:center;position:relative}mat-spinner[_ngcontent-%COMP%]{top:0;right:0;position:absolute}tb-histogram[_ngcontent-%COMP%]{flex-grow:1}.empty-message[_ngcontent-%COMP%]{margin-top:1em;font-size:13px}'],changeDetection:0}),n})(),Zte=(()=>{class n{constructor(e){this.store=e,this.pinStateChanged=new F,this.mode$=this.store.select(t1),this.xAxisType$=this.store.select(Ol),this.showFullWidth$=this.store.select(qa).pipe(N(i=>i[this.cardId]?.fullWidth))}isHistogramCardMetadata(e){let{plugin:i}=e;return i===zn.HISTOGRAMS}onFullSizeToggle(){this.store.dispatch(Bg({cardId:this.cardId}))}ngOnInit(){let i=this.store.select(Wa,this.cardId).pipe(ke(o=>!!o&&this.isHistogramCardMetadata(o)),N(o=>o)),r=dn([i,this.store.select(Cu,this.cardId)]);this.data$=r.pipe(N(([o,s])=>{let a=o.runId;return s&&s.hasOwnProperty(a)?function(n,t=30){if(!n.length||t<1)return[];let e=function(n){let t=null,e=null;for(let{bins:i}of n){if(!i.length)continue;let r=i[i.length-1],o=i[0].x,s=r.x+r.dx;(null===t||o<t)&&(t=o),(null===e||s>e)&&(e=s)}return null===t||null===e?null:{left:t,right:e}}(n);return e&&e.left===e.right&&(e.right=1.1*e.right+1,e.left=e.left/1.1-1),n.map(i=>({step:i.step,wallTime:i.wallTime,bins:e?O3e(i.bins,e,t):[]}))}(s[a].map(d=>{let{wallTime:u,step:p}=d;return{wallTime:u,step:p,bins:d.bins.map(m=>({x:m.min,dx:m.max-m.min,y:m.count}))}})):[]})),this.steps$=this.data$.pipe(N(o=>o.map(s=>s.step))),this.linkedTimeSelection$=dn([this.store.select(Eu),this.steps$,this.store.select(Su)]).pipe(N(([o,s,a])=>{if(!o)return null;let l=1/0,c=-1/0;for(let p of s)l=Math.min(p,l),c=Math.max(p,c);return function(n,t){if(null!==n.endStep)return n;let e=function(n,t){let e=1/0,i=null;for(let r of t){let o=Math.abs(n-r);o<e&&(e=o,i=r)}return i}(n.startStep,t);return null!==e?{...n,startStep:e}:n}(Uh(AF(o,a),l,c),s)})),this.isClosestStepHighlighted$=dn([this.store.select(Eu),this.linkedTimeSelection$]).pipe(N(([o,s])=>o&&s&&!s.clipped&&null===o.end&&o.start.step!==s.startStep)),this.loadState$=this.store.select(_d,this.cardId),this.tag$=i.pipe(N(o=>o.tag)),this.title$=this.tag$.pipe(N(o=>Yg(o,this.groupName))),this.runId$=i.pipe(N(o=>o.runId)),this.isPinned$=this.store.select(Mu,this.cardId)}onLinkedTimeSelectionChanged(e){this.store.dispatch(kf(e))}onLinkedTimeToggled(){this.store.dispatch(Id({affordance:Ys.FOB_DESELECT}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["histogram-card"]],inputs:{cardId:"cardId",groupName:"groupName",runColorScale:"runColorScale"},outputs:{pinStateChanged:"pinStateChanged"},decls:12,vars:34,consts:[[3,"loadState","title","tag","runId","data","mode","xAxisType","runColorScale","showFullWidth","isPinned","isClosestStepHighlighted","linkedTimeSelection","onFullSizeToggle","onPinClicked","onLinkedTimeSelectionChanged","onLinkedTimeToggled"]],template:function(e,i){1&e&&(h(0,"histogram-card-component",0),I("onFullSizeToggle",function(){return i.onFullSizeToggle()})("onPinClicked",function(o){return i.pinStateChanged.emit(o)})("onLinkedTimeSelectionChanged",function(o){return i.onLinkedTimeSelectionChanged(o)})("onLinkedTimeToggled",function(){return i.onLinkedTimeToggled()}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),j(11,"async"),g()),2&e&&_("loadState",W(1,12,i.loadState$))("title",W(2,14,i.title$))("tag",W(3,16,i.tag$))("runId",W(4,18,i.runId$))("data",W(5,20,i.data$))("mode",W(6,22,i.mode$))("xAxisType",W(7,24,i.xAxisType$))("runColorScale",i.runColorScale)("showFullWidth",W(8,26,i.showFullWidth$))("isPinned",W(9,28,i.isPinned$))("isClosestStepHighlighted",W(10,30,i.isClosestStepHighlighted$))("linkedTimeSelection",W(11,32,i.linkedTimeSelection$))},dependencies:[Qte,ct],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }"],changeDetection:0}),n})();function cBe(n,t){if(1&n){let e=ge();h(0,"image-card",6),I("fullWidthChanged",function(r){return X(e),Q(w(2).onFullWidthChanged(r))})("pinStateChanged",function(){return X(e),Q(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);_("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function dBe(n,t){if(1&n){let e=ge();h(0,"scalar-card",7),I("pinStateChanged",function(){return X(e),Q(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);_("cardId",e.cardId)("groupName",e.groupName)}}function uBe(n,t){if(1&n){let e=ge();h(0,"histogram-card",8),I("pinStateChanged",function(){return X(e),Q(w(2).onPinStateChanged())}),g()}if(2&n){let e=w(2);_("cardId",e.cardId)("groupName",e.groupName)("runColorScale",e.runColorScale)}}function pBe(n,t){if(1&n&&(h(0,"div"),T(1),g()),2&n){let e=w(2);v(1),He("Placeholder error for: ",e.cardId,"")}}function fBe(n,t){if(1&n&&(Ot(0,1),S(1,cBe,1,3,"image-card",2),S(2,dBe,1,2,"scalar-card",3),S(3,uBe,1,3,"histogram-card",4),S(4,pBe,2,1,"div",5),kt()),2&n){let e=w();_("ngSwitch",e.pluginType),v(1),_("ngSwitchCase",e.PluginType.IMAGES),v(1),_("ngSwitchCase",e.PluginType.SCALARS),v(1),_("ngSwitchCase",e.PluginType.HISTOGRAMS)}}var Kte=(()=>{class n{constructor(){this.PluginType=zn,this.fullWidthChanged=new F,this.fullHeightChanged=new F,this.pinStateChanged=new F}onFullWidthChanged(e){this.fullWidthChanged.emit(e)}onFullHeightChanged(e){this.fullHeightChanged.emit(e)}onPinStateChanged(){this.pinStateChanged.emit()}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["card-view-component"]],inputs:{isEverVisible:"isEverVisible",cardId:"cardId",groupName:"groupName",pluginType:"pluginType",runColorScale:"runColorScale"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged",pinStateChanged:"pinStateChanged"},decls:1,vars:1,consts:[[3,"ngSwitch",4,"ngIf"],[3,"ngSwitch"],[3,"cardId","groupName","runColorScale","fullWidthChanged","pinStateChanged",4,"ngSwitchCase"],[3,"cardId","groupName","pinStateChanged",4,"ngSwitchCase"],[3,"cardId","groupName","runColorScale","pinStateChanged",4,"ngSwitchCase"],[4,"ngSwitchDefault"],[3,"cardId","groupName","runColorScale","fullWidthChanged","pinStateChanged"],[3,"cardId","groupName","pinStateChanged"],[3,"cardId","groupName","runColorScale","pinStateChanged"]],template:function(e,i){1&e&&S(0,fBe,5,4,"ng-container",0),2&e&&_("ngIf",i.isEverVisible)},dependencies:[Fe,sr,Sr,uu,RQ,Wte,Zte],encapsulation:2,changeDetection:0}),n})(),Jte=(()=>{class n{constructor(e){this.store=e,this.isEverVisible=!1,this.fullWidthChanged=new F,this.fullHeightChanged=new F,this.runColorScale$=this.store.select(Au).pipe(ac(350,void 0,{leading:!0,trailing:!0}),N(i=>r=>i.hasOwnProperty(r)?i[r]:"#fff"))}onVisibilityChange({visible:e}){this.isEverVisible=this.isEverVisible||e}onFullWidthChanged(e){this.fullWidthChanged.emit(e)}onFullHeightChanged(e){this.fullHeightChanged.emit(e)}onPinStateChanged(){this.store.select(Mu,this.cardId).pipe(Yt(1),Bt(this.store.select(CW))).subscribe(([e,i])=>{this.store.dispatch(Hg({cardId:this.cardId,canCreateNewPins:i,wasPinned:e}))})}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["card-view"]],inputs:{cardId:"cardId",groupName:"groupName",pluginType:"pluginType"},outputs:{fullWidthChanged:"fullWidthChanged",fullHeightChanged:"fullHeightChanged"},decls:2,vars:7,consts:[["observeIntersection","","intersectionObserverMargin","200px 200px 200px 200px",3,"isEverVisible","cardId","groupName","pluginType","runColorScale","fullWidthChanged","fullHeightChanged","pinStateChanged","onVisibilityChange"]],template:function(e,i){1&e&&(h(0,"card-view-component",0),I("fullWidthChanged",function(o){return i.onFullWidthChanged(o)})("fullHeightChanged",function(o){return i.onFullHeightChanged(o)})("pinStateChanged",function(){return i.onPinStateChanged()})("onVisibilityChange",function(o){return i.onVisibilityChange(o)}),j(1,"async"),g()),2&e&&_("isEverVisible",i.isEverVisible)("cardId",i.cardId)("groupName",i.groupName)("pluginType",i.pluginType)("runColorScale",W(1,5,i.runColorScale$))},dependencies:[qg,Kte,ct],styles:["[_nghost-%COMP%]{background-color:#fff}body.dark-mode   [_nghost-%COMP%]{background-color:#303030}"],changeDetection:0}),n})();function _Be(n,t){1&n&&li(0)}var bBe=function(n,t){return{"full-width":n,"full-height":t}};function vBe(n,t){if(1&n){let e=ge();h(0,"div",5)(1,"card-view",6),I("fullWidthChanged",function(r){let s=X(e).$implicit;return Q(w(2).onFullWidthChanged(s.cardId,r))})("fullHeightChanged",function(r){let s=X(e).$implicit;return Q(w(2).onFullHeightChanged(s.cardId,r))}),g()()}if(2&n){let e=t.$implicit,i=w(2);_("ngClass",qr(6,bBe,i.cardsAtFullWidth.has(e.cardId)||(null==i.cardStateMap[e.cardId]?null:i.cardStateMap[e.cardId].fullWidth),i.cardsAtFullHeight.has(e.cardId)||(null==i.cardStateMap[e.cardId]?null:i.cardStateMap[e.cardId].tableExpanded))),v(1),_("cardId",e.cardId)("groupName",i.groupName)("pluginType",e.plugin)("cardObserver",i.cardObserver)("cardLazyLoader",e.cardId)}}function yBe(n,t){1&n&&li(0)}var xBe=function(){return{isBottomControl:!1}},CBe=function(){return{isBottomControl:!0}};function MBe(n,t){if(1&n&&(h(0,"div"),S(1,_Be,1,0,"ng-container",2),h(2,"div",3),S(3,vBe,2,9,"div",4),g(),S(4,yBe,1,0,"ng-container",2),g()),2&n){let e=w(),i=it(2);v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",cu(8,xBe)),v(1),Tt("grid-template-columns",e.gridTemplateColumn),v(1),_("ngForOf",e.cardIdsWithMetadata)("ngForTrackBy",e.trackByCards),v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",cu(9,CBe))}}function wBe(n,t){if(1&n){let e=ge();h(0,"button",12),I("click",function(r){X(e);let o=w(3);return Q(o.handlePageChange(o.pageIndex-1,r.target))}),T(1," Previous "),g()}2&n&&_("disabled",0===w(3).pageIndex)}function SBe(n,t){if(1&n){let e=ge();h(0,"span",15)(1,"input",16),I("input",function(r){return X(e),Q(w(4).onPaginationInputChange(r))})("change",function(r){return X(e),Q(w(4).onPaginationInputChange(r))}),g(),T(2),g()}if(2&n){let e=w(4);v(1),_("value",e.pageIndex+1)("max",e.numPages),v(1),He(" of ",e.numPages,"")}}function EBe(n,t){if(1&n){let e=ge();h(0,"span"),S(1,SBe,3,3,"span",13),h(2,"button",14),I("click",function(r){X(e);let o=w(3);return Q(o.handlePageChange(o.pageIndex+1,r.target))}),T(3," Next "),g()()}if(2&n){let e=w(2).isBottomControl,i=w();v(1),_("ngIf",i.showPaginationInput(e)),v(1),_("disabled",i.pageIndex+1>=i.numPages)}}function TBe(n,t){if(1&n&&(h(0,"div",8)(1,"span",9),S(2,wBe,2,1,"button",10),g(),h(3,"span",11),S(4,EBe,4,2,"span",0),g()()),2&n){let e=w(2);v(2),_("ngIf",e.showPaginationControls),v(2),_("ngIf",e.showPaginationControls)}}function DBe(n,t){1&n&&S(0,TBe,5,2,"div",7),2&n&&_("ngIf",w().showPaginationControls)}var $te=(()=>{class n{constructor(e){this.cdkScrollable=e,this.PluginType=zn,this.gridTemplateColumn="",this.cardsAtFullWidth=new Set,this.cardsAtFullHeight=new Set,this.pageIndexChanged=new F}ngOnInit(){this.isCardWidthValid(this.cardMinWidth)&&(this.gridTemplateColumn=`repeat(auto-fill, minmax(${this.cardMinWidth}px, 1fr))`)}ngOnChanges(e){if(e.cardMinWidth){let i=e.cardMinWidth.currentValue;this.isCardWidthValid(i)?(this.cardMinWidth=i,this.gridTemplateColumn=`repeat(auto-fill, minmax(${this.cardMinWidth}px, 1fr))`):this.gridTemplateColumn=""}}isCardWidthValid(e){return e&&e>=335&&e<=735}showPaginationInput(e){return e}handlePageChange(e,i){let r=i.getBoundingClientRect().top;setTimeout(()=>{this.scrollToKeepTargetPosition(i,r)},0),this.pageIndexChanged.emit(e)}scrollToKeepTargetPosition(e,i){let r=this.cdkScrollable?.getElementRef().nativeElement;r&&r.scrollTo(0,e.getBoundingClientRect().top-i+r.scrollTop)}trackByCards(e,i){return i.cardId}onPaginationInputChange(e){let i=e.target;if("input"===e.type&&""===i.value)return;let r=Number(i.value)-1,o=Math.min(Math.max(0,r),this.numPages-1);i.value!==String(o+1)&&(i.value=String(o+1)),this.handlePageChange(o,i)}onFullWidthChanged(e,i){i?this.cardsAtFullWidth.add(e):this.cardsAtFullWidth.delete(e)}onFullHeightChanged(e,i){i?this.cardsAtFullHeight.add(e):this.cardsAtFullHeight.delete(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Cd,8))},n.\u0275cmp=O({type:n,selectors:[["metrics-card-grid-component"]],inputs:{isGroupExpanded:"isGroupExpanded",pageIndex:"pageIndex",numPages:"numPages",cardIdsWithMetadata:"cardIdsWithMetadata",cardMinWidth:"cardMinWidth",cardObserver:"cardObserver",showPaginationControls:"showPaginationControls",cardStateMap:"cardStateMap"},outputs:{pageIndexChanged:"pageIndexChanged"},features:[Gt],decls:3,vars:1,consts:function(){let t,e;return t=$localize`:A button that sets a group to the previous page.␟575e782fd27f2ee70a034a775efe9ad162472250␟3629960544875360046:Previous page`,e=$localize`:A button that sets a group to the next page.␟ce3cefb1cd0099aa5003dda16ec9eb21fd8ba789␟3337301694210287595:Next page`,[[4,"ngIf"],["groupControls",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"card-grid"],["class","card-space",3,"ngClass",4,"ngFor","ngForOf","ngForTrackBy"],[1,"card-space",3,"ngClass"],[3,"cardId","groupName","pluginType","cardObserver","cardLazyLoader","fullWidthChanged","fullHeightChanged"],["class","group-controls",4,"ngIf"],[1,"group-controls"],[1,"prev-container"],["class","prev pagination-button","mat-button","","aria-label",t,3,"disabled","click",4,"ngIf"],[1,"input-and-next-container"],["mat-button","","aria-label",t,1,"prev","pagination-button",3,"disabled","click"],["class","pagination-input",4,"ngIf"],["mat-button","","aria-label",e,1,"next","pagination-button",3,"disabled","click"],[1,"pagination-input"],["type","number","min","1",3,"value","max","input","change"]]},template:function(e,i){1&e&&(S(0,MBe,5,10,"div",0),S(1,DBe,1,1,"ng-template",null,1,Wt)),2&e&&_("ngIf",i.isGroupExpanded)},dependencies:[lQ,Jte,yn,nn,Fe,Lr,Ji],styles:["[_nghost-%COMP%]{contain:content}.card-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill, minmax(335px, 1fr));gap:16px;padding:16px}.card-space.full-width[_ngcontent-%COMP%]{grid-column-start:1;grid-column-end:-1}.card-space.full-height[_ngcontent-%COMP%]{min-height:480px}.card-space.full-height[_ngcontent-%COMP%]   card-view[_ngcontent-%COMP%]{height:100%}card-view[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:4px;box-sizing:border-box;contain:layout paint;display:block;min-height:320px}body.dark-mode[_nghost-%COMP%]   card-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   card-view[_ngcontent-%COMP%]{border:1px solid #555}.group-controls[_ngcontent-%COMP%]{color:#616161;display:grid;align-items:center;grid-template-columns:1fr 1fr;gap:16px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .group-controls[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-controls[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.group-controls[_ngcontent-%COMP%]:first-of-type{padding-top:16px}.group-controls[_ngcontent-%COMP%]:last-of-type{padding-bottom:16px}.prev-container[_ngcontent-%COMP%]{justify-self:flex-start}.input-and-next-container[_ngcontent-%COMP%]{justify-self:flex-end}.pagination-input[_ngcontent-%COMP%]{margin-right:16px}.pagination-input[_ngcontent-%COMP%]   input[_ngcontent-%COMP%]{background:rgba(0,0,0,0);border:1px solid currentColor;color:inherit;font:inherit}.pagination-button[_ngcontent-%COMP%]{background-color:#fff}body.dark-mode[_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .pagination-button[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0)}"],changeDetection:0}),n})(),p_=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.groupName$=new Ai(null),this.pageIndex$=new Ai(0),this.items$=new Ai([]),this.ngUnsubscribe=new Ie,this.cardStateMap$=this.store.select(qa),this.numPages$=dn([this.items$,this.store.select(Bs.getPageSize)]).pipe(N(([i,r])=>Math.ceil(i.length/r))),this.isGroupExpanded$=this.groupName$.pipe(Jn(i=>null!==i?this.store.select(s1,i):Ht(!0))),this.showPaginationControls$=this.numPages$.pipe(N(i=>i>1)),this.normalizedPageIndex$=dn([this.pageIndex$,this.numPages$]).pipe(ot(this.ngUnsubscribe),Nt(([i,r])=>{0!==r&&(i>=r?this.pageIndex$.next(r-1):i<0&&this.pageIndex$.next(0))}),N(([i,r])=>Math.min(Math.max(i,0),r-1)),Ms(1)),this.pagedItems$=dn([this.items$,this.store.select(Bs.getPageSize),this.normalizedPageIndex$,this.isGroupExpanded$]).pipe(N(([i,r,o,s])=>i.slice(r*o,r*o+(s?r:0)))),this.cardMinWidth$=this.store.select(Xh)}ngOnChanges(e){e.cardIdsWithMetadata&&this.items$.next(this.cardIdsWithMetadata),e.groupName&&this.groupName$.next(this.groupName)}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}onPageIndexChanged(e){this.pageIndex$.next(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-card-grid"]],inputs:{groupName:"groupName",cardIdsWithMetadata:"cardIdsWithMetadata",cardObserver:"cardObserver"},features:[Gt],decls:8,vars:22,consts:[[3,"isGroupExpanded","pageIndex","numPages","showPaginationControls","cardIdsWithMetadata","cardMinWidth","cardObserver","cardStateMap","pageIndexChanged"]],template:function(e,i){1&e&&(h(0,"metrics-card-grid-component",0),I("pageIndexChanged",function(o){return i.onPageIndexChanged(o)}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),g()),2&e&&_("isGroupExpanded",W(1,8,i.isGroupExpanded$))("pageIndex",W(2,10,i.normalizedPageIndex$))("numPages",W(3,12,i.numPages$))("showPaginationControls",W(4,14,i.showPaginationControls$))("cardIdsWithMetadata",W(5,16,i.pagedItems$))("cardMinWidth",W(6,18,i.cardMinWidth$))("cardObserver",i.cardObserver)("cardStateMap",W(7,20,i.cardStateMap$))},dependencies:[$te,ct],encapsulation:2,changeDetection:0}),n})();function PBe(n,t){if(1&n&&(h(0,"span",7),T(1),j(2,"number"),g()),2&n){let e=w();v(1),He("",W(2,1,e.numberOfCards)," cards")}}function OBe(n,t){1&n&&P(0,"mat-icon",8)}function kBe(n,t){1&n&&P(0,"mat-icon",9)}var ene=(()=>{class n{constructor(){this.groupExpansionToggled=new F}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-card-group-toolbar-component"]],inputs:{groupName:"groupName",numberOfCards:"numberOfCards",isGroupExpanded:"isGroupExpanded"},outputs:{groupExpansionToggled:"groupExpansionToggled"},decls:9,vars:5,consts:function(){let t;return t=$localize`:A button that allows user to expand a tag group.␟ffaa11471b878a6dffe2e68c6f37064a9e074853␟5386054325274779258:Expand group`,[["aria-label",t,1,"group-toolbar",3,"click"],[1,"group-title-wrapper"],["aria-role","heading","aria-level","3",1,"group-title",3,"title"],["class","group-card-count",4,"ngIf"],[1,"expand-group-icon"],["svgIcon","expand_less_24px",4,"ngIf","ngIfElse"],["expandMore",""],[1,"group-card-count"],["svgIcon","expand_less_24px"],["svgIcon","expand_more_24px"]]},template:function(e,i){if(1&e&&(h(0,"button",0),I("click",function(){return i.groupExpansionToggled.emit()}),h(1,"span",1)(2,"span",2),T(3),g(),S(4,PBe,3,3,"span",3),g(),h(5,"span",4),S(6,OBe,1,0,"mat-icon",5),S(7,kBe,1,0,"ng-template",null,6,Wt),g()()),2&e){let r=it(8);v(2),Wi("title",i.groupName),v(1),bt(i.groupName),v(1),_("ngIf",i.numberOfCards>1),v(2),_("ngIf",i.isGroupExpanded)("ngIfElse",r)}},dependencies:[Fe,En,La],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border:0;border-top:1px solid #ebebeb;color:#212121;top:-1px;display:flex;width:100%;font:inherit}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-top:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{color:#fff}.card-group:first-of-type   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-top:0}[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]:hover{cursor:pointer}.expand-group-icon[_ngcontent-%COMP%]{color:#616161}body.dark-mode[_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.expand-group-icon[_ngcontent-%COMP%]:disabled{color:#757575}body.dark-mode[_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]:disabled, body.dark-mode   [_nghost-%COMP%]   .expand-group-icon[_ngcontent-%COMP%]:disabled{color:#616161}.group-title-wrapper[_ngcontent-%COMP%]{flex-grow:1;text-align:left}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161;margin-left:6px}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),tne=(()=>{class n{constructor(e){this.store=e,this.groupName=null,this.isGroupExpanded$=Ht(!1)}ngOnInit(){this.isGroupExpanded$=null!==this.groupName?this.store.select(s1,this.groupName):Ht(!1)}onGroupExpansionToggled(){if(null===this.groupName)throw new RangeError("Invariant error: expansion cannot be toggled when groupName is null");this.store.dispatch(PT({tagGroup:this.groupName}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-card-group-toolbar"]],inputs:{groupName:"groupName",numberOfCards:"numberOfCards"},decls:2,vars:5,consts:[[3,"numberOfCards","isGroupExpanded","groupName","groupExpansionToggled"]],template:function(e,i){1&e&&(h(0,"metrics-card-group-toolbar-component",0),I("groupExpansionToggled",function(){return i.onGroupExpansionToggled()}),j(1,"async"),g()),2&e&&_("numberOfCards",i.numberOfCards)("isGroupExpanded",W(1,3,i.isGroupExpanded$))("groupName",i.groupName)},dependencies:[ene,ct],encapsulation:2,changeDetection:0}),n})();function LBe(n,t){if(1&n&&(h(0,"div",1),P(1,"metrics-card-group-toolbar",2)(2,"metrics-card-grid",3),g()),2&n){let e=t.$implicit,i=w();v(1),_("numberOfCards",e.items.length)("groupName",e.groupName),v(1),_("cardIdsWithMetadata",e.items)("cardObserver",i.cardObserver)("groupName",e.groupName)}}var nne=(()=>{class n{constructor(){this.PluginType=zn}trackByGroup(e,i){return i.groupName}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-card-groups-component"]],inputs:{cardGroups:"cardGroups",cardObserver:"cardObserver"},decls:1,vars:2,consts:[["class","card-group",4,"ngFor","ngForOf","ngForTrackBy"],[1,"card-group"],[3,"numberOfCards","groupName"],[3,"cardIdsWithMetadata","cardObserver","groupName"]],template:function(e,i){1&e&&S(0,LBe,3,5,"div",0),2&e&&_("ngForOf",i.cardGroups)("ngForTrackBy",i.trackByGroup)},dependencies:[nn,p_,tne],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}"],changeDetection:0}),n})(),ine=(()=>{class n{constructor(e){this.store=e,this.cardGroups$=this.store.select(Nf).pipe(Li(this.store.select(Dc)),N(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),N(i=>LT(i)))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-card-groups"]],inputs:{cardObserver:"cardObserver"},decls:2,vars:4,consts:[[3,"cardGroups","cardObserver"]],template:function(e,i){1&e&&(P(0,"metrics-card-groups-component",0),j(1,"async")),2&e&&_("cardGroups",W(1,2,i.cardGroups$))("cardObserver",i.cardObserver)},dependencies:[nne,ct],encapsulation:2,changeDetection:0}),n})();function HBe(n,t){if(1&n&&(h(0,"span"),T(1),g()),2&n){let e=w();v(1),He(" and ",e.getPluginTypeFilterString(e.pluginTypes)," visualization filter")}}var rne=(()=>{class n{constructor(){this.PluginType=zn,this.listFormatter=new Intl.ListFormat(void 0,{style:"long",type:"disjunction"})}getPluginTypeFilterString(e){let i=[...e].map(r=>{switch(r){case zn.SCALARS:return"scalar";case zn.IMAGES:return"image";case zn.HISTOGRAMS:return"histogram";default:throw new RangeError(`Please implement human readable name for plugin type: ${r}`)}});return this.listFormatter.format(i)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-empty-tag-match-component"]],inputs:{pluginTypes:"pluginTypes",tagFilterRegex:"tagFilterRegex",tagCounts:"tagCounts"},decls:6,vars:5,consts:[[4,"ngIf"]],template:function(e,i){1&e&&(T(0,"No matches for tag filter "),h(1,"code"),T(2),g(),S(3,HBe,2,1,"span",0),T(4),j(5,"number")),2&e&&(v(2),He("/",i.tagFilterRegex,"/"),v(1),_("ngIf",i.pluginTypes.size),v(1),He(" out of ",W(5,3,i.tagCounts)," tags."))},dependencies:[Fe,La],encapsulation:2,changeDetection:0}),n})(),one=(()=>{class n{constructor(e){this.store=e,this.pluginTypes$=this.store.select(Dc),this.tagFilterRegex$=this.store.select(kl),this.tagCounts$=this.store.select(Nf).pipe(N(i=>new Set(i.map(({tag:r})=>r)).size))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-empty-tag-match"]],decls:4,vars:9,consts:[[3,"pluginTypes","tagFilterRegex","tagCounts"]],template:function(e,i){1&e&&(P(0,"metrics-empty-tag-match-component",0),j(1,"async"),j(2,"async"),j(3,"async")),2&e&&_("pluginTypes",W(1,3,i.pluginTypes$))("tagFilterRegex",W(2,5,i.tagFilterRegex$))("tagCounts",W(3,7,i.tagCounts$))},dependencies:[rne,ct],encapsulation:2,changeDetection:0}),n})();function jBe(n,t){if(1&n&&(h(0,"span",6),T(1),j(2,"number"),g()),2&n){let e=w();v(1),He("",W(2,1,e.cardIdsWithMetadata.length)," cards")}}function GBe(n,t){1&n&&P(0,"metrics-empty-tag-match",7)}var sne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-filtered-view-component"]],inputs:{isEmptyMatch:"isEmptyMatch",cardObserver:"cardObserver",cardIdsWithMetadata:"cardIdsWithMetadata"},decls:7,vars:4,consts:[[1,"group-toolbar"],[1,"group-text"],["aria-role","heading","aria-level","3",1,"group-title"],["class","group-card-count",4,"ngIf"],["class","warn",4,"ngIf"],[3,"cardIdsWithMetadata","cardObserver"],[1,"group-card-count"],[1,"warn"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"span",1)(2,"span",2),T(3,"Tags matching filter"),g(),S(4,jBe,3,3,"span",3),g()(),S(5,GBe,1,0,"metrics-empty-tag-match",4),P(6,"metrics-card-grid",5)),2&e&&(v(4),_("ngIf",i.cardIdsWithMetadata.length>1),v(1),_("ngIf",i.isEmptyMatch),v(1),_("cardIdsWithMetadata",i.cardIdsWithMetadata)("cardObserver",i.cardObserver))},dependencies:[Fe,p_,one,La],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}.group-text[_ngcontent-%COMP%]{display:flex;align-items:baseline}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161;margin-left:6px}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}metrics-empty-tag-match[_ngcontent-%COMP%]{color:#616161;font-size:13px;font-style:italic;padding:16px;text-align:center;display:block}body.dark-mode[_nghost-%COMP%]   metrics-empty-tag-match[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   metrics-empty-tag-match[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),ane=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(Nf).pipe(Li(this.store.select(Dc)),N(([i,r])=>r.size?i.filter(o=>r.has(o.plugin)):i),Li(this.store.select(kl)),wr(200),N(([i,r])=>{try{return{cardList:i,regex:new RegExp(r,"i")}}catch{return{cardList:i,regex:null}}}),ke(({regex:i})=>null!==i),N(({cardList:i,regex:r})=>i.filter(({tag:o})=>r.test(o))),Yn((i,r)=>i.length===r.length&&i.every((o,s)=>o.cardId===r[s].cardId)),Cs(),qn([])),this.isEmptyMatch$=this.cardIdsWithMetadata$.pipe(Li(this.store.select(Nf)),N(([i,r])=>Boolean(r.length)&&0===i.length))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-filtered-view"]],inputs:{cardObserver:"cardObserver"},decls:3,vars:7,consts:[[3,"isEmptyMatch","cardIdsWithMetadata","cardObserver"]],template:function(e,i){1&e&&(P(0,"metrics-filtered-view-component",0),j(1,"async"),j(2,"async")),2&e&&_("isEmptyMatch",W(1,3,i.isEmptyMatch$))("cardIdsWithMetadata",W(2,5,i.cardIdsWithMetadata$))("cardObserver",i.cardObserver)},dependencies:[sne,ct],encapsulation:2,changeDetection:0}),n})();function XBe(n,t){1&n&&P(0,"mat-icon",7)}function QBe(n,t){if(1&n&&(h(0,"mat-option",8),T(1),g()),2&n){let e=t.$implicit;_("value",e),Be("title",e),v(1),bt(e)}}function ZBe(n,t){if(1&n&&(h(0,"div",9)(1,"em"),T(2),j(3,"number"),g()()),2&n){let e=w();v(2),He("and ",W(3,1,e.completions.length-25)," more tags matched")}}var lne=(()=>{class n{constructor(){this.onRegexFilterValueChange=new F}onCompletionAccepted(e){this.onRegexFilterValueChange.emit(function(n){return n.replace(fbe,"\\$&")}(e))}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-tag-filter-component"]],hostVars:2,hostBindings:function(e,i){2&e&&nt("valid",i.isRegexFilterValid)},inputs:{regexFilterValue:"regexFilterValue",isRegexFilterValid:"isRegexFilterValid",completions:"completions"},outputs:{onRegexFilterValueChange:"onRegexFilterValueChange"},decls:7,vars:5,consts:[[1,"tag-filter"],["placeholder","Filter tags (regex)",3,"value","matAutocomplete","input"],["svgIcon","error_24px","class","error-icon","title","Invalid regex filter. The result may be stale.",4,"ngIf"],[1,"tag-options",3,"optionSelected"],["filterMatches","matAutocomplete"],["class","option",3,"value",4,"ngFor","ngForOf"],["class","and-more",4,"ngIf"],["svgIcon","error_24px","title","Invalid regex filter. The result may be stale.",1,"error-icon"],[1,"option",3,"value"],[1,"and-more"]],template:function(e,i){if(1&e&&(h(0,"div",0)(1,"tb-filter-input",1),I("input",function(o){return i.onRegexFilterValueChange.emit(o.target.value)}),g(),S(2,XBe,1,0,"mat-icon",2),g(),h(3,"mat-autocomplete",3,4),I("optionSelected",function(o){return i.onCompletionAccepted(o.option.value)}),S(5,QBe,2,3,"mat-option",5),S(6,ZBe,4,3,"div",6),g()),2&e){let r=it(4);v(1),_("value",i.regexFilterValue)("matAutocomplete",r),v(1),_("ngIf",!i.isRegexFilterValid),v(3),_("ngForOf",null==i.completions?null:i.completions.slice(0,25)),v(1),_("ngIf",(null==i.completions?null:i.completions.length)>25)}},dependencies:[nn,Fe,Sp,Ote,Us,En,La],styles:[".tag-filter[_ngcontent-%COMP%]{display:flex;position:relative}tb-filter-input[_ngcontent-%COMP%]{flex-grow:1}[_nghost-%COMP%]{color:#212121}body.dark-mode   [_nghost-%COMP%]{color:#fff}[_nghost-%COMP%]:not(.valid){color:#c62828}[_nghost-%COMP%]:not(.valid)   .error-icon[_ngcontent-%COMP%]{color:#c62828;position:absolute;right:0}  .tag-options .option,   .tag-options .and-more{-webkit-box-orient:vertical;-webkit-line-clamp:3;display:-webkit-box;font-size:14px;line-height:1.4;padding:8px 16px}  .tag-options .and-more{color:#616161}body.dark-mode[_nghost-%COMP%]     .tag-options .and-more, body.dark-mode   [_nghost-%COMP%]     .tag-options .and-more{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),cne=(()=>{class n{constructor(e){this.store=e,this.tagFilter$=this.store.select(kl),this.isTagFilterRegexValid$=this.tagFilter$.pipe(N(i=>{try{return new RegExp(i),!0}catch{return!1}})),this.completions$=this.store.select(e1).pipe(Li(this.store.select(Dc)),N(([i,r])=>i.filter(({plugin:o})=>!r.size||r.has(o)).map(({tag:o})=>o)),N(i=>[...new Set(i)]),N(i=>i.sort(yy)),Li(this.store.select(kl)),N(([i,r])=>{try{return[i,new RegExp(r,"i")]}catch{return[i,null]}}),ke(([,i])=>null!==i),N(([i,r])=>i.filter(o=>r.test(o))))}onTagFilterChange(e){this.store.dispatch(RT({tagFilter:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-tag-filter"]],decls:4,vars:9,consts:[[3,"regexFilterValue","isRegexFilterValid","completions","onRegexFilterValueChange"]],template:function(e,i){1&e&&(h(0,"metrics-tag-filter-component",0),I("onRegexFilterValueChange",function(o){return i.onTagFilterChange(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("regexFilterValue",W(1,3,i.tagFilter$))("isRegexFilterValid",W(2,5,i.isTagFilterRegexValid$))("completions",W(3,7,i.completions$))},dependencies:[lne,ct],encapsulation:2,changeDetection:0}),n})();function $Be(n,t){if(1&n&&(h(0,"span",8),T(1),g()),2&n){let e=w();v(1),He("",e.cardIdsWithMetadata.length," cards")}}function eVe(n,t){1&n&&(h(0,"span",9),T(1,"New card pinned"),g()),2&n&&Be("data-id",t.$implicit)}function tVe(n,t){if(1&n&&P(0,"metrics-card-grid",10),2&n){let e=w();_("cardIdsWithMetadata",e.cardIdsWithMetadata)("cardObserver",e.cardObserver)}}function nVe(n,t){1&n&&(h(0,"div",11),T(1,"Pin cards for a quick view and comparison"),g())}var dne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["metrics-pinned-view-component"]],inputs:{cardObserver:"cardObserver",cardIdsWithMetadata:"cardIdsWithMetadata",newCardPinnedIds:"newCardPinnedIds"},decls:10,vars:4,consts:[[1,"group-toolbar"],["svgIcon","keep_24px"],[1,"group-text"],["aria-role","heading","aria-level","3",1,"group-title"],["class","group-card-count",4,"ngIf"],["class","new-card-pinned",4,"ngFor","ngForOf"],[3,"cardIdsWithMetadata","cardObserver",4,"ngIf","ngIfElse"],["emptyPinnedView",""],[1,"group-card-count"],[1,"new-card-pinned"],[3,"cardIdsWithMetadata","cardObserver"],[1,"empty-message"]],template:function(e,i){if(1&e&&(h(0,"div",0),P(1,"mat-icon",1),h(2,"span",2)(3,"span",3),T(4,"Pinned"),g(),S(5,$Be,2,1,"span",4),S(6,eVe,2,1,"span",5),g()(),S(7,tVe,1,2,"metrics-card-grid",6),S(8,nVe,2,0,"ng-template",null,7,Wt)),2&e){let r=it(9);v(5),_("ngIf",i.cardIdsWithMetadata.length>1),v(1),_("ngForOf",i.newCardPinnedIds),v(1),_("ngIf",i.cardIdsWithMetadata.length)("ngIfElse",r)}},dependencies:[nn,Fe,En,p_],styles:["[_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#fff;border-bottom:1px solid #ebebeb;align-items:center;background-color:#fff;display:flex;flex:none;height:42px;margin-bottom:-1px;padding:0 16px;position:sticky;top:0;z-index:1;box-shadow:0px 2px 4px 0px rgba(0,0,0,.15)}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode   [_nghost-%COMP%]   .group-toolbar[_ngcontent-%COMP%]{box-shadow:0px 2px 4px 0px rgba(255,255,255,.15)}mat-icon[_ngcontent-%COMP%]{color:#616161;flex:none;margin-right:5px}body.dark-mode[_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-icon[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.group-text[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:6px}.group-title[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.group-card-count[_ngcontent-%COMP%]{font-size:12px;font-weight:400;color:#616161}body.dark-mode[_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-card-count[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.empty-message[_ngcontent-%COMP%]{color:#616161;font-size:13px;font-style:italic;padding:16px;text-align:center}body.dark-mode[_nghost-%COMP%]   .empty-message[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .empty-message[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.new-card-pinned[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_pinned-view-fade-out 3s linear;background:#f44336;border-radius:5px;color:#fff;display:inline-block;font-size:13px;opacity:0;padding:3px 5px}@keyframes _ngcontent-%COMP%_pinned-view-fade-out{from{opacity:1}66%{opacity:.99}to{opacity:0}}"],changeDetection:0}),n})(),une=(()=>{class n{constructor(e){this.store=e,this.cardIdsWithMetadata$=this.store.select(yv).pipe(qn([])),this.newCardPinnedIds$=this.store.select(yv).pipe(ia(1),N(i=>i.map(r=>r.cardId)),Fm(),N(([i,r])=>{let o=new Set(i),s=new Set(r);for(let a of s)if(!o.has(a))return Date.now();return null}),qn(null),Fm(),N(([i,r])=>null===i&&null===r?null:null===r?[i]:[r]),ke(i=>null!==i),N(i=>[i[0]]))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-pinned-view"]],inputs:{cardObserver:"cardObserver"},decls:3,vars:7,consts:[[3,"cardIdsWithMetadata","newCardPinnedIds","cardObserver"]],template:function(e,i){1&e&&(P(0,"metrics-pinned-view-component",0),j(1,"async"),j(2,"async")),2&e&&_("cardIdsWithMetadata",W(1,3,i.cardIdsWithMetadata$))("newCardPinnedIds",W(2,5,i.newCardPinnedIds$))("cardObserver",i.cardObserver)},dependencies:[dne,ct],encapsulation:2,changeDetection:0}),n})();function oVe(n,t){1&n&&P(0,"metrics-filtered-view",13),2&n&&_("cardObserver",w().cardObserver)}function sVe(n,t){1&n&&(h(0,"div",17),P(1,"mat-spinner",18),g())}var aVe=function(n){return{"slide-out-menu-expanded":n}};function lVe(n,t){if(1&n&&(h(0,"div",19),P(1,"metrics-scalar-column-editor"),g()),2&n){let e=w();_("ngClass",In(1,aVe,e.slideOutMenuOpen))}}function cVe(n,t){if(1&n){let e=ge();h(0,"div",20)(1,"div",21)(2,"h2",22),T(3,"Settings"),g(),h(4,"button",23),I("click",function(){return X(e),Q(w().onCloseSidepaneButtonClicked.emit())}),P(5,"mat-icon",24),g()(),P(6,"metrics-dashboard-right-pane"),g()}}var dVe=function(n){return{checked:n,"settings-button":!0}},uVe=new ie("Customizable Share Button"),pne=(()=>{class n{constructor(e,i){this.host=e,this.customShareButton=i,this.onSettingsButtonClicked=new F,this.onCloseSidepaneButtonClicked=new F,this.onPluginTypeToggled=new F,this.onPluginTypeAllToggled=new F,this.PluginType=zn,this.cardObserver=new xy(this.host.nativeElement,"600px 0px 600px 0px")}}return n.\u0275fac=function(e){return new(e||n)(C(Me),C(uVe,8))},n.\u0275cmp=O({type:n,selectors:[["metrics-main-view-component"]],inputs:{showFilteredView:"showFilteredView",isSidepaneOpen:"isSidepaneOpen",filteredPluginTypes:"filteredPluginTypes",initialTagsLoading:"initialTagsLoading",slideOutMenuOpen:"slideOutMenuOpen"},outputs:{onSettingsButtonClicked:"onSettingsButtonClicked",onCloseSidepaneButtonClicked:"onCloseSidepaneButtonClicked",onPluginTypeToggled:"onPluginTypeToggled",onPluginTypeAllToggled:"onPluginTypeAllToggled"},decls:24,vars:23,consts:function(){let t,e;return t=$localize`:Label on a toolbar button to toggle the settings side pane.␟d3516db6bbe6860a55beab66e4969dac625b8d72␟7659285445580838925:Toggle settings side pane`,e=$localize`:Label on a button to close the settings side pane.␟04521dc0b6a65cf5c382944c9a8b4b844a3e9598␟8156766997747165871:Close side pane`,[[1,"toolbar"],["multiple","","appearance","standard",1,"filter-view"],["mat-button","","role","checkbox","data-value","all",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","scalars",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","image",1,"filter-view-button",3,"click"],["mat-button","","role","checkbox","data-value","histogram",1,"filter-view-button",3,"click"],[3,"customizableComponent"],[1,"right-items"],["mat-stroked-button","","aria-label",t,3,"ngClass","click"],["svgIcon","settings_24px"],[1,"split-content"],["cdkScrollable",""],[3,"cardObserver",4,"ngIf"],[3,"cardObserver"],["class","loading-container",4,"ngIf"],["class","slide-out-menu",3,"ngClass",4,"ngIf"],["class","sidebar",4,"ngIf"],[1,"loading-container"],["diameter","36"],[1,"slide-out-menu",3,"ngClass"],[1,"sidebar"],[1,"header"],[1,"title"],["mat-icon-button","","aria-label",e,3,"click"],["svgIcon","close_24px"]]},template:function(e,i){1&e&&(h(0,"div",0),P(1,"metrics-tag-filter"),h(2,"mat-button-toggle-group",1)(3,"button",2),I("click",function(){return i.onPluginTypeAllToggled.emit()}),T(4," All "),g(),h(5,"button",3),I("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.SCALARS)}),T(6," Scalars "),g(),h(7,"button",4),I("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.IMAGES)}),T(8," Image "),g(),h(9,"button",5),I("click",function(){return i.onPluginTypeToggled.emit(i.PluginType.HISTOGRAMS)}),T(10," Histogram "),g()(),P(11,"tb-customization",6),h(12,"div",7)(13,"button",8),I("click",function(){return i.onSettingsButtonClicked.emit()}),P(14,"mat-icon",9),T(15," Settings "),g()()(),h(16,"div",10)(17,"div",11),S(18,oVe,1,1,"metrics-filtered-view",12),P(19,"metrics-pinned-view",13),S(20,sVe,2,0,"div",14),P(21,"metrics-card-groups",13),g(),S(22,lVe,2,3,"div",15),S(23,cVe,7,0,"div",16),g()),2&e&&(v(3),Be("aria-checked",0===i.filteredPluginTypes.size),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.SCALARS)),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.IMAGES)),v(2),Be("aria-checked",i.filteredPluginTypes.has(i.PluginType.HISTOGRAMS)),v(2),_("customizableComponent",i.customShareButton),v(2),_("ngClass",In(21,dVe,i.isSidepaneOpen)),Be("aria-pressed",i.isSidepaneOpen),v(4),nt("main",!0)("filter-view",i.showFilteredView),v(1),_("ngIf",i.showFilteredView),v(1),Tt("display",i.showFilteredView?"none":""),_("cardObserver",i.cardObserver),v(1),_("ngIf",i.initialTagsLoading),v(1),Tt("display",i.showFilteredView?"none":""),_("cardObserver",i.cardObserver),v(1),_("ngIf",i.isSidepaneOpen),v(1),_("ngIf",i.isSidepaneOpen))},dependencies:[yn,Fe,cQ,Cd,Ji,$i,RN,En,tl,bQ,CQ,ine,ane,cne,une],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}.toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;flex:none;display:flex;align-items:center;justify-content:space-between;height:48px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]{border-bottom:1px solid #555}.toolbar[_ngcontent-%COMP%]   metrics-tag-filter[_ngcontent-%COMP%]{flex:1 1 100px}.toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;margin-left:16px;padding-left:16px}body.dark-mode[_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .toolbar[_ngcontent-%COMP%]   .right-items[_ngcontent-%COMP%]{border-left:1px solid #555}mat-button-toggle-group.filter-view[_ngcontent-%COMP%]{border:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   mat-button-toggle-group.filter-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-button-toggle-group.filter-view[_ngcontent-%COMP%]{border:1px solid #555}.filter-view[_ngcontent-%COMP%]{border-radius:4px;flex:none;margin-right:5px}.filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{border-radius:0;font-size:12px;font-weight:normal;height:25px;line-height:25px;min-width:unset;padding:0 12px}.filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[_ngcontent-%COMP%] + button[_ngcontent-%COMP%]{border-left:1px solid #555}.filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%]{background-color:#e0e0e0}body.dark-mode[_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-view[_ngcontent-%COMP%]   button[aria-checked=true][_ngcontent-%COMP%]{background-color:#212121}.split-content[_ngcontent-%COMP%]{display:flex;overflow-y:auto;flex:1}.main[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%]{contain:strict;background-color:#fff;overflow-x:hidden;overflow-y:auto;will-change:transform,scroll-position}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]{background-color:#303030}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]{background-color:#303030}.main[_ngcontent-%COMP%]{background-color:#f5f6f7;flex:1 1;display:flex;flex-direction:column}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]{background-color:#3a3a3a}.main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%], .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .main[_ngcontent-%COMP%]   metrics-pinned-view[_ngcontent-%COMP%]{border-bottom:1px solid #555}.main.filter-view[_ngcontent-%COMP%]{overflow:hidden}.main.filter-view[_ngcontent-%COMP%]   metrics-filtered-view[_ngcontent-%COMP%]{contain:content;overflow:auto;will-change:transform,scroll-position}.loading-container[_ngcontent-%COMP%]{align-items:center;display:flex;justify-content:center;margin:20px 0}.sidebar[_ngcontent-%COMP%]{border-left:1px solid #ebebeb;flex:0 0 250px}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]{border-left:1px solid #555}.sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;align-items:center;justify-content:space-between;height:42px;padding:0 16px}body.dark-mode[_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{border-bottom:1px solid #555}.sidebar[_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   .title[_ngcontent-%COMP%]{font-size:18px;font-weight:400;line-height:normal;margin:0}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]{color:#616161;display:inline-flex}body.dark-mode   [_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}[_nghost-%COMP%]   .settings-button.checked[_ngcontent-%COMP%]{background-color:#e0e0e0;border-color:#e0e0e0}body.dark-mode   [_nghost-%COMP%]   .settings-button.checked[_ngcontent-%COMP%]{background-color:#212121}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]     .mat-button-wrapper{display:inline-flex;align-items:center}[_nghost-%COMP%]   .settings-button[_ngcontent-%COMP%]   mat-icon[_ngcontent-%COMP%]{margin-right:4px}.slide-out-menu[_ngcontent-%COMP%]{background-color:#fff;height:calc(100% - 49px);position:absolute;right:50px;top:49px;transition:all .75s ease;visibility:hidden;width:200px;border-left:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%]{border-left:1px solid #555}body.dark-mode[_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .slide-out-menu[_ngcontent-%COMP%]{background-color:#303030}.slide-out-menu-expanded[_ngcontent-%COMP%]{right:250px;visibility:visible}"],changeDetection:0}),n})(),fne=(()=>{class n{constructor(e){this.store=e,this.isSidepaneOpen$=this.store.select(a1),this.initialTagsLoading$=this.store.select(vv).pipe(A_(i=>null===i.lastLoadedTimeInMs,!0),N(i=>i.state===Te.LOADING&&null===i.lastLoadedTimeInMs)),this.showFilteredView$=this.store.select(kl).pipe(N(i=>i.length>0)),this.filteredPluginTypes$=this.store.select(Dc),this.isSlideoutMenuOpen$=this.store.select(l1)}onSettingsButtonClicked(){this.store.dispatch(oT())}onCloseSidepaneButtonClicked(){this.store.dispatch(rT())}onPluginVisibilityToggled(e){this.store.dispatch(OT({plugin:e}))}onShowAllPlugins(){this.store.dispatch(kT())}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-main-view"]],decls:6,vars:15,consts:[[3,"showFilteredView","isSidepaneOpen","initialTagsLoading","filteredPluginTypes","slideOutMenuOpen","onSettingsButtonClicked","onCloseSidepaneButtonClicked","onPluginTypeToggled","onPluginTypeAllToggled"]],template:function(e,i){1&e&&(h(0,"metrics-main-view-component",0),I("onSettingsButtonClicked",function(){return i.onSettingsButtonClicked()})("onCloseSidepaneButtonClicked",function(){return i.onCloseSidepaneButtonClicked()})("onPluginTypeToggled",function(o){return i.onPluginVisibilityToggled(o)})("onPluginTypeAllToggled",function(){return i.onShowAllPlugins()}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),g()),2&e&&_("showFilteredView",W(1,5,i.showFilteredView$))("isSidepaneOpen",W(2,7,i.isSidepaneOpen$))("initialTagsLoading",W(3,9,i.initialTagsLoading$))("filteredPluginTypes",W(4,11,i.filteredPluginTypes$))("slideOutMenuOpen",W(5,13,i.isSlideoutMenuOpen$))},dependencies:[pne,ct],encapsulation:2,changeDetection:0}),n})(),bs=(()=>(function(n){n.CHECKBOX="checkbox",n.RUN_NAME="run_name",n.EXPERIMENT_NAME="experiment_name",n.RUN_COLOR="run_color"}(bs||(bs={})),bs))(),Ep=(()=>(function(n){n[n.BEFORE=0]="BEFORE",n[n.AFTER=1]="AFTER"}(Ep||(Ep={})),Ep))(),mne=new Set(["string","number"]),mVe={insertUndefined:Ep.AFTER};function hne(n){if("number"==typeof n)return isNaN(n)?void 0:n;if(!isNaN(parseInt(n)))return parseInt(n);for(let t=0;t<n.length;t++)if(isNaN(parseInt(n[t])))return 0===t?void 0:parseInt(n.slice(0,t))}var hVe=["dialogPopup"],gVe=["hueSlider"],_Ve=["alphaSlider"];function bVe(n,t){if(1&n&&P(0,"div"),2&n){let e=w();mb("arrow arrow-",e.cpUsePosition,""),Tt("top",e.arrowTop,"px")}}function vVe(n,t){if(1&n){let e=ge();h(0,"div",28),I("newValue",function(r){return X(e),Q(w().onColorChange(r))})("dragStart",function(){return X(e),Q(w().onDragStart("saturation-lightness"))})("dragEnd",function(){return X(e),Q(w().onDragEnd("saturation-lightness"))}),P(1,"div",14),g()}if(2&n){let e=w();Tt("background-color",e.hueSliderColor),_("rgX",1)("rgY",1),v(1),Tt("top",null==e.slider?null:e.slider.v,"px")("left",null==e.slider?null:e.slider.s,"px")}}function yVe(n,t){1&n&&(Nn(),h(0,"svg",29),P(1,"path",30)(2,"path",31),g())}function xVe(n,t){if(1&n){let e=ge();h(0,"button",32),I("click",function(r){X(e);let o=w();return Q(o.onAddPresetColor(r,o.selectedColor))}),T(1),g()}if(2&n){let e=w();As(e.cpAddColorButtonClass),_("disabled",e.cpPresetColors&&e.cpPresetColors.length>=e.cpMaxPresetColorsLength),v(1),He(" ",e.cpAddColorButtonText," ")}}function CVe(n,t){1&n&&P(0,"div",33)}function MVe(n,t){if(1&n){let e=ge();h(0,"input",39),I("keyup.enter",function(r){return X(e),Q(w(2).onAcceptColor(r))})("newValue",function(r){return X(e),Q(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);_("rg",1)("value",null==e.cmykText?null:e.cmykText.a)}}function wVe(n,t){1&n&&(h(0,"div"),T(1,"A"),g())}function SVe(n,t){if(1&n){let e=ge();h(0,"div",34)(1,"div",35)(2,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onCyanInput(r))}),g(),h(3,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onMagentaInput(r))}),g(),h(4,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onYellowInput(r))}),g(),h(5,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onBlackInput(r))}),g(),S(6,MVe,1,2,"input",37),g(),h(7,"div",35)(8,"div"),T(9,"C"),g(),h(10,"div"),T(11,"M"),g(),h(12,"div"),T(13,"Y"),g(),h(14,"div"),T(15,"K"),g(),S(16,wVe,2,0,"div",38),g()()}if(2&n){let e=w();Tt("display",3!==e.format?"none":"block"),v(2),_("rg",100)("value",null==e.cmykText?null:e.cmykText.c),v(1),_("rg",100)("value",null==e.cmykText?null:e.cmykText.m),v(1),_("rg",100)("value",null==e.cmykText?null:e.cmykText.y),v(1),_("rg",100)("value",null==e.cmykText?null:e.cmykText.k),v(1),_("ngIf","disabled"!==e.cpAlphaChannel),v(10),_("ngIf","disabled"!==e.cpAlphaChannel)}}function EVe(n,t){if(1&n){let e=ge();h(0,"input",39),I("keyup.enter",function(r){return X(e),Q(w(2).onAcceptColor(r))})("newValue",function(r){return X(e),Q(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);_("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function TVe(n,t){1&n&&(h(0,"div"),T(1,"A"),g())}function DVe(n,t){if(1&n){let e=ge();h(0,"div",40)(1,"div",35)(2,"input",41),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onHueInput(r))}),g(),h(3,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onSaturationInput(r))}),g(),h(4,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onLightnessInput(r))}),g(),S(5,EVe,1,2,"input",37),g(),h(6,"div",35)(7,"div"),T(8,"H"),g(),h(9,"div"),T(10,"S"),g(),h(11,"div"),T(12,"L"),g(),S(13,TVe,2,0,"div",38),g()()}if(2&n){let e=w();Tt("display",2!==e.format?"none":"block"),v(2),_("rg",360)("value",null==e.hslaText?null:e.hslaText.h),v(1),_("rg",100)("value",null==e.hslaText?null:e.hslaText.s),v(1),_("rg",100)("value",null==e.hslaText?null:e.hslaText.l),v(1),_("ngIf","disabled"!==e.cpAlphaChannel),v(8),_("ngIf","disabled"!==e.cpAlphaChannel)}}function IVe(n,t){if(1&n){let e=ge();h(0,"input",39),I("keyup.enter",function(r){return X(e),Q(w(2).onAcceptColor(r))})("newValue",function(r){return X(e),Q(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);_("rg",1)("value",null==e.rgbaText?null:e.rgbaText.a)}}function AVe(n,t){1&n&&(h(0,"div"),T(1,"A"),g())}function RVe(n,t){if(1&n){let e=ge();h(0,"div",42)(1,"div",35)(2,"input",43),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onRedInput(r))}),g(),h(3,"input",43),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onGreenInput(r))}),g(),h(4,"input",43),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onBlueInput(r))}),g(),S(5,IVe,1,2,"input",37),g(),h(6,"div",35)(7,"div"),T(8,"R"),g(),h(9,"div"),T(10,"G"),g(),h(11,"div"),T(12,"B"),g(),S(13,AVe,2,0,"div",38),g()()}if(2&n){let e=w();Tt("display",1!==e.format?"none":"block"),v(2),_("rg",255)("value",null==e.rgbaText?null:e.rgbaText.r),v(1),_("rg",255)("value",null==e.rgbaText?null:e.rgbaText.g),v(1),_("rg",255)("value",null==e.rgbaText?null:e.rgbaText.b),v(1),_("ngIf","disabled"!==e.cpAlphaChannel),v(8),_("ngIf","disabled"!==e.cpAlphaChannel)}}function PVe(n,t){if(1&n){let e=ge();h(0,"input",39),I("keyup.enter",function(r){return X(e),Q(w(2).onAcceptColor(r))})("newValue",function(r){return X(e),Q(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);_("rg",1)("value",e.hexAlpha)}}function OVe(n,t){1&n&&(h(0,"div"),T(1,"A"),g())}function kVe(n,t){if(1&n){let e=ge();h(0,"div",44)(1,"div",35)(2,"input",45),I("blur",function(){return X(e),Q(w().onHexInput(null))})("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onHexInput(r))}),g(),S(3,PVe,1,2,"input",37),g(),h(4,"div",35)(5,"div"),T(6,"Hex"),g(),S(7,OVe,2,0,"div",38),g()()}if(2&n){let e=w();Tt("display",0!==e.format?"none":"block"),nt("hex-alpha","forced"===e.cpAlphaChannel),v(2),_("value",e.hexText),v(1),_("ngIf","forced"===e.cpAlphaChannel),v(4),_("ngIf","forced"===e.cpAlphaChannel)}}function FVe(n,t){if(1&n){let e=ge();h(0,"input",39),I("keyup.enter",function(r){return X(e),Q(w(2).onAcceptColor(r))})("newValue",function(r){return X(e),Q(w(2).onAlphaInput(r))}),g()}if(2&n){let e=w(2);_("rg",1)("value",null==e.hslaText?null:e.hslaText.a)}}function NVe(n,t){if(1&n){let e=ge();h(0,"div",46)(1,"div",35)(2,"input",36),I("keyup.enter",function(r){return X(e),Q(w().onAcceptColor(r))})("newValue",function(r){return X(e),Q(w().onValueInput(r))}),g(),S(3,FVe,1,2,"input",37),g(),h(4,"div",35)(5,"div"),T(6,"V"),g(),h(7,"div"),T(8,"A"),g()()()}if(2&n){let e=w();v(2),_("rg",100)("value",null==e.hslaText?null:e.hslaText.l),v(1),_("ngIf","disabled"!==e.cpAlphaChannel)}}function LVe(n,t){if(1&n){let e=ge();h(0,"div",47)(1,"span",48),I("click",function(){return X(e),Q(w().onFormatToggle(-1))}),g(),h(2,"span",48),I("click",function(){return X(e),Q(w().onFormatToggle(1))}),g()()}}function BVe(n,t){if(1&n){let e=ge();h(0,"span",55),I("click",function(r){X(e);let o=w().$implicit;return Q(w(3).onRemovePresetColor(r,o))}),g()}2&n&&As(w(4).cpRemoveColorButtonClass)}function VVe(n,t){if(1&n){let e=ge();h(0,"div",53),I("click",function(){let o=X(e).$implicit;return Q(w(3).setColorFromString(o))}),S(1,BVe,1,3,"span",54),g()}if(2&n){let e=t.$implicit,i=w(3);Tt("background-color",e),v(1),_("ngIf",i.cpAddColorButton)}}function HVe(n,t){if(1&n&&(h(0,"div"),S(1,VVe,2,3,"div",52),g()),2&n){let e=w(2);As(e.cpPresetColorsClass),v(1),_("ngForOf",e.cpPresetColors)}}function zVe(n,t){if(1&n&&(h(0,"div"),T(1),g()),2&n){let e=w(2);As(e.cpPresetEmptyMessageClass),v(1),bt(e.cpPresetEmptyMessage)}}function UVe(n,t){if(1&n&&(h(0,"div",49),P(1,"hr"),h(2,"div",50),T(3),g(),S(4,HVe,2,4,"div",51),S(5,zVe,2,4,"div",51),g()),2&n){let e=w();v(3),bt(e.cpPresetLabel),v(1),_("ngIf",null==e.cpPresetColors?null:e.cpPresetColors.length),v(1),_("ngIf",!(null!=e.cpPresetColors&&e.cpPresetColors.length)&&e.cpAddColorButton)}}function jVe(n,t){if(1&n){let e=ge();h(0,"button",58),I("click",function(r){return X(e),Q(w(2).onCancelColor(r))}),T(1),g()}if(2&n){let e=w(2);As(e.cpCancelButtonClass),v(1),bt(e.cpCancelButtonText)}}function GVe(n,t){if(1&n){let e=ge();h(0,"button",58),I("click",function(r){return X(e),Q(w(2).onAcceptColor(r))}),T(1),g()}if(2&n){let e=w(2);As(e.cpOKButtonClass),v(1),bt(e.cpOKButtonText)}}function WVe(n,t){if(1&n&&(h(0,"div",56),S(1,jVe,2,4,"button",57),S(2,GVe,2,4,"button",57),g()),2&n){let e=w();v(1),_("ngIf",e.cpCancelButton),v(1),_("ngIf",e.cpOKButton)}}function qVe(n,t){1&n&&li(0)}function YVe(n,t){if(1&n&&(h(0,"div",59),S(1,qVe,1,0,"ng-container",60),g()),2&n){let e=w();v(1),_("ngTemplateOutlet",e.cpExtraTemplate)}}var Ho=(()=>(function(n){n[n.HEX=0]="HEX",n[n.RGBA=1]="RGBA",n[n.HSLA=2]="HSLA",n[n.CMYK=3]="CMYK"}(Ho||(Ho={})),Ho))(),tc=class{constructor(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}},f_=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},Yd=class{constructor(t,e,i,r){this.h=t,this.s=e,this.l=i,this.a=r}},xm=class{constructor(t,e,i,r,o=1){this.c=t,this.m=e,this.y=i,this.k=r,this.a=o}},ZVe=(()=>{class n{constructor(){this.newValue=new F}inputChange(e){let i=e.target.value;if(void 0===this.rg)this.newValue.emit(i);else{let r=parseFloat(i);this.newValue.emit({v:r,rg:this.rg})}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275dir=we({type:n,selectors:[["","text",""]],hostBindings:function(e,i){1&e&&I("input",function(o){return i.inputChange(o)})},inputs:{rg:"rg",text:"text"},outputs:{newValue:"newValue"}}),n})(),KVe=(()=>{class n{constructor(e){this.elRef=e,this.dragEnd=new F,this.dragStart=new F,this.newValue=new F,this.listenerMove=i=>this.move(i),this.listenerStop=()=>this.stop()}mouseDown(e){this.start(e)}touchStart(e){this.start(e)}move(e){e.preventDefault(),this.setCursor(e)}start(e){this.setCursor(e),e.stopPropagation(),document.addEventListener("mouseup",this.listenerStop),document.addEventListener("touchend",this.listenerStop),document.addEventListener("mousemove",this.listenerMove),document.addEventListener("touchmove",this.listenerMove),this.dragStart.emit()}stop(){document.removeEventListener("mouseup",this.listenerStop),document.removeEventListener("touchend",this.listenerStop),document.removeEventListener("mousemove",this.listenerMove),document.removeEventListener("touchmove",this.listenerMove),this.dragEnd.emit()}getX(e){let i=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageX?e.pageX:e.touches[0].pageX)-i.left-window.pageXOffset}getY(e){let i=this.elRef.nativeElement.getBoundingClientRect();return(void 0!==e.pageY?e.pageY:e.touches[0].pageY)-i.top-window.pageYOffset}setCursor(e){let i=this.elRef.nativeElement.offsetWidth,r=this.elRef.nativeElement.offsetHeight,o=Math.max(0,Math.min(this.getX(e),i)),s=Math.max(0,Math.min(this.getY(e),r));void 0!==this.rgX&&void 0!==this.rgY?this.newValue.emit({s:o/i,v:1-s/r,rgX:this.rgX,rgY:this.rgY}):void 0===this.rgX&&void 0!==this.rgY?this.newValue.emit({v:s/r,rgY:this.rgY}):void 0!==this.rgX&&void 0===this.rgY&&this.newValue.emit({v:o/i,rgX:this.rgX})}}return n.\u0275fac=function(e){return new(e||n)(C(Me))},n.\u0275dir=we({type:n,selectors:[["","slider",""]],hostBindings:function(e,i){1&e&&I("mousedown",function(o){return i.mouseDown(o)})("touchstart",function(o){return i.touchStart(o)})},inputs:{rgX:"rgX",rgY:"rgY",slider:"slider"},outputs:{dragEnd:"dragEnd",dragStart:"dragStart",newValue:"newValue"}}),n})(),mA=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},hA=class{constructor(t,e,i,r){this.h=t,this.s=e,this.v=i,this.a=r}},EV=(()=>{class n{constructor(){this.active=null}setActive(e){this.active&&this.active!==e&&"inline"!==this.active.cpDialogDisplay&&this.active.closeDialog(),this.active=e}hsva2hsla(e){let i=e.h,r=e.s,o=e.v,s=e.a;if(0===o)return new Yd(i,0,0,s);if(0===r&&1===o)return new Yd(i,1,1,s);{let a=o*(2-r)/2;return new Yd(i,o*r/(1-Math.abs(2*a-1)),a,s)}}hsla2hsva(e){let i=Math.min(e.h,1),r=Math.min(e.s,1),o=Math.min(e.l,1),s=Math.min(e.a,1);if(0===o)return new f_(i,0,0,s);{let a=o+r*(1-Math.abs(2*o-1))/2;return new f_(i,2*(a-o)/a,a,s)}}hsvaToRgba(e){let i,r,o,s=e.h,a=e.s,l=e.v,c=e.a,d=Math.floor(6*s),u=6*s-d,p=l*(1-a),f=l*(1-u*a),m=l*(1-(1-u)*a);switch(d%6){case 0:i=l,r=m,o=p;break;case 1:i=f,r=l,o=p;break;case 2:i=p,r=l,o=m;break;case 3:i=p,r=f,o=l;break;case 4:i=m,r=p,o=l;break;case 5:i=l,r=p,o=f;break;default:i=0,r=0,o=0}return new tc(i,r,o,c)}cmykToRgb(e){return new tc((1-e.c)*(1-e.k),(1-e.m)*(1-e.k),(1-e.y)*(1-e.k),e.a)}rgbaToCmyk(e){let i=1-Math.max(e.r,e.g,e.b);return 1===i?new xm(0,0,0,1,e.a):new xm((1-e.r-i)/(1-i),(1-e.g-i)/(1-i),(1-e.b-i)/(1-i),i,e.a)}rgbaToHsva(e){let i,r,o=Math.min(e.r,1),s=Math.min(e.g,1),a=Math.min(e.b,1),l=Math.min(e.a,1),c=Math.max(o,s,a),d=Math.min(o,s,a),u=c,p=c-d;if(r=0===c?0:p/c,c===d)i=0;else{switch(c){case o:i=(s-a)/p+(s<a?6:0);break;case s:i=(a-o)/p+2;break;case a:i=(o-s)/p+4;break;default:i=0}i/=6}return new f_(i,r,u,l)}rgbaToHex(e,i){let r="#"+(16777216|e.r<<16|e.g<<8|e.b).toString(16).substr(1);return i&&(r+=(256|Math.round(255*e.a)).toString(16).substr(1)),r}normalizeCMYK(e){return new xm(e.c/100,e.m/100,e.y/100,e.k/100,e.a)}denormalizeCMYK(e){return new xm(Math.floor(100*e.c),Math.floor(100*e.m),Math.floor(100*e.y),Math.floor(100*e.k),e.a)}denormalizeRGBA(e){return new tc(Math.round(255*e.r),Math.round(255*e.g),Math.round(255*e.b),e.a)}stringToHsva(e="",i=!1){let r=null;e=(e||"").toLowerCase();let o=[{re:/(rgb)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*%?,\s*(\d{1,3})\s*%?(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(s){return new tc(parseInt(s[2],10)/255,parseInt(s[3],10)/255,parseInt(s[4],10)/255,isNaN(parseFloat(s[5]))?1:parseFloat(s[5]))}},{re:/(hsl)a?\(\s*(\d{1,3})\s*,\s*(\d{1,3})%\s*,\s*(\d{1,3})%\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)/,parse:function(s){return new Yd(parseInt(s[2],10)/360,parseInt(s[3],10)/100,parseInt(s[4],10)/100,isNaN(parseFloat(s[5]))?1:parseFloat(s[5]))}}];o.push(i?{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})?$/,parse:function(s){return new tc(parseInt(s[1],16)/255,parseInt(s[2],16)/255,parseInt(s[3],16)/255,parseInt(s[4]||"FF",16)/255)}}:{re:/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/,parse:function(s){return new tc(parseInt(s[1],16)/255,parseInt(s[2],16)/255,parseInt(s[3],16)/255,1)}}),o.push({re:/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/,parse:function(s){return new tc(parseInt(s[1]+s[1],16)/255,parseInt(s[2]+s[2],16)/255,parseInt(s[3]+s[3],16)/255,1)}});for(let s in o)if(o.hasOwnProperty(s)){let a=o[s],l=a.re.exec(e),c=l&&a.parse(l);if(c)return c instanceof tc?r=this.rgbaToHsva(c):c instanceof Yd&&(r=this.hsla2hsva(c)),r}return r}outputFormat(e,i,r){switch("auto"===i&&(i=e.a<1?"rgba":"hex"),i){case"hsla":let o=this.hsva2hsla(e),s=new Yd(Math.round(360*o.h),Math.round(100*o.s),Math.round(100*o.l),Math.round(100*o.a)/100);return e.a<1||"always"===r?"hsla("+s.h+","+s.s+"%,"+s.l+"%,"+s.a+")":"hsl("+s.h+","+s.s+"%,"+s.l+"%)";case"rgba":let a=this.denormalizeRGBA(this.hsvaToRgba(e));return e.a<1||"always"===r?"rgba("+a.r+","+a.g+","+a.b+","+Math.round(100*a.a)/100+")":"rgb("+a.r+","+a.g+","+a.b+")";default:let l="always"===r||"forced"===r;return this.rgbaToHex(this.denormalizeRGBA(this.hsvaToRgba(e)),l)}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),_ne=typeof window<"u"&&"ontouchstart"in window,JVe=(()=>{class n{constructor(e,i,r,o,s,a){this.ngZone=e,this.elRef=i,this.cdRef=r,this.document=o,this.platformId=s,this.service=a,this.isIE10=!1,this.dialogArrowSize=10,this.dialogArrowOffset=15,this.dialogInputFields=[Ho.HEX,Ho.RGBA,Ho.HSLA,Ho.CMYK],this.useRootViewContainer=!1,this.eyeDropperSupported=gw(this.platformId)&&"EyeDropper"in this.document.defaultView}handleEsc(e){this.show&&"popup"===this.cpDialogDisplay&&this.onCancelColor(e)}handleEnter(e){this.show&&"popup"===this.cpDialogDisplay&&this.onAcceptColor(e)}ngOnInit(){this.slider=new mA(0,0,0,0),this.sliderDimMax=new hA(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.format=this.cpCmykEnabled?Ho.CMYK:"rgba"===this.cpOutputFormat?Ho.RGBA:"hsla"===this.cpOutputFormat?Ho.HSLA:Ho.HEX,this.listenerMouseDown=r=>{this.onMouseDown(r)},this.listenerResize=()=>{this.onResize()},this.openDialog(this.initialColor,!1)}ngOnDestroy(){this.closeDialog()}ngAfterViewInit(){230===this.cpWidth&&"inline"!==this.cpDialogDisplay||(this.sliderDimMax=new hA(this.hueSlider.nativeElement.offsetWidth||140,this.cpWidth,130,this.alphaSlider.nativeElement.offsetWidth||140),this.updateColorPicker(!1),this.cdRef.detectChanges())}openDialog(e,i=!0){this.service.setActive(this),this.width||(this.cpWidth=this.directiveElementRef.nativeElement.offsetWidth),this.height||(this.height=320),this.setInitialColor(e),this.setColorFromString(e,i),this.openColorPicker()}closeDialog(){this.closeColorPicker()}setupDialog(e,i,r,o,s,a,l,c,d,u,p,f,m,b,M,y,x,R,A,V,te,K,xe,Xe,De,D,re,ce,fe,be,ne,de,pe,je,Ce,Ne,lt,Mt){this.setInitialColor(r),this.setColorMode(c),this.isIE10=10===function(){let n="";typeof navigator<"u"&&(n=navigator.userAgent.toLowerCase());let t=n.indexOf("msie ");return t>0&&parseInt(n.substring(t+5,n.indexOf(".",t)),10)}(),this.directiveInstance=e,this.directiveElementRef=i,this.cpDisableInput=f,this.cpCmykEnabled=d,this.cpAlphaChannel=u,this.cpOutputFormat=p,this.cpDialogDisplay=a,this.cpIgnoredElements=m,this.cpSaveClickOutside=b,this.cpCloseClickOutside=M,this.useRootViewContainer=y,this.width=this.cpWidth=parseInt(o,10),this.height=this.cpHeight=parseInt(s,10),this.cpPosition=x,this.cpPositionOffset=parseInt(R,10),this.cpOKButton=D,this.cpOKButtonText=ce,this.cpOKButtonClass=re,this.cpCancelButton=fe,this.cpCancelButtonText=ne,this.cpCancelButtonClass=be,this.cpEyeDropper=Ne,this.fallbackColor=l||"#fff",this.setPresetConfig(V,te),this.cpPresetColorsClass=K,this.cpMaxPresetColorsLength=xe,this.cpPresetEmptyMessage=Xe,this.cpPresetEmptyMessageClass=De,this.cpAddColorButton=de,this.cpAddColorButtonText=je,this.cpAddColorButtonClass=pe,this.cpRemoveColorButtonClass=Ce,this.cpTriggerElement=lt,this.cpExtraTemplate=Mt,A||(this.dialogArrowOffset=0),"inline"===a&&(this.dialogArrowSize=0,this.dialogArrowOffset=0),"hex"===p&&"always"!==u&&"forced"!==u&&(this.cpAlphaChannel="disabled")}setColorMode(e){switch(e.toString().toUpperCase()){case"1":case"C":case"COLOR":default:this.cpColorMode=1;break;case"2":case"G":case"GRAYSCALE":this.cpColorMode=2;break;case"3":case"P":case"PRESETS":this.cpColorMode=3}}setInitialColor(e){this.initialColor=e}setPresetConfig(e,i){this.cpPresetLabel=e,this.cpPresetColors=i}setColorFromString(e,i=!0,r=!0){let o;"always"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel?(o=this.service.stringToHsva(e,!0),!o&&!this.hsva&&(o=this.service.stringToHsva(e,!1))):o=this.service.stringToHsva(e,!1),!o&&!this.hsva&&(o=this.service.stringToHsva(this.fallbackColor,!1)),o&&(this.hsva=o,this.sliderH=this.hsva.h,"hex"===this.cpOutputFormat&&"disabled"===this.cpAlphaChannel&&(this.hsva.a=1),this.updateColorPicker(i,r))}onResize(){"fixed"===this.position?this.setDialogPosition():"inline"!==this.cpDialogDisplay&&this.closeColorPicker()}onDragEnd(e){this.directiveInstance.sliderDragEnd({slider:e,color:this.outputColor})}onDragStart(e){this.directiveInstance.sliderDragStart({slider:e,color:this.outputColor})}onMouseDown(e){this.show&&!this.isIE10&&"popup"===this.cpDialogDisplay&&e.target!==this.directiveElementRef.nativeElement&&!this.isDescendant(this.elRef.nativeElement,e.target)&&!this.isDescendant(this.directiveElementRef.nativeElement,e.target)&&0===this.cpIgnoredElements.filter(i=>i===e.target).length&&this.ngZone.run(()=>{this.cpSaveClickOutside?this.directiveInstance.colorSelected(this.outputColor):(this.hsva=null,this.setColorFromString(this.initialColor,!1),this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor),this.directiveInstance.colorCanceled()),this.cpCloseClickOutside&&this.closeColorPicker()})}onAcceptColor(e){e.stopPropagation(),this.outputColor&&this.directiveInstance.colorSelected(this.outputColor),"popup"===this.cpDialogDisplay&&this.closeColorPicker()}onCancelColor(e){this.hsva=null,e.stopPropagation(),this.directiveInstance.colorCanceled(),this.setColorFromString(this.initialColor,!0),"popup"===this.cpDialogDisplay&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.initialColor,!0),this.closeColorPicker())}onEyeDropper(){this.eyeDropperSupported&&(new window.EyeDropper).open().then(i=>{this.setColorFromString(i.sRGBHex,!0)})}onFormatToggle(e){let i=this.dialogInputFields.length-(this.cpCmykEnabled?0:1),r=((this.dialogInputFields.indexOf(this.format)+e)%i+i)%i;this.format=this.dialogInputFields[r]}onColorChange(e){this.hsva.s=e.s/e.rgX,this.hsva.v=e.v/e.rgY,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"lightness",value:this.hsva.v,color:this.outputColor}),this.directiveInstance.sliderChanged({slider:"saturation",value:this.hsva.s,color:this.outputColor})}onHueChange(e){this.hsva.h=e.v/e.rgX,this.sliderH=this.hsva.h,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"hue",value:this.hsva.h,color:this.outputColor})}onValueChange(e){this.hsva.v=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"value",value:this.hsva.v,color:this.outputColor})}onAlphaChange(e){this.hsva.a=e.v/e.rgX,this.updateColorPicker(),this.directiveInstance.sliderChanged({slider:"alpha",value:this.hsva.a,color:this.outputColor})}onHexInput(e){if(null===e)this.updateColorPicker();else{e&&"#"!==e[0]&&(e="#"+e);let i=/^#([a-f0-9]{3}|[a-f0-9]{6})$/gi;"always"===this.cpAlphaChannel&&(i=/^#([a-f0-9]{3}|[a-f0-9]{6}|[a-f0-9]{8})$/gi);let r=i.test(e);r&&(e.length<5&&(e="#"+e.substring(1).split("").map(o=>o+o).join("")),"forced"===this.cpAlphaChannel&&(e+=Math.round(255*this.hsva.a).toString(16)),this.setColorFromString(e,!0,!1)),this.directiveInstance.inputChanged({input:"hex",valid:r,value:e,color:this.outputColor})}}onRedInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.r=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"red",valid:r,value:i.r,color:this.outputColor})}onBlueInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.b=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"blue",valid:r,value:i.b,color:this.outputColor})}onGreenInput(e){let i=this.service.hsvaToRgba(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.g=e.v/e.rg,this.hsva=this.service.rgbaToHsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"green",valid:r,value:i.g,color:this.outputColor})}onHueInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.h=e.v/e.rg,this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"hue",valid:i,value:this.hsva.h,color:this.outputColor})}onValueInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.v=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"value",valid:i,value:this.hsva.v,color:this.outputColor})}onAlphaInput(e){let i=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;i&&(this.hsva.a=e.v/e.rg,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"alpha",valid:i,value:this.hsva.a,color:this.outputColor})}onLightnessInput(e){let i=this.service.hsva2hsla(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.l=e.v/e.rg,this.hsva=this.service.hsla2hsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"lightness",valid:r,value:i.l,color:this.outputColor})}onSaturationInput(e){let i=this.service.hsva2hsla(this.hsva),r=!isNaN(e.v)&&e.v>=0&&e.v<=e.rg;r&&(i.s=e.v/e.rg,this.hsva=this.service.hsla2hsva(i),this.sliderH=this.hsva.h,this.updateColorPicker()),this.directiveInstance.inputChanged({input:"saturation",valid:r,value:i.s,color:this.outputColor})}onCyanInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.c=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"cyan",valid:!0,value:this.cmyk.c,color:this.outputColor})}onMagentaInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.m=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"magenta",valid:!0,value:this.cmyk.m,color:this.outputColor})}onYellowInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.y=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"yellow",valid:!0,value:this.cmyk.y,color:this.outputColor})}onBlackInput(e){!isNaN(e.v)&&e.v>=0&&e.v<=e.rg&&(this.cmyk.k=e.v,this.updateColorPicker(!1,!0,!0)),this.directiveInstance.inputChanged({input:"black",valid:!0,value:this.cmyk.k,color:this.outputColor})}onAddPresetColor(e,i){e.stopPropagation(),this.cpPresetColors.filter(r=>r===i).length||(this.cpPresetColors=this.cpPresetColors.concat(i),this.directiveInstance.presetColorsChanged(this.cpPresetColors))}onRemovePresetColor(e,i){e.stopPropagation(),this.cpPresetColors=this.cpPresetColors.filter(r=>r!==i),this.directiveInstance.presetColorsChanged(this.cpPresetColors)}openColorPicker(){this.show||(this.show=!0,this.hidden=!0,setTimeout(()=>{this.hidden=!1,this.setDialogPosition(),this.cdRef.detectChanges()},0),this.directiveInstance.stateChanged(!0),this.isIE10||this.ngZone.runOutsideAngular(()=>{_ne?document.addEventListener("touchstart",this.listenerMouseDown):document.addEventListener("mousedown",this.listenerMouseDown)}),window.addEventListener("resize",this.listenerResize))}closeColorPicker(){this.show&&(this.show=!1,this.directiveInstance.stateChanged(!1),this.isIE10||(_ne?document.removeEventListener("touchstart",this.listenerMouseDown):document.removeEventListener("mousedown",this.listenerMouseDown)),window.removeEventListener("resize",this.listenerResize),this.cdRef.destroyed||this.cdRef.detectChanges())}updateColorPicker(e=!0,i=!0,r=!1){if(this.sliderDimMax){2===this.cpColorMode&&(this.hsva.s=0);let o,s,a,l=this.outputColor;if(s=this.service.hsva2hsla(this.hsva),this.cpCmykEnabled?(r?(a=this.service.cmykToRgb(this.service.normalizeCMYK(this.cmyk)),this.hsva=this.service.rgbaToHsva(a)):(a=this.service.hsvaToRgba(this.hsva),this.cmyk=this.service.denormalizeCMYK(this.service.rgbaToCmyk(a))),a=this.service.denormalizeRGBA(a),this.sliderH=this.hsva.h):a=this.service.denormalizeRGBA(this.service.hsvaToRgba(this.hsva)),o=this.service.denormalizeRGBA(this.service.hsvaToRgba(new f_(this.sliderH||this.hsva.h,1,1,1))),i&&(this.hslaText=new Yd(Math.round(360*s.h),Math.round(100*s.s),Math.round(100*s.l),Math.round(100*s.a)/100),this.rgbaText=new tc(a.r,a.g,a.b,Math.round(100*a.a)/100),this.cpCmykEnabled&&(this.cmykText=new xm(this.cmyk.c,this.cmyk.m,this.cmyk.y,this.cmyk.k,Math.round(100*this.cmyk.a)/100)),this.hexText=this.service.rgbaToHex(a,"always"===this.cpAlphaChannel),this.hexAlpha=this.rgbaText.a),"auto"===this.cpOutputFormat&&this.format!==Ho.RGBA&&this.format!==Ho.CMYK&&this.format!==Ho.HSLA&&this.hsva.a<1&&(this.format=this.hsva.a<1?Ho.RGBA:Ho.HEX),this.hueSliderColor="rgb("+o.r+","+o.g+","+o.b+")",this.alphaSliderColor="rgb("+a.r+","+a.g+","+a.b+")",this.outputColor=this.service.outputFormat(this.hsva,this.cpOutputFormat,this.cpAlphaChannel),this.selectedColor=this.service.outputFormat(this.hsva,"rgba",null),this.format!==Ho.CMYK)this.cmykColor="";else if("always"===this.cpAlphaChannel||"enabled"===this.cpAlphaChannel||"forced"===this.cpAlphaChannel){let c=Math.round(100*this.cmyk.a)/100;this.cmykColor=`cmyka(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k},${c})`}else this.cmykColor=`cmyk(${this.cmyk.c},${this.cmyk.m},${this.cmyk.y},${this.cmyk.k})`;this.slider=new mA((this.sliderH||this.hsva.h)*this.sliderDimMax.h-8,this.hsva.s*this.sliderDimMax.s-8,(1-this.hsva.v)*this.sliderDimMax.v-8,this.hsva.a*this.sliderDimMax.a-8),e&&l!==this.outputColor&&(this.cpCmykEnabled&&this.directiveInstance.cmykChanged(this.cmykColor),this.directiveInstance.colorChanged(this.outputColor))}}setDialogPosition(){if("inline"===this.cpDialogDisplay)this.position="relative";else{let r,e="static",i="",o=null,s=null,a=this.directiveElementRef.nativeElement.parentNode,l=this.dialogElement.nativeElement.offsetHeight;for(;null!==a&&"HTML"!==a.tagName;){if(r=window.getComputedStyle(a),e=r.getPropertyValue("position"),i=r.getPropertyValue("transform"),"static"!==e&&null===o&&(o=a),i&&"none"!==i&&null===s&&(s=a),"fixed"===e){o=s;break}a=a.parentNode}let c=this.createDialogBox(this.directiveElementRef.nativeElement,"fixed"!==e);if(this.useRootViewContainer||"fixed"===e&&(!o||o instanceof HTMLUnknownElement))this.top=c.top,this.left=c.left;else{null===o&&(o=a);let u=this.createDialogBox(o,"fixed"!==e);this.top=c.top-u.top,this.left=c.left-u.left}"fixed"===e&&(this.position="fixed");let d=this.cpPosition;"auto"===this.cpPosition&&(d=function(n,t){let e="right",i="bottom",{height:r,width:o}=n,{top:s,left:a}=t,l=s+t.height,c=a+t.width,d=s-r<0,u=l+r>(window.innerHeight||document.documentElement.clientHeight),p=a-o<0,f=c+o>(window.innerWidth||document.documentElement.clientWidth);return u&&(i="top"),d&&(i="bottom"),p&&(e="right"),f&&(e="left"),d&&u&&p&&f?["left","right","top","bottom"].reduce((M,y)=>n[M]>n[y]?M:y):p&&f?d?"bottom":u||s>l?"top":"bottom":d&&u?p?"right":f||a>c?"left":"right":`${i}-${e}`}(this.dialogElement.nativeElement.getBoundingClientRect(),this.cpTriggerElement.nativeElement.getBoundingClientRect())),"top"===d?(this.arrowTop=l-1,this.top-=l+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"bottom"===d?(this.top+=c.height+this.dialogArrowSize,this.left+=this.cpPositionOffset/100*c.width-this.dialogArrowOffset):"top-left"===d||"left-top"===d?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left-=this.cpWidth+this.dialogArrowSize-2-this.dialogArrowOffset):"top-right"===d||"right-top"===d?(this.top-=l-c.height+c.height*this.cpPositionOffset/100,this.left+=c.width+this.dialogArrowSize-2-this.dialogArrowOffset):"left"===d||"bottom-left"===d||"left-bottom"===d?(this.top+=c.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left-=this.cpWidth+this.dialogArrowSize-2):(this.top+=c.height*this.cpPositionOffset/100-this.dialogArrowOffset,this.left+=c.width+this.dialogArrowSize-2),this.cpUsePosition=d}}isDescendant(e,i){let r=i.parentNode;for(;null!==r;){if(r===e)return!0;r=r.parentNode}return!1}createDialogBox(e,i){let{top:r,left:o}=e.getBoundingClientRect();return{top:r+(i?window.pageYOffset:0),left:o+(i?window.pageXOffset:0),width:e.offsetWidth,height:e.offsetHeight}}}return n.\u0275fac=function(e){return new(e||n)(C(at),C(Me),C($t),C(Lt),C(vc),C(EV))},n.\u0275cmp=O({type:n,selectors:[["color-picker"]],viewQuery:function(e,i){if(1&e&&(Ge(hVe,7),Ge(gVe,7),Ge(_Ve,7)),2&e){let r;Se(r=Ee())&&(i.dialogElement=r.first),Se(r=Ee())&&(i.hueSlider=r.first),Se(r=Ee())&&(i.alphaSlider=r.first)}},hostBindings:function(e,i){1&e&&I("keyup.esc",function(o){return i.handleEsc(o)},0,hc)("keyup.enter",function(o){return i.handleEnter(o)},!1,hc)},decls:30,vars:51,consts:[[1,"color-picker",3,"click"],["dialogPopup",""],[3,"class","top",4,"ngIf"],["class","saturation-lightness",3,"slider","rgX","rgY","background-color","newValue","dragStart","dragEnd",4,"ngIf"],[1,"hue-alpha","box"],[1,"left"],[1,"selected-color-background"],[1,"selected-color",3,"click"],["class","eyedropper-icon","xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000000",4,"ngIf"],["type","button",3,"class","disabled","click",4,"ngIf"],[1,"right"],["style","height: 16px;",4,"ngIf"],[1,"hue",3,"slider","rgX","newValue","dragStart","dragEnd"],["hueSlider",""],[1,"cursor"],[1,"value",3,"slider","rgX","newValue","dragStart","dragEnd"],["valueSlider",""],[1,"alpha",3,"slider","rgX","newValue","dragStart","dragEnd"],["alphaSlider",""],["class","cmyk-text",3,"display",4,"ngIf"],["class","hsla-text",3,"display",4,"ngIf"],["class","rgba-text",3,"display",4,"ngIf"],["class","hex-text",3,"hex-alpha","display",4,"ngIf"],["class","value-text",4,"ngIf"],["class","type-policy",4,"ngIf"],["class","preset-area",4,"ngIf"],["class","button-area",4,"ngIf"],["class","extra-template",4,"ngIf"],[1,"saturation-lightness",3,"slider","rgX","rgY","newValue","dragStart","dragEnd"],["xmlns","http://www.w3.org/2000/svg","height","24px","viewBox","0 0 24 24","width","24px","fill","#000000",1,"eyedropper-icon"],["d","M0 0h24v24H0V0z","fill","none"],["d","M17.66 5.41l.92.92-2.69 2.69-.92-.92 2.69-2.69M17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29zM6.92 19L5 17.08l8.06-8.06 1.92 1.92L6.92 19z"],["type","button",3,"disabled","click"],[2,"height","16px"],[1,"cmyk-text"],[1,"box"],["type","number","pattern","[0-9]*","min","0","max","100",3,"text","rg","value","keyup.enter","newValue"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue",4,"ngIf"],[4,"ngIf"],["type","number","pattern","[0-9]+([\\.,][0-9]{1,2})?","min","0","max","1","step","0.1",3,"text","rg","value","keyup.enter","newValue"],[1,"hsla-text"],["type","number","pattern","[0-9]*","min","0","max","360",3,"text","rg","value","keyup.enter","newValue"],[1,"rgba-text"],["type","number","pattern","[0-9]*","min","0","max","255",3,"text","rg","value","keyup.enter","newValue"],[1,"hex-text"],[3,"text","value","blur","keyup.enter","newValue"],[1,"value-text"],[1,"type-policy"],[1,"type-policy-arrow",3,"click"],[1,"preset-area"],[1,"preset-label"],[3,"class",4,"ngIf"],["class","preset-color",3,"backgroundColor","click",4,"ngFor","ngForOf"],[1,"preset-color",3,"click"],[3,"class","click",4,"ngIf"],[3,"click"],[1,"button-area"],["type","button",3,"class","click",4,"ngIf"],["type","button",3,"click"],[1,"extra-template"],[4,"ngTemplateOutlet"]],template:function(e,i){1&e&&(h(0,"div",0,1),I("click",function(o){return o.stopPropagation()}),S(2,bVe,1,5,"div",2),S(3,vVe,2,8,"div",3),h(4,"div",4)(5,"div",5),P(6,"div",6),h(7,"div",7),I("click",function(){return i.eyeDropperSupported&&i.cpEyeDropper&&i.onEyeDropper()}),S(8,yVe,3,0,"svg",8),g(),S(9,xVe,2,5,"button",9),g(),h(10,"div",10),S(11,CVe,1,0,"div",11),h(12,"div",12,13),I("newValue",function(o){return i.onHueChange(o)})("dragStart",function(){return i.onDragStart("hue")})("dragEnd",function(){return i.onDragEnd("hue")}),P(14,"div",14),g(),h(15,"div",15,16),I("newValue",function(o){return i.onValueChange(o)})("dragStart",function(){return i.onDragStart("value")})("dragEnd",function(){return i.onDragEnd("value")}),P(17,"div",14),g(),h(18,"div",17,18),I("newValue",function(o){return i.onAlphaChange(o)})("dragStart",function(){return i.onDragStart("alpha")})("dragEnd",function(){return i.onDragEnd("alpha")}),P(20,"div",14),g()()(),S(21,SVe,17,12,"div",19),S(22,DVe,14,10,"div",20),S(23,RVe,14,10,"div",21),S(24,kVe,8,7,"div",22),S(25,NVe,9,3,"div",23),S(26,LVe,3,0,"div",24),S(27,UVe,6,3,"div",25),S(28,WVe,3,2,"div",26),S(29,YVe,2,1,"div",27),g()),2&e&&(Tt("display",i.show?"block":"none")("visibility",i.hidden?"hidden":"visible")("top",i.top,"px")("left",i.left,"px")("position",i.position)("height",i.cpHeight,"px")("width",i.cpWidth,"px"),nt("open",i.show),v(2),_("ngIf","popup"===i.cpDialogDisplay),v(1),_("ngIf",1===(i.cpColorMode||1)),v(4),Tt("background-color",i.selectedColor)("cursor",i.eyeDropperSupported&&i.cpEyeDropper?"pointer":null),v(1),_("ngIf",i.eyeDropperSupported&&i.cpEyeDropper),v(1),_("ngIf",i.cpAddColorButton),v(2),_("ngIf","disabled"===i.cpAlphaChannel),v(1),Tt("display",1===(i.cpColorMode||1)?"block":"none"),_("rgX",1),v(2),Tt("left",null==i.slider?null:i.slider.h,"px"),v(1),Tt("display",2===(i.cpColorMode||1)?"block":"none"),_("rgX",1),v(2),Tt("right",null==i.slider?null:i.slider.v,"px"),v(1),Tt("display","disabled"===i.cpAlphaChannel?"none":"block")("background-color",i.alphaSliderColor),_("rgX",1),v(2),Tt("left",null==i.slider?null:i.slider.a,"px"),v(1),_("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),_("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),_("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),_("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),_("ngIf",!i.cpDisableInput&&2===(i.cpColorMode||1)),v(1),_("ngIf",!i.cpDisableInput&&1===(i.cpColorMode||1)),v(1),_("ngIf",(null==i.cpPresetColors?null:i.cpPresetColors.length)||i.cpAddColorButton),v(1),_("ngIf",i.cpOKButton||i.cpCancelButton),v(1),_("ngIf",i.cpExtraTemplate))},dependencies:[nn,Fe,Lr,ZVe,KVe],styles:['.color-picker{position:absolute;z-index:1000;width:230px;height:auto;border:#777 solid 1px;cursor:default;-webkit-user-select:none;user-select:none;background-color:#fff}.color-picker *{box-sizing:border-box;margin:0;font-size:11px}.color-picker input{width:0;height:26px;min-width:0;font-size:13px;text-align:center;color:#000}.color-picker input:invalid,.color-picker input:-moz-ui-invalid,.color-picker input:-moz-submit-invalid{box-shadow:none}.color-picker input::-webkit-inner-spin-button,.color-picker input::-webkit-outer-spin-button{margin:0;-webkit-appearance:none}.color-picker .arrow{position:absolute;z-index:999999;width:0;height:0;border-style:solid}.color-picker .arrow.arrow-top{left:8px;border-width:10px 5px;border-color:#777 rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-bottom{top:-20px;left:8px;border-width:10px 5px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) #777 rgba(0,0,0,0)}.color-picker .arrow.arrow-top-left,.color-picker .arrow.arrow-left-top{right:-21px;bottom:8px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-top-right,.color-picker .arrow.arrow-right-top{bottom:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .arrow.arrow-left,.color-picker .arrow.arrow-left-bottom,.color-picker .arrow.arrow-bottom-left{top:8px;right:-21px;border-width:5px 10px;border-color:rgba(0,0,0,0) rgba(0,0,0,0) rgba(0,0,0,0) #777}.color-picker .arrow.arrow-right,.color-picker .arrow.arrow-right-bottom,.color-picker .arrow.arrow-bottom-right{top:8px;left:-20px;border-width:5px 10px;border-color:rgba(0,0,0,0) #777 rgba(0,0,0,0) rgba(0,0,0,0)}.color-picker .cursor{position:relative;width:16px;height:16px;border:#222 solid 2px;border-radius:50%;cursor:default}.color-picker .box{display:flex;padding:4px 8px}.color-picker .left{position:relative;padding:16px 8px}.color-picker .right{flex:1 1 auto;padding:12px 8px}.color-picker .button-area{padding:0 16px 16px;text-align:right}.color-picker .button-area button{margin-left:8px}.color-picker .preset-area{padding:4px 15px}.color-picker .preset-area .preset-label{overflow:hidden;width:100%;padding:4px;font-size:11px;white-space:nowrap;text-align:left;text-overflow:ellipsis;color:#555}.color-picker .preset-area .preset-color{position:relative;display:inline-block;width:18px;height:18px;margin:4px 6px 8px;border:#a9a9a9 solid 1px;border-radius:25%;cursor:pointer}.color-picker .preset-area .preset-empty-message{min-height:18px;margin-top:4px;margin-bottom:8px;font-style:italic;text-align:center}.color-picker .hex-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .hex-text .box{padding:0 24px 8px 8px}.color-picker .hex-text .box div{float:left;flex:1 1 auto;text-align:center;color:#555;clear:left}.color-picker .hex-text .box input{flex:1 1 auto;padding:1px;border:#a9a9a9 solid 1px}.color-picker .hex-alpha .box div:first-child,.color-picker .hex-alpha .box input:first-child{flex-grow:3;margin-right:8px}.color-picker .cmyk-text,.color-picker .hsla-text,.color-picker .rgba-text,.color-picker .value-text{width:100%;padding:4px 8px;font-size:11px}.color-picker .cmyk-text .box,.color-picker .hsla-text .box,.color-picker .rgba-text .box{padding:0 24px 8px 8px}.color-picker .value-text .box{padding:0 8px 8px}.color-picker .cmyk-text .box div,.color-picker .hsla-text .box div,.color-picker .rgba-text .box div,.color-picker .value-text .box div{flex:1 1 auto;margin-right:8px;text-align:center;color:#555}.color-picker .cmyk-text .box div:last-child,.color-picker .hsla-text .box div:last-child,.color-picker .rgba-text .box div:last-child,.color-picker .value-text .box div:last-child{margin-right:0}.color-picker .cmyk-text .box input,.color-picker .hsla-text .box input,.color-picker .rgba-text .box input,.color-picker .value-text .box input{float:left;flex:1;padding:1px;margin:0 8px 0 0;border:#a9a9a9 solid 1px}.color-picker .cmyk-text .box input:last-child,.color-picker .hsla-text .box input:last-child,.color-picker .rgba-text .box input:last-child,.color-picker .value-text .box input:last-child{margin-right:0}.color-picker .hue-alpha{align-items:center;margin-bottom:3px}.color-picker .hue{direction:ltr;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwkUFWbCCAAAAFxJREFUaN7t0kEKg0AQAME2x83/n2qu5qCgD1iDhCoYdpnbQC9bbY1qVO/jvc6k3ad91s7/7F1/csgPrujuQ17BDYSFsBAWwgJhISyEBcJCWAgLhIWwEBYIi2f7Ar/1TCgFH2X9AAAAAElFTkSuQmCC)}.color-picker .value{direction:rtl;width:100%;height:16px;margin-bottom:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAACTklEQVR42u3SYUcrABhA4U2SkmRJMmWSJklKJiWZZpKUJJskKUmaTFImKZOUzMySpGRmliRNJilJSpKSJEtmSpIpmWmSdO736/6D+x7OP3gUCoWCv1cqlSQlJZGcnExKSgqpqamkpaWRnp5ORkYGmZmZqFQqsrKyyM7OJicnh9zcXNRqNXl5eeTn56PRaCgoKKCwsJCioiK0Wi3FxcWUlJRQWlpKWVkZ5eXlVFRUUFlZiU6no6qqiurqampqaqitraWurg69Xk99fT0GgwGj0UhDQwONjY00NTXR3NxMS0sLra2ttLW10d7ejslkwmw209HRQWdnJ11dXXR3d9PT00Nvby99fX309/czMDDA4OAgFouFoaEhrFYrw8PDjIyMMDo6ytjYGDabjfHxcSYmJpicnGRqagq73c709DQzMzPMzs4yNzfH/Pw8DocDp9OJy+XC7XazsLDA4uIiS0tLLC8vs7KywurqKmtra3g8HrxeLz6fD7/fz/r6OhsbG2xubrK1tcX29jaBQICdnR2CwSC7u7vs7e2xv7/PwcEBh4eHHB0dcXx8zMnJCaenp5ydnXF+fs7FxQWXl5dcXV1xfX3Nzc0Nt7e33N3dEQqFuL+/5+HhgXA4TCQS4fHxkaenJ56fn3l5eeH19ZVoNMrb2xvv7+98fHwQi8WIx+N8fn6SSCT4+vri+/ubn58ffn9/+VcKgSWwBJbAElgCS2AJLIElsASWwBJYAktgCSyBJbAElsASWAJLYAksgSWwBJbAElgCS2AJLIElsP4/WH8AmJ5Z6jHS4h8AAAAASUVORK5CYII=)}.color-picker .alpha{direction:ltr;width:100%;height:16px;border:none;cursor:pointer;background-size:100% 100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJYAAAAQCAYAAAD06IYnAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4AIWDwYQlZMa3gAAAWVJREFUaN7tmEGO6jAQRCsOArHgBpyAJYGjcGocxAm4A2IHpmoWE0eBH+ezmFlNvU06shJ3W6VEelWMUQAIIF9f6qZpimsA1LYtS2uF51/u27YVAFZVRUkEoGHdPV/sIcbIEIIkUdI/9Xa7neyv61+SWFUVAVCSct00TWn2fv6u3+Ecfd3tXzy/0+nEUu+SPjo/kqzrmiQpScN6v98XewfA8/lMkiLJ2WxGSUopcT6fM6U0NX9/frfbjev1WtfrlZfLhYfDQQHG/AIOlnGwjINlHCxjHCzjYJm/TJWdCwquJXseFFzGwDNNeiKMOJTO8xQdDQaeB29+K9efeLaBo9J7vdvtJj1RjFFjfiv7qv95tjx/7leSQgh93e1ffMeIp6O+YQjho/N791t1XVOSSI7N//K+4/GoxWLBx+PB5/Op5XLJ+/3OlJJWqxU3m83ovv5iGf8KjYNlHCxjHCzjYBkHy5gf5gusvQU7U37jTAAAAABJRU5ErkJggg==)}.color-picker .type-policy{position:absolute;top:218px;right:12px;width:16px;height:24px;background-size:8px 16px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAACewAAAnsB01CO3AAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAIASURBVEiJ7ZY9axRRFIafsxMStrLQJpAgpBFhi+C9w1YSo00I6RZ/g9vZpBf/QOr4GyRgkSKNSrAadsZqQGwCkuAWyRZJsySwvhZ7N/vhzrgbLH3Ld8597jlzz50zJokyxXH8DqDVar0qi6v8BbItqSGpEcfxdlmsFWXkvX8AfAVWg3UKPEnT9GKujMzsAFgZsVaCN1VTQd77XUnrgE1kv+6935268WRpzrnHZvYRWC7YvC3pRZZl3wozqtVqiyH9IgjAspkd1Gq1xUJQtVrdB9ZKIAOthdg/Qc65LUk7wNIMoCVJO865rYFhkqjX6/d7vV4GPJwBMqofURS5JEk6FYBer/eeYb/Mo9WwFnPOvQbeAvfuAAK4BN4sAJtAG/gJIElmNuiJyba3EGNmZiPeZuEVmVell/Y/6N+CzDn3AXhEOOo7Hv/3BeAz8IzQkMPnJbuPx1wC+yYJ7/0nYIP5S/0FHKdp+rwCEEXRS/rf5Hl1Gtb2M0iSpCOpCZzPATmX1EySpHMLAsiy7MjMDoHrGSDXZnaYZdnRwBh7J91utwmczAA6CbG3GgPleX4jqUH/a1CktqRGnuc3hSCAMB32gKspkCtgb3KCQMmkjeP4WNJThrNNZval1WptTIsv7JtQ4tmIdRa8qSoEpWl6YWZNoAN0zKxZNPehpLSBZv2t+Q0CJ9lLnARQLAAAAABJRU5ErkJggg==);background-repeat:no-repeat;background-position:center}.color-picker .type-policy .type-policy-arrow{display:block;width:100%;height:50%}.color-picker .selected-color{position:absolute;top:16px;left:8px;width:40px;height:40px;border:1px solid #a9a9a9;border-radius:50%}.color-picker .selected-color-background{width:40px;height:40px;border-radius:50%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAh0lEQVRYR+2W0QlAMQgD60zdfwOdqa8TmI/wQMr5K0I5bZLIzLOa2nt37VVVbd+dDx5obgCC3KBLwJ2ff4PnVidkf+ucIhw80HQaCLo3DMH3CRK3iFsmAWVl6hPNDwt8EvNE5q+YuEXcMgkonVM6SdyCoEvAnZ8v1Hjx817MilmxSUB5rdLJDycZgUAZUch/AAAAAElFTkSuQmCC)}.color-picker .saturation-lightness{direction:ltr;width:100%;height:130px;border:none;cursor:pointer;touch-action:manipulation;background-size:100% 100%;background-image:url(data:image/png;base64, )}.color-picker .cp-add-color-button-class{position:absolute;display:inline;padding:0;margin:3px -3px;border:0;cursor:pointer;background:transparent}.color-picker .cp-add-color-button-class:hover{text-decoration:underline}.color-picker .cp-add-color-button-class:disabled{cursor:not-allowed;color:#999}.color-picker .cp-add-color-button-class:disabled:hover{text-decoration:none}.color-picker .cp-remove-color-button-class{position:absolute;top:-5px;right:-5px;display:block;width:10px;height:10px;border-radius:50%;cursor:pointer;text-align:center;background:#fff;box-shadow:1px 1px 5px #333}.color-picker .cp-remove-color-button-class:before{content:"x";position:relative;bottom:3.5px;display:inline-block;font-size:10px}.color-picker .eyedropper-icon{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);fill:#fff;mix-blend-mode:exclusion}\n'],encapsulation:2}),n})(),gA=(()=>{class n{constructor(e,i,r,o,s,a){this.injector=e,this.cfr=i,this.appRef=r,this.vcRef=o,this.elRef=s,this._service=a,this.dialogCreated=!1,this.ignoreChanges=!1,this.viewAttachedToAppRef=!1,this.cpWidth="230px",this.cpHeight="auto",this.cpToggle=!1,this.cpDisabled=!1,this.cpIgnoredElements=[],this.cpFallbackColor="",this.cpColorMode="color",this.cpCmykEnabled=!1,this.cpOutputFormat="auto",this.cpAlphaChannel="enabled",this.cpDisableInput=!1,this.cpDialogDisplay="popup",this.cpSaveClickOutside=!0,this.cpCloseClickOutside=!0,this.cpUseRootViewContainer=!1,this.cpPosition="auto",this.cpPositionOffset="0%",this.cpPositionRelativeToArrow=!1,this.cpOKButton=!1,this.cpOKButtonText="OK",this.cpOKButtonClass="cp-ok-button-class",this.cpCancelButton=!1,this.cpCancelButtonText="Cancel",this.cpCancelButtonClass="cp-cancel-button-class",this.cpEyeDropper=!1,this.cpPresetLabel="Preset colors",this.cpPresetColorsClass="cp-preset-colors-class",this.cpMaxPresetColorsLength=6,this.cpPresetEmptyMessage="No colors added",this.cpPresetEmptyMessageClass="preset-empty-message",this.cpAddColorButton=!1,this.cpAddColorButtonText="Add color",this.cpAddColorButtonClass="cp-add-color-button-class",this.cpRemoveColorButtonClass="cp-remove-color-button-class",this.cpInputChange=new F(!0),this.cpToggleChange=new F(!0),this.cpSliderChange=new F(!0),this.cpSliderDragEnd=new F(!0),this.cpSliderDragStart=new F(!0),this.colorPickerOpen=new F(!0),this.colorPickerClose=new F(!0),this.colorPickerCancel=new F(!0),this.colorPickerSelect=new F(!0),this.colorPickerChange=new F(!1),this.cpCmykColorChange=new F(!0),this.cpPresetColorsChange=new F(!0)}handleClick(){this.inputFocus()}handleFocus(){this.inputFocus()}handleInput(e){this.inputChange(e)}ngOnDestroy(){null!=this.cmpRef&&(this.viewAttachedToAppRef&&this.appRef.detachView(this.cmpRef.hostView),this.cmpRef.destroy(),this.cmpRef=null,this.dialog=null)}ngOnChanges(e){e.cpToggle&&!this.cpDisabled&&(e.cpToggle.currentValue?this.openDialog():e.cpToggle.currentValue||this.closeDialog()),e.colorPicker&&(this.dialog&&!this.ignoreChanges&&("inline"===this.cpDialogDisplay&&this.dialog.setInitialColor(e.colorPicker.currentValue),this.dialog.setColorFromString(e.colorPicker.currentValue,!1),this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay&&this.cmpRef.changeDetectorRef.detectChanges()),this.ignoreChanges=!1),(e.cpPresetLabel||e.cpPresetColors)&&this.dialog&&this.dialog.setPresetConfig(this.cpPresetLabel,this.cpPresetColors)}openDialog(){if(this.dialogCreated)this.dialog&&this.dialog.openDialog(this.colorPicker);else{let e=this.vcRef;if(this.dialogCreated=!0,this.viewAttachedToAppRef=!1,this.cpUseRootViewContainer&&"inline"!==this.cpDialogDisplay){let o=this.injector.get(this.appRef.componentTypes[0],Mi.NULL);o!==Mi.NULL?e=o.vcRef||o.viewContainerRef||this.vcRef:this.viewAttachedToAppRef=!0}let i=this.cfr.resolveComponentFactory(JVe);if(this.viewAttachedToAppRef)this.cmpRef=i.create(this.injector),this.appRef.attachView(this.cmpRef.hostView),document.body.appendChild(this.cmpRef.hostView.rootNodes[0]);else{let r=Mi.create({providers:[],parent:e.injector});this.cmpRef=e.createComponent(i,0,r,[])}this.cmpRef.instance.setupDialog(this,this.elRef,this.colorPicker,this.cpWidth,this.cpHeight,this.cpDialogDisplay,this.cpFallbackColor,this.cpColorMode,this.cpCmykEnabled,this.cpAlphaChannel,this.cpOutputFormat,this.cpDisableInput,this.cpIgnoredElements,this.cpSaveClickOutside,this.cpCloseClickOutside,this.cpUseRootViewContainer,this.cpPosition,this.cpPositionOffset,this.cpPositionRelativeToArrow,this.cpPresetLabel,this.cpPresetColors,this.cpPresetColorsClass,this.cpMaxPresetColorsLength,this.cpPresetEmptyMessage,this.cpPresetEmptyMessageClass,this.cpOKButton,this.cpOKButtonClass,this.cpOKButtonText,this.cpCancelButton,this.cpCancelButtonClass,this.cpCancelButtonText,this.cpAddColorButton,this.cpAddColorButtonClass,this.cpAddColorButtonText,this.cpRemoveColorButtonClass,this.cpEyeDropper,this.elRef,this.cpExtraTemplate),this.dialog=this.cmpRef.instance,this.vcRef!==e&&this.cmpRef.changeDetectorRef.detectChanges()}}closeDialog(){this.dialog&&"popup"===this.cpDialogDisplay&&this.dialog.closeDialog()}cmykChanged(e){this.cpCmykColorChange.emit(e)}stateChanged(e){this.cpToggleChange.emit(e),e?this.colorPickerOpen.emit(this.colorPicker):this.colorPickerClose.emit(this.colorPicker)}colorChanged(e,i=!0){this.ignoreChanges=i,this.colorPickerChange.emit(e)}colorSelected(e){this.colorPickerSelect.emit(e)}colorCanceled(){this.colorPickerCancel.emit()}inputFocus(){let e=this.elRef.nativeElement,i=this.cpIgnoredElements.filter(r=>r===e);!this.cpDisabled&&!i.length&&(typeof document<"u"&&e===document.activeElement?this.openDialog():this.dialog&&this.dialog.show?this.closeDialog():this.openDialog())}inputChange(e){this.dialog?this.dialog.setColorFromString(e.target.value,!0):(this.colorPicker=e.target.value,this.colorPickerChange.emit(this.colorPicker))}inputChanged(e){this.cpInputChange.emit(e)}sliderChanged(e){this.cpSliderChange.emit(e)}sliderDragEnd(e){this.cpSliderDragEnd.emit(e)}sliderDragStart(e){this.cpSliderDragStart.emit(e)}presetColorsChanged(e){this.cpPresetColorsChange.emit(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Mi),C(fo),C(yc),C(si),C(Me),C(EV))},n.\u0275dir=we({type:n,selectors:[["","colorPicker",""]],hostBindings:function(e,i){1&e&&I("click",function(){return i.handleClick()})("focus",function(){return i.handleFocus()})("input",function(o){return i.handleInput(o)})},inputs:{colorPicker:"colorPicker",cpWidth:"cpWidth",cpHeight:"cpHeight",cpToggle:"cpToggle",cpDisabled:"cpDisabled",cpIgnoredElements:"cpIgnoredElements",cpFallbackColor:"cpFallbackColor",cpColorMode:"cpColorMode",cpCmykEnabled:"cpCmykEnabled",cpOutputFormat:"cpOutputFormat",cpAlphaChannel:"cpAlphaChannel",cpDisableInput:"cpDisableInput",cpDialogDisplay:"cpDialogDisplay",cpSaveClickOutside:"cpSaveClickOutside",cpCloseClickOutside:"cpCloseClickOutside",cpUseRootViewContainer:"cpUseRootViewContainer",cpPosition:"cpPosition",cpPositionOffset:"cpPositionOffset",cpPositionRelativeToArrow:"cpPositionRelativeToArrow",cpOKButton:"cpOKButton",cpOKButtonText:"cpOKButtonText",cpOKButtonClass:"cpOKButtonClass",cpCancelButton:"cpCancelButton",cpCancelButtonText:"cpCancelButtonText",cpCancelButtonClass:"cpCancelButtonClass",cpEyeDropper:"cpEyeDropper",cpPresetLabel:"cpPresetLabel",cpPresetColors:"cpPresetColors",cpPresetColorsClass:"cpPresetColorsClass",cpMaxPresetColorsLength:"cpMaxPresetColorsLength",cpPresetEmptyMessage:"cpPresetEmptyMessage",cpPresetEmptyMessageClass:"cpPresetEmptyMessageClass",cpAddColorButton:"cpAddColorButton",cpAddColorButtonText:"cpAddColorButtonText",cpAddColorButtonClass:"cpAddColorButtonClass",cpRemoveColorButtonClass:"cpRemoveColorButtonClass",cpExtraTemplate:"cpExtraTemplate"},outputs:{cpInputChange:"cpInputChange",cpToggleChange:"cpToggleChange",cpSliderChange:"cpSliderChange",cpSliderDragEnd:"cpSliderDragEnd",cpSliderDragStart:"cpSliderDragStart",colorPickerOpen:"colorPickerOpen",colorPickerClose:"colorPickerClose",colorPickerCancel:"colorPickerCancel",colorPickerSelect:"colorPickerSelect",colorPickerChange:"colorPickerChange",cpCmykColorChange:"cpCmykColorChange",cpPresetColorsChange:"cpPresetColorsChange"},exportAs:["ngxColorPicker"],features:[Gt]}),n})(),bne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[EV],imports:[Pe]}),n})(),e4e=["regexStringInput"];function t4e(n,t){if(1&n&&(Ot(0),h(1,"li",22),T(2),g(),kt()),2&n){let e=t.$implicit;v(1),_("title",e.name),v(1),bt(e.name)}}function n4e(n,t){if(1&n&&(h(0,"li",23)(1,"em"),T(2),j(3,"number"),g()()),2&n){let e=w().$implicit;v(2),He("and ",W(3,1,e.runs.length-5)," more")}}function i4e(n,t){1&n&&(h(0,"li",24)(1,"em"),T(2,"No runs are in the group"),g()())}var r4e=function(n){return{borderColor:n}},o4e=function(n){return{backgroundColor:n}};function s4e(n,t){if(1&n&&(h(0,"ul",16)(1,"li")(2,"label"),P(3,"span",17),h(4,"code",18),T(5),g()(),h(6,"ul"),S(7,t4e,3,2,"ng-container",19),j(8,"slice"),S(9,n4e,4,3,"li",20),S(10,i4e,3,0,"li",21),g()()()),2&n){let e=t.$implicit;_("ngStyle",In(11,r4e,e.color)),v(3),_("ngStyle",In(13,o4e,e.color)),v(1),_("title",e.groupId),v(1),bt(e.groupId),v(2),_("ngForOf",PO(8,7,e.runs,0,5)),v(2),_("ngIf",e.runs.length>5),v(1),_("ngIf",0===e.runs.length)}}function a4e(n,t){if(1&n&&(h(0,"div",14),S(1,s4e,11,15,"ul",15),g()),2&n){let e=w(2);v(1),_("ngForOf",e.colorRunPairList)}}function l4e(n,t){if(1&n&&(h(0,"div",25),T(1," There are no runs matching the regex, "),h(2,"code"),T(3),g(),T(4,". Please check if your regex string is correct. "),g()),2&n){let e=w(2);v(3),He("/",e.regexString,"/")}}function c4e(n,t){if(1&n&&(h(0,"div",10)(1,"h4"),T(2,"Color group preview"),g(),h(3,"div",11),S(4,a4e,2,1,"div",12),S(5,l4e,5,1,"ng-template",null,13,Wt),g()()),2&n){let e=it(6),i=w();v(4),_("ngIf",i.colorRunPairList.length)("ngIfElse",e)}}var yne=(()=>{class n{constructor(e,i){this.dialogRef=e,this.hostElRef=i,this.onSave=new F,this.regexInputOnChange=new F,this.timeOutId=0}resetFocus(){this.hostElRef.nativeElement.contains(document.activeElement)||this.regexStringInput.nativeElement.focus()}onEnter(e){this.onSaveClick(e),this.dialogRef.close()}onSaveClick(e){this.onSave.emit(e)}fillExample(e){this.regexString=e,this.regexInputChange(e)}regexInputChange(e){this.regexInputOnChange.emit(e)}handleFocusOut(){clearTimeout(this.timeOutId),this.timeOutId=setTimeout(this.resetFocus.bind(this),0)}}return n.\u0275fac=function(e){return new(e||n)(C(Ed),C(Me))},n.\u0275cmp=O({type:n,selectors:[["regex-edit-dialog-component"]],viewQuery:function(e,i){if(1&e&&Ge(e4e,7),2&e){let r;Se(r=Ee())&&(i.regexStringInput=r.first)}},inputs:{regexString:"regexString",colorRunPairList:"colorRunPairList"},outputs:{onSave:"onSave",regexInputOnChange:"regexInputOnChange"},decls:30,vars:2,consts:function(){let t;return t=$localize`:Color Runs by Regex Query␟15ed9f6fd2d4906a4803fc1255de3c5db2c56530␟9088985113960312808:Color Runs by Regex Query`,[[1,"regex-edit-dialog",3,"focusout"],["mat-dialog-title",""],["matInput","","aria-label",t,"cdkFocusInitial","",3,"value","keydown.enter","input"],["regexStringInput",""],[1,"example-details"],[3,"click"],["class","group-container",4,"ngIf"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],["mat-raised-button","","color","primary","mat-dialog-close","",1,"save-button",3,"click"],[1,"group-container"],[1,"grouping-preview"],["class","match-container",4,"ngIf","ngIfElse"],["empty",""],[1,"match-container"],["class","group",3,"ngStyle",4,"ngFor","ngForOf"],[1,"group",3,"ngStyle"],[1,"color-swatch",3,"ngStyle"],[1,"group-id",3,"title"],[4,"ngFor","ngForOf"],["class","more",4,"ngIf"],["class","no-match",4,"ngIf"],[3,"title"],[1,"more"],[1,"no-match"],[1,"warning"]]},template:function(e,i){if(1&e){let r=ge();h(0,"div",0),I("focusout",function(){return i.handleFocusOut()}),h(1,"h1",1),T(2,"Color runs by regex"),g(),h(3,"mat-dialog-content")(4,"p"),T(5,"Enter a regex with capturing groups to match against run names:"),g(),h(6,"mat-form-field")(7,"input",2,3),I("keydown.enter",function(s){return i.onEnter(s.target.value)})("input",function(s){return i.regexInputChange(s.target.value)}),g()()(),h(9,"div",4)(10,"p"),T(11,' Each matching run will be assigned a color based on the "key" formed by its matches to the capturing groups. '),P(12,"br"),h(13,"button",5),I("click",function(){return i.fillExample("(train|eval)")}),T(14," Try "),h(15,"code"),T(16,"(train|eval)"),g()(),T(17," to assign all runs containing "),h(18,"code"),T(19,"train"),g(),T(20," to one color and all runs containing "),h(21,"code"),T(22,"eval"),g(),T(23," to another color. "),g()(),S(24,c4e,7,2,"div",6),h(25,"div",7)(26,"button",8),T(27,"Cancel"),g(),h(28,"button",9),I("click",function(){X(r);let s=it(8);return Q(i.onSaveClick(s.value))}),T(29," Save "),g()()()}2&e&&(v(7),Wi("value",i.regexString),v(17),_("ngIf",i.regexString))},dependencies:[nn,Fe,pu,Ka,Ji,Z1,p9,K1,J1,Uu,jj,La],styles:[".example-details[_ngcontent-%COMP%]{padding:16px}.example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{background-color:rgba(0,0,0,0);padding:0;border:none;cursor:pointer;text-decoration:underline;color:#1976d2}body.dark-mode[_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{color:#42a5f5}.example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited{color:#7b1fa2}body.dark-mode[_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited, body.dark-mode   [_nghost-%COMP%]   .example-details[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]:visited{color:#ba68c8}.group-container[_ngcontent-%COMP%]{margin:16px}.group-container[_ngcontent-%COMP%]   h4[_ngcontent-%COMP%]{margin-bottom:16px}.group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:#616161;font-size:.9em}body.dark-mode[_nghost-%COMP%]   .group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group-container[_ngcontent-%COMP%]   .warning[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.grouping-preview[_ngcontent-%COMP%]{border:1px solid #ebebeb;max-height:50vh;overflow-y:auto;padding:16px}body.dark-mode[_nghost-%COMP%]   .grouping-preview[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .grouping-preview[_ngcontent-%COMP%]{border:1px solid #555}.match-container[_ngcontent-%COMP%]{align-items:flex-start;display:grid;flex-wrap:wrap;gap:10px;grid-template-columns:repeat(2, minmax(50%, 1fr))}.color-swatch[_ngcontent-%COMP%]{border-radius:50%;box-shadow:0 0 2px #000;display:inline-block;height:15px;width:15px}ul[_ngcontent-%COMP%]{list-style-type:none;padding:0}mat-form-field[_ngcontent-%COMP%]{width:100%}.group[_ngcontent-%COMP%]{border:1px solid #ebebeb;border-radius:3px;margin:0;padding:16px}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]{border:1px solid #555}.group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;align-items:center;display:grid;gap:10px;grid-template-columns:max-content auto;padding:16px 0}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{border-bottom:1px solid #555}.group[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]   .group-id[_ngcontent-%COMP%]{font-size:.95em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]{font-size:.9em}.group[_ngcontent-%COMP%]   ul[_ngcontent-%COMP%]   li[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%], .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%]{color:#616161;margin-top:16px}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .more[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}body.dark-mode[_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .group[_ngcontent-%COMP%]   .no-match[_ngcontent-%COMP%]{color:rgba(255,255,255,.7)}.save-button[_ngcontent-%COMP%]{color:inherit}"],changeDetection:0}),n})(),xne=(()=>{class n{constructor(e,i,r){this.store=e,this.dialogRef=i,this.tentativeRegexString$=new Ie,this.groupByRegexString$=ta(()=>tn(this.store.select(v1).pipe(Yt(1)),this.tentativeRegexString$)).pipe(qn("")),this.colorRunPairList$=ta(()=>this.groupByRegexString$.pipe(wr(500),ke(o=>{try{let s=new RegExp(o);return Boolean(s)}catch{return!1}}),Li(this.allRuns$,this.runIdToEid$,this.store.select(Bs.getColorPalette),this.store.select(Rl)),N(([o,s,a,l,c])=>{let u=Sv({key:Yi.REGEX,regexString:o},s,a),p=new Map,f=[];for(let[m,b]of Object.entries(u.matches)){let M=p.get(m);if(!M){let y=l.colors[p.size%l.colors.length];M=c?y.darkHex:y.lightHex,p.set(m,M)}f.push({groupId:m,color:M,runs:b})}return f}))).pipe(qn([])),this.experimentIds=r.experimentIds,this.runIdToEid$=dn(this.experimentIds.map(o=>this.store.select(BW,{experimentId:o}).pipe(N(s=>({experimentId:o,runIds:s}))))).pipe(N(o=>{let s={};for(let{runIds:a,experimentId:l}of o)for(let c of a)s[c]=l;return s})),this.allRuns$=dn(this.experimentIds.map(o=>this.store.select(Du,{experimentId:o}))).pipe(N(o=>o.flat()))}onRegexInputOnChange(e){this.tentativeRegexString$.next(e)}onSave(e){this.store.dispatch(Hh({experimentIds:this.experimentIds,groupBy:{key:Yi.REGEX,regexString:e}}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Ed),C(Xv))},n.\u0275cmp=O({type:n,selectors:[["regex-edit-dialog"]],decls:3,vars:6,consts:[[3,"regexString","colorRunPairList","onSave","regexInputOnChange"]],template:function(e,i){1&e&&(h(0,"regex-edit-dialog-component",0),I("onSave",function(o){return i.onSave(o)})("regexInputOnChange",function(o){return i.onRegexInputOnChange(o)}),j(1,"async"),j(2,"async"),g()),2&e&&_("regexString",W(1,2,i.groupByRegexString$))("colorRunPairList",W(2,4,i.colorRunPairList$))},dependencies:[yne,ct],styles:["[_nghost-%COMP%], regex-edit-dialog-component[_ngcontent-%COMP%] {\n        display: block;\n        height: 100%;\n        width: 100%;\n      }"]}),n})();function p4e(n,t){1&n&&P(0,"mat-icon",14)}function f4e(n,t){if(1&n){let e=ge();h(0,"button",13),I("click",function(){X(e);let r=w();return Q(r.onGroupByChange.emit({key:r.GroupByKey.EXPERIMENT}))}),S(1,p4e,1,0,"mat-icon",7),h(2,"span"),T(3,"Experiment"),g()()}if(2&n){let e=w();Be("aria-checked",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT),v(1),_("ngIf",e.selectedGroupBy.key===e.GroupByKey.EXPERIMENT)}}function m4e(n,t){1&n&&P(0,"mat-icon",14)}function h4e(n,t){1&n&&P(0,"mat-icon",14)}function g4e(n,t){if(1&n&&(h(0,"span"),T(1),g()),2&n){let e=w();v(1),bt(e.regexString)}}function _4e(n,t){1&n&&(h(0,"span",15),T(1,"(none set)"),g())}var Cne=(()=>{class n{constructor(e){this.dialog=e,this.GroupByKey=Yi,this.onGroupByChange=new F}onRegexStringEdit(){this.dialog.open(xne,{maxHeight:"95vh",maxWidth:"80vw",data:{experimentIds:this.experimentIds}})}onGroupByRegexClick(){this.regexString?this.onGroupByChange.emit({key:Yi.REGEX,regexString:this.regexString}):this.onRegexStringEdit()}}return n.\u0275fac=function(e){return new(e||n)(C(zl))},n.\u0275cmp=O({type:n,selectors:[["runs-group-menu-button-component"]],inputs:{showExperimentsGroupBy:"showExperimentsGroupBy",experimentIds:"experimentIds",regexString:"regexString",selectedGroupBy:"selectedGroupBy"},outputs:{onGroupByChange:"onGroupByChange"},decls:19,vars:8,consts:[["mat-icon-button","","title","Color runs by...",3,"matMenuTriggerFor"],["svgIcon","palette_24px"],[1,"run-table-color-group-by"],["groupByMenu","matMenu"],[1,"label"],["mat-menu-item","","role","menuitemradio","data-value","experiment",3,"click",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","run",3,"click"],["svgIcon","done_24px",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","regex",3,"click"],["mat-menu-item","","role","menuitem","data-value","regex-edit",1,"display-regex-string",3,"click"],["svgIcon","edit_24px"],[4,"ngIf"],["class","none-set-string",4,"ngIf"],["mat-menu-item","","role","menuitemradio","data-value","experiment",3,"click"],["svgIcon","done_24px"],[1,"none-set-string"]],template:function(e,i){1&e&&(h(0,"button",0),P(1,"mat-icon",1),g(),h(2,"mat-menu",2,3)(4,"div",4),T(5,"Color runs by"),g(),S(6,f4e,4,2,"button",5),h(7,"button",6),I("click",function(){return i.onGroupByChange.emit({key:i.GroupByKey.RUN})}),S(8,m4e,1,0,"mat-icon",7),h(9,"span"),T(10,"Run"),g()(),h(11,"button",8),I("click",function(){return i.onGroupByRegexClick()}),S(12,h4e,1,0,"mat-icon",7),h(13,"span"),T(14,"Regex"),g()(),h(15,"button",9),I("click",function(){return i.onRegexStringEdit()}),P(16,"mat-icon",10),S(17,g4e,2,1,"span",11),S(18,_4e,2,0,"span",12),g()()),2&e&&(_("matMenuTriggerFor",it(3)),v(6),_("ngIf",i.showExperimentsGroupBy),v(1),Be("aria-checked",i.selectedGroupBy.key===i.GroupByKey.RUN),v(1),_("ngIf",i.selectedGroupBy.key===i.GroupByKey.RUN),v(3),Be("aria-checked",i.selectedGroupBy.key===i.GroupByKey.REGEX),v(1),_("ngIf",i.selectedGroupBy.key===i.GroupByKey.REGEX),v(5),_("ngIf",i.regexString),v(1),_("ngIf",!i.regexString))},dependencies:[Fe,$i,En,Nc,jl,Lc],styles:[".run-table-color-group-by{font-size:16px}  .run-table-color-group-by .label{color:#616161;font-size:.9em;margin:10px 0;padding:0 16px;pointer-events:none}  .run-table-color-group-by mat-icon{height:20px;width:20px}  .run-table-color-group-by .display-regex-string{padding-left:40px}  .run-table-color-group-by .display-regex-string .none-set-string{color:#616161}body.dark-mode[_nghost-%COMP%]     .run-table-color-group-by .display-regex-string .none-set-string, body.dark-mode   [_nghost-%COMP%]     .run-table-color-group-by .display-regex-string .none-set-string{color:rgba(255,255,255,.7)}"],changeDetection:0}),n})(),_A=(()=>{class n{constructor(e){this.store=e,this.showExperimentsGroupBy$=this.store.select(G8).pipe(N(i=>i.has(wn.COMPARE_EXPERIMENT))),this.selectedGroupBy$=this.store.select(HW),this.groupByRegexString$=this.store.select(v1)}onGroupByChange(e){this.store.dispatch(Hh({experimentIds:this.experimentIds,groupBy:e}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["runs-group-menu-button"]],inputs:{experimentIds:"experimentIds"},decls:4,vars:10,consts:[[3,"regexString","selectedGroupBy","showExperimentsGroupBy","experimentIds","onGroupByChange"]],template:function(e,i){1&e&&(h(0,"runs-group-menu-button-component",0),I("onGroupByChange",function(o){return i.onGroupByChange(o)}),j(1,"async"),j(2,"async"),j(3,"async"),g()),2&e&&_("regexString",W(1,4,i.groupByRegexString$))("selectedGroupBy",W(2,6,i.selectedGroupBy$))("showExperimentsGroupBy",W(3,8,i.showExperimentsGroupBy$))("experimentIds",i.experimentIds)},dependencies:[Cne,ct],encapsulation:2,changeDetection:0}),n})();function v4e(n,t){if(1&n){let e=ge();h(0,"div")(1,"mat-checkbox",15),I("click",function(r){return X(e),Q(w(3).handleSelectAll(r))}),g()()}if(2&n){let e=w(3);v(1),_("checked",e.allRowsSelected())("indeterminate",!e.allRowsSelected()&&e.someRowsSelected())}}function y4e(n,t){if(1&n&&(h(0,"span",16),P(1,"runs-group-menu-button",17),g()),2&n){let e=w(3);v(1),_("experimentIds",e.experimentIds)}}var wne=function(n){return[n]};function x4e(n,t){if(1&n&&(h(0,"tb-data-table-header-cell",11),Ot(1,12),S(2,v4e,2,2,"div",13),S(3,y4e,2,1,"span",14),kt(),g()),2&n){let e=w().$implicit,i=w();_("header",e)("sortingInfo",i.sortingInfo)("hparamsEnabled",!0)("ngClass",In(7,wne,"table-column-"+e.name)),v(1),_("ngSwitch",e.name),v(1),_("ngSwitchCase","selected"),v(1),_("ngSwitchCase","color")}}function C4e(n,t){if(1&n&&(Ot(0),S(1,x4e,4,9,"tb-data-table-header-cell",10),kt()),2&n){let e=t.$implicit;v(1),_("ngIf",e.enabled)}}function M4e(n,t){if(1&n){let e=ge();h(0,"span",21)(1,"button",22),I("colorPickerChange",function(r){X(e);let o=w(3).$implicit;return Q(w().onRunColorChange.emit({runId:o.id,newColor:r}))}),g()()}if(2&n){let e=w(3).$implicit;v(1),Tt("background",e.color),_("colorPicker",e.color)("cpDialogDisplay","popup")("cpPositionOffset",-20)("cpUseRootViewContainer",!0)("cpOutputFormat","hex")}}function w4e(n,t){if(1&n){let e=ge();h(0,"div")(1,"mat-checkbox",23),I("click",function(r){X(e);let o=w(3).$implicit;return Q(w().selectionClick(r,o.id))}),g()()}if(2&n){let e=w(3).$implicit;v(1),_("checked",e.selected)}}function S4e(n,t){if(1&n&&(h(0,"span"),P(1,"tb-experiment-alias",24),g()),2&n){let e=w(3).$implicit;v(1),_("alias",e.experimentAlias)}}function E4e(n,t){if(1&n&&(h(0,"tb-data-table-content-cell",19),Ot(1,12),S(2,M4e,2,7,"span",20),S(3,w4e,2,1,"div",13),S(4,S4e,2,1,"span",13),kt(),g()),2&n){let e=w().$implicit,i=w().$implicit;_("header",e)("datum",i[e.name])("ngClass",In(7,wne,"table-column-"+e.name)),v(1),_("ngSwitch",e.name),v(1),_("ngSwitchCase","color"),v(1),_("ngSwitchCase","selected"),v(1),_("ngSwitchCase","experimentAlias")}}function T4e(n,t){if(1&n&&(Ot(0),S(1,E4e,5,9,"tb-data-table-content-cell",18),kt()),2&n){let e=t.$implicit;v(1),_("ngIf",e.enabled)}}function D4e(n,t){if(1&n&&(Ot(0),h(1,"tb-data-table-content-row"),S(2,T4e,2,1,"ng-container",5),g(),kt()),2&n){let e=t.$implicit,i=w();v(1),Be("data-id",e.id),v(1),_("ngForOf",i.getHeaders())}}var I4e=function(n){return{"full-screen":n}},Sne=(()=>{class n{constructor(){this.ColumnHeaderType=ht,this.sortDataBy=new F,this.orderColumns=new F,this.onSelectionToggle=new F,this.onAllSelectionToggle=new F,this.onRegexFilterChange=new F,this.toggleFullScreen=new F,this.onRunColorChange=new F,this.addColumn=new F,this.removeColumn=new F,this.onSelectionDblClick=new F,this.addFilter=new F,this.beforeColumns=[{name:"selected",displayName:"",type:ht.CUSTOM,enabled:!0}],this.afterColumns=[{name:"color",displayName:"",type:ht.COLOR,enabled:!0}]}getHeaders(){return[].concat(this.beforeColumns,this.headers,this.afterColumns)}selectionClick(e,i){e.preventDefault(),1===e.detail&&this.onSelectionToggle.emit(i),2===e.detail&&this.onSelectionDblClick.emit(i)}allRowsSelected(){return this.data?.every(e=>e.selected)}someRowsSelected(){return this.data?.some(e=>e.selected)}handleSelectAll(e){e.preventDefault(),this.onAllSelectionToggle.emit(this.data?.map(i=>i.id))}onFilterKeyUp(e){this.onRegexFilterChange.emit(e.target.value)}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["runs-data-table"]],inputs:{headers:"headers",data:"data",sortingInfo:"sortingInfo",experimentIds:"experimentIds",regexFilter:"regexFilter",isFullScreen:"isFullScreen",selectableColumns:"selectableColumns",loading:"loading",columnFilters:"columnFilters"},outputs:{sortDataBy:"sortDataBy",orderColumns:"orderColumns",onSelectionToggle:"onSelectionToggle",onAllSelectionToggle:"onAllSelectionToggle",onRegexFilterChange:"onRegexFilterChange",toggleFullScreen:"toggleFullScreen",onRunColorChange:"onRunColorChange",addColumn:"addColumn",removeColumn:"removeColumn",onSelectionDblClick:"onSelectionDblClick",addFilter:"addFilter"},decls:11,vars:14,consts:[[1,"filter-row"],["placeholder","Filter runs (regex)",1,"run-filter",3,"value","keyup"],[1,"table-container"],[3,"headers","sortingInfo","columnCustomizationEnabled","selectableColumns","columnFilters","loading","sortDataBy","orderColumns","addColumn","removeColumn","addFilter"],["header",""],[4,"ngFor","ngForOf"],["content",""],[1,"full-screen-toggle",3,"ngClass"],["mat-button","",1,"full-screen-btn",3,"ngClass","click"],[1,"expand-collapse-icon",3,"svgIcon"],[3,"header","sortingInfo","hparamsEnabled","ngClass",4,"ngIf"],[3,"header","sortingInfo","hparamsEnabled","ngClass"],[3,"ngSwitch"],[4,"ngSwitchCase"],["class","group-menu-container",4,"ngSwitchCase"],[3,"checked","indeterminate","click"],[1,"group-menu-container"],[3,"experimentIds"],[3,"header","datum","ngClass",4,"ngIf"],[3,"header","datum","ngClass"],["class","color-container",4,"ngSwitchCase"],[1,"color-container"],[1,"run-color-swatch",3,"colorPicker","cpDialogDisplay","cpPositionOffset","cpUseRootViewContainer","cpOutputFormat","colorPickerChange"],[3,"checked","click"],[3,"alias"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"tb-filter-input",1),I("keyup",function(o){return i.onFilterKeyUp(o)}),g()(),h(2,"div",2)(3,"tb-data-table",3),I("sortDataBy",function(o){return i.sortDataBy.emit(o)})("orderColumns",function(o){return i.orderColumns.emit(o)})("addColumn",function(o){return i.addColumn.emit(o)})("removeColumn",function(o){return i.removeColumn.emit(o)})("addFilter",function(o){return i.addFilter.emit(o)}),Ot(4,4),S(5,C4e,2,1,"ng-container",5),kt(),Ot(6,6),S(7,D4e,3,2,"ng-container",5),kt(),g()(),h(8,"div",7)(9,"button",8),I("click",function(){return i.toggleFullScreen.emit()}),P(10,"mat-icon",9),g()()),2&e&&(v(1),Wi("value",i.regexFilter),v(2),_("headers",i.headers)("sortingInfo",i.sortingInfo)("columnCustomizationEnabled",!0)("selectableColumns",i.selectableColumns)("columnFilters",i.columnFilters)("loading",i.loading),v(2),_("ngForOf",i.getHeaders()),v(2),_("ngForOf",i.data),v(1),_("ngClass",In(12,I4e,i.isFullScreen)),v(1),_("ngClass",i.isFullScreen?"collapse":"expand"),v(1),_("svgIcon",i.isFullScreen?"arrow_back_24px":"arrow_forward_24px"))},dependencies:[gA,yn,nn,Fe,sr,Sr,d_,sA,uA,u_,Qu,Sp,Ji,ha,En,_A],styles:["[_nghost-%COMP%]{width:100%}[_nghost-%COMP%]{overflow-y:auto;width:100%}.color-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}.run-color-swatch[_ngcontent-%COMP%]{border-radius:100%;border:1px solid #ebebeb;height:20px;width:20px;outline:none}.group-menu-container[_ngcontent-%COMP%]{display:flex;justify-content:center;width:100%}tb-data-table-content-row[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{height:48px}tb-data-table-content-cell[_ngcontent-%COMP%], tb-data-table-header-cell[_ngcontent-%COMP%]{padding:0 4px;vertical-align:middle;border-bottom:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]{border-bottom:1px solid #555}tb-data-table-content-cell[_ngcontent-%COMP%]:last-child, tb-data-table-header-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%]:last-child, body.dark-mode   [_nghost-%COMP%]   tb-data-table-content-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid #555}body.dark-mode[_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]:last-child, body.dark-mode   [_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]:last-child{border-right:1px solid #555}tb-data-table-header-cell[_ngcontent-%COMP%]:last-of-type{border-right:1px solid #ebebeb}body.dark-mode[_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]:last-of-type, body.dark-mode   [_nghost-%COMP%]   tb-data-table-header-cell[_ngcontent-%COMP%]:last-of-type{border-right:1px solid #555}.table-column-selected[_ngcontent-%COMP%], .table-column-color[_ngcontent-%COMP%]{width:40px}.full-screen-toggle[_ngcontent-%COMP%]{opacity:0;position:absolute;height:100%;left:calc(100% + 2px);top:0;z-index:1;display:flex;align-items:center}.full-screen-toggle[_ngcontent-%COMP%]:hover{opacity:.8}.full-screen-toggle.full-screen[_ngcontent-%COMP%]{left:unset;right:0}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn[_ngcontent-%COMP%]{background-color:gray;padding:0;min-width:16px;width:16px}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn.expand[_ngcontent-%COMP%]{border-radius:0 16px 16px 0}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn.collapse[_ngcontent-%COMP%]{border-radius:16px 0 0 16px}.full-screen-toggle[_ngcontent-%COMP%]   .full-screen-btn[_ngcontent-%COMP%]   .expand-collapse-icon[_ngcontent-%COMP%]{font-size:16px;width:16px}.filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;align-items:center;height:48px;width:100%}body.dark-mode[_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #555}.filter-row[_ngcontent-%COMP%]   tb-filter-input[_ngcontent-%COMP%]{padding-left:16px;flex-grow:1}.table-container[_ngcontent-%COMP%]{overflow-x:auto}"],changeDetection:0}),n})(),R4e=["tooltip"],Dne=new ie("mat-tooltip-scroll-strategy"),k4e={provide:Dne,deps:[zi],useFactory:function(n){return()=>n.scrollStrategies.reposition({scrollThrottle:20})}},N4e=new ie("mat-tooltip-default-options",{providedIn:"root",factory:function(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}}),Ene="tooltip-panel",Tne=qo({passive:!0}),U4e=(()=>{class n{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=Rt(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){this._disabled=Rt(e),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=_i(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=_i(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=null!=e?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(e,i,r,o,s,a,l,c,d,u,p,f){this._overlay=e,this._elementRef=i,this._scrollDispatcher=r,this._viewContainerRef=o,this._ngZone=s,this._platform=a,this._ariaDescriber=l,this._focusMonitor=c,this._dir=u,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._viewportMargin=8,this._cssClassPrefix="mat",this._showDelay=this._defaultOptions.showDelay,this._hideDelay=this._defaultOptions.hideDelay,this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new Ie,this._scrollStrategy=d,this._document=f,p&&(p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),u.change.pipe(ot(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)})}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(ot(this._destroyed)).subscribe(e=>{e?"keyboard"===e&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([i,r])=>{e.removeEventListener(i,r,Tne)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,i){if(this.disabled||!this.message||this._isTooltipVisible())return void this._tooltipInstance?._cancelPendingAnimations();let r=this._createOverlay(i);this._detach(),this._portal=this._portal||new Vl(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(ot(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){let i=this._tooltipInstance;i&&(i.isVisible()?i.hide(e):(i._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof Me)return this._overlayRef;this._detach()}let i=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin&&e||this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(i);return r.positionChanges.pipe(ot(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${Ene}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(ot(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(ot(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(ot(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&27===o.keyCode&&!vr(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let i=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();i.withPositions([this._addOffset({...r.main,...o.main}),this._addOffset({...r.fallback,...o.fallback})])}_addOffset(e){return e}_getOrigin(){let r,e=!this._dir||"ltr"==this._dir.value,i=this.position;"above"==i||"below"==i?r={originX:"center",originY:"above"==i?"top":"bottom"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={originX:"start",originY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={originX:"end",originY:"center"});let{x:o,y:s}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:s}}}_getOverlayPosition(){let r,e=!this._dir||"ltr"==this._dir.value,i=this.position;"above"==i?r={overlayX:"center",overlayY:"bottom"}:"below"==i?r={overlayX:"center",overlayY:"top"}:"before"==i||"left"==i&&e||"right"==i&&!e?r={overlayX:"end",overlayY:"center"}:("after"==i||"right"==i&&e||"left"==i&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:o,y:s}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),this._ngZone.onMicrotaskEmpty.pipe(Yt(1),ot(this._destroyed)).subscribe(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,i){return"above"===this.position||"below"===this.position?"top"===i?i="bottom":"bottom"===i&&(i="top"):"end"===e?e="start":"start"===e&&(e="end"),{x:e,y:i}}_updateCurrentPositionClass(e){let s,{overlayY:i,originX:r,originY:o}=e;if(s="center"===i?this._dir&&"rtl"===this._dir.value?"end"===r?"left":"right":"start"===r?"left":"right":"bottom"===i&&"top"===o?"above":"below",s!==this._currentPosition){let a=this._overlayRef;if(a){let l=`${this._cssClassPrefix}-${Ene}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{let i;this._setupPointerExitEventsIfNeeded(),void 0!==e.x&&void 0!==e.y&&(i=e),this.show(void 0,i)}]):"off"!==this.touchGestures&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let i=e.targetTouches?.[0],r=i?{x:i.clientX,y:i.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout),this._touchstartTimeout=setTimeout(()=>this.show(void 0,r),500)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",i=>{let r=i.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",i=>this._wheelListener(i)]);else if("off"!==this.touchGestures){this._disableNativeGesturesIfNecessary();let i=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};e.push(["touchend",i],["touchcancel",i])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([i,r])=>{this._elementRef.nativeElement.addEventListener(i,r,Tne)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let i=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;i!==r&&!r.contains(i)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if("off"!==e){let i=this._elementRef.nativeElement,r=i.style;("on"===e||"INPUT"!==i.nodeName&&"TEXTAREA"!==i.nodeName)&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),("on"===e||!i.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,inputs:{position:["matTooltipPosition","position"],positionAtOrigin:["matTooltipPositionAtOrigin","positionAtOrigin"],disabled:["matTooltipDisabled","disabled"],showDelay:["matTooltipShowDelay","showDelay"],hideDelay:["matTooltipHideDelay","hideDelay"],touchGestures:["matTooltipTouchGestures","touchGestures"],message:["matTooltip","message"],tooltipClass:["matTooltipClass","tooltipClass"]}}),n})(),Ine=(()=>{class n extends U4e{constructor(e,i,r,o,s,a,l,c,d,u,p,f){super(e,i,r,o,s,a,l,c,d,u,p,f),this._tooltipComponent=G4e,this._cssClassPrefix="mat-mdc",this._viewportMargin=8}_addOffset(e){let r=!this._dir||"ltr"==this._dir.value;return"top"===e.originY?e.offsetY=-8:"bottom"===e.originY?e.offsetY=8:"start"===e.originX?e.offsetX=r?-8:8:"end"===e.originX&&(e.offsetX=r?8:-8),e}}return n.\u0275fac=function(e){return new(e||n)(C(zi),C(Me),C(Nu),C(si),C(at),C(Gn),C(L1),C(Xr),C(Dne),C(Xi,8),C(N4e,8),C(Lt))},n.\u0275dir=we({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],exportAs:["matTooltip"],features:[Ke]}),n})(),j4e=(()=>{class n{constructor(e,i){this._changeDetectorRef=e,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new Ie,this._animationsDisabled="NoopAnimations"===i}show(e){clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){clearTimeout(this._showTimeoutId),clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let i=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(i.classList.remove(e?o:r),i.classList.add(e?r:o),this._isVisible=e,e&&!this._animationsDisabled&&"function"==typeof getComputedStyle){let s=getComputedStyle(i);("0s"===s.getPropertyValue("animation-duration")||"none"===s.getPropertyValue("animation-name"))&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(i.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}}return n.\u0275fac=function(e){return new(e||n)(C($t),C(hi,8))},n.\u0275dir=we({type:n}),n})(),G4e=(()=>{class n extends j4e{constructor(e,i,r){super(e,r),this._elementRef=i,this._isMultiline=!1,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide"}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>24&&e.width>=200}}return n.\u0275fac=function(e){return new(e||n)(C($t),C(Me),C(hi,8))},n.\u0275cmp=O({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(1&e&&Ge(R4e,7),2&e){let r;Se(r=Ee())&&(i._tooltip=r.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(e,i){1&e&&I("mouseleave",function(o){return i._handleMouseLeave(o)}),2&e&&Tt("zoom",i.isVisible()?1:null)},features:[Ke],decls:4,vars:4,consts:[[1,"mdc-tooltip","mdc-tooltip--shown","mat-mdc-tooltip",3,"ngClass","animationend"],["tooltip",""],[1,"mdc-tooltip__surface","mdc-tooltip__surface-animation"]],template:function(e,i){1&e&&(h(0,"div",0,1),I("animationend",function(o){return i._handleAnimationEnd(o)}),h(2,"div",2),T(3),g()()),2&e&&(nt("mdc-tooltip--multiline",i._isMultiline),_("ngClass",i.tooltipClass),v(3),bt(i.message))},dependencies:[yn],styles:['.mdc-tooltip__surface{word-break:var(--mdc-tooltip-word-break, normal);overflow-wrap:anywhere}.mdc-tooltip{position:fixed;display:none;z-index:9}.mdc-tooltip-wrapper--rich{position:relative}.mdc-tooltip--shown,.mdc-tooltip--showing,.mdc-tooltip--hide{display:inline-flex}.mdc-tooltip--shown.mdc-tooltip--rich,.mdc-tooltip--showing.mdc-tooltip--rich,.mdc-tooltip--hide.mdc-tooltip--rich{display:inline-block;left:-320px;position:absolute}.mdc-tooltip__surface{line-height:16px;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center}.mdc-tooltip__surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}@media screen and (forced-colors: active){.mdc-tooltip__surface::before{border-color:CanvasText}}.mdc-tooltip--rich .mdc-tooltip__surface{align-items:flex-start;display:flex;flex-direction:column;min-height:24px;min-width:40px;max-width:320px;position:relative}.mdc-tooltip--multiline .mdc-tooltip__surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mdc-tooltip__surface,.mdc-tooltip--multiline .mdc-tooltip__surface[dir=rtl]{text-align:right}.mdc-tooltip__surface .mdc-tooltip__title{margin:0 8px}.mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(200px - (2 * 8px));margin:8px;text-align:left}[dir=rtl] .mdc-tooltip__surface .mdc-tooltip__content,.mdc-tooltip__surface .mdc-tooltip__content[dir=rtl]{text-align:right}.mdc-tooltip--rich .mdc-tooltip__surface .mdc-tooltip__content{max-width:calc(320px - (2 * 8px));align-self:stretch}.mdc-tooltip__surface .mdc-tooltip__content-link{text-decoration:none}.mdc-tooltip--rich-actions,.mdc-tooltip__content,.mdc-tooltip__title{z-index:1}.mdc-tooltip__surface-animation{opacity:0;transform:scale(0.8);will-change:transform,opacity}.mdc-tooltip--shown .mdc-tooltip__surface-animation{transform:scale(1);opacity:1}.mdc-tooltip--hide .mdc-tooltip__surface-animation{transform:scale(1)}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{position:absolute;height:24px;width:24px;transform:rotate(35deg) skewY(20deg) scaleX(0.9396926208)}.mdc-tooltip__caret-surface-top .mdc-elevation-overlay,.mdc-tooltip__caret-surface-bottom .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.mdc-tooltip__caret-surface-bottom{outline:1px solid rgba(0,0,0,0);z-index:-1}@media screen and (forced-colors: active){.mdc-tooltip__caret-surface-bottom{outline-color:CanvasText}}.mdc-tooltip__surface{background-color:var(--mdc-plain-tooltip-container-color, #fff)}.mdc-tooltip__surface{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__caret-surface-top,.mdc-tooltip__caret-surface-bottom{border-radius:var(--mdc-plain-tooltip-container-shape, var(--mdc-shape-small, 4px))}.mdc-tooltip__surface{color:var(--mdc-plain-tooltip-supporting-text-color, #000)}.mdc-tooltip__surface{font-family:var(--mdc-plain-tooltip-supporting-text-font, inherit);font-size:var(--mdc-plain-tooltip-supporting-text-size, inherit);font-weight:var(--mdc-plain-tooltip-supporting-text-weight, inherit);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, inherit)}.mat-mdc-tooltip{position:relative;transform:scale(0)}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0}),n})(),Ane=(_r("state",[wi("initial, void, hidden",rn({opacity:0,transform:"scale(0.8)"})),wi("visible",rn({transform:"scale(1)"})),gi("* => visible",Ci("150ms cubic-bezier(0, 0, 0.2, 1)")),gi("* => hidden",Ci("75ms cubic-bezier(0.4, 0, 1, 1)"))]),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[k4e],imports:[lg,Pe,Co,fn,fn,Pc]}),n})());function q4e(n,t){if(1&n&&(h(0,"mat-option",19),T(1),g()),2&n){let e=t.$implicit;_("value",e),v(1),He(" ",e," ")}}function Y4e(n,t){if(1&n){let e=ge();h(0,"mat-form-field",16)(1,"mat-select",17),I("selectionChange",function(r){return X(e),Q(w(2)._changePageSize(r.value))}),S(2,q4e,2,2,"mat-option",18),g()()}if(2&n){let e=w(2);_("appearance",e._formFieldAppearance)("color",e.color),v(1),_("value",e.pageSize)("disabled",e.disabled)("aria-labelledby",e._pageSizeLabelId)("panelClass",e.selectConfig.panelClass||"")("disableOptionCentering",e.selectConfig.disableOptionCentering),v(1),_("ngForOf",e._displayedPageSizeOptions)}}function X4e(n,t){if(1&n&&(h(0,"div",20),T(1),g()),2&n){let e=w(2);v(1),bt(e.pageSize)}}function Q4e(n,t){if(1&n&&(h(0,"div",12)(1,"div",13),T(2),g(),S(3,Y4e,3,8,"mat-form-field",14),S(4,X4e,2,1,"div",15),g()),2&n){let e=w();v(1),Wi("id",e._pageSizeLabelId),v(1),He(" ",e._intl.itemsPerPageLabel," "),v(1),_("ngIf",e._displayedPageSizeOptions.length>1),v(1),_("ngIf",e._displayedPageSizeOptions.length<=1)}}function Z4e(n,t){if(1&n){let e=ge();h(0,"button",21),I("click",function(){return X(e),Q(w().firstPage())}),Nn(),h(1,"svg",7),P(2,"path",22),g()()}if(2&n){let e=w();_("matTooltip",e._intl.firstPageLabel)("matTooltipDisabled",e._previousButtonsDisabled())("matTooltipPosition","above")("disabled",e._previousButtonsDisabled()),Be("aria-label",e._intl.firstPageLabel)}}function K4e(n,t){if(1&n){let e=ge();Nn(),Oo(),h(0,"button",23),I("click",function(){return X(e),Q(w().lastPage())}),Nn(),h(1,"svg",7),P(2,"path",24),g()()}if(2&n){let e=w();_("matTooltip",e._intl.lastPageLabel)("matTooltipDisabled",e._nextButtonsDisabled())("matTooltipPosition","above")("disabled",e._nextButtonsDisabled()),Be("aria-label",e._intl.lastPageLabel)}}var Cm=(()=>{class n{constructor(){this.changes=new Ie,this.itemsPerPageLabel="Items per page:",this.nextPageLabel="Next page",this.previousPageLabel="Previous page",this.firstPageLabel="First page",this.lastPageLabel="Last page",this.getRangeLabel=(e,i,r)=>{if(0==r||0==i)return`0 of ${r}`;let o=e*i;return`${o+1} \u2013 ${o<(r=Math.max(r,0))?Math.min(o+i,r):o+i} of ${r}`}}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),$4e={provide:Cm,deps:[[new Ts,new sd,Cm]],useFactory:function(n){return n||new Cm}},tHe=new ie("MAT_PAGINATOR_DEFAULT_OPTIONS"),nHe=so(V1(class{})),iHe=(()=>{class n extends nHe{get pageIndex(){return this._pageIndex}set pageIndex(e){this._pageIndex=Math.max(_i(e),0),this._changeDetectorRef.markForCheck()}get length(){return this._length}set length(e){this._length=_i(e),this._changeDetectorRef.markForCheck()}get pageSize(){return this._pageSize}set pageSize(e){this._pageSize=Math.max(_i(e),0),this._updateDisplayedPageSizeOptions()}get pageSizeOptions(){return this._pageSizeOptions}set pageSizeOptions(e){this._pageSizeOptions=(e||[]).map(i=>_i(i)),this._updateDisplayedPageSizeOptions()}get hidePageSize(){return this._hidePageSize}set hidePageSize(e){this._hidePageSize=Rt(e)}get showFirstLastButtons(){return this._showFirstLastButtons}set showFirstLastButtons(e){this._showFirstLastButtons=Rt(e)}constructor(e,i,r){if(super(),this._intl=e,this._changeDetectorRef=i,this._pageIndex=0,this._length=0,this._pageSizeOptions=[],this._hidePageSize=!1,this._showFirstLastButtons=!1,this.selectConfig={},this.page=new F,this._intlChanges=e.changes.subscribe(()=>this._changeDetectorRef.markForCheck()),r){let{pageSize:o,pageSizeOptions:s,hidePageSize:a,showFirstLastButtons:l}=r;null!=o&&(this._pageSize=o),null!=s&&(this._pageSizeOptions=s),null!=a&&(this._hidePageSize=a),null!=l&&(this._showFirstLastButtons=l)}}ngOnInit(){this._initialized=!0,this._updateDisplayedPageSizeOptions(),this._markInitialized()}ngOnDestroy(){this._intlChanges.unsubscribe()}nextPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex+1,this._emitPageEvent(e)}previousPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=this.pageIndex-1,this._emitPageEvent(e)}firstPage(){if(!this.hasPreviousPage())return;let e=this.pageIndex;this.pageIndex=0,this._emitPageEvent(e)}lastPage(){if(!this.hasNextPage())return;let e=this.pageIndex;this.pageIndex=this.getNumberOfPages()-1,this._emitPageEvent(e)}hasPreviousPage(){return this.pageIndex>=1&&0!=this.pageSize}hasNextPage(){let e=this.getNumberOfPages()-1;return this.pageIndex<e&&0!=this.pageSize}getNumberOfPages(){return this.pageSize?Math.ceil(this.length/this.pageSize):0}_changePageSize(e){let r=this.pageIndex;this.pageIndex=Math.floor(this.pageIndex*this.pageSize/e)||0,this.pageSize=e,this._emitPageEvent(r)}_nextButtonsDisabled(){return this.disabled||!this.hasNextPage()}_previousButtonsDisabled(){return this.disabled||!this.hasPreviousPage()}_updateDisplayedPageSizeOptions(){!this._initialized||(this.pageSize||(this._pageSize=0!=this.pageSizeOptions.length?this.pageSizeOptions[0]:50),this._displayedPageSizeOptions=this.pageSizeOptions.slice(),-1===this._displayedPageSizeOptions.indexOf(this.pageSize)&&this._displayedPageSizeOptions.push(this.pageSize),this._displayedPageSizeOptions.sort((e,i)=>e-i),this._changeDetectorRef.markForCheck())}_emitPageEvent(e){this.page.emit({previousPageIndex:e,pageIndex:this.pageIndex,pageSize:this.pageSize,length:this.length})}}return n.\u0275fac=function(e){Is()},n.\u0275dir=we({type:n,inputs:{color:"color",pageIndex:"pageIndex",length:"length",pageSize:"pageSize",pageSizeOptions:"pageSizeOptions",hidePageSize:"hidePageSize",showFirstLastButtons:"showFirstLastButtons",selectConfig:"selectConfig"},outputs:{page:"page"},features:[Ke]}),n})(),rHe=0,bA=(()=>{class n extends iHe{constructor(e,i,r){super(e,i,r),this._pageSizeLabelId="mat-paginator-page-size-label-"+rHe++,this._formFieldAppearance=r?.formFieldAppearance||"outline"}}return n.\u0275fac=function(e){return new(e||n)(C(Cm),C($t),C(tHe,8))},n.\u0275cmp=O({type:n,selectors:[["mat-paginator"]],hostAttrs:["role","group",1,"mat-mdc-paginator"],inputs:{disabled:"disabled"},exportAs:["matPaginator"],features:[Ke],decls:14,vars:14,consts:[[1,"mat-mdc-paginator-outer-container"],[1,"mat-mdc-paginator-container"],["class","mat-mdc-paginator-page-size",4,"ngIf"],[1,"mat-mdc-paginator-range-actions"],["aria-live","polite",1,"mat-mdc-paginator-range-label"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-previous",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["viewBox","0 0 24 24","focusable","false",1,"mat-mdc-paginator-icon"],["d","M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-next",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"],["mat-icon-button","","type","button","class","mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click",4,"ngIf"],[1,"mat-mdc-paginator-page-size"],[1,"mat-mdc-paginator-page-size-label",3,"id"],["class","mat-mdc-paginator-page-size-select",3,"appearance","color",4,"ngIf"],["class","mat-mdc-paginator-page-size-value",4,"ngIf"],[1,"mat-mdc-paginator-page-size-select",3,"appearance","color"],["hideSingleSelectionIndicator","",3,"value","disabled","aria-labelledby","panelClass","disableOptionCentering","selectionChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"],[1,"mat-mdc-paginator-page-size-value"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-first",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],["mat-icon-button","","type","button",1,"mat-mdc-paginator-navigation-last",3,"matTooltip","matTooltipDisabled","matTooltipPosition","disabled","click"],["d","M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]],template:function(e,i){1&e&&(h(0,"div",0)(1,"div",1),S(2,Q4e,5,4,"div",2),h(3,"div",3)(4,"div",4),T(5),g(),S(6,Z4e,3,5,"button",5),h(7,"button",6),I("click",function(){return i.previousPage()}),Nn(),h(8,"svg",7),P(9,"path",8),g()(),Oo(),h(10,"button",9),I("click",function(){return i.nextPage()}),Nn(),h(11,"svg",7),P(12,"path",10),g()(),S(13,K4e,3,5,"button",11),g()()()),2&e&&(v(2),_("ngIf",!i.hidePageSize),v(3),He(" ",i._intl.getRangeLabel(i.pageIndex,i.pageSize,i.length)," "),v(1),_("ngIf",i.showFirstLastButtons),v(1),_("matTooltip",i._intl.previousPageLabel)("matTooltipDisabled",i._previousButtonsDisabled())("matTooltipPosition","above")("disabled",i._previousButtonsDisabled()),Be("aria-label",i._intl.previousPageLabel),v(3),_("matTooltip",i._intl.nextPageLabel)("matTooltipDisabled",i._nextButtonsDisabled())("matTooltipPosition","above")("disabled",i._nextButtonsDisabled()),Be("aria-label",i._intl.nextPageLabel),v(3),_("ngIf",i.showFirstLastButtons))},dependencies:[nn,Fe,$i,Ka,zu,Us,Ine],styles:[".mat-mdc-paginator{display:block}.mat-mdc-paginator .mat-mdc-form-field-subscript-wrapper{display:none}.mat-mdc-paginator .mat-mdc-select{line-height:1.5}.mat-mdc-paginator-outer-container{display:flex}.mat-mdc-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-mdc-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-mdc-paginator-page-size{margin-right:0;margin-left:8px}.mat-mdc-paginator-page-size-label{margin:0 4px}.mat-mdc-paginator-page-size-select{margin:0 4px;width:84px}.mat-mdc-paginator-range-label{margin:0 32px 0 24px}.mat-mdc-paginator-range-actions{display:flex;align-items:center}.mat-mdc-paginator-icon{display:inline-block;width:28px}[dir=rtl] .mat-mdc-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-mdc-icon-button[disabled] .mat-mdc-paginator-icon,.cdk-high-contrast-active .mat-mdc-paginator-icon{fill:currentColor;fill:CanvasText}.cdk-high-contrast-active .mat-mdc-paginator-range-actions .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0}),n})(),Rne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[$4e],imports:[Pe,ci,Ja,Ane]}),n})(),sHe=["mat-sort-header",""];function aHe(n,t){if(1&n){let e=ge();h(0,"div",3),I("@arrowPosition.start",function(){return X(e),Q(w()._disableViewStateAnimation=!0)})("@arrowPosition.done",function(){return X(e),Q(w()._disableViewStateAnimation=!1)}),P(1,"div",4),h(2,"div",5),P(3,"div",6)(4,"div",7)(5,"div",8),g()()}if(2&n){let e=w();_("@arrowOpacity",e._getArrowViewState())("@arrowPosition",e._getArrowViewState())("@allowChildren",e._getArrowDirectionState()),v(2),_("@indicator",e._getArrowDirectionState()),v(1),_("@leftPointer",e._getArrowDirectionState()),v(1),_("@rightPointer",e._getArrowDirectionState())}}var lHe=["*"],Pne=new ie("MAT_SORT_DEFAULT_OPTIONS"),cHe=V1(so(class{})),$x=(()=>{class n extends cHe{get direction(){return this._direction}set direction(e){this._direction=e}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Rt(e)}constructor(e){super(),this._defaultOptions=e,this.sortables=new Map,this._stateChanges=new Ie,this.start="asc",this._direction="",this.sortChange=new F}register(e){this.sortables.set(e.id,e)}deregister(e){this.sortables.delete(e.id)}sort(e){this.active!=e.id?(this.active=e.id,this.direction=e.start?e.start:this.start):this.direction=this.getNextSortDirection(e),this.sortChange.emit({active:this.active,direction:this.direction})}getNextSortDirection(e){if(!e)return"";let r=function(n,t){let e=["asc","desc"];return"desc"==n&&e.reverse(),t||e.push(""),e}(e.start||this.start,e?.disableClear??this.disableClear??!!this._defaultOptions?.disableClear),o=r.indexOf(this.direction)+1;return o>=r.length&&(o=0),r[o]}ngOnInit(){this._markInitialized()}ngOnChanges(){this._stateChanges.next()}ngOnDestroy(){this._stateChanges.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Pne,8))},n.\u0275dir=we({type:n,selectors:[["","matSort",""]],hostAttrs:[1,"mat-sort"],inputs:{disabled:["matSortDisabled","disabled"],active:["matSortActive","active"],start:["matSortStart","start"],direction:["matSortDirection","direction"],disableClear:["matSortDisableClear","disableClear"]},outputs:{sortChange:"matSortChange"},exportAs:["matSort"],features:[Ke,Gt]}),n})(),Tp=T7.ENTERING+" "+E7.STANDARD_CURVE,m_={indicator:_r("indicator",[wi("active-asc, asc",rn({transform:"translateY(0px)"})),wi("active-desc, desc",rn({transform:"translateY(10px)"})),gi("active-asc <=> active-desc",Ci(Tp))]),leftPointer:_r("leftPointer",[wi("active-asc, asc",rn({transform:"rotate(-45deg)"})),wi("active-desc, desc",rn({transform:"rotate(45deg)"})),gi("active-asc <=> active-desc",Ci(Tp))]),rightPointer:_r("rightPointer",[wi("active-asc, asc",rn({transform:"rotate(45deg)"})),wi("active-desc, desc",rn({transform:"rotate(-45deg)"})),gi("active-asc <=> active-desc",Ci(Tp))]),arrowOpacity:_r("arrowOpacity",[wi("desc-to-active, asc-to-active, active",rn({opacity:1})),wi("desc-to-hint, asc-to-hint, hint",rn({opacity:.54})),wi("hint-to-desc, active-to-desc, desc, hint-to-asc, active-to-asc, asc, void",rn({opacity:0})),gi("* => asc, * => desc, * => active, * => hint, * => void",Ci("0ms")),gi("* <=> *",Ci(Tp))]),arrowPosition:_r("arrowPosition",[gi("* => desc-to-hint, * => desc-to-active",Ci(Tp,kb([rn({transform:"translateY(-25%)"}),rn({transform:"translateY(0)"})]))),gi("* => hint-to-desc, * => active-to-desc",Ci(Tp,kb([rn({transform:"translateY(0)"}),rn({transform:"translateY(25%)"})]))),gi("* => asc-to-hint, * => asc-to-active",Ci(Tp,kb([rn({transform:"translateY(25%)"}),rn({transform:"translateY(0)"})]))),gi("* => hint-to-asc, * => active-to-asc",Ci(Tp,kb([rn({transform:"translateY(0)"}),rn({transform:"translateY(-25%)"})]))),wi("desc-to-hint, asc-to-hint, hint, desc-to-active, asc-to-active, active",rn({transform:"translateY(0)"})),wi("hint-to-desc, active-to-desc, desc",rn({transform:"translateY(-25%)"})),wi("hint-to-asc, active-to-asc, asc",rn({transform:"translateY(25%)"}))]),allowChildren:_r("allowChildren",[gi("* <=> *",[Jp("@*",Kp(),{optional:!0})])])},vA=(()=>{class n{constructor(){this.changes=new Ie}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac,providedIn:"root"}),n})(),pHe={provide:vA,deps:[[new Ts,new sd,vA]],useFactory:function(n){return n||new vA}},fHe=so(class{}),One=(()=>{class n extends fHe{get sortActionDescription(){return this._sortActionDescription}set sortActionDescription(e){this._updateSortActionDescription(e)}get disableClear(){return this._disableClear}set disableClear(e){this._disableClear=Rt(e)}constructor(e,i,r,o,s,a,l,c){super(),this._intl=e,this._changeDetectorRef=i,this._sort=r,this._columnDef=o,this._focusMonitor=s,this._elementRef=a,this._ariaDescriber=l,this._showIndicatorHint=!1,this._viewState={},this._arrowDirection="",this._disableViewStateAnimation=!1,this.arrowPosition="after",this._sortActionDescription="Sort",c?.arrowPosition&&(this.arrowPosition=c?.arrowPosition),this._handleStateChanges()}ngOnInit(){!this.id&&this._columnDef&&(this.id=this._columnDef.name),this._updateArrowDirection(),this._setAnimationTransitionState({toState:this._isSorted()?"active":this._arrowDirection}),this._sort.register(this),this._sortButton=this._elementRef.nativeElement.querySelector(".mat-sort-header-container"),this._updateSortActionDescription(this._sortActionDescription)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{let i=!!e;i!==this._showIndicatorHint&&(this._setIndicatorHintVisible(i),this._changeDetectorRef.markForCheck())})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._sort.deregister(this),this._rerenderSubscription.unsubscribe()}_setIndicatorHintVisible(e){this._isDisabled()&&e||(this._showIndicatorHint=e,this._isSorted()||(this._updateArrowDirection(),this._setAnimationTransitionState(this._showIndicatorHint?{fromState:this._arrowDirection,toState:"hint"}:{fromState:"hint",toState:this._arrowDirection})))}_setAnimationTransitionState(e){this._viewState=e||{},this._disableViewStateAnimation&&(this._viewState={toState:e.toState})}_toggleOnInteraction(){this._sort.sort(this),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0)}_handleClick(){this._isDisabled()||this._sort.sort(this)}_handleKeydown(e){!this._isDisabled()&&(32===e.keyCode||13===e.keyCode)&&(e.preventDefault(),this._toggleOnInteraction())}_isSorted(){return this._sort.active==this.id&&("asc"===this._sort.direction||"desc"===this._sort.direction)}_getArrowDirectionState(){return`${this._isSorted()?"active-":""}${this._arrowDirection}`}_getArrowViewState(){let e=this._viewState.fromState;return(e?`${e}-to-`:"")+this._viewState.toState}_updateArrowDirection(){this._arrowDirection=this._isSorted()?this._sort.direction:this.start||this._sort.start}_isDisabled(){return this._sort.disabled||this.disabled}_getAriaSortAttribute(){return this._isSorted()?"asc"==this._sort.direction?"ascending":"descending":"none"}_renderArrow(){return!this._isDisabled()||this._isSorted()}_updateSortActionDescription(e){this._sortButton&&(this._ariaDescriber?.removeDescription(this._sortButton,this._sortActionDescription),this._ariaDescriber?.describe(this._sortButton,e)),this._sortActionDescription=e}_handleStateChanges(){this._rerenderSubscription=tn(this._sort.sortChange,this._sort._stateChanges,this._intl.changes).subscribe(()=>{this._isSorted()&&(this._updateArrowDirection(),("hint"===this._viewState.toState||"active"===this._viewState.toState)&&(this._disableViewStateAnimation=!0),this._setAnimationTransitionState({fromState:this._arrowDirection,toState:"active"}),this._showIndicatorHint=!1),!this._isSorted()&&this._viewState&&"active"===this._viewState.toState&&(this._disableViewStateAnimation=!1,this._setAnimationTransitionState({fromState:"active",toState:this._arrowDirection})),this._changeDetectorRef.markForCheck()})}}return n.\u0275fac=function(e){return new(e||n)(C(vA),C($t),C($x,8),C("MAT_SORT_HEADER_COLUMN_DEF",8),C(Xr),C(Me),C(L1,8),C(Pne,8))},n.\u0275cmp=O({type:n,selectors:[["","mat-sort-header",""]],hostAttrs:[1,"mat-sort-header"],hostVars:3,hostBindings:function(e,i){1&e&&I("click",function(){return i._handleClick()})("keydown",function(o){return i._handleKeydown(o)})("mouseenter",function(){return i._setIndicatorHintVisible(!0)})("mouseleave",function(){return i._setIndicatorHintVisible(!1)}),2&e&&(Be("aria-sort",i._getAriaSortAttribute()),nt("mat-sort-header-disabled",i._isDisabled()))},inputs:{disabled:"disabled",id:["mat-sort-header","id"],arrowPosition:"arrowPosition",start:"start",sortActionDescription:"sortActionDescription",disableClear:"disableClear"},exportAs:["matSortHeader"],features:[Ke],attrs:sHe,ngContentSelectors:lHe,decls:4,vars:7,consts:[[1,"mat-sort-header-container","mat-focus-indicator"],[1,"mat-sort-header-content"],["class","mat-sort-header-arrow",4,"ngIf"],[1,"mat-sort-header-arrow"],[1,"mat-sort-header-stem"],[1,"mat-sort-header-indicator"],[1,"mat-sort-header-pointer-left"],[1,"mat-sort-header-pointer-right"],[1,"mat-sort-header-pointer-middle"]],template:function(e,i){1&e&&(Dn(),h(0,"div",0)(1,"div",1),zt(2),g(),S(3,aHe,6,6,"div",2),g()),2&e&&(nt("mat-sort-header-sorted",i._isSorted())("mat-sort-header-position-before","before"===i.arrowPosition),Be("tabindex",i._isDisabled()?null:0)("role",i._isDisabled()?null:"button"),v(3),_("ngIf",i._renderArrow()))},dependencies:[Fe],styles:[".mat-sort-header-container{display:flex;cursor:pointer;align-items:center;letter-spacing:normal;outline:0}[mat-sort-header].cdk-keyboard-focused .mat-sort-header-container,[mat-sort-header].cdk-program-focused .mat-sort-header-container{border-bottom:solid 1px currentColor}.mat-sort-header-disabled .mat-sort-header-container{cursor:default}.mat-sort-header-container::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px) * -1)}.mat-sort-header-content{text-align:center;display:flex;align-items:center}.mat-sort-header-position-before{flex-direction:row-reverse}.mat-sort-header-arrow{height:12px;width:12px;min-width:12px;position:relative;display:flex;opacity:0}.mat-sort-header-arrow,[dir=rtl] .mat-sort-header-position-before .mat-sort-header-arrow{margin:0 0 0 6px}.mat-sort-header-position-before .mat-sort-header-arrow,[dir=rtl] .mat-sort-header-arrow{margin:0 6px 0 0}.mat-sort-header-stem{background:currentColor;height:10px;width:2px;margin:auto;display:flex;align-items:center}.cdk-high-contrast-active .mat-sort-header-stem{width:0;border-left:solid 2px}.mat-sort-header-indicator{width:100%;height:2px;display:flex;align-items:center;position:absolute;top:0;left:0}.mat-sort-header-pointer-middle{margin:auto;height:2px;width:2px;background:currentColor;transform:rotate(45deg)}.cdk-high-contrast-active .mat-sort-header-pointer-middle{width:0;height:0;border-top:solid 2px;border-left:solid 2px}.mat-sort-header-pointer-left,.mat-sort-header-pointer-right{background:currentColor;width:6px;height:2px;position:absolute;top:0}.cdk-high-contrast-active .mat-sort-header-pointer-left,.cdk-high-contrast-active .mat-sort-header-pointer-right{width:0;height:0;border-left:solid 6px;border-top:solid 2px}.mat-sort-header-pointer-left{transform-origin:right;left:0}.mat-sort-header-pointer-right{transform-origin:left;right:0}"],encapsulation:2,data:{animation:[m_.indicator,m_.leftPointer,m_.rightPointer,m_.arrowOpacity,m_.arrowPosition,m_.allowChildren]},changeDetection:0}),n})(),kne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[pHe],imports:[Pe,fn]}),n})();function AV(n){return class extends n{get sticky(){return this._sticky}set sticky(t){let e=this._sticky;this._sticky=Rt(t),this._hasStickyChanged=e!==this._sticky}hasStickyChanged(){let t=this._hasStickyChanged;return this._hasStickyChanged=!1,t}resetStickyChanged(){this._hasStickyChanged=!1}constructor(...t){super(...t),this._sticky=!1,this._hasStickyChanged=!1}}}var RV=new ie("CDK_TABLE"),Fne=(new ie("text-column-options"),AV(class{}),new ie("_COALESCED_STYLE_SCHEDULER"),(()=>{class n{constructor(e,i){this.template=e,this._differs=i}ngOnChanges(e){if(!this._columnsDiffer){let i=e.columns&&e.columns.currentValue||[];this._columnsDiffer=this._differs.find(i).create(),this._columnsDiffer.diff(i)}}getColumnsDiff(){return this._columnsDiffer.diff(this.columns)}extractCellTemplate(e){return this instanceof Nne?e.headerCell.template:this instanceof Lne?e.footerCell.template:e.cell.template}}return n.\u0275fac=function(e){return new(e||n)(C(Si),C(wl))},n.\u0275dir=we({type:n,features:[Gt]}),n})()),gHe=AV(class extends Fne{}),Nne=(()=>{class n extends gHe{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Si),C(wl),C(RV,8))},n.\u0275dir=we({type:n,selectors:[["","cdkHeaderRowDef",""]],inputs:{columns:["cdkHeaderRowDef","columns"],sticky:["cdkHeaderRowDefSticky","sticky"]},features:[Ke,Gt]}),n})(),_He=AV(class extends Fne{}),Lne=(()=>{class n extends _He{constructor(e,i,r){super(e,i),this._table=r}ngOnChanges(e){super.ngOnChanges(e)}}return n.\u0275fac=function(e){return new(e||n)(C(Si),C(wl),C(RV,8))},n.\u0275dir=we({type:n,selectors:[["","cdkFooterRowDef",""]],inputs:{columns:["cdkFooterRowDef","columns"],sticky:["cdkFooterRowDefSticky","sticky"]},features:[Ke,Gt]}),n})(),Bne=(new ie("CDK_SPL"),(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Md]}),n})()),Vne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[fn,Bne,fn]}),n})(),PV=class extends Wv{get data(){return this._data.value}set data(t){t=Array.isArray(t)?t:[],this._data.next(t),this._renderChangesSubscription||this._filterData(t)}get filter(){return this._filter.value}set filter(t){this._filter.next(t),this._renderChangesSubscription||this._filterData(this.data)}get sort(){return this._sort}set sort(t){this._sort=t,this._updateChangeSubscription()}get paginator(){return this._paginator}set paginator(t){this._paginator=t,this._updateChangeSubscription()}constructor(t=[]){super(),this._renderData=new Ai([]),this._filter=new Ai(""),this._internalPageChanges=new Ie,this._renderChangesSubscription=null,this.sortingDataAccessor=(e,i)=>{let r=e[i];if(s2(r)){let o=Number(r);return o<9007199254740991?o:r}return r},this.sortData=(e,i)=>{let r=i.active,o=i.direction;return r&&""!=o?e.sort((s,a)=>{let l=this.sortingDataAccessor(s,r),c=this.sortingDataAccessor(a,r),d=typeof l,u=typeof c;d!==u&&("number"===d&&(l+=""),"number"===u&&(c+=""));let p=0;return null!=l&&null!=c?l>c?p=1:l<c&&(p=-1):null!=l?p=1:null!=c&&(p=-1),p*("asc"==o?1:-1)}):e},this.filterPredicate=(e,i)=>{let r=Object.keys(e).reduce((s,a)=>s+e[a]+"\u25ec","").toLowerCase(),o=i.trim().toLowerCase();return-1!=r.indexOf(o)},this._data=new Ai(t),this._updateChangeSubscription()}_updateChangeSubscription(){let t=this._sort?tn(this._sort.sortChange,this._sort.initialized):Ht(null),e=this._paginator?tn(this._paginator.page,this._internalPageChanges,this._paginator.initialized):Ht(null),r=dn([this._data,this._filter]).pipe(N(([a])=>this._filterData(a))),o=dn([r,t]).pipe(N(([a])=>this._orderData(a))),s=dn([o,e]).pipe(N(([a])=>this._pageData(a)));this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=s.subscribe(a=>this._renderData.next(a))}_filterData(t){return this.filteredData=null==this.filter||""===this.filter?t:t.filter(e=>this.filterPredicate(e,this.filter)),this.paginator&&this._updatePaginator(this.filteredData.length),this.filteredData}_orderData(t){return this.sort?this.sortData(t.slice(),this.sort):t}_pageData(t){if(!this.paginator)return t;let e=this.paginator.pageIndex*this.paginator.pageSize;return t.slice(e,e+this.paginator.pageSize)}_updatePaginator(t){Promise.resolve().then(()=>{let e=this.paginator;if(e&&(e.length=t,e.pageIndex>0)){let i=Math.ceil(e.length/e.pageSize)-1||0,r=Math.min(e.pageIndex,i);r!==e.pageIndex&&(e.pageIndex=r,this._internalPageChanges.next())}})}connect(){return this._renderChangesSubscription||this._updateChangeSubscription(),this._renderData}disconnect(){this._renderChangesSubscription?.unsubscribe(),this._renderChangesSubscription=null}},yA=class extends PV{},yHe=["filter"];function xHe(n,t){1&n&&li(0)}function CHe(n,t){1&n&&li(0)}var MHe=function(n){return{item:n}};function wHe(n,t){if(1&n&&(Ot(0),S(1,CHe,1,0,"ng-container",12),kt()),2&n){let e=t.$implicit;w();let i=it(14);v(1),_("ngTemplateOutlet",i)("ngTemplateOutletContext",In(2,MHe,e))}}function SHe(n,t){1&n&&(h(0,"div",13),P(1,"mat-spinner",14),g())}function EHe(n,t){1&n&&(h(0,"div",15),T(1,"No Runs"),g())}function THe(n,t){if(1&n&&(h(0,"div",15)(1,"span"),T(2,'No runs match "'),h(3,"code"),T(4),g(),T(5,'"'),g()()),2&n){let e=w();v(4),bt(e.regexFilter)}}var DHe=function(){return[5,10,20]};function IHe(n,t){if(1&n){let e=ge();h(0,"mat-paginator",16),I("page",function(r){return X(e),Q(w().onPaginationChange.emit(r))}),g()}if(2&n){let e=w();_("pageSizeOptions",cu(4,DHe))("pageIndex",e.paginationOption.pageIndex)("pageSize",e.paginationOption.pageSize)("length",e.filteredItemsLength)}}function AHe(n,t){if(1&n){let e=ge();h(0,"mat-checkbox",26),I("change",function(){return X(e),Q(w(3).handlePageToggle())}),g()}if(2&n){let e=w(3);_("checked",e.allPageItemsSelected())("indeterminate",!e.allPageItemsSelected()&&e.somePageItemsSelected())}}var Hne=function(n){return{type:n}};function RHe(n,t){if(1&n&&(h(0,"span",27),T(1,"Experiment"),g()),2&n){let e=w(3);_("mat-sort-header",In(1,Hne,e.SortType.EXPERIMENT_NAME))}}function PHe(n,t){if(1&n&&(h(0,"span",27),T(1,"Run"),g()),2&n){let e=w(3);_("mat-sort-header",In(1,Hne,e.SortType.RUN_NAME))}}function OHe(n,t){if(1&n&&(h(0,"span"),P(1,"runs-group-menu-button",28),g()),2&n){let e=w(3);v(1),_("experimentIds",e.experimentIds)}}var zne=function(n){return["column",n]};function kHe(n,t){if(1&n&&(h(0,"span",21),Ot(1,22),S(2,AHe,1,2,"mat-checkbox",23),S(3,RHe,2,3,"span",24),S(4,PHe,2,3,"span",24),S(5,OHe,2,1,"span",25),kt(),g()),2&n){let e=t.$implicit,i=w(2);_("ngClass",In(6,zne,"tb-column-"+e)),v(1),_("ngSwitch",e),v(1),_("ngSwitchCase",i.RunsTableColumn.CHECKBOX),v(1),_("ngSwitchCase",i.RunsTableColumn.EXPERIMENT_NAME),v(1),_("ngSwitchCase",i.RunsTableColumn.RUN_NAME),v(1),_("ngSwitchCase",i.RunsTableColumn.RUN_COLOR)}}function FHe(n,t){if(1&n){let e=ge();Ot(0),h(1,"div",37),I("click",function(r){return r.stopPropagation()}),h(2,"tb-range-input",38),I("rangeValuesChanged",function(r){X(e);let o=w(2).$implicit;return Q(w(2).handleHparamIntervalChanged(o,r))}),g()(),kt()}if(2&n){let e=w(2).$implicit;v(2),_("min",e.filter.minValue)("max",e.filter.maxValue)("lowerValue",e.filter.filterLowerValue)("upperValue",e.filter.filterUpperValue)}}function NHe(n,t){if(1&n){let e=ge();h(0,"div",40),I("click",function(r){return r.stopPropagation()}),h(1,"mat-checkbox",36),I("change",function(){let o=X(e).$implicit,s=w(3).$implicit;return Q(w(2).handleHparamDiscreteChanged(s,o))}),h(2,"span"),T(3),g()()()}if(2&n){let e=t.$implicit,i=w(3).$implicit;v(1),_("checked",i.filter.filterValues.includes(e)),v(2),bt(e)}}function LHe(n,t){if(1&n&&(Ot(0),S(1,NHe,4,2,"div",39),kt()),2&n){let e=w(2).$implicit;v(1),_("ngForOf",e.filter.possibleValues)}}function BHe(n,t){if(1&n){let e=ge();Ot(0),h(1,"button",32),I("click",function(r){return r.stopPropagation()}),P(2,"mat-icon",33),g(),h(3,"mat-menu",null,34)(5,"div",35),I("click",function(r){return r.stopPropagation()}),h(6,"mat-checkbox",36),I("change",function(){X(e);let r=w().$implicit;return Q(w(2).handleHparamIncludeUndefinedToggled(r))}),h(7,"span"),T(8,"(show empty value)"),g()()(),S(9,FHe,3,4,"ng-container",31),S(10,LHe,2,1,"ng-container",31),g(),kt()}if(2&n){let e=it(4),i=w().$implicit,r=w(2);v(1),_("matMenuTriggerFor",e),Be("aria-label","Filter hparam "+(i.displayName||i.name)),v(5),_("checked",i.filter.includeUndefined),v(3),_("ngIf",i.filter.type===r.DomainType.INTERVAL),v(1),_("ngIf",i.filter.type===r.DomainType.DISCRETE)}}var VHe=function(n,t){return{type:n,name:t}};function HHe(n,t){if(1&n&&(h(0,"span",29)(1,"span",30),T(2),g(),S(3,BHe,11,5,"ng-container",31),g()),2&n){let e=t.$implicit,i=w(2);_("mat-sort-header",qr(3,VHe,i.SortType.HPARAM,e.name)),v(2),bt(e.displayName||e.name),v(1),_("ngIf",e.filter)}}function zHe(n,t){if(1&n){let e=ge();Ot(0),h(1,"button",32),I("click",function(r){return r.stopPropagation()}),P(2,"mat-icon",33),g(),h(3,"mat-menu",null,34)(5,"div",35),I("click",function(r){return r.stopPropagation()}),h(6,"mat-checkbox",36),I("change",function(){X(e);let r=w().$implicit;return Q(w(2).handleMetricIncludeUndefinedChanged(r))}),h(7,"span"),T(8,"(show empty value)"),g()()(),h(9,"div",37),I("click",function(r){return r.stopPropagation()}),h(10,"tb-range-input",38),I("rangeValuesChanged",function(r){X(e);let o=w().$implicit;return Q(w(2).handleMetricFilterChanged(o,r))}),g()()(),kt()}if(2&n){let e=it(4),i=w().$implicit;v(1),_("matMenuTriggerFor",e),Be("aria-label","Filter metric "+(i.displayName||i.tag)),v(5),_("checked",i.filter.includeUndefined),v(4),_("min",i.filter.minValue)("max",i.filter.maxValue)("lowerValue",i.filter.filterLowerValue)("upperValue",i.filter.filterUpperValue)}}var UHe=function(n,t){return{type:n,tag:t}};function jHe(n,t){if(1&n&&(h(0,"span",29)(1,"span",30),T(2),g(),S(3,zHe,11,7,"ng-container",31),g()),2&n){let e=t.$implicit,i=w(2);_("mat-sort-header",qr(3,UHe,i.SortType.METRIC,e.tag)),v(2),bt(e.displayName||e.tag),v(1),_("ngIf",e.filter)}}function GHe(n,t){if(1&n){let e=ge();h(0,"div",17)(1,"div",18),I("matSortChange",function(r){return X(e),Q(w().handleSortChange(r))}),S(2,kHe,6,8,"span",19),S(3,HHe,4,6,"span",20),S(4,jHe,4,6,"span",20),g()()}if(2&n){let e=w();v(1),_("matSortActive",e.sortOption.column),v(1),_("ngForOf",e.columns),v(1),_("ngForOf",e.hparamColumns)("ngForTrackBy",e.trackByHparamColumn),v(1),_("ngForOf",e.metricColumns)("ngForTrackBy",e.trackByMetricColumn)}}function WHe(n,t){if(1&n){let e=ge();h(0,"span")(1,"mat-checkbox",47),I("change",function(){X(e);let r=w(2).item;return Q(w().onSelectionToggle.emit(r))})("dblclick",function(){X(e);let r=w(2).item;return Q(w().onSelectionDblClick.emit(r.run.id))}),g()()}if(2&n){let e=w(2).item;v(1),_("checked",e.selected)}}function qHe(n,t){if(1&n&&P(0,"tb-experiment-alias",48),2&n){let e=w(2).item;_("alias",e.experimentAlias)("title",e.experimentName)}}function YHe(n,t){if(1&n&&(h(0,"span",30),T(1),g()),2&n){let e=w(2).item;v(1),bt(e.run.name)}}var XHe=function(n){return{"run-color-swatch":!0,"no-color":n}};function QHe(n,t){if(1&n){let e=ge();h(0,"span")(1,"button",49),I("colorPickerChange",function(r){X(e);let o=w(2).item;return Q(w().onRunColorChange.emit({runId:o.run.id,newColor:r}))}),g()()}if(2&n){let e=w(2).item;v(1),Tt("background",e.runColor),_("ngClass",In(8,XHe,!e.runColor))("colorPicker",e.runColor)("cpDialogDisplay","popup")("cpPositionOffset",-20)("cpUseRootViewContainer",!0)("cpOutputFormat","hex")}}function ZHe(n,t){if(1&n&&(h(0,"span",44),Ot(1,22),S(2,WHe,2,1,"span",25),S(3,qHe,1,2,"tb-experiment-alias",45),S(4,YHe,2,1,"span",46),S(5,QHe,2,10,"span",25),kt(),g()),2&n){let e=t.$implicit,i=w(2);_("ngClass",In(6,zne,"tb-column-"+e)),v(1),_("ngSwitch",e),v(1),_("ngSwitchCase",i.RunsTableColumn.CHECKBOX),v(1),_("ngSwitchCase",i.RunsTableColumn.EXPERIMENT_NAME),v(1),_("ngSwitchCase",i.RunsTableColumn.RUN_NAME),v(1),_("ngSwitchCase",i.RunsTableColumn.RUN_COLOR)}}function KHe(n,t){if(1&n&&(h(0,"span",50),T(1),g()),2&n){let e=t.$implicit,i=w().item;v(1),bt(i.hparams.get(e.name))}}function JHe(n,t){if(1&n&&(h(0,"span",50),T(1),g()),2&n){let e=t.$implicit,i=w().item;v(1),bt(i.metrics.get(e.tag))}}function $He(n,t){if(1&n&&(h(0,"div",41),S(1,ZHe,6,8,"span",42),S(2,KHe,2,1,"span",43),S(3,JHe,2,1,"span",43),g()),2&n){let e=t.item,i=w();Be("data-id",e.run.id),v(1),_("ngForOf",i.columns),v(1),_("ngForOf",i.hparamColumns),v(1),_("ngForOf",i.metricColumns)}}var e5e=(()=>{class n extends Cm{constructor(){super(...arguments),this.itemsPerPageLabel="Show runs:"}}return n.\u0275fac=function(){let t;return function(i){return(t||(t=Xn(n)))(i||n)}}(),n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),Une=(()=>{class n{constructor(){this.dataSource=new yA,this.DomainType=gn,this.RunsTableColumn=bs,this.SortType=Ic,this.onRegexFilterChange=new F,this.onSelectionToggle=new F,this.onSelectionDblClick=new F,this.onPageSelectionToggle=new F,this.onPaginationChange=new F,this.onSortChange=new F,this.onRunColorChange=new F,this.onHparamDiscreteFilterChanged=new F,this.onHparamIntervalFilterChanged=new F,this.onMetricFilterChanged=new F}ngOnChanges(){this.dataSource.data=this.pageItems}getHparamColumnId(e){return`h:${e.name}`}getMetricColumnId(e){return`m:${e.tag}`}getColumnIds(){return[...this.columns,...this.hparamColumns.map(this.getHparamColumnId),...this.metricColumns.map(this.getMetricColumnId)]}allPageItemsSelected(){return Boolean(this.pageItems.length)&&this.pageItems.every(e=>e.selected)}somePageItemsSelected(){return this.pageItems.some(e=>e.selected)}handlePageToggle(){this.onPageSelectionToggle.emit({items:this.pageItems})}handleSortChange(e){let i;switch(e.direction){case"asc":i=Ya.ASC;break;case"desc":i=Ya.DESC;break;default:i=Ya.UNSET}this.onSortChange.emit({key:e.active,direction:i})}onFilterKeyUp(e){this.onRegexFilterChange.emit(e.target.value)}tableTrackBy(e,i){return i.run.id}handleHparamIncludeUndefinedToggled(e){let{name:i,filter:r}=e;if(!r)throw new RangeError("Invariant error: require filter to exist for it to change");r.type===gn.DISCRETE?this.onHparamDiscreteFilterChanged.emit({hparamName:i,includeUndefined:!r.includeUndefined,filterValues:r.filterValues}):this.onHparamIntervalFilterChanged.emit({name:i,includeUndefined:!r.includeUndefined,filterLowerValue:r.filterLowerValue,filterUpperValue:r.filterUpperValue})}handleHparamIntervalChanged(e,i){let{name:r,filter:o}=e;if(!o)throw new RangeError("Invariant error: require filter to exist for it to change");this.onHparamIntervalFilterChanged.emit({name:r,includeUndefined:o.includeUndefined,filterLowerValue:i.lowerValue,filterUpperValue:i.upperValue})}handleHparamDiscreteChanged(e,i){let{name:r,filter:o}=e;if(!o)throw new RangeError("Invariant error: require filter to exist for it to change");if(o.type!==gn.DISCRETE)throw new RangeError(`Invariant error: expected discrete domain for ${r}`);let s=new Set([...o.filterValues]);s.has(i)?s.delete(i):s.add(i),this.onHparamDiscreteFilterChanged.emit({hparamName:r,includeUndefined:o.includeUndefined,filterValues:[...s]})}handleMetricIncludeUndefinedChanged(e){if(!e.filter)throw new RangeError("Invariant error: require filter to exist for it to change");this.onMetricFilterChanged.emit({name:e.tag,includeUndefined:!e.filter.includeUndefined,filterLowerValue:e.filter.filterLowerValue,filterUpperValue:e.filter.filterUpperValue})}handleMetricFilterChanged(e,i){if(!e.filter)throw new RangeError("Invariant error: require filter to exist for it to change");this.onMetricFilterChanged.emit({name:e.tag,includeUndefined:e.filter.includeUndefined,filterLowerValue:i.lowerValue,filterUpperValue:i.upperValue})}trackByHparamColumn(e){return e.name}trackByMetricColumn(e){return e.tag}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["runs-table-component"]],viewQuery:function(e,i){if(1&e&&(Ge(yHe,7,Me),Ge(bA,7),Ge($x,7)),2&e){let r;Se(r=Ee())&&(i.filter=r.first),Se(r=Ee())&&(i.paginator=r.first),Se(r=Ee())&&(i.sort=r.first)}},hostVars:2,hostBindings:function(e,i){2&e&&nt("flex-layout",i.useFlexibleLayout)},inputs:{experimentIds:"experimentIds",showExperimentName:"showExperimentName",columns:"columns",hparamColumns:"hparamColumns",metricColumns:"metricColumns",allItemsLength:"allItemsLength",filteredItemsLength:"filteredItemsLength",useFlexibleLayout:"useFlexibleLayout",usePagination:"usePagination",pageItems:"pageItems",loading:"loading",numSelectedItems:"numSelectedItems",sortOption:"sortOption",paginationOption:"paginationOption",regexFilter:"regexFilter"},outputs:{onRegexFilterChange:"onRegexFilterChange",onSelectionToggle:"onSelectionToggle",onSelectionDblClick:"onSelectionDblClick",onPageSelectionToggle:"onPageSelectionToggle",onPaginationChange:"onPaginationChange",onSortChange:"onSortChange",onRunColorChange:"onRunColorChange",onHparamDiscreteFilterChanged:"onHparamDiscreteFilterChanged",onHparamIntervalFilterChanged:"onHparamIntervalFilterChanged",onMetricFilterChanged:"onMetricFilterChanged"},features:[Qt([{provide:Cm,useClass:e5e}]),Gt],decls:15,vars:8,consts:[[1,"filter-row"],["placeholder","Filter runs (regex)",1,"run-filter",3,"value","keyup"],[1,"table-container"],["role","table"],[4,"ngTemplateOutlet"],["role","rowgroup",1,"rows"],[4,"ngFor","ngForOf","ngForTrackBy"],["class","loading",4,"ngIf"],["class","no-runs",4,"ngIf"],["showFirstLastButtons","",3,"pageSizeOptions","pageIndex","pageSize","length","page",4,"ngIf"],["header",""],["row",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"loading"],["mode","indeterminate","diameter","28"],[1,"no-runs"],["showFirstLastButtons","",3,"pageSizeOptions","pageIndex","pageSize","length","page"],["role","rowgroup",1,"header"],["matSort","","role","row",3,"matSortActive","matSortChange"],["role","columnheader",3,"ngClass",4,"ngFor","ngForOf"],["role","columnheader","class","column",3,"mat-sort-header",4,"ngFor","ngForOf","ngForTrackBy"],["role","columnheader",3,"ngClass"],[3,"ngSwitch"],[3,"checked","indeterminate","change",4,"ngSwitchCase"],[3,"mat-sort-header",4,"ngSwitchCase"],[4,"ngSwitchCase"],[3,"checked","indeterminate","change"],[3,"mat-sort-header"],[3,"experimentIds"],["role","columnheader",1,"column",3,"mat-sort-header"],[1,"name"],[4,"ngIf"],["mat-icon-button","",3,"matMenuTriggerFor","click"],["svgIcon","filter_alt_24px"],["filterMenu","matMenu"],["mat-menu-item","","role","menuitemcheckbox","disableRipple","",1,"filter-menu-checkbox-row",3,"click"],[3,"checked","change"],["disableRipple","","mat-menu-item","",1,"range-input-container",3,"click"],[3,"min","max","lowerValue","upperValue","rangeValuesChanged"],["mat-menu-item","","class","filter-menu-checkbox-row","role","menuitemcheckbox",3,"click",4,"ngFor","ngForOf"],["mat-menu-item","","role","menuitemcheckbox",1,"filter-menu-checkbox-row",3,"click"],["role","row"],["role","cell",3,"ngClass",4,"ngFor","ngForOf"],["role","cell","class","column",4,"ngFor","ngForOf"],["role","cell",3,"ngClass"],[3,"alias","title",4,"ngSwitchCase"],["class","name",4,"ngSwitchCase"],["title","Click to toggle run selection or double click to select only this run.",3,"checked","change","dblclick"],[3,"alias","title"],[3,"ngClass","colorPicker","cpDialogDisplay","cpPositionOffset","cpUseRootViewContainer","cpOutputFormat","colorPickerChange"],["role","cell",1,"column"]],template:function(e,i){if(1&e&&(h(0,"div",0)(1,"tb-filter-input",1),I("keyup",function(o){return i.onFilterKeyUp(o)}),g()(),h(2,"div",2)(3,"div",3),S(4,xHe,1,0,"ng-container",4),h(5,"div",5),S(6,wHe,2,4,"ng-container",6),g()(),S(7,SHe,2,0,"div",7),S(8,EHe,2,0,"div",8),S(9,THe,6,1,"div",8),g(),S(10,IHe,1,5,"mat-paginator",9),S(11,GHe,5,6,"ng-template",null,10,Wt),S(13,$He,4,4,"ng-template",null,11,Wt)),2&e){let r=it(12);v(1),Wi("value",i.regexFilter),v(3),_("ngTemplateOutlet",r),v(2),_("ngForOf",i.pageItems)("ngForTrackBy",i.tableTrackBy),v(1),_("ngIf",i.loading),v(1),_("ngIf",!i.loading&&0===i.allItemsLength),v(1),_("ngIf",!i.loading&&i.allItemsLength>0&&0===i.filteredItemsLength),v(1),_("ngIf",i.usePagination)}},dependencies:[gA,yn,nn,Fe,Lr,sr,Sr,Qu,Sp,$i,ha,En,Nc,jl,Lc,bA,tl,$x,One,dA,_A],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;font-size:13px;overflow:hidden}.filter-row[_ngcontent-%COMP%]{flex:none}.table-container[_ngcontent-%COMP%]{contain:layout paint;flex-grow:1;max-width:100%;overflow-x:auto;overflow-y:auto;will-change:transform,scroll-position}.flex-layout[_nghost-%COMP%]   .name[_ngcontent-%COMP%]{word-break:break-word;overflow-wrap:break-word}.flex-layout[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #ebebeb;padding-bottom:12px}body.dark-mode   .flex-layout[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{border-top:1px solid #555}[role=table][_ngcontent-%COMP%]{display:table;width:100%}[role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]{white-space:nowrap}[role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%]{background-color:#fff;position:sticky;top:0;z-index:1}body.dark-mode[_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   .header[_ngcontent-%COMP%]   [role=columnheader][_ngcontent-%COMP%]{background-color:#303030}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]{contain:strict;display:table-row;height:43px}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:table-cell;padding:5px;vertical-align:middle}body.dark-mode[_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   [role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]{border-bottom:1px solid #555}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:first-child{padding-left:24px}[role=table][_ngcontent-%COMP%]   [role=row][_ngcontent-%COMP%]   .column[_ngcontent-%COMP%]:last-child{padding-right:24px}[role=rowgroup][_ngcontent-%COMP%]{display:table-row-group}[role=rowgroup].header[_ngcontent-%COMP%]{display:table-header-group}.loading[_ngcontent-%COMP%], .no-runs[_ngcontent-%COMP%]{align-items:center;border:0;border-bottom:1px solid #ebebeb;display:flex;height:48px;padding:0 24px}body.dark-mode[_nghost-%COMP%]   .loading[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .loading[_ngcontent-%COMP%]{border-bottom:1px solid #555}body.dark-mode[_nghost-%COMP%]   .no-runs[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .no-runs[_ngcontent-%COMP%]{border-bottom:1px solid #555}.loading[_ngcontent-%COMP%]{justify-content:center}.select-all[_ngcontent-%COMP%]   th[_ngcontent-%COMP%]{padding-bottom:12px;padding-top:12px}.select-all-content[_ngcontent-%COMP%], .select-all-content[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:400;line-height:1.6;text-align:left}.select-all-content[_ngcontent-%COMP%]   button[_ngcontent-%COMP%]{font-weight:500;padding:0 4px}.filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #ebebeb;display:flex;align-items:center;height:48px;padding:0 16px 0 21px}body.dark-mode[_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .filter-row[_ngcontent-%COMP%]{border-bottom:1px solid #555}.filter-row[_ngcontent-%COMP%]   tb-filter-input[_ngcontent-%COMP%]{flex-grow:1}.tb-column-checkbox[_ngcontent-%COMP%], .tb-column-run_color[_ngcontent-%COMP%]{width:20px}.tb-column-run_color[_ngcontent-%COMP%]{text-align:center}.run-color-swatch[_ngcontent-%COMP%]{border-radius:100%;border:1px solid #ebebeb;height:20px;width:20px;outline:none}.run-color-swatch.no-color[_ngcontent-%COMP%]{border-color:#c6cad1;border-width:2px}.range-input-container[_ngcontent-%COMP%]{height:auto}[_nghost-%COMP%]     mat-paginator mat-form-field{margin:0}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label{display:flex;height:100%;align-items:center}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label .mat-checkbox-inner-container{margin-left:0}.filter-menu-checkbox-row[_ngcontent-%COMP%]   mat-checkbox[_ngcontent-%COMP%]     label .mat-checkbox-label{overflow:hidden;text-overflow:ellipsis}body.dark-mode[_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   mat-paginator[_ngcontent-%COMP%]{background-color:#303030}"],changeDetection:0}),n})();function n5e(n,t){if(1&n){let e=ge();h(0,"runs-table-component",2),I("onSelectionToggle",function(r){return X(e),Q(w().onRunItemSelectionToggle(r))})("onSelectionDblClick",function(r){return X(e),Q(w().onRunSelectionDblClick(r))})("onPageSelectionToggle",function(r){return X(e),Q(w().onPageSelectionToggle(r))})("onPaginationChange",function(r){return X(e),Q(w().onPaginationChange(r))})("onRegexFilterChange",function(r){return X(e),Q(w().onRegexFilterChange(r))})("onSortChange",function(r){return X(e),Q(w().onSortChange(r))})("onRunColorChange",function(r){return X(e),Q(w().onRunColorChange(r))})("onHparamIntervalFilterChanged",function(r){return X(e),Q(w().onHparamIntervalFilterChanged(r))})("onHparamDiscreteFilterChanged",function(r){return X(e),Q(w().onHparamDiscreteFilterChanged(r))})("onMetricFilterChanged",function(r){return X(e),Q(w().onMetricFilterChanged(r))}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),j(9,"async"),j(10,"async"),g()}if(2&n){let e=w();_("experimentIds",e.experimentIds)("useFlexibleLayout",e.useFlexibleLayout)("numSelectedItems",W(1,15,e.numSelectedItems$))("columns",e.columns)("hparamColumns",W(2,17,e.hparamColumns$))("metricColumns",W(3,19,e.metricColumns$))("showExperimentName",e.isExperimentNameVisible())("pageItems",W(4,21,e.pageItems$))("filteredItemsLength",W(5,23,e.filteredItemsLength$))("allItemsLength",W(6,25,e.allItemsLength$))("loading",W(7,27,e.loading$))("paginationOption",W(8,29,e.paginationOption$))("regexFilter",W(9,31,e.regexFilter$))("sortOption",W(10,33,e.sortOption$))("usePagination",e.usePagination)}}function i5e(n,t){if(1&n){let e=ge();h(0,"runs-data-table",3),I("sortDataBy",function(r){return X(e),Q(w().sortDataBy(r))})("orderColumns",function(r){return X(e),Q(w().orderColumns(r))})("onSelectionToggle",function(r){return X(e),Q(w().onRunSelectionToggle(r))})("onAllSelectionToggle",function(r){return X(e),Q(w().onAllSelectionToggle(r))})("onRunColorChange",function(r){return X(e),Q(w().onRunColorChange(r))})("onRegexFilterChange",function(r){return X(e),Q(w().onRegexFilterChange(r))})("onSelectionDblClick",function(r){return X(e),Q(w().onRunSelectionDblClick(r))})("toggleFullScreen",function(){return X(e),Q(w().toggleFullScreen())})("addColumn",function(r){return X(e),Q(w().addColumn(r))})("removeColumn",function(r){return X(e),Q(w().removeColumn(r))})("addFilter",function(r){return X(e),Q(w().addHparamFilter(r))}),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async"),g()}if(2&n){let e=w();_("headers",W(1,9,e.runsColumns$))("data",W(2,11,e.sortedRunsTableData$))("selectableColumns",W(3,13,e.selectableColumns$))("columnFilters",W(4,15,e.columnFilters$))("sortingInfo",W(5,17,e.sortingInfo$))("experimentIds",e.experimentIds)("regexFilter",W(6,19,e.regexFilter$))("isFullScreen",W(7,21,e.runsTableFullScreen$))("loading",W(8,23,e.loading$))}}var r5e=q(Ev,n=>n.state===Te.LOADING);function jne(n,t){switch(t.type){case Ic.EXPERIMENT_NAME:return[n.experimentAlias,n.run.name,n.run.id];case Ic.RUN_NAME:return[n.run.name,n.experimentAlias,n.run.id];case Ic.HPARAM:return[n.hparams.get(t.name),n.run.name,n.experimentAlias,n.run.id];case Ic.METRIC:return[n.metrics.get(t.tag),n.run.name,n.experimentAlias,n.run.id];default:throw new Error(`Not yet implemented: ${t}`)}}function Gne(n,t){return void 0===t?n.includeUndefined:n.type===gn.DISCRETE?n.filterValues.includes(t):n.type===gn.INTERVAL&&n.filterLowerValue<=t&&t<=n.filterUpperValue}var Wne=(()=>{class n{constructor(e){this.store=e,this.sortedRunsTableData$=Ht([]),this.loading$=null,this.sortingInfo$=this.store.select(WW),this.hparamColumns$=Ht([]),this.metricColumns$=Ht([]),this.useFlexibleLayout=!1,this.usePagination=!1,this.columns=[bs.RUN_NAME],this.showHparamsAndMetrics=!1,this.forceLegacyTable=!1,this.sortOption$=this.store.select(e2),this.paginationOption$=this.store.select($F),this.regexFilter$=this.store.select(vd),this.hparamsEnabled=new Ai(!1),this.runsColumns$=this.store.select(GW),this.runsTableFullScreen$=this.store.select(Lh),this.selectableColumns$=this.store.select(kN).pipe(Li(this.runsColumns$),N(([i,r])=>{let o=new Set(r.map(({name:s})=>s));return i.filter(s=>!o.has(s.name))})),this.columnFilters$=this.store.select(MQ),this.allRunsTableData$=this.store.select(ON).pipe(N(i=>i.map(r=>({...Object.fromEntries(r.hparams.entries()),id:r.run.id,run:r.run.name,experimentAlias:r.experimentAlias,selected:r.selected,color:r.runColor})))),this.ngUnsubscribe=new Ie}isExperimentNameVisible(){return this.columns.some(e=>e===bs.EXPERIMENT_NAME)}ngOnInit(){this.store.select(md).subscribe(s=>{this.hparamsEnabled.next(s)});let e=this.experimentIds.map(s=>this.getRunTableItemsForExperiment(s));this.sortedRunsTableData$=dn([this.allRunsTableData$,this.sortingInfo$]).pipe(N(([s,a])=>function(n,t){let e=[...n];return e.sort((r,o)=>{let s=r[t.name],a=o[t.name];if("experimentAlias"===t.name&&(s=s.aliasNumber,a=a.aliasNumber),s===a)return 0;if(void 0===s||void 0===a)return i(s,a);if(mne.has(typeof s)&&mne.has(typeof a)){let l=hne(s),c=hne(a);if((void 0===l||void 0===c)&&l!==c)return i(l,c,{insertUndefined:Ep.BEFORE});if(void 0!==l&&void 0!==c)return l===c?i(s.toString().slice(l.toString().length)||void 0,a.toString().slice(c.toString().length)||void 0,{insertUndefined:Ep.BEFORE}):i(l,c)}return i(s,a)}),e;function i(r,o,{insertUndefined:s}=mVe){return r===o?0:void 0===r?s===Ep.AFTER?1:-1:void 0===o?s===Ep.AFTER?-1:1:r<o==(t.order===io.ASCENDING)?-1:1}}(s,a)));let i=dn(e).pipe(N(s=>[].concat(...s)));this.allUnsortedRunTableItems$=i.pipe(ot(this.ngUnsubscribe),Ms(1)),this.allItemsLength$=this.allUnsortedRunTableItems$.pipe(N(s=>s.length));let r=this.getFilteredItems$(this.allUnsortedRunTableItems$).pipe(ot(this.ngUnsubscribe),Ms(1));this.filteredItemsLength$=r.pipe(N(s=>s.length)),this.pageItems$=this.sortedAndSlicedItems$(r),this.numSelectedItems$=this.allUnsortedRunTableItems$.pipe(N(s=>s.reduce((a,l)=>a+Number(l.selected),0)));let o=this.experimentIds.map(s=>this.store.select(r5e,{experimentId:s}));if(this.loading$=dn(o).pipe(N(s=>s.some(a=>a))),this.showHparamsAndMetrics){let s=this.store.select(Tu.getExperimentsHparamsAndMetricsSpecs,{experimentIds:this.experimentIds});this.hparamColumns$=dn([this.store.select(Tu.getHparamFilterMap,this.experimentIds),s]).pipe(N(([a,{hparams:l}])=>l.map(({name:c,displayName:d})=>{let p=a.get(c);if(!p)throw new RangeError(`Invariant error: a filter for ${c} must exist when the hparam exists`);return{displayName:d,name:c,filter:p}}))),this.metricColumns$=dn([this.store.select(Tu.getMetricFilterMap,this.experimentIds),s]).pipe(N(([a,{metrics:l}])=>l.map(({tag:c,displayName:d})=>{let u=a.get(c);if(!u)throw new RangeError(`Invariant error: a filter for ${c} must exist when the metric exists`);return{displayName:d,tag:c,filter:u}})))}this.columns.includes(bs.CHECKBOX)&&this.store.select(No).pipe(ot(this.ngUnsubscribe),Yn((a,l)=>Fo(a,l)),Jn(()=>i.pipe(ke(a=>a.length>500),Yt(1)))).subscribe(()=>{this.store.dispatch(Jh({localizedMessage:"The number of runs exceeds 500. New runs are unselected for performance reasons."}))}),this.store.dispatch(Vh({experimentIds:this.experimentIds}))}ngOnDestroy(){this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}getFilteredItems$(e){return dn([e,this.store.select(vd)]).pipe(N(([i,r])=>{if(!r)return i;let o=this.columns.includes(bs.EXPERIMENT_NAME);return i.filter(s=>Qh({runName:s.run.name,experimentAlias:s.experimentAlias},r,o))}),Jn(i=>this.showHparamsAndMetrics?dn(this.store.select(Tu.getHparamFilterMap,this.experimentIds),this.store.select(Tu.getMetricFilterMap,this.experimentIds)).pipe(N(([r,o])=>i.filter(({hparams:s,metrics:a})=>[...r.entries()].every(([c,d])=>Gne(d,s.get(c)))&&[...o.entries()].every(([c,d])=>Gne(d,a.get(c)))))):Ht(i)))}sortedAndSlicedItems$(e){let i=dn([e,this.store.select(e2)]).pipe(N(([o,s])=>function(n,t){let e=t.key,i=[...n];return null===e||t.direction===Ya.UNSET||i.sort((r,o)=>{let s=jne(r,e),a=jne(o,e);if(s.length!==a.length)throw new Error(`Invariant error: a given sort should result in same number of items: ${t}`);for(let l=0;l<s.length;l++){let c=s[l],d=a[l];if(c!==d){if(void 0===c||void 0===d)return void 0===d?-1:1;if(typeof c!=typeof d)throw new Error(`Cannot compare values of different types: ${typeof c} vs. ${typeof d}`);return c<d==(t.direction===Ya.ASC)?-1:1}}return 0}),i}(o,s)));return dn([i,this.store.select($F)]).pipe(N(([o,s])=>{if(!this.usePagination)return o.slice();let{pageSize:a,pageIndex:l}=s;return o.slice(l*a,(l+1)*a)}),qn([]))}sortDataBy(e){this.store.dispatch(AS({sortingInfo:e}))}getRunTableItemsForExperiment(e){return dn([this.store.select(Du,{experimentId:e}),this.store.select(BS,{experimentId:e}),this.store.select(Iu),this.store.select(Au),this.store.select(za)]).pipe(N(([i,r,o,s,a])=>i.map(l=>{let c=new Map;(l.hparams||[]).forEach(u=>{c.set(u.name,u.value)});let d=new Map;return(l.metrics||[]).forEach(u=>{d.set(u.tag,u.value)}),{run:l,experimentName:r?.name||"",experimentAlias:a[e],selected:Boolean(o&&o.get(l.id)),runColor:s[l.id],hparams:c,metrics:d}})))}onRunItemSelectionToggle(e){this.store.dispatch(cv({runId:e.run.id}))}onRunSelectionToggle(e){this.store.dispatch(cv({runId:e}))}onRunSelectionDblClick(e){this.store.dispatch(wS({runId:e}))}onAllSelectionToggle(e){this.store.dispatch(dv({runIds:e}))}onPageSelectionToggle(e){let{items:i}=e,r=i.map(({run:o})=>o.id);this.store.dispatch(dv({runIds:r}))}onPaginationChange(e){if(!this.usePagination)throw new Error("Pagination events cannot be dispatched when pagination is disabled");let{pageIndex:i,pageSize:r}=e;this.store.dispatch(SS({pageIndex:i,pageSize:r}))}onSortChange(e){this.store.dispatch(ES(e))}onRegexFilterChange(e){this.store.dispatch(uv({regexString:e}))}onRunColorChange({runId:e,newColor:i}){this.store.dispatch(TS({runId:e,newColor:i}))}onHparamDiscreteFilterChanged(e){let{hparamName:i,filterValues:r,includeUndefined:o}=e;this.store.dispatch(Ec.hparamsDiscreteHparamFilterChanged({experimentIds:this.experimentIds,hparamName:i,filterValues:r,includeUndefined:o}))}onHparamIntervalFilterChanged(e){let{name:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}=e;this.store.dispatch(Ec.hparamsIntervalHparamFilterChanged({experimentIds:this.experimentIds,hparamName:i,filterLowerValue:r,filterUpperValue:o,includeUndefined:s}))}onMetricFilterChanged(e){let{name:i,includeUndefined:r,filterLowerValue:o,filterUpperValue:s}=e;this.store.dispatch(Ec.hparamsMetricFilterChanged({experimentIds:this.experimentIds,metricTag:i,includeUndefined:r,filterLowerValue:o,filterUpperValue:s}))}toggleFullScreen(){this.store.dispatch(bS())}addColumn({header:e,index:i}){e.enabled=!0,this.store.dispatch(DS({header:{...e,enabled:!0},index:i}))}removeColumn(e){this.store.dispatch(zh({header:e}))}orderColumns(e){this.store.dispatch(IS({newHeaderOrder:e}))}useDataTable(){return this.hparamsEnabled.value&&!this.forceLegacyTable}addHparamFilter(e){this.store.dispatch(Ec.dashboardHparamFilterAdded({name:e.header.name,filter:e.value}))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["runs-table"]],hostVars:2,hostBindings:function(e,i){2&e&&nt("flex-layout",i.useFlexibleLayout)},inputs:{useFlexibleLayout:"useFlexibleLayout",usePagination:"usePagination",columns:"columns",experimentIds:"experimentIds",showHparamsAndMetrics:"showHparamsAndMetrics",forceLegacyTable:"forceLegacyTable"},decls:2,vars:2,consts:[[3,"experimentIds","useFlexibleLayout","numSelectedItems","columns","hparamColumns","metricColumns","showExperimentName","pageItems","filteredItemsLength","allItemsLength","loading","paginationOption","regexFilter","sortOption","usePagination","onSelectionToggle","onSelectionDblClick","onPageSelectionToggle","onPaginationChange","onRegexFilterChange","onSortChange","onRunColorChange","onHparamIntervalFilterChanged","onHparamDiscreteFilterChanged","onMetricFilterChanged",4,"ngIf"],[3,"headers","data","selectableColumns","columnFilters","sortingInfo","experimentIds","regexFilter","isFullScreen","loading","sortDataBy","orderColumns","onSelectionToggle","onAllSelectionToggle","onRunColorChange","onRegexFilterChange","onSelectionDblClick","toggleFullScreen","addColumn","removeColumn","addFilter",4,"ngIf"],[3,"experimentIds","useFlexibleLayout","numSelectedItems","columns","hparamColumns","metricColumns","showExperimentName","pageItems","filteredItemsLength","allItemsLength","loading","paginationOption","regexFilter","sortOption","usePagination","onSelectionToggle","onSelectionDblClick","onPageSelectionToggle","onPaginationChange","onRegexFilterChange","onSortChange","onRunColorChange","onHparamIntervalFilterChanged","onHparamDiscreteFilterChanged","onMetricFilterChanged"],[3,"headers","data","selectableColumns","columnFilters","sortingInfo","experimentIds","regexFilter","isFullScreen","loading","sortDataBy","orderColumns","onSelectionToggle","onAllSelectionToggle","onRunColorChange","onRegexFilterChange","onSelectionDblClick","toggleFullScreen","addColumn","removeColumn","addFilter"]],template:function(e,i){1&e&&(S(0,n5e,11,35,"runs-table-component",0),S(1,i5e,9,25,"runs-data-table",1)),2&e&&(_("ngIf",!i.useDataTable()),v(1),_("ngIf",i.useDataTable()))},dependencies:[Fe,Sne,Une,ct],styles:["[_nghost-%COMP%] {\n        position: relative;\n      }\n\n      .flex-layout[_nghost-%COMP%] {\n        display: flex;\n      }\n\n      .flex-layout[_nghost-%COMP%]    > runs-table-component[_ngcontent-%COMP%] {\n        width: 100%;\n      }\n\n      .flex-layout[_nghost-%COMP%]    > tb-data-table[_ngcontent-%COMP%] {\n        overflow-y: scroll;\n        width: 100%;\n      }"],changeDetection:0}),n})(),qne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["runs-selector-component"]],inputs:{experimentIds:"experimentIds",showHparamsAndMetrics:"showHparamsAndMetrics",columns:"columns"},decls:1,vars:4,consts:[[3,"useFlexibleLayout","columns","experimentIds","showHparamsAndMetrics"]],template:function(e,i){1&e&&P(0,"runs-table",0),2&e&&_("useFlexibleLayout",!0)("columns",i.columns)("experimentIds",i.experimentIds)("showHparamsAndMetrics",i.showHparamsAndMetrics)},dependencies:[Wne],styles:["runs-table[_ngcontent-%COMP%] {\n        height: 100%;\n      }"],changeDetection:0}),n})(),Yne=(()=>{class n{constructor(e){this.store=e,this.experimentIds$=this.store.select(lr).pipe(N(i=>i??[])),this.columns$=this.store.select(lr).pipe(N(i=>[bs.CHECKBOX,bs.RUN_NAME,i&&i.length>1?bs.EXPERIMENT_NAME:null,bs.RUN_COLOR].filter(r=>null!==r)))}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["runs-selector"]],inputs:{showHparamsAndMetrics:"showHparamsAndMetrics"},decls:3,vars:7,consts:[[3,"experimentIds","columns","showHparamsAndMetrics"]],template:function(e,i){1&e&&(P(0,"runs-selector-component",0),j(1,"async"),j(2,"async")),2&e&&_("experimentIds",W(1,3,i.experimentIds$))("columns",W(2,5,i.columns$))("showHparamsAndMetrics",i.showHparamsAndMetrics)},dependencies:[qne,ct],encapsulation:2,changeDetection:0}),n})();function c5e(n,t){1&n&&P(0,"metrics-main-view",2)}var Xne=(()=>{class n{constructor(e){this.store=e,this.showHparamsAndMetrics$=this.store.select(md),this.runsTableFullScreen$=this.store.select(Lh)}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["metrics-dashboard"]],decls:5,vars:6,consts:[["sidebar","",3,"showHparamsAndMetrics"],["main","",4,"ngIf"],["main",""]],template:function(e,i){1&e&&(h(0,"tb-dashboard-layout"),P(1,"runs-selector",0),j(2,"async"),S(3,c5e,1,0,"metrics-main-view",1),j(4,"async"),g()),2&e&&(v(1),_("showHparamsAndMetrics",W(2,2,i.showHparamsAndMetrics$)),v(2),_("ngIf",!W(4,4,i.runsTableFullScreen$)))},dependencies:[Fe,aQ,fne,Yne,ct],styles:["[_nghost-%COMP%]{contain:strict;display:flex;flex-direction:column;height:100%;justify-content:stretch;overflow:hidden}.notice[_ngcontent-%COMP%]{background-color:rgba(255,245,157,.85);border-bottom:1px solid #ffeb3b;color:#212121;display:block;flex:0 0}tb-dashboard-layout[_ngcontent-%COMP%]{flex:1 1;overflow:hidden}nav[_ngcontent-%COMP%]{background-color:#fff;border-right:1px solid #ebebeb;flex:none;width:340px}body.dark-mode[_nghost-%COMP%]   nav[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   nav[_ngcontent-%COMP%]{background-color:#303030;border-right-color:#555}metrics-main-view[_ngcontent-%COMP%]{flex:1 1}"],changeDetection:0}),n})(),OV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di,ci]}),n})(),xA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),CA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di]}),n})(),Qne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di,$a,ci,xg]}),n})(),Zne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),h_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,qu]}),n})(),g_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,lA,di]}),n})(),Kne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Fc,g_,h_]}),n})(),MA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di,ci,nl,CA,Zne,Qne,Kne]}),n})(),Jne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),__=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Jne]}),n})(),$ne=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[bne,Pe,MA,__,g_,Ef,ci,Fc,hg,$a,di,ju,Rne,nl,kne,Vne,h_,Q1]}),n})(),eie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,$ne]}),n})(),b_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),wA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di]}),n})(),tie=(()=>{class n{constructor(){this.onTimeSelectionChanged=new F,this.onTimeSelectionToggled=new F,this.axisDirection=fs.VERTICAL,this.cardFobHelper={getStepHigherThanAxisPosition:this.getStepHigherThanAxisPosition.bind(this),getStepLowerThanAxisPosition:this.getStepLowerThanAxisPosition.bind(this)}}getAxisPositionFromStartStep(){return this.temporalScale(this.timeSelection.start.step)}getAxisPositionFromEndStep(){return null===this.timeSelection.end?null:this.temporalScale(this.timeSelection.end.step)}getHighestStep(){return this.steps[this.steps.length-1]}getLowestStep(){return this.steps[0]}getStepHigherThanAxisPosition(e){let i=0;for(;e>this.temporalScale(this.steps[i])&&i<this.steps.length-1;)i++;return this.steps[i]}getStepLowerThanAxisPosition(e){let i=this.steps.length-1;for(;e<this.temporalScale(this.steps[i])&&i>0;)i--;return this.steps[i]}}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["histogram-card-fob-controller"]],inputs:{steps:"steps",timeSelection:"timeSelection",temporalScale:"temporalScale"},outputs:{onTimeSelectionChanged:"onTimeSelectionChanged",onTimeSelectionToggled:"onTimeSelectionToggled"},decls:1,vars:7,consts:[[3,"axisDirection","timeSelection","startStepAxisPosition","endStepAxisPosition","highestStep","lowestStep","cardFobHelper","onTimeSelectionChanged","onTimeSelectionToggled"]],template:function(e,i){1&e&&(h(0,"card-fob-controller",0),I("onTimeSelectionChanged",function(o){return i.onTimeSelectionChanged.emit(o)})("onTimeSelectionToggled",function(){return i.onTimeSelectionToggled.emit()}),g()),2&e&&_("axisDirection",i.axisDirection)("timeSelection",i.timeSelection)("startStepAxisPosition",i.getAxisPositionFromStartStep())("endStepAxisPosition",i.getAxisPositionFromEndStep())("highestStep",i.getHighestStep())("lowestStep",i.getLowestStep())("cardFobHelper",i.cardFobHelper)},dependencies:[pA],encapsulation:2,changeDetection:0}),n})(),nie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[wA,Pe,Yu,b_]}),n})();ib(fA,[nn,Fe,Of,qg,tie],[]);var v_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe]}),n})(),SA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,__]}),n})(),y_=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,di]}),n})(),iie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,nie,ci,di,nl,SA,v_,y_]}),n})(),EA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),rie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,EA,ci,di,nl,qu,SA,v_,y_]}),n})(),oie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Co,ci,di,$a,ju]}),n})(),TA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Co,oie,Yu]}),n})(),sie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,EA,xg,ci,hg,$a,Ja,qS]}),n})(),aie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,MA]}),n})(),lie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[wA,Pe,TA]}),n})(),cie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,sie,__,b_,TA,ci,di,ju,nl,Yu,aie,lie,v_,y_]}),n})(),die=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,rie,cie,iie,b_]}),n})(),uie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,Ja]}),n})(),DA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,uie,ci,VT,Fc,di,Ja,qu,Wh,h_]}),n})(),pie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,CA,Fc,vE,di,ci]}),n})(),fie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[die,Pe,xA,g_,lA,ci,VT,di,$a,nl,DA,pie,Md]}),n})(),mie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,xA,OV,fie,di,DA,eie]}),n})(),p5e="Max pin limit exceeded. Remove existing pins before adding more. See https://github.com/tensorflow/tensorboard/issues/4242";function f5e(){return[{actionCreator:Hg,alertFromAction:n=>{let{wasPinned:t,canCreateNewPins:e}=n;return t||e?null:{localizedMessage:p5e}}}]}function m5e(){return q(bd,n=>({scalarSmoothing:n}))}function h5e(){return q(gf,n=>({ignoreOutliers:n}))}function g5e(){return q(hf,n=>({tooltipSort:String(n)}))}function _5e(){return q(a1,n=>({timeSeriesSettingsPaneOpened:n}))}function b5e(){return q(Xh,n=>({timeSeriesCardMinWidth:n}))}function v5e(){return q(xv,n=>({stepSelectorEnabled:n}))}function y5e(){return q(Su,n=>({rangeSelectionEnabled:n}))}function x5e(){return q(wu,n=>({linkedTimeEnabled:n}))}function C5e(){return q(Cv,n=>({singleSelectionHeaders:n}))}function M5e(){return q(Mv,n=>({rangeSelectionHeaders:n}))}var hie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:DN,useFactory:rQ,deps:[IN]},{provide:IN,useValue:XS}],imports:[Pe,Ih,Ga,Bc.forPlugin(gv,Xne),qS,mie,Tr.forFeature(YS,tQ,DN),to.forFeature([iQ]),Sc.registerAlertActions(f5e),Ki.defineGlobalSetting(m5e),Ki.defineGlobalSetting(h5e),Ki.defineGlobalSetting(g5e),Ki.defineGlobalSetting(_5e),Ki.defineGlobalSetting(b5e),Ki.defineGlobalSetting(v5e),Ki.defineGlobalSetting(y5e),Ki.defineGlobalSetting(x5e),Ki.defineGlobalSetting(C5e),Ki.defineGlobalSetting(M5e)]}),n})(),gie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[YX,hie]}),n})(),Xd=(()=>(function(n){n.CUSTOM_ELEMENT="CUSTOM_ELEMENT",n.IFRAME="IFRAME",n.NG_COMPONENT="NG_COMPONENT",n.NONE="NONE"}(Xd||(Xd={})),Xd))(),w5e=["pluginContainer"],S5e=["ngPluginContainer"];function E5e(n,t){1&n&&li(0)}function T5e(n,t){if(1&n&&(Ot(0),S(1,E5e,1,0,"ng-container",9),kt()),2&n){let e=w(2),i=it(6);v(1),_("ngTemplateOutlet",e.environmentFailureNotFoundTemplate?e.environmentFailureNotFoundTemplate:i)}}function D5e(n,t){1&n&&li(0)}function I5e(n,t){if(1&n&&(Ot(0),S(1,D5e,1,0,"ng-container",9),kt()),2&n){let e=w(2),i=it(6);v(1),_("ngTemplateOutlet",e.environmentFailurePermissionDeniedTemplate?e.environmentFailurePermissionDeniedTemplate:i)}}function A5e(n,t){1&n&&li(0)}function R5e(n,t){if(1&n&&(Ot(0),S(1,A5e,1,0,"ng-container",9),kt()),2&n){let e=w(2),i=it(6);v(1),_("ngTemplateOutlet",e.environmentFailureUnknownTemplate?e.environmentFailureUnknownTemplate:i)}}function P5e(n,t){if(1&n&&(Ot(0),h(1,"h3",10),T(2," There\u2019s no dashboard by the name of \u201c"),h(3,"code"),T(4),g(),T(5,"\u201d. "),g(),h(6,"p"),T(7,"You can select a dashboard from the list above."),g(),h(8,"p"),li(9,11),g(),kt()),2&n){let e=w(2),i=it(8);v(4),bt(e.activePluginId),v(5),_("ngTemplateOutlet",i)}}function O5e(n,t){if(1&n&&(Ot(0),h(1,"h3",12),T(2," No dashboards are active for the current data set. "),g(),h(3,"p"),T(4,"Probable causes:"),g(),h(5,"ul")(6,"li"),T(7,"You haven\u2019t written any data to your event files."),g(),h(8,"li"),T(9,"TensorBoard can\u2019t find your event files."),g()(),T(10," If you\u2019re new to using TensorBoard, and want to find out how to add data and set up your event files, check out the "),h(11,"a",13),T(12,"README"),g(),T(13," and perhaps the "),h(14,"a",14),T(15,"TensorBoard tutorial"),g(),T(16,". "),h(17,"p"),T(18," If you think TensorBoard is configured properly, please see "),h(19,"a",15),T(20,"the section of the README devoted to missing data problems"),g(),T(21," and consider filing an issue on GitHub. "),g(),h(22,"p"),li(23,11),g(),kt()),2&n){w(2);let e=it(8);v(23),_("ngTemplateOutlet",e)}}function k5e(n,t){if(1&n&&(h(0,"div",6)(1,"div",7),S(2,T5e,2,1,"ng-container",8),S(3,I5e,2,1,"ng-container",8),S(4,R5e,2,1,"ng-container",8),S(5,P5e,10,2,"ng-container",8),S(6,O5e,24,1,"ng-container",8),g()()),2&n){let e=w();_("ngSwitch",e.pluginLoadState),v(2),_("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_NOT_FOUND),v(1),_("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_PERMISSION_DENIED),v(1),_("ngSwitchCase",e.PluginLoadState.ENVIRONMENT_FAILURE_UNKNOWN),v(1),_("ngSwitchCase",e.PluginLoadState.UNKNOWN_PLUGIN_ID),v(1),_("ngSwitchCase",e.PluginLoadState.NO_ENABLED_PLUGINS)}}function F5e(n,t){if(1&n&&(h(0,"h3",16),T(1,"Data could not be loaded."),g(),h(2,"p"),T(3,"The TensorBoard server may be down or inaccessible."),g(),h(4,"p"),li(5,11),g()),2&n){w();let e=it(8);v(5),_("ngTemplateOutlet",e)}}function N5e(n,t){if(1&n&&(h(0,"p",19)(1,"i"),T(2,"Log directory: "),h(3,"span"),T(4),g()()()),2&n){let e=w(2);v(4),bt(e.dataLocation)}}function L5e(n,t){if(1&n&&(h(0,"span",17),T(1),j(2,"date"),g(),S(3,N5e,5,1,"p",18)),2&n){let e=w();v(1),He("Last reload: ",qp(2,2,e.lastUpdated,"medium"),""),v(2),_("ngIf",e.dataLocation)}}var B5e=function(n){return{plugins:!0,"is-first-party-plugin":n}},cl=(()=>(function(n){n[n.ENVIRONMENT_FAILURE_NOT_FOUND=0]="ENVIRONMENT_FAILURE_NOT_FOUND",n[n.ENVIRONMENT_FAILURE_PERMISSION_DENIED=1]="ENVIRONMENT_FAILURE_PERMISSION_DENIED",n[n.ENVIRONMENT_FAILURE_UNKNOWN=2]="ENVIRONMENT_FAILURE_UNKNOWN",n[n.NO_ENABLED_PLUGINS=3]="NO_ENABLED_PLUGINS",n[n.UNKNOWN_PLUGIN_ID=4]="UNKNOWN_PLUGIN_ID",n[n.LOADED=5]="LOADED",n[n.LOADING=6]="LOADING"}(cl||(cl={})),cl))(),_ie=(()=>{class n{constructor(e,i,r){this.componentFactoryResolver=e,this.pluginRegistry=i,this.pluginApiHost=r,this.PluginLoadState=cl,this.LoadingMechanismType=Xd,this.pluginInstances=new Map}ngOnChanges(e){if(!this.isFeatureFlagsLoaded||!this.activeKnownPlugin||this.settingsLoadState===Te.NOT_LOADED||this.settingsLoadState===Te.LOADING)return;let i=Boolean(this.activeKnownPlugin&&!this.pluginInstances.has(this.activeKnownPlugin.id));if(e.activeKnownPlugin||e.isFeatureFlagsLoaded||e.settingsLoadState){let r=e.activeKnownPlugin?.previousValue;if(r&&r.id!==this.activeKnownPlugin.id&&this.hidePlugin(r),i){let o=this.createPlugin(this.activeKnownPlugin);o&&this.pluginInstances.set(this.activeKnownPlugin.id,o)}else this.showPlugin(this.activeKnownPlugin)}(i||e.lastUpdated)&&this.reload(this.activeKnownPlugin,i)}hidePlugin(e){if(!this.pluginInstances.has(e.id))return;let i=this.pluginInstances.get(e.id);Object.assign(i.style,{maxHeight:0,overflow:"hidden",visibility:"hidden",position:"absolute"})}showPlugin(e){if(!this.pluginInstances.has(e.id))return;let i=this.pluginInstances.get(e.id);Object.assign(i.style,{maxHeight:null,overflow:null,visibility:null,position:null})}createPlugin(e){let i=null;switch(e.loading_mechanism.type){case Xd.CUSTOM_ELEMENT:i=document.createElement(e.loading_mechanism.element_name),i.reloadOnReady=!1,i.featureFlags=this.featureFlags,this.pluginsContainer.nativeElement.appendChild(i);break;case Xd.IFRAME:if(!this.pluginApiHost)throw Error(`IFRAME-based plugins not supported: ${e.id}`);i=document.createElement("iframe"),i.setAttribute("src",`data/plugin_entry.html?name=${e.id}`),this.pluginApiHost.registerPluginIframe(i,e.id),this.pluginsContainer.nativeElement.appendChild(i);break;case Xd.NG_COMPONENT:let r=this.pluginRegistry.getComponent(e.id);if(r){let o=this.componentFactoryResolver.resolveComponentFactory(r);i=this.ngPluginContainer.createComponent(o).location.nativeElement}else console.error(`No registered Angular component for plugin: ${e.id}`);break;case Xd.NONE:break;default:console.error("Unexpected plugin")}return i}reload(e,i){if(!i&&e.disable_reload)return;let r=this.pluginInstances.get(e.id);r&&r.reload&&r.reload()}}return n.\u0275fac=function(e){return new(e||n)(C(fo),C(Bc),C(I1,8))},n.\u0275cmp=O({type:n,selectors:[["plugins-component"]],viewQuery:function(e,i){if(1&e&&(Ge(w5e,7,Me),Ge(S5e,7,si)),2&e){let r;Se(r=Ee())&&(i.pluginsContainer=r.first),Se(r=Ee())&&(i.ngPluginContainer=r.first)}},inputs:{activePluginId:"activePluginId",activeKnownPlugin:"activeKnownPlugin",pluginLoadState:"pluginLoadState",dataLocation:"dataLocation",isFeatureFlagsLoaded:"isFeatureFlagsLoaded",settingsLoadState:"settingsLoadState",featureFlags:"featureFlags",lastUpdated:"lastUpdated",environmentFailureNotFoundTemplate:"environmentFailureNotFoundTemplate",environmentFailurePermissionDeniedTemplate:"environmentFailurePermissionDeniedTemplate",environmentFailureUnknownTemplate:"environmentFailureUnknownTemplate"},features:[Gt],decls:9,vars:4,consts:[[3,"ngClass"],["pluginContainer",""],["ngPluginContainer",""],["class","warning",3,"ngSwitch",4,"ngIf"],["environmentFailureDefaultTemplate",""],["dateAndDataLocation",""],[1,"warning",3,"ngSwitch"],[1,"warning-message"],[4,"ngSwitchCase"],[4,"ngTemplateOutlet"],[1,"unknown-plugin"],[3,"ngTemplateOutlet"],[1,"no-active-plugin"],["href","https://github.com/tensorflow/tensorboard/blob/master/README.md"],["href","https://www.tensorflow.org/get_started/summaries_and_tensorboard"],["href","https://github.com/tensorflow/tensorboard/blob/master/README.md#my-tensorboard-isnt-showing-any-data-whats-wrong"],[1,"environment-not-loaded"],[1,"last-reload-time"],["class","data-location",4,"ngIf"],[1,"data-location"]],template:function(e,i){1&e&&(h(0,"div",0,1),li(2,null,2),g(),S(4,k5e,7,6,"div",3),S(5,F5e,6,1,"ng-template",null,4,Wt),S(7,L5e,4,5,"ng-template",null,5,Wt)),2&e&&(_("ngClass",In(2,B5e,(null==i.activeKnownPlugin?null:i.activeKnownPlugin.loading_mechanism.type)!==i.LoadingMechanismType.IFRAME)),v(4),_("ngIf",i.pluginLoadState!==i.PluginLoadState.LOADED&&i.pluginLoadState!==i.PluginLoadState.LOADING))},dependencies:[yn,Fe,Lr,sr,Sr,gh],styles:["[_nghost-%COMP%]{background-color:#fff;color:#212121;display:block;position:relative}body.dark-mode   [_nghost-%COMP%]   .plugins.is-first-party-plugin[_ngcontent-%COMP%]{background-color:#303030;color:#fff}.plugins[_ngcontent-%COMP%]{height:100%;position:relative}.warning[_ngcontent-%COMP%]{background:#fff;bottom:0;left:0;position:absolute;right:0;top:0}body.dark-mode[_nghost-%COMP%]   .warning[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .warning[_ngcontent-%COMP%]{background:#303030}.warning-message[_ngcontent-%COMP%]{color:#212121;margin:80px auto 0;max-width:540px}body.dark-mode[_nghost-%COMP%]   .warning-message[_ngcontent-%COMP%], body.dark-mode   [_nghost-%COMP%]   .warning-message[_ngcontent-%COMP%]{color:#fff}.last-reload-time[_ngcontent-%COMP%]{font-style:italic}.plugins[_ngcontent-%COMP%]     iframe{border:0;display:block;height:100%;width:100%}"],changeDetection:0}),n})(),V5e=q(Nh,Wo,(n,t)=>t&&n[t]?Object.assign({id:t},n[t]):null),IA=(()=>{class n{constructor(e){this.store=e,this.activeKnownPlugin$=this.store.select(V5e),this.activePluginId$=this.store.select(Wo),this.pluginLoadState$=dn(this.activeKnownPlugin$,this.activePluginId$,this.store.select(yS)).pipe(N(([i,r,o])=>null!==o.failureCode?o.failureCode===ja.NOT_FOUND?cl.ENVIRONMENT_FAILURE_NOT_FOUND:o.failureCode===ja.PERMISSION_DENIED?cl.ENVIRONMENT_FAILURE_PERMISSION_DENIED:cl.ENVIRONMENT_FAILURE_UNKNOWN:null!==i?cl.LOADED:null===o.lastLoadedTimeInMs&&o.state===Te.LOADING?cl.LOADING:r?cl.UNKNOWN_PLUGIN_ID:cl.NO_ENABLED_PLUGINS)),this.lastLoadedTimeInMs$=this.store.select(Fh),this.dataLocation$=this.store.select(xS).pipe(N(i=>i.data_location)),this.isFeatureFlagsLoaded$=this.store.select(vu),this.featureFlags$=this.store.select(ks),this.settingsLoadState$=this.store.select(Bs.getSettingsLoadState)}}return n.\u0275fac=function(e){return new(e||n)(C(Ae))},n.\u0275cmp=O({type:n,selectors:[["plugins"]],inputs:{environmentFailureNotFoundTemplate:"environmentFailureNotFoundTemplate",environmentFailurePermissionDeniedTemplate:"environmentFailurePermissionDeniedTemplate",environmentFailureUnknownTemplate:"environmentFailureUnknownTemplate"},decls:9,vars:27,consts:[[3,"activeKnownPlugin","activePluginId","dataLocation","lastUpdated","pluginLoadState","isFeatureFlagsLoaded","settingsLoadState","featureFlags","environmentFailureNotFoundTemplate","environmentFailurePermissionDeniedTemplate","environmentFailureUnknownTemplate"]],template:function(e,i){1&e&&(P(0,"plugins-component",0),j(1,"async"),j(2,"async"),j(3,"async"),j(4,"async"),j(5,"async"),j(6,"async"),j(7,"async"),j(8,"async")),2&e&&_("activeKnownPlugin",W(1,11,i.activeKnownPlugin$))("activePluginId",W(2,13,i.activePluginId$))("dataLocation",W(3,15,i.dataLocation$))("lastUpdated",W(4,17,i.lastLoadedTimeInMs$))("pluginLoadState",W(5,19,i.pluginLoadState$))("isFeatureFlagsLoaded",W(6,21,i.isFeatureFlagsLoaded$))("settingsLoadState",W(7,23,i.settingsLoadState$))("featureFlags",W(8,25,i.featureFlags$))("environmentFailureNotFoundTemplate",i.environmentFailureNotFoundTemplate)("environmentFailurePermissionDeniedTemplate",i.environmentFailurePermissionDeniedTemplate)("environmentFailureUnknownTemplate",i.environmentFailureUnknownTemplate)},styles:["plugins-component[_ngcontent-%COMP%] { height: 100%; }"],changeDetection:0}),n})(),AA=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Ga,Pe,Bc]}),n})();ib(IA,[_ie],[ct]);var bie=(()=>{class n{constructor(e,i){this.store=e,this.document=i,this.onVisibilityChange=this.onVisibilityChangeImpl.bind(this),this.reloadEnabled$=this.store.pipe(un(Bs.getReloadEnabled)),this.reloadPeriodInMs$=this.store.pipe(un(Bs.getReloadPeriodInMs)),this.reloadTimerId=null,this.missedAutoReload=!1,this.ngUnsubscribe=new Ie}ngOnInit(){this.document.addEventListener("visibilitychange",this.onVisibilityChange),dn(this.reloadEnabled$.pipe(Yn()),this.reloadPeriodInMs$.pipe(Yn())).pipe(ot(this.ngUnsubscribe)).subscribe(([e,i])=>{this.cancelLoad(),e&&this.load(i)})}onVisibilityChangeImpl(){"visible"===this.document.visibilityState&&this.missedAutoReload&&(this.missedAutoReload=!1,this.store.dispatch(cs()))}load(e){this.reloadTimerId=setTimeout(()=>{"visible"===this.document.visibilityState?this.store.dispatch(cs()):this.missedAutoReload=!0,this.load(e)},e)}cancelLoad(){null!==this.reloadTimerId&&clearTimeout(this.reloadTimerId),this.reloadTimerId=null}ngOnDestroy(){this.cancelLoad(),this.document.removeEventListener("visibilitychange",this.onVisibilityChange),this.ngUnsubscribe.next(),this.ngUnsubscribe.complete()}}return n.\u0275fac=function(e){return new(e||n)(C(Ae),C(Lt))},n.\u0275cmp=O({type:n,selectors:[["reloader"]],decls:0,vars:0,template:function(e,i){},encapsulation:2,changeDetection:0}),n})(),vie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275cmp=O({type:n,selectors:[["tensorboard-wrapper-component"]],decls:2,vars:0,consts:[[1,"plugins"]],template:function(e,i){1&e&&P(0,"plugins",0)(1,"reloader")},dependencies:[IA,bie],styles:["[_nghost-%COMP%] {\n        display: flex;\n        flex-direction: column;\n        height: 100%;\n      }\n\n      .plugins[_ngcontent-%COMP%] {\n        flex: 1 1;\n        overflow: auto;\n        position: relative;\n      }"],changeDetection:0}),n})(),yie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275prov=ue({token:n,factory:n.\u0275fac}),n})(),kV="smoothing",FV="runColorGroup",NV="tagFilter",LV="runFilter",BV="regex:",RA=class extends yie{getMetricsPinnedCards(t){return dn([t.select(yv),t.select(xW)]).pipe(N(([e,i])=>{if(!e.length&&!i.length)return[];let o=[...e.map(({plugin:s,tag:a,sample:l,runId:c})=>{let d={plugin:s,tag:a};return pa(s)&&(d.runId=c),ua(s)&&(d.sample=l),d}),...i];return[{key:"pinnedCards",value:JSON.stringify(o)}]}))}serializeStateToQueryParams(t){return dn([this.getMetricsPinnedCards(t),t.select(kl).pipe(N(e=>e?[{key:NV,value:e}]:[])),dn([t.select(iv),t.select(cf)]).pipe(N(([e,i])=>function(n,t){return Object.entries(n).map(([e,i])=>{if(void 0===i)return{};let r=t[e];return r&&r.queryParamOverride?{key:r.queryParamOverride,value:i?.toString()}:{}}).filter(({key:e,value:i})=>e&&void 0!==i)}(e,i))),t.select(MW).pipe(N(e=>Number.isFinite(e.scalarSmoothing)?[{key:kV,value:String(e.scalarSmoothing)}]:[])),t.select(JF).pipe(N(e=>{if(!e)return[];let i;switch(e.key){case Yi.EXPERIMENT:i="experiment";break;case Yi.RUN:i="run";break;case Yi.REGEX:i=`${BV}${e.regexString}`;break;default:throw new RangeError("Serialization not implemented")}return[{key:FV,value:i}]})),t.select(vd).pipe(N(e=>e?[{key:LV,value:e}]:[]))]).pipe(N(e=>e.flat()))}deserializeQueryParams(t){let e=null,i=null,r=null,o=null,s=null;for(let{key:a,value:l}of t)switch(a){case"pinnedCards":e=U5e(l);break;case kV:i=Number(l);break;case FV:switch(l){case"experiment":o={key:Yi.EXPERIMENT};break;case"run":o={key:Yi.RUN}}if(l.startsWith(BV)){let c=l.slice(BV.length);o={key:Yi.REGEX,regexString:c}}break;case NV:r=l;break;case LV:s=l}return{metrics:{pinnedCards:e||[],smoothing:i,tagFilter:r},runs:{groupBy:o,regexFilter:s}}}};function U5e(n){let t;try{t=JSON.parse(n)}catch{return null}if(!Array.isArray(t))return null;let e=[];for(let i of t){let o="string"==typeof i.runId,s="number"==typeof i.sample;if(!("string"==typeof i.plugin&&"string"==typeof i.tag&&(o||typeof i.runId>"u")&&(s||typeof i.sample>"u")&&Z6(i.plugin)&&i.tag))continue;if(pa(i.plugin)){if(!i.runId)continue}else if(i.runId)continue;if(s&&(!ua(i.plugin)||!Number.isInteger(i.sample)||i.sample<0))continue;let d={plugin:i.plugin,tag:i.tag};o&&(d.runId=i.runId),s&&(d.sample=i.sample),e.push(d)}return e}function Cie(){return[{routeKind:wn.EXPERIMENT,path:"/",ngComponent:vie,defaultRoute:!0,deepLinkProvider:new RA}]}function Mie(){return n=>(t,e)=>n(t,e)}RA=R4([Ez()],RA);var wie=new ie("Root reducers token",{factory:()=>({})}),Sie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({providers:[{provide:yh,useFactory:Mie,multi:!0}],imports:[Tr.forRoot(wie,{runtimeChecks:{strictStateImmutability:!0,strictActionImmutability:!0,strictActionSerializability:!1,strictStateSerializability:!1}}),to.forRoot([])]}),n})(),Eie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({}),n})(),Tie=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n}),n.\u0275inj=U({imports:[Pe,AA,Eie]}),n})(),VV=(()=>{class n{}return n.\u0275fac=function(e){return new(e||n)},n.\u0275mod=G({type:n,bootstrap:[bY]}),n.\u0275inj=U({imports:[Wh,DY,Mw,UG,Ih,vY,Dl.registerRoutes(Cie),Q1,X1,yY,Tie,Ga,EY,CY,AY,FS,RY,MY,mF,I1,AA,w1,yE,Sie,gie]}),n})();"loading"!==document.readyState?ak().bootstrapModule(VV):window.addEventListener("DOMContentLoaded",()=>{ak().bootstrapModule(VV)})})();
/** vim: et:ts=4:sw=4:sts=4
 * @license RequireJS 2.3.6 Copyright jQuery Foundation and other contributors.
 * Released under MIT license, https://github.com/requirejs/requirejs/blob/master/LICENSE
 */
//Not using strict: uneven strict support in browsers, #392, and causes
//problems with requirejs.exec()/transpiler plugins that may not be strict.
/*jslint regexp: true, nomen: true, sloppy: true */
/*global window, navigator, document, importScripts, setTimeout, opera */

var requirejs, require, define;
(function (global, setTimeout) {
    var req, s, head, baseElement, dataMain, src,
        interactiveScript, currentlyAddingScript, mainScript, subPath,
        version = '2.3.6',
        commentRegExp = /\/\*[\s\S]*?\*\/|([^:"'=]|^)\/\/.*$/mg,
        cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g,
        jsSuffixRegExp = /\.js$/,
        currDirRegExp = /^\.\//,
        op = Object.prototype,
        ostring = op.toString,
        hasOwn = op.hasOwnProperty,
        isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document),
        isWebWorker = !isBrowser && typeof importScripts !== 'undefined',
        //PS3 indicates loaded and complete, but need to wait for complete
        //specifically. Sequence is 'loading', 'loaded', execution,
        // then 'complete'. The UA check is unfortunate, but not sure how
        //to feature test w/o causing perf issues.
        readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ?
                      /^complete$/ : /^(complete|loaded)$/,
        defContextName = '_',
        //Oh the tragedy, detecting opera. See the usage of isOpera for reason.
        isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]',
        contexts = {},
        cfg = {},
        globalDefQueue = [],
        useInteractive = false;

    //Could match something like ')//comment', do not lose the prefix to comment.
    function commentReplace(match, singlePrefix) {
        return singlePrefix || '';
    }

    function isFunction(it) {
        return ostring.call(it) === '[object Function]';
    }

    function isArray(it) {
        return ostring.call(it) === '[object Array]';
    }

    /**
     * Helper function for iterating over an array. If the func returns
     * a true value, it will break out of the loop.
     */
    function each(ary, func) {
        if (ary) {
            var i;
            for (i = 0; i < ary.length; i += 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    /**
     * Helper function for iterating over an array backwards. If the func
     * returns a true value, it will break out of the loop.
     */
    function eachReverse(ary, func) {
        if (ary) {
            var i;
            for (i = ary.length - 1; i > -1; i -= 1) {
                if (ary[i] && func(ary[i], i, ary)) {
                    break;
                }
            }
        }
    }

    function hasProp(obj, prop) {
        return hasOwn.call(obj, prop);
    }

    function getOwn(obj, prop) {
        return hasProp(obj, prop) && obj[prop];
    }

    /**
     * Cycles over properties in an object and calls a function for each
     * property value. If the function returns a truthy value, then the
     * iteration is stopped.
     */
    function eachProp(obj, func) {
        var prop;
        for (prop in obj) {
            if (hasProp(obj, prop)) {
                if (func(obj[prop], prop)) {
                    break;
                }
            }
        }
    }

    /**
     * Simple function to mix in properties from source into target,
     * but only if target does not already have a property of the same name.
     */
    function mixin(target, source, force, deepStringMixin) {
        if (source) {
            eachProp(source, function (value, prop) {
                if (force || !hasProp(target, prop)) {
                    if (deepStringMixin && typeof value === 'object' && value &&
                        !isArray(value) && !isFunction(value) &&
                        !(value instanceof RegExp)) {

                        if (!target[prop]) {
                            target[prop] = {};
                        }
                        mixin(target[prop], value, force, deepStringMixin);
                    } else {
                        target[prop] = value;
                    }
                }
            });
        }
        return target;
    }

    //Similar to Function.prototype.bind, but the 'this' object is specified
    //first, since it is easier to read/figure out what 'this' will be.
    function bind(obj, fn) {
        return function () {
            return fn.apply(obj, arguments);
        };
    }

    function scripts() {
        return document.getElementsByTagName('script');
    }

    function defaultOnError(err) {
        throw err;
    }

    //Allow getting a global that is expressed in
    //dot notation, like 'a.b.c'.
    function getGlobal(value) {
        if (!value) {
            return value;
        }
        var g = global;
        each(value.split('.'), function (part) {
            g = g[part];
        });
        return g;
    }

    /**
     * Constructs an error with a pointer to an URL with more information.
     * @param {String} id the error ID that maps to an ID on a web page.
     * @param {String} message human readable error.
     * @param {Error} [err] the original error, if there is one.
     *
     * @returns {Error}
     */
    function makeError(id, msg, err, requireModules) {
        var e = new Error(msg + '\nhttps://requirejs.org/docs/errors.html#' + id);
        e.requireType = id;
        e.requireModules = requireModules;
        if (err) {
            e.originalError = err;
        }
        return e;
    }

    if (typeof define !== 'undefined') {
        //If a define is already in play via another AMD loader,
        //do not overwrite.
        return;
    }

    if (typeof requirejs !== 'undefined') {
        if (isFunction(requirejs)) {
            //Do not overwrite an existing requirejs instance.
            return;
        }
        cfg = requirejs;
        requirejs = undefined;
    }

    //Allow for a require config object
    if (typeof require !== 'undefined' && !isFunction(require)) {
        //assume it is a config object.
        cfg = require;
        require = undefined;
    }

    function newContext(contextName) {
        var inCheckLoaded, Module, context, handlers,
            checkLoadedTimeoutId,
            config = {
                //Defaults. Do not set a default for map
                //config to speed up normalize(), which
                //will run faster if there is no default.
                waitSeconds: 7,
                baseUrl: './',
                paths: {},
                bundles: {},
                pkgs: {},
                shim: {},
                config: {}
            },
            registry = {},
            //registry of just enabled modules, to speed
            //cycle breaking code when lots of modules
            //are registered, but not activated.
            enabledRegistry = {},
            undefEvents = {},
            defQueue = [],
            defined = {},
            urlFetched = {},
            bundlesMap = {},
            requireCounter = 1,
            unnormalizedCounter = 1;

        /**
         * Trims the . and .. from an array of path segments.
         * It will keep a leading path segment if a .. will become
         * the first path segment, to help with module name lookups,
         * which act like paths, but can be remapped. But the end result,
         * all paths that use this function should look normalized.
         * NOTE: this method MODIFIES the input array.
         * @param {Array} ary the array of path segments.
         */
        function trimDots(ary) {
            var i, part;
            for (i = 0; i < ary.length; i++) {
                part = ary[i];
                if (part === '.') {
                    ary.splice(i, 1);
                    i -= 1;
                } else if (part === '..') {
                    // If at the start, or previous value is still ..,
                    // keep them so that when converted to a path it may
                    // still work when converted to a path, even though
                    // as an ID it is less than ideal. In larger point
                    // releases, may be better to just kick out an error.
                    if (i === 0 || (i === 1 && ary[2] === '..') || ary[i - 1] === '..') {
                        continue;
                    } else if (i > 0) {
                        ary.splice(i - 1, 2);
                        i -= 2;
                    }
                }
            }
        }

        /**
         * Given a relative module name, like ./something, normalize it to
         * a real name that can be mapped to a path.
         * @param {String} name the relative name
         * @param {String} baseName a real name that the name arg is relative
         * to.
         * @param {Boolean} applyMap apply the map config to the value. Should
         * only be done if this normalization is for a dependency ID.
         * @returns {String} normalized name
         */
        function normalize(name, baseName, applyMap) {
            var pkgMain, mapValue, nameParts, i, j, nameSegment, lastIndex,
                foundMap, foundI, foundStarMap, starI, normalizedBaseParts,
                baseParts = (baseName && baseName.split('/')),
                map = config.map,
                starMap = map && map['*'];

            //Adjust any relative paths.
            if (name) {
                name = name.split('/');
                lastIndex = name.length - 1;

                // If wanting node ID compatibility, strip .js from end
                // of IDs. Have to do this here, and not in nameToUrl
                // because node allows either .js or non .js to map
                // to same file.
                if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
                    name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
                }

                // Starts with a '.' so need the baseName
                if (name[0].charAt(0) === '.' && baseParts) {
                    //Convert baseName to array, and lop off the last part,
                    //so that . matches that 'directory' and not name of the baseName's
                    //module. For instance, baseName of 'one/two/three', maps to
                    //'one/two/three.js', but we want the directory, 'one/two' for
                    //this normalization.
                    normalizedBaseParts = baseParts.slice(0, baseParts.length - 1);
                    name = normalizedBaseParts.concat(name);
                }

                trimDots(name);
                name = name.join('/');
            }

            //Apply map config if available.
            if (applyMap && map && (baseParts || starMap)) {
                nameParts = name.split('/');

                outerLoop: for (i = nameParts.length; i > 0; i -= 1) {
                    nameSegment = nameParts.slice(0, i).join('/');

                    if (baseParts) {
                        //Find the longest baseName segment match in the config.
                        //So, do joins on the biggest to smallest lengths of baseParts.
                        for (j = baseParts.length; j > 0; j -= 1) {
                            mapValue = getOwn(map, baseParts.slice(0, j).join('/'));

                            //baseName segment has config, find if it has one for
                            //this name.
                            if (mapValue) {
                                mapValue = getOwn(mapValue, nameSegment);
                                if (mapValue) {
                                    //Match, update name to the new value.
                                    foundMap = mapValue;
                                    foundI = i;
                                    break outerLoop;
                                }
                            }
                        }
                    }

                    //Check for a star map match, but just hold on to it,
                    //if there is a shorter segment match later in a matching
                    //config, then favor over this star map.
                    if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) {
                        foundStarMap = getOwn(starMap, nameSegment);
                        starI = i;
                    }
                }

                if (!foundMap && foundStarMap) {
                    foundMap = foundStarMap;
                    foundI = starI;
                }

                if (foundMap) {
                    nameParts.splice(0, foundI, foundMap);
                    name = nameParts.join('/');
                }
            }

            // If the name points to a package's name, use
            // the package main instead.
            pkgMain = getOwn(config.pkgs, name);

            return pkgMain ? pkgMain : name;
        }

        function removeScript(name) {
            if (isBrowser) {
                each(scripts(), function (scriptNode) {
                    if (scriptNode.getAttribute('data-requiremodule') === name &&
                            scriptNode.getAttribute('data-requirecontext') === context.contextName) {
                        scriptNode.parentNode.removeChild(scriptNode);
                        return true;
                    }
                });
            }
        }

        function hasPathFallback(id) {
            var pathConfig = getOwn(config.paths, id);
            if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) {
                //Pop off the first array value, since it failed, and
                //retry
                pathConfig.shift();
                context.require.undef(id);

                //Custom require that does not do map translation, since
                //ID is "absolute", already mapped/resolved.
                context.makeRequire(null, {
                    skipMap: true
                })([id]);

                return true;
            }
        }

        //Turns a plugin!resource to [plugin, resource]
        //with the plugin being undefined if the name
        //did not have a plugin prefix.
        function splitPrefix(name) {
            var prefix,
                index = name ? name.indexOf('!') : -1;
            if (index > -1) {
                prefix = name.substring(0, index);
                name = name.substring(index + 1, name.length);
            }
            return [prefix, name];
        }

        /**
         * Creates a module mapping that includes plugin prefix, module
         * name, and path. If parentModuleMap is provided it will
         * also normalize the name via require.normalize()
         *
         * @param {String} name the module name
         * @param {String} [parentModuleMap] parent module map
         * for the module name, used to resolve relative names.
         * @param {Boolean} isNormalized: is the ID already normalized.
         * This is true if this call is done for a define() module ID.
         * @param {Boolean} applyMap: apply the map config to the ID.
         * Should only be true if this map is for a dependency.
         *
         * @returns {Object}
         */
        function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) {
            var url, pluginModule, suffix, nameParts,
                prefix = null,
                parentName = parentModuleMap ? parentModuleMap.name : null,
                originalName = name,
                isDefine = true,
                normalizedName = '';

            //If no name, then it means it is a require call, generate an
            //internal name.
            if (!name) {
                isDefine = false;
                name = '_@r' + (requireCounter += 1);
            }

            nameParts = splitPrefix(name);
            prefix = nameParts[0];
            name = nameParts[1];

            if (prefix) {
                prefix = normalize(prefix, parentName, applyMap);
                pluginModule = getOwn(defined, prefix);
            }

            //Account for relative paths if there is a base name.
            if (name) {
                if (prefix) {
                    if (isNormalized) {
                        normalizedName = name;
                    } else if (pluginModule && pluginModule.normalize) {
                        //Plugin is loaded, use its normalize method.
                        normalizedName = pluginModule.normalize(name, function (name) {
                            return normalize(name, parentName, applyMap);
                        });
                    } else {
                        // If nested plugin references, then do not try to
                        // normalize, as it will not normalize correctly. This
                        // places a restriction on resourceIds, and the longer
                        // term solution is not to normalize until plugins are
                        // loaded and all normalizations to allow for async
                        // loading of a loader plugin. But for now, fixes the
                        // common uses. Details in #1131
                        normalizedName = name.indexOf('!') === -1 ?
                                         normalize(name, parentName, applyMap) :
                                         name;
                    }
                } else {
                    //A regular module.
                    normalizedName = normalize(name, parentName, applyMap);

                    //Normalized name may be a plugin ID due to map config
                    //application in normalize. The map config values must
                    //already be normalized, so do not need to redo that part.
                    nameParts = splitPrefix(normalizedName);
                    prefix = nameParts[0];
                    normalizedName = nameParts[1];
                    isNormalized = true;

                    url = context.nameToUrl(normalizedName);
                }
            }

            //If the id is a plugin id that cannot be determined if it needs
            //normalization, stamp it with a unique ID so two matching relative
            //ids that may conflict can be separate.
            suffix = prefix && !pluginModule && !isNormalized ?
                     '_unnormalized' + (unnormalizedCounter += 1) :
                     '';

            return {
                prefix: prefix,
                name: normalizedName,
                parentMap: parentModuleMap,
                unnormalized: !!suffix,
                url: url,
                originalName: originalName,
                isDefine: isDefine,
                id: (prefix ?
                        prefix + '!' + normalizedName :
                        normalizedName) + suffix
            };
        }

        function getModule(depMap) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (!mod) {
                mod = registry[id] = new context.Module(depMap);
            }

            return mod;
        }

        function on(depMap, name, fn) {
            var id = depMap.id,
                mod = getOwn(registry, id);

            if (hasProp(defined, id) &&
                    (!mod || mod.defineEmitComplete)) {
                if (name === 'defined') {
                    fn(defined[id]);
                }
            } else {
                mod = getModule(depMap);
                if (mod.error && name === 'error') {
                    fn(mod.error);
                } else {
                    mod.on(name, fn);
                }
            }
        }

        function onError(err, errback) {
            var ids = err.requireModules,
                notified = false;

            if (errback) {
                errback(err);
            } else {
                each(ids, function (id) {
                    var mod = getOwn(registry, id);
                    if (mod) {
                        //Set error on module, so it skips timeout checks.
                        mod.error = err;
                        if (mod.events.error) {
                            notified = true;
                            mod.emit('error', err);
                        }
                    }
                });

                if (!notified) {
                    req.onError(err);
                }
            }
        }

        /**
         * Internal method to transfer globalQueue items to this context's
         * defQueue.
         */
        function takeGlobalQueue() {
            //Push all the globalDefQueue items into the context's defQueue
            if (globalDefQueue.length) {
                each(globalDefQueue, function(queueItem) {
                    var id = queueItem[0];
                    if (typeof id === 'string') {
                        context.defQueueMap[id] = true;
                    }
                    defQueue.push(queueItem);
                });
                globalDefQueue = [];
            }
        }

        handlers = {
            'require': function (mod) {
                if (mod.require) {
                    return mod.require;
                } else {
                    return (mod.require = context.makeRequire(mod.map));
                }
            },
            'exports': function (mod) {
                mod.usingExports = true;
                if (mod.map.isDefine) {
                    if (mod.exports) {
                        return (defined[mod.map.id] = mod.exports);
                    } else {
                        return (mod.exports = defined[mod.map.id] = {});
                    }
                }
            },
            'module': function (mod) {
                if (mod.module) {
                    return mod.module;
                } else {
                    return (mod.module = {
                        id: mod.map.id,
                        uri: mod.map.url,
                        config: function () {
                            return getOwn(config.config, mod.map.id) || {};
                        },
                        exports: mod.exports || (mod.exports = {})
                    });
                }
            }
        };

        function cleanRegistry(id) {
            //Clean up machinery used for waiting modules.
            delete registry[id];
            delete enabledRegistry[id];
        }

        function breakCycle(mod, traced, processed) {
            var id = mod.map.id;

            if (mod.error) {
                mod.emit('error', mod.error);
            } else {
                traced[id] = true;
                each(mod.depMaps, function (depMap, i) {
                    var depId = depMap.id,
                        dep = getOwn(registry, depId);

                    //Only force things that have not completed
                    //being defined, so still in the registry,
                    //and only if it has not been matched up
                    //in the module already.
                    if (dep && !mod.depMatched[i] && !processed[depId]) {
                        if (getOwn(traced, depId)) {
                            mod.defineDep(i, defined[depId]);
                            mod.check(); //pass false?
                        } else {
                            breakCycle(dep, traced, processed);
                        }
                    }
                });
                processed[id] = true;
            }
        }

        function checkLoaded() {
            var err, usingPathFallback,
                waitInterval = config.waitSeconds * 1000,
                //It is possible to disable the wait interval by using waitSeconds of 0.
                expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(),
                noLoads = [],
                reqCalls = [],
                stillLoading = false,
                needCycleCheck = true;

            //Do not bother if this call was a result of a cycle break.
            if (inCheckLoaded) {
                return;
            }

            inCheckLoaded = true;

            //Figure out the state of all the modules.
            eachProp(enabledRegistry, function (mod) {
                var map = mod.map,
                    modId = map.id;

                //Skip things that are not enabled or in error state.
                if (!mod.enabled) {
                    return;
                }

                if (!map.isDefine) {
                    reqCalls.push(mod);
                }

                if (!mod.error) {
                    //If the module should be executed, and it has not
                    //been inited and time is up, remember it.
                    if (!mod.inited && expired) {
                        if (hasPathFallback(modId)) {
                            usingPathFallback = true;
                            stillLoading = true;
                        } else {
                            noLoads.push(modId);
                            removeScript(modId);
                        }
                    } else if (!mod.inited && mod.fetched && map.isDefine) {
                        stillLoading = true;
                        if (!map.prefix) {
                            //No reason to keep looking for unfinished
                            //loading. If the only stillLoading is a
                            //plugin resource though, keep going,
                            //because it may be that a plugin resource
                            //is waiting on a non-plugin cycle.
                            return (needCycleCheck = false);
                        }
                    }
                }
            });

            if (expired && noLoads.length) {
                //If wait time expired, throw error of unloaded modules.
                err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads);
                err.contextName = context.contextName;
                return onError(err);
            }

            //Not expired, check for a cycle.
            if (needCycleCheck) {
                each(reqCalls, function (mod) {
                    breakCycle(mod, {}, {});
                });
            }

            //If still waiting on loads, and the waiting load is something
            //other than a plugin resource, or there are still outstanding
            //scripts, then just try back later.
            if ((!expired || usingPathFallback) && stillLoading) {
                //Something is still waiting to load. Wait for it, but only
                //if a timeout is not already in effect.
                if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) {
                    checkLoadedTimeoutId = setTimeout(function () {
                        checkLoadedTimeoutId = 0;
                        checkLoaded();
                    }, 50);
                }
            }

            inCheckLoaded = false;
        }

        Module = function (map) {
            this.events = getOwn(undefEvents, map.id) || {};
            this.map = map;
            this.shim = getOwn(config.shim, map.id);
            this.depExports = [];
            this.depMaps = [];
            this.depMatched = [];
            this.pluginMaps = {};
            this.depCount = 0;

            /* this.exports this.factory
               this.depMaps = [],
               this.enabled, this.fetched
            */
        };

        Module.prototype = {
            init: function (depMaps, factory, errback, options) {
                options = options || {};

                //Do not do more inits if already done. Can happen if there
                //are multiple define calls for the same module. That is not
                //a normal, common case, but it is also not unexpected.
                if (this.inited) {
                    return;
                }

                this.factory = factory;

                if (errback) {
                    //Register for errors on this module.
                    this.on('error', errback);
                } else if (this.events.error) {
                    //If no errback already, but there are error listeners
                    //on this module, set up an errback to pass to the deps.
                    errback = bind(this, function (err) {
                        this.emit('error', err);
                    });
                }

                //Do a copy of the dependency array, so that
                //source inputs are not modified. For example
                //"shim" deps are passed in here directly, and
                //doing a direct modification of the depMaps array
                //would affect that config.
                this.depMaps = depMaps && depMaps.slice(0);

                this.errback = errback;

                //Indicate this module has be initialized
                this.inited = true;

                this.ignore = options.ignore;

                //Could have option to init this module in enabled mode,
                //or could have been previously marked as enabled. However,
                //the dependencies are not known until init is called. So
                //if enabled previously, now trigger dependencies as enabled.
                if (options.enabled || this.enabled) {
                    //Enable this module and dependencies.
                    //Will call this.check()
                    this.enable();
                } else {
                    this.check();
                }
            },

            defineDep: function (i, depExports) {
                //Because of cycles, defined callback for a given
                //export can be called more than once.
                if (!this.depMatched[i]) {
                    this.depMatched[i] = true;
                    this.depCount -= 1;
                    this.depExports[i] = depExports;
                }
            },

            fetch: function () {
                if (this.fetched) {
                    return;
                }
                this.fetched = true;

                context.startTime = (new Date()).getTime();

                var map = this.map;

                //If the manager is for a plugin managed resource,
                //ask the plugin to load it now.
                if (this.shim) {
                    context.makeRequire(this.map, {
                        enableBuildCallback: true
                    })(this.shim.deps || [], bind(this, function () {
                        return map.prefix ? this.callPlugin() : this.load();
                    }));
                } else {
                    //Regular dependency.
                    return map.prefix ? this.callPlugin() : this.load();
                }
            },

            load: function () {
                var url = this.map.url;

                //Regular dependency.
                if (!urlFetched[url]) {
                    urlFetched[url] = true;
                    context.load(this.map.id, url);
                }
            },

            /**
             * Checks if the module is ready to define itself, and if so,
             * define it.
             */
            check: function () {
                if (!this.enabled || this.enabling) {
                    return;
                }

                var err, cjsModule,
                    id = this.map.id,
                    depExports = this.depExports,
                    exports = this.exports,
                    factory = this.factory;

                if (!this.inited) {
                    // Only fetch if not already in the defQueue.
                    if (!hasProp(context.defQueueMap, id)) {
                        this.fetch();
                    }
                } else if (this.error) {
                    this.emit('error', this.error);
                } else if (!this.defining) {
                    //The factory could trigger another require call
                    //that would result in checking this module to
                    //define itself again. If already in the process
                    //of doing that, skip this work.
                    this.defining = true;

                    if (this.depCount < 1 && !this.defined) {
                        if (isFunction(factory)) {
                            //If there is an error listener, favor passing
                            //to that instead of throwing an error. However,
                            //only do it for define()'d  modules. require
                            //errbacks should not be called for failures in
                            //their callbacks (#699). However if a global
                            //onError is set, use that.
                            if ((this.events.error && this.map.isDefine) ||
                                req.onError !== defaultOnError) {
                                try {
                                    exports = context.execCb(id, factory, depExports, exports);
                                } catch (e) {
                                    err = e;
                                }
                            } else {
                                exports = context.execCb(id, factory, depExports, exports);
                            }

                            // Favor return value over exports. If node/cjs in play,
                            // then will not have a return value anyway. Favor
                            // module.exports assignment over exports object.
                            if (this.map.isDefine && exports === undefined) {
                                cjsModule = this.module;
                                if (cjsModule) {
                                    exports = cjsModule.exports;
                                } else if (this.usingExports) {
                                    //exports already set the defined value.
                                    exports = this.exports;
                                }
                            }

                            if (err) {
                                err.requireMap = this.map;
                                err.requireModules = this.map.isDefine ? [this.map.id] : null;
                                err.requireType = this.map.isDefine ? 'define' : 'require';
                                return onError((this.error = err));
                            }

                        } else {
                            //Just a literal value
                            exports = factory;
                        }

                        this.exports = exports;

                        if (this.map.isDefine && !this.ignore) {
                            defined[id] = exports;

                            if (req.onResourceLoad) {
                                var resLoadMaps = [];
                                each(this.depMaps, function (depMap) {
                                    resLoadMaps.push(depMap.normalizedMap || depMap);
                                });
                                req.onResourceLoad(context, this.map, resLoadMaps);
                            }
                        }

                        //Clean up
                        cleanRegistry(id);

                        this.defined = true;
                    }

                    //Finished the define stage. Allow calling check again
                    //to allow define notifications below in the case of a
                    //cycle.
                    this.defining = false;

                    if (this.defined && !this.defineEmitted) {
                        this.defineEmitted = true;
                        this.emit('defined', this.exports);
                        this.defineEmitComplete = true;
                    }

                }
            },

            callPlugin: function () {
                var map = this.map,
                    id = map.id,
                    //Map already normalized the prefix.
                    pluginMap = makeModuleMap(map.prefix);

                //Mark this as a dependency for this plugin, so it
                //can be traced for cycles.
                this.depMaps.push(pluginMap);

                on(pluginMap, 'defined', bind(this, function (plugin) {
                    var load, normalizedMap, normalizedMod,
                        bundleId = getOwn(bundlesMap, this.map.id),
                        name = this.map.name,
                        parentName = this.map.parentMap ? this.map.parentMap.name : null,
                        localRequire = context.makeRequire(map.parentMap, {
                            enableBuildCallback: true
                        });

                    //If current map is not normalized, wait for that
                    //normalized name to load instead of continuing.
                    if (this.map.unnormalized) {
                        //Normalize the ID if the plugin allows it.
                        if (plugin.normalize) {
                            name = plugin.normalize(name, function (name) {
                                return normalize(name, parentName, true);
                            }) || '';
                        }

                        //prefix and name should already be normalized, no need
                        //for applying map config again either.
                        normalizedMap = makeModuleMap(map.prefix + '!' + name,
                                                      this.map.parentMap,
                                                      true);
                        on(normalizedMap,
                            'defined', bind(this, function (value) {
                                this.map.normalizedMap = normalizedMap;
                                this.init([], function () { return value; }, null, {
                                    enabled: true,
                                    ignore: true
                                });
                            }));

                        normalizedMod = getOwn(registry, normalizedMap.id);
                        if (normalizedMod) {
                            //Mark this as a dependency for this plugin, so it
                            //can be traced for cycles.
                            this.depMaps.push(normalizedMap);

                            if (this.events.error) {
                                normalizedMod.on('error', bind(this, function (err) {
                                    this.emit('error', err);
                                }));
                            }
                            normalizedMod.enable();
                        }

                        return;
                    }

                    //If a paths config, then just load that file instead to
                    //resolve the plugin, as it is built into that paths layer.
                    if (bundleId) {
                        this.map.url = context.nameToUrl(bundleId);
                        this.load();
                        return;
                    }

                    load = bind(this, function (value) {
                        this.init([], function () { return value; }, null, {
                            enabled: true
                        });
                    });

                    load.error = bind(this, function (err) {
                        this.inited = true;
                        this.error = err;
                        err.requireModules = [id];

                        //Remove temp unnormalized modules for this module,
                        //since they will never be resolved otherwise now.
                        eachProp(registry, function (mod) {
                            if (mod.map.id.indexOf(id + '_unnormalized') === 0) {
                                cleanRegistry(mod.map.id);
                            }
                        });

                        onError(err);
                    });

                    //Allow plugins to load other code without having to know the
                    //context or how to 'complete' the load.
                    load.fromText = bind(this, function (text, textAlt) {
                        /*jslint evil: true */
                        var moduleName = map.name,
                            moduleMap = makeModuleMap(moduleName),
                            hasInteractive = useInteractive;

                        //As of 2.1.0, support just passing the text, to reinforce
                        //fromText only being called once per resource. Still
                        //support old style of passing moduleName but discard
                        //that moduleName in favor of the internal ref.
                        if (textAlt) {
                            text = textAlt;
                        }

                        //Turn off interactive script matching for IE for any define
                        //calls in the text, then turn it back on at the end.
                        if (hasInteractive) {
                            useInteractive = false;
                        }

                        //Prime the system by creating a module instance for
                        //it.
                        getModule(moduleMap);

                        //Transfer any config to this other module.
                        if (hasProp(config.config, id)) {
                            config.config[moduleName] = config.config[id];
                        }

                        try {
                            req.exec(text);
                        } catch (e) {
                            return onError(makeError('fromtexteval',
                                             'fromText eval for ' + id +
                                            ' failed: ' + e,
                                             e,
                                             [id]));
                        }

                        if (hasInteractive) {
                            useInteractive = true;
                        }

                        //Mark this as a dependency for the plugin
                        //resource
                        this.depMaps.push(moduleMap);

                        //Support anonymous modules.
                        context.completeLoad(moduleName);

                        //Bind the value of that module to the value for this
                        //resource ID.
                        localRequire([moduleName], load);
                    });

                    //Use parentName here since the plugin's name is not reliable,
                    //could be some weird string with no path that actually wants to
                    //reference the parentName's path.
                    plugin.load(map.name, localRequire, load, config);
                }));

                context.enable(pluginMap, this);
                this.pluginMaps[pluginMap.id] = pluginMap;
            },

            enable: function () {
                enabledRegistry[this.map.id] = this;
                this.enabled = true;

                //Set flag mentioning that the module is enabling,
                //so that immediate calls to the defined callbacks
                //for dependencies do not trigger inadvertent load
                //with the depCount still being zero.
                this.enabling = true;

                //Enable each dependency
                each(this.depMaps, bind(this, function (depMap, i) {
                    var id, mod, handler;

                    if (typeof depMap === 'string') {
                        //Dependency needs to be converted to a depMap
                        //and wired up to this module.
                        depMap = makeModuleMap(depMap,
                                               (this.map.isDefine ? this.map : this.map.parentMap),
                                               false,
                                               !this.skipMap);
                        this.depMaps[i] = depMap;

                        handler = getOwn(handlers, depMap.id);

                        if (handler) {
                            this.depExports[i] = handler(this);
                            return;
                        }

                        this.depCount += 1;

                        on(depMap, 'defined', bind(this, function (depExports) {
                            if (this.undefed) {
                                return;
                            }
                            this.defineDep(i, depExports);
                            this.check();
                        }));

                        if (this.errback) {
                            on(depMap, 'error', bind(this, this.errback));
                        } else if (this.events.error) {
                            // No direct errback on this module, but something
                            // else is listening for errors, so be sure to
                            // propagate the error correctly.
                            on(depMap, 'error', bind(this, function(err) {
                                this.emit('error', err);
                            }));
                        }
                    }

                    id = depMap.id;
                    mod = registry[id];

                    //Skip special modules like 'require', 'exports', 'module'
                    //Also, don't call enable if it is already enabled,
                    //important in circular dependency cases.
                    if (!hasProp(handlers, id) && mod && !mod.enabled) {
                        context.enable(depMap, this);
                    }
                }));

                //Enable each plugin that is used in
                //a dependency
                eachProp(this.pluginMaps, bind(this, function (pluginMap) {
                    var mod = getOwn(registry, pluginMap.id);
                    if (mod && !mod.enabled) {
                        context.enable(pluginMap, this);
                    }
                }));

                this.enabling = false;

                this.check();
            },

            on: function (name, cb) {
                var cbs = this.events[name];
                if (!cbs) {
                    cbs = this.events[name] = [];
                }
                cbs.push(cb);
            },

            emit: function (name, evt) {
                each(this.events[name], function (cb) {
                    cb(evt);
                });
                if (name === 'error') {
                    //Now that the error handler was triggered, remove
                    //the listeners, since this broken Module instance
                    //can stay around for a while in the registry.
                    delete this.events[name];
                }
            }
        };

        function callGetModule(args) {
            //Skip modules already defined.
            if (!hasProp(defined, args[0])) {
                getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]);
            }
        }

        function removeListener(node, func, name, ieName) {
            //Favor detachEvent because of IE9
            //issue, see attachEvent/addEventListener comment elsewhere
            //in this file.
            if (node.detachEvent && !isOpera) {
                //Probably IE. If not it will throw an error, which will be
                //useful to know.
                if (ieName) {
                    node.detachEvent(ieName, func);
                }
            } else {
                node.removeEventListener(name, func, false);
            }
        }

        /**
         * Given an event from a script node, get the requirejs info from it,
         * and then removes the event listeners on the node.
         * @param {Event} evt
         * @returns {Object}
         */
        function getScriptData(evt) {
            //Using currentTarget instead of target for Firefox 2.0's sake. Not
            //all old browsers will be supported, but this one was easy enough
            //to support and still makes sense.
            var node = evt.currentTarget || evt.srcElement;

            //Remove the listeners once here.
            removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange');
            removeListener(node, context.onScriptError, 'error');

            return {
                node: node,
                id: node && node.getAttribute('data-requiremodule')
            };
        }

        function intakeDefines() {
            var args;

            //Any defined modules in the global queue, intake them now.
            takeGlobalQueue();

            //Make sure any remaining defQueue items get properly processed.
            while (defQueue.length) {
                args = defQueue.shift();
                if (args[0] === null) {
                    return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' +
                        args[args.length - 1]));
                } else {
                    //args are id, deps, factory. Should be normalized by the
                    //define() function.
                    callGetModule(args);
                }
            }
            context.defQueueMap = {};
        }

        context = {
            config: config,
            contextName: contextName,
            registry: registry,
            defined: defined,
            urlFetched: urlFetched,
            defQueue: defQueue,
            defQueueMap: {},
            Module: Module,
            makeModuleMap: makeModuleMap,
            nextTick: req.nextTick,
            onError: onError,

            /**
             * Set a configuration for the context.
             * @param {Object} cfg config object to integrate.
             */
            configure: function (cfg) {
                //Make sure the baseUrl ends in a slash.
                if (cfg.baseUrl) {
                    if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') {
                        cfg.baseUrl += '/';
                    }
                }

                // Convert old style urlArgs string to a function.
                if (typeof cfg.urlArgs === 'string') {
                    var urlArgs = cfg.urlArgs;
                    cfg.urlArgs = function(id, url) {
                        return (url.indexOf('?') === -1 ? '?' : '&') + urlArgs;
                    };
                }

                //Save off the paths since they require special processing,
                //they are additive.
                var shim = config.shim,
                    objs = {
                        paths: true,
                        bundles: true,
                        config: true,
                        map: true
                    };

                eachProp(cfg, function (value, prop) {
                    if (objs[prop]) {
                        if (!config[prop]) {
                            config[prop] = {};
                        }
                        mixin(config[prop], value, true, true);
                    } else {
                        config[prop] = value;
                    }
                });

                //Reverse map the bundles
                if (cfg.bundles) {
                    eachProp(cfg.bundles, function (value, prop) {
                        each(value, function (v) {
                            if (v !== prop) {
                                bundlesMap[v] = prop;
                            }
                        });
                    });
                }

                //Merge shim
                if (cfg.shim) {
                    eachProp(cfg.shim, function (value, id) {
                        //Normalize the structure
                        if (isArray(value)) {
                            value = {
                                deps: value
                            };
                        }
                        if ((value.exports || value.init) && !value.exportsFn) {
                            value.exportsFn = context.makeShimExports(value);
                        }
                        shim[id] = value;
                    });
                    config.shim = shim;
                }

                //Adjust packages if necessary.
                if (cfg.packages) {
                    each(cfg.packages, function (pkgObj) {
                        var location, name;

                        pkgObj = typeof pkgObj === 'string' ? {name: pkgObj} : pkgObj;

                        name = pkgObj.name;
                        location = pkgObj.location;
                        if (location) {
                            config.paths[name] = pkgObj.location;
                        }

                        //Save pointer to main module ID for pkg name.
                        //Remove leading dot in main, so main paths are normalized,
                        //and remove any trailing .js, since different package
                        //envs have different conventions: some use a module name,
                        //some use a file name.
                        config.pkgs[name] = pkgObj.name + '/' + (pkgObj.main || 'main')
                                     .replace(currDirRegExp, '')
                                     .replace(jsSuffixRegExp, '');
                    });
                }

                //If there are any "waiting to execute" modules in the registry,
                //update the maps for them, since their info, like URLs to load,
                //may have changed.
                eachProp(registry, function (mod, id) {
                    //If module already has init called, since it is too
                    //late to modify them, and ignore unnormalized ones
                    //since they are transient.
                    if (!mod.inited && !mod.map.unnormalized) {
                        mod.map = makeModuleMap(id, null, true);
                    }
                });

                //If a deps array or a config callback is specified, then call
                //require with those args. This is useful when require is defined as a
                //config object before require.js is loaded.
                if (cfg.deps || cfg.callback) {
                    context.require(cfg.deps || [], cfg.callback);
                }
            },

            makeShimExports: function (value) {
                function fn() {
                    var ret;
                    if (value.init) {
                        ret = value.init.apply(global, arguments);
                    }
                    return ret || (value.exports && getGlobal(value.exports));
                }
                return fn;
            },

            makeRequire: function (relMap, options) {
                options = options || {};

                function localRequire(deps, callback, errback) {
                    var id, map, requireMod;

                    if (options.enableBuildCallback && callback && isFunction(callback)) {
                        callback.__requireJsBuild = true;
                    }

                    if (typeof deps === 'string') {
                        if (isFunction(callback)) {
                            //Invalid call
                            return onError(makeError('requireargs', 'Invalid require call'), errback);
                        }

                        //If require|exports|module are requested, get the
                        //value for them from the special handlers. Caveat:
                        //this only works while module is being defined.
                        if (relMap && hasProp(handlers, deps)) {
                            return handlers[deps](registry[relMap.id]);
                        }

                        //Synchronous access to one module. If require.get is
                        //available (as in the Node adapter), prefer that.
                        if (req.get) {
                            return req.get(context, deps, relMap, localRequire);
                        }

                        //Normalize module name, if it contains . or ..
                        map = makeModuleMap(deps, relMap, false, true);
                        id = map.id;

                        if (!hasProp(defined, id)) {
                            return onError(makeError('notloaded', 'Module name "' +
                                        id +
                                        '" has not been loaded yet for context: ' +
                                        contextName +
                                        (relMap ? '' : '. Use require([])')));
                        }
                        return defined[id];
                    }

                    //Grab defines waiting in the global queue.
                    intakeDefines();

                    //Mark all the dependencies as needing to be loaded.
                    context.nextTick(function () {
                        //Some defines could have been added since the
                        //require call, collect them.
                        intakeDefines();

                        requireMod = getModule(makeModuleMap(null, relMap));

                        //Store if map config should be applied to this require
                        //call for dependencies.
                        requireMod.skipMap = options.skipMap;

                        requireMod.init(deps, callback, errback, {
                            enabled: true
                        });

                        checkLoaded();
                    });

                    return localRequire;
                }

                mixin(localRequire, {
                    isBrowser: isBrowser,

                    /**
                     * Converts a module name + .extension into an URL path.
                     * *Requires* the use of a module name. It does not support using
                     * plain URLs like nameToUrl.
                     */
                    toUrl: function (moduleNamePlusExt) {
                        var ext,
                            index = moduleNamePlusExt.lastIndexOf('.'),
                            segment = moduleNamePlusExt.split('/')[0],
                            isRelative = segment === '.' || segment === '..';

                        //Have a file extension alias, and it is not the
                        //dots from a relative path.
                        if (index !== -1 && (!isRelative || index > 1)) {
                            ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length);
                            moduleNamePlusExt = moduleNamePlusExt.substring(0, index);
                        }

                        return context.nameToUrl(normalize(moduleNamePlusExt,
                                                relMap && relMap.id, true), ext,  true);
                    },

                    defined: function (id) {
                        return hasProp(defined, makeModuleMap(id, relMap, false, true).id);
                    },

                    specified: function (id) {
                        id = makeModuleMap(id, relMap, false, true).id;
                        return hasProp(defined, id) || hasProp(registry, id);
                    }
                });

                //Only allow undef on top level require calls
                if (!relMap) {
                    localRequire.undef = function (id) {
                        //Bind any waiting define() calls to this context,
                        //fix for #408
                        takeGlobalQueue();

                        var map = makeModuleMap(id, relMap, true),
                            mod = getOwn(registry, id);

                        mod.undefed = true;
                        removeScript(id);

                        delete defined[id];
                        delete urlFetched[map.url];
                        delete undefEvents[id];

                        //Clean queued defines too. Go backwards
                        //in array so that the splices do not
                        //mess up the iteration.
                        eachReverse(defQueue, function(args, i) {
                            if (args[0] === id) {
                                defQueue.splice(i, 1);
                            }
                        });
                        delete context.defQueueMap[id];

                        if (mod) {
                            //Hold on to listeners in case the
                            //module will be attempted to be reloaded
                            //using a different config.
                            if (mod.events.defined) {
                                undefEvents[id] = mod.events;
                            }

                            cleanRegistry(id);
                        }
                    };
                }

                return localRequire;
            },

            /**
             * Called to enable a module if it is still in the registry
             * awaiting enablement. A second arg, parent, the parent module,
             * is passed in for context, when this method is overridden by
             * the optimizer. Not shown here to keep code compact.
             */
            enable: function (depMap) {
                var mod = getOwn(registry, depMap.id);
                if (mod) {
                    getModule(depMap).enable();
                }
            },

            /**
             * Internal method used by environment adapters to complete a load event.
             * A load event could be a script load or just a load pass from a synchronous
             * load call.
             * @param {String} moduleName the name of the module to potentially complete.
             */
            completeLoad: function (moduleName) {
                var found, args, mod,
                    shim = getOwn(config.shim, moduleName) || {},
                    shExports = shim.exports;

                takeGlobalQueue();

                while (defQueue.length) {
                    args = defQueue.shift();
                    if (args[0] === null) {
                        args[0] = moduleName;
                        //If already found an anonymous module and bound it
                        //to this name, then this is some other anon module
                        //waiting for its completeLoad to fire.
                        if (found) {
                            break;
                        }
                        found = true;
                    } else if (args[0] === moduleName) {
                        //Found matching define call for this script!
                        found = true;
                    }

                    callGetModule(args);
                }
                context.defQueueMap = {};

                //Do this after the cycle of callGetModule in case the result
                //of those calls/init calls changes the registry.
                mod = getOwn(registry, moduleName);

                if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) {
                    if (config.enforceDefine && (!shExports || !getGlobal(shExports))) {
                        if (hasPathFallback(moduleName)) {
                            return;
                        } else {
                            return onError(makeError('nodefine',
                                             'No define call for ' + moduleName,
                                             null,
                                             [moduleName]));
                        }
                    } else {
                        //A script that does not call define(), so just simulate
                        //the call for it.
                        callGetModule([moduleName, (shim.deps || []), shim.exportsFn]);
                    }
                }

                checkLoaded();
            },

            /**
             * Converts a module name to a file path. Supports cases where
             * moduleName may actually be just an URL.
             * Note that it **does not** call normalize on the moduleName,
             * it is assumed to have already been normalized. This is an
             * internal API, not a public one. Use toUrl for the public API.
             */
            nameToUrl: function (moduleName, ext, skipExt) {
                var paths, syms, i, parentModule, url,
                    parentPath, bundleId,
                    pkgMain = getOwn(config.pkgs, moduleName);

                if (pkgMain) {
                    moduleName = pkgMain;
                }

                bundleId = getOwn(bundlesMap, moduleName);

                if (bundleId) {
                    return context.nameToUrl(bundleId, ext, skipExt);
                }

                //If a colon is in the URL, it indicates a protocol is used and it is just
                //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?)
                //or ends with .js, then assume the user meant to use an url and not a module id.
                //The slash is important for protocol-less URLs as well as full paths.
                if (req.jsExtRegExp.test(moduleName)) {
                    //Just a plain path, not module name lookup, so just return it.
                    //Add extension if it is included. This is a bit wonky, only non-.js things pass
                    //an extension, this method probably needs to be reworked.
                    url = moduleName + (ext || '');
                } else {
                    //A module that needs to be converted to a path.
                    paths = config.paths;

                    syms = moduleName.split('/');
                    //For each module name segment, see if there is a path
                    //registered for it. Start with most specific name
                    //and work up from it.
                    for (i = syms.length; i > 0; i -= 1) {
                        parentModule = syms.slice(0, i).join('/');

                        parentPath = getOwn(paths, parentModule);
                        if (parentPath) {
                            //If an array, it means there are a few choices,
                            //Choose the one that is desired
                            if (isArray(parentPath)) {
                                parentPath = parentPath[0];
                            }
                            syms.splice(0, i, parentPath);
                            break;
                        }
                    }

                    //Join the path parts together, then figure out if baseUrl is needed.
                    url = syms.join('/');
                    url += (ext || (/^data\:|^blob\:|\?/.test(url) || skipExt ? '' : '.js'));
                    url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url;
                }

                return config.urlArgs && !/^blob\:/.test(url) ?
                       url + config.urlArgs(moduleName, url) : url;
            },

            //Delegates to req.load. Broken out as a separate function to
            //allow overriding in the optimizer.
            load: function (id, url) {
                req.load(context, id, url);
            },

            /**
             * Executes a module callback function. Broken out as a separate function
             * solely to allow the build system to sequence the files in the built
             * layer in the right sequence.
             *
             * @private
             */
            execCb: function (name, callback, args, exports) {
                return callback.apply(exports, args);
            },

            /**
             * callback for script loads, used to check status of loading.
             *
             * @param {Event} evt the event from the browser for the script
             * that was loaded.
             */
            onScriptLoad: function (evt) {
                //Using currentTarget instead of target for Firefox 2.0's sake. Not
                //all old browsers will be supported, but this one was easy enough
                //to support and still makes sense.
                if (evt.type === 'load' ||
                        (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) {
                    //Reset interactive script so a script node is not held onto for
                    //to long.
                    interactiveScript = null;

                    //Pull out the name of the module and the context.
                    var data = getScriptData(evt);
                    context.completeLoad(data.id);
                }
            },

            /**
             * Callback for script errors.
             */
            onScriptError: function (evt) {
                var data = getScriptData(evt);
                if (!hasPathFallback(data.id)) {
                    var parents = [];
                    eachProp(registry, function(value, key) {
                        if (key.indexOf('_@r') !== 0) {
                            each(value.depMaps, function(depMap) {
                                if (depMap.id === data.id) {
                                    parents.push(key);
                                    return true;
                                }
                            });
                        }
                    });
                    return onError(makeError('scripterror', 'Script error for "' + data.id +
                                             (parents.length ?
                                             '", needed by: ' + parents.join(', ') :
                                             '"'), evt, [data.id]));
                }
            }
        };

        context.require = context.makeRequire();
        return context;
    }

    /**
     * Main entry point.
     *
     * If the only argument to require is a string, then the module that
     * is represented by that string is fetched for the appropriate context.
     *
     * If the first argument is an array, then it will be treated as an array
     * of dependency string names to fetch. An optional function callback can
     * be specified to execute when all of those dependencies are available.
     *
     * Make a local req variable to help Caja compliance (it assumes things
     * on a require that are not standardized), and to give a short
     * name for minification/local scope use.
     */
    req = requirejs = function (deps, callback, errback, optional) {

        //Find the right context, use default
        var context, config,
            contextName = defContextName;

        // Determine if have config object in the call.
        if (!isArray(deps) && typeof deps !== 'string') {
            // deps is a config object
            config = deps;
            if (isArray(callback)) {
                // Adjust args if there are dependencies
                deps = callback;
                callback = errback;
                errback = optional;
            } else {
                deps = [];
            }
        }

        if (config && config.context) {
            contextName = config.context;
        }

        context = getOwn(contexts, contextName);
        if (!context) {
            context = contexts[contextName] = req.s.newContext(contextName);
        }

        if (config) {
            context.configure(config);
        }

        return context.require(deps, callback, errback);
    };

    /**
     * Support require.config() to make it easier to cooperate with other
     * AMD loaders on globally agreed names.
     */
    req.config = function (config) {
        return req(config);
    };

    /**
     * Execute something after the current tick
     * of the event loop. Override for other envs
     * that have a better solution than setTimeout.
     * @param  {Function} fn function to execute later.
     */
    req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) {
        setTimeout(fn, 4);
    } : function (fn) { fn(); };

    /**
     * Export require as a global, but only if it does not already exist.
     */
    if (!require) {
        require = req;
    }

    req.version = version;

    //Used to filter out dependencies that are already paths.
    req.jsExtRegExp = /^\/|:|\?|\.js$/;
    req.isBrowser = isBrowser;
    s = req.s = {
        contexts: contexts,
        newContext: newContext
    };

    //Create default context.
    req({});

    //Exports some context-sensitive methods on global require.
    each([
        'toUrl',
        'undef',
        'defined',
        'specified'
    ], function (prop) {
        //Reference from contexts instead of early binding to default context,
        //so that during builds, the latest instance of the default context
        //with its config gets used.
        req[prop] = function () {
            var ctx = contexts[defContextName];
            return ctx.require[prop].apply(ctx, arguments);
        };
    });

    if (isBrowser) {
        head = s.head = document.getElementsByTagName('head')[0];
        //If BASE tag is in play, using appendChild is a problem for IE6.
        //When that browser dies, this can be removed. Details in this jQuery bug:
        //http://dev.jquery.com/ticket/2709
        baseElement = document.getElementsByTagName('base')[0];
        if (baseElement) {
            head = s.head = baseElement.parentNode;
        }
    }

    /**
     * Any errors that require explicitly generates will be passed to this
     * function. Intercept/override it if you want custom error handling.
     * @param {Error} err the error object.
     */
    req.onError = defaultOnError;

    /**
     * Creates the node for the load command. Only used in browser envs.
     */
    req.createNode = function (config, moduleName, url) {
        var node = config.xhtml ?
                document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') :
                document.createElement('script');
        node.type = config.scriptType || 'text/javascript';
        node.charset = 'utf-8';
        node.async = true;
        return node;
    };

    /**
     * Does the request to load a module for the browser case.
     * Make this a separate function to allow other environments
     * to override it.
     *
     * @param {Object} context the require context to find state.
     * @param {String} moduleName the name of the module.
     * @param {Object} url the URL to the module.
     */
    req.load = function (context, moduleName, url) {
        var config = (context && context.config) || {},
            node;
        if (isBrowser) {
            //In the browser so use a script tag
            node = req.createNode(config, moduleName, url);

            node.setAttribute('data-requirecontext', context.contextName);
            node.setAttribute('data-requiremodule', moduleName);

            //Set up load listener. Test attachEvent first because IE9 has
            //a subtle issue in its addEventListener and script onload firings
            //that do not match the behavior of all other browsers with
            //addEventListener support, which fire the onload event for a
            //script right after the script execution. See:
            //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution
            //UNFORTUNATELY Opera implements attachEvent but does not follow the script
            //script execution mode.
            if (node.attachEvent &&
                    //Check if node.attachEvent is artificially added by custom script or
                    //natively supported by browser
                    //read https://github.com/requirejs/requirejs/issues/187
                    //if we can NOT find [native code] then it must NOT natively supported.
                    //in IE8, node.attachEvent does not have toString()
                    //Note the test for "[native code" with no closing brace, see:
                    //https://github.com/requirejs/requirejs/issues/273
                    !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) &&
                    !isOpera) {
                //Probably IE. IE (at least 6-8) do not fire
                //script onload right after executing the script, so
                //we cannot tie the anonymous define call to a name.
                //However, IE reports the script as being in 'interactive'
                //readyState at the time of the define call.
                useInteractive = true;

                node.attachEvent('onreadystatechange', context.onScriptLoad);
                //It would be great to add an error handler here to catch
                //404s in IE9+. However, onreadystatechange will fire before
                //the error handler, so that does not help. If addEventListener
                //is used, then IE will fire error before load, but we cannot
                //use that pathway given the connect.microsoft.com issue
                //mentioned above about not doing the 'script execute,
                //then fire the script load event listener before execute
                //next script' that other browsers do.
                //Best hope: IE10 fixes the issues,
                //and then destroys all installs of IE 6-9.
                //node.attachEvent('onerror', context.onScriptError);
            } else {
                node.addEventListener('load', context.onScriptLoad, false);
                node.addEventListener('error', context.onScriptError, false);
            }
            node.src = url;

            //Calling onNodeCreated after all properties on the node have been
            //set, but before it is placed in the DOM.
            if (config.onNodeCreated) {
                config.onNodeCreated(node, config, moduleName, url);
            }

            //For some cache cases in IE 6-8, the script executes before the end
            //of the appendChild execution, so to tie an anonymous define
            //call to the module name (which is stored on the node), hold on
            //to a reference to this node, but clear after the DOM insertion.
            currentlyAddingScript = node;
            if (baseElement) {
                head.insertBefore(node, baseElement);
            } else {
                head.appendChild(node);
            }
            currentlyAddingScript = null;

            return node;
        } else if (isWebWorker) {
            try {
                //In a web worker, use importScripts. This is not a very
                //efficient use of importScripts, importScripts will block until
                //its script is downloaded and evaluated. However, if web workers
                //are in play, the expectation is that a build has been done so
                //that only one script needs to be loaded anyway. This may need
                //to be reevaluated if other use cases become common.

                // Post a task to the event loop to work around a bug in WebKit
                // where the worker gets garbage-collected after calling
                // importScripts(): https://webkit.org/b/153317
                setTimeout(function() {}, 0);
                importScripts(url);

                //Account for anonymous modules
                context.completeLoad(moduleName);
            } catch (e) {
                context.onError(makeError('importscripts',
                                'importScripts failed for ' +
                                    moduleName + ' at ' + url,
                                e,
                                [moduleName]));
            }
        }
    };

    function getInteractiveScript() {
        if (interactiveScript && interactiveScript.readyState === 'interactive') {
            return interactiveScript;
        }

        eachReverse(scripts(), function (script) {
            if (script.readyState === 'interactive') {
                return (interactiveScript = script);
            }
        });
        return interactiveScript;
    }

    //Look for a data-main script attribute, which could also adjust the baseUrl.
    if (isBrowser && !cfg.skipDataMain) {
        //Figure out baseUrl. Get it from the script tag with require.js in it.
        eachReverse(scripts(), function (script) {
            //Set the 'head' where we can append children by
            //using the script's parent.
            if (!head) {
                head = script.parentNode;
            }

            //Look for a data-main attribute to set main script for the page
            //to load. If it is there, the path to data main becomes the
            //baseUrl, if it is not already set.
            dataMain = script.getAttribute('data-main');
            if (dataMain) {
                //Preserve dataMain in case it is a path (i.e. contains '?')
                mainScript = dataMain;

                //Set final baseUrl if there is not already an explicit one,
                //but only do so if the data-main value is not a loader plugin
                //module ID.
                if (!cfg.baseUrl && mainScript.indexOf('!') === -1) {
                    //Pull off the directory of data-main for use as the
                    //baseUrl.
                    src = mainScript.split('/');
                    mainScript = src.pop();
                    subPath = src.length ? src.join('/')  + '/' : './';

                    cfg.baseUrl = subPath;
                }

                //Strip off any trailing .js since mainScript is now
                //like a module name.
                mainScript = mainScript.replace(jsSuffixRegExp, '');

                //If mainScript is still a path, fall back to dataMain
                if (req.jsExtRegExp.test(mainScript)) {
                    mainScript = dataMain;
                }

                //Put the data-main script in the files to load.
                cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript];

                return true;
            }
        });
    }

    /**
     * The function that handles definitions of modules. Differs from
     * require() in that a string for the module should be the first argument,
     * and the function to execute after dependencies are loaded should
     * return a value to define the module corresponding to the first argument's
     * name.
     */
    define = function (name, deps, callback) {
        var node, context;

        //Allow for anonymous modules
        if (typeof name !== 'string') {
            //Adjust args appropriately
            callback = deps;
            deps = name;
            name = null;
        }

        //This module may not have dependencies
        if (!isArray(deps)) {
            callback = deps;
            deps = null;
        }

        //If no name, and callback is a function, then figure out if it a
        //CommonJS thing with dependencies.
        if (!deps && isFunction(callback)) {
            deps = [];
            //Remove comments from the callback string,
            //look for require calls, and pull them into the dependencies,
            //but only if there are function args.
            if (callback.length) {
                callback
                    .toString()
                    .replace(commentRegExp, commentReplace)
                    .replace(cjsRequireRegExp, function (match, dep) {
                        deps.push(dep);
                    });

                //May be a CommonJS thing even without require calls, but still
                //could use exports, and module. Avoid doing exports and module
                //work though if it just needs require.
                //REQUIRES the function to expect the CommonJS variables in the
                //order listed below.
                deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps);
            }
        }

        //If in IE 6-8 and hit an anonymous define() call, do the interactive
        //work.
        if (useInteractive) {
            node = currentlyAddingScript || getInteractiveScript();
            if (node) {
                if (!name) {
                    name = node.getAttribute('data-requiremodule');
                }
                context = contexts[node.getAttribute('data-requirecontext')];
            }
        }

        //Always save off evaluating the def call until the script onload handler.
        //This allows multiple modules to be in a file without prematurely
        //tracing dependencies, and allows for anonymous module support,
        //where the module name is not known until the script onload event
        //occurs. If no context, use the global queue, and get it processed
        //in the onscript load callback.
        if (context) {
            context.defQueue.push([name, deps, callback]);
            context.defQueueMap[name] = true;
        } else {
            globalDefQueue.push([name, deps, callback]);
        }
    };

    define.amd = {
        jQuery: true
    };

    /**
     * Executes the text. Normally just uses eval, but can be modified
     * to use a better, environment-specific call. Only used for transpiling
     * loader plugins, not for plain JS modules.
     * @param {String} text the text to execute/evaluate.
     */
    req.exec = function (text) {
        /*jslint evil: true */
        return eval(text);
    };

    //Set up with config info.
    req(cfg);
}(this, (typeof setTimeout === 'undefined' ? undefined : setTimeout)));

